commit:     7f9198feb0dc9af82c863c7839d339c6a54bd76c
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Aug  5 22:28:02 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Aug  5 22:28:31 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7f9198fe

x11-wm/openbox: 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.

Closes: https://bugs.gentoo.org/911787
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../{openbox-9999.ebuild => openbox-3.6.1-r6.ebuild}        | 13 +++++++++----
 x11-wm/openbox/openbox-9999.ebuild                          | 11 ++++++++---
 2 files changed, 17 insertions(+), 7 deletions(-)

diff --git a/x11-wm/openbox/openbox-9999.ebuild 
b/x11-wm/openbox/openbox-3.6.1-r6.ebuild
similarity index 91%
copy from x11-wm/openbox/openbox-9999.ebuild
copy to x11-wm/openbox/openbox-3.6.1-r6.ebuild
index d753cdef761b..0233009d6d34 100644
--- a/x11-wm/openbox/openbox-9999.ebuild
+++ b/x11-wm/openbox/openbox-3.6.1-r6.ebuild
@@ -14,7 +14,7 @@ if [[ ${PV} == *9999* ]]; then
        EGIT_REPO_URI="https://github.com/Mikachu/openbox.git";
 else
        SRC_URI="http://openbox.org/dist/openbox/${P}.tar.gz";
-       KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 
~riscv ~sparc ~x86 ~x86-linux"
+       KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~mips ppc ppc64 ~riscv 
sparc x86 ~x86-linux"
 fi
 
 SRC_URI+=" branding? ( 
https://dev.gentoo.org/~hwoarang/distfiles/surreal-gentoo.tar.gz )"
@@ -61,6 +61,8 @@ PATCHES=(
        "${FILESDIR}/${PN}-3.6.1-py3-xdg.patch"
        # https://bugs.gentoo.org/827227
        "${FILESDIR}/${PN}-3.6.1-getgrent-to-getgroups.patch"
+       # https://bugs.gentoo.org/901777
+       "${FILESDIR}/${PN}-3.6.1-glib-2.76.patch"
 )
 
 pkg_setup() {
@@ -99,9 +101,12 @@ src_configure() {
 }
 
 src_install() {
-       dodir /etc/X11/Sessions
-       echo "/usr/bin/openbox-session" > "${ED}/etc/X11/Sessions/${PN}"
-       fperms a+x /etc/X11/Sessions/${PN}
+       exeinto /etc/X11/Sessions
+       newexe - ${PN} <<-EOF
+       #!/bin/sh
+       ${PN}
+       EOF
+
        emake DESTDIR="${D}" install
        if use branding; then
                insinto /usr/share/themes

diff --git a/x11-wm/openbox/openbox-9999.ebuild 
b/x11-wm/openbox/openbox-9999.ebuild
index d753cdef761b..3a35c296e216 100644
--- a/x11-wm/openbox/openbox-9999.ebuild
+++ b/x11-wm/openbox/openbox-9999.ebuild
@@ -61,6 +61,8 @@ PATCHES=(
        "${FILESDIR}/${PN}-3.6.1-py3-xdg.patch"
        # https://bugs.gentoo.org/827227
        "${FILESDIR}/${PN}-3.6.1-getgrent-to-getgroups.patch"
+       # https://bugs.gentoo.org/901777
+       "${FILESDIR}/${PN}-3.6.1-glib-2.76.patch"
 )
 
 pkg_setup() {
@@ -99,9 +101,12 @@ src_configure() {
 }
 
 src_install() {
-       dodir /etc/X11/Sessions
-       echo "/usr/bin/openbox-session" > "${ED}/etc/X11/Sessions/${PN}"
-       fperms a+x /etc/X11/Sessions/${PN}
+       exeinto /etc/X11/Sessions
+       newexe - ${PN} <<-EOF
+       #!/bin/sh
+       ${PN}
+       EOF
+
        emake DESTDIR="${D}" install
        if use branding; then
                insinto /usr/share/themes

Reply via email to