From a13f0bce70a1f7bb0a834f7fce5cac467b989eed Mon Sep 17 00:00:00 2001 From: jlam Date: Wed, 25 Sep 2002 00:06:33 +0000 Subject: * buildlink1 -> buildlink2 * Honor PKG_SYSCONFDIR * use bsd.pkg.install.mk to handle the rc.d scripts and config files --- net/arla/DEINSTALL | 11 +++++ net/arla/INSTALL | 24 +++++++++++ net/arla/MESSAGE | 42 +++++++++++-------- net/arla/Makefile | 102 +++++++++++++++++----------------------------- net/arla/PLIST | 18 +++----- net/arla/distinfo | 4 +- net/arla/files/arlad | 24 ----------- net/arla/files/arlad.sh | 25 ++++++++++++ net/arla/patches/patch-af | 37 +++++------------ 9 files changed, 143 insertions(+), 144 deletions(-) create mode 100644 net/arla/DEINSTALL create mode 100644 net/arla/INSTALL delete mode 100644 net/arla/files/arlad create mode 100644 net/arla/files/arlad.sh (limited to 'net') diff --git a/net/arla/DEINSTALL b/net/arla/DEINSTALL new file mode 100644 index 00000000000..cd64ba39da8 --- /dev/null +++ b/net/arla/DEINSTALL @@ -0,0 +1,11 @@ +# $NetBSD: DEINSTALL,v 1.1 2002/09/25 00:06:33 jlam Exp $ + +ARLA_CACHE="@ARLA_CACHE@" + +case ${STAGE} in +DEINSTALL) + ${RM} -rf ${ARLA_CACHE} + ${RM} -f ${PKG_PREFIX}/lkm/xfs_mod + ${RM} -f /sbin/mount_xfs + ;; +esac diff --git a/net/arla/INSTALL b/net/arla/INSTALL new file mode 100644 index 00000000000..3c38395d306 --- /dev/null +++ b/net/arla/INSTALL @@ -0,0 +1,24 @@ +# $NetBSD: INSTALL,v 1.1 2002/09/25 00:06:33 jlam Exp $ + +case ${STAGE} in +POST-INSTALL) + if [ ! -f /sbin/mount_xfs ]; then + ${ECHO} "Creating /sbin/mount_xfs" + ${LN} -s ${PKG_PREFIX}/sbin/mount_xfs /sbin/mount_xfs + fi + if [ "${PKG_SYSCONFDIR}" != "${PKG_PREFIX}/etc" ]; then + if [ -f ${PREFIX}/etc/arla.conf ]; then + ${CAT} << EOF +=========================================================================== + ======================== + === IMPORTANT NOTICE === + ======================== + + The default location of the arla configuration files has changed. + Please move them from ${PKG_PREFIX}/etc to /etc. +=========================================================================== +EOF + fi + fi + ;; +esac diff --git a/net/arla/MESSAGE b/net/arla/MESSAGE index 510260c101b..0ce9abfa0ee 100644 --- a/net/arla/MESSAGE +++ b/net/arla/MESSAGE @@ -1,28 +1,38 @@ =========================================================================== -$NetBSD: MESSAGE,v 1.2 2002/07/12 20:40:31 wiz Exp $ +$NetBSD: MESSAGE,v 1.3 2002/09/25 00:06:34 jlam Exp $ Arla now has been installed on your system. -The cache directory used by arla is ${ARLA_CACHE}. -This directory should be on a local disk. You can change the location +The cache directory used by arla is: + + ${ARLA_CACHE} + +This directory should be on a local disk. You can change the location of the cache directory by setting the ARLA_CACHE environment variable (or by setting ARLA_CACHE in /etc/mk.conf) to the desired location prior to building arla. -To complete the installation you'll have to configure arla. -Default configuration files are installed in ${PREFIX}/etc. +To complete the installation you'll have to configure arla. Default +configuration files are installed in: + + ${PREFIX}/share/examples/arla + +At a minimum, to configure an arla client, copy: + + ${PREFIX}/share/examples/CellServDB + ${PREFIX}/share/examples/SuidCells + ${PREFIX}/share/examples/ThisCell + ${PREFIX}/share/examples/arla.conf + +to ${PKG_SYSCONFDIR} and customize them, include an entry for xfs in your +/etc/fstab (see ${PREFIX}/share/examples/arla/fstab), append: + + ${PREFIX}/share/examples/arla/services -At a minimum, to configure an arla client, copy -${PREFIX}/etc/{CellServDB,SuidCells,ThisCell,arla.conf}.default to -${PREFIX}/etc/{CellServDB,SuidCells,ThisCell,arla.conf} and customize them. -Include an entry for xfs in your /etc/fstab -(see ${PREFIX}/share/examples/arla/fstab). -Also, append ${PREFIX}/share/examples/arla/services to /etc/services -and append ${PREFIX}/share/examples/arla/lkm.conf to /etc/lkm.conf. -You also have to enable loading of lkms in /etc/rc.conf (set lkm to YES). +to /etc/services and append: -Start scripts for arlad are provided in ${PREFIX}/etc/rc.d/arlad.sh (for -NetBSD prior to NetBSD-1.5) and ${PREFIX}/etc/rc.d/arlad (for NetBSD-1.5 -and later). + ${PREFIX}/share/examples/arla/lkm.conf +to /etc/lkm.conf. You also have to enable loading of lkms in /etc/rc.conf +(set lkm to YES). =========================================================================== diff --git a/net/arla/Makefile b/net/arla/Makefile index d45dc12199f..41b55b479aa 100644 --- a/net/arla/Makefile +++ b/net/arla/Makefile @@ -1,5 +1,4 @@ -# $NetBSD: Makefile,v 1.25 2002/09/23 14:37:18 wennmach Exp $ -# +# $NetBSD: Makefile,v 1.26 2002/09/25 00:06:34 jlam Exp $ DISTNAME= arla-0.35.9 PKGREVISION= 1 @@ -10,88 +9,63 @@ MAINTAINER= wennmach@netbsd.org HOMEPAGE= http://www.stacken.kth.se/project/arla/ COMMENT= Free AFS implementation from KTH +CONFLICTS+= lwp-[0-9]* +CONFLICTS+= rx-[0-9]* + +OSVERSION_SPECIFIC= yes +INFO_FILES= arla.info + +USE_BUILDLINK2= # defined +USE_X11= # defined +GNU_CONFIGURE= # defined + .if exists(/usr/lib/libroken.a) -CONFIGURE_ARGS+= --with-krb4-lib=/usr +CONFIGURE_ARGS+= --with-krb4-lib=/usr/lib CONFIGURE_ARGS+= --with-krb4-include=/usr/include/kerberosIV CONFIGURE_ARGS+= --with-roken=/usr CONFIGURE_ARGS+= --with-roken-include=/usr/include/krb5 .else -.include "../../security/kth-krb4/buildlink.mk" +. include "../../security/kth-krb4/buildlink2.mk" USE_BUILDLINK_ONLY= # defined -CONFIGURE_ARGS+= --with-krb4-lib=${BUILDLINK_DIR} -CONFIGURE_ARGS+= --with-krb4-include=${BUILDLINK_DIR}/include -CONFIGURE_ARGS+= --with-roken=${BUILDLINK_DIR} -CONFIGURE_ARGS+= --with-roken-include=${BUILDLINK_DIR}/include/kerberosIV +CONFIGURE_ARGS+= --with-krb4-lib=${BUILDLINK_PREFIX.kth-krb4} +CONFIGURE_ARGS+= --with-krb4-include=${BUILDLINK_PREFIX.kth-krb4}/include +CONFIGURE_ARGS+= --with-roken=${BUILDLINK_PREFIX.kth-krb4} +CONFIGURE_ARGS+= --with-roken-include=${BUILDLINK_PREFIX.kth-krb4}/include/kerberosIV .endif -# for "amon": -.include "../../mk/x11.buildlink.mk" - -CONFLICTS+= lwp-[0-9]* -CONFLICTS+= rx-[0-9]* - -OSVERSION_SPECIFIC= yes -GNU_CONFIGURE= yes -INFO_FILES= arla.info - .include "../../mk/bsd.prefs.mk" .if !exists(/sys/lib/libkern/libkern.h) -.if exists(${BSDSRCDIR}/sys/lib/libkern/libkern.h) +. if exists(${BSDSRCDIR}/sys/lib/libkern/libkern.h) CONFIGURE_ARGS+= --with-sys=${BSDSRCDIR}/sys -.else +. else IGNORE= "${PKGNAME} requires kernel sources available under \$$BSDSRCDIR/sys (or /sys)" -.endif +. endif .endif -.if defined(ARLA_CACHE) +CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR} CONFIGURE_ARGS+= --with-arlacachedir=${ARLA_CACHE} -.endif +MESSAGE_SUBST+= ARLA_CACHE=${ARLA_CACHE} +PLIST_SUBST+= ARLA_CACHE=${ARLA_CACHE} +FILES_SUBST+= ARLA_CACHE=${ARLA_CACHE} -.if defined(ARLA_CACHE) -CACHEDIR= ${ARLA_CACHE} -.else -CACHEDIR= ${LOCALBASE}/cache -.endif -MESSAGE_SUBST+= ARLA_CACHE=${CACHEDIR} -PLIST_SUBST+= ARLA_CACHE=${CACHEDIR} +EGDIR= ${PREFIX}/share/examples/arla +RCD_SCRIPTS= arlad -do-configure: -# *Sometimes* it's bad to try to be too smart: -# pkgsrc's LDFLAGS choice is completely inadequate for arla, since -# arla's configure uses $LDFLAGS as flags for $LD, whereas -# pkgsrc's LDFLAGS are conceived to be used with $CC -# So, basically, bsd.pkg.mk sets LDFLAGS=-Wl,-R${LOCALBASE} -# while arla expects LDFLAGS=-R${LOCALBASE} - @(LDFLAGS= ; cd ${WRKSRC}; ./configure ${CONFIGURE_ARGS}) +CONF_FILES= ${EGDIR}/CellServDB ${PKG_SYSCONFDIR}/CellServDB +CONF_FILES+= ${EGDIR}/SuidCells ${PKG_SYSCONFDIR}/SuidCells +CONF_FILES+= ${EGDIR}/ThisCell ${PKG_SYSCONFDIR}/ThisCell +CONF_FILES+= ${EGDIR}/arla.conf ${PKG_SYSCONFDIR}/arla.conf +OWN_DIRS_PERMS= ${ARLA_CACHE} ${ROOT_USER} ${ROOT_GROUP} 0700 post-install: - @${ECHO} " " - @if [ -e ${CACHEDIR} ]; then \ - ${ECHO} "Arla cache dir (${CACHEDIR}) already exists"; \ - else \ - ${ECHO} "Creating arla cache directory ${CACHEDIR}"; \ - ${INSTALL_DATA_DIR} ${CACHEDIR}; \ - ${CHMOD} 700 ${CACHEDIR}; \ - ${CHOWN} ${ROOT_USER} ${CACHEDIR}; \ - fi - @if [ -e /sbin/mount_xfs ]; then \ - ${ECHO} "/sbin/mount_xfs already exists"; \ - else \ - ${ECHO} "Creating /sbin/mount_xfs"; \ - ${LN} -s ${PREFIX}/sbin/mount_xfs /sbin/mount_xfs; \ - fi - @-${INSTALL_DATA_DIR} ${PREFIX}/share/examples/arla - @${SED} -e 's|@PREFIX@|${PREFIX}|g' \ - < ${FILESDIR}/lkm.conf \ - > ${PREFIX}/share/examples/arla/lkm.conf - @${INSTALL_DATA} \ - ${FILESDIR}/services ${PREFIX}/share/examples/arla - @${INSTALL_DATA} \ - ${FILESDIR}/fstab ${PREFIX}/share/examples/arla - @${SED} -e 's|@PREFIX@|${PREFIX}|' ${FILESDIR}/arlad \ - > ${PREFIX}/etc/rc.d/arlad - @${ECHO} " " + ${RM} -f ${EGDIR}/*.default + ${SED} ${FILES_SUBST_SED} \ + < ${FILESDIR}/lkm.conf > ${WRKDIR}/lkm.conf + ${INSTALL_DATA} ${WRKDIR}/lkm.conf ${EGDIR} + ${INSTALL_DATA} ${FILESDIR}/services ${EGDIR} + ${INSTALL_DATA} ${FILESDIR}/fstab ${EGDIR} .include "../../mk/texinfo.mk" +.include "../../mk/bsd.pkg.install.mk" .include "../../mk/bsd.pkg.mk" diff --git a/net/arla/PLIST b/net/arla/PLIST index 0ee4710f07d..daf0634991e 100644 --- a/net/arla/PLIST +++ b/net/arla/PLIST @@ -1,4 +1,4 @@ -@comment $NetBSD: PLIST,v 1.9 2002/09/23 14:37:18 wennmach Exp $ +@comment $NetBSD: PLIST,v 1.10 2002/09/25 00:06:34 jlam Exp $ bin/aklog bin/amon bin/bos @@ -14,10 +14,6 @@ bin/unlog bin/up bin/vos bin/ydr -etc/CellServDB.default -etc/SuidCells.default -etc/ThisCell.default -etc/arla.conf.default etc/rc.d/arlad include/afs/cmd.h include/arlalib.h @@ -59,9 +55,7 @@ include/ubik.ss.h include/vldb.cs.h include/vldb.h include/vldb.ss.h -@unexec ${INSTALL_INFO} --delete %D/info/arla.info %D/info/dir info/arla.info -@exec ${INSTALL_INFO} %D/info/arla.info %D/info/dir lib/libarlalib.a lib/libbosclient.a lib/libbosserver.a @@ -108,14 +102,14 @@ sbin/rxperf sbin/startarla sbin/umount_xfs sbin/xfs_makedev +share/examples/arla/CellServDB +share/examples/arla/SuidCells +share/examples/arla/ThisCell +share/examples/arla/arla.conf share/examples/arla/fstab share/examples/arla/lkm.conf share/examples/arla/services -@unexec /bin/rm -f %D/lkm/xfs_mod -@exec if [ ! -e /sbin/mount_xfs ]; then /bin/ln -s %D/sbin/mount_xfs /sbin/mount_xfs; fi -@exec if [ ! -e ${ARLA_CACHE} ] ; then ${MKDIR} ${ARLA_CACHE}; ${CHMOD} 700 ${ARLA_CACHE}; ${CHOWN} root ${ARLA_CACHE}; fi -@unexec /bin/rm -rf ${ARLA_CACHE} -@unexec /bin/rm -f /sbin/mount_xfs @dirrm share/examples/arla +@unexec ${RMDIR} %D/lkm 2>/dev/null || ${TRUE} @dirrm include/rx @dirrm include/afs diff --git a/net/arla/distinfo b/net/arla/distinfo index 8c58e5092c9..ec5c358dc81 100644 --- a/net/arla/distinfo +++ b/net/arla/distinfo @@ -1,11 +1,11 @@ -$NetBSD: distinfo,v 1.7 2002/09/23 14:37:18 wennmach Exp $ +$NetBSD: distinfo,v 1.8 2002/09/25 00:06:34 jlam Exp $ SHA1 (arla-0.35.9.tar.gz) = e61f73dced5ec2951d7f0641bfdd6e1acb2cacaa Size (arla-0.35.9.tar.gz) = 1341786 bytes SHA1 (patch-ac) = a1d725edea6aaf3711c0d62a5ab5acd84d5fe4b7 SHA1 (patch-ad) = c5c33c0daf8174b2f8f76119f97725cd61015bb6 SHA1 (patch-ae) = f9255bc814f38cb8309380a44c1942d3d2cb233e -SHA1 (patch-af) = 5df593de73674dd6a22d57df441b6e70ea145704 +SHA1 (patch-af) = 90b230d2f462a01528c157352e257e3c3e58c7b5 SHA1 (patch-ah) = 8386d4062aedbfe24c66cad84cfdcf3a2617848e SHA1 (patch-ak) = 2ff053009ac94ea23b24494462e79e7507c0c1cb SHA1 (patch-as) = 28d61906be25fc803882d4ccbe584f57e51dec63 diff --git a/net/arla/files/arlad b/net/arla/files/arlad deleted file mode 100644 index 13c431290de..00000000000 --- a/net/arla/files/arlad +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh -# -# $NetBSD: arlad,v 1.2 2002/08/07 08:30:51 jlam Exp $ -# -# PROVIDE: arlad -# REQUIRE: beforemountlkm - -if [ -f /etc/rc.subr ]; then - . /etc/rc.subr -fi - -name="arlad" -rcvar=$name -command="@PREFIX@/libexec/${name}" -command_args="-z /dev/xfs0" -required_files="/dev/xfs0" - -if [ -f /etc/rc.subr -a -d /etc/rc.d -a -f /etc/rc.d/DAEMON ]; then - load_rc_config $name - run_rc_command "$1" -else - echo -n ' ${name}' - ${command} ${arlad_flags} ${command_args} -fi diff --git a/net/arla/files/arlad.sh b/net/arla/files/arlad.sh new file mode 100644 index 00000000000..1bd3cf7271e --- /dev/null +++ b/net/arla/files/arlad.sh @@ -0,0 +1,25 @@ +#!/bin/sh +# +# $NetBSD: arlad.sh,v 1.4 2002/09/25 00:06:34 jlam Exp $ +# +# PROVIDE: arlad +# REQUIRE: beforemountlkm + +if [ -f /etc/rc.subr ]; then + . /etc/rc.subr +fi + +name="arlad" +rcvar=$name +command="@PREFIX@/libexec/${name}" +command_args="-z /dev/xfs0" +required_files="/dev/xfs0" + +if [ -f /etc/rc.subr -a -d /etc/rc.d -a -f /etc/rc.d/DAEMON ]; then + load_rc_config $name + eval [ -z "\$${rcvar}" ] && eval ${rcvar}=NO + run_rc_command "$1" +else + echo -n ' ${name}' + ${command} ${arlad_flags} ${command_args} +fi diff --git a/net/arla/patches/patch-af b/net/arla/patches/patch-af index eb7e567fc23..432ff37ae72 100644 --- a/net/arla/patches/patch-af +++ b/net/arla/patches/patch-af @@ -1,29 +1,14 @@ -$NetBSD: patch-af,v 1.2 2000/08/15 16:08:25 wennmach Exp $ +$NetBSD: patch-af,v 1.3 2002/09/25 00:06:34 jlam Exp $ -Do not attempt to install CellServDB, ThisCell, arla.conf. Only install -the default files and tell the user to customize them. This avoids PLIST -magic and assures that no customized files will be removed on pkg_delete. - ---- conf/Makefile.in.orig Tue May 30 22:42:05 2000 -+++ conf/Makefile.in Tue May 30 22:45:45 2000 -@@ -26,19 +26,13 @@ - for x in $$CONF_FILES; do \ - echo $(INSTALL_DATA) $(srcdir)/$$x $(DESTDIR)$(sysconfdir)/$$x.default; \ - $(INSTALL_DATA) $(srcdir)/$$x $(DESTDIR)$(sysconfdir)/$$x.default; \ -- if test -f $(DESTDIR)$(sysconfdir)/$$x; then \ -- echo "$@ will not overwrite $(DESTDIR)$(sysconfdir)/$$x"; \ -- else \ -- echo $(INSTALL_DATA) $(srcdir)/$$x $(DESTDIR)$(sysconfdir)/$$x; \ -- $(INSTALL_DATA) $(srcdir)/$$x $(DESTDIR)$(sysconfdir)/$$x; \ -- fi; \ - done -+ > $(DESTDIR)$(sysconfdir)/SuidCells.default +--- conf/Makefile.in.orig Sat Oct 7 23:20:42 2000 ++++ conf/Makefile.in +@@ -13,7 +13,8 @@ ARLACACHEDIR = @ARLACACHEDIR@ + CHMOD = @chmod@ + + prefix = @prefix@ +-sysconfdir = @sysconfdir@ ++exampledir = $(prefix)/share/examples/arla ++sysconfdir = $(exampledir) - uninstall: - CONF_FILES='$(CONF_FILES)'; \ - for x in $$CONF_FILES; do \ - rm -f $(DESTDIR)$(sysconfdir)/$$x.default; \ -- rm -f $(DESTDIR)$(sysconfdir)/$$x; \ - done + CONF_FILES = CellServDB ThisCell arla.conf SuidCells - clean : -- cgit v1.2.3