[Tux4kids-commits] r1671 - tuxmath/trunk/src tuxtype/trunk

David Bruce dbruce-guest at alioth.debian.org
Tue Nov 24 15:47:52 UTC 2009


Author: dbruce-guest
Date: 2009-11-24 15:47:52 +0000 (Tue, 24 Nov 2009)
New Revision: 1671

Modified:
   tuxmath/trunk/src/game.c
   tuxtype/trunk/Makefile.am
   tuxtype/trunk/tuxtype.spec.in
   tuxtype/trunk/tuxtype_preview.spec.in
Log:
Fix of tuxtype modifiable data path - now setgid in "games" group

Modified: tuxmath/trunk/src/game.c
===================================================================
--- tuxmath/trunk/src/game.c	2009-11-24 15:47:48 UTC (rev 1670)
+++ tuxmath/trunk/src/game.c	2009-11-24 15:47:52 UTC (rev 1671)
@@ -3928,3 +3928,4 @@
       living++;
   return living;
 }
+

Modified: tuxtype/trunk/Makefile.am
===================================================================
--- tuxtype/trunk/Makefile.am	2009-11-24 15:47:48 UTC (rev 1670)
+++ tuxtype/trunk/Makefile.am	2009-11-24 15:47:52 UTC (rev 1671)
@@ -44,10 +44,15 @@
 # Sould we skip uninstall of these directories to avoid clobbering user-created files
 # on upgrade?:
 install-data-hook:
-	$(MKDIR_P) -m 777 $(DESTDIR)$(pkglocalstatedir)
-	$(MKDIR_P) -m 777 $(DESTDIR)$(pkglocalstatedir)/words
-	$(MKDIR_P) -m 777 $(DESTDIR)$(pkgsysconfdir)
+# Global configuration (e.g. /etc/tuxtype):
+	$(MKDIR_P) -m 755 $(DESTDIR)$(pkgsysconfdir)
+# Global sites for game state data (e.g. /var/games/tuxtype):
+	$(MKDIR_P) -m 2755 $(DESTDIR)$(pkglocalstatedir)
+	$(MKDIR_P) -m 2755 $(DESTDIR)$(pkglocalstatedir)/words
+	chown root:games $(DESTDIR)$(pkglocalstatedir)
+	chown root:games $(DESTDIR)$(pkglocalstatedir)/words
 
+
 uninstall-hook:
 	rm -rf $(DESTDIR)$(pkglocalstatedir)/words
 	rm -rf $(DESTDIR)$(pkglocalstatedir)
@@ -96,7 +101,8 @@
 ## Subsequent commands then copy the needed files into NSI_INSTALL_DIR,
 ## which has the exact directory structure of the self-contained
 ## 'TuxType' folder that gets installed onto the Windows machine.
-
+## This is similar in principle to the construction of a .deb or .rpm
+## package, although the build procedure is not nearly as robust.
 install-nsi-local: all
 ## create NSI_TEMP_INSTALL_DIR and install to that location:
 	$(INSTALL) -d $(NSI_TEMP_INSTALL_DIR)

Modified: tuxtype/trunk/tuxtype.spec.in
===================================================================
--- tuxtype/trunk/tuxtype.spec.in	2009-11-24 15:47:48 UTC (rev 1670)
+++ tuxtype/trunk/tuxtype.spec.in	2009-11-24 15:47:52 UTC (rev 1671)
@@ -99,7 +99,7 @@
 %build
 %configure --disable-rpath \
            --prefix=%_prefix \
-           --localstatedir=%_localstatedir/lib \
+           --localstatedir=%_localstatedir/games \
            --sysconfdir=%_sysconfdir \
            --without-rsvg
 make %{?jobs:-j %jobs}
@@ -164,9 +164,13 @@
 %_datadir/pixmaps/*
 %_datadir/applications/*
 %_datadir/%progname
-%attr(755, root, root) %_localstatedir/lib/%progname
-%attr(755, root, root) %_localstatedir/lib/%progname/words
 %attr(755, root, root) %_sysconfdir/%progname
 
+# create game state directories modifiable by members of "games" group:
+%attr(2755, root, root) %_localstatedir/games/%progname
+%attr(2755, root, root) %_localstatedir/games/%progname/words
+chown root:games %_localstatedir/games/%progname
+chown root:games %_localstatedir/games/%progname/words
 
+
 %changelog

Modified: tuxtype/trunk/tuxtype_preview.spec.in
===================================================================
--- tuxtype/trunk/tuxtype_preview.spec.in	2009-11-24 15:47:48 UTC (rev 1670)
+++ tuxtype/trunk/tuxtype_preview.spec.in	2009-11-24 15:47:52 UTC (rev 1671)
@@ -103,7 +103,7 @@
 %build
 %configure --disable-rpath \
            --prefix=%_prefix \
-           --localstatedir=%_localstatedir/lib \
+           --localstatedir=%_localstatedir/games \
            --sysconfdir=%_sysconfdir \
            --without-rsvg
 make %{?jobs:-j %jobs}
@@ -168,9 +168,13 @@
 %_datadir/pixmaps/*
 %_datadir/applications/*
 %_datadir/%progname
-%attr(755, root, root) %_localstatedir/lib/%progname
-%attr(755, root, root) %_localstatedir/lib/%progname/words
 %attr(755, root, root) %_sysconfdir/%progname
 
+# create game state directories modifiable by members of "games" group:
+%attr(2755, root, root) %_localstatedir/games/%progname
+%attr(2755, root, root) %_localstatedir/games/%progname/words
+chown root:games %_localstatedir/games/%progname
+chown root:games %_localstatedir/games/%progname/words
 
+
 %changelog




More information about the Tux4kids-commits mailing list