diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2013-05-08 07:55:52 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2013-05-08 07:57:31 +0000 |
commit | a14ae3e3ee75f06a76c45069c247e9391b404557 (patch) | |
tree | 5ad4efffc847e84b7c2642fb0f247e2f00c7cfa3 | |
parent | f6e179c9c92e4c16c1e43c232c0f24b4cbd32685 (diff) | |
download | aports-a14ae3e3ee75f06a76c45069c247e9391b404557.tar.bz2 aports-a14ae3e3ee75f06a76c45069c247e9391b404557.tar.xz |
testing/rancid: minor cleanup
ref #1821
-rw-r--r-- | testing/rancid/APKBUILD | 57 | ||||
-rw-r--r-- | testing/rancid/rancid-2.3.2-conf.patch | 20 | ||||
-rw-r--r-- | testing/rancid/rancid.logrotate | 8 | ||||
-rw-r--r-- | testing/rancid/rancid.pre-install | 3 |
4 files changed, 67 insertions, 21 deletions
diff --git a/testing/rancid/APKBUILD b/testing/rancid/APKBUILD index 22f60753fb..a08d32b1fe 100644 --- a/testing/rancid/APKBUILD +++ b/testing/rancid/APKBUILD @@ -2,18 +2,23 @@ # Maintainer: Francesco Colista <francesco.colista@gmail.com> pkgname=rancid pkgver=2.3.8 -pkgrel=0 +pkgrel=1 pkgdesc="Really Awesome New Cisco confIg Differ" url="http://www.shrubbery.net/rancid/" arch="all" -license="CUSTOM" -depends="expect subversion" -depends_dev="automake autoconf libtool" -makedepends="$depends_dev" +license="BSD with advertising" +depends="expect perl logrotate" +depends_dev="" +makedepends="$depends_dev openssh-client cvs subversion" install="$pkgname.pre-install" subpackages="$pkgname-doc" -source="ftp://ftp.shrubbery.net/pub/$pkgname/$pkgname-$pkgver.tar.gz" -_builddir="$srcdir"/$pkgname-$pkgver +pkgusers="rancid" +pkggroups="netadm" +source="ftp://ftp.shrubbery.net/pub/rancid/rancid-$pkgver.tar.gz + rancid-2.3.2-conf.patch + rancid.logrotate" + +_builddir="$srcdir"/rancid-$pkgver prepare() { local i cd "$_builddir" @@ -26,22 +31,34 @@ prepare() { build() { cd "$_builddir" - ./configure --prefix=/home/rancid \ - --sysconfdir=/etc/rancid \ - --localstatedir=/var/rancid \ - --with-svn=fsfs || return 1 - make + ./configure --prefix=/usr \ + --sysconfdir=/etc/rancid \ + --mandir=/usr/share/man \ + --infodir=/usr/share/info \ + --localstatedir=/var \ + --enable-conf-install \ + --with-svn \ + || return 1 + make || return 1 } package() { cd "$_builddir" - mkdir -p "$pkgdir"/etc/rancid - mkdir -p "$pkgdir"/var/rancid 2>/dev/null - chown -R rancid:netadm "$pkgdir"/var/rancid 2>/dev/null - chown -R rancid:netadm "$pkgdir"/home/rancid 2>/dev/null - make DESTDIR="$pkgdir" install || return 1 - install -m640 -D "$_builddir"/cloginrc.sample "$pkgdir"/home/rancid/.cloginrc - install -m644 -D "$_builddir"/COPYING "$pkgdir"/usr/share/licenses/$pkgname/LICENSE + make DESTDIR="$pkgdir" install || return 1 + rm -f "$pkgdir"/usr/lib/*.la + install -D -m644 "$srcdir"/rancid.logrotate \ + "$pkgdir"/etc/logrotate.d/rancid || return 1 + install -d -m 0755 -o rancid -g netadm "$pkgdir"/var/rancid + install -d -m 0755 -o rancid -g netadm "$pkgdir"/var/log/rancid + install -d -m 0755 -o rancid -g netadm "$pkgdir"/var/log/rancid/old } -md5sums="8cdfdfd8ab989e924dae2560d81457a0 rancid-2.3.8.tar.gz" +md5sums="8cdfdfd8ab989e924dae2560d81457a0 rancid-2.3.8.tar.gz +bd2e1e80348d88a11ee838ff40270039 rancid-2.3.2-conf.patch +97c733c7420fe140b51a75d676431daf rancid.logrotate" +sha256sums="44e44c87a22968d5229c01d60aa46960da023a24846eef43f9e3c8d70fd5b3fb rancid-2.3.8.tar.gz +c98a96e0c3a16a228a83e7570ca1adc27e73cdcd4cc718aa0e2956454b564e9f rancid-2.3.2-conf.patch +5459497b88b9bfef122608a9a7fd70b23cfdf558617b62ab40cac5bc32226ad0 rancid.logrotate" +sha512sums="cd071670e160f2e8268e676ae92b0d982719a2bc306aef3ef8fdbbaae398854178613eee2a139f206e799eba6c0b49dce2094db69ea57ef938e5d0c2c294a3cc rancid-2.3.8.tar.gz +dbebdecb80483fff45cfdd7a541805f45ee4e180d47a79ce9b71c5aad012d6e782c9a9d29f1de0fc2b89642aeecfc90dfddb86a1e11564e30683fa55e7009d76 rancid-2.3.2-conf.patch +aefbdeb99acd6840ab7fe75602b4cec2ed07a4eb24d073a951feef22ab7e56aff098bed7e0ca042c977218a2311465780aa5e6203507da8ab43e132df9a21795 rancid.logrotate" diff --git a/testing/rancid/rancid-2.3.2-conf.patch b/testing/rancid/rancid-2.3.2-conf.patch new file mode 100644 index 0000000000..e68064ebf6 --- /dev/null +++ b/testing/rancid/rancid-2.3.2-conf.patch @@ -0,0 +1,20 @@ +--- ./etc/rancid.conf.sample.in.orig 2012-07-22 15:13:09.357012183 +0200 ++++ ./etc/rancid.conf.sample.in 2012-07-22 15:13:51.797481604 +0200 +@@ -22,7 +22,7 @@ + TMPDIR=/tmp; export TMPDIR + # Be careful changing this, it affects CVSROOT below. It should be a FQPN, not + # relative. +-BASEDIR=@localstatedir@; export BASEDIR ++BASEDIR=/var/rancid; export BASEDIR + PATH=@bindir@:@ENV_PATH@; export PATH + # Location of the CVS/SVN repository. Be careful changing this. + # If RCSSYS is svn, this can be: +@@ -34,7 +34,7 @@ + # commands can run, e.g. by running rancid-cvs after installation. + CVSROOT=$BASEDIR/CVS; export CVSROOT + # Location of log files produced by rancid-run(1). +-LOGDIR=$BASEDIR/logs; export LOGDIR ++LOGDIR=/var/log/rancid; export LOGDIR + # + # Select which RCS system to use, "cvs" (default) or "svn". Do not change + # this after CVSROOT has been created with rancid-cvs. Changing between these diff --git a/testing/rancid/rancid.logrotate b/testing/rancid/rancid.logrotate new file mode 100644 index 0000000000..3638b8b225 --- /dev/null +++ b/testing/rancid/rancid.logrotate @@ -0,0 +1,8 @@ +/var/log/rancid/* { + weekly + rotate 1 + notifempty + missingok + compress + olddir old +} diff --git a/testing/rancid/rancid.pre-install b/testing/rancid/rancid.pre-install index 9c90858b55..aa86d1cc50 100644 --- a/testing/rancid/rancid.pre-install +++ b/testing/rancid/rancid.pre-install @@ -1,4 +1,5 @@ #!/bin/sh + addgroup netadm 2>/dev/null -adduser -h /home/rancid -s /bin/sh -G netadm -D rancid 2>/dev/null || true +adduser -S -h /var/rancid -s /bin/sh -G netadm -D rancid 2>/dev/null exit 0 |