Vanilla Development Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

CVS update: Vanilla/rpm



Date:	Monday July 19, 1999 @ 1:31
Author:	tanner

Update of /home/netrek/cvsroot/Vanilla/rpm
In directory cvs.castle.real-time.com:/var/tmp/cvs-serv13338/rpm

Modified Files:
	Vanilla.spec cvs2rpm netrek.init 
Added Files:
	netrek.keys 
Log Message:
	* rpm/Vanilla.spec (gum): gum is now netrekcfg.

	* rpm/Vanilla.spec (gum): Activate gum build and install. Setup
	Prereq and Requires for the package.

	* rpm/Vanilla.spec (preun): Stop the server before uninstallation.

	* rpm/Vanilla.spec (%dir): Make netrek home dir and log dir be
	2755 (+s on the group) to force the group of all files to be in
	the games group.

	* rpm/Vanilla.spec (Group): Forgot to symlink mesg.log to /var/log/netrek.

	* rpm/Vanilla.spec (%post): Run the symlinks as the user games to
	it owns the symlinks.

	* rpm/Vanilla.spec (gum): gum requires the Vanilla server to be
	installed to work properly. So, Requires: Vanilla.

	* rpm/Vanilla.spec (gum): Added aclocal, automake and autoconf to
	get gum to build correctly on Redhat 6.0

	* rpm/netrek.init: Do not start the updatedkeys on boot, instead
	we are storing a version of the keys inside the package.

	* rpm/cvs2rpm (sources): Copy the rsa-keys into the RPM build area.

	* rpm/Vanilla.spec (file): Included the rsa-keyfile with the
	package, so non-Internet PCs can start up the server without
	having to get the keys from the metaserver.

	* rpm/Vanilla.spec (doc): Added documentation about %ghost files
	and why they are needed.


****************************************

Index: Vanilla/rpm/Vanilla.spec
diff -u Vanilla/rpm/Vanilla.spec:1.18 Vanilla/rpm/Vanilla.spec:1.19
--- Vanilla/rpm/Vanilla.spec:1.18	Sun Jul 18 03:39:12 1999
+++ Vanilla/rpm/Vanilla.spec	Mon Jul 19 01:31:35 1999
@@ -10,8 +10,9 @@
 Source1: netrek.init
 Source2: netrek.logrotate
 Source3: netrek.crontab
+Source4: netrek.keys
 Prereq: sed, vixie-cron, sh-utils
-Requires: gtk+ > 1.2, glib > 1.2, vixie-cron, sed, sh-utils
+Requires: vixie-cron, sed, sh-utils
 BuildRoot: /var/tmp/netrek-buildroot
 
 %description
@@ -36,15 +37,20 @@
 All netrek clients and servers are completely free of charge, although 
 there are several people working on commercial netrek variants or derivatives. 
 
-Development mailing list vanilla-l@us.netrek.org.
+Development mailing list vanilla-list@us.netrek.org.
 Development web site <http://vanilla.us.netrek.org/>
 Netrek canonical sites <http://www.netrek.org/>
 
-%package gum
+#
+# GUI Admin tool
+#
+%package netrekcfg
 Summary: Netrek server control GUI 
+Prereq: automake
+Requires: Vanilla, gtk+ > 1.2, glib > 1.2
 Group: Amusements/Games
 
-%description gum
+%description netrekcfg
 This program is for use by administrators of servers and provides: 
 
 	maintenance of the server .ports file, 
@@ -57,30 +63,39 @@
 
 %build
 
+#
 # Look for the US RSA stuff.
+#
 if [ -f $RPM_SOURCE_DIR/res-rsa-2.9.1.tar.gz ]; then
   RSA_FILE=$RPM_SOURCE_DIR/res-rsa-2.9.1.tar.gz
   RSA_RELEASE=2.9.1
 
+#
 # Look for the Euro RSA stuff.
+#
 elif [ -f $RPM_SOURCE_DIR/res-rsa-2.9.tar.gz ]; then
   RSA_FILE=$RPM_SOURCE_DIR/res-rsa-2.9.tar.gz
   RSA_RELEASE=2.9
 
+#
 # Could not find either, does the user have the file encrypted?
+#
 elif [ -f $RPM_SOURCE_DIR/res-rsa-2.9.1.tar.gz.crypt ]; then
   echo "Found RSA files, but they are encrypted, send email to rsakeys@us.netrek.org"
   echo "for the password to decrypt the file. If you want to build the server without"
   echo "RSA, remove $RPM_SOURCE_DIR/res-rsa-2.9.1.tar.gz.crypt and run rpm again."
   exit 1
 
+#
 # No RSA code, so just tell the user we are going to compile with RSA
+#
 else
   echo "No RSA source code found. I am going to compile the server without RSA."
 fi
