GNU bug report logs -
#66605
[PATCH] etc: gitconfig: Run etc/teams.scm from correct environment.
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 66605 in the body.
You can then email your comments to 66605 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
maxim.cournoyer <at> gmail.com, guix-patches <at> gnu.org
:
bug#66605
; Package
guix-patches
.
(Wed, 18 Oct 2023 12:07:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Clément Lassieur <clement <at> lassieur.org>
:
New bug report received and forwarded. Copy sent to
maxim.cournoyer <at> gmail.com, guix-patches <at> gnu.org
.
(Wed, 18 Oct 2023 12:07:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
* etc/git/gitconfig: Prepend "guix shell -D guix --pure ./pre-inst-env" to the
etc/teams.scm script so that any user that have git:send-email installed can
use it in the Guix checkout without changing their environment.
---
etc/git/gitconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/etc/git/gitconfig b/etc/git/gitconfig
index 907ad0180454..757360220155 100644
--- a/etc/git/gitconfig
+++ b/etc/git/gitconfig
@@ -14,5 +14,5 @@
[sendemail]
to = guix-patches <at> gnu.org
- headerCmd = etc/teams.scm cc-members-header-cmd
+ headerCmd = guix shell -D guix --pure -- ./pre-inst-env etc/teams.scm cc-members-header-cmd
thread = no
base-commit: 5498835bb38c0de57f284f0fa6b1178ecdcaf678
prerequisite-patch-id: d95e49e4fc059972fc5a7b2c92816df2228a0af1
prerequisite-patch-id: a0dca8c3175d6ce71c77e220c4ac98b6e97cef56
--
2.41.0
Information forwarded
to
guix-patches <at> gnu.org
:
bug#66605
; Package
guix-patches
.
(Wed, 18 Oct 2023 17:56:03 GMT)
Full text and
rfc822 format available.
Message #8 received at 66605 <at> debbugs.gnu.org (full text, mbox):
Hi,
Clément Lassieur <clement <at> lassieur.org> writes:
> * etc/git/gitconfig: Prepend "guix shell -D guix --pure ./pre-inst-env" to the
> etc/teams.scm script so that any user that have git:send-email installed can
> use it in the Guix checkout without changing their environment.
I'm not sure I understand; why does etc/teams.scm cc-members-header-cmd
fail in an environment where git:send-email is available?
--
Thanks,
Maxim
Added tag(s) moreinfo.
Request was from
Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
to
control <at> debbugs.gnu.org
.
(Wed, 18 Oct 2023 17:56:03 GMT)
Full text and
rfc822 format available.
Information forwarded
to
guix-patches <at> gnu.org
:
bug#66605
; Package
guix-patches
.
(Wed, 18 Oct 2023 20:53:01 GMT)
Full text and
rfc822 format available.
Message #13 received at 66605 <at> debbugs.gnu.org (full text, mbox):
Hi Maxim,
Maxim Cournoyer <maxim.cournoyer <at> gmail.com> writes:
>> * etc/git/gitconfig: Prepend "guix shell -D guix --pure ./pre-inst-env" to the
>> etc/teams.scm script so that any user that have git:send-email installed can
>> use it in the Guix checkout without changing their environment.
>
> I'm not sure I understand; why does etc/teams.scm cc-members-header-cmd
> fail in an environment where git:send-email is available?
Because it requires (git) and (guix ui). So you need ./pre-inst-env for
(guix ui), plus guile, guile-git and guile-gcrypt. The minimal setup
would be:
`guix shell guile guile-git guile-gcrypt git git:send-email --pure -- ./pre-inst-env git send-email`
or
`guix shell guile guile-git guile-gcrypt -- ./pre-inst-env git send-email`
with an impure environment containing git and git:send-email.
But it could be shortened as
`guix shell git:send-email -D guix --pure -- ./pre-inst-env git send-email`
However, in this case `guix shell git:send-email` is necessary even with
impure environments containing git and git:send-email because `-D guix`
pulls git without pulling git:send-email.
Thanks,
Clément
Information forwarded
to
maxim.cournoyer <at> gmail.com, guix-patches <at> gnu.org
:
bug#66605
; Package
guix-patches
.
(Wed, 18 Oct 2023 21:52:02 GMT)
Full text and
rfc822 format available.
Message #16 received at 66605 <at> debbugs.gnu.org (full text, mbox):
* etc/git/gitconfig: Prepend "guix repl" to the etc/teams.scm script so that
any user that has git:send-email installed can use it in the Guix checkout
without changing their environment. (teams.scm uses (git) and (guix ui).)
---
etc/git/gitconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/etc/git/gitconfig b/etc/git/gitconfig
index 907ad0180454..abcd494d62e8 100644
--- a/etc/git/gitconfig
+++ b/etc/git/gitconfig
@@ -14,5 +14,5 @@
[sendemail]
to = guix-patches <at> gnu.org
- headerCmd = etc/teams.scm cc-members-header-cmd
+ headerCmd = guix repl etc/teams.scm cc-members-header-cmd
thread = no
base-commit: 5498835bb38c0de57f284f0fa6b1178ecdcaf678
prerequisite-patch-id: d95e49e4fc059972fc5a7b2c92816df2228a0af1
prerequisite-patch-id: a0dca8c3175d6ce71c77e220c4ac98b6e97cef56
--
2.41.0
Information forwarded
to
guix-patches <at> gnu.org
:
bug#66605
; Package
guix-patches
.
(Thu, 19 Oct 2023 01:40:02 GMT)
Full text and
rfc822 format available.
Message #19 received at 66605 <at> debbugs.gnu.org (full text, mbox):
Hi,
Clément Lassieur <clement <at> lassieur.org> writes:
> * etc/git/gitconfig: Prepend "guix repl" to the etc/teams.scm script so that
> any user that has git:send-email installed can use it in the Guix checkout
> without changing their environment. (teams.scm uses (git) and (guix ui).)
> ---
> etc/git/gitconfig | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/etc/git/gitconfig b/etc/git/gitconfig
> index 907ad0180454..abcd494d62e8 100644
> --- a/etc/git/gitconfig
> +++ b/etc/git/gitconfig
> @@ -14,5 +14,5 @@
>
> [sendemail]
> to = guix-patches <at> gnu.org
> - headerCmd = etc/teams.scm cc-members-header-cmd
> + headerCmd = guix repl etc/teams.scm cc-members-header-cmd
I had noticed as well that since Guix depends on 'git', we now have to
include git:send-email to the profile to be able to use it, like:
'guix shell -D guix git:send-email'.
I think on foreign distributions, you also need to use mumi or git
send-email in ./pre-inst-env, which is what your patch solves, I
believe. This is not needed on a Guix System because the guix-daemon
used by it adds the Guix modules to the GUILE_LOAD_PATH.
--
Thanks,
Maxim
Forcibly Merged 66605 66616.
Request was from
Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
to
control <at> debbugs.gnu.org
.
(Thu, 19 Oct 2023 01:46:02 GMT)
Full text and
rfc822 format available.
Forcibly Merged 66605 66616 66617.
Request was from
Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
to
control <at> debbugs.gnu.org
.
(Thu, 19 Oct 2023 01:46:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
guix-patches <at> gnu.org
:
bug#66605
; Package
guix-patches
.
(Thu, 19 Oct 2023 01:48:02 GMT)
Full text and
rfc822 format available.
Message #26 received at 66605 <at> debbugs.gnu.org (full text, mbox):
Hello,
Clément Lassieur <clement <at> lassieur.org> writes:
> * etc/git/gitconfig: Prepend "guix repl" to the etc/teams.scm script so that
> any user that has git:send-email installed can use it in the Guix checkout
> without changing their environment. (teams.scm uses (git) and (guix ui).)
> ---
> etc/git/gitconfig | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/etc/git/gitconfig b/etc/git/gitconfig
> index 907ad0180454..abcd494d62e8 100644
> --- a/etc/git/gitconfig
> +++ b/etc/git/gitconfig
> @@ -14,5 +14,5 @@
>
> [sendemail]
> to = guix-patches <at> gnu.org
> - headerCmd = etc/teams.scm cc-members-header-cmd
> + headerCmd = guix repl etc/teams.scm cc-members-header-cmd
Even nicer could be using 'guix repl' in the teams.scm script shebang.
This way even for those using it outside of 'git send-email', it'd
always work.
--
Thanks,
Maxim
Information forwarded
to
guix-patches <at> gnu.org
:
bug#66605
; Package
guix-patches
.
(Thu, 19 Oct 2023 10:07:01 GMT)
Full text and
rfc822 format available.
Message #29 received at 66605 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
> Even nicer could be using 'guix repl' in the teams.scm script shebang.
> This way even for those using it outside of 'git send-email', it'd
> always work.
I can't find a nice solution to do that. And I think people who run teams.scm directly will expect a guile crash and make sure to get the correct environment, so it's not really a problem at that point.
This is not the case for people who run `git send-email`. Those people don't expect a guile crash.
So if you have a clean solution that works in a shebang (without the file being detected as a shell script by most editors), please show it :-)
[Message part 2 (text/html, inline)]
Information forwarded
to
guix-patches <at> gnu.org
:
bug#66605
; Package
guix-patches
.
(Sat, 21 Oct 2023 03:41:01 GMT)
Full text and
rfc822 format available.
Message #32 received at 66605 <at> debbugs.gnu.org (full text, mbox):
This ensures the correct Guix dependencies are always available for the
script.
* etc/teams.scm.in: Rename to...
* etc/teams.scm: ... this. Adjust shebang.
* .gitignore: No longer ignore it.
* configure.ac: Do not process it with AC_CONFIG_FILES.
Fixes: https://issues.guix.gnu.org/66605
Change-Id: I7a01750c6c5f0696b6c36b1e6caa9389d9e6822c
---
.gitignore | 1 -
configure.ac | 1 -
etc/{teams.scm.in => teams.scm} | 8 ++++++--
3 files changed, 6 insertions(+), 4 deletions(-)
rename etc/{teams.scm.in => teams.scm} (99%)
mode change 100644 => 100755
diff --git a/.gitignore b/.gitignore
index 543dc1c655..0f74b5da3d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -68,7 +68,6 @@
/doc/version.texi
/doc/version-*.texi
/etc/committer.scm
-/etc/teams.scm
/etc/gnu-store.mount
/etc/guix-daemon.cil
/etc/guix-daemon.conf
diff --git a/configure.ac b/configure.ac
index d817f620cf..ecbd596a34 100644
--- a/configure.ac
+++ b/configure.ac
@@ -281,7 +281,6 @@ AC_CONFIG_FILES([Makefile
guix/config.scm])
AC_CONFIG_FILES([etc/committer.scm], [chmod +x etc/committer.scm])
-AC_CONFIG_FILES([etc/teams.scm], [chmod +x etc/teams.scm])
AC_CONFIG_FILES([test-env:build-aux/test-env.in], [chmod +x test-env])
AC_CONFIG_FILES([pre-inst-env:build-aux/pre-inst-env.in],
[chmod +x pre-inst-env])
diff --git a/etc/teams.scm.in b/etc/teams.scm
old mode 100644
new mode 100755
similarity index 99%
rename from etc/teams.scm.in
rename to etc/teams.scm
index 55242caad1..98bbfd9e57
--- a/etc/teams.scm.in
+++ b/etc/teams.scm
@@ -1,5 +1,9 @@
-#!@GUILE@ \
---no-auto-compile -s
+#!/bin/sh
+# Extra care is taken here to ensure this script can run in most environments,
+# since it is invoked by 'git send-email'.
+pre_inst_env_maybe=
+command -v guix || pre_inst_env_maybe=./pre-inst-env
+exec $pre_inst_env_maybe guix repl -- "$0" "$@"
!#
;;; GNU Guix --- Functional package management for GNU
base-commit: d2111894c48b2ebd7e7be683c07241bbd8a91919
prerequisite-patch-id: b8372a944dab5ec4df332a27705ff18e6a0e679c
--
2.41.0
Information forwarded
to
guix-patches <at> gnu.org
:
bug#66605
; Package
guix-patches
.
(Sun, 22 Oct 2023 20:09:01 GMT)
Full text and
rfc822 format available.
Message #35 received at 66605 <at> debbugs.gnu.org (full text, mbox):
This ensures the correct Guix dependencies are always available for the
script.
* etc/teams.scm.in: Rename to...
* etc/teams.scm: ... this. Adjust shebang.
* .gitignore: No longer ignore it.
* configure.ac: Do not process it with AC_CONFIG_FILES.
Fixes: https://issues.guix.gnu.org/66605
---
Changes in v5:
- Redirect command -v output to /dev/null
.gitignore | 1 -
configure.ac | 1 -
etc/{teams.scm.in => teams.scm} | 8 ++++++--
3 files changed, 6 insertions(+), 4 deletions(-)
rename etc/{teams.scm.in => teams.scm} (99%)
mode change 100644 => 100755
diff --git a/.gitignore b/.gitignore
index 543dc1c655..0f74b5da3d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -68,7 +68,6 @@
/doc/version.texi
/doc/version-*.texi
/etc/committer.scm
-/etc/teams.scm
/etc/gnu-store.mount
/etc/guix-daemon.cil
/etc/guix-daemon.conf
diff --git a/configure.ac b/configure.ac
index d817f620cf..ecbd596a34 100644
--- a/configure.ac
+++ b/configure.ac
@@ -281,7 +281,6 @@ AC_CONFIG_FILES([Makefile
guix/config.scm])
AC_CONFIG_FILES([etc/committer.scm], [chmod +x etc/committer.scm])
-AC_CONFIG_FILES([etc/teams.scm], [chmod +x etc/teams.scm])
AC_CONFIG_FILES([test-env:build-aux/test-env.in], [chmod +x test-env])
AC_CONFIG_FILES([pre-inst-env:build-aux/pre-inst-env.in],
[chmod +x pre-inst-env])
diff --git a/etc/teams.scm.in b/etc/teams.scm
old mode 100644
new mode 100755
similarity index 99%
rename from etc/teams.scm.in
rename to etc/teams.scm
index 55242caad1..0b25955701
--- a/etc/teams.scm.in
+++ b/etc/teams.scm
@@ -1,5 +1,9 @@
-#!@GUILE@ \
---no-auto-compile -s
+#!/bin/sh
+# Extra care is taken here to ensure this script can run in most environments,
+# since it is invoked by 'git send-email'.
+pre_inst_env_maybe=
+command -v guix > /dev/null || pre_inst_env_maybe=./pre-inst-env
+exec $pre_inst_env_maybe guix repl -- "$0" "$@"
!#
;;; GNU Guix --- Functional package management for GNU
base-commit: faeebdc37e9137d62e11175e83988f77496a6641
--
2.41.0
Information forwarded
to
guix-patches <at> gnu.org
:
bug#66605
; Package
guix-patches
.
(Sun, 22 Oct 2023 20:25:01 GMT)
Full text and
rfc822 format available.
Message #38 received at 66605 <at> debbugs.gnu.org (full text, mbox):
Maxim Cournoyer <maxim.cournoyer <at> gmail.com> writes:
> This ensures the correct Guix dependencies are always available for the
> script.
>
> * etc/teams.scm.in: Rename to...
> * etc/teams.scm: ... this. Adjust shebang.
> * .gitignore: No longer ignore it.
> * configure.ac: Do not process it with AC_CONFIG_FILES.
>
> Fixes: https://issues.guix.gnu.org/66605
> ---
Sounds good to me! Of course, please commit it as your own.
Thank you very much,
Clément
Reply sent
to
Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
:
You have taken responsibility.
(Mon, 23 Oct 2023 00:41:01 GMT)
Full text and
rfc822 format available.
Notification sent
to
Clément Lassieur <clement <at> lassieur.org>
:
bug acknowledged by developer.
(Mon, 23 Oct 2023 00:41:02 GMT)
Full text and
rfc822 format available.
Message #43 received at 66605-done <at> debbugs.gnu.org (full text, mbox):
Hi,
Clément Lassieur <clement <at> lassieur.org> writes:
> Maxim Cournoyer <maxim.cournoyer <at> gmail.com> writes:
>
>> This ensures the correct Guix dependencies are always available for the
>> script.
>>
>> * etc/teams.scm.in: Rename to...
>> * etc/teams.scm: ... this. Adjust shebang.
>> * .gitignore: No longer ignore it.
>> * configure.ac: Do not process it with AC_CONFIG_FILES.
>>
>> Fixes: https://issues.guix.gnu.org/66605
>> ---
>
> Sounds good to me! Of course, please commit it as your own.
>
> Thank you very much,
> Clément
Done! Thanks for the report!
--
Thanks,
Maxim
Reply sent
to
Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
:
You have taken responsibility.
(Mon, 23 Oct 2023 00:41:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Clément Lassieur <clement <at> lassieur.org>
:
bug acknowledged by developer.
(Mon, 23 Oct 2023 00:41:02 GMT)
Full text and
rfc822 format available.
Reply sent
to
Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
:
You have taken responsibility.
(Mon, 23 Oct 2023 00:41:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Clément Lassieur <clement <at> lassieur.org>
:
bug acknowledged by developer.
(Mon, 23 Oct 2023 00:41:02 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Mon, 20 Nov 2023 12:24:05 GMT)
Full text and
rfc822 format available.
This bug report was last modified 1 year and 263 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.