Fix bug 25957 and updates gitolite

  • Done
  • quality assurance status badge
Details
4 participants
  • Clément Lassieur
  • ng0
  • Leo Famulari
  • Marius Bakke
Owner
unassigned
Submitted by
ng0
Severity
normal
N
(address . guix-patches@gnu.org)
20170304140659.vqhba7zwoaqgyzby@abyayala
These two patches:

* update gitolite to 3.6.6,
* (attempt to) fix #25957.

I write attempt, in theory this closes the bug. I don't run this on my
server. I have greped for more occurences of /usr/bin/perl, and the ones
I had problems with are gone, remaining are 2 which are completely
unrelated to the bug and to the issue in general.
I'm 99% positive that the bug will be fixed once this is applied.
C
C
contact.ng0 wrote on 4 Mar 2017 15:09
[PATCH 1/2] gnu: gitolite: Update to 3.6.6.
(address . 25966@debbugs.gnu.org)(name . ng0)(address . contact.ng0@cryptolab.net)
20170304140932.30144-1-contact.ng0@cryptolab.net
From: ng0 <contact.ng0@cryptolab.net>

* gnu/packages/version-control.scm (gitolite): Update to 3.6.6.
---
gnu/packages/version-control.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Toggle diff (24 lines)
diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index 1c3ffb040..1076c1890 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -591,7 +591,7 @@ also walk each side of a merge and test those changes individually.")
(define-public gitolite
(package
(name "gitolite")
- (version "3.6.5")
+ (version "3.6.6")
(source (origin
(method url-fetch)
(uri (string-append
@@ -600,7 +600,7 @@ also walk each side of a merge and test those changes individually.")
(file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
- "0xpqg04gyr4dhdhxx5lbk61lwwd5ml32530bigg2qy663icngwqm"))))
+ "07q33f86694s0x3k9lcmy1vzfw9appdrlmmb9j3bz4qkrxqdnwb9"))))
(build-system gnu-build-system)
(arguments
'(#:tests? #f ; no tests
--
2.12.0
C
C
contact.ng0 wrote on 4 Mar 2017 15:09
[PATCH 2/2] gnu: gitolite: Fix shebangs in hooks.
(address . 25966@debbugs.gnu.org)(name . ng0)(address . contact.ng0@cryptolab.net)
20170304140932.30144-2-contact.ng0@cryptolab.net
From: ng0 <contact.ng0@cryptolab.net>


* gnu/packages/version-control.scm (gitolite)[arguments]: Add 'fix-hooks-shebangs'
phase to fix references to '/usr/bin/perl'.
---
gnu/packages/version-control.scm | 11 +++++++++++
1 file changed, 11 insertions(+)

Toggle diff (24 lines)
diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index 1076c1890..ccda00173 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -616,6 +616,17 @@ also walk each side of a merge and test those changes individually.")
(substitute* (find-files "." ".*")
((" perl -")
(string-append " " perl " -"))))))
+ (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)))
(replace 'install
(lambda* (#:key outputs #:allow-other-keys)
(let* ((output (assoc-ref outputs "out"))
--
2.12.0
N
Re: bug#25966: Fix bug 25957 and updates gitolite
(address . guix-patches@gnu.org)
20170304141501.q2pjacwnlmiowdso@abyayala
On 17-03-04 14:06:59, ng0 wrote:
Toggle quote (13 lines)
> These two patches:
>
> * update gitolite to 3.6.6,
> * (attempt to) fix #25957.
>
> I write attempt, in theory this closes the bug. I don't run this on my
> server. I have greped for more occurences of /usr/bin/perl, and the ones
> I had problems with are gone, remaining are 2 which are completely
> unrelated to the bug and to the issue in general.
> I'm 99% positive that the bug will be fixed once this is applied.
>
>
>
I think I missed something very obvious.
In the source of gitolite references to /usr/bin/perl occur in these
two files, later they don't. Yet at runtime hooks/update and
hooks/post-update make gitolite impossible to use as it is now.
N
(address . guix-patches@gnu.org)
20170304141702.pevov2rn7norzqbm@abyayala
On 17-03-04 14:06:59, ng0 wrote:
Toggle quote (14 lines)
> These two patches:
>
> * update gitolite to 3.6.6,
> * (attempt to) fix #25957.
>
> I write attempt, in theory this closes the bug. I don't run this on my
> server. I have greped for more occurences of /usr/bin/perl, and the ones
> I had problems with are gone, remaining are 2 which are completely
> unrelated to the bug and to the issue in general.
> I'm 99% positive that the bug will be fixed once this is applied.
>
>
>

Please ignore the previous message I've sent in reply to the one I'm
quoting. I was looking for a shebang. There is a __DATA__ section at
the end of the perl file, this has been fixed with my patch.
L
L
Leo Famulari wrote on 4 Mar 2017 23:53
(address . 25966-done@debbugs.gnu.org)
20170304225308.GA19780@jasmine
On Sat, Mar 04, 2017 at 02:06:59PM +0000, ng0 wrote:
Toggle quote (11 lines)
> These two patches:
>
> * update gitolite to 3.6.6,
> * (attempt to) fix #25957.
>
> I write attempt, in theory this closes the bug. I don't run this on my
> server. I have greped for more occurences of /usr/bin/perl, and the ones
> I had problems with are gone, remaining are 2 which are completely
> unrelated to the bug and to the issue in general.
> I'm 99% positive that the bug will be fixed once this is applied.

Pushed
Closed
N
20170305001913.rdqe7pnx5lna3vbx@abyayala
On 17-03-04 17:53:08, Leo Famulari wrote:
Toggle quote (16 lines)
> On Sat, Mar 04, 2017 at 02:06:59PM +0000, ng0 wrote:
> > These two patches:
> >
> > * update gitolite to 3.6.6,
> > * (attempt to) fix #25957.
> >
> > I write attempt, in theory this closes the bug. I don't run this on my
> > server. I have greped for more occurences of /usr/bin/perl, and the ones
> > I had problems with are gone, remaining are 2 which are completely
> > unrelated to the bug and to the issue in general.
> > I'm 99% positive that the bug will be fixed once this is applied.
>
> Pushed
>
>
>
I've been reading the bugtracker again, and there's this:

quoting in full:

The git package ships with a number of sample hook files. These are
shell scripts and
therefore the #!/bin/sh line gets substituted at build time.

However these files get installed into every git repostory that is
created, and users
are invited to use them as templates for their own hooks.

This will be fine until both git and bash are updated. Now the original
bash is free
to be garbage collected. If that happens, the path:
#!/gnu/store/qkw4zrwfybxww8f56nkb6hggxambk89b-bash-4.4.0/bin/sh
will no longer exist.

I suggest what we turn off the shebang patching for the files in
share/templates for git.

J'


quote end.

The "hooks/update" in resulting repositories using gitolite is a symlink
to "/home/git/.gitolite/hooks/common/update". Will this file ever
change? Maybe it makes more sense to have the symlink to
"~/.guix-profile/bin/perl" or something similar?

I guess only time will tell, and I will notice as soon as garbage
collection removed the perl in the shebang.
C
C
Clément Lassieur wrote on 5 Mar 2017 16:24
Re: bug#25966: [PATCH 2/2] gnu: gitolite: Fix shebangs in hooks.
(address . contact.ng0@cryptolab.net)(address . 25966@debbugs.gnu.org)
87o9xfsq5d.fsf@lassieur.org
contact.ng0@cryptolab.net writes:

Toggle quote (12 lines)
> + (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?
N
(name . Clément Lassieur)(address . clement@lassieur.org)(address . 25966@debbugs.gnu.org)
20170305165431.b5mpnwpriqk4p5rn@abyayala
On 17-03-05 16:24:14, Clément Lassieur wrote:
Toggle quote (27 lines)
> contact.ng0@cryptolab.net 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?

I wanted a solution which works. I didn't consider this until it was
merged in (see my last reply). I don't think special-file-types are
a solution, I want this to work out of the box so that a service I want
to write for gitolite will work.
It can be a solution if it would work with the service and when it will
be documented as a requirement for gitolite. The off-the-shelves status
of gitolite is broken, you are not informed about these shebangs..
C
C
Clément Lassieur wrote on 13 Mar 2017 15:30
(name . ng0)(address . contact.ng0@cryptolab.net)(address . 25966@debbugs.gnu.org)
8737eh8d1y.fsf@lassieur.org
ng0 <contact.ng0@cryptolab.net> writes:

Toggle quote (36 lines)
> On 17-03-05 16:24:14, Clément Lassieur wrote:
>> contact.ng0@cryptolab.net 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?
>
> I wanted a solution which works. I didn't consider this until it was
> merged in (see my last reply). I don't think special-file-types are
> a solution, I want this to work out of the box so that a service I want
> to write for gitolite will work.
> It can be a solution if it would work with the service and when it will
> be documented as a requirement for gitolite. The off-the-shelves status
> of gitolite is broken, you are not informed about these shebangs..

This solution works right now, but later, when perl is garbage
collected, it won't work anymore. And this is worse that just not
working, because things may already be in production when the bug
appears.

The special-files-service-type workaround has the benefit of being
stable: while the user doesn't change her configuration, it will work.
Even though it does not work "out of the box".

So once again, I suggest we revert it. Please could someone else
comment on this?

(BTW, when this is reverted, users who did run "gitolite setup" with
this patch applied will still have the bug: they'll have to fix it
manually. So the sooner the better.)
M
M
Marius Bakke wrote on 13 Mar 2017 18:00
(address . 25966@debbugs.gnu.org)
87bmt5i01o.fsf@kirby.i-did-not-set--mail-host-address--so-tickle-me
Clément Lassieur <clement@lassieur.org> writes:

Toggle quote (54 lines)
> ng0 <contact.ng0@cryptolab.net> writes:
>
>> On 17-03-05 16:24:14, Clément Lassieur wrote:
>>> contact.ng0@cryptolab.net 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?
>>
>> I wanted a solution which works. I didn't consider this until it was
>> merged in (see my last reply). I don't think special-file-types are
>> a solution, I want this to work out of the box so that a service I want
>> to write for gitolite will work.
>> It can be a solution if it would work with the service and when it will
>> be documented as a requirement for gitolite. The off-the-shelves status
>> of gitolite is broken, you are not informed about these shebangs..
>
> This solution works right now, but later, when perl is garbage
> collected, it won't work anymore. And this is worse that just not
> working, because things may already be in production when the bug
> appears.
>
> The special-files-service-type workaround has the benefit of being
> stable: while the user doesn't change her configuration, it will work.
> Even though it does not work "out of the box".
>
> So once again, I suggest we revert it. Please could someone else
> comment on this?
>
> (BTW, when this is reverted, users who did run "gitolite setup" with
> this patch applied will still have the bug: they'll have to fix it
> manually. So the sooner the better.)

So the problem is that created repositories has a perl reference that is
not visible to the garbage collector. Would it be possible to convince
Gitolite to create GC roots for each repo? That's about the only thing I
can think of that will work on both GuixSD and foreign distros.

Using the "special-files-service-type" to create /usr/bin/perl on GuixSD
seems "hacky"; users might want to have a different perl in "/usr/bin".
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAljG0EMACgkQoqBt8qM6
VPotmwf9HCOeWQzQKNYW1YCi0L67jLAwbbc+3bvZtZhVX3wqZmHub0gNuXtYMGll
A7XIAt03RYLLFo3zWw0sjA8GphH3VSQHsvpvubEqmmOYzOp1XmHJ7K4TmQqo0HBK
8OUPdNPy6vmUIMDhADvAR0kYKvJkt7K3nzrF7eGwSzJNQpk3sy8T56DqGnuQgFZe
FxAiLN4iBY5/P+u1CmiP3docuvBQk/V0BuFZ6ECVu4W9U70Gi801EwZleg7KWYPx
8hz5Yssp8tcX4H7YkkQZ24OpnsYjbI5QBZRDL6vr5LFDU3dPQ4E3gc5yQoGp+/0D
AlLX/ufA9u5mo7hHFhDPfOMpUWuaMg==
=cGxx
-----END PGP SIGNATURE-----

N
(name . Marius Bakke)(address . mbakke@fastmail.com)
20170313182514.pvp3dbw5h6krdlxm@abyayala
Marius Bakke transcribed 3.8K bytes:
Toggle quote (60 lines)
> Clément Lassieur <clement@lassieur.org> writes:
>
> > ng0 <contact.ng0@cryptolab.net> writes:
> >
> >> On 17-03-05 16:24:14, Clément Lassieur wrote:
> >>> contact.ng0@cryptolab.net 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?
> >>
> >> I wanted a solution which works. I didn't consider this until it was
> >> merged in (see my last reply). I don't think special-file-types are
> >> a solution, I want this to work out of the box so that a service I want
> >> to write for gitolite will work.
> >> It can be a solution if it would work with the service and when it will
> >> be documented as a requirement for gitolite. The off-the-shelves status
> >> of gitolite is broken, you are not informed about these shebangs..
> >
> > This solution works right now, but later, when perl is garbage
> > collected, it won't work anymore. And this is worse that just not
> > working, because things may already be in production when the bug
> > appears.
> >
> > The special-files-service-type workaround has the benefit of being
> > stable: while the user doesn't change her configuration, it will work.
> > Even though it does not work "out of the box".
> >
> > So once again, I suggest we revert it. Please could someone else
> > comment on this?
> >
> > (BTW, when this is reverted, users who did run "gitolite setup" with
> > this patch applied will still have the bug: they'll have to fix it
> > manually. So the sooner the better.)
>
> So the problem is that created repositories has a perl reference that is
> not visible to the garbage collector. Would it be possible to convince
> Gitolite to create GC roots for each repo? That's about the only thing I

Can you clarify what you mean? Convince it… how? Do you have an idea how
to achieve this, or some further thoughts on the matter?

Toggle quote (4 lines)
> can think of that will work on both GuixSD and foreign distros.
>
> Using the "special-files-service-type" to create /usr/bin/perl on GuixSD
> seems "hacky"; users might want to have a different perl in "/usr/bin".
M
M
Marius Bakke wrote on 13 Mar 2017 20:35
(name . ng0)(address . contact.ng0@cryptolab.net)
87tw6x3r6u.fsf@kirby.i-did-not-set--mail-host-address--so-tickle-me
ng0 <contact.ng0@cryptolab.net> writes:

Toggle quote (64 lines)
> Marius Bakke transcribed 3.8K bytes:
>> Clément Lassieur <clement@lassieur.org> writes:
>>
>> > ng0 <contact.ng0@cryptolab.net> writes:
>> >
>> >> On 17-03-05 16:24:14, Clément Lassieur wrote:
>> >>> contact.ng0@cryptolab.net 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?
>> >>
>> >> I wanted a solution which works. I didn't consider this until it was
>> >> merged in (see my last reply). I don't think special-file-types are
>> >> a solution, I want this to work out of the box so that a service I want
>> >> to write for gitolite will work.
>> >> It can be a solution if it would work with the service and when it will
>> >> be documented as a requirement for gitolite. The off-the-shelves status
>> >> of gitolite is broken, you are not informed about these shebangs..
>> >
>> > This solution works right now, but later, when perl is garbage
>> > collected, it won't work anymore. And this is worse that just not
>> > working, because things may already be in production when the bug
>> > appears.
>> >
>> > The special-files-service-type workaround has the benefit of being
>> > stable: while the user doesn't change her configuration, it will work.
>> > Even though it does not work "out of the box".
>> >
>> > So once again, I suggest we revert it. Please could someone else
>> > comment on this?
>> >
>> > (BTW, when this is reverted, users who did run "gitolite setup" with
>> > this patch applied will still have the bug: they'll have to fix it
>> > manually. So the sooner the better.)
>>
>> So the problem is that created repositories has a perl reference that is
>> not visible to the garbage collector. Would it be possible to convince
>> Gitolite to create GC roots for each repo? That's about the only thing I
>
> Can you clarify what you mean? Convince it… how? Do you have an idea how
> to achieve this, or some further thoughts on the matter?

It was just a passing thought, but I don't think it's a good solution
since we don't want users to rely on potentially outdated versions of
perl. So a 'special-file-service' for '/usr/bin/perl' is indeed better.

Or perhaps use "env" from coreutils to execute whatever perl is in PATH.
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAljG9JkACgkQoqBt8qM6
VPoUKAf8DPcvuIampcZUrWPzz1Mymqaxm2OHa7GP4qHCNp99QKcX1P9Qw2OwyJaT
nk3k5yHgBPYtlxmf0REuL8hkqZjxLqH5Ovwqi3tHko9B57CP1MGk9Xrjp0xZqe/w
gC1so/Nh/szZimT8DdB9Fm/WObzRE4z5BvlWiEfFirVAgtKjCgVv6Nn9JsJyO3hF
Yst5l01ffvh7GhmQHWt5o95nV63v7p0TaKddo8drrptzJAOY3RwGXuxP6ovRBFiE
vxB0xgXWtXQE3UkPmrZJAweB3XWH7ah6UsvkZSNnU2AWNwfaSvwxzeLj/VeClN+c
dSomJDXqOmfIwmpdN2RG/Q68GmIrLA==
=iCMQ
-----END PGP SIGNATURE-----

L
L
Leo Famulari wrote on 14 Mar 2017 18:39
(name . Clément Lassieur)(address . clement@lassieur.org)
20170314173906.GA9175@jasmine
On Sun, Mar 05, 2017 at 04:24:14PM +0100, Clément Lassieur wrote:
Toggle quote (25 lines)
> contact.ng0@cryptolab.net 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.

Ah, seems like the same issue as with the Git hooks.

Toggle quote (2 lines)
> I suggest we revert it, but I might be wrong. WDYT?

If these hooks are intended to be copied out of /gnu/store, then the
change should be reverted until we have a better solution.

I think it's better for the hook scripts to fail the first time than for
them to fail later, after a seemingly unrelated action like `guix gc`.
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEsFFZSPHn08G5gDigJkb6MLrKfwgFAljIKrcACgkQJkb6MLrK
fwgHIA/+PDppBXU+/mJnBcwZXJ6otRiCHJQOYtKHyksNTvDDY26wcNQq9Moud5r7
Wx1hrfjdikTJ8FIs53w8oEs2UqSE+u89qk7hlmFjLDCfb3Rt5tl2l1wQDZoLBdmI
gplCIc8UC/o8Uwm0XFlwoxeQzE0zPa4W6cQ1iBYlzshqDZauINNHhTC7CStVqR1R
wH6PwsrBhwrjJJP/t46tZcX1Zu1zpa+F6lLbARQyA/WR4UFIAs8RKZV8soDjfb/N
DXdjF/NiTSoYgm475XDHYxBvFAj84Lv4Dv28SXS9kltzSZnsNmUohPYTNSMFm7cY
YwRU8xkrYgIRP2R6KtaaUEXmP5NZypr+R08IBJEoOtm79IeurcseHmbp508/NJD1
HHml38GZSWG2Lriex3l4sm9xbwRxJ0yesssRuoMCBUa3qXsyV1NdP20SCnYJsYzc
nxALKptUyodahyzdDgrOnYbe3nsSxSkae5qR/nKe35WfM7a/0f9Tt9NIjuEay3ND
Z7Ng42vwqoz1aBW6+cRjG2opnwlaHMfFbwa8tK9ggrZHyd6TTMkSLNS5vQTdlSVo
L8u7yiHPsIJVRY032eOT/3ZIjJRy4jqo9GKu5LWUfU3XKxFC+rR3kz79ZCX8T81l
vInDiU2ZWFnQw7K6JWEXS6WvBLKLcH032eHI5Z8nODExbSFCXAM=
=77QW
-----END PGP SIGNATURE-----


N
(name . Leo Famulari)(address . leo@famulari.name)
20170314192702.mnkxvdwj7neiefk4@abyayala
Leo Famulari transcribed 2.8K bytes:
Toggle quote (36 lines)
> On Sun, Mar 05, 2017 at 04:24:14PM +0100, Clément Lassieur wrote:
> > contact.ng0@cryptolab.net 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.
>
> Ah, seems like the same issue as with the Git hooks.
>
> > I suggest we revert it, but I might be wrong. WDYT?
>
> If these hooks are intended to be copied out of /gnu/store, then the
> change should be reverted until we have a better solution.
>
> I think it's better for the hook scripts to fail the first time than for
> them to fail later, after a seemingly unrelated action like `guix gc`.

I agree. Please revert it. I'd like to continue this discussion to see
what we can come up with.

Thanks
C
C
Clément Lassieur wrote on 16 Mar 2017 11:12
(name . Leo Famulari)(address . leo@famulari.name)
87ziglr0m4.fsf@lassieur.org
Leo Famulari <leo@famulari.name> writes:

Toggle quote (36 lines)
> On Sun, Mar 05, 2017 at 04:24:14PM +0100, Clément Lassieur wrote:
>> contact.ng0@cryptolab.net 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.
>
> Ah, seems like the same issue as with the Git hooks.
>
>> I suggest we revert it, but I might be wrong. WDYT?
>
> If these hooks are intended to be copied out of /gnu/store, then the
> change should be reverted until we have a better solution.
>
> I think it's better for the hook scripts to fail the first time than for
> them to fail later, after a seemingly unrelated action like `guix gc`.

I saw it was reverted. Thank you all!
?