From: Tobias Geerinckx-Rice via Guix-patches via <guix-patches@gnu.org>
To: Morgan.J.Smith@outlook.com
Cc: 41578@debbugs.gnu.org
Subject: [bug#41578] [PATCH] gnu: Add opendoas.
Date: Thu, 28 May 2020 19:57:03 +0200 [thread overview]
Message-ID: <875zcg3pu8.fsf@nckx> (raw)
In-Reply-To: <DM5PR1001MB210525690A0A78B56DD33822C58E0@DM5PR1001MB2105.namprd10.prod.outlook.com>
[-- Attachment #1: Type: text/plain, Size: 5173 bytes --]
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
<https://issues.guix.gnu.org/41579> 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:
<butterypancake> 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
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 227 bytes --]
next prev parent reply other threads:[~2020-05-28 17:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-28 15:35 [bug#41578] [PATCH] gnu: Add opendoas Morgan.J.Smith
2020-05-28 17:57 ` Tobias Geerinckx-Rice via Guix-patches via [this message]
2020-05-28 18:51 ` Morgan Smith
2020-05-30 23:57 ` bug#41578: " Tobias Geerinckx-Rice via Guix-patches via
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=875zcg3pu8.fsf@nckx \
--to=guix-patches@gnu.org \
--cc=41578@debbugs.gnu.org \
--cc=Morgan.J.Smith@outlook.com \
--cc=me@tobias.gr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.