Subject: bug#25966: [PATCH 2/2] gnu: gitolite: Fix shebangs in hooks.

From: Clément Lassieur <[email-masked]>
Date: Sun, 05 Mar 2017 16:24:14 +0100

[email-masked] writes:

> +                  (add-before 'install 'fix-hooks-shebangs
> +                    (lambda* (#:key inputs #:allow-other-keys)
> +                      (let ((perl (string-append (assoc-ref inputs "perl")
> +                                                 "/bin/perl")))
> +                        ;; The files in 'lib/Gitolite/Hooks' keep references to
> +                        ;; '/usr/bin/perl', without this fix it is impossible to
> +                        ;; to run gitolite in production.
> +                        (substitute* (find-files "src/lib/Gitolite/Hooks" ".*")
> +                          (("/usr/bin/perl")
> +                           perl))
> +                        #t)))

This patch introduces references to the store in files installed by
"gitolite setup" command.  Those files are installed once and for all.
So for example .gitolite/hooks/common/update's shebang is
#!/gnu/store/vcjvzmdy5091bklv73rx9nc0yvlk12yv-perl-5.24.0/bin/perl.  But
then what happens when perl is upgraded, and Guix garbage collected?  My
understanding is that the shebang won't work anymore, and gitolite will
be broken.

One can use instead special-files-service-type, which allows to have
/usr/bin/perl working.  But it won't work anymore with this patch.

I suggest we revert it, but I might be wrong.  WDYT?