-
 
+#
 # Extract the RSA source if we found it
+#
 if [ ! -z $RSA_FILE ]; then
   ln -s res-rsa res-rsa-$RSA_RELEASE
   zcat $RSA_FILE | tar -xvf -
@@ -95,9 +110,9 @@
 #
 # Build the netrek server control GUI
 #
-#cd gum
-#./configure -prefix=/usr/games/netrek
-#make
+cd gum
+./configure --prefix=/usr/games/netrek
+make
 
 %install
 rm -rf $RPM_BUILD_ROOT
@@ -106,50 +121,84 @@
 install -d $RPM_BUILD_ROOT/etc/cron.hourly
 install -d $RPM_BUILD_ROOT/var/log/netrek
 install -d $RPM_BUILD_ROOT/usr/bin
+install -d $RPM_BUILD_ROOT/usr/share/games/netrek
 
+#
+# Use INSTALLOPTS="-s" if you want the binaries stripped.
+#
 make LIBDIR=$RPM_BUILD_ROOT/usr/games/netrek install
 install -m 0644 $RPM_SOURCE_DIR/netrek.logrotate $RPM_BUILD_ROOT/etc/logrotate.d/netrek
 install -m 0555 $RPM_SOURCE_DIR/netrek.init $RPM_BUILD_ROOT/etc/rc.d/init.d/netrek
 install -m 0644 $RPM_SOURCE_DIR/netrek.functions $RPM_BUILD_ROOT/etc/rc.d/init.d/functions-games
 install -m 0555 $RPM_SOURCE_DIR/netrek.crontab $RPM_BUILD_ROOT/etc/cron.hourly/netrek
+install -m 0644 $RPM_SOURCE_DIR/netrek.keys $RPM_BUILD_ROOT/usr/games/netrek/rsa-keyfile
 
-# Create the ghost of netrekd. The %post will do the actual symlink on
-# install.
+#
+# Create the ghosts. The %post will do the actual symlink on install.
+#
 touch $RPM_BUILD_ROOT/usr/bin/netrekd
+touch $RPM_BUILD_ROOT/usr/bin/netrekcfg
 
-for f in rsa_key log ERRORS motd_list rsa-keyfile .global .newstartd.pid god.LOG logfile \
-	rsa-keyfile~; do
+#
+# Any file that the server creates needs to be added here so I can
+# touch the file in the /usr/game/netrek directory. Also don't for get
+# to add a %ghost entry for each of these files. This is necessary so if
+# a user removes the server all files, even one generated from the
+# server are removed.
+#
+for f in rsa_key log ERRORS motd_list .global .newstartd.pid .players \
+	god.LOG logfile rsa-keyfile~; do
   touch $RPM_BUILD_ROOT/usr/games/netrek/$f
 done
 
+#
+# Any new log files should be added here and the appropriate %ghost
+# entries in the file section.
+#
 for f in god.LOG mesg.LOG newstartd.LOG updated.LOG errors.LOG; do
   touch $RPM_BUILD_ROOT/var/log/netrek/$f
 done
 
-#cd gum
-#install -c gum $RPM_BUILD_DIR/usr/games/netrek/gum
+#
+#  Install the netrek server control GUI
+#
+cd gum
+make install prefix=$RPM_BUILD_ROOT/usr/games/netrek \
+	bindir=$RPM_BUILD_ROOT/usr/games/netrek/tools \
+	datadir=$RPM_BUILD_ROOT/usr/share/games/netrek
 
 %clean
-# rm -rf $RPM_BUILD_ROOT
+rm -rf $RPM_BUILD_ROOT
 
 %post
 chkconfig --add netrek
 
+#
 # James wants netrekd int /usr/bin, so symlink
+#
 ln -s /usr/games/netrek/newstartd /usr/bin/netrekd
 
-# newstart/netrekd writes logs to LIBDIR/log, symlink it to
-# /var/log/netrek/newstartd.LOG to keep with the linux standards.
-ln -s /var/log/netrek/newstartd.LOG /usr/games/netrek/log
-ln -s /var/log/netrek/god.LOG /usr/games/netrek/god.LOG
-ln -s /var/log/netrek/newstartd.LOG /usr/games/netrek/logfile
-ln -s /var/log/netrek/errors.LOG /usr/games/netrek/ERRORS
+#
+# Server normally writes logs to LIBDIR, symlink all log files to
+# /var/log/netrek to keep with the linux standards. Make sure you
+# perform the symlink as user games.
+#
+su -c "ln -s /var/log/netrek/newstartd.LOG /usr/games/netrek/log" - games
+su -c "ln -s /var/log/netrek/god.LOG /usr/games/netrek/god.LOG" - games
+su -c "ln -s /var/log/netrek/newstartd.LOG /usr/games/netrek/logfile" - games
+su -c "ln -s /var/log/netrek/errors.LOG /usr/games/netrek/ERRORS" - games
+su -c "ln -s /var/log/netrek/mesg.LOG /usr/games/netrek/mesg.LOG" - games
 
 %preun
 chkconfig --del netrek
