From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id 0BU/A/cR0F6WYwAA0tVLHw (envelope-from ) for ; Thu, 28 May 2020 19:33:11 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id 2F3BOvYR0F77OgAAB5/wlQ (envelope-from ) for ; Thu, 28 May 2020 19:33:10 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 35D7A94053A for ; Thu, 28 May 2020 19:33:10 +0000 (UTC) Received: from localhost ([::1]:52094 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jeOH5-0005GY-Gr for larch@yhetil.org; Thu, 28 May 2020 15:33:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48404) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jeOH1-0005Fq-22 for guix-patches@gnu.org; Thu, 28 May 2020 15:33:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:41558) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jeOH0-00047o-PW for guix-patches@gnu.org; Thu, 28 May 2020 15:33:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jeOH0-0001YI-Nu for guix-patches@gnu.org; Thu, 28 May 2020 15:33:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#41578] [PATCH] gnu: Add opendoas. Resent-From: Morgan Smith Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 28 May 2020 19:33:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41578 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Tobias Geerinckx-Rice Cc: 41578@debbugs.gnu.org X-Debbugs-Original-Cc: 41578@debbugs.gnu.org, guix-patches@gnu.org Received: via spool by 41578-submit@debbugs.gnu.org id=B41578.15906943625924 (code B ref 41578); Thu, 28 May 2020 19:33:02 +0000 Received: (at 41578) by debbugs.gnu.org; 28 May 2020 19:32:42 +0000 Received: from localhost ([127.0.0.1]:53101 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jeOGf-0001XT-IG for submit@debbugs.gnu.org; Thu, 28 May 2020 15:32:42 -0400 Received: from mail-oln040092010095.outbound.protection.outlook.com ([40.92.10.95]:38370 helo=NAM04-CO1-obe.outbound.protection.outlook.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jeNd5-0000Vw-Iu for 41578@debbugs.gnu.org; Thu, 28 May 2020 14:51:48 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ow4q4FRu1urZDhrjWbMfOpby5gAV/ZIp7mfgsL9kTqzYTjHPPJUbmAfOKLi+fa5nF6qmICu6vTViHawHhldzM6KfNgZ72GRZ1M57zVYOBXyxdQz8dkwT+ClHACyP+UqYKUeIMkHwJvkHGmYCG3YHEiv0jQ205yMSpYgWPR3Z29lu1Z6hmiXnvBd7J4ugIZ03bgDA5rD2m5ISSHBsvGHWWAEcBBNqmnCi298OBgfODGnRPqvI408t+46drsjxWg0UUIoNTPbTk7yAe2xF9x9YEFIwcTQKsY5kcQ1Q+6c302ahTxiJG68FvyLFgBYWLVZejS3AJhsSA1sbsCdsuoHwJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=TLOyTo6TMrJy7OwnCg4sFFbwTG/tjHF6VU3dxy2vqS0=; b=KoCRGfK39C0yApGtbhHAhhMRnA+9muVfjqY488tvRlWyjohrcIcpHn4p5iJuoGdIIKuCJpbaCzn0jZ30UU+npohV3hvEI5sKFAmH8/bjgQVQkpleND11MssnO+GA7lUB4YwddCq4CVkBL3NV8jBaBduTTgRENy/ob4YNWshlogpdzKXgTVWfPJyidxmwNc7ffWP6AkJ6AS4oRGrtQOltcB3RnHVaKzuf49ovNjcTjcHJNxAkyV9lQMjW267Jy8yqYbaDUx4IxRajaSlUPwtbBvX0J2wXCI3Nr4TZQV9ByK1Z+jROhxHxr0ijx6BBhFnc1anlt8bexqZvAN3urY+RQw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=outlook.com; dmarc=pass action=none header.from=outlook.com; dkim=pass header.d=outlook.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=TLOyTo6TMrJy7OwnCg4sFFbwTG/tjHF6VU3dxy2vqS0=; b=svRouHac1tbPqjMGFmp4PkRFAtuwLgfwNc8UjBskaow9dJaLcfcJvLAYAgjhbCDbB1swhXwX0WJQgqW/gDdoBRn48mUNVUKDGI665URUAa12J/rlOMNm0eu3HGPZIBRDhroVNlEFsNC8s4EBfH7HNRkBIqrdVogXjNaDCpRN4I7nmyD1SNagqLXDeXcOjTWW32/z+nVZwQuYlfS3c0hITaWGfedsP6xYIxYRloXVNWlZKieZfQWUDa83MmwoRTYuf4jNouo4Pa6IUiht6J0IadGNdwt6fMDcYha/+GZuLTAoMcOt4c0HVy/wmQdim/7PWnDiC2a3LFqSYEcfO5rNOg== Received: from CO1NAM04FT017.eop-NAM04.prod.protection.outlook.com (10.152.90.52) by CO1NAM04HT013.eop-NAM04.prod.protection.outlook.com (10.152.90.89) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3021.23; Thu, 28 May 2020 18:51:41 +0000 Received: from DM5PR1001MB2105.namprd10.prod.outlook.com (2a01:111:e400:7e4d::53) by CO1NAM04FT017.mail.protection.outlook.com (2a01:111:e400:7e4d::127) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3021.23 via Frontend Transport; Thu, 28 May 2020 18:51:40 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:1A96DDE97ABA2B4B272ACFBBEA76A2AE2A4C97F6B4CA4E7A0A8EF7F623BCF327; UpperCasedChecksum:8496C0A02D70AA245456747917600690CAFBCAA5371204FED106448754DCC700; SizeAsReceived:10593; Count:51 Received: from DM5PR1001MB2105.namprd10.prod.outlook.com ([fe80::d1eb:1b79:777f:92d0]) by DM5PR1001MB2105.namprd10.prod.outlook.com ([fe80::d1eb:1b79:777f:92d0%7]) with mapi id 15.20.3021.029; Thu, 28 May 2020 18:51:40 +0000 References: <875zcg3pu8.fsf@nckx> From: Morgan Smith Autocrypt: addr=Morgan.J.Smith@outlook.com; keydata= mQENBFwIaPkBCAC0ftYeut16x9zh8J7PCe+yVncNdhql5kmTPReny9l1kJ8OJRjBtgbhnS/j gImuOkSYJng4jc0PflEf+WoozLznLCHoM0DYHZwX0ThfUvgVMJ+eJEobSpX0n6A5zWdQm2NN zy05+iVNi5Bld8779kP1pLqBwbDR/Z4ohnGIrTyHjYNRa9w0xwJ6wytgiTtpgoqeRwEDA3dZ teuFD8BM4DDyFJ3Gcr1iAp9geS/PaNKNg0V2o0hGA29LVRqT7IKY9WHgXG7nWcJpL9rUlBXO G35NINYB4eAiQrR6CvJbsj6m0Vp39lMXcb5jYqLfZcXLAxKn93oP1srlpD6c0oj5avuhABEB AAG0I21vcmdhbiA8bW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C85huMAU /xAsUKRtX6uLRSkhWbkZoFjpXcnHccLZmxXVoynLChySZw6obGsWbN039Da7pdqRL+7PFpCD pmrQOKB/FARZKjbblq8GEpv1yJPvv9SxuzQpuQ56MMNMFix3gkM72+lyNs4f2hAFwExTMw2m 8xcSbieC39Erg54j96CgMCgcmxrORCcgSljZ+58UECBHsXIpRckfEugRUg== Message-ID: Date: Thu, 28 May 2020 14:51:38 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.1 In-Reply-To: <875zcg3pu8.fsf@nckx> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-ClientProxiedBy: YQBPR01CA0131.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:c01:1::31) To DM5PR1001MB2105.namprd10.prod.outlook.com (2603:10b6:4:2b::24) X-Microsoft-Original-Message-ID: MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from [192.168.1.71] (70.27.158.64) by YQBPR01CA0131.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:c01:1::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3045.19 via Frontend Transport; Thu, 28 May 2020 18:51:40 +0000 X-Microsoft-Original-Message-ID: X-TMN: [xWTewOPdsrlbZRvAFeJrL7bY1NRFOYfa] X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 51 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: eed346ce-973b-4c80-f6d2-08d803382880 X-MS-TrafficTypeDiagnostic: CO1NAM04HT013: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: TIxw+c1Obcs1t0hpQEiooIkCZ4ATPIsUfal6asljgIBG11GgU0jOqu73wgYfoBRbrNJNJx5eY1HgTujJmSqlXwrdBk8a+aRL+pgKUWpvYXGKn3JnMhMUGJ0032RS+cZnGDr5ethMBbe7bs7z7oQ96Om5v5ruJcN6P26codJrxF1jOu3l7JJMLR5vorDfGlk1K3DzBfmRtiWGjf12O0ZLceoW5bIvGbrBjm3tZgEYM1FarsGGdLDJh58inO0ARwVE X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:0; SRV:; IPV:NLI; SFV:NSPM; H:DM5PR1001MB2105.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:; DIR:OUT; SFP:1901; X-MS-Exchange-AntiSpam-MessageData: Tb2kQPWoWLTTaIW9hSYhwahlmG9a5mdRSTV3/N6Fd82n1RAuaWH8M7c6eE9bxuAVuZiM3Gl695PoxRoWJseZ866XFCJDdg3Wh8bz2uQ3VPf5y9XYf3Im1lOUwOFQIt6l3W5eb5eHj0ac54npS5fggA== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: eed346ce-973b-4c80-f6d2-08d803382880 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 May 2020 18:51:40.8905 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1NAM04HT013 X-Spam-Score: 1.6 (+) X-Mailman-Approved-At: Thu, 28 May 2020 15:32:40 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: 0.6 (/) X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=fail (rsa verify failed) header.d=outlook.com header.s=selector1 header.b=svRouHac; dmarc=fail reason="SPF not aligned (relaxed)" header.from=outlook.com (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Spam-Score: 2.09 X-TUID: +4FH52AtXBFl Thanks so much for the review Tobias! I went back to figure out exactly what --target did in the configure script. Now there is a bunch of logic that doesn't go anywhere so at first glance it doesn't look like this, but I'm fairly certain that all it does is check if it's Linux. If it is Linux, than it will add some cflags in the configure script. These flags never make their way out of the configure script. Honestly, the configure script is so bad I'm tempted to make a pull request. I'm a little sad I didn't get torn apart more for technical reasons. I learned that phases must end in #t and a few style points. Maybe next time I'll throw in some terrible mistakes. Also I realize that I totally forgot to put the copyright notice in! Could you throw ";;; Copyright © 2020 Morgan Smith " in there somewhere? I'm excited to get my name in this project! Thanks, Morgan On 2020-05-28 13:57, Tobias Geerinckx-Rice wrote: > Morgan, > > Morgan.J.Smith@outlook.com 写道: >> * gnu/packages/admin.scm (opendoas): New variable. > > Thank you!  It looks good to me.  I've queued it locally with the > (minor) changes below, but will wait a few days for > to land if that's all right with > you.  I also need to test it as a proper setuid programme. > >> +(define-public opendoas >> +  (package >> +    (name "opendoas") >> +    (version "6.6.1") >> +    (source (origin >> +              (method git-fetch) >> +              (uri (git-reference >> +                    (url "https://github.com/Duncaen/OpenDoas.git") >> +                    (commit (string-append "v" version)))) >> +              (file-name (git-file-name name version)) >> +              (sha256 >> +               (base32 >> + "07kkc5729p654jrgfsc8zyhiwicgmq38yacmwfvay2b3gmy728zn")))) >> +    (build-system gnu-build-system) >> +    (arguments (let* ((target (%current-target-system)) > > I've added a newline after ‘arguments’ to give your phases (and helpful > comments) some room to breathe and keep lines from exceeding 80 > characters.  It's mainly a matter of preference. Since I'm reviewing > this so you're stuck with my preference. > >> +                      (compiler (if target >> +                                    (string-append target "-gcc") >> +                                    "gcc"))) >> +                 `(#:phases >> +                   (modify-phases %standard-phases >> +                     ;; We replace the configure phase in order to >> remove all the >> +                     ;; default flags. The configure script doesn't >> accept most >> +                     ;; of the default flags > > I shortened this to the last sentence and added a full stop here… > >> +                     (replace 'configure >> +                       (lambda* (#:key configure-flags >> #:allow-other-keys) >> +                         ;; The configure script can only be told which >> +                         ;; compiler to use through environment >> variables > > …and here.  ;;-style comments are full sentences, unlike ;-ones. > >> +                     (add-before 'install 'fix-makefile >> +                       (lambda* (#:key outputs #:allow-other-keys) >> +                         ;; We can't chown to root as the chroot >> doesn't have >> +                         ;; this user. Also the store is owned by >> root so this >> +                         ;; isn't necessary. > > All true, but so common a change in Guix that it's not worth a comment. > >> +                         (substitute* "bsd.prog.mk" >> +                           (("^\tchown.*$") ""))))) > > Phases need to end in truth so I've added a #t here.  We get away > without one in the previous phase because INVOKE itself is guaranteed to > return #t. > >> +                   #:configure-flags (list (string-append "--prefix=" >> %output) >> +                                           (string-append "--target=" >> (or ,target "")) > > It didn't look to me like this was used for anything, and quoting Morgan > on IRC: > > ya, the configure script really doesn't do a damn thing > with target. But in the future it might save someone some time. > >> +                   ;; Compiler choice is not carried over from the >> configure script. >> +                   #:make-flags (list (string-append "CC=" ,compiler)) > > I agree that it's nice to save future maintainers the trouble of > retracing your steps but don't like the idea of sleeper code. I'll keep > them as comments. > >> +                   ;; There are no tests provided >> +                   #:tests? #f))) > > Changed to the equivalent but more conventional > >         #:tests? #f)))                 ; no test suite > >> +    (native-inputs `(("bison" ,bison))) > > Added a trivial newline before `. > >> +    (home-page "https://github.com/Duncaen/OpenDoas") >> +    (synopsis "Portable version of OpenBSD's doas command") >> +    (description "Doas is a minimal replacement for the venerable >> sudo.  It was >> +initially written by Ted Unangst of the OpenBSD project to provide >> 95% of the >> +features of sudo with a fraction of the codebase.") > > Thanks for including a multi-line description!  Won't stop me from > trying to expand it some more. > >> +    (license license:isc))) > > Not surprisingly, libbsd/ is under a 3-clause BSD licence.  I added it. > >> --- a/gnu/system.scm >> +++ b/gnu/system.scm >> @@ -896,6 +896,7 @@ use 'plain-file' instead~%") >>            (file-append inetutils "/bin/ping6") >>            (file-append sudo "/bin/sudo") >>            (file-append sudo "/bin/sudoedit") >> +          (file-append opendoas "/bin/doas") >>            (file-append fuse "/bin/fusermount") >>   >>            ;; To allow mounts with the "user" option, "mount" >>            and "umount" must > > This would be a separate patch.  However, this would install doas on > almost all systems.  I think the default list should contain only the > minimal defaults, and I don't see doas being a must-have %base-package > any time soon. > > Kind regards, > > T G-R