Fixed unprivileged 'rpm' builds.
authorlace <>
Fri, 30 Dec 2005 17:07:06 +0000 (17:07 +0000)
committerlace <>
Fri, 30 Dec 2005 17:07:06 +0000 (17:07 +0000)
 - Build was perusing buggy install(1) of Fedora Core before.
 - Bugreported by: Steven N. Hirsch

src/client/fuse/Makefile.am
src/client/sandbox-server/Makefile.am

index 30de43f..ee1bbc8 100644 (file)
@@ -77,6 +77,27 @@ if ENABLE_SBIN_MOUNT
 mount_captive_cond=mount.captive
 initd_SCRIPTS_cond=captive
 
+if ENABLE_STANDALONE
+libexec_PROGRAMS_cond=captive-fusermount
+
+install-exec-hook-captive-fusermount:
+       chown root.fuse $(DESTDIR)/$(libexecdir)/captive-fusermount
+       chmod 4754      $(DESTDIR)/$(libexecdir)/captive-fusermount
+       if grep -q '^fuse:' /etc/group;then true;else \
+               echo "ERROR: Add 'fuse' to your '/etc/group'; see groupadd(8)"; \
+               exit 1; \
+       fi;
+
+else
+install-exec-hook-captive-fusermount:
+       @true
+
+endif
+
+# Do not: libexecPROGRAMS_INSTALL=${INSTALL} -o root -g fuse -m 4754
+# as it works only on Fedora Core based systems, at least SuSE 10.0 correctly fails.
+#      https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=176708
+
 install-exec-hook:
        $(mkinstalldirs) $(DESTDIR)$(enable_sbin_mountdir)
        IFS=:; \
@@ -88,10 +109,7 @@ install-exec-hook:
                fi; \
                done
        if test `id -u` -eq 0 -a -z "$(DESTDIR)";then \
-               if grep -q '^fuse:' /etc/group;then true;else \
-                       echo "ERROR: Add 'fuse' to your '/etc/group'; see groupadd(8)"; \
-                       exit 1; \
-               fi; \
+               $(MAKE) $(AM_MAKEFLAGS) install-exec-hook-captive-fusermount; \
        fi
 
 else
@@ -129,10 +147,3 @@ captive_fusermount_SOURCES= \
 captive_fusermount_CFLAGS=
 captive_fusermount_LDADD =$(captive_library)
 libexec_PROGRAMS=$(libexec_PROGRAMS_cond)
-libexecPROGRAMS_INSTALL=${INSTALL} -o root -g fuse -m 4754
-
-if ENABLE_FUSE
-if ENABLE_STANDALONE
-libexec_PROGRAMS_cond=captive-fusermount
-endif
-endif
index ac952a9..3a622d0 100644 (file)
@@ -23,7 +23,6 @@ captive_sandbox_server_SOURCES= \
 captive_sandbox_server_CFLAGS=$(ORBIT_CFLAGS) $(LINC_CFLAGS) $(GNOME_VFS_CFLAGS) $(LIBXML_CFLAGS) 
 captive_sandbox_server_LDADD =$(ORBIT_LIBS)   $(LINC_LIBS)   $(GNOME_VFS_LIBS)   $(LIBXML_LIBS)   $(captive_library) $(INTLLIBS)
 libexec_PROGRAMS=captive-sandbox-server
-libexecPROGRAMS_INSTALL=${INSTALL} -o root -g root -m 4755
 EXTRA_DIST+=.gdbinit
 
 install-data-hook:
@@ -31,8 +30,14 @@ install-data-hook:
        $(mkinstalldirs) $(DESTDIR)$(CAPTIVE_SANDBOX_CHROOT)/tmp
        chmod 1777 $(DESTDIR)$(CAPTIVE_SANDBOX_CHROOT)/tmp
 
+# Do not: libexecPROGRAMS_INSTALL=${INSTALL} -o root -g root -m 4755
+# as it works only on Fedora Core based systems, at least SuSE 10.0 correctly fails.
+#      https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=176708
+
 install-exec-hook:
        if test `id -u` -eq 0 -a -z "$(DESTDIR)";then \
+               chown root.root $(DESTDIR)/$(libexecdir)/captive-sandbox-server; \
+               chmod 4755      $(DESTDIR)/$(libexecdir)/captive-sandbox-server; \
                if grep -q '^$(CAPTIVE_SANDBOX_SETGID):' /etc/group;then true;else \
                        echo "ERROR: Add '$(CAPTIVE_SANDBOX_SETGID)' to your '/etc/group'; see README and groupadd(8)"; \
                        exit 1; \