From: "ashish.is--- via Guix-patches" via <guix-patches@gnu.org>
To: 74639@debbugs.gnu.org
Cc: Ashish SHUKLA <ashish.is@lostca.se>
Subject: [bug#74639] [PATCH] gnu: make-gitolite: Fix inputs references
Date: Mon, 2 Dec 2024 00:15:07 +0100 [thread overview]
Message-ID: <4cf43336d8892d405b0a70809b7f7e83a6012a91.1733094907.git.ashish.is@lostca.se> (raw)
From: Ashish SHUKLA <ashish.is@lostca.se>
* gnu/packages/version-control.scm (make-gitolite)[arguments]<phases>
{patch-scripts,patch-source,wrap-scripts}: Update functions to reference
inputs from the inputs alist, instead of hardcoding.
Change-Id: Ia2468235b43c257ee1816d19325671d373ed2870
---
Hi,
When trying to override inputs of "gitolite", I noticed it's hardcoding them instead of referencing the "inputs" alist parameter which is passed to the phases, which makes overriding the inputs useless. This patches fixes that behaviour.
Thanks!
gnu/packages/version-control.scm | 28 ++++++++++++++--------------
1 file changed, 14 insertions(+), 14 deletions(-)
diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index c54833a8ec..eac3487cf1 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -2070,23 +2070,23 @@ (define* (make-gitolite #:optional (extra-inputs '()))
(delete 'configure)
(delete 'build)
(add-before 'install 'patch-scripts
- (lambda* _
+ (lambda* (#:key inputs #:allow-other-keys)
;; This seems to take care of every shell script that
;; invokes Perl.
(substitute* (find-files ".")
((" perl -")
- (string-append " " #$perl "/bin/perl" " -")))
+ (string-append " " (assoc-ref inputs "perl") "/bin/perl" " -")))
(substitute* (find-files "src/triggers" ".*")
((" sed ")
- (string-append " " #$sed "/bin/sed" " ")))
+ (string-append " " (assoc-ref inputs "sed") "/bin/sed" " ")))
(substitute*
'("src/triggers/post-compile/update-gitweb-access-list"
"src/triggers/post-compile/ssh-authkeys-split"
"src/triggers/upstream")
((" grep ")
- (string-append " " #$grep "/bin/grep" " ")))
+ (string-append " " (assoc-ref inputs "grep") "/bin/grep" " ")))
;; Avoid references to the store in authorized_keys.
;; This works because gitolite-shell is in the PATH.
@@ -2094,25 +2094,25 @@ (define* (make-gitolite #:optional (extra-inputs '()))
(("\\$glshell \\$user")
"gitolite-shell $user"))))
(add-before 'install 'patch-source
- (lambda* _
+ (lambda* (#:key inputs #:allow-other-keys)
;; Gitolite uses cat to test the readability of the
;; pubkey
(substitute* "src/lib/Gitolite/Setup.pm"
(("\"cat ")
- (string-append "\"" #$coreutils "/bin/cat" " "))
+ (string-append "\"" (assoc-ref inputs "coreutils") "/bin/cat" " "))
(("\"ssh-keygen")
- (string-append "\"" #$openssh "/bin/ssh-keygen")))
+ (string-append "\"" (assoc-ref inputs "openssh") "/bin/ssh-keygen")))
(substitute* '("src/lib/Gitolite/Hooks/PostUpdate.pm"
"src/lib/Gitolite/Hooks/Update.pm")
(("/usr/bin/perl")
- (string-append #$perl "/bin/perl")))
+ (string-append (assoc-ref inputs "perl") "/bin/perl")))
(substitute* "src/lib/Gitolite/Common.pm"
(("\"ssh-keygen")
- (string-append "\"" #$openssh "/bin/ssh-keygen"))
+ (string-append "\"" (assoc-ref inputs "openssh") "/bin/ssh-keygen"))
(("\"logger\"")
- (string-append "\"" #$inetutils "/bin/logger\"")))
+ (string-append "\"" (assoc-ref inputs "inetutils") "/bin/logger\"")))
(substitute* "src/lib/Gitolite/Cache.pm"
(("/usr/sbin/redis-server") "redis-server"))
@@ -2132,16 +2132,16 @@ (define* (make-gitolite #:optional (extra-inputs '()))
(string-append bindir "/" script)))
'("gitolite" "gitolite-shell")))))
(add-after 'install 'wrap-scripts
- (lambda* _
+ (lambda* (#:key inputs #:allow-other-keys)
(for-each (lambda (file-name)
(wrap-program (string-append #$output file-name)
`("PATH" ":" prefix
,(map (lambda (dir)
(string-append dir "/bin"))
(list #$output
- #$coreutils
- #$findutils
- #$git
+ (assoc-ref inputs "coreutils")
+ (assoc-ref inputs "findutils")
+ (assoc-ref inputs "git")
#$@extra-inputs)))))
'("/bin/gitolite" "/bin/gitolite-shell")))))))
(inputs
base-commit: 858dd7e721d69a6087375395037a86640418f1fb
--
2.47.1
next reply other threads:[~2024-12-01 23:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-01 23:15 ashish.is--- via Guix-patches via [this message]
2024-12-02 0:31 ` [bug#74639] [PATCH] gnu: make-gitolite: Fix inputs references Hilton Chain
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=4cf43336d8892d405b0a70809b7f7e83a6012a91.1733094907.git.ashish.is@lostca.se \
--to=guix-patches@gnu.org \
--cc=74639@debbugs.gnu.org \
--cc=ashish.is@lostca.se \
/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.