commit:     98cb41a01f37e5161de5c6ae159d3dfe80c29376
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Aug  5 22:26:38 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Aug  5 22:28:30 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=98cb41a0

x11-wm/fvwm3: fix shebang in /etc/X11/Sessions file

A file in /etc/X11/Sessions with just the path that's *not* executable is fine,
but if it's executable, it's reasonably treated as a script. Oops.

Bug: https://bugs.gentoo.org/911787

Signed-off-by: Sam James <sam <AT> gentoo.org>

 x11-wm/fvwm3/{fvwm3-9999.ebuild => fvwm3-1.0.7-r1.ebuild} | 8 +++++---
 x11-wm/fvwm3/fvwm3-9999.ebuild                            | 8 +++++---
 2 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/x11-wm/fvwm3/fvwm3-9999.ebuild b/x11-wm/fvwm3/fvwm3-1.0.7-r1.ebuild
similarity index 96%
copy from x11-wm/fvwm3/fvwm3-9999.ebuild
copy to x11-wm/fvwm3/fvwm3-1.0.7-r1.ebuild
index 46cdabe5b388..897728504f51 100644
--- a/x11-wm/fvwm3/fvwm3-9999.ebuild
+++ b/x11-wm/fvwm3/fvwm3-1.0.7-r1.ebuild
@@ -141,9 +141,11 @@ src_compile() {
 src_install() {
        emake DESTDIR="${ED}" prefix="/usr" exec_prefix="/usr" 
datarootdir="/usr/share" install
 
-       dodir /etc/X11/Sessions
-       echo "/usr/bin/fvwm3" > "${ED}/etc/X11/Sessions/${PN}" || die
-       fperms a+x "/etc/X11/Sessions/${PN}" || die
+       exeinto /etc/X11/Sessions
+       newexe - ${PN} <<-EOF
+       #!/bin/sh
+       ${PN}
+       EOF
 
        python_scriptinto "/usr/bin"
        python_doscript "${ED}/usr/bin/FvwmCommand" 
"${ED}/usr/bin/fvwm-menu-desktop"

diff --git a/x11-wm/fvwm3/fvwm3-9999.ebuild b/x11-wm/fvwm3/fvwm3-9999.ebuild
index 46cdabe5b388..897728504f51 100644
--- a/x11-wm/fvwm3/fvwm3-9999.ebuild
+++ b/x11-wm/fvwm3/fvwm3-9999.ebuild
@@ -141,9 +141,11 @@ src_compile() {
 src_install() {
        emake DESTDIR="${ED}" prefix="/usr" exec_prefix="/usr" 
datarootdir="/usr/share" install
 
-       dodir /etc/X11/Sessions
-       echo "/usr/bin/fvwm3" > "${ED}/etc/X11/Sessions/${PN}" || die
-       fperms a+x "/etc/X11/Sessions/${PN}" || die
+       exeinto /etc/X11/Sessions
+       newexe - ${PN} <<-EOF
+       #!/bin/sh
+       ${PN}
+       EOF
 
        python_scriptinto "/usr/bin"
        python_doscript "${ED}/usr/bin/FvwmCommand" 
"${ED}/usr/bin/fvwm-menu-desktop"

Reply via email to