+/etc/rc.d/init.d/netrek stop
 
 %postun
 
+%post netrekcfg
+#ln -s /usr/games/netrek/tools/netrekcfg /usr/bin/netrekcfg
+ln -s /usr/games/netrek/tools/gum /usr/bin/netrekcfg
+
 %files
 %defattr(-, root, root)
 %doc PROJECTS README INSTALL INSTALL.INL docs tools/README xsg/README 
@@ -158,13 +207,15 @@
 /etc/rc.d/init.d/netrek
 
 %defattr(-, games, games)
-%dir /usr/games/netrek
-%dir /var/log/netrek
+%attr(2755, games, games) %dir /usr/games/netrek
+%attr(2755, games, games) %dir /var/log/netrek
 %ghost /var/log/netrek/god.LOG
 %ghost /var/log/netrek/mesg.LOG
 %ghost /var/log/netrek/updated.LOG
 %ghost /var/log/netrek/newstartd.LOG
 %ghost /var/log/netrek/errors.LOG
+%config /usr/games/netrek/.global
+%config /usr/games/netrek/.players
 %config /usr/games/netrek/.planets
 %config /usr/games/netrek/.features
 %config /usr/games/netrek/.motd_clue
@@ -181,17 +232,16 @@
 %config /usr/games/netrek/.banned
 %config /usr/games/netrek/.bypass
 %config /usr/games/netrek/.clue-bypass
+%config /usr/games/netrek/.reserved
 /etc/cron.hourly/netrek
+/usr/games/netrek/rsa-keyfile
+%ghost /usr/games/netrek/rsa-keyfile~
 %ghost /usr/games/netrek/god.LOG
 %ghost /usr/games/netrek/logfile
 %ghost /usr/games/netrek/log
 %ghost /usr/games/netrek/rsa_key
-%ghost %config /usr/games/netrek/.reserved
 %ghost /usr/games/netrek/motd_list
-%ghost /usr/games/netrek/rsa-keyfile
-%ghost /usr/games/netrek/rsa-keyfile~
 %ghost /usr/games/netrek/ERRORS
-%ghost %config /usr/games/netrek/.global
 %ghost /usr/games/netrek/.newstartd.pid
 /usr/games/netrek/ntserv
 /usr/games/netrek/daemonII
@@ -216,8 +266,11 @@
 /usr/games/netrek/trekoff.bitmap
 /usr/games/netrek/tools
 
-%files gum
+%files netrekcfg
 %defattr(-, games, games)
+%ghost /usr/bin/netrekcfg
+/usr/games/netrek/tools/gum
+/usr/share/games/netrek
 
 %changelog
 * Fri Jul 16 1999  Bob Tanner  <tanner@real-time.com>
Index: Vanilla/rpm/cvs2rpm
diff -u Vanilla/rpm/cvs2rpm:1.7 Vanilla/rpm/cvs2rpm:1.8
--- Vanilla/rpm/cvs2rpm:1.7	Sat Jul 17 01:48:44 1999
+++ Vanilla/rpm/cvs2rpm	Mon Jul 19 01:31:35 1999
@@ -5,7 +5,7 @@
 #
 # Make sure you check and set your VS and VL variable to get this to work.
 #
-# $Id: cvs2rpm,v 1.7 1999/07/17 06:48:44 tanner Exp $
+# $Id: cvs2rpm,v 1.8 1999/07/19 06:31:35 tanner Exp $
 #
 
 # Change these if necessary!
@@ -88,7 +88,7 @@
   exit 1
 fi
 
-for i in init logrotate crontab functions; do
+for i in init logrotate crontab functions keys; do
   cp netrek.$i $RPM_SOURCE_DIR
   if [ $? -ne 0 ]; then
     echo "Cannot cp netrek.$ to $RPM_SOURCE_DIR. Aborting."
Index: Vanilla/rpm/netrek.init
diff -u Vanilla/rpm/netrek.init:1.6 Vanilla/rpm/netrek.init:1.7
--- Vanilla/rpm/netrek.init:1.6	Sat Jul 17 01:48:44 1999
+++ Vanilla/rpm/netrek.init	Mon Jul 19 01:31:35 1999
@@ -31,7 +31,6 @@
   start)
 	# Start the server.
 	echo -n "Starting netrek server: "
-        run_as games /usr/games/netrek/tools/updatekeys
 	daemon_user games netrekd
 	echo 
 	touch /var/lock/subsys/netrek