summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2021-11-18 02:03:52 -0500
committerMike Frysinger <vapier@gentoo.org>2021-11-18 02:59:44 -0500
commite2db52c0bb12a79fa8369b4cabe442155710d8a8 (patch)
tree4c307efddc91af192119564900e28c34a0b4babe /app-emulation/hercules
parentprofiles: degrade arm* developer profiles to exp (diff)
downloadgentoo-e2db52c0bb12a79fa8369b4cabe442155710d8a8.tar.gz
gentoo-e2db52c0bb12a79fa8369b4cabe442155710d8a8.tar.bz2
gentoo-e2db52c0bb12a79fa8369b4cabe442155710d8a8.zip
app-emulation/hercules: fix building as non-root user
Move the chown/chgrp/setuid logic to the ebuild so it works as non-root. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'app-emulation/hercules')
-rw-r--r--app-emulation/hercules/files/hercules-3.13-user-install.patch21
-rw-r--r--app-emulation/hercules/hercules-3.13.ebuild3
2 files changed, 24 insertions, 0 deletions
diff --git a/app-emulation/hercules/files/hercules-3.13-user-install.patch b/app-emulation/hercules/files/hercules-3.13-user-install.patch
new file mode 100644
index 000000000000..bcde1181e873
--- /dev/null
+++ b/app-emulation/hercules/files/hercules-3.13-user-install.patch
@@ -0,0 +1,21 @@
+the ebuild will handle these, so no need to do it directly which will fail when
+building as non-root.
+
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -730,15 +730,6 @@ endif
+ (cd $(DESTDIR)$(bindir); @LN_S@ ./dasdcopy$(EXEEXT) cfba2fba$(EXEEXT))
+ rm -f $(DESTDIR)$(bindir)/cckd2ckd$(EXEEXT)
+ (cd $(DESTDIR)$(bindir); @LN_S@ ./dasdcopy$(EXEEXT) cckd2ckd$(EXEEXT))
+-if SETUID_HERCIFC
+- chown root $(DESTDIR)$(bindir)/hercifc
+-if HERCIFC_GROUPSET
+- chgrp $(HERCIFC_GROUPNAME) $(DESTDIR)$(bindir)/hercifc
+-endif
+- chmod 0750 $(DESTDIR)$(bindir)/hercifc
+- chmod +s $(DESTDIR)$(bindir)/hercifc
+- rm hercifc
+-endif
+
+ uninstall-local:
+
diff --git a/app-emulation/hercules/hercules-3.13.ebuild b/app-emulation/hercules/hercules-3.13.ebuild
index 1131976ea5ea..5e15d8d58a99 100644
--- a/app-emulation/hercules/hercules-3.13.ebuild
+++ b/app-emulation/hercules/hercules-3.13.ebuild
@@ -24,6 +24,7 @@ DEPEND="${RDEPEND}"
PATCHES=(
"${FILESDIR}"/${PN}-3.13-htmldir.patch
"${FILESDIR}"/${PN}-3.13-unbundle-libltdl.patch
+ "${FILESDIR}"/${PN}-3.13-user-install.patch
)
src_prepare() {
@@ -49,6 +50,8 @@ src_install() {
default
dodoc RELEASE.NOTES
+ use suid && fperms 4711 /usr/bin/hercifc
+
insinto /usr/share/hercules
doins hercules.cnf