fanf2 2005/06/21 15:20:54 BST
Modified files:
exim-course/rpm exim-course.spec
Log:
Fix group handling and source download.
Revision Changes Path
1.2 +13 -6 exim/exim-course/rpm/exim-course.spec
Index: exim-course.spec
===================================================================
RCS file: /home/cvs/exim/exim-course/rpm/exim-course.spec,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -u -r1.1 -r1.2
--- exim-course.spec 20 Jun 2005 18:21:55 -0000 1.1
+++ exim-course.spec 21 Jun 2005 14:20:54 -0000 1.2
@@ -1,4 +1,4 @@
-# $Cambridge: exim/exim-course/rpm/exim-course.spec,v 1.1 2005/06/20 18:21:55 fanf2 Exp $
+# $Cambridge: exim/exim-course/rpm/exim-course.spec,v 1.2 2005/06/21 14:20:54 fanf2 Exp $
#
# The RPM spec file for the package which customizes PWF Linux for the
# Exim course. This is a little bit sketchy and assumes a working
@@ -11,7 +11,7 @@
Group: Development/Sources
Autoreqprov: on
Version: 4.51
-Release: 0
+Release: 1
Summary: Customize PWF Linux for the Exim course
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@@ -58,6 +58,7 @@
# chosen the user and group numbers fairly randomly after checking
# with uxsup that they are un-allocated.
usermod -p '$1$pwf-exim$4pRtduTjWYyznvCbRN.Nr.' root
+groupadd -g 864 course
useradd -p '$1$pwf-exim$4pRtduTjWYyznvCbRN.Nr.' \
-c 'Exim course user' \
--create-home \
@@ -65,6 +66,7 @@
-g 864 -u 864 \
-G course,mail \
course
+groupadd -g 888 peon
useradd -p '$1$pwf-exim$4pRtduTjWYyznvCbRN.Nr.' \
-c 'unprivileged user' \
--create-home \
@@ -73,21 +75,26 @@
-G peon \
peon
# pre-fetch the Exim source code
-wget -O ${RPM_BUILD_ROOT}/home/course/exim-${version}.tar.gz \
- ftp://ftp.csx.cam.ac.uk/pub/software/email/exim/exim4/exim-${version}.tar.gz
+# NOTE: keep in sync with package version above!
+wget -O /home/course/exim-4.51.tar.gz \
+ ftp://ftp.csx.cam.ac.uk/pub/software/email/exim/exim4/exim-4.51.tar.gz
%preun
+: do nothing
+
+%postun
# Zap the root password. The proper PWF root password will be reset
# when the machines are re-ghosted after the course.
usermod -p '$1$pwf-exim$BzVb3sCeX9zk9jXThlL/G/' root
# Just blitz the other users
userdel --remove-home course
userdel --remove-home peon
-
-%postun
-: do nothing
+groupdel course
+groupdel peon
%changelog
+* Mon Jun 21 2005 - fanf@???
+- fix scriptlet bugs
* Mon Jun 20 2005 - fanf@???
- initial cut