From 237e9a7eafbc8ced9e14176005271488a16c9023 Mon Sep 17 00:00:00 2001 From: Russ Allbery Date: Tue, 19 Jun 2007 10:59:08 +0000 Subject: [PATCH] * Move /etc/openafs/server-local to /var/lib/openafs/local. Most of the files here are automatically generated and hence not configuration files, and the file server has to write to this directory to start (so having it in /etc breaks read-only / file systems). Thanks, Alexei Sheplyakov. (Closes: #405697) --- debian/README.servers | 2 +- debian/changelog | 7 ++++++- debian/openafs-fileserver.NEWS | 24 ++++++++++++++++++++++++ debian/openafs-fileserver.dirs | 3 +-- debian/openafs-fileserver.postinst | 20 +++++++++++--------- debian/rules | 2 +- 6 files changed, 44 insertions(+), 14 deletions(-) create mode 100644 debian/openafs-fileserver.NEWS diff --git a/debian/README.servers b/debian/README.servers index 1c4eff3b7..d92a2ae7a 100644 --- a/debian/README.servers +++ b/debian/README.servers @@ -19,7 +19,7 @@ Introduction traditional paths, and in the second column, the Debian paths: /usr/afs/etc /etc/openafs/server - /usr/afs/local /etc/openafs/server-local + /usr/afs/local /var/lib/openafs/local /usr/afs/db /var/lib/openafs/db /usr/afs/logs /var/log/openafs /usr/afs/bin /usr/lib/openafs diff --git a/debian/changelog b/debian/changelog index adb15fa50..d65288821 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,11 +5,16 @@ openafs (1.4.4.dfsg1-4) UNRELEASED; urgency=low * Apply upstream patches for Linux 2.6.22 support. (Closes: #428401) * Apply upstream patch to fix the AFS /proc structure under Linux 2.6.22.1 and later. + * Move /etc/openafs/server-local to /var/lib/openafs/local. Most of the + files here are automatically generated and hence not configuration + files, and the file server has to write to this directory to start (so + having it in /etc breaks read-only / file systems). Thanks, Alexei + Sheplyakov. (Closes: #405697) * Go back to using krb5-config. The dependency problem has now been fixed on all platforms in the krb5 package and this is the preferred upstream method. - -- Russ Allbery Tue, 12 Jun 2007 11:43:54 -0700 + -- Russ Allbery Tue, 19 Jun 2007 02:07:20 -0700 openafs (1.4.4.dfsg1-3) unstable; urgency=low diff --git a/debian/openafs-fileserver.NEWS b/debian/openafs-fileserver.NEWS new file mode 100644 index 000000000..f55236617 --- /dev/null +++ b/debian/openafs-fileserver.NEWS @@ -0,0 +1,24 @@ +openafs (1.4.4.dfsg1-4) unstable; urgency=low + + The files previously located in /etc/openafs/server-local have been + moved to /var/lib/openafs/local. The OpenAFS fileserver and bosserver + write files to this directory on startup which are not configuration + files and therefore, per the File Hierarchy Standard, should not be in + /etc. Any sysid, sysid.old, NetInfo, and NetRestrict files in + /etc/openafs/server-local have been copied to /var/lib/openafs/local. + + upserver and upclient have moved to /usr/lib/openafs (from /usr/sbin) to + match the other programs intended to be run by the bosserver and to + match upstream's layout. If you're running upserver or upclient from + bosserver, BosConfig has been updated with the new path, but the + services have not been restarted. + + At your convenience, you should restart your servers with: + + bos restart -all -bosserver + + so that the running servers will look at the new locations. After doing + so, you may remove /etc/openafs/server-local if you wish. + + -- Russ Allbery Tue, 19 Jun 2007 03:51:58 -0700 + diff --git a/debian/openafs-fileserver.dirs b/debian/openafs-fileserver.dirs index 719aa3cfd..4d5adfcaa 100644 --- a/debian/openafs-fileserver.dirs +++ b/debian/openafs-fileserver.dirs @@ -1,6 +1,5 @@ usr/share/doc var/log/openafs etc/openafs/server -etc/openafs/server-local var/lib/openafs/cores - +var/lib/openafs/local diff --git a/debian/openafs-fileserver.postinst b/debian/openafs-fileserver.postinst index 2c49fc320..7ea6b705c 100644 --- a/debian/openafs-fileserver.postinst +++ b/debian/openafs-fileserver.postinst @@ -20,21 +20,23 @@ configure) db_get openafs-fileserver/thiscell echo $RET >/etc/openafs/server/ThisCell - if [ -f /etc/openafs/server/CellServDB ] ; then - : - else + if [ ! -f /etc/openafs/server/CellServDB ] ; then sed -n "/^>$RET/,/^>/p" /etc/openafs/CellServDB | sed '$d' \ >/etc/openafs/server/CellServDB if [ ! -s /etc/openafs/server/CellServDB ] ; then echo ">$RET" >/etc/openafs/server/CellServDB fi fi - if [ "x$2" != "x" ] ; then - if dpkg --compare-versions $2 lt 1.2.0-1 ; then - mv /etc/openafs/server-local/BosConfig \ - /etc/openafs/BosConfig || true - mv /etc/openafs/server-local/sysid /var/lib/openafs || true - fi + + # Move the contents of the old /etc/openafs/server-local directory into + # /var/lib/openafs/local. Most of the files in this directory are + # automatically generated, so it didn't belong in /etc. + if [ "x$2" != "x" ] && dpkg --compare-versions $2 lt 1.4.4.dfsg1-4 ; then + for f in sysid sysid.old NetInfo NetRestrict ; do + if [ -e "/etc/openafs/server-local/$f" ] ; then + cp "/etc/openafs/server-local/$f" "/var/lib/openafs/local/$f" + fi + done fi db_stop ;; diff --git a/debian/rules b/debian/rules index f03a84f5e..09378e44c 100755 --- a/debian/rules +++ b/debian/rules @@ -90,7 +90,7 @@ configure-stamp: @if test x"$(SYS_NAME)" = x"UNKNOWN" ; then exit 1 ; fi dh_testdir sh regen.sh - afslogsdir=/var/log/openafs afslocaldir=/etc/openafs/server-local \ + afslogsdir=/var/log/openafs afslocaldir=/var/lib/openafs/local \ sh configure \ --with-afs-sysname=$(SYS_NAME) --disable-kernel-module \ --prefix=/usr --mandir=\$${prefix}/share/man \ -- 2.39.5