[OpenAFS] 1.1.0 client on RH 7.1
Rudolph T Maceyko
rtm@cert.org
Tue, 24 Jul 2001 15:42:44 -0400
--==========864880887==========
Content-Type: multipart/mixed; boundary="==========1821989384=========="
--==========1821989384==========
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
I've removed the %dir /afs directive and replaced it with mkdir/rmdir
in %post/%preun.
I've also included an openafs-client-compat package with symlinks
providing /usr/afsws/{bin,etc} since many sites (such as ours :-) have
the old paths embedded in tons of existing scripts...
Please consider incorporating this patch (against the one in
openafs-1.1.1-24.1.src.rpm) into the next release of OpenAFS.
-Rudy
--On Tuesday, July 24, 2001 12:06:35 -0400 Derek Atkins
<warlord@MIT.EDU> wrote:
> No, you do want /afs "owned", but it doesn't necessarily need to be
> owned by the RPM system within the RPM database. Another way of doing
> it would be to have the openafs-client rpm mkdir /afs in the
> postinstall:
>
> [ -d /afs ] || mkdir /afs
>
> And then in the post-uninstall script, something like this to remove
> it:
>
> [ $1 = 0 ] && rmdir /afs
>
> Of course the pre-uninstall script should have something like this to
> make sure AFS is stopped if you are unstalling the package:
>
> [ $1 = 0 ] && /etc/rc.d/init.d/afs stop
--==========1821989384==========
Content-Type: text/plain; charset=us-ascii; name="openafs-1.1.1-spec.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="openafs-1.1.1-spec.patch";
size=2301
--- openafs-1.1.1.spec 2001-07-24 13:29:58-04 1.1
+++ openafs-1.1.1.spec 2001-07-24 14:28:20-04
@@ -1,5 +1,5 @@
%define afsvers 1.1.1
-%define release 1
+%define release 1.1
# Define your particular kernel version:
# For Linux 2.2: 22
@@ -123,6 +123,21 @@
This package provides the source code to build your own AFS kernel
module.
+%package client-compat
+Summary: OpenAFS client compatibility symlinks
+Provides: afs
+Provides: afs-client
+Requires: openafs = %{PACKAGE_VERSION}
+Group: Networking/Filesystems
+
+%description client-compat
+The AFS distributed filesystem. AFS is a distributed filesystem
+allowing cross-platform sharing of files among multiple computers.
+Facilities are provided for access control, authentication, backup and
+administrative management.
+
+This package provides compatibility symlinks in /usr/afsws.
+
%prep
%setup -q -b 1
@@ -296,7 +311,7 @@
sysname=${sysbase}_linux%{kernvers}
# Build install tree
-mkdir -p $RPM_BUILD_ROOT/afs
+#mkdir -p $RPM_BUILD_ROOT/afs
mkdir -p $RPM_BUILD_ROOT/usr/sbin
mkdir -p $RPM_BUILD_ROOT/etc/sysconfig
mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d
@@ -388,6 +403,17 @@
tar cf - -C doc LICENSE html pdf | \
tar xf - -C $RPM_BUILD_ROOT/usr/doc/openafs-%{afsvers}
+#
+# Install compatiblity links
+#
+for d in bin:bin etc:sbin; do
+ olddir=`echo $d | sed 's/:.*$//'`
+ newdir=`echo $d | sed 's/^.*://'`
+ mkdir -p $RPM_BUILD_ROOT/usr/afsws/$olddir
+ for f in `cd $RPM_BUILD_ROOT/usr/$newdir && ls`; do
+ ln -sf /usr/$newdir/$f $RPM_BUILD_ROOT/usr/afsws/$olddir/$f
+ done
+done
###
### clean
@@ -403,6 +429,7 @@
chkconfig --add afs
%post client
+mkdir -p /afs
echo
echo The AFS cache is configured for 100 MB. Edit the
echo /usr/vice/etc/cacheinfo file to change this before
@@ -434,6 +461,7 @@
if [ $1 = 0 ] ; then
/etc/rc.d/init.d/afs stop
chkconfig --del afs
+ rmdir /afs
fi
###
@@ -471,7 +499,7 @@
%files client
%defattr(-,root,root)
-%dir /afs
+#%dir /afs
%dir /usr/vice/cache
%config /usr/vice/etc/CellServDB
%config /usr/vice/etc/SuidCells
@@ -553,3 +581,7 @@
/usr/src/openafs-kernel-%{afsvers}/mkinstalldirs
/usr/src/openafs-kernel-%{afsvers}/regen.sh
/usr/src/openafs-kernel-%{afsvers}/src
+
+%files client-compat
+%defattr(-,root,root)
+/usr/afsws
--==========1821989384==========--
--==========864880887==========
Content-Type: application/pgp-signature; name="file1gpwOh.sig"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="file1gpwOh.sig"; size=232
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iD8DBQE7Xc+6m1uhuiIrwYkRAiKWAJ95IskuoyOHSLQsVrn2PpEcsjJfGgCdG1EV
gCnh4gCvtk9VoMBEhiyWwa0=
=iW8o
-----END PGP SIGNATURE-----
--==========864880887==========--