From a7c8d16e5927e2c16c5d18253bf83dc8d21bd8af67c1d706971ae5fe63a9c84e Mon Sep 17 00:00:00 2001 From: David Sterba Date: Wed, 14 Mar 2018 17:57:49 +0000 Subject: [PATCH] Accepting request 586757 from home:hauky Hello, this package should replace the package openafs18. The reason for this request is that I would like to get this software into Factory, but it violaites the nameing convention. Thus, I decided to have one package "openafs" with the up-to-date version of the software. The package "openafs16" should still stay in filesystems. Once this is accepted, I will create a deletion request for filesystems/openafs18 Many thanks. OBS-URL: https://build.opensuse.org/request/show/586757 OBS-URL: https://build.opensuse.org/package/show/filesystems/openafs?expand=0&rev=1 --- .gitattributes | 23 + .gitignore | 1 + ChangeLog | 769 +++++++++++++++++++ README.SUSE.openafs | 109 +++ RELNOTES-1.8.0~pre5 | 466 +++++++++++ kernel-source.build-modules.sh | 55 ++ ld.conf.openafs | 1 + logrotate.openafs-server | 11 + openafs-1.8.0~pre5-doc.tar.bz2 | 3 + openafs-1.8.0~pre5-doc.tar.bz2.md5 | 1 + openafs-1.8.0~pre5-doc.tar.bz2.sha256 | 1 + openafs-1.8.0~pre5-src.tar.bz2 | 3 + openafs-1.8.0~pre5-src.tar.bz2.md5 | 1 + openafs-1.8.0~pre5-src.tar.bz2.sha256 | 1 + openafs-1.8.x.heimdal.patch | 11 + openafs-1.8.x.ncurses6.patch | 13 + openafs-client.service | 20 + openafs-fuse-client.service | 20 + openafs-server.service | 11 + openafs.CellAlias | 1 + openafs.SuidCells | 0 openafs.ThisCell | 1 + openafs.cacheinfo | 1 + openafs.changes | 430 +++++++++++ openafs.spec | 1023 +++++++++++++++++++++++++ preamble | 3 + rc.afs-client | 372 +++++++++ rc.afs-fuse-client | 364 +++++++++ rc.afs-server | 228 ++++++ sysconfig.openafs-client | 144 ++++ sysconfig.openafs-client-systemd | 13 + sysconfig.openafs-fuse-client | 145 ++++ sysconfig.openafs-fuse-client-systemd | 7 + sysconfig.openafs-server | 79 ++ sysconfig.openafs-server-systemd | 4 + 35 files changed, 4335 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 ChangeLog create mode 100644 README.SUSE.openafs create mode 100644 RELNOTES-1.8.0~pre5 create mode 100644 kernel-source.build-modules.sh create mode 100644 ld.conf.openafs create mode 100644 logrotate.openafs-server create mode 100644 openafs-1.8.0~pre5-doc.tar.bz2 create mode 100644 openafs-1.8.0~pre5-doc.tar.bz2.md5 create mode 100644 openafs-1.8.0~pre5-doc.tar.bz2.sha256 create mode 100644 openafs-1.8.0~pre5-src.tar.bz2 create mode 100644 openafs-1.8.0~pre5-src.tar.bz2.md5 create mode 100644 openafs-1.8.0~pre5-src.tar.bz2.sha256 create mode 100644 openafs-1.8.x.heimdal.patch create mode 100644 openafs-1.8.x.ncurses6.patch create mode 100644 openafs-client.service create mode 100644 openafs-fuse-client.service create mode 100644 openafs-server.service create mode 100644 openafs.CellAlias create mode 100644 openafs.SuidCells create mode 100644 openafs.ThisCell create mode 100644 openafs.cacheinfo create mode 100644 openafs.changes create mode 100644 openafs.spec create mode 100644 preamble create mode 100644 rc.afs-client create mode 100644 rc.afs-fuse-client create mode 100644 rc.afs-server create mode 100644 sysconfig.openafs-client create mode 100644 sysconfig.openafs-client-systemd create mode 100644 sysconfig.openafs-fuse-client create mode 100644 sysconfig.openafs-fuse-client-systemd create mode 100644 sysconfig.openafs-server create mode 100644 sysconfig.openafs-server-systemd diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/ChangeLog b/ChangeLog new file mode 100644 index 0000000..e479ceb --- /dev/null +++ b/ChangeLog @@ -0,0 +1,769 @@ +commit 774df869fc1753e94f79c6a0b617b7adb9e4060c +Author: Jeffrey Altman +Date: Sat Feb 10 10:47:24 2018 -0500 + + rx: Do not count RXGEN_OPCODE towards abort threshold + + An RXGEN_OPCODE is returned for opcodes that are not implemented by the + rx service. These opcodes might be deprecated opcodes that are no + longer supported or more recently registered opcodes that have yet to + be implemented. Clients should not be punished for issuing unsupported + calls. The clients might be old and are issuing no longer supported + calls or they might be newer and are issuing yet to be implemented calls + as part of a feature test and fallback strategy. + + This change ignores RXGEN_OPCODE errors when deciding how to adjust the + rx_call.abortCount. When an RXGEN_OPCODE abort is sent the + rx_call.abortCount and rx_call.abortError are left unchanged which + preserves the state for the next failing call. + + Note that this change intentionlly prevents the incrementing of the + abortCount for client connections as they never send delay aborts. + + Reviewed-on: https://gerrit.openafs.org/12906 + Tested-by: BuildBot + Reviewed-by: Benjamin Kaduk + (cherry picked from commit f82d1c7d5aeae148305e867c1f79c6ea2f9e0a2a) + + Change-Id: I7a4216bea3a355c31a390c5b4753b4ab0c25661c + Reviewed-on: https://gerrit.openafs.org/12914 + Tested-by: BuildBot + Reviewed-by: Benjamin Kaduk + +commit cabecc719195047ea321bd62e95d52503d15686e +Author: Benjamin Kaduk +Date: Tue Dec 26 17:42:39 2017 -0600 + + Make OpenAFS 1.8.0pre5 + + Update version strings for the fifth 1.8.0 prerelease. + + Change-Id: I118da0fc55013ccfb2b5cd586cefb1b0c27f10d9 + Reviewed-on: https://gerrit.openafs.org/12910 + Reviewed-by: Stephan Wiesand + Tested-by: BuildBot + Reviewed-by: Benjamin Kaduk + +commit 5f0714312b211c4a6d6157df6f1f3d9e26dcc03f +Author: Michael Meffie +Date: Fri Feb 9 17:59:19 2018 -0500 + + Update NEWS for 1.8.0pre5 + + Change-Id: I09e509694c5f7ad59e279b89bd9e144aca2ec4e7 + Reviewed-on: https://gerrit.openafs.org/12904 + Reviewed-by: Michael Meffie + Reviewed-by: Stephan Wiesand + Tested-by: BuildBot + Reviewed-by: Benjamin Kaduk + +commit 50fcd6763d4387950390b732d2a131c230d44c99 +Author: Marcio Barbosa +Date: Wed Jun 21 16:24:05 2017 -0400 + + ubik: check if epoch is sane before db relabel + + The sync-site relabels its database at the end of the first write + transaction. The new label will be equal to the time at which the + sync-site in question first received its coordinator mandate. This time + is stored by a global called ubik_epochTime. In order to make sure that + the new database label is sane, only relabel the database if + ubik_epochTime is within a specific range. + + Reviewed-on: https://gerrit.openafs.org/12640 + Reviewed-by: Mark Vitale + Reviewed-by: Andrew Deason + Reviewed-by: Benjamin Kaduk + Tested-by: BuildBot + (cherry picked from commit f5c289d00aaf7c5525b477da5b89f6675456c211) + + Change-Id: I78ebd2b8aeae01ef5e3b826ad6f1de5a5c1db79e + Reviewed-on: https://gerrit.openafs.org/12886 + Reviewed-by: Marcio Brito Barbosa + Tested-by: BuildBot + Reviewed-by: Mark Vitale + Reviewed-by: Benjamin Kaduk + +commit 2b3df9b2f48dcbf3690e093000879b0f06c7e176 +Author: Benjamin Kaduk +Date: Sat Dec 9 11:37:59 2017 -0600 + + Replace with + + Our in-tree xdr.h appears to have started life as a concatenation of + rpc/types.h and rpc/xdr.h, and should include all the needed functionality. + Indeed, commit 7293ddf325b149cae60d3abe7199d08f196bd2b9 even indicates + that we expect to be using our in-tree XDR everywhere anyway, so the + system XDR is superfluous. + + Note that afs/sysincludes.h (not afsincludes.h!) already includes + rx/xdr.h ifndef AFS_LINUX22_ENV. + + This change should help systems running glibc 2.26 or newer, which has + stopped providing the Sun RPC headers by default. + + While here remove some duplicate includes of rpc/types.h in the + AIX-specific sources. + + The Solaris NFS translator bits cannot really be changed, since the system + headers are used and have tight interdependencies. + + Update rxgen to not emit rpc/types.h inclusion. + + [mmeffie: squash 12801 to not emit rpc/types.h from rxgen] + + Reviewed-on: https://gerrit.openafs.org/12800 + Tested-by: BuildBot + Reviewed-by: Michael Meffie + Reviewed-by: Benjamin Kaduk + (cherry picked from commit e443a9fb67dbc29e6cc36661a4ac6e91af113f23) + + Change-Id: I351e5c1e1223c49ca76e3d68c264ac1625abae60 + Reviewed-on: https://gerrit.openafs.org/12894 + Tested-by: BuildBot + Reviewed-by: Mark Vitale + Reviewed-by: Benjamin Kaduk + +commit 833e2783a39367f3cebfb79f403a75752f81ab09 +Author: Ian Wienand +Date: Fri Feb 2 10:52:26 2018 +1100 + + Add .gitreview + + git-review [1] makes it much easier to submit changes. Add a default + configuration file. + + [1] https://docs.openstack.org/infra/git-review/usage.html + + Reviewed-on: https://gerrit.openafs.org/12884 + Reviewed-by: Benjamin Kaduk + Tested-by: Benjamin Kaduk + (cherry picked from commit c7c71d2429cf685f3ffad6b2e6d102d900edc197) + + Change-Id: I271cfeb6aea888ae40539e248a18131b0affeda8 + Reviewed-on: https://gerrit.openafs.org/12901 + Tested-by: BuildBot + Reviewed-by: Mark Vitale + Reviewed-by: Benjamin Kaduk + +commit 780ed24d360df6772b2408017a5d555ae36217c0 +Author: Mark Vitale +Date: Tue Jun 30 01:54:21 2015 -0400 + + SOLARIS: Avoid vcache locks when flushing pages for RO vnodes + + We have multiple code paths that hold the following locks at the same + time: + + - avc->lock for a vcache + - The page lock for a page in 'avc' + + In order to avoid deadlocks, we need a consistent ordering for obtaining + these two locks. The code in afs_putpage() currently obtains avc->lock + before the page lock (Obtain*Lock is called before pvn_vplist_dirty). + + The code in afs_getpages() also obtains avc->lock before the page lock, + but it does so in a loop for all requested pages (via pvn_getpages()). + On the second iteration of that loop, it obtains avc->lock, and the page + from the first iteration of the loop is still locked. Thus, it obtains a + page lock before locking avc->lock in some cases. + + Since we have two code paths that obtain those two locks in a different + order, a deadlock can occur. Fixing this properly requires changing at + least one of those code paths, so the locks are taken in a consistent + order. However, doing so is complex and will be done in a separate + future commit. + + For this commit, we can avoid the deadlock for RO volumes by simply + avoiding taking avc->lock in afs_putpages() at all while the pages are + locked. Normally, we lock avc->lock because pvn_vplist_dirty() will call + afs_putapage() for each dirty page (and afs_putapage() requires + avc->lock held). But for RO volumes, we will have no dirty pages + (because RO volumes cannot be written to from a client), and so + afs_putapage() will never be called. + + So to avoid this deadlock issue for RO volumes, avoid taking avc->lock + across the pvn_vplist_dirty() call in afs_putpage(). We now pass a dummy + pageout callback function to pvn_vplist_dirty() instead, which should + never be called, and which panics if it ever is. + + We still need to hold avc->lock a few other times during afs_putpage() + for other minor reasons, but none of these hold page locks at the same + time, so the deadlock issue is still avoided. + + [mmeffie: comments, and fix missing write lock, fix lock releases] + [adeason: revised commit message] + + Reviewed-on: https://gerrit.openafs.org/12247 + Tested-by: BuildBot + Reviewed-by: Andrew Deason + Reviewed-by: Benjamin Kaduk + (cherry picked from commit 5e09a694ec2c0cd20f5dee500eff6bc3dd04c097) + + Change-Id: I5d4e4ddba12c09dc549edeee3cad7de40582ac65 + Reviewed-on: https://gerrit.openafs.org/12900 + Tested-by: BuildBot + Reviewed-by: Mark Vitale + Reviewed-by: Benjamin Kaduk + +commit 5bb7684f07b5f346b68230c2f38edad4c46dc648 +Author: Benjamin Kaduk +Date: Thu Jan 4 22:00:15 2018 -0600 + + rx: remove trailing semicolons from FBSD mutex operations + + Since the first introduction of FreeBSD support, the macros + (MUTEX_ENTER, etc.) for kernel mutex operations have included + trailing semicolons, unique among all the platforms. + + This did not cause problems until the recent work on rx event + handlers, which put a MUTEX_ENTER() in the body of an 'if' clause + with no brackets, and attempted to follow it with an 'else' clause. + This results in the following (rather obtuse) compiler error: + + /root/openafs/src/rx/rx.c:3666:5: error: expected expression + else + ^ + + Which is more visible in the preprocessed source, as + + if (condition) + expression;; + else + other_expression; + + is clearly invalid C. + + To fix the FreeBSD kernel module build, remove the unneeded semicolons. + + Reviewed-on: https://gerrit.openafs.org/12853 + Tested-by: BuildBot + Reviewed-by: Benjamin Kaduk + (cherry picked from commit 0760feb7992e1e39f716c5f583fe7f6e85584262) + + Change-Id: I503a5967a167e9be92721af8dc82d191f3bf18ba + Reviewed-on: https://gerrit.openafs.org/12899 + Tested-by: BuildBot + Reviewed-by: Mark Vitale + Reviewed-by: Benjamin Kaduk + +commit 2f07951a47a8a820c89e4e6ab1e347858acd8ab5 +Author: Benjamin Kaduk +Date: Sat Dec 9 11:44:51 2017 -0600 + + libuafs: remove stale afs_nfsdisp.lo rule + + afs_nfsdisp.lo is not used, so we do not need a build rule for it. + + Reviewed-on: https://gerrit.openafs.org/12802 + Tested-by: BuildBot + Reviewed-by: Michael Meffie + Reviewed-by: Benjamin Kaduk + (cherry picked from commit decb4308d4e18ad9f6f181e3df5f737698dba7ad) + + Change-Id: I53680df1c8648ceb43cc032cada573964622d5b4 + Reviewed-on: https://gerrit.openafs.org/12898 + Tested-by: BuildBot + Reviewed-by: Benjamin Kaduk + +commit 4988628a2e41955951a49ea0032cabe13f9337d3 +Author: Christof Hanke +Date: Mon Dec 18 16:58:39 2017 +0100 + + Avoid gcc warning + + When using the configure option --enable-checking with gcc 7.2.1, + the compilation fails with + + vutil.c:860:20: error: ā€˜%sā€™ directive writing up to 255 bytes into \ + a region of size 63 [-Werror=format-overflow=] + + This can be seen in the logs of the openSUSE Tumbleweed builder + for e.g. build 2368. + Avoid this warning by using snprintf which is provided by libroken + for all platforms. + + Reviewed-on: https://gerrit.openafs.org/12813 + Reviewed-by: Benjamin Kaduk + Tested-by: BuildBot + (cherry picked from commit fd4eaebb60dbefc27be98015fee23a3cf5d9752d) + + Change-Id: I3be14f6f1228fd09f036da7ff4f1505c65e49406 + Reviewed-on: https://gerrit.openafs.org/12897 + Tested-by: BuildBot + Reviewed-by: Benjamin Kaduk + +commit 35636bd9e32015bc10e09ccbb34a71a1459cdc4b +Author: Marcio Barbosa +Date: Mon Aug 21 14:21:54 2017 -0400 + + ubik: avoid DISK_Begin on sites that didn't vote for sync + + As already described on 7c708506, SDISK_Begin fails on remotes if + lastYesState is not set. To fix this problem, 7c708506 does not allow + write transactions until we know that lastYesState is set on at least + quorum (ubik_syncSiteAdvertised == 1). In other words, if enough sites + received a beacon packet informing that a sync-site was elected, write + transactions will be allowed. This means that ubik_syncSiteAdvertised + can be true while lastYesState is not set in a few sites. + + Consider the following scenario in a cell with frequent write + transactions: + + Site A => Sync-site (up) + Site B => Remote 1 (up) + Site C => Remote 2 (down - unreachable) + + Since A and B are up, we have quorum. After the second wave of beacons, + ubik_syncSiteAdvertised will be true and write transactions will be + allowed. At some point, C is not unreachable anymore. Site A sends a + copy of its database to C, but C did not vote for A yet (lastYesState == + 0). A new write transaction is initialized and, since lastYesState is + not set on C, DISK_Begin fails on this remote site and C is marked as + down. Since C is reachable, A will mark this remote site as up. The + sync-site will send its database to C, but C did not vote for A yet. A + new write transaction is initialized and, since lastYesState is not set + on C, DISK_Begin fails on this remote site and C is marked as down. In a + cell with frequent write transactions, this cycle will repeat forever. + As a result, the sync-site will be constantly sending its database to C + and quorum will be operating with less sites, increasing the chances + of re-elections. + + To fix this problem, do not call DISK_Begin on remotes that did not + vote for the sync-site yet. + + Reviewed-on: https://gerrit.openafs.org/12715 + Tested-by: BuildBot + Reviewed-by: Mark Vitale + Reviewed-by: Benjamin Kaduk + (cherry picked from commit 68ec78950a6e39dc1bf15012d4b889728086d0b7) + + Change-Id: I3764c23125f0bc675762449cd29b282ba403f871 + Reviewed-on: https://gerrit.openafs.org/12896 + Tested-by: BuildBot + Reviewed-by: Benjamin Kaduk + +commit 51816cfd047c05921218ecb1161c9dd7986a422f +Author: Michael Meffie +Date: Wed Jan 31 16:52:40 2018 -0500 + + add rfc3961.h to kernel sources + + Export this header to the kernel sources in the libafs_tree, since it is + needed for the kernel module build. + + FIXES 134476 + + Reviewed-on: https://gerrit.openafs.org/12882 + Tested-by: BuildBot + Reviewed-by: Benjamin Kaduk + (cherry picked from commit 073522b3d49467af107d1143cfa015c53347e1e3) + + Change-Id: I4e5c7883a1dd4b66b9252f4e630ca489f05e9ad3 + Reviewed-on: https://gerrit.openafs.org/12890 + Tested-by: BuildBot + Reviewed-by: Benjamin Kaduk + +commit 07811e3b15de8926d63b423804c620bc3501745b +Author: Benjamin Kaduk +Date: Mon Jan 8 22:28:24 2018 -0600 + + Add param.h files for recent FreeBSD + + Add files for FreeBSD 10.4, 11.1, and 12.0 (12-CURRENT), for i386 and amd64. + + Reviewed-on: https://gerrit.openafs.org/12863 + Tested-by: BuildBot + Reviewed-by: Stephan Wiesand + Reviewed-by: Benjamin Kaduk + (cherry picked from commit 88dc4d93f5ef080da8f56fac453f095e6c79d4a0) + + Change-Id: I6ddb0f03e209b0ce9c7ed1168c86a675d7802c23 + Reviewed-on: https://gerrit.openafs.org/12888 + Tested-by: BuildBot + Reviewed-by: Benjamin Kaduk + +commit 0ba9b5559e112005a6f621ebe55f382bcc2aae0d +Author: Benjamin Kaduk +Date: Mon Jan 8 21:27:04 2018 -0600 + + FBSD: catch up to missing sysnames + + Add sysnames for i386 and amd64 10.4, 11.1, and 12.0 (12-CURRENT, at present). + + Reviewed-on: https://gerrit.openafs.org/12862 + Tested-by: BuildBot + Reviewed-by: Stephan Wiesand + Reviewed-by: Benjamin Kaduk + (cherry picked from commit c390f368a5012f866c1b4ce46d6ac6af6cef2fd5) + + Change-Id: I5183c19d446fd0c00bd26c32ca3f7f00a4d12907 + Reviewed-on: https://gerrit.openafs.org/12887 + Tested-by: BuildBot + Reviewed-by: Benjamin Kaduk + +commit 1f10f087264cb39a8354c0baf71eb1fa13071466 +Author: Marcio Barbosa +Date: Mon Aug 21 15:50:14 2017 -0400 + + ubik: update ubik_dbVersion during SDISK_SendFile + + The ubik_dbVersion global represents the sync site's database version + and it is mostly used by the remote sites for sanity checks. Currently, + this global is updated when database changes are made on the sync site + (SDISK_Commit or SDISK_SetVersion), as well as every time we vote "yes" + for the sync-site in a beacon reply. Unfortunately, ubik_dbVersion is + not updated when a copy of the sync site's database is received via + DISK_SendFile, and it won't get updated until our next "yes" vote. + During this window, the current database version will not match + ubik_dbVersion. As a result, any write transaction during this time + frame will fail on the remote site in question. + + To fix this problem, do not wait for the next beacon packet to update + ubik_dbVersion when the sync site's database is received; just update + it when we get the new database. Since no write transactions are + allowed while the db is transferring, ubik_dbVersion can be safely + updated. + + Reviewed-on: https://gerrit.openafs.org/12716 + Tested-by: BuildBot + Reviewed-by: Mark Vitale + Reviewed-by: Andrew Deason + Reviewed-by: Benjamin Kaduk + (cherry picked from commit 50c1d1088d2adcbb37b6a9d23fdd63617b1267be) + + Change-Id: Icbbe9efb9c8dab9ac69237380e824d4a523a53d3 + Reviewed-on: https://gerrit.openafs.org/12885 + Reviewed-by: Marcio Brito Barbosa + Tested-by: BuildBot + Reviewed-by: Benjamin Kaduk + +commit e9419dc895801bda6962f2ac0f5981631a0d95c7 +Author: Andrew Deason +Date: Thu Jan 11 21:27:28 2018 -0600 + + LINUX: Avoid locking inode in check_dentry_race + + Currently, check_dentry_race locks the parent inode in order to ensure + it is not running in parallel with d_splice_alias for the same inode. + (For old Linux kernel versions; see commit b0461f2d: "LINUX: + Workaround d_splice_alias/d_lookup race".) + + However, it is possible to hit this area of code when the parent inode + is already locked. When someone tries to create a file, directory, or + symlink, Linux tries to lookup the dentry for the target path, to see + if it already exists. While looking up the last component of the path, + Linux locks the directory, and if it finds a dentry for the target + name, it calls d_invalidate on it while the parent directory is + locked. + + For a dentry with a NULL inode, we'll then try to lock the parent + inode in check_dentry_race. But since the inode is already locked, we + will deadlock. + + From a user's point of view, the hang can be reproduced by doing + something similar to: + + $ mkdir dir # succeeds + $ rmdir dir + $ ls -l dir + ls: cannot access dir: No such file or directory + $ mkdir dir # hangs + + To avoid this, we can just change which lock we're using to avoid + check_dentry_race/d_splice_alias from running in parallel. Instead of + locking the parent inode, introduce a new global lock (called + dentry_race_sem), and lock that in check_dentry_race and around our + d_splice_alias call. We know that those are the only two users of this + new lock, so this should avoid any such deadlocks. + + This does potentially reduce performance, since all tasks that hit + check_dentry_race or d_splice_alias will take the same global lock. + However, this at least still allows us to make use of negative + dentries, and this entire code path only applies to older Linux + kernels. It could be possible to add a new lock into struct vcache + instead, but using a global lock like this commit does is much + simpler. + + Reviewed-on: https://gerrit.openafs.org/12868 + Tested-by: Benjamin Kaduk + Reviewed-by: Benjamin Kaduk + (cherry picked from commit ef1d4c8d328e9b9affc9864fd084257e9fa08445) + + Change-Id: Ia8e28519fff36baca7dc4061ceef6719a2a738d4 + Reviewed-on: https://gerrit.openafs.org/12881 + Tested-by: BuildBot + Reviewed-by: Benjamin Kaduk + +commit f523c92a74bace287d1139fab77a030b9598ef61 +Author: Caitlyn Marko +Date: Thu Feb 9 09:16:17 2017 -0500 + + SOLARIS: save kernel module function arguments for debugging + + Add the -Wu,-save_args compiler option when building kernel modules + under Solaris 10 and 11 for the amd64 architecture. + + Binaries generated with this option save function arguments on the stack + during function entry for debugging purposes. Up to six integer + arguments are saved on function entry, and are not modified during the + execution of the function. + + [mmeffie: commit message update] + + Reviewed-on: https://gerrit.openafs.org/12798 + Tested-by: BuildBot + Reviewed-by: Benjamin Kaduk + (cherry picked from commit 32d0493a7e4f74f5e5efdfde5eca29ed7d1bf3ec) + + Change-Id: I478ce65da78b86aa3c13e1c615bafd51d0f5d567 + Reviewed-on: https://gerrit.openafs.org/12903 + Tested-by: BuildBot + Reviewed-by: Benjamin Kaduk + +commit 96ce04c78b5f745424165494c9b76d7ce227eeaa +Author: Marcio Barbosa +Date: Mon Feb 5 21:16:17 2018 +0000 + + autoconf: detect ctf-tools and add ctf to libafs + + CTF is a reduced form of debug information similar to DWARF and stab. It + describes types and function prototypes. The principal objective of the + format is to shrink the data size as much as possible so that it could + be included in a production environment. MDB, DTrace, and other tools + use CTF debug information to read and display structures correctly. + + This commit introduces a new configure option called --with-ctf-tools. + This option can be used to specify an alternative path where the tools + can be found. If the path is not provided, the tools will be searched + in a set of default directories (including $PATH). The CTF debugging + information will only be included if the corresponding --enable-debug / + --enable-debug-kernel is specified. + + Note: at the moment, the Solaris kernel module is the only module + benefited by this commit. + + Reviewed-on: https://gerrit.openafs.org/12680 + Tested-by: BuildBot + Reviewed-by: Benjamin Kaduk + (cherry picked from commit 88cb536f99dc58fdbeb9fa6c47c26774241a0cb6) + + Change-Id: I174347370a83b31f68d2631c965e17d72b438cd1 + Reviewed-on: https://gerrit.openafs.org/12902 + Tested-by: BuildBot + Reviewed-by: Benjamin Kaduk + +commit 0247eb0a8c154811f495142276029a617ae0825a +Author: Michael Meffie +Date: Sat Dec 30 17:59:38 2017 -0500 + + autoconf: refactor linux-checks.m4 + + Further refactoring of the autoconf macros. Divy up the linux kernel + checks into smaller files. + + This is a non-functional change. Care has been taken preserve the + ordering of the autoconf tests. Except for whitespace, the generated + configure file has not been changed by this refactoring. This has been + verified with a 'diff -u -w -B' comparison of the generated configure + file before and after applying this commit. + + Reviewed-on: https://gerrit.openafs.org/12844 + Tested-by: BuildBot + Reviewed-by: Benjamin Kaduk + (cherry picked from commit 6a2b85cd4c00a08e165cb96d2cb56bf87c6324bc) + + Change-Id: Iae325bc14fb160f27791b2f3d82198fe671badd8 + Reviewed-on: https://gerrit.openafs.org/12878 + Tested-by: BuildBot + Reviewed-by: Benjamin Kaduk + +commit e05b0b10b942ba3585f6d5d505a282c2de95c243 +Author: Michael Meffie +Date: Sat Dec 30 12:12:59 2017 -0500 + + autoconf: refactor ostype.m4 + + Further refactoring of the autoconf macros. Move more linux and solaris + specific checks into their own files. + + This is a non-functional change. Care has been taken preserve the + ordering of the autoconf tests. Except for whitespace, the generated + configure file has not been changed by this refactoring. This has been + verified with a 'diff -u -w -B' comparison of the generated configure + file before and after applying this commit. + + Reviewed-on: https://gerrit.openafs.org/12843 + Tested-by: BuildBot + Reviewed-by: Benjamin Kaduk + (cherry picked from commit 3c2e39bab7d927aa5f20d02a5e327927a4b2b553) + + Change-Id: I4d91753afd90e4735ab61413e757f6852750a3de + Reviewed-on: https://gerrit.openafs.org/12877 + Tested-by: BuildBot + Reviewed-by: Benjamin Kaduk + +commit e54963757320adb95b0c73bbd84fb8bf34319210 +Author: Michael Meffie +Date: Fri Dec 29 14:24:28 2017 -0500 + + autoconf: refactor acinclude.m4 + + The acinclude.m4 is very large and often requires to be changed for + unrelated commits. Divy up the large acinclude.m4 into a number of + smaller files to avoid so many contentions and to make the autoconf + system easier to maintain. + + This is a non-functional change. Care has been taken preserve the + ordering of the autoconf tests. Except for whitespace, the generated + configure file has not been changed by this refactoring. This has been + verified with a 'diff -u -w -B' comparison of the generated configure + file before and after applying this commit. + + Reviewed-on: https://gerrit.openafs.org/12842 + Tested-by: BuildBot + Reviewed-by: Benjamin Kaduk + (cherry picked from commit c72622a244e561173e86ffe88ee3c9a8c823a76a) + + Change-Id: I9504eaa2430fd35f79b55c3df96c82cc7e58fafd + Reviewed-on: https://gerrit.openafs.org/12876 + Tested-by: BuildBot + Reviewed-by: Benjamin Kaduk + +commit 0798b54b258f48cae8a5b1b3e107a22693d37937 +Author: Michael Meffie +Date: Mon Feb 8 12:12:22 2016 -0500 + + CellServDB update 14 Mar 2017 + + Update all remaining copies of CellServDB in the tree, and make the + Red Hat packaging use it by default too. + + Reviewed-on: https://gerrit.openafs.org/12880 + Tested-by: BuildBot + Reviewed-by: Mark Vitale + Reviewed-by: Benjamin Kaduk + (cherry picked from commit 3ca1352170f87994d42578c5bc75e52c4103bc69) + + Change-Id: I773d35745e14903dd3069a0627932153900e0ba6 + Reviewed-on: https://gerrit.openafs.org/12889 + Tested-by: BuildBot + Reviewed-by: Benjamin Kaduk + +commit 5eb64632fd76bb7e26a90ab08c83132e7ac99e23 +Author: Michael Meffie +Date: Wed Jan 17 17:33:50 2018 -0500 + + redhat: fix conditional for kernel-debuginfo files directive + + Commit 443dd5367e0cd9050ad39a6594c5be521271b4e9 added support for a + separate debuginfo package for the kernel module. Unfortunately, the + %files directive for the kernel module debuginfo package was incorrectly + placed in the %if stanza of the build_userspace condition, so the + rpmbuild fails when attempting to build just the kernel module. + + That is, when running rpmbuild with the options: + + rpmbuild --define "build_userspace 0" --define "build_modules 1" ... + + rpmbuild fails with: + + RPM build errors: + Installed (but unpackaged) file(s) found: + /usr/lib/debug/lib/modules/.../extra/openafs/openafs.ko.debug + + Fix this by moving the new %files directive out of the build_userspace + conditional. + + Reviewed-on: https://gerrit.openafs.org/12874 + Reviewed-by: Benjamin Kaduk + Tested-by: Benjamin Kaduk + (cherry picked from commit f599e1ce6354c42a9c0c8f7205ba8a03c35ea72b) + + Change-Id: I07e25d3dd43b2cd7056cefb8f0f5c10f78347b85 + Reviewed-on: https://gerrit.openafs.org/12875 + Tested-by: BuildBot + Reviewed-by: Benjamin Kaduk + +commit 781624f7f4290a1f44a0f48a04d780e10dd5b3e1 +Author: Michael Meffie +Date: Fri Jul 21 22:30:43 2017 -0400 + + redhat: avoid rpmbuild exclude directives + + Older versions of rpmbuild do not support the files exclude directive, + so fall back to the old way in which we remove the files to be excluded + and list the files to be included. + + Reviewed-on: https://gerrit.openafs.org/12733 + Tested-by: BuildBot + Reviewed-by: Benjamin Kaduk + (cherry picked from commit a71288a387095ccb4be83c1abae34ada80f53185) + + Change-Id: I01c20bc21ec6143be76458c311d826023c370d51 + Reviewed-on: https://gerrit.openafs.org/12873 + Tested-by: BuildBot + Reviewed-by: Benjamin Kaduk + +commit 9d62e1d5c6e9e888a029a0b6080c27c0b4353ba2 +Author: Michael Meffie +Date: Fri Jul 21 22:16:44 2017 -0400 + + redhat: move .krb variants to the kauth-client subpackage + + Move the deprecated klog.krb, pagsh.krb, and tokens.krb programs and man + pages to the optional openafs-kauth-client subpackage. + + Reviewed-on: https://gerrit.openafs.org/12732 + Tested-by: BuildBot + Reviewed-by: Benjamin Kaduk + (cherry picked from commit 4d247e1ae446c512031511273d556ef1fd32dca1) + + Change-Id: I3c6164022b07f0c3283cb54ffd26e1f9c3dd67bb + Reviewed-on: https://gerrit.openafs.org/12872 + Tested-by: BuildBot + Reviewed-by: Benjamin Kaduk + +commit ea1bf1bd751d391d49bdb33e2e3f2cc79fe8ccde +Author: Michael Meffie +Date: Thu Jul 20 04:13:04 2017 -0400 + + redhat: specify man pages without wildcards + + Currently, some of the man pages are specified with the full name and + some are specified with a wildcard for the filename extension. Instead, + specify all the man pages without a wildcards to be more consistent and + to avoid putting incorrect man pages in packages. + + This change removes a stray copy the klog.krb5.1 man page from + openafs-kauth-client subpackage and moves the AuthLog/AuthLog.dir man + pages to the optional openafs-kauth-server subpackage. + + Reviewed-on: https://gerrit.openafs.org/12731 + Tested-by: BuildBot + Reviewed-by: Benjamin Kaduk + (cherry picked from commit 671db4ca5a76625d9b7133510cc1cbdda8a5d9b9) + + Change-Id: I9d10cc7aad94a2dc004526acb426a9b9badc8e3c + Reviewed-on: https://gerrit.openafs.org/12871 + Tested-by: BuildBot + Reviewed-by: Benjamin Kaduk + +commit f56ea0e095f4837a65762f5a8fbc6b5c9d58a394 +Author: Michael Meffie +Date: Fri Jul 21 18:05:48 2017 -0400 + + redhat: remove afsd.fuse man page + + The afsd.fuse binary is not currently packaged; do not package the man + page. + + Reviewed-on: https://gerrit.openafs.org/12730 + Tested-by: BuildBot + Reviewed-by: Benjamin Kaduk + (cherry picked from commit a9810b829bdccfed4d1718b11cf4dd51f9565e00) + + Change-Id: I7c829a492e999cc989e9341e94f56d6669722a4c + Reviewed-on: https://gerrit.openafs.org/12870 + Tested-by: BuildBot + Reviewed-by: Benjamin Kaduk diff --git a/README.SUSE.openafs b/README.SUSE.openafs new file mode 100644 index 0000000..7a9e58b --- /dev/null +++ b/README.SUSE.openafs @@ -0,0 +1,109 @@ +Here is described installation of openafs server and client on SUSE linux. + +This text is based on AFS Quick Start Guide. The differences are: + - paths are adapted to SUSE installation + - uses Kerberos 5 authentization + +Complete OpenAFS documentation is at http://openafs.org + +SERVER SETUP +============ + +# choose an AFS cell name and a Kerberos realm name, the simplest setup is: +# - AFS cell name equal to DNS domain name +# - Kerberos realm name equal to uppercase AFS cell name + +# create a partition for AFS filesystem and mount it under /vicepa + +# start bosserver +/usr/sbin/bosserver -noauth & + +# setup basic cell information +bos setcellname your.afs.server your.cell.name -noauth + +# setup database servers processes +bos create your.afs.server ptserver simple /usr/lib/openafs/ptserver -cell your.cell.name -noauth +bos create your.afs.server buserver simple /usr/lib/openafs/buserver -cell your.cell.name -noauth +bos create your.afs.server vlserver simple /usr/lib/openafs/vlserver -cell your.cell.name -noauth + +# If you want to use the old afs authentization (not recommended): +# bos addkey your.afs.server -kvno 0 -cell your.cell.name -noauth + +# Authentication against heimdal krb5 server + +# Here you can set up kerberos realm if you dont have any, +# see documentation in package krb5-doc + +# restart kdc +rckrb5kdc restart +rckrb524d restart + +# create afs principal in kerberos database +kadmin.local + add_principal afs@YOUR.KERBEROS.REALM # create afs key, use random password + ktremove -k /etc/krb5.keytab afs all # delete old afs key if any + + # export the afs key to external keytab + # note the key version number (kvno), you will need it later for asetkey + ktadd -e des-cbc-crc:v4 afs@YOUR.KERBEROS.REALM + + add_principal admin@YOUR.KERBEROS.REALM # create admin principal + + quit # end kadmin.local + +rm /etc/openafs/server/KeyFile # delete the old afs key file if any + +# convert the afs key from /etc/krb5.keytab to /etc/openafs/server/KeyFile +# use displayed by ktadd +asetkey add /etc/krb5.keytab afs + +# give admin the permissions to control bosserver +bos adduser your.afs.server admin -cell your.cell.name -noauth + +# add admin to group system:administrators +pts createuser -name admin -id -cell your.cell.name -noauth +pts adduser admin system:administrators -cell your.cell.name -noauth + +# restart bos server +bos restart your.afs.server -all -cell your.cell.name -noauth + +# create fileserver processes +bos create your.afs.server fs fs /usr/lib/openafs/fileserver /usr/lib/openafs/volserver /usr/lib/openafs/salvager -cell your.cell.name -noauth + +# create root volume +vos create your.afs.server /vicepa root.afs -cell your.cell.name -noauth + +# restart bosserver with security enabled +rcopenafs-fileserver restart + + +CLIENT SETUP +============ + +IMPORTANT: Unfortunately, openafs client for linux kernel 2.6 has not reached +stable state yet. There may be problems. + +edit /etc/sysconfig/openafs-client, set at least + REGENERATE_CELL_INFO="yes" + THIS_CELL="your.cell.name" + THIS_CELL_SERVER="your.afs.server" + + If you are configuring first afs server and the volume root.cell does not + exist yet, you have to set also DYNROOT=no. After finishing the server + installaton it is better to change DYNROOT back to 'yes' as the client + behaves better on startup with network outage. + +# start afs client +rcopenafs-client start + +# login as admin +kinit admin +aklog -d # convert Kerberos 5 ticket to AFS token + +To enable transparent login via pam, install package pam_krb5 +and add 'call_modules=krb5afs' to /etc/security/pam_unix2.conf +For details look at pam_krb5afs(5), pam_krb5afs(8) and pam_unix2(8) manpages. + +Now you have working afs server and client. You can continue with chapter +"Configuring the Top Levels of the AFS Filespace" of AFS Quick Start Guide. + diff --git a/RELNOTES-1.8.0~pre5 b/RELNOTES-1.8.0~pre5 new file mode 100644 index 0000000..f237189 --- /dev/null +++ b/RELNOTES-1.8.0~pre5 @@ -0,0 +1,466 @@ + User-Visible OpenAFS Changes + +OpenAFS 1.8.0pre5 + + All Platforms + + * Substantial code quality improvements, largely spotted by Coverity and + clang's static analysis. + - Add new library for platform independent functions (opr). + - Remove arbitrary path name length limits. + - Convert to Heimdal's roken library for reliability. + - Avoid garbage in allocated buffers (calloc). + - Modernize signal handling in pthreaded server processes (softsig). + - Improve code comments and additional Doxygen style comments. + - Reduce compiler warnings, dead code, unused variables, and + undefined behavior. + - Fix bugs found by static code analyzer (clang-analyzer). + - Improved unit test coverage. + - Make VLDB flag definitions consistent. + - Improve use of run-time assertions and add static assertions. + - Add compiler attributes to assist static analyzers. + - Clean up include headers in the entire tree. + - Improve command-line handling library (libcmd). + - Replace hash functions with Jenkin's hash function for faster + and more evenly distributed lookups. + - Provide a red-black tree data structure to enable algorithmic speedups. + - Convert backup and salvage servers to the common logging API (libutil). + - Improve volume id data type consistency (VolumeId). + - Import APIs for kerberos-style profile configuration support. + - Add new APIs to support UserList identities. + - Add new APIs to support tabular output from command-line utilities. + - Convert vnode macros to inline-functions. + + * Improved support for non-DES encryption types: + - Convert to Heimdal's hcrypto library to support RFC 3961. + - Add extended key file format replacing rxkad.keytab, and + new key management APIs. + - Add support for extended key types to asetkey. + - Add akeyconvert to assist in upgrading to OpenAFS 1.8.x by converting an + existing rxkad.keytab file to an extended key file. + - Do not install the kaserver and related utilities by default to + discourage the use of these DES-dependent components. + - Remove obsolete klogin and klogin.krb programs. + - Add new token APIs to support new rx security classes. + + * Migrate from LWP to POSIX threads (pthreads): + - Convert the ptserver and vlserver from LWP to pthreads. + - Remove LWP version of the file server binary. + - Convert afsd, aklog, asetkey, klog.krb5, pts, udebug, and vos, from LWP + to pthreads. + + * Improvements to Rx: + - Restructure the Rx API to privatize the implementation. + - Convert rx events to a red-black tree data structure to improve + performance. + - Convert from mutexes to atomic operations for counters to reduce lock + contention. + - Provide per-opcode Rx statistics. + - Add an rx_opaque data type to support non-DES encryption types + and general code cleanup. + - Wake up the application thread after 'twind' is updated to avoid 100ms + transmit delays when the receive window transitions from closed to + open. + - Fix for OPENAFS-SA-2017-001: sanity-check peer transport parmeters + received in ack trailers + + * Libraries (both internal and installed) are built using libtool, including + libuafs. The resulting shared libraries for libafsrpc and libafsauthent + should be more usable than previously. + + * Improvements to the build system: + - Convert to libtool to build shared libraries. + - Clean up and improve the build system. + - Support out of tree builds. + - Add a makefile target to generate Doxygen source code documentation. + - Link the Java API for OpenAFS with libuafs.a and remove the + libjuafs.a library. + - Always build the rxperf tool. + - Fix man-page generation by make after ./regen.sh -q + - Support the SOURCE_DATE_EPOCH environment variable to improve build + reproducibility. + - Modernize language specific SWIG typemaps for libuafs Perl bindings. + - Refactor acinclude.m4 into a set of smaller m4 files (12876, 12877, 12878) + + * Improvements to documentation: + - Document the new KeyFileExt file. + - Reorganized the README files. + - Improvements and fixes to documentation generation. + - Add experimental epub and mobi support + - Remove obsolete LWP information from the file server documentation. + - Update and reorganize the Quick Start Guide. + - Update the Admin Guide. + - Remove AIX, HP-UX, and IRIX information from the Quick Start Guide. + - Document the vldb and prdb (ubik) file formats. + - Add PtLog man page. + - Corrections and clarifications to man pages. + - Add ubik threading analysis doc. + - Normalize the location of text documents in the source tree. + + * Improvements for troublshooting, debugging, and testing: + - Log more details on volume-server-to-fileserver communication errors + when possible. + - Set thread names in pthreaded servers on platforms which support + thread names. + - Add dynroot lock tracking to cmdebug + - Fix tracking of an fstrace call site in the cache manager background + process. + - Add the afsload tool to simulate multiple cache managers for file server + load testing. + - Add run-time checks for refcount imbalances in the cache manager. + - Fix missing newlines in afsd -debug output. + + * Developer tool improvements: + - Improvements and fixes for rxgen (used to generate Rx RPC bindings). + - Add tool for man page verification of command options. + - Add tool to find Unix cache manager lock identification numbers. + - Add an option for pretty build output. + + * RPM packaging updates: + - Update the spec file to keep up with accumulated changes. + - Move the klog.krb5 man page to the openafs-krb5 sub-package. + - Remove stray man pages. (12870, 12871) + - Prevent double-starting client on RHEL7 + - Convert rpm spec file from deprecated 'make dest' to 'make install'. + - Fix rpmbuild command line option default handling. + - Support older versions of rpmbuild which do not support the + rpmbuild %exclude directive. (12873) + - Move the legacy kaserver and related programs to separate sub-packages, + which are only built when rpmbuild is given the '--with kauth' option + (12600, 12872) + + * Add a new protection error code (PRNAMETOOLONG) instead of silently + truncating names which exceed the maximum name length (PR_MAXNAMELEN). + + * Add an implementation limit (50000) on the number of names/ids which can + be transmitted by unauthenticated clients to the ptserver, avoiding + excessive resource consumption from unauthenticated requests. + + * Add the -config option to vos, pts, and aklog to specify the path to the + cell configuration files. + + * Add more details in vos release -verbose output. + + * Add the cacheout -encrypt option to encrypt communication between the + cacheout client and the fileserver. + + * Add the command line options to the afsio program to enable encryption of + traffic between afsio and the fileserver (-clear, -crypt). + + * Add the vos release -force-reclone option to force recloning the volume to + be released without forcing a full volume dump being transmitted to all + remote sites. + + * Fix vos to avoid writing loopback addresses into the VLDB in + certain cases. + + * Print bos and pts error messages to standard error instead of + standard out. + + * Improve formatting of the -help output of all commands. + + * Change -n to -dryrun in all backup subcommands. + + * Change the backup deletedump -port command line option to -portoffset. + + * Add user and build host in the version string returned by + rxdebug -version. + + * Support recent versions of gcc (7.2.1) (12897) + + All Server Platforms + + * Ubik servers using pthreads are now available and are used by default + + * As part of improving Ubik reliability in certain edge cases, an extra + election cycle (about 60 seconds) may be needed before writes are + permitted. This is a conservative change that may be removed in + the future. + + * Avoid continually retransmitting the ubik database to remote sites when + a write transaction occurs as remote sites are attempting to rejoin the + ubik cluster. (12896) + + * Ensure the ubik database version number is updated on remote sites at the + point the database is transferred to remote sites instead of waiting for + the next ubik beacon. This avoids write transaction failures during the + window between the database transfer and the next ubik beacon (12885). + + * Remove periodic background fsync by the fileserver (ihandle fsync thread). + + * Fix potential file handle leak in the file server ihandle caching layer. + + * Disable the so-called "hot threads" feature in the file server. The hot + threads feature was intended as an optimization for dispatching incoming + calls to the current listener thread, but has been reported to incur a + performance penalty on modern multi-core systems. + + * Do not permit creation of users with id of ANONYMOUSID. + + * Do not save/restore host states in the fsstate.dat file for hosts which + are in the process of retrieving CPS information from the ptserver when + the fileserver is being shutdown. This fixes a bug in which the fileserver + will incorrectly block all threads following a restart. + + * Add the ptserver -restrict_anonymous option to inhibit exposure of user + names from the ptserver. + + * Do not truncate server log files by default when server processes + are started. The -transarc-logs option provides backward compatibility + with IBM AFS log handling on server startup. Log messages may be lost + in back-to- back restarts when a server is running in this mode. + + * Reopen server logs on SIGUSR1. This may be used by third-party log + rotation tools, such as logrotate, to reopen the log file handles after + log files have been renamed. + + * Fix various bugs when logging with -mrafslogs enabled. + + * Dynamically reload the kerberos realm to AFS cell mapping (krb.conf) and + exclusions for mapping kerberos principals to AFS identities (krb.excl) + configuration when the CellServDB cell configuration file is touched. + Previously, a restart of the file server was required after updating the + kerberos mapping configuration files. + + * Add a command line option (-restricted_query) to the vlserver and + volserver to restrict information queries about volumes to a specific + group of users. + + * Add a command line option to the server programs to specify an alternate + fully qualified log file name (-logfile). + + * Add a command line option (-config) to the server programs to specify + an alternate path to the server configuration. + + * Add a command line option to the ptserver and vlserver to specify an + alternate path to the database data files. + + * Add a command line option to the volume server to enable encryption of + volume-server-to-volume-server-traffic (-s2scrypt). + + * Increase the maximum number of LWP threads allowed for the ptserver and + vlserver from 16 to 64 (-lwp). + + * Remove an unused file server command line option (-k). + + * Fix an incorrect assertion in Demand Attach File Server which could cause + the file server process to abort in certain rare conditions. + + * Deprecate the -bitmap-later configure option for non-Demand-Attach File + Servers (DAFS). + + * Add -vhashsize support to non-Demand-Attach File Servers (DAFS). + + * Add support for subnet ranges in the NetInfo and NetRestrict + configuration files. + + * Add the GetXStats RPC to the audit log. + + * Fix directory creation by bosserver when built for non-Transarc paths. + + * Fix incomplete list of server addresses retreived by vos listaddr when the + vldb contains unreferenced multi-homed server entries. + + * Remove obsolete bos blockscanner and unblockscanner commands that + were only needed for the removed MR-AFS functionality. + + * Remove obsolete bos salvage options that were only used by the + removed MR-AFS functionality.. + + * Remove calls to the deprecated sbrk() function. + + * Add an experimental feature to database servers to support ubik reads + while write transactions are in progress, enabled at build time with the + --enable-ubik-read-while-write configure option. This feature is not + considered ready for production usage at this time. + + * Avoid filling the FileLog with "Volume x offline: not in service" when + a volume is administratively taken offline with vos offline. + + * Print an error message when bosserver is started with an unknown + command line option. + + * Modify the volume updateDate when the volume is changed by a salvage. + + * Volume usage statistics are now preserved during reclone and restore + operations by default, the behavior previously enabled by + the -preserve-vol-stats flag to the volserver. The historical behavior + can be retained via the -clear-vol-stats argument. + + All Client Platforms + + * Use rxkad_crypt by default for connections to fileservers. This matches + the existing behavior of the Windows client and has been applied by + the distribution packaging on many platforms already. + + * Add support for relative ACL changes with fs setacl. If a single plus (+) + or minus (-) character is appended to the rights' letters argument, the + new rights are computed relatively to the existing ones. + + * Remove afsd -settime and afsd -nosettime support. + + * Add the afsd -inumcalc option to specify the method used to calculate + inode numbers presented by AFS. + + * Add the afsd -volume-ttl option to specify set the maximum amount of time + information retrieved from the vlserver will be cached, regardless of + callback expiry times. + + * Return EIO on internal errors instead of the misleading ENOENT. + + * Log ICMP errors received, if any, for unreachable servers. + + * Improve performance of clients with multiple PAGs for different cells. + + * Fix race condition between changing and using user tokens among cache + manager threads. + + * Fix fs sysname for users with UID 2748 and 2750 when not running + in -rmtsys mode. + + * Add Perl bindings for the user-space cache manager library (libuafs). + + * Fixes to the bypasscache feature. + + * Fix fs getcacheparms miscounts. + + * Remove the obsolete Netscape plugin. + + * Fix building gtx when ncurses is linked against libtinfo. + + * Update to the GCO CellServDB update from 14 March 2017. + + Linux + + * Remove Linux 2.2 and 2.4 support. + + * Changes to avoid EIO errors with multiple processes doing intensive mmap + writing. (Drop PageReclaim AOP_WRITEPAGE_ACTIVATE.) + + * Prevent fakestat data inconsistencies in certain cases (131855). + + * Fix dentry leak which can cause a crash on shutdown. + + * Fix improper use of ENOENT and avoid incorrect use of linux negative + dentry cache. + + * Use a more correct (less aggressive) scheme to react to downward + pressure on cache usage, avoiding d_invalidate(), which can cause + getcwd() failures on RHEL 7.4. + + * Improve error reporting when encountering corrupt directories. + + * Improve rx error handling in the Linux cache manager. + + * Rename kpasswd to kapasswd when packaging RPMs to avoid colliding with + Kerberos kpasswd. + + * Do not use the obsolete --enable-largefile-fileservers configure option + when packaging RPMs. + + * In Red Hat packaging, use a separate rpm for kmod debuginfo, + removing a needless tight version dependency on the userspace package. + (12822, 12875) + + * Use the RemainAfterExit systemd feature to avoid premature exit + when -afsdb is not given, for RPM packages. + + * Remove Debian packaging files from the OpenAFS source tree. Debian + packaging files are currently maintained in the downstream Debian + infrastructure. + + * Add the sparc_linux26 sysname. + + * Desupport 32-bit Linux kernels on s390/s390x. + + * Fix Debian/Ubuntu build regression on kernel 3.16.39. + + * Fix --enable-kernel-debug for linux 4.8+. + + * Fix a hang encountered when accessing a previously removed + directory entry (12811). + + * Support linux 4.10, 4.11, 4.12, 4.13, 4.14, 4.15 + + Solaris + + * Remove support for all Solaris and SunOS platforms prior to Solaris 8. + + * Build 64-bit binaries for Solaris x86 by default. + + * Use one-group PAGs on Solaris 11, which is required for PAG support + on Solaris 11 since supplemental groups must be sorted starting with + Solaris 11.1. + + * Update search paths for solaris cc for recent versions Solaris Studio. + + * Modernize declaration of module dependences by converting from the + deprecated _depends_on symbol to ELF dependencies. + + * Avoid BAD TRAP panic due to invalid opcodes on x86 with Studio 12.5. + + * Add ctf debug records to Solaris kernel modules when debug builds + are enabled and the ctf tools are present (ctfconvert/ctfmerge). + + * Save kernel module function arguments on x86 for debugging purposes. + + MacOS + + * Stop processing upcalls once rx shutdown starts. + + * Enable atomics for the darwin kernel. + + * Add a syscall to enable/disable bulkstat at run-time, which is + disabled by default. + + * Fix path to binaries in the prefpane. + + * Fix builds on MacOS 10.12 by building only the active architecture + by default. + + * Support versions up through 10.13 (High Sierra) and APFS + + FreeBSD + + * Use the native kernel module build system instead of an ad hoc + replacement build system. + + * Remove FreeBSD packaging files from the OpenAFS source tree. FreeBSD + packaging files are currently maintained in the downstream FreeBSD Ports + Collection. + + * Stay up to date with new FreeBSD releases (through 10.3). + + * Do not claim AFS_VM_RDWR_ENV + + * Add sysnames and files for i386 and amd64 10.4, 11.1, and 12.0 + (12-CURRENT, at present). (12887, 12888) + + * Remove trailing semicolons to fix the build on FreeBSD (12899) + + NetBSD + + * Stay up to date with new NetBSD releases (through 7.x) + + * Update to use cprng(9) as the randomness source on NetBSD 6.99/7.x. + + * Build system updates for NetBDS 6.99.x + + * Do not claim AFS_VM_RDWR_ENV + + OpenBSD + + * Stay up to date with new OpenBSD releases (through 4.7) + + * Do not claim AFS_VM_RDWR_ENV + + AIX + + * Updates for AIX support. + + * Fix build system for AIX exports. + + * Add the uidpag and localuid runtime options to the aklog LAM plugin. + (These runtime options override the use of UID-based PAGs, which were + introduced to appease the CDE screensaver.) + diff --git a/kernel-source.build-modules.sh b/kernel-source.build-modules.sh new file mode 100644 index 0000000..1ff1ee9 --- /dev/null +++ b/kernel-source.build-modules.sh @@ -0,0 +1,55 @@ +#!/bin/sh + +if [ $# != 1 ]; then + echo building a openafs-kernel module for the running kernel + echo Need one of: build build_debug install + exit 1 +fi + +LOGFILE=libafs_tree/build.log +kernel_flavour=`uname -r | awk -F- '{print $NF}'` +kernel_version=`uname -r | sed "s/-$kernel_flavour//"` +arch=`uname -m` + +suse_flavour=`cat /etc/SuSE-release | head -1 | awk '{print $1}' ` +suse_version=`cat /etc/SuSE-release | grep VERSION | awk '{print $NF}' ` + +echo This SuSE is version \"$suse_version\" of flavour \"$suse_flavour\" +echo you are running the kernel \"$kernel_version\" of flavour \"$kernel_flavour\" on \"$arch\" +echo all output is saved into $LOGFILE + +if [ $1 == "build_debug" ]; then + DEBUG_OPT="--enable-debug-kernel" +fi + +if [ $1 == "build" -o $1 == "build_debug" ]; then + cd libafs_tree + echo calling configure... + ./configure --with-linux-kernel-headers=/usr/src/linux/ --with-linux-kernel-build=/usr/src/linux-obj/$arch/$kernel_flavour $DEBUG_OPT > build.log 2>&1 + if [ $? != 0 ]; then + echo configure failed! See $LOGFILE for details + exit $? + fi + echo calling make + make >> build.log 2>&1 + if [ $? != 0 ]; then + echo make failed! See $LOGFILE for details + exit $? + fi + echo + echo build sucessfull! + echo Now run $0 install to install the kernel-modules + exit 0 +fi + + +if [ $1 == "install" ]; then + module_files="afspag.ko libafs.ko" + build_dir=libafs_tree/src/libafs/MODLOAD-$kernel_version-$kernel_flavour-MP/ + install_dir=/lib/modules/$kernel_version-$kernel_flavour + echo installing kernel-modules into + for mod in $module_files; do + cp -v $build_dir/$mod $install_dir/$mod + done + /sbin/depmod -a +fi diff --git a/ld.conf.openafs b/ld.conf.openafs new file mode 100644 index 0000000..fea5b7c --- /dev/null +++ b/ld.conf.openafs @@ -0,0 +1 @@ +/usr/lib64/openafs diff --git a/logrotate.openafs-server b/logrotate.openafs-server new file mode 100644 index 0000000..cdae1f0 --- /dev/null +++ b/logrotate.openafs-server @@ -0,0 +1,11 @@ +/var/log/openafs/*Log { + daily + compress + dateext + rotate 7 + olddir /var/log/openafs/old + missingok + notifempty + create 640 root root + copytruncate +} diff --git a/openafs-1.8.0~pre5-doc.tar.bz2 b/openafs-1.8.0~pre5-doc.tar.bz2 new file mode 100644 index 0000000..573fc76 --- /dev/null +++ b/openafs-1.8.0~pre5-doc.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8755289dc2772c2d75c81960128fd4ad9ae297f6efd5b1cc4360e7fddcc70154 +size 3802039 diff --git a/openafs-1.8.0~pre5-doc.tar.bz2.md5 b/openafs-1.8.0~pre5-doc.tar.bz2.md5 new file mode 100644 index 0000000..ce5ab86 --- /dev/null +++ b/openafs-1.8.0~pre5-doc.tar.bz2.md5 @@ -0,0 +1 @@ +b745f553867efce8788ecb41602f929a /home/kaduk/openafs/candidate/1.8.0pre5/openafs-1.8.0pre5-doc.tar.bz2 diff --git a/openafs-1.8.0~pre5-doc.tar.bz2.sha256 b/openafs-1.8.0~pre5-doc.tar.bz2.sha256 new file mode 100644 index 0000000..cdc6698 --- /dev/null +++ b/openafs-1.8.0~pre5-doc.tar.bz2.sha256 @@ -0,0 +1 @@ +8755289dc2772c2d75c81960128fd4ad9ae297f6efd5b1cc4360e7fddcc70154 openafs-1.8.0pre5-doc.tar.bz2 diff --git a/openafs-1.8.0~pre5-src.tar.bz2 b/openafs-1.8.0~pre5-src.tar.bz2 new file mode 100644 index 0000000..aa07cb4 --- /dev/null +++ b/openafs-1.8.0~pre5-src.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:371e44656152bb03018bd08d16ca4e07644f9414915d78a85e0e391b7f3e27b3 +size 15106627 diff --git a/openafs-1.8.0~pre5-src.tar.bz2.md5 b/openafs-1.8.0~pre5-src.tar.bz2.md5 new file mode 100644 index 0000000..c5e71df --- /dev/null +++ b/openafs-1.8.0~pre5-src.tar.bz2.md5 @@ -0,0 +1 @@ +bb23eaadefe7811277065f26dadf2c4b /home/kaduk/openafs/candidate/1.8.0pre5/openafs-1.8.0pre5-src.tar.bz2 diff --git a/openafs-1.8.0~pre5-src.tar.bz2.sha256 b/openafs-1.8.0~pre5-src.tar.bz2.sha256 new file mode 100644 index 0000000..adc8d30 --- /dev/null +++ b/openafs-1.8.0~pre5-src.tar.bz2.sha256 @@ -0,0 +1 @@ +371e44656152bb03018bd08d16ca4e07644f9414915d78a85e0e391b7f3e27b3 openafs-1.8.0pre5-src.tar.bz2 diff --git a/openafs-1.8.x.heimdal.patch b/openafs-1.8.x.heimdal.patch new file mode 100644 index 0000000..4b8eff0 --- /dev/null +++ b/openafs-1.8.x.heimdal.patch @@ -0,0 +1,11 @@ +--- a/src/rxkad/asn1_err.h.orig 2011-05-14 09:49:51.000000000 +0000 ++++ a/src/rxkad/asn1_err.h 2011-05-14 09:53:49.000000000 +0000 +@@ -6,7 +6,7 @@ + + struct et_list; + +-void initialize_asn1_error_table_r(struct et_list **); ++extern void initialize_asn1_error_table_r(void); + + void initialize_asn1_error_table(void); + #define init_asn1_err_tbl initialize_asn1_error_table diff --git a/openafs-1.8.x.ncurses6.patch b/openafs-1.8.x.ncurses6.patch new file mode 100644 index 0000000..949040d --- /dev/null +++ b/openafs-1.8.x.ncurses6.patch @@ -0,0 +1,13 @@ +--- a/src/cf/curses.m4.orig 2018-01-07 08:17:41.815732371 +0100 ++++ b/src/cf/curses.m4 2018-01-07 08:23:50.585670554 +0100 +@@ -19,7 +19,9 @@ + AC_CHECK_LIB([ncurses], [initscr], + [AC_CHECK_LIB([ncurses], [LINES], [openafs_cv_curses_lib=-lncurses], + [AC_CHECK_LIB([tinfo], [LINES], +- [openafs_cv_curses_lib="-lncurses -ltinfo"])])]) ++ [openafs_cv_curses_lib="-lncurses -ltinfo"], ++ [AC_CHECK_LIB([ncurses], [_nc_LINES], [openafs_cv_curses_lib=-lncurses], ++ [AC_CHECK_LIB([tinfo], [_nc_LINES], [openafs_cv_curses_lib="-lncurses -ltinfo"])])])])]) + AS_IF([test "x$openafs_cv_curses_lib" = x], + [AC_CHECK_LIB([Hcurses], [initscr], [openafs_cv_curses_lib=-lHcurses])]) + AS_IF([test "x$openafs_cv_curses_lib" = x], diff --git a/openafs-client.service b/openafs-client.service new file mode 100644 index 0000000..56c4200 --- /dev/null +++ b/openafs-client.service @@ -0,0 +1,20 @@ +[Unit] +Description=OpenAFS Client +Wants=network-online.target +After=syslog.target network-online.target +Before=remote-fs.target + +[Service] +Type=forking +RemainAfterExit=true +EnvironmentFile=/etc/sysconfig/openafs-client +ExecStartPre=/sbin/modprobe libafs +ExecStart=/usr/sbin/afsd $AFSD_ARGS +ExecStartPost=/usr/bin/fs sysname $SYSNAME +ExecStop=/bin/umount /afs +ExecStop=/usr/sbin/afsd -shutdown +ExecStop=/sbin/rmmod libafs +KillMode=none + +[Install] +WantedBy=multi-user.target remote-fs.target diff --git a/openafs-fuse-client.service b/openafs-fuse-client.service new file mode 100644 index 0000000..0d88b4d --- /dev/null +++ b/openafs-fuse-client.service @@ -0,0 +1,20 @@ +[Unit] +Description=OpenAFS Client Service +Wants=network-online.target +After=syslog.target network-online.target +Before=remote-fs.target + +[Service] +Type=forking +RemainAfterExit=true +EnvironmentFile=/etc/sysconfig/openafs-client +ExecStartPre=/bin/chmod 0644 /etc/openafs/CellServDB +ExecStartPre=/sbin/modprobe libafs +ExecStart=/usr/sbin/afsd $AFSD_ARGS +ExecStop=/bin/umount /afs +ExecStop=/etc/openafs/afsd -shutdown +ExecStop=/sbin/rmmod libafs +KillMode=none + +[Install] +WantedBy=multi-user.target remote-fs.target diff --git a/openafs-server.service b/openafs-server.service new file mode 100644 index 0000000..c33728f --- /dev/null +++ b/openafs-server.service @@ -0,0 +1,11 @@ +[Unit] +Description=OpenAFS Server +After=syslog.target network.target + +[Service] +EnvironmentFile=-/etc/sysconfig/openafs-server +ExecStart=/usr/sbin/bosserver -nofork $BOSSERVER_ARGS +ExecStop=/usr/sbin/bos shutdown localhost -wait -localauth + +[Install] +WantedBy=multi-user.target diff --git a/openafs.CellAlias b/openafs.CellAlias new file mode 100644 index 0000000..83d3c83 --- /dev/null +++ b/openafs.CellAlias @@ -0,0 +1 @@ +openafs.org openafs diff --git a/openafs.SuidCells b/openafs.SuidCells new file mode 100644 index 0000000..473a0f4 diff --git a/openafs.ThisCell b/openafs.ThisCell new file mode 100644 index 0000000..c87b55d --- /dev/null +++ b/openafs.ThisCell @@ -0,0 +1 @@ +openafs.org diff --git a/openafs.cacheinfo b/openafs.cacheinfo new file mode 100644 index 0000000..374bb61 --- /dev/null +++ b/openafs.cacheinfo @@ -0,0 +1 @@ +/afs:/var/cache/openafs:102400 diff --git a/openafs.changes b/openafs.changes new file mode 100644 index 0000000..3109dd4 --- /dev/null +++ b/openafs.changes @@ -0,0 +1,430 @@ +------------------------------------------------------------------- +Tue Mar 6 10:03:44 UTC 2018 - christof.hanke@mpcdf.mpg.de + +- cleanup package for Factory: + - rename package to openafs. + - remove sys-v init stuff. + - apply recommendations given in Request 581009 + +------------------------------------------------------------------- +Wed Feb 28 09:25:52 UTC 2018 - christof.hanke@mpcdf.mpg.de + +- add compat macro for new _fillupdir macro introduced in Nov 2017 + +------------------------------------------------------------------- +Wed Feb 28 08:30:33 UTC 2018 - christof.hanke@mpcdf.mpg.de + +- update to 1.8.0pre5 + +------------------------------------------------------------------- +Sun Jan 7 08:31:00 UTC 2018 - christof.hanke@mpcdf.mpg.de + +- update to 1.8.0pre4 +- add patch for ncurses detection + +------------------------------------------------------------------- +Thu Dec 7 11:07:30 UTC 2017 - christof.hanke@mpcdf.mpg.de + +- update to 1.8.0pre3 +- add integrity check of tar-balls + +------------------------------------------------------------------- +Fri Sep 1 20:07:48 UTC 2017 - christof.hanke@mpcdf.mpg.de + +- do not strip binaries on install +- fix %postun server + +------------------------------------------------------------------- +Fri Sep 1 11:51:03 UTC 2017 - christof.hanke@mpcdf.mpg.de + +- update to 1.8.0pre2 +- use a preamble-file for KMP +- sort/cleanup/beautify spec-file + +------------------------------------------------------------------- +Fri Sep 1 07:05:21 UTC 2017 - christof.hanke@mpcdf.mpg.de + +- spec-file: + + use hardlinks for fdupes to provide correct header files in + kernel-source + + minor bugfixes, reorganization +- rename changes file to openafs18.changes + +------------------------------------------------------------------- +Thu Feb 9 14:41:57 UTC 2017 - christof.hanke@mpcdf.mpg.de + +- rename package to openafs18-* so they don't override + stable openafs-1.6 ones +- move ld.so to main package -- was in server-packages + +------------------------------------------------------------------- +Tue Feb 7 11:23:22 UTC 2017 - christof.hanke@mpcdf.mpg.de + +- enable building of KMP +- make openafs-krb5-mit package dependend on openafs-client package +- add ld.so - config to main package + +------------------------------------------------------------------- +Fri Jan 27 21:15:12 UTC 2017 - christof.hanke@rzg.mpg.de + +- remove pam, is not build on x86_64 and i596 + +------------------------------------------------------------------- +Mon Dec 26 18:59:09 UTC 2016 - christof.hanke@rzg.mpg.de + +- first version of 1.8 +- remove docs package, put man pages in induvidual packets +- remove layout-patch, deal with this in spec file directly + +------------------------------------------------------------------- +Sat Dec 3 14:56:56 UTC 2016 - christof.hanke@rzg.mpg.de + +- add new ChangeLog + +------------------------------------------------------------------- +Thu Dec 1 04:35:39 UTC 2016 - christof.hanke@rzg.mpg.de + +- update to version 1.6.20 + +------------------------------------------------------------------- +Wed Nov 16 09:21:52 UTC 2016 - christof.hanke@rzg.mpg.de + +- add missing RemainAfterExit=true to client-systemd unit. + +------------------------------------------------------------------- +Tue Nov 15 09:28:55 UTC 2016 - christof.hanke@rzg.mpg.de + +- update to version 1.6.19 + +------------------------------------------------------------------- +Tue Oct 4 11:19:50 UTC 2016 - aj@suse.com + +- Update README: Change SuSE to SUSE. + +------------------------------------------------------------------- +Thu Jul 21 07:52:14 UTC 2016 - christof.hanke@rzg.mpg.de + +- update to version 1.6.18.2 + +------------------------------------------------------------------- +Fri Jun 24 04:42:48 UTC 2016 - christof.hanke@rzg.mpg.de + +- update to version 1.6.18.1 + +------------------------------------------------------------------- +Tue May 10 15:19:28 UTC 2016 - christof.hanke@rzg.mpg.de + +- update to version 1.6.18 + +Thu Mar 17 06:35:21 UTC 2016 - christof.hanke@rzg.mpg.de + +- update to version 1.6.17 +- cleanup + +------------------------------------------------------------------- +Fri Dec 18 06:53:08 UTC 2015 - christof.hanke@rzg.mpg.de + +- update to version 1.6.16 +- remove fix for configure for new ncurses, now dealt with in + shipped package + +------------------------------------------------------------------- +Sat Nov 21 04:47:46 UTC 2015 - christof.hanke@rzg.mpg.de + +- start using change.log again +- fix configure test for new ncurses + +------------------------------------------------------------------- +Thu Jun 17 17:04:25 UTC 2010 - cseader@novell.com + +- update to version 1.4.12.1 + +------------------------------------------------------------------- +Wed Jan 25 21:39:00 CET 2006 - mls@suse.de + +- converted neededforbuild to BuildRequires + +------------------------------------------------------------------- +Mon Jan 23 15:58:43 CET 2006 - nadvornik@suse.cz + +- fixed kernel module to compile + +------------------------------------------------------------------- +Wed Jan 11 05:30:18 CET 2006 - mge@suse.de +- add openafs.SuidCells and openafs.CellServDB +- cleanup SPEC-file(s) +- finally adopt + sysconfig.transarcmode.openafs-client + rc.transarcmode.afs-server + rc.transarcmode.afs-client + to transarc mode; and fix a small typo in + rc.defaultmode.afs-client + +------------------------------------------------------------------- +Fri Jan 6 01:12:31 CET 2006 - mge@suse.de +- set "%defattr(-,root,root)" for transarcmode-file-lists +- fix lib64 build problem in transarcmode + +------------------------------------------------------------------- +Thu Jan 5 13:40:42 CET 2006 - mge@suse.de +- introduce transarc-mode and default-mode +- introduce "options" + +------------------------------------------------------------------- +Thu Dec 29 16:07:00 CET 2005 - mge@suse.de +- build for SLES 9 +- with heimdal krb5 support +- enable-largefile-fileserver + +------------------------------------------------------------------- +Wed Dec 21 16:09:26 CET 2005 - nadvornik@suse.cz + +- updated to 1.4.0 +- fixed dangerous compiler warnings + +------------------------------------------------------------------- +Mon Oct 31 12:37:05 CET 2005 - dmueller@suse.de + +- don't build as root + +------------------------------------------------------------------- +Fri Aug 26 12:51:02 CEST 2005 - nadvornik@suse.cz + +- fixed kernel module to build +- fixed sysconfig file name + +------------------------------------------------------------------- +Thu Jul 14 17:25:25 CEST 2005 - nadvornik@suse.cz + +- updated to 1.3.85 +- used LSB conforming init script names + +------------------------------------------------------------------- +Tue Jul 5 10:44:32 CEST 2005 - hare@suse.de + +- Update for linux 2.6.13. + +------------------------------------------------------------------- +Thu May 12 12:27:01 CEST 2005 - nadvornik@suse.cz + +- gcc4 fixes in kernel module + +------------------------------------------------------------------- +Tue Apr 12 17:02:34 CEST 2005 - nadvornik@suse.cz + +- fixed to compile with gcc4 + +------------------------------------------------------------------- +Wed Feb 23 12:08:07 CET 2005 - nadvornik@suse.cz + +- fixed memory leaks and 64bit fixes backported from 1.3.79 +- updated README.SUSE + +------------------------------------------------------------------- +Thu Feb 3 13:19:05 CET 2005 - nadvornik@suse.cz + +- updated to 1.3.78 + +------------------------------------------------------------------- +Mon Jan 31 15:58:33 CET 2005 - nadvornik@suse.cz + +- fixed afs.h to be usable from userspace [#50283] + +------------------------------------------------------------------- +Tue Jan 25 10:57:09 CET 2005 - nadvornik@suse.cz + +- updated to latest snapshot + +------------------------------------------------------------------- +Wed Sep 15 12:37:04 CEST 2004 - nadvornik@suse.cz + +- added requres: kernel-nongpl [#45167] +- fixed kernel module oops [#44618] + +------------------------------------------------------------------- +Wed Aug 11 15:51:03 CEST 2004 - nadvornik@suse.cz + +- use kernel module from openafs 1.3.70 to support kernel 2.6 + +------------------------------------------------------------------- +Mon Mar 08 17:18:49 CET 2004 - nadvornik@suse.cz + +- updated to 1.2.11 +- added note that client for kernel 2.6 is not available + +------------------------------------------------------------------- +Tue Jan 20 18:48:21 CET 2004 - ro@suse.de + +- added pam-devel to neededforbuild + +------------------------------------------------------------------- +Sat Dec 13 00:23:45 CET 2003 - meissner@suse.de + +- Added hack if no MTU came from userspace. +- Removed superflous ppc64 patch part. + +------------------------------------------------------------------- +Thu Dec 11 09:29:31 CET 2003 - meissner@suse.de + +- ppc64 port added (status: no longer crashes, talks to the network, + but not successfully). +- Change headerfiles to make it possible to do a ppc -> ppc64 crosscompile. + +------------------------------------------------------------------- +Mon Oct 6 17:30:17 CEST 2003 - olh@suse.de + +- build with -fPIC on ppc32 + +------------------------------------------------------------------- +Tue Sep 16 17:37:34 CEST 2003 - nadvornik@suse.cz + +- patch from cvs to use AllocLargeSpace for struct osi_file to prevent + oopses with some kernel configurations + +------------------------------------------------------------------- +Thu Sep 11 12:58:57 CEST 2003 - nadvornik@suse.cz + +- added option DYNROOT to sysconfig and enabled it by default [#27205] + +------------------------------------------------------------------- +Wed Sep 10 17:07:51 CEST 2003 - nadvornik@suse.cz + +- added cleanup before module build [#29649] + +------------------------------------------------------------------- +Tue Sep 09 18:33:38 CEST 2003 - nadvornik@suse.cz + +- fixed possible segfault + +------------------------------------------------------------------- +Thu Sep 04 12:30:00 CEST 2003 - nadvornik@suse.cz + +- set permissions of /var/lib/openafs to 700 +- README.SuSE fixes + +------------------------------------------------------------------- +Thu Aug 28 17:11:47 CEST 2003 - nadvornik@suse.cz + +- use ghost for /afs, the directory is created by init-script +- fixed README.SuSE + +------------------------------------------------------------------- +Thu Aug 21 14:32:58 CEST 2003 - nadvornik@suse.cz + +- moved all static libraries to /usr/lib/afs, fixes conflict with libdes +- used default value for THIS_CELL_SERVER_NAME +- removed old patches + +------------------------------------------------------------------- +Tue Aug 12 11:10:46 CEST 2003 - nadvornik@suse.cz + +- fixed a bug in init script + +------------------------------------------------------------------- +Mon Aug 11 18:26:28 CEST 2003 - nadvornik@suse.cz + +- updated to final 1.2.10 + +------------------------------------------------------------------- +Wed Jul 30 19:34:34 CEST 2003 - nadvornik@suse.cz + +- updated to 1.2.10-rc4 +- do not destroy CellServDB even if REGENERATE_CELL_INFO=yes +- fixed to compile on x86_64 + +------------------------------------------------------------------- +Wed Jul 30 14:25:46 CEST 2003 - sf@suse.de + +- use %_lib where it was missing + +------------------------------------------------------------------- +Wed Jul 09 19:20:55 CEST 2003 - nadvornik@suse.cz + +- fixed conflicts in filelist + +------------------------------------------------------------------- +Fri Jun 20 14:59:23 CEST 2003 - nadvornik@suse.cz + +- improved init scripts + +------------------------------------------------------------------- +Thu Jun 19 14:40:52 CEST 2003 - nadvornik@suse.cz + +- added README.SuSE +- fixed init scripts [#27426] +- installed man pages + +------------------------------------------------------------------- +Thu Jun 12 17:45:39 CEST 2003 - poeml@suse.de + +- add /usr/src/kernel-modules to the file list + +------------------------------------------------------------------- +Wed Jun 4 21:26:09 CEST 2003 - schwab@suse.de + +- Fix SMP configuration detection. + +------------------------------------------------------------------- +Wed May 14 12:28:04 CEST 2003 - poeml@suse.de + +- rework filelists: + - package/remove unpackaged files + - move some files into the server & client subpackages + - use %defattr +- fix deprecated tail -1 syntax (fixes building the kernel module) + +------------------------------------------------------------------- +Mon May 12 14:50:05 CEST 2003 - nadvornik@suse.cz + +- updated to 1.2.9 +- added DATA_ENCRYPTION option to sysconfig + +------------------------------------------------------------------- +Mon Mar 10 18:43:26 CET 2003 - poeml@suse.de + +- x86_64: add -lresolv, -fPIC +- fix lib path on all 64 bit platforms + +------------------------------------------------------------------- +Thu Mar 06 10:39:27 CET 2003 - nadvornik@suse.cz + +- added sysconfig metadata + +------------------------------------------------------------------- +Mon Feb 24 17:28:44 CET 2003 - nadvornik@suse.cz + +- added dirs /afs, /etc/openafs, /var/lib/openafs to filelist + +------------------------------------------------------------------- +Sun Feb 16 18:28:44 CET 2003 - olh@suse.de + +- workaround broken -lresolv detection, lib64 fixes + +------------------------------------------------------------------- +Wed Feb 12 16:42:07 CET 2003 - nadvornik@suse.cz + +- fixed multiline strings in kernel module + +------------------------------------------------------------------- +Fri Jan 24 11:11:23 CET 2003 - nadvornik@suse.cz + +- updated to 1.2.8 +- improved init script + +------------------------------------------------------------------- +Fri Nov 29 10:21:04 CET 2002 - nadvornik@suse.cz + +- included errno.h +- fixed multiline strings + +------------------------------------------------------------------- +Fri Nov 22 16:47:51 CET 2002 - nadvornik@suse.cz + +- first version of init scripts + +------------------------------------------------------------------- +Wed Nov 20 19:20:53 CET 2002 - poeml@suse.de + +- initial draft of a package. Lots of stuff missing, like init + scripts, or the kerberos 5 migration toolkit. + diff --git a/openafs.spec b/openafs.spec new file mode 100644 index 0000000..9b5f8ee --- /dev/null +++ b/openafs.spec @@ -0,0 +1,1023 @@ +# +# spec file for package openafs +# +# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# +# needssslcertforbuild + + +#Compat macro for new _fillupdir macro introduced in Nov 2017 +%if ! %{defined _fillupdir} + %define _fillupdir /var/adm/fillup-templates +%endif + +# +# TUNABLES +# + +# +# define distribution and version +# + +#distribution-definitions here + +#kerberos5 +# 0=MIT | 1=Heimdal +%define option_heimdal 0 + +# clean build-root after build +%define option_clean_buildroot 0 + +# build authlibs +%define build_authlibs 1 + +# build kernel modules +%define build_kernel_modules 1 + +# build fuse-based client +%define build_fuse_client 0 + +# run regen to create new configure script +%define run_regen 1 + +# +# auto-determined parameters +# +%define libdir %{_libdir} +%define libexecdir %{_libdir} +%define bindir %{_bindir} +%define sbindir %{_sbindir} +%define includedir %{_includedir}/openafs +%define mandir %{_mandir} +%define afslogsdir /var/log/openafs +%define sysconfdir %{_sysconfdir} +%define afsconfdir /etc/openafs/server +%define viceetcdir /etc/openafs +%define vicecachedir /var/cache/openafs +%define afslocaldir /var/lib/openafs + +# used for %setup only +# leave upstream tar-balls untouched for integrity checks. +%define upstream_version 1.8.0pre5 + +Name: openafs + +Version: 1.8.0~pre5 +Release: 0 +Summary: OpenAFS Distributed File System +License: IPL-1.0 +Group: System/Filesystems +Url: http://www.openafs.org/ + +Source0: openafs-%{version}-src.tar.bz2 +Source1: openafs-%{version}-doc.tar.bz2 +Source2: openafs-%{version}-src.tar.bz2.md5 +Source3: openafs-%{version}-doc.tar.bz2.md5 +Source4: openafs-%{version}-src.tar.bz2.sha256 +Source5: openafs-%{version}-doc.tar.bz2.sha256 +Source10: README.SUSE.openafs +Source13: sysconfig.openafs-client +Source14: sysconfig.openafs-server +Source15: logrotate.openafs-server +Source16: ld.conf.openafs +Source18: RELNOTES-%{version} +Source19: ChangeLog +Source20: kernel-source.build-modules.sh +Source22: sysconfig.openafs-fuse-client +Source23: openafs-client.service +Source25: openafs-server.service +Source26: openafs-fuse-client.service +Source27: sysconfig.openafs-client-systemd +Source28: sysconfig.openafs-server-systemd +Source29: sysconfig.openafs-fuse-client-systemd +Source30: preamble +Source55: openafs.SuidCells +Source56: openafs.CellAlias +Source57: openafs.ThisCell +Source58: openafs.cacheinfo +Source99: openafs.changes +Patch2: openafs-1.8.x.heimdal.patch +Patch3: openafs-1.8.x.ncurses6.patch +BuildRoot: %{_tmppath}/%{name}-%{version}-build + +# +# GENERAL BuildRequires and Requires +# + +%if %{_vendor} == "suse" + %define ARCH %{_arch} +BuildRequires: automake +BuildRequires: bison +BuildRequires: coreutils +BuildRequires: fdupes +BuildRequires: flex +BuildRequires: git +BuildRequires: libtool +BuildRequires: ncurses-devel + +%if 0%{?suse_version} < 1210 +Requires(post): %insserv_prereq +%endif +Requires(post): %fillup_prereq + +%if %{option_heimdal} +BuildRequires: heimdal-devel + %define krb5_config /usr/lib/heimdal/bin/krb5-config +%else +BuildRequires: krb5-devel + %define krb5_config /usr/lib/mit/bin/krb5-config +%endif + +%if %{build_kernel_modules} +BuildRequires: kernel-source +BuildRequires: kernel-syms +BuildRequires: module-init-tools +%endif + +%if %{build_fuse_client} +BuildRequires: fuse-devel +BuildRequires: pkg-config +%endif +%endif + +%description +AFS is a cross-platform distributed file system product pioneered at +Carnegie Mellon University and supported and developed as a product by +Transarc Corporation (now IBM Pittsburgh Labs). It offers a +client-server architecture for file sharing, providing location +independence, scalability, and transparent migration capabilities for +data. + +In addition, among its features are authentication, encryption, +caching, disconnected operations, replication for higher availability +and load balancing, and ACLs. + +%package server +Summary: OpenAFS File System Server +Group: System/Filesystems +Requires: %{name} = %{version} + +%description server +AFS is a cross-platform distributed file system product pioneered at +Carnegie Mellon University and supported and developed as a product by +Transarc Corporation (now IBM Pittsburgh Labs). It offers a +client-server architecture for file sharing, providing location +independence, scalability, and transparent migration capabilities for +data. + +In addition, among its features are authentication, encryption, +caching, disconnected operations, replication for higher availability +and load balancing, and ACLs. This package contains the static +libraries and header files needed to develop applications for OpenAFS. + +%if %{build_authlibs} +%package authlibs +Summary: OpenAFS authentication shared libraries +Group: Development/Libraries/C and C++ + +%description authlibs +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 a shared version of libafsrpc and libafsauthent. +None of the programs included with OpenAFS currently use these shared +libraries; however, third-party software that wishes to perform AFS +authentication may link against them. + +%package authlibs-devel +Summary: OpenAFS shared library development +Group: Development/Libraries/C and C++ +Requires: %{name}-authlibs = %{version} +Requires: %{name}-devel = %{version} + +%description authlibs-devel +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 includes the static versions of libafsrpc and +libafsauthent, and symlinks required for building against the dynamic +libraries. + +%endif + +%package devel +Summary: OpenAFS Static Libraries and Header Files +Group: Development/Libraries/Other +Requires: %{name} = %{version} + +%description devel +AFS is a cross-platform distributed file system product pioneered at +Carnegie Mellon University and supported and developed as a product by +Transarc Corporation (now IBM Pittsburgh Labs). It offers a +client-server architecture for file sharing, providing location +independence, scalability, and transparent migration capabilities for +data. + +In addition, among its features are authentication, encryption, +caching, disconnected operations, replication for higher availability +and load balancing, and ACLs. This package contains the OpenAFS server. + +%package kernel-source +Summary: OpenAFS Kernel Module source tree +Group: System/Filesystems +Requires: bison +Requires: flex +Requires: gcc +Requires: kernel-devel +Provides: openafs-kernel = %{version} + +%description kernel-source +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 the source code to build your own AFS kernel +module. + +%if %{option_heimdal} +%package krb5-heimdal +Summary: OpenAFS programs to use with krb5 +Group: System/Filesystems +Requires: %{name} = %{version} +Requires: heimdal-lib +Requires: heimdal-tools + +%description krb5-heimdal +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 programs so you can use krb5 +to authenticate to AFS services, instead of using AFS's homegrown +krb4 lookalike services. +This is using the implementation of krb5. +Requires: heimdal-lib +Requires: heimdal-tools +%else + +%package krb5-mit +Summary: OpenAFS programs to use with krb5 +Group: System/Filesystems +Requires: %{name}-client = %{version} +Requires: krb5-client + +%description krb5-mit +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 programs so you can use krb5 +to authenticate to AFS services, instead of using AFS's homegrown +krb4 lookalike services. +This is using the MIT implementation of krb5. + +%endif + +%if %{build_kernel_modules} +%package KMP +Summary: OpenAFS Distributed File System - kernel module +Group: System/Kernel + +%suse_kernel_module_package lockdep um -p %_sourcedir/preamble + +%description KMP +This package contains the kernel module for OpenAFS. For details see +the openafs package. + +%endif + +%if %{build_fuse_client} +%package fuse_client +Summary: OpenAFS FUSE File System Client +Group: System/Filesystems +Requires: %{name} = %{version} +Requires: %{name}-krb5-mit = %{version} +Conflicts: %{name}-client +Requires: coreutils +Requires: diffutils +Requires: fillup +Requires: grep +Requires: sed + +%description fuse_client +AFS is a cross-platform distributed file system product pioneered at +Carnegie Mellon University and supported and developed as a product by +Transarc Corporation (now IBM Pittsburgh Labs). It offers a +client-server architecture for file sharing, providing location +independence, scalability, and transparent migration capabilities for +data. + +This client is using the EXPERIMENTAL FUSE interface on LINUX. +It does not offer authentication etc. + +%else + +%package client +Summary: OpenAFS File System Client +Group: System/Filesystems +Requires: %{name} = %{version} +Requires: %{name}-kmp +Requires: %{name}-krb5-mit = %{version} +Requires: coreutils +Requires: diffutils +Requires: fillup +Requires: grep +Requires: sed + +%description client +AFS is a cross-platform distributed file system product pioneered at +Carnegie Mellon University and supported and developed as a product by +Transarc Corporation (now IBM Pittsburgh Labs). It offers a +client-server architecture for file sharing, providing location +independence, scalability, and transparent migration capabilities for +data. + +In addition, among its features are authentication, encryption, +caching, disconnected operations, replication for higher availability +and load balancing, and ACLs. This package contains the OpenAFS client. + +%endif + +%prep + +: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ +: @@@ +: @@@ package-name: %{name} +: @@@ file-layout: fsh +: @@@ lib dir: %{libdir} +: @@@ libexec dir: %{libexecdir} +: @@@ bin dir: %{bindir} +: @@@ sbin dir: %{sbindir} +: @@@ include dir: %{includedir} +: @@@ sysconf dir: %{sysconfdir} +: @@@ man dir: %{mandir} +: @@@ build modules: %{build_kernel_modules} +: @@@ build fuse client: %{build_fuse_client} +%if %{option_heimdal} +: @@@ krb5 : heimdal +%else +: @@@ krb5 : mit +%endif +: @@@ ARCH: %{ARCH} +: @@@ target cpu: %{_target_cpu} +: @@@ +: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ + +for src_file in %{S:0} %{S:1}; do + if [ "`md5sum $src_file | awk '{print $1}'`" != "`cat $src_file.md5 | awk '{print $1}'`" ]; then + echo "ERROR: MD5-Integrity check for $src_file failed."; + exit 1 + fi + if [ "`sha256sum $src_file | awk '{print $1}'`" != "`cat $src_file.sha256 | awk '{print $1}'`" ]; then + echo "ERROR: SHA256-Integrity check for $src_file failed."; + exit 1 + fi +done + +%setup -q -n openafs-%{upstream_version} -T -b 0 -b 1 + +%if %{option_heimdal} +%patch2 -p1 +%endif + +%if %{run_regen} +%patch3 -p1 + ./regen.sh +%endif + +%build +sysbase=%{ARCH} +%ifarch ppc + perl -pi -e 's,^(XCFLAGS.*),\1 -fPIC,' src/config/Makefile.ppc_linux24.in +%endif +%ifarch ppc64 + sysbase=ppc64 +%endif +%ifarch s390x + sysbase=s390 +%endif +%ifarch x86_64 + sysbase=amd64 + perl -pi -e 's,^(XCFLAGS.*),\1 -fPIC,' src/config/Makefile.amd64_linux24.in + perl -pi -e 's,^(XLIBS.*),\1 -lresolv,' src/config/Makefile.amd64_linux24.in +%endif +afs_sysname=${sysbase}_linux26 + +RPM_OPT_FLAGS=`echo ${RPM_OPT_FLAGS} | sed s/-D_FORTIFY_SOURCE=2//` +export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -fPIC" + +%if %{option_heimdal} +export CFLAGS="$CFLAGS -I/usr/include/heimdal" +%else +export KRB5LIBS='-lcom_err -lkrb5' +%endif +export PATH_KRB5_CONFIG=%{krb5_config} + +%ifarch ppc64 +export LDFLAGS="$LDFLAGS -m64" +%endif + +./configure \ + --prefix=/usr \ + --disable-transarc-paths \ + --disable-pam \ + --disable-strip-binaries \ + --bindir=%{bindir} \ + --sbindir=%{sbindir} \ + --libdir=%{libdir} \ + --libexecdir=%{libexecdir} \ + --includedir=%{includedir} \ + --sysconfdir=%{sysconfdir} \ + --mandir=%{mandir} \ + --with-afs-sysname=$afs_sysname \ + --disable-kernel-module + +make CCFLAGS="$CFLAGS" XCFLAGS="$CFLAGS" PAM_CFLAGS="$CFLAGS" KOPTS="$CFLAGS" all_nolibafs +make CCFLAGS="$CFLAGS" XCFLAGS="$CFLAGS" PAM_CFLAGS="$CFLAGS" KOPTS="$CFLAGS" only_libafs_tree + +# the test suite need a configured KDC +#make -C src/tests all + +# Kernel-module + +%if %{build_kernel_modules} +mkdir obj + +for flavor in %flavors_to_build; do + rm -rf obj/$flavor + cp -a libafs_tree obj/$flavor + pushd obj/$flavor + ./configure --with-linux-kernel-build=/usr/src/linux-obj/%{ARCH}/$flavor --with-linux-kernel-headers=/usr/src/linux \ + --disable-transarc-paths + make + popd +done +%endif + +%install + +# +# install build binaries using make + +make DESTDIR=$RPM_BUILD_ROOT install_nolibafs + +# +# man-pages + +OLD_PWD=`pwd` +cd doc/man-pages +make DESTDIR=$RPM_BUILD_ROOT install +cd $OLD_PWD + +# remove unused man pages +for x in afs_ftpd afs_inetd afs_login afs_rcp afs_rlogind afs_rsh \ + dkload knfs package runntp symlink symlink_list symlink_make \ + symlink_remove; do + rm -f $RPM_BUILD_ROOT%{mandir}/man1/${x}.1 +done + +# compress man pages +OLD_PWD=`pwd` +for d in $RPM_BUILD_ROOT%{_mandir}/man*;do + cd $d + for f in *;do + if [ -h $f ]; then + mv $f $f.gz + elif [ -f $f ];then + gzip -9 $f + else + echo "Unknown thing to compress : $f" + fi + done +done +cd $OLD_PWD + +# +# create directories +mkdir -p $RPM_BUILD_ROOT/%_unitdir +mkdir -p $RPM_BUILD_ROOT/%{afslogsdir}/old +mkdir -p $RPM_BUILD_ROOT/%{_fillupdir} +mkdir -p $RPM_BUILD_ROOT/%{vicecachedir} +mkdir -p $RPM_BUILD_ROOT/%{viceetcdir} +mkdir -p $RPM_BUILD_ROOT/usr/share/openafs/C +mkdir -p $RPM_BUILD_ROOT/%{afsconfdir} +mkdir -p $RPM_BUILD_ROOT/%{afslocaldir} + +# +# client +cp -a src/afsd/CellServDB $RPM_BUILD_ROOT%{viceetcdir}/CellServDB +cp -a %{S:55} $RPM_BUILD_ROOT%{viceetcdir}/SuidCells +cp -a %{S:56} $RPM_BUILD_ROOT%{viceetcdir}/CellAlias +cp -a %{S:57} $RPM_BUILD_ROOT%{viceetcdir}/ThisCell +cp -a %{S:58} $RPM_BUILD_ROOT%{viceetcdir}/cacheinfo +cp -a src/afs/afszcm.cat $RPM_BUILD_ROOT/usr/share/openafs/C +install -m 644 %{S:27} $RPM_BUILD_ROOT/%{_fillupdir}/sysconfig.openafs-client +install -m 644 %{S:23} $RPM_BUILD_ROOT/%_unitdir +ln -s /usr/sbin/service $RPM_BUILD_ROOT%{_sbindir}/rcopenafs-client + +# +# fuse client package + +%if %{build_fuse_client} +install -m 644 %{S:29} $RPM_BUILD_ROOT/%{_fillupdir}/sysconfig.openafs-fuse-client +install -m 644 %{S:26} $RPM_BUILD_ROOT/%_unitdir +ln -s /usr/sbin/service $RPM_BUILD_ROOT%{_sbindir}/rcopenafs-fuse-client +%endif + +# +# server +install -m 644 %{S:28} $RPM_BUILD_ROOT/%{_fillupdir}/sysconfig.openafs-server +install -m 644 %{S:25} $RPM_BUILD_ROOT/%_unitdir +ln -s /usr/sbin/service $RPM_BUILD_ROOT%{_sbindir}/rcopenafs-server +# +# kernel-source +mkdir -p $RPM_BUILD_ROOT/usr/src/kernel-modules/openafs +chmod -R o-w src/libafs +chmod -R o-w libafs_tree +cp -a libafs_tree $RPM_BUILD_ROOT/usr/src/kernel-modules/openafs +install -m 755 %{S:20} $RPM_BUILD_ROOT/usr/src/kernel-modules/openafs/build-modules.sh +install -m 644 LICENSE $RPM_BUILD_ROOT/usr/src/kernel-modules/openafs/LICENSE + +# KMP +%if %{build_kernel_modules} + export INSTALL_MOD_PATH=$RPM_BUILD_ROOT + export INSTALL_MOD_DIR=updates + + for flavor in %flavors_to_build; do + make -C /usr/src/linux-obj/%{ARCH}/$flavor modules_install \ + M=$PWD/`find obj/$flavor/ -name MODLOAD-\* -type d` + done +%endif + +# +# main package +cp -a %{S:10} README.SUSE +cp -a %{S:18} RELNOTES +cp -a %{S:19} ChangeLog +mkdir -p $RPM_BUILD_ROOT/etc/ld.so.conf.d +cp -a %{S:16} $RPM_BUILD_ROOT/etc/ld.so.conf.d/openafs.conf + +# move some bin to sbin +mv $RPM_BUILD_ROOT%{bindir}/asetkey $RPM_BUILD_ROOT%{sbindir}/asetkey +mv $RPM_BUILD_ROOT%{bindir}/bos $RPM_BUILD_ROOT%{sbindir}/bos +mv $RPM_BUILD_ROOT%{bindir}/akeyconvert $RPM_BUILD_ROOT%{sbindir}/akeyconvert +mv $RPM_BUILD_ROOT%{bindir}/udebug $RPM_BUILD_ROOT%{sbindir}/udebug + +# avoid conflict with scout +mv $RPM_BUILD_ROOT/usr/bin/scout $RPM_BUILD_ROOT/usr/bin/afs_scout +mv $RPM_BUILD_ROOT/%{_mandir}/man1/scout.1.gz $RPM_BUILD_ROOT/%{_mandir}/man1/afs_scout.1.gz + +# move %%{libdir}/afs-stuff to %%{libdir}/openafs +mv $RPM_BUILD_ROOT/%{libdir}/afs/* $RPM_BUILD_ROOT/%{libdir}/openafs +mv $RPM_BUILD_ROOT/%{libdir}/*.* $RPM_BUILD_ROOT/%{libdir}/openafs +rm -rf $RPM_BUILD_ROOT/%{libdir}/afs + +# +# general cleanup +# + +# it's already in /usr/bin +rm -f $RPM_BUILD_ROOT/usr/{%sbindir}/kpwvalid +# we supposedly don't need this one on linux +rm -f $RPM_BUILD_ROOT/%{sbindir}/rmtsysd +rm -f $RPM_BUILD_ROOT/%{mandir}/man8/rmtsysd.8.gz +rm -f $RPM_BUILD_ROOT/%{mandir}/man8/xfs_size_check.8.gz +rm -f $RPM_BUILD_ROOT/%{mandir}/man1/dlog.1.gz +%if %{build_authlibs} == 0 + rm -f $RPM_BUILD_ROOT/%{libdir}/libafsauthent.so.* + rm -f $RPM_BUILD_ROOT/%{libdir}/libafsrpc.so.* + rm -f $RPM_BUILD_ROOT/%{libdir}/libkopenafs.so.* + rm -f $RPM_BUILD_ROOT/%{libdir}/libafsauthent.so + rm -f $RPM_BUILD_ROOT/%{libdir}/libafsrpc.so + rm -f $RPM_BUILD_ROOT/%{libdir}/libkopenafs.so +%endif + +# check for duplicates, remove them and link them +%fdupes $RPM_BUILD_ROOT + +# remove all static libraries +find $RPM_BUILD_ROOT -type f -name \*.a -exec rm {} \; + +# +# main + +%post -p /sbin/ldconfig + +%postun -p /sbin/ldconfig + +# +# kernel-source + +%post kernel-source +echo To install the kernel-module, do: +echo cd /usr/src/kernel-modules/openafs +echo sh ./build-modules.sh build +echo sh ./build-modules.sh install + +# +# fuse client + +%if %{build_fuse_client} + +%pre fuse_client +%service_add_pre openafs-client.service + +%post fuse_client +%{fillup_only -n openafs-fuse-client} +%service_add_post openafs-client.service +/sbin/ldconfig + +if [ "x$1" = "x" ]; then + my_operation=0 +else + my_operation=$1 +fi + +if [ $my_operation -gt 1 ]; then + echo Not stopping the possibly running client. + echo You must restart the client to put the upgrade into effect. +else + echo This is the experimental FUSE implementation of the openafs-client + echo Please configure your cell like with the in-kernel openafs-client + echo authentication etc. is not implemented yet in this version. +fi + +%preun fuse_client +%service_del_preun openafs-client.service +%{stop_on_removal} + +%postun fuse_client +%service_del_postun openafs-client.service +/sbin/ldconfig + +%else + +# +# client + +%pre client +%service_add_pre openafs-client.service + +%post client +if [ ! -d /afs ]; then + mkdir /afs +fi +/sbin/ldconfig +%{fillup_only -n openafs-client} +%service_add_post openafs-client.service + +if [ "x$1" = "x" ]; then + my_operation=0 +else + my_operation=$1 +fi +if [ $my_operation -gt 1 ]; then + echo Not stopping the possibly running client. + echo You must restart the client to put the upgrade into effect. +else + echo For configuring the client, please check /etc/sysconfig/openafs-client + echo and/or follow the instructions found on http://www.openafs.org how to install an openafs-client. +fi + +%preun client +%{stop_on_removal} +%service_del_preun openafs-client.service + +%postun client +if [ -d /afs ]; then + echo make sure to remove directory /afs if unwanted. +fi +/sbin/ldconfig +%service_del_postun openafs-client.service + +#fuse-client +%endif + +# +# server + +%pre server +%service_add_pre openafs-server.service + +%post server +/sbin/ldconfig +%{fillup_only -n openafs-server} +%service_add_post openafs-server.service + +if [ "x$1" = "x" ]; then + my_operation=0 +else + my_operation=$1 +fi +if [ $my_operation -gt 1 ]; then + echo Not stopping the possibly running services. + echo You must restart the service to put the upgrade into effect. +else + echo For configuring the server, please check /etc/sysconfig/openafs-server + echo and/or follow the instructions found on http://www.openafs.org to install an openafs-client. +fi + +%preun server +%service_del_preun openafs-server.service +%{stop_on_removal} + +%postun server +/sbin/ldconfig +%service_del_postun openafs-server.service + +# +# devel + +%post devel + +%postun devel + +# +# authlibs + +%if %{build_authlibs} +%post authlibs + +%postun authlibs +%endif + +# +# FILES +# + +%files +%defattr(-,root,root) +%config /etc/ld.so.conf.d/openafs.conf +%config(noreplace) %{viceetcdir}/CellAlias +%config(noreplace) %{viceetcdir}/CellServDB +%config(noreplace) %{viceetcdir}/ThisCell +%dir %{viceetcdir} +%doc %{mandir}/man5/afsmonitor.5.gz +%doc %{mandir}/man1/afs.1.gz +%doc %{mandir}/man1/afs_compile_et.1.gz +%doc %{mandir}/man1/afs_scout.1.gz +%doc %{mandir}/man1/afsmonitor.1.gz +%doc %{mandir}/man1/cmdebug.1.gz +%doc %{mandir}/man1/pts.1.gz +%doc %{mandir}/man1/pts_*.gz +%doc %{mandir}/man1/restorevol.1.gz +%doc %{mandir}/man1/rxdebug.1.gz +%doc %{mandir}/man1/sys.1.gz +%doc %{mandir}/man1/translate_et.1.gz +%doc %{mandir}/man1/udebug.1.gz +%doc %{mandir}/man1/vos.1.gz +%doc %{mandir}/man1/vos_*gz +%doc %{mandir}/man1/xstat_cm_test.1.gz +%doc %{mandir}/man1/xstat_fs_test.1.gz +%doc %{mandir}/man5/CellAlias.5.gz +%doc %{mandir}/man5/CellServDB.5.gz +%doc %{mandir}/man5/NetInfo.5.gz +%doc %{mandir}/man5/NetRestrict.5.gz +%doc %{mandir}/man5/ThisCell.5.gz +%doc %{mandir}/man5/afs.5.gz +%doc %{mandir}/man5/butc.5.gz +%doc %{mandir}/man5/butc_logs.5.gz +%doc %{mandir}/man5/fms.log.5.gz +%doc %{mandir}/man5/sysid.5.gz +%doc %{mandir}/man5/uss.5.gz +%doc %{mandir}/man5/uss_*.5.gz +%doc %{mandir}/man8/backup.8.gz +%doc %{mandir}/man8/backup_*.8.gz +%doc %{mandir}/man8/bos.8.gz +%doc %{mandir}/man8/bos_[a-t]*.8.gz +%doc %{mandir}/man8/bos_uninstall.8.gz +%doc %{mandir}/man8/butc.8.gz +%doc %{mandir}/man8/fms.8.gz +%doc %{mandir}/man8/read_tape.8.gz +%doc %{mandir}/man8/uss.8.gz +%doc %{mandir}/man8/uss_*.8.gz +%doc %{mandir}/man8/vsys.8.gz +%doc NEWS README* RELNOTES ChangeLog +%{bindir}/afs_compile_et +%{bindir}/afs_scout +%{bindir}/afsio +%{bindir}/afsmonitor +%{bindir}/cmdebug +%{bindir}/pts +%{bindir}/restorevol +%{bindir}/sys +%{bindir}/translate_et +%{bindir}/xstat_cm_test +%{bindir}/xstat_fs_test +%{libdir}/openafs/libafshcrypto.so.* +%{libdir}/openafs/librokenafs.so.* +%{sbindir}/backup +%{sbindir}/bos +%{sbindir}/butc +%{sbindir}/fms +%{sbindir}/read_tape +%{sbindir}/rxdebug +%{sbindir}/udebug +%{sbindir}/uss +%{sbindir}/vos +%{sbindir}/vsys + +%if %{build_fuse_client} +%files fuse_client +%defattr(-,root,root) + %{sbindir}/afsd.fuse +%config(noreplace) %{viceetcdir}/SuidCells +%config(noreplace) %{viceetcdir}/cacheinfo +%_unitdir/openafs-fuse-client.service + %{sbindir}/rcopenafs-fuse-client + /%{_fillupdir}/sysconfig.openafs-fuse-client + /%{vicecachedir} +%else +%files client +%defattr(-,root,root) + %{bindir}/fs + %{bindir}/klog.krb5 + %{bindir}/pagsh + %{bindir}/pagsh.krb + %{bindir}/tokens + %{bindir}/tokens.krb + %{bindir}/unlog + %{bindir}/up + %{sbindir}/afsd + %{sbindir}/fstrace +%doc %{mandir}/man1/fs.1.gz +%doc %{mandir}/man1/fs_*.1.gz +%doc %{mandir}/man1/klog.krb5.1.gz +%doc %{mandir}/man1/pagsh.1.gz +%doc %{mandir}/man1/pagsh.krb.1.gz +%doc %{mandir}/man1/tokens.1.gz +%doc %{mandir}/man1/tokens.krb.1.gz +%doc %{mandir}/man1/unlog.1.gz +%doc %{mandir}/man1/up.1.gz +%doc %{mandir}/man8/afsd.8.gz +%doc %{mandir}/man8/fstrace.8.gz +%doc %{mandir}/man8/fstrace_*.8.gz +%_unitdir/openafs-client.service +%doc %{mandir}/man1/copyauth.1.gz +%doc %{mandir}/man5/cacheinfo.5.gz +%doc %{mandir}/man5/afs_cache.5.gz +%dir /usr/share/openafs +%dir /usr/share/openafs/C +/usr/share/openafs/C/afszcm.cat +%doc %{mandir}/man5/afszcm.cat.5.gz +%config(noreplace) %{viceetcdir}/SuidCells +%config(noreplace) %{viceetcdir}/cacheinfo + /usr/sbin/rcopenafs-client + /%{_fillupdir}/sysconfig.openafs-client + /%{vicecachedir} +%endif + +%files server +%defattr(-,root,root) +%attr(770,root,root) %dir %{afslocaldir} +%attr(775,root,root) %dir %{afslogsdir} +%config %{viceetcdir}/server +%doc %{mandir}/man5/AuthLog.5.gz +%doc %{mandir}/man5/AuthLog.dir.5.gz +%doc %{mandir}/man5/BackupLog.5.gz +%doc %{mandir}/man5/BosConfig.5.gz +%doc %{mandir}/man5/BosLog.5.gz +%doc %{mandir}/man5/FORCESALVAGE.5.gz +%doc %{mandir}/man5/FileLog.5.gz +%doc %{mandir}/man5/KeyFile.5.gz +%doc %{mandir}/man5/KeyFileExt.5.gz +%doc %{mandir}/man5/NoAuth.5.gz +%doc %{mandir}/man5/PtLog.5.gz +%doc %{mandir}/man5/SALVAGE.fs.5.gz +%doc %{mandir}/man5/SalvageLog.5.gz +%doc %{mandir}/man5/UserList.5.gz +%doc %{mandir}/man5/VLLog.5.gz +%doc %{mandir}/man5/VolserLog.5.gz +%doc %{mandir}/man5/afs_volume_header.5.gz +%doc %{mandir}/man5/bdb.DB0.5.gz +%doc %{mandir}/man5/krb.conf.5.gz +%doc %{mandir}/man5/krb.excl.5.gz +%doc %{mandir}/man5/prdb.DB0.5.gz +%doc %{mandir}/man5/salvage.lock.5.gz +%doc %{mandir}/man5/tapeconfig.5.gz +%doc %{mandir}/man5/vldb.DB0.5.gz +%doc %{mandir}/man8/akeyconvert.8.gz +%doc %{mandir}/man8/bos_util.8.gz +%doc %{mandir}/man8/bosserver.8.gz +%doc %{mandir}/man8/buserver.8.gz +%doc %{mandir}/man8/dafileserver.8.gz +%doc %{mandir}/man8/dafssync-debug.8.gz +%doc %{mandir}/man8/dafssync-debug_*.8.gz +%doc %{mandir}/man8/dasalvager.8.gz +%doc %{mandir}/man8/davolserver.8.gz +%doc %{mandir}/man8/fileserver.8.gz +%doc %{mandir}/man8/fssync-debug.8.gz +%doc %{mandir}/man8/fssync-debug_*.8.gz +%doc %{mandir}/man8/prdb_check.8.gz +%doc %{mandir}/man8/pt_util.8.gz +%doc %{mandir}/man8/ptserver.8.gz +%doc %{mandir}/man8/salvager.8.gz +%doc %{mandir}/man8/salvageserver.8.gz +%doc %{mandir}/man8/state_analyzer.8.gz +%doc %{mandir}/man8/upclient.8.gz +%doc %{mandir}/man8/upserver.8.gz +%doc %{mandir}/man8/vldb_check.8.gz +%doc %{mandir}/man8/vldb_convert.8.gz +%doc %{mandir}/man8/vlserver.8.gz +%doc %{mandir}/man8/voldump.8.gz +%doc %{mandir}/man8/volinfo.8.gz +%doc %{mandir}/man8/volscan.8.gz +%doc %{mandir}/man8/volserver.8.gz +%{libdir}/openafs/buserver +%{libdir}/openafs/dafileserver +%{libdir}/openafs/dasalvager +%{libdir}/openafs/davolserver +%{libdir}/openafs/fileserver +%{libdir}/openafs/ptserver +%{libdir}/openafs/salvager +%{libdir}/openafs/salvageserver +%{libdir}/openafs/upclient +%{libdir}/openafs/upserver +%{libdir}/openafs/vlserver +%{libdir}/openafs/volserver +%{sbindir}/akeyconvert +%{sbindir}/bos_util +%{sbindir}/bosserver +%{sbindir}/dafssync-debug +%{sbindir}/fssync-debug +%{sbindir}/prdb_check +%{sbindir}/pt_util +%{sbindir}/salvsync-debug +%{sbindir}/state_analyzer +%{sbindir}/vldb_check +%{sbindir}/vldb_convert +%{sbindir}/voldump +%{sbindir}/volinfo +%{sbindir}/volscan +%_unitdir/openafs-server.service +%{_sbindir}/rcopenafs-server +/%{_fillupdir}/sysconfig.openafs-server + +%files devel +%defattr(-,root,root) +%dir %{libdir}/openafs +%doc %{mandir}/man1/livesys.1.gz +%doc %{mandir}/man1/rxgen.1.gz +%doc %{mandir}/man3/AFS::ukernel.3.gz +%{bindir}/livesys +%{bindir}/rxgen +%{includedir} +%{libdir}/openafs/libafshcrypto.so +%{libdir}/openafs/librokenafs.so + +%files kernel-source +%defattr(-,root,root) +%dir /usr/src/kernel-modules +%dir /usr/src/kernel-modules/openafs +/usr/src/kernel-modules/openafs/* + +%if %{option_heimdal} +%files krb5-heimdal +%defattr(-,root,root) +%else +%files krb5-mit +%defattr(-,root,root) +%endif +%{bindir}/aklog +%doc %{mandir}/man1/aklog.1.gz +%doc %{mandir}/man8/aklog_dynamic_auth.8.gz +%doc %{mandir}/man8/asetkey.8.gz +%{sbindir}/asetkey + +%if %{build_authlibs} +%files authlibs +%defattr(-,root,root) +%{libdir}/openafs/libafsauthent.so.* +%{libdir}/openafs/libafsrpc.so.* +%{libdir}/openafs/libkopenafs.so.* + +%files authlibs-devel +%defattr(-,root,root) +%{libdir}/openafs/libafsauthent.so +%{libdir}/openafs/libafsrpc.so +%{libdir}/openafs/libkopenafs.so +%endif + +# +# CHANGELOG +# + +%changelog diff --git a/preamble b/preamble new file mode 100644 index 0000000..ef64c28 --- /dev/null +++ b/preamble @@ -0,0 +1,3 @@ +Requires: kernel-%1 +Requires: %{name}-client = %{version} +Conflicts: %{name}-fuse-client = %{version} diff --git a/rc.afs-client b/rc.afs-client new file mode 100644 index 0000000..f6d13ff --- /dev/null +++ b/rc.afs-client @@ -0,0 +1,372 @@ +#! /bin/sh +# Copyright (c) 1995-2000 SuSE GmbH Nuernberg, Germany. +# +# Author: Peter Poeml , 2001 +# Additions by Christof Hanke , 2009 +# +# /etc/init.d/afs-server +# and its symbolic link +# /usr/sbin/rcafs-server +# +# System startup script for OpenAFS +# +### BEGIN INIT INFO +# Provides: afs-client +# Required-Start: $local_fs +# Should-Start: $syslog $network $time +# Should-Stop: $null +# Required-Stop: $null +# Default-Start: 3 5 +# Default-Stop: 0 2 1 6 +# X-UnitedLinux-Default-Enabled: yes +# Short-Description: Start OpenAFS Client +# Description: Starts the OpenAFS Client by loading the required kernel-module and starting afsd. +### END INIT INFO + + +DAEMON="OpenAFS Client" +DAEMON_PIDFILE= +STARTPROC_LOGFILE= +SUPPORTS_HUP="no" +DAEMON_BIN=/usr/sbin/afsd +AFS_KERNEL_MODULE=libafs + +#test -x $DAEMON_BIN || exit 5 + +# Shell functions sourced from /etc/rc.status: +# rc_check check and set local and overall rc status +# rc_status check and set local and overall rc status +# rc_status -v ditto but be verbose in local rc status +# rc_status -v -r ditto and clear the local rc status +# rc_failed set local and overall rc status to failed +# rc_failed set local and overall rc status to +# rc_reset clear local rc status (overall remains) +# rc_exit exit appropriate to overall rc status +. /etc/rc.status + +. /etc/sysconfig/openafs-client + +CACHEINFO=${CACHEINFO:-/etc/openafs/cacheinfo} +CACHE=${CACHEDIR:-/var/cache/openafs} +AFS=${AFSDIR:-/afs} +REGENERATE_CELL_INFO=${REGENERATE_CELL_INFO:-no} +REGENERATE_CACHE_INFO=${REGENERATE_CACHE_INFO:-yes} +MEMCACHE=${MEMCACHE:-yes} +VERBOSE=${VERBOSE:-no} +DYNROOT=${DYNROOT:-yes} +FAKESTAT=${FAKESTAT:-yes} +AFSDB=${AFSDB:-yes} +DATA_ENCRYPTION=${DATA_ENCRYPTION:-yes} +THIS_CELL_SERVER_NAME=${THIS_CELL_SERVER_NAME:-unknown} +SERVER_TIMEOUT=120 + +check_configfiles() { + if [ ! -f /etc/openafs/ThisCell ]; then + echo "Invalid configuration. Cellconfiguration in /etc/openafs/ThisCell is missing." + rc_failed 1 + return + fi + if [ "$AFSDB" = "no" ] ; then + if [ ! -f /etc/openafs/CellServDB ]; then + echo "No CellServDB found and AFSDB=no." + echo "Either set AFSDB=yes in /etc/sysconfig/openafs [recommended] or" + echo "populate the /etc/openafs/CellServDB file" + rc_failed 1 + return + fi + + if [ "`grep -c \>$THIS_CELL /etc/openafs/CellServDB`" != "1" ] ; then + echo "Cannot find unique definition of your cell $THIS_CELL in /etc/openafs/CellServDB." + echo "Consider setting AFSDB=yes in /etc/sysconfig/openafs or" + echo "fix /etc/openafs/CellServDB." + rc_failed 1 + fi + fi +} + +generate_cellinfo() { + if [ "$REGENERATE_CELL_INFO" = "yes" -a "x$THIS_CELL" != "x" ]; then + rm -f /etc/openafs/ThisCell #it could be symlinks to server configuration + echo "$THIS_CELL" > /etc/openafs/ThisCell + + if [ -f /etc/openafs/CellServDB -a ! -L /etc/openafs/CellServDB ]; then + if grep -q "^>$THIS_CELL\([[:space:]#].*\)\?$" /etc/openafs/CellServDB ; then + # CellServDB contains THIS_CELL, replace servers + awk " + /^>$THIS_CELL([[:space:]#].*)?$/ { + this_cell=1; + print \$0; + print \"$THIS_CELL_SERVER #$THIS_CELL_SERVER_NAME\"; + next + } + /^>/ { + this_cell=0; + print \$0; + next + } + /^[^>[:space:]]+/ { + if (!this_cell) print \$0; + } + " /etc/openafs/CellServDB > /etc/openafs/CellServDB.new + else + # add THIS_CELL to CellServDB + echo ">$THIS_CELL #Cell name, generated from /etc/sysconfig/afs-client" >/etc/openafs/CellServDB.new + echo "$THIS_CELL_SERVER #$THIS_CELL_SERVER_NAME" >>/etc/openafs/CellServDB.new + cat /etc/openafs/CellServDB >> /etc/openafs/CellServDB.new + fi + mv -f /etc/openafs/CellServDB.new /etc/openafs/CellServDB + else + # new CellServDB + rm -f /etc/openafs/CellServDB #it could be symlinks to server configuration + echo ">$THIS_CELL #Cell name, generated from /etc/sysconfig/afs-client" >/etc/openafs/CellServDB + echo "$THIS_CELL_SERVER #$THIS_CELL_SERVER_NAME" >>/etc/openafs/CellServDB + fi + fi +} + +generate_cacheinfo() { + if [ "$REGENERATE_CACHE_INFO" = "yes" -a "x$CACHESIZE" != "x" ]; then + if [ "$CACHESIZE" = "AUTOMATIC" ]; then + if [ "$MEMCACHE" = "yes" ]; then + useCACHESIZE=`awk '/^MemTotal:/{ print int($2 / 8);}' /proc/meminfo` + else + LINE=`df -k $CACHE | tail -1` + PART=`echo $LINE | awk '{ if ( ($NF != "/usr") && ($NF != "/") && ($NF != "/var") ) print $NF; else print "NONE";}'` + if [ "$PART" = "NONE" ]; then + echo "$CACHE is not a separate partition" + echo "you have to change the cachesize in $SYSCNF by hand" + return 1 + else + PARTSIZE=`echo $LINE | awk '{print $2}'` + useCACHESIZE=`echo $PARTSIZE | awk '{printf "%d",int(($1*.8)/1024)*1024}'` + fi + fi + else + useCACHESIZE=$CACHESIZE + fi + echo $AFS:$CACHE:$useCACHESIZE >$CACHEINFO + chmod 0644 $CACHEINFO + mkdir -p $CACHE # to be sure + else + useCACHESIZE=`awk -F: '{print $3}' < $CACHEINFO` + fi + return 0 +} + +choose_afsdoptions() { + if [ "x$OPTIONS" = "x" -o "x$OPTIONS" = "xAUTOMATIC" ]; then + if [ $useCACHESIZE -lt 131072 ]; then + OPTIONS=$SMALL + elif [ $useCACHESIZE -lt 524288 ]; then + OPTIONS=$MEDIUM + elif [ $useCACHESIZE -lt 1048576 ]; then + OPTIONS=$LARGE + elif [ $useCACHESIZE -lt 2097152 ]; then + OPTIONS=$XLARGE + else + OPTIONS=$XXLARGE + fi + fi + AFSD_OPTIONS="$OPTIONS" + if [ "$MEMCACHE" = "yes" ]; then + AFSD_OPTIONS="$AFSD_OPTIONS -memcache" + if [ "x$OPTIONS" != "x" -a "x$CACHESIZE" != "xAUTOMATIC" ];then + AFSD_OPTIONS="$AFSD_OPTIONS -blocks $useCACHESIZE" + fi + fi + if [ "$VERBOSE" = "yes" ]; then + AFSD_OPTIONS="$AFSD_OPTIONS -verbose" + fi + if [ "$DYNROOT" = "yes" ]; then + AFSD_OPTIONS="$AFSD_OPTIONS -dynroot" + fi + if [ "$FAKESTAT" = "yes" ]; then + AFSD_OPTIONS="$AFSD_OPTIONS -fakestat" + fi + if [ "$AFSDB" = "yes" ]; then + AFSD_OPTIONS="$AFSD_OPTIONS -afsdb" + fi +} + +killafs() { + + SIGNAL=$1 + + PIDS=`lsof -Fp $AFS | sed -e 's/p//'` + + if [ "x" != "x$PIDS" ]; then + kill -$SIGNAL $PIDS >/dev/null 2>&1 + sleep 3 + fi +} + +wait_for_server() { + TIMEOUT=$SERVER_TIMEOUT + if [ -f /usr/sbin/bosserver ] && checkproc /usr/sbin/bosserver ; then + # we run on the same machine as the server + while /usr/sbin/bos status localhost -localauth |grep -q "salvaging file system"; do + echo + echo -n "Waiting for local AFS server to come up ..." + sleep 1 + TIMEOUT=$(( $TIMEOUT - 1 )) + [ $TIMEOUT -eq 0 ] && return 1 + done + fi + return 0 +} + +# First reset status of this service +rc_reset + +# Return values acc. to LSB for all commands but status: +# 0 - success +# 1 - generic or unspecified error +# 2 - invalid or excess argument(s) +# 3 - unimplemented feature (e.g. "reload") +# 4 - insufficient privilege +# 5 - program is not installed +# 6 - program is not configured +# 7 - program is not running +# +# Note that starting an already running service, stopping +# or restarting a not-running service as well as the restart +# with force-reload (in case signalling is not supported) are +# considered a success. + +case "$1" in + start) + echo "Starting $DAEMON " + + mkdir -p $AFS + + if generate_cacheinfo; then + generate_cellinfo + check_configfiles + choose_afsdoptions + if /sbin/modprobe --allow-unsupported-modules $AFS_KERNEL_MODULE ; then + if wait_for_server; then + ps ax | grep -q '\[afsd\]' || $DAEMON_BIN $AFSD_OPTIONS || rc_failed 1 + if [ "$DATA_ENCRYPTION" = "yes" ]; then + /usr/bin/fs setcrypt on + fi + if [ "x$SYSNAME" != "x" ]; then + /usr/bin/fs sysname $SYSNAME + fi + else + #local server not running + rc_failed 1 + fi + else + #modprobe failed + rc_failed 5 + fi + + else + rc_failed 6 + fi + # Remember status and be verbose + rc_status -v + ;; + stop) + [ "x`whoami`" = xroot ] || exit 4 # do not allow regular user to kill all his processes + echo -n "Shutting down $DAEMON " + if ps ax | grep -q '\[afsd\]'; then + echo + echo "Sending all processes using $AFS the TERM signal ..." + killafs TERM + echo "Sending all processes using $AFS the KILL signal ..." + killafs KILL + umount $AFS + fi + if grep -q ^$AFS_KERNEL_MODULE /proc/modules ; then + /sbin/rmmod $AFS_KERNEL_MODULE || rc_failed 1 + fi + # rmtsys doesn't go away, so kill them all to be sure + killall $DAEMON_BIN > /dev/null 2>&1 + # Remember status and be verbose + rc_status -v + ;; + try-restart) + ## Stop the service and if this succeeds (i.e. the + ## service was running before), start it again. + $0 stop && $0 start + + # Remember status and be quiet + rc_status + ;; + restart) + ## Stop the service and regardless of whether it was + ## running or not, start it again. + $0 stop + $0 start + + # Remember status and be quiet + rc_status + ;; + force-reload) + ## Signal the daemon to reload its config. Most daemons + ## do this on signal 1 (SIGHUP). + ## If it does not support it, restart. + + echo -n "Reload service $DAEMON" + + if [ "$SUPPORTS_HUP" = "yes" ] ; then + killproc -p $DAEMON_PIDFILE -HUP $DAEMON_BIN + #touch $DAEMON_PIDFILE + rc_status -v + else + $0 stop && $0 start + rc_status + fi + ;; + reload) + ## Like force-reload, but if daemon does not support + ## signalling, do nothing (!) + + if [ "$SUPPORTS_HUP" = "yes" ] ; then + # If it supports signalling: + echo -n "Reload service $DAEMON" + killproc -p $DAEMON_PIDFILE -HUP $DAEMON_BIN + #touch $DAEMON_PIDFILE + rc_status -v + else + ## Otherwise if it does not support reload: + rc_failed 3 + rc_status -v + fi + ;; + status) + echo -n "Checking for $DAEMON: " + ## Check status with checkproc(8), if process is running + ## checkproc will return with exit status 0. + + # Status has a slightly different for the status command: + # 0 - service running + # 1 - service dead, but /var/run/ pid file exists + # 2 - service dead, but /var/lock/ lock file exists + # 3 - service not running + + # NOTE: checkproc returns LSB compliant status values. + + ps ax | grep -q '\[afsd\]' || rc_failed 3 + + rc_status -v + ;; + probe) + ## Optional: Probe for the necessity of a reload, + ## give out the argument which is required for a reload. + + if [ "$DAEMON_CONF" -nt "$DAEMON_PIDFILE" ]; then + if [ "$SUPPORTS_HUP" = "yes" ]; then + echo reload + else + echo restart + fi + fi + ;; + *) + echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload|probe}" + exit 1 + ;; +esac +rc_exit diff --git a/rc.afs-fuse-client b/rc.afs-fuse-client new file mode 100644 index 0000000..92d9bbd --- /dev/null +++ b/rc.afs-fuse-client @@ -0,0 +1,364 @@ +#! /bin/sh +# Copyright (c) 1995-2000 SuSE GmbH Nuernberg, Germany. +# +# Author: Peter Poeml , 2001 +# Additions by Christof Hanke , 2009 +# +# /etc/init.d/afs-server +# and its symbolic link +# /usr/sbin/rcafs-server +# +# System startup script for OpenAFS +# +### BEGIN INIT INFO +# Provides: afs-client +# Required-Start: $local_fs $named $network $remote_fs +# Should-Start: $syslog $time kdc afs-server +# Should-Stop: $null +# Required-Stop: $null +# Default-Start: 3 5 +# Default-Stop: 0 2 1 6 +# Short-Description: Start OpenAFS Client +# Description: Starts the OpenAFS Client by loading the required kernel-module and starting afsd. +### END INIT INFO + + +DAEMON="OpenAFS Client" +DAEMON_PIDFILE= +STARTPROC_LOGFILE= +SUPPORTS_HUP="no" +DAEMON_BIN=/usr/sbin/afsd.fuse + +test -x $DAEMON_BIN || exit 5 + +# Shell functions sourced from /etc/rc.status: +# rc_check check and set local and overall rc status +# rc_status check and set local and overall rc status +# rc_status -v ditto but be verbose in local rc status +# rc_status -v -r ditto and clear the local rc status +# rc_failed set local and overall rc status to failed +# rc_failed set local and overall rc status to +# rc_reset clear local rc status (overall remains) +# rc_exit exit appropriate to overall rc status +. /etc/rc.status + +. /etc/sysconfig/openafs-fuse-client + +CACHEINFO=${CACHEINFO:-/etc/openafs/cacheinfo} +CACHE=${CACHEDIR:-/var/cache/openafs} +AFS=${AFSDIR:-/afs} +REGENERATE_CELL_INFO=${REGENERATE_CELL_INFO:-no} +REGENERATE_CACHE_INFO=${REGENERATE_CACHE_INFO:-yes} +MEMCACHE=${MEMCACHE:-yes} +VERBOSE=${VERBOSE:-no} +DYNROOT=${DYNROOT:-yes} +FAKESTAT=${FAKESTAT:-yes} +AFSDB=${AFSDB:-yes} +DATA_ENCRYPTION=${DATA_ENCRYPTION:-yes} +THIS_CELL_SERVER_NAME=${THIS_CELL_SERVER_NAME:-unknown} +SERVER_TIMEOUT=120 + +check_configfiles() { + if [ ! -f /etc/openafs/ThisCell ]; then + echo "Invalid configuration. Cellconfiguration in /etc/openafs/ThisCell is missing." + rc_failed 1 + return + fi + if [ "$AFSDB" = "no" ] ; then + if [ ! -f /etc/openafs/CellServDB ]; then + echo "No CellServDB found and AFSDB=no." + echo "Either set AFSDB=yes in /etc/sysconfig/openafs [recommended] or" + echo "populate the /etc/openafs/CellServDB file" + rc_failed 1 + return + fi + + if [ "`grep -c \>$THIS_CELL /etc/openafs/CellServDB`" != "1" ] ; then + echo "Cannot find unique definition of your cell $THIS_CELL in /etc/openafs/CellServDB." + echo "Consider setting AFSDB=yes in /etc/sysconfig/openafs or" + echo "fix /etc/openafs/CellServDB." + rc_failed 1 + fi + fi +} + +generate_cellinfo() { + if [ "$REGENERATE_CELL_INFO" = "yes" -a "x$THIS_CELL" != "x" ]; then + rm -f /etc/openafs/ThisCell #it could be symlinks to server configuration + echo "$THIS_CELL" > /etc/openafs/ThisCell + + if [ -f /etc/openafs/CellServDB -a ! -L /etc/openafs/CellServDB ]; then + if grep -q "^>$THIS_CELL\([[:space:]#].*\)\?$" /etc/openafs/CellServDB ; then + # CellServDB contains THIS_CELL, replace servers + awk " + /^>$THIS_CELL([[:space:]#].*)?$/ { + this_cell=1; + print \$0; + print \"$THIS_CELL_SERVER #$THIS_CELL_SERVER_NAME\"; + next + } + /^>/ { + this_cell=0; + print \$0; + next + } + /^[^>[:space:]]+/ { + if (!this_cell) print \$0; + } + " /etc/openafs/CellServDB > /etc/openafs/CellServDB.new + else + # add THIS_CELL to CellServDB + echo ">$THIS_CELL #Cell name, generated from /etc/sysconfig/afs-client" >/etc/openafs/CellServDB.new + echo "$THIS_CELL_SERVER #$THIS_CELL_SERVER_NAME" >>/etc/openafs/CellServDB.new + cat /etc/openafs/CellServDB >> /etc/openafs/CellServDB.new + fi + mv -f /etc/openafs/CellServDB.new /etc/openafs/CellServDB + else + # new CellServDB + rm -f /etc/openafs/CellServDB #it could be symlinks to server configuration + echo ">$THIS_CELL #Cell name, generated from /etc/sysconfig/afs-client" >/etc/openafs/CellServDB + echo "$THIS_CELL_SERVER #$THIS_CELL_SERVER_NAME" >>/etc/openafs/CellServDB + fi + fi +} + +generate_cacheinfo() { + if [ "$REGENERATE_CACHE_INFO" = "yes" -a "x$CACHESIZE" != "x" ]; then + if [ "$CACHESIZE" = "AUTOMATIC" ]; then + if [ "$MEMCACHE" = "yes" ]; then + useCACHESIZE=`awk '/^MemTotal:/{ print int($2 / 8);}' /proc/meminfo` + else + LINE=`df -k $CACHE | tail -1` + PART=`echo $LINE | awk '{ if ( ($NF != "/usr") && ($NF != "/") && ($NF != "/var") ) print $NF; else print "NONE";}'` + if [ "$PART" = "NONE" ]; then + echo "$CACHE is not a separate partition" + echo "you have to change the cachesize in $SYSCNF by hand" + return 1 + else + PARTSIZE=`echo $LINE | awk '{print $2}'` + useCACHESIZE=`echo $PARTSIZE | awk '{printf "%d",int(($1*.8)/1024)*1024}'` + fi + fi + else + useCACHESIZE=$CACHESIZE + fi + echo $AFS:$CACHE:$useCACHESIZE >$CACHEINFO + chmod 0644 $CACHEINFO + mkdir -p $CACHE # to be sure + else + useCACHESIZE=`awk -F: '{print $3}' < $CACHEINFO` + fi + return 0 +} + +choose_afsdoptions() { + if [ "x$OPTIONS" = "x" -o "x$OPTIONS" = "xAUTOMATIC" ]; then + if [ $useCACHESIZE -lt 131072 ]; then + OPTIONS=$SMALL + elif [ $useCACHESIZE -lt 524288 ]; then + OPTIONS=$MEDIUM + elif [ $useCACHESIZE -lt 1048576 ]; then + OPTIONS=$LARGE + elif [ $useCACHESIZE -lt 2097152 ]; then + OPTIONS=$XLARGE + else + OPTIONS=$XXLARGE + fi + fi + AFSD_OPTIONS="$OPTIONS" + if [ "$MEMCACHE" = "yes" ]; then + AFSD_OPTIONS="$AFSD_OPTIONS -memcache" + if [ "x$OPTIONS" != "x" -a "x$CACHESIZE" != "xAUTOMATIC" ];then + AFSD_OPTIONS="$AFSD_OPTIONS -blocks $useCACHESIZE" + fi + fi + if [ "$VERBOSE" = "yes" ]; then + AFSD_OPTIONS="$AFSD_OPTIONS -verbose" + fi + if [ "$DYNROOT" = "yes" ]; then + AFSD_OPTIONS="$AFSD_OPTIONS -dynroot" + fi + if [ "$FAKESTAT" = "yes" ]; then + AFSD_OPTIONS="$AFSD_OPTIONS -fakestat" + fi + if [ "$AFSDB" = "yes" ]; then + AFSD_OPTIONS="$AFSD_OPTIONS -afsdb" + fi +} + +killafs() { + + SIGNAL=$1 + + PIDS=`lsof -Fp $AFS | sed -e 's/p//'` + + if [ "x" != "x$PIDS" ]; then + kill -$SIGNAL $PIDS >/dev/null 2>&1 + sleep 3 + fi +} + +wait_for_server() { + TIMEOUT=$SERVER_TIMEOUT + if [ -f /usr/sbin/bosserver ] && checkproc /usr/sbin/bosserver ; then + # we run on the same machine as the server + while /usr/sbin/bos status localhost -localauth |grep -q "salvaging file system"; do + echo + echo -n "Waiting for local AFS server to come up ..." + sleep 1 + TIMEOUT=$(( $TIMEOUT - 1 )) + [ $TIMEOUT -eq 0 ] && return 1 + done + fi + return 0 +} + +# First reset status of this service +rc_reset + +# Return values acc. to LSB for all commands but status: +# 0 - success +# 1 - generic or unspecified error +# 2 - invalid or excess argument(s) +# 3 - unimplemented feature (e.g. "reload") +# 4 - insufficient privilege +# 5 - program is not installed +# 6 - program is not configured +# 7 - program is not running +# +# Note that starting an already running service, stopping +# or restarting a not-running service as well as the restart +# with force-reload (in case signalling is not supported) are +# considered a success. + +case "$1" in + start) + echo "Starting $DAEMON " + + mkdir -p $AFS + + if generate_cacheinfo; then + generate_cellinfo + check_configfiles + choose_afsdoptions + if wait_for_server; then + ps ax | grep -q '\[afsd\]' || $DAEMON_BIN $AFSD_OPTIONS || rc_failed 1 + if [ "$DATA_ENCRYPTION" = "yes" ]; then + /usr/bin/fs setcrypt on + fi + if [ "x$SYSNAME" != "x" ]; then + /usr/bin/fs sysname $SYSNAME + fi + else + #local server not running + rc_failed 1 + fi + else + rc_failed 6 + fi + # Remember status and be verbose + rc_status -v + ;; + stop) + [ "x`whoami`" = xroot ] || exit 4 # do not allow regular user to kill all his processes + echo -n "Shutting down $DAEMON " + if ps ax | grep -q '\[afsd\]'; then + echo + echo "Sending all processes using $AFS the TERM signal ..." + killafs TERM + echo "Sending all processes using $AFS the KILL signal ..." + killafs KILL + umount $AFS + fi + if grep -q ^$AFS_KERNEL_MODULE /proc/modules ; then + /sbin/rmmod $AFS_KERNEL_MODULE || rc_failed 1 + fi + # rmtsys doesn't go away, so kill them all to be sure + killall $DAEMON_BIN > /dev/null 2>&1 + # Remember status and be verbose + rc_status -v + ;; + try-restart) + ## Stop the service and if this succeeds (i.e. the + ## service was running before), start it again. + $0 stop && $0 start + + # Remember status and be quiet + rc_status + ;; + restart) + ## Stop the service and regardless of whether it was + ## running or not, start it again. + $0 stop + $0 start + + # Remember status and be quiet + rc_status + ;; + force-reload) + ## Signal the daemon to reload its config. Most daemons + ## do this on signal 1 (SIGHUP). + ## If it does not support it, restart. + + echo -n "Reload service $DAEMON" + + if [ "$SUPPORTS_HUP" = "yes" ] ; then + killproc -p $DAEMON_PIDFILE -HUP $DAEMON_BIN + #touch $DAEMON_PIDFILE + rc_status -v + else + $0 stop && $0 start + rc_status + fi + ;; + reload) + ## Like force-reload, but if daemon does not support + ## signalling, do nothing (!) + + if [ "$SUPPORTS_HUP" = "yes" ] ; then + # If it supports signalling: + echo -n "Reload service $DAEMON" + killproc -p $DAEMON_PIDFILE -HUP $DAEMON_BIN + #touch $DAEMON_PIDFILE + rc_status -v + else + ## Otherwise if it does not support reload: + rc_failed 3 + rc_status -v + fi + ;; + status) + echo -n "Checking for $DAEMON: " + ## Check status with checkproc(8), if process is running + ## checkproc will return with exit status 0. + + # Status has a slightly different for the status command: + # 0 - service running + # 1 - service dead, but /var/run/ pid file exists + # 2 - service dead, but /var/lock/ lock file exists + # 3 - service not running + + # NOTE: checkproc returns LSB compliant status values. + + ps ax | grep -q '\[afsd\]' || rc_failed 3 + + rc_status -v + ;; + probe) + ## Optional: Probe for the necessity of a reload, + ## give out the argument which is required for a reload. + + if [ "$DAEMON_CONF" -nt "$DAEMON_PIDFILE" ]; then + if [ "$SUPPORTS_HUP" = "yes" ]; then + echo reload + else + echo restart + fi + fi + ;; + *) + echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload|probe}" + exit 1 + ;; +esac +rc_exit diff --git a/rc.afs-server b/rc.afs-server new file mode 100644 index 0000000..ea9c87d --- /dev/null +++ b/rc.afs-server @@ -0,0 +1,228 @@ +#! /bin/sh +# Copyright (c) 1995-2000 SuSE GmbH Nuernberg, Germany. +# +# Author: Peter Poeml , 2001 +# Additions by Christof Hanke , 2009 +# +# /etc/init.d/afs-server +# and its symbolic link +# /usr/sbin/rcafs-server +# +# System startup script for OpenAFS +# +### BEGIN INIT INFO +# Provides: afs-server +# Required-Start: $local_fs +# Should-Start: $syslog $time $network +# Should-Stop: $null +# Required-Stop: $null +# Default-Start: 3 5 +# Default-Stop: 0 2 1 6 +# Short-Description: Start OpenAFS Server +# Description: Start OpenAFS Server. Basically just starts the bosserver which manages the rest. +### END INIT INFO + + +DAEMON="OpenAFS Server" +DAEMON_PIDFILE= +STARTPROC_LOGFILE= +SUPPORTS_HUP="no" +DAEMON_BIN=/usr/sbin/bosserver +if [ `uname -p` = "x86_64" ]; then + LIBDIR=lib64 +else + LIBDIR=lib +fi +VLSERVER_BIN=/usr/$LIBDIR/openafs/vlserver +PTSERVER_BIN=/usr/$LIBDIR/openafs/ptserver +FSSERVER_BIN=/usr/$LIBDIR/openafs/fileserver +VOLSERVER_BIN=/usr/$LIBDIR/openafs/volserver +SALVAGER_BIN=/usr/$LIBDIR/openafs/salvager +BOSCONFIG_FILE="/etc/openafs/server/BosConfig" + +#test -x $DAEMON_BIN || exit 5 + +# Shell functions sourced from /etc/rc.status: +# rc_check check and set local and overall rc status +# rc_status check and set local and overall rc status +# rc_status -v ditto but be verbose in local rc status +# rc_status -v -r ditto and clear the local rc status +# rc_failed set local and overall rc status to failed +# rc_failed set local and overall rc status to +# rc_reset clear local rc status (overall remains) +# rc_exit exit appropriate to overall rc status +. /etc/rc.status + +. /etc/sysconfig/openafs-server + +REQUIRE_NETINFO=${REQUIRE_NETINFO=:-yes} +REGENERATE_BOS_CONFIG=${REGENERATE_BOS_CONFIG==:-no} +START_DB_SERVERS=${START_DB_SERVERS=:-no} +START_FILESERVER=${START_FILESERVER=:-no} + +# First reset status of this service +rc_reset + +# Return values acc. to LSB for all commands but status: +# 0 - success +# 1 - generic or unspecified error +# 2 - invalid or excess argument(s) +# 3 - unimplemented feature (e.g. "reload") +# 4 - insufficient privilege +# 5 - program is not installed +# 6 - program is not configured +# 7 - program is not running +# +# Note that starting an already running service, stopping +# or restarting a not-running service as well as the restart +# with force-reload (in case signalling is not supported) are +# considered a success. + +# set ulimit for core files +ulimit -c 1000000 + +case "$1" in + start) + if [ "$REQUIRE_NETINFO" = "yes" ]; then + if [ ! -e /var/lib/openafs/NetInfo ]; then + echo -n "Not starting $DAEMON, because no Server-NetInfo file present." + echo -n "Create this file under /var/lib/openafs/NetInfo or disable this" + echo -n "check in /etc/sysconfig/openafs-server" + rc_failed 1 + rc_exit + fi + fi + if [ "$REGENERATE_BOS_CONFIG" = "yes" ]; then + echo -n Regenerating BosConfig-file + # save old BosConfig + mv $BOSCONFIG_FILE $BOSCONFIG_FILE.initsave + if [ "$BOSSERVER_RESTRICTED"= "yes" ]; then + echo restrictmode 1 > $BOSCONFIG_FILE + else + echo restrictmode 0 > $BOSCONFIG_FILE + fi + if [ "$BOSSERVER_RESTART_TIME" != "" ]; then + echo "$BOSSERVER_RESTART_TIME" >> $BOSCONFIG_FILE + else + echo "never" >> $BOSCONFIG_FILE + fi + if [ "$BOSSERVER_RESTART_FOR_NEWBINARIES_TIME" != "" ]; then + echo "$BOSSERVER_RESTART_FOR_NEWBINARIES_TIME" >> $BOSCONFIG_FILE + else + echo "never" >> $BOSCONFIG_FILE + fi + if [ "$START_DB_SERVERS" = "yes" ]; then + echo "bnode simple vlserver 1" >> $BOSCONFIG_FILE + echo "parm $VLSERVER_BIN $VLSERVER_OPTIONS" >> $BOSCONFIG_FILE + echo "end" >> $BOSCONFIG_FILE + echo "bnode simple ptserver 1" >> $BOSCONFIG_FILE + echo "parm $PTSERVER_BIN $PTSERVER_OPTIONS" >> $BOSCONFIG_FILE + echo "end" >> $BOSCONFIG_FILE + fi + if [ "$START_FILE_SERVERS" = "yes" ]; then + echo "bnode fs fs 1" >> $BOSCONFIG_FILE + echo "parm $FSSERVER_BIN $FSSERVER_OPTIONS" >> $BOSCONFIG_FILE + echo "parm $VOLSERVER_BIN $VOLSERVER_OPTIONS" >> $BOSCONFIG_FILE + echo "parm $SALVAGER_BIN $SALVAGER_OPTIONS" >> $BOSCONFIG_FILE + echo "end" >> $BOSCONFIG_FILE + fi + fi + echo -n "Starting $DAEMON" + + startproc $DAEMON_BIN $BOSSERVER_OPTIONS + + # Remember status and be verbose + rc_status -v + ;; + stop) + echo -n "Shutting down $DAEMON" + + checkproc $DAEMON_BIN && /usr/sbin/bos shutdown localhost -localauth -wait + killproc -HUP $DAEMON_BIN + # Remember status and be verbose + rc_status -v + ;; + try-restart) + ## Stop the service and if this succeeds (i.e. the + ## service was running before), start it again. + $0 stop && $0 start + + # Remember status and be quiet + rc_status + ;; + restart) + ## Stop the service and regardless of whether it was + ## running or not, start it again. + $0 stop + $0 start + + # Remember status and be quiet + rc_status + ;; + force-reload) + ## Signal the daemon to reload its config. Most daemons + ## do this on signal 1 (SIGHUP). + ## If it does not support it, restart. + + echo -n "Reload service $DAEMON" + + if [ "$SUPPORTS_HUP" = "yes" ] ; then + killproc -p $DAEMON_PIDFILE -HUP $DAEMON_BIN + #touch $DAEMON_PIDFILE + rc_status -v + else + $0 stop && $0 start + rc_status + fi + ;; + reload) + ## Like force-reload, but if daemon does not support + ## signalling, do nothing (!) + + if [ "$SUPPORTS_HUP" = "yes" ] ; then + # If it supports signalling: + echo -n "Reload service $DAEMON" + killproc -p $DAEMON_PIDFILE -HUP $DAEMON_BIN + #touch $DAEMON_PIDFILE + rc_status -v + else + ## Otherwise if it does not support reload: + rc_failed 3 + rc_status -v + fi + ;; + status) + echo -n "Checking for $DAEMON: " + ## Check status with checkproc(8), if process is running + ## checkproc will return with exit status 0. + + # Status has a slightly different for the status command: + # 0 - service running + # 1 - service dead, but /var/run/ pid file exists + # 2 - service dead, but /var/lock/ lock file exists + # 3 - service not running + + # NOTE: checkproc returns LSB compliant status values. + + checkproc $DAEMON_BIN + + rc_status -v + ;; + probe) + ## Optional: Probe for the necessity of a reload, + ## give out the argument which is required for a reload. + + if [ "$DAEMON_CONF" -nt "$DAEMON_PIDFILE" ]; then + if [ "$SUPPORTS_HUP" = "yes" ]; then + echo reload + else + echo restart + fi + fi + ;; + *) + echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload|probe}" + exit 1 + ;; +esac +rc_exit diff --git a/sysconfig.openafs-client b/sysconfig.openafs-client new file mode 100644 index 0000000..58f4576 --- /dev/null +++ b/sysconfig.openafs-client @@ -0,0 +1,144 @@ +## Path: Network/File systems/AFS client +## Description: AFS client configuration, default mode +## Type: yesno +## Default: no +# +# Set to "yes" if you want to generate CellServDB and ThisCell files +# from THIS_CELL and THIS_CELL_SERVER variables. +# If you want more complicated setting, set REGENERATE_CELL_INFO to "no" +# and edit the files manually. +# +REGENERATE_CELL_INFO="no" + +## Type: string +## Default: "" +# +# This cell name +# +THIS_CELL="" + +## Type: string +## Default: "" +# +# IP address of afs server for this cell +# +THIS_CELL_SERVER="" + +## Type: string +## Default: "" +# +# DNS name of afs server for this cell +# +THIS_CELL_SERVER_NAME="" + +## Type: yesno +## Default: yes +# +# Set to "yes" if you want to use data encription (secure, slower) +# +DATA_ENCRYPTION="yes" + +## Type: yesno +## Default: yes +# +# Set to "yes" if you want to generate cacheinfo file +# +REGENERATE_CACHE_INFO="yes" + +## Type: string +## Default: "" +# +# AFS client configuration options +# +XXLARGE="-stat 8000 -daemons 6 -volumes 256 -files 50000" +XLARGE="-stat 3600 -daemons 5 -volumes 196 -files 50000" +LARGE="-stat 2800 -daemons 5 -volumes 128" +MEDIUM="-stat 2000 -daemons 3 -volumes 70" +SMALL="-stat 300 -daemons 2 -volumes 50" + +## Type: yesno +## Default: yes +# +# Instead of mounting the home cell's root.afs volume at the AFS mount +# point (typically /afs) a fake root is constructed from information +# available in the client's CellServDB. +# With this option enabled openafs can start up even on network outage. +# +DYNROOT="yes" + +## Type: yesno +## Default: yes +# +# Instead of calling a stat on a mountpoint to a foreign cell, +# return a faked status to the application. +# "ls -l /afs" is the most prominent example for its usefulness. +# +FAKESTAT="yes" + + +## Type: yesno +## Default: yes +# +# Instead of looking up database server in CellServDB try DNS first. +# With this option enabled openafs can access cells which are not in the packaged CellServDB-file, but +# which do provide the required DNS-information. +# +AFSDB="yes" + +## Type: yesno +## Default: yes +# +# use memory-only cache +# +MEMCACHE="yes" + +## Type: string(AUTOMATIC) +## Default: AUTOMATIC +# +# if you set CACHESIZE to "AUTOMATIC", it will automatically be chosen +# deduced by parition sizes (does not work if your cache is on / or +# /usr or /var) or by machine memory size for memory-only cache, +# otherwise the value in (1k-blocks) specified here will be used. +# +CACHESIZE="AUTOMATIC" + +## Type: string(AUTOMATIC,$XXLARGE,$XLARGE,$LARGE,$MEDIUM,$SMALL) +## Default: AUTOMATIC +# +# If you set OPTIONS to "AUTOMATIC", the init script will choose a set +# of options based on the cache size, otherwise the values specified here +# will be used. +# +OPTIONS="AUTOMATIC" + +## Type: string(/var/cache/openafs) +## Default: /var/cache/openafs +# +# Path to cache directory, it is recommended to use separate partition. +# It does not work on reiserfs. A valid directory must be specified +# even if memory only cache is used. +# Recommended cache directory is "/var/cache/openafs" +# +CACHEDIR="/var/cache/openafs" + +## Type: string(/afs) +## Default: /afs +# +# AFS directory. You should never need to change this +# +AFSDIR=/afs + +## Type: yesno +## Default: no +# +# Set to "yes" for a lot of debugging information from afsd. Only +# useful for debugging as it prints _a lot_ of information. +# +VERBOSE="no" + +## Type: string +## Default: "" +# +# SYSNAME of client. Used to expand the magic "@sys" in pathes within /afs. +# If left blank, the hardcoded sysname (e.g. amd64_linux26) will be used. +SYSNAME="" diff --git a/sysconfig.openafs-client-systemd b/sysconfig.openafs-client-systemd new file mode 100644 index 0000000..4405486 --- /dev/null +++ b/sysconfig.openafs-client-systemd @@ -0,0 +1,13 @@ +# +# startup options for the openAFS client. +# see man afsd for details + + +AFSD_ARGS="-fakestat -memcache -blocks 102400 -dynroot -afsdb" + + +# +# sysname to set after startup +# leave empty for default setting. + +SYSNAME="" diff --git a/sysconfig.openafs-fuse-client b/sysconfig.openafs-fuse-client new file mode 100644 index 0000000..8a51291 --- /dev/null +++ b/sysconfig.openafs-fuse-client @@ -0,0 +1,145 @@ +## Path: Network/File systems/AFS client +## Description: AFS client configuration, default mode +## This package is for the fuse-client +## Type: yesno +## Default: no +# +# Set to "yes" if you want to generate CellServDB and ThisCell files +# from THIS_CELL and THIS_CELL_SERVER variables. +# If you want more complicated setting, set REGENERATE_CELL_INFO to "no" +# and edit the files manually. +# +REGENERATE_CELL_INFO="no" + +## Type: string +## Default: "" +# +# This cell name +# +THIS_CELL="" + +## Type: string +## Default: "" +# +# IP address of afs server for this cell +# +THIS_CELL_SERVER="" + +## Type: string +## Default: "" +# +# DNS name of afs server for this cell +# +THIS_CELL_SERVER_NAME="" + +## Type: yesno +## Default: yes +# +# Set to "yes" if you want to use data encription (secure, slower) +# +DATA_ENCRYPTION="yes" + +## Type: yesno +## Default: yes +# +# Set to "yes" if you want to generate cacheinfo file +# +REGENERATE_CACHE_INFO="yes" + +## Type: string +## Default: "" +# +# AFS client configuration options +# +XXLARGE="-stat 8000 -daemons 6 -volumes 256 -files 50000" +XLARGE="-stat 3600 -daemons 5 -volumes 196 -files 50000" +LARGE="-stat 2800 -daemons 5 -volumes 128" +MEDIUM="-stat 2000 -daemons 3 -volumes 70" +SMALL="-stat 300 -daemons 2 -volumes 50" + +## Type: yesno +## Default: yes +# +# Instead of mounting the home cell's root.afs volume at the AFS mount +# point (typically /afs) a fake root is constructed from information +# available in the client's CellServDB. +# With this option enabled openafs can start up even on network outage. +# +DYNROOT="yes" + +## Type: yesno +## Default: yes +# +# Instead of calling a stat on a mountpoint to a foreign cell, +# return a faked status to the application. +# "ls -l /afs" is the most prominent example for its usefulness. +# +FAKESTAT="yes" + + +## Type: yesno +## Default: yes +# +# Instead of looking up database server in CellServDB try DNS first. +# With this option enabled openafs can access cells which are not in the packaged CellServDB-file, but +# which do provide the required DNS-information. +# +AFSDB="yes" + +## Type: yesno +## Default: yes +# +# use memory-only cache +# +MEMCACHE="yes" + +## Type: string(AUTOMATIC) +## Default: AUTOMATIC +# +# if you set CACHESIZE to "AUTOMATIC", it will automatically be chosen +# deduced by parition sizes (does not work if your cache is on / or +# /usr or /var) or by machine memory size for memory-only cache, +# otherwise the value in (1k-blocks) specified here will be used. +# +CACHESIZE="AUTOMATIC" + +## Type: string(AUTOMATIC,$XXLARGE,$XLARGE,$LARGE,$MEDIUM,$SMALL) +## Default: AUTOMATIC +# +# If you set OPTIONS to "AUTOMATIC", the init script will choose a set +# of options based on the cache size, otherwise the values specified here +# will be used. +# +OPTIONS="AUTOMATIC" + +## Type: string(/var/cache/openafs) +## Default: /var/cache/openafs +# +# Path to cache directory, it is recommended to use separate partition. +# It does not work on reiserfs. A valid directory must be specified +# even if memory only cache is used. +# Recommended cache directory is "/var/cache/openafs" +# +CACHEDIR="/var/cache/openafs" + +## Type: string(/afs) +## Default: /afs +# +# AFS directory. You should never need to change this +# +AFSDIR=/afs + +## Type: yesno +## Default: no +# +# Set to "yes" for a lot of debugging information from afsd. Only +# useful for debugging as it prints _a lot_ of information. +# +VERBOSE="no" + +## Type: string +## Default: "" +# +# SYSNAME of client. Used to expand the magic "@sys" in pathes within /afs. +# If left blank, the hardcoded sysname (e.g. amd64_linux26) will be used. +SYSNAME="" diff --git a/sysconfig.openafs-fuse-client-systemd b/sysconfig.openafs-fuse-client-systemd new file mode 100644 index 0000000..a41b8a6 --- /dev/null +++ b/sysconfig.openafs-fuse-client-systemd @@ -0,0 +1,7 @@ +# +# startup options for the openAFS client. +# see man afsd for details + + +AFSD_ARGS="-fakestat -memcache -blocks 102400 -dynroot -afsdb" + diff --git a/sysconfig.openafs-server b/sysconfig.openafs-server new file mode 100644 index 0000000..b152f36 --- /dev/null +++ b/sysconfig.openafs-server @@ -0,0 +1,79 @@ +## Path: Network/File systems/AFS server +## Description: AFS server configuration, default mode +## Type: yesno +## Default: no +# +# Set to "yes" if you want to generate the BosConfig file +# from START_DB_SERVERS, START_FILESERVER and accompanying variables. +# If you want more complicated setting, set REGENERATE_BOS_CONFIG to "no" +# and edit the files manually. +# +REGENERATE_BOS_CONFIG="no" + +## Type: yesno +## Default: yes +# +# Set to "yes" if you require a NetInfo file before starting the service. +# useful for new installations, where you might forget this issue. +# +REQUIRE_NETINFO="yes" + +## Type: yesno +## Default: no +# +# Set to "yes" if want to start the database servers (vlserver,ptserver) on this host. +# Only useful if REGENERATE_BOS_CONFIG is set to 'yes' +# +START_DB_SERVERS="no" + +## Type: yesno +## Default: no +# +# Set to "yes" if want to start the fileserver on this host. +# Only useful if REGENERATE_BOS_CONFIG is set to 'yes' +# +START_FILESERVER="no" + +## Type: yesno +## Default: no +# +# Set to "yes" if want to start the bosserver in restricted mode on this host. +# Only useful if REGENERATE_BOS_CONFIG is set to 'yes' +# +BOSSERVER_RESTICTED="no" + +## Type: string +## Default: "" +# +# Set time to restart the AFS-servers at a given time in the week. +# Leave empty if you don't want to restart the servers at all +# Only useful if REGENERATE_BOS_CONFIG is set to 'yes' +# +BOSSERVER_RESTART_TIME="" + + +## Type: string +## Default: "" +# +# Set time to check for new server-binaries of the AFS-servers at a given time in the week. +# Leave empty if you don't want to do this automatic restart. +# When upgrading the openafs-servers rpm, running server processes are not restarted automatically. +# Use this to do so automatically. +# Only useful if REGENERATE_BOS_CONFIG is set to 'yes' +# +BOSSERVER_RESTART_FOR_NEWBINARIES_TIME="" + +## Type: string +## Default: "" +# +# AFS server configuration options +# command line options how to start the required servers. +# Only useful if REGENERATE_BOS_CONFIG is set to 'yes' +# + +BOSSERVER_OPTIONS="" +PTSERVER_OPTIONS="" +VLSERVER_OPTIONS="" +FSSERVER_OPTIONS="" +VOLSERVER_OPTIONS="" +SALVAGER_OPTIONS="" diff --git a/sysconfig.openafs-server-systemd b/sysconfig.openafs-server-systemd new file mode 100644 index 0000000..025e6c8 --- /dev/null +++ b/sysconfig.openafs-server-systemd @@ -0,0 +1,4 @@ +## Path: Network/File systems/AFS server +## Description: AFS server configuration, default mode + +# all is set in /etc/openafs/BosConfig