1 |
stefaan 07/09/19 10:09:33 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: openafs-1.4.4_p20070724-r1.ebuild |
5 |
Log: |
6 |
Forgot to apply the patch that makes this a real 20070724 version, fix in r1 |
7 |
(Portage version: 2.1.3.9) |
8 |
|
9 |
Revision Changes Path |
10 |
1.113 net-fs/openafs/ChangeLog |
11 |
|
12 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-fs/openafs/ChangeLog?rev=1.113&view=markup |
13 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-fs/openafs/ChangeLog?rev=1.113&content-type=text/plain |
14 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-fs/openafs/ChangeLog?r1=1.112&r2=1.113 |
15 |
|
16 |
Index: ChangeLog |
17 |
=================================================================== |
18 |
RCS file: /var/cvsroot/gentoo-x86/net-fs/openafs/ChangeLog,v |
19 |
retrieving revision 1.112 |
20 |
retrieving revision 1.113 |
21 |
diff -u -r1.112 -r1.113 |
22 |
--- ChangeLog 13 Sep 2007 20:12:00 -0000 1.112 |
23 |
+++ ChangeLog 19 Sep 2007 10:09:33 -0000 1.113 |
24 |
@@ -1,6 +1,12 @@ |
25 |
# ChangeLog for net-fs/openafs |
26 |
# Copyright 2002-2007 Gentoo Foundation; Distributed under the GPL v2 |
27 |
-# $Header: /var/cvsroot/gentoo-x86/net-fs/openafs/ChangeLog,v 1.112 2007/09/13 20:12:00 maekke Exp $ |
28 |
+# $Header: /var/cvsroot/gentoo-x86/net-fs/openafs/ChangeLog,v 1.113 2007/09/19 10:09:33 stefaan Exp $ |
29 |
+ |
30 |
+*openafs-1.4.4_p20070724-r1 (19 Sep 2007) |
31 |
+ |
32 |
+ 19 Sep 2007; Stefaan De Roeck <stefaan@g.o> |
33 |
+ +openafs-1.4.4_p20070724-r1.ebuild: |
34 |
+ Forgot to apply the patch that makes this a real 20070724 version, fix in r1 |
35 |
|
36 |
13 Sep 2007; Markus Meier <maekke@g.o> |
37 |
openafs-1.4.4_p20070724.ebuild: |
38 |
|
39 |
|
40 |
|
41 |
1.1 net-fs/openafs/openafs-1.4.4_p20070724-r1.ebuild |
42 |
|
43 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-fs/openafs/openafs-1.4.4_p20070724-r1.ebuild?rev=1.1&view=markup |
44 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-fs/openafs/openafs-1.4.4_p20070724-r1.ebuild?rev=1.1&content-type=text/plain |
45 |
|
46 |
Index: openafs-1.4.4_p20070724-r1.ebuild |
47 |
=================================================================== |
48 |
# Copyright 1999-2007 Gentoo Foundation |
49 |
# Distributed under the terms of the GNU General Public License v2 |
50 |
# $Header: /var/cvsroot/gentoo-x86/net-fs/openafs/openafs-1.4.4_p20070724-r1.ebuild,v 1.1 2007/09/19 10:09:33 stefaan Exp $ |
51 |
|
52 |
inherit flag-o-matic eutils linux-mod toolchain-funcs versionator |
53 |
|
54 |
PATCHVER=0.13 |
55 |
MY_PV_DATE=${PV#*_p} |
56 |
MY_PV=${PV%_p*} |
57 |
MY_P=${PN}-${MY_PV} |
58 |
S=${WORKDIR}/${MY_P} |
59 |
DESCRIPTION="The OpenAFS distributed file system" |
60 |
HOMEPAGE="http://www.openafs.org/" |
61 |
SRC_URI="http://openafs.org/dl/${PN}/${MY_PV}/${MY_P}-src.tar.bz2 |
62 |
doc? ( http://openafs.org/dl/${PN}/${MY_PV}/${MY_P}-doc.tar.bz2 ) |
63 |
mirror://gentoo/${PN}-gentoo-${PATCHVER}.tar.bz2 |
64 |
mirror://gentoo/${PN}-${MY_PV}-cvs${MY_PV_DATE}.patch.bz2" |
65 |
|
66 |
LICENSE="IBM openafs-krb5 openafs-krb5-a APSL-2 sun-rpc" |
67 |
SLOT="0" |
68 |
KEYWORDS="~alpha ~amd64 ~ppc ~ppc64 ~x86" |
69 |
IUSE="debug kerberos pam doc" |
70 |
|
71 |
RDEPEND="~net-fs/openafs-kernel-${PV} |
72 |
pam? ( sys-libs/pam ) |
73 |
kerberos? ( virtual/krb5 )" |
74 |
|
75 |
PATCHDIR=${WORKDIR}/gentoo/patches/$(get_version_component_range 1-2) |
76 |
CONFDIR=${WORKDIR}/gentoo/configs |
77 |
SCRIPTDIR=${WORKDIR}/gentoo/scripts |
78 |
|
79 |
src_unpack() { |
80 |
unpack ${A}; cd ${S} |
81 |
|
82 |
# Apply patches to apply chosen compiler settings, fix the hardcoded paths |
83 |
# to be more FHS friendly, and the fix the incorrect typecasts for va_arg |
84 |
EPATCH_SUFFIX="patch" epatch ${PATCHDIR} |
85 |
|
86 |
sed -i 's/^[ \t]*XCFLAGS.*//' src/cf/osconf.m4 |
87 |
|
88 |
epatch ${DISTDIR}/${MY_P}-cvs${MY_PV_DATE}.patch.bz2 |
89 |
|
90 |
./regen.sh || die "Failed: regenerating configure script" |
91 |
} |
92 |
|
93 |
src_compile() { |
94 |
# cannot use "use_with" macro, as --without-krb5-config crashes the econf |
95 |
local myconf="" |
96 |
if use kerberos; then |
97 |
myconf="--with-krb5-conf=$(type -p krb5-config)" |
98 |
fi |
99 |
|
100 |
ARCH="$(tc-arch-kernel)" \ |
101 |
XCFLAGS="${CFLAGS}" \ |
102 |
econf \ |
103 |
$(use_enable pam) \ |
104 |
$(use_enable debug) \ |
105 |
--enable-largefile-fileserver \ |
106 |
--enable-supergroups \ |
107 |
--with-linux-kernel-headers=${KV_DIR} \ |
108 |
${myconf} || die econf |
109 |
|
110 |
emake -j1 all_nolibafs || die "Build failed" |
111 |
} |
112 |
|
113 |
src_install() { |
114 |
make DESTDIR=${D} install_nolibafs || die "Installing failed" |
115 |
|
116 |
# pam_afs and pam_afs.krb have been installed in irregular locations, fix |
117 |
if use pam; then |
118 |
dodir /$(get_libdir)/security |
119 |
mv ${D}/usr/$(get_libdir)/pam_afs* ${D}/$(get_libdir)/security |
120 |
fi |
121 |
|
122 |
# compile_et collides with com_err. Remove it from this package. |
123 |
rm ${D}/usr/bin/compile_et |
124 |
|
125 |
# avoid collision with mit_krb5's version of kpasswd |
126 |
(cd ${D}/usr/bin; mv kpasswd kpasswd_afs) |
127 |
use doc && (cd doc/man-pages/man1; mv kpasswd.1 kpasswd_afs.1) |
128 |
|
129 |
# minimal documentation |
130 |
dodoc ${CONFDIR}/README ${CONFDIR}/CellServDB |
131 |
|
132 |
# documentation package |
133 |
if use doc; then |
134 |
# install manuals |
135 |
doman doc/man-pages/man?/*.? |
136 |
|
137 |
use pam && doman src/pam/pam_afs.5 |
138 |
|
139 |
cp -pPR doc/* ${D}/usr/share/doc/${PF} |
140 |
fi |
141 |
|
142 |
# Gentoo related scripts |
143 |
newconfd ${CONFDIR}/openafs-client openafs-client |
144 |
newconfd ${CONFDIR}/openafs-server openafs-server |
145 |
newinitd ${SCRIPTDIR}/openafs-client openafs-client |
146 |
newinitd ${SCRIPTDIR}/openafs-server openafs-server |
147 |
|
148 |
# used directories: client |
149 |
keepdir /etc/openafs |
150 |
keepdir /var/cache/openafs |
151 |
|
152 |
# used directories: server |
153 |
keepdir /etc/openafs/server |
154 |
diropts -m0700 |
155 |
keepdir /var/lib/openafs |
156 |
keepdir /var/lib/openafs/db |
157 |
diropts -m0755 |
158 |
keepdir /var/lib/openafs/logs |
159 |
|
160 |
# link logfiles to /var/log |
161 |
dosym ../lib/openafs/logs /var/log/openafs |
162 |
} |
163 |
|
164 |
migrate_to_fhs() { |
165 |
# conventions: |
166 |
# only automatically migrate if the destination directories are |
167 |
# as of yet non-existant |
168 |
|
169 |
# path translations |
170 |
local oldafsconfdir=${ROOT}usr/afs/etc |
171 |
local newafsconfdir=${ROOT}etc/openafs/server |
172 |
local oldviceetcdir=${ROOT}usr/vice/etc |
173 |
local newviceetcdir=${ROOT}etc/openafs |
174 |
local oldafslocaldir=${ROOT}usr/afs/local |
175 |
local newafslocaldir=${ROOT}var/lib/openafs |
176 |
local oldafsdbdir=${ROOT}usr/afs/db |
177 |
local newafsdbdir=${ROOT}var/lib/openafs/db |
178 |
|
179 |
# detect Transarc afsconfdir |
180 |
local afsconfdir=0 |
181 |
[ ! -L ${oldafsconfdir} -a -d ${oldafsconfdir} -a ! -e ${newafsconfdir} ] && afsconfdir=1 |
182 |
|
183 |
# detect Transarc viceetcdir |
184 |
local viceetcdir=0 |
185 |
local viceetcsoftlink=0 |
186 |
if [ -d ${oldviceetcdir} -a ! -e ${newviceetcdir} ]; then |
187 |
if [ ! -L ${oldviceetcdir} ]; then |
188 |
viceetcdir=1 |
189 |
else |
190 |
if [ $(readlink ${oldviceetcdir}) = /etc/afs ]; then |
191 |
viceetcdir=1 |
192 |
viceetcsoftlink=1 |
193 |
fi |
194 |
fi |
195 |
fi |
196 |
|
197 |
# detect Transarc afslocaldir |
198 |
local afslocaldir=0 |
199 |
[ ! -L ${oldafslocaldir} -a -d ${oldafslocaldir} -a ! -e ${newafslocaldir} ] && afslocaldir=1 |
200 |
|
201 |
# detect Transarc afsdbdir |
202 |
local afsdbdir=0 |
203 |
[ ! -L ${oldafsdbdir} -a -d ${oldafsdbdir} -a ! -e ${newafsdbdir} ] && afsdbdir=1 |
204 |
|
205 |
# detect Transarc afsbosconfigdir |
206 |
local afsbosconfigdir=0 |
207 |
[ ${afslocaldir} = 1 -a -f ${oldafslocaldir}/BosConfig ] && afsbosconfigdir=1 |
208 |
|
209 |
# any of these? |
210 |
local any=$((${afsconfdir}+${viceetcdir}+${afsdbdir}+${afslocaldir})) |
211 |
|
212 |
# No migration needed? Then bail out |
213 |
if [ ${any} = 0 ]; then |
214 |
return 0 |
215 |
fi |
216 |
|
217 |
# Root not / ? Then do not attempt automatic migration |
218 |
if [ "$ROOT" != "/" ]; then |
219 |
ewarn Old-style configuration files found, but not migrating |
220 |
ewarn because installation rootdir is not / |
221 |
ebeep 5 |
222 |
return 0 |
223 |
fi |
224 |
|
225 |
# detect whether an installation with old config files is running |
226 |
local pid |
227 |
if pid=$(pgrep -n -U 0 bosserver) &>/dev/null; then |
228 |
# find location of executable |
229 |
if ! executable=$(readlink /proc/${pid}/exe); then |
230 |
die "Couldn't execute readlink on bosserver process" |
231 |
fi |
232 |
# if executable is not located in /usr/sbin, assume Transarc locations |
233 |
if [[ $executable != ${ROOT}usr/sbin/* ]]; then |
234 |
ewarn "Found a running process with the name \"bosserver\" and pid ${pid}" |
235 |
ewarn "that is not located in /usr/sbin. This suggests a running" |
236 |
ewarn "OpenAFS-server with traditional TransARC path conventions." |
237 |
ewarn "This installation procedure aims to migrate old" |
238 |
ewarn "configuration files to new FHS-conform locations." |
239 |
ewarn "Please stop the running server and reattempt the upgrade" |
240 |
die "Installation aborted because of running OpenAFS server" |
241 |
fi |
242 |
fi |
243 |
|
244 |
# warn about migration |
245 |
ewarn |
246 |
ewarn "OpenAFS configuration/data-files have been found in old" |
247 |
ewarn "TransARC-style locations, for which the standard FHS equivalents" |
248 |
ewarn "do not exist yet. " |
249 |
ewarn "Following procedure will copy those files to the new locations such" |
250 |
ewarn "that, given a previously working configuration, both server" |
251 |
ewarn "and client should restart without problems. Files will be copied" |
252 |
ewarn "only, and not removed from the old locations. For assistance" |
253 |
ewarn "in removing the old files, consult the section on Upgrading in" |
254 |
ewarn "the Gentoo OpenAFS documentation" |
255 |
ewarn "(see http://www.gentoo.org/doc/en/openafs.xml)" |
256 |
ewarn "Will continue in 30 seconds, press Ctrl-C to abort" |
257 |
ewarn |
258 |
ebeep 10 |
259 |
epause 20 |
260 |
|
261 |
# fortunately, there's no overlap between the old locations and the new ones |
262 |
|
263 |
# afsconfdir: migrate /usr/afs/etc to /etc/openafs/server |
264 |
if [ ${afsconfdir} = 1 ]; then |
265 |
mkdir -m 755 -p ${newafsconfdir} |
266 |
cp ${oldafsconfdir}/* ${newafsconfdir} |
267 |
fi |
268 |
|
269 |
# viceetcdir: migrate /usr/vice/etc (likely a link to /etc/afs) to /etc/openafs |
270 |
if [ ${viceetcdir} = 1 ]; then |
271 |
mkdir -m 755 -p ${newviceetcdir} |
272 |
cp ${oldviceetcdir}/* ${newviceetcdir} |
273 |
fi |
274 |
|
275 |
# afslocaldir: migrate /usr/afs/local to /var/lib/openafs |
276 |
if [ ${afslocaldir} = 1 ]; then |
277 |
mkdir -m 700 -p ${newafslocaldir} |
278 |
cp ${oldafslocaldir}/* ${newafslocaldir} |
279 |
|
280 |
# afsbosconfigdir: migrate /usr/afs/local/BosConfig to /etc/openafs/BosConfig |
281 |
if [ ${afsbosconfigdir} = 1 ]; then |
282 |
sed -i \ |
283 |
-e 's:/usr/afs/bin/:/usr/libexec/openafs/:g' \ |
284 |
-e 's:/usr/afs/etc:/etc/openafs/server:g' \ |
285 |
-e 's:/usr/afs/bin:/usr/bin:g' \ |
286 |
${newafslocaldir}/BosConfig |
287 |
if [ -d ${newviceetcdir} ]; then |
288 |
mv ${newafslocaldir}/BosConfig ${newviceetcdir} |
289 |
else |
290 |
ewarn |
291 |
ewarn "No ${newviceetcdir} found, couldn't move BosConfig there," |
292 |
ewarn "it will remain in ${newafslocaldir}. Please investigate" |
293 |
ewarn "before attempting to start the server" |
294 |
ewarn |
295 |
ebeep 3 |
296 |
fi |
297 |
fi |
298 |
fi |
299 |
|
300 |
# afsdbdir: migrate /usr/afs/db to /var/lib/openafs/db |
301 |
if [ ${afsdbdir} = 1 ]; then |
302 |
mkdir -m 700 -p ${newafsdbdir} |
303 |
cp ${oldafsdbdir}/* ${newafsdbdir} |
304 |
fi |
305 |
|
306 |
ewarn "Migration finished" |
307 |
ewarn "Please remember to manually migrate disk-cache (if present)" |
308 |
ewarn "Alter /etc/openafs/cacheinfo to do so" |
309 |
ebeep 5 |
310 |
} |
311 |
|
312 |
migrate_configfile() { |
313 |
local oldconfigfile=${ROOT}etc/conf.d/afs |
314 |
local oldconfigfile2=${ROOT}etc/conf.d/afs-client |
315 |
local newconfigfile=${ROOT}etc/conf.d/openafs-client |
316 |
|
317 |
if [ -f ${oldconfigfile} -a ! -e ${newconfigfile} ]; then |
318 |
cp ${oldconfigfile} ${newconfigfile} |
319 |
elif [ -f ${oldconfigfile2} -a ! -e ${newconfigfile} ]; then |
320 |
cp ${oldconfigfile2} ${newconfigfile} |
321 |
fi |
322 |
|
323 |
oldconfigfile=${ROOT}etc/conf.d/afs-server |
324 |
newconfigfile=${ROOT}etc/conf.d/openafs-server |
325 |
if [ -f ${oldconfigfile} -a ! -e ${newconfigfile} ]; then |
326 |
cp ${oldconfigfile} ${newconfigfile} |
327 |
fi |
328 |
} |
329 |
|
330 |
pkg_preinst() { |
331 |
migrate_to_fhs |
332 |
migrate_configfile |
333 |
|
334 |
## Somewhat intelligently install default configuration files |
335 |
## (when they are not present) |
336 |
# CellServDB |
337 |
if [ ! -e ${ROOT}etc/openafs/CellServDB ] \ |
338 |
|| grep "GCO Public CellServDB" ${ROOT}etc/openafs/CellServDB &> /dev/null |
339 |
then |
340 |
cp ${CONFDIR}/CellServDB ${D}etc/openafs |
341 |
fi |
342 |
# cacheinfo: use a default location cache, 200 megabyte in size |
343 |
# (should be safe for about any root partition, the user can increase |
344 |
# the size as required) |
345 |
if [ ! -e ${ROOT}etc/openafs/cacheinfo ]; then |
346 |
echo "/afs:/var/cache/openafs:200000" > ${D}etc/openafs/cacheinfo |
347 |
fi |
348 |
# ThisCell: default to "openafs.org" |
349 |
if [ ! -e ${ROOT}etc/openafs/ThisCell ]; then |
350 |
echo "openafs.org" > ${D}etc/openafs/ThisCell |
351 |
fi |
352 |
} |
353 |
|
354 |
pkg_postinst() { |
355 |
elog |
356 |
elog "This installation should work out of the box (at least the" |
357 |
elog "client part doing global afs-cell browsing, unless you had" |
358 |
elog "a previous and different configuration). If you want to" |
359 |
elog "set up your own cell or modify the standard config," |
360 |
elog "please have a look at the Gentoo OpenAFS documentation" |
361 |
elog "(warning: it is not yet up to date wrt the new file locations)" |
362 |
elog |
363 |
elog "The documentation can be found at:" |
364 |
elog " http://www.gentoo.org/doc/en/openafs.xml" |
365 |
|
366 |
epause 5 |
367 |
} |
368 |
|
369 |
|
370 |
|
371 |
-- |
372 |
gentoo-commits@g.o mailing list |