commit 622aebcaecfa4bec064f8b44a5c1ff20205d269c
Author: Elan Ruusamäe <g...@delfi.ee>
Date:   Fri Dec 18 21:44:44 2015 +0200

    new, version 3.2
    
    based on fedora package, a012e08

 rancid-Makefile.patch |  11 +++++
 rancid-conf.patch     |  22 ++++++++++
 rancid.cron           |   6 +++
 rancid.logrotate      |   8 ++++
 rancid.spec           | 109 ++++++++++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 156 insertions(+)
---
diff --git a/rancid.spec b/rancid.spec
new file mode 100644
index 0000000..ff15018
--- /dev/null
+++ b/rancid.spec
@@ -0,0 +1,109 @@
+%include       /usr/lib/rpm/macros.perl
+Summary:       Really Awesome New Cisco confIg Differ
+Name:          rancid
+Version:       3.2
+Release:       0.1
+License:       BSD with advertising
+Group:         Applications/Networking
+Source0:       ftp://ftp.shrubbery.net/pub/rancid/%{name}-%{version}.tar.gz
+# Source0-md5: b0bd8a9f98bc1077893425059a03b7ec
+Source1:       %{name}.cron
+Source2:       %{name}.logrotate
+Patch0:                %{name}-conf.patch
+Patch1:                %{name}-Makefile.patch
+URL:           http://www.shrubbery.net/rancid/
+BuildRequires: autoconf
+BuildRequires: automake
+BuildRequires: cvs
+BuildRequires: expect >= 5.40
+BuildRequires: iputils
+BuildRequires: openssh-clients
+BuildRequires: perl
+BuildRequires: rpm-perlprov >= 4.1-13
+#BuildRequires:        rsh
+#BuildRequires:        sendmail
+BuildRequires: subversion
+BuildRequires: telnet
+Requires:      expect >= 5.40
+Requires:      findutils
+Requires:      iputils
+BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+# should be provided by this package
+%define                _noautoreq_perl rancid
+
+%description
+RANCID monitors a router's (or more generally a device's)
+configuration, including software and hardware (cards, serial numbers,
+etc) and uses CVS (Concurrent Version System) or Subversion to
+maintain history of changes.
+
+%prep
+%setup -q
+%patch0 -p1
+%patch1 -p1
+
+%build
+%configure \
+       --sysconfdir=%{_sysconfdir}/%{name} \
+       --bindir=%{_libexecdir}/%{name} \
+       --libdir=%{perl_vendorlib} \
+       --enable-conf-install
+
+%{__make}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+%{__make} install \
+       INSTALL="install -p" \
+       DESTDIR=$RPM_BUILD_ROOT
+
+install -d $RPM_BUILD_ROOT%{_localstatedir}/{%{name},log/%{name}/old}
+install -d $RPM_BUILD_ROOT{/etc/{cron.d,logrotate.d},%{_bindir}}
+
+%{__sed} -e 's|RANCIDBINDIR|%{_libexecdir}/%{name}|g' %{SOURCE1} > 
$RPM_BUILD_ROOT/etc/cron.d/%{name}
+cp -p %{SOURCE2} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}
+
+# symlink some bins
+for base in \
+       %{name} %{name}-cvs %{name}-fe %{name}-run
+       do
+       ln -sf %{_libexecdir}/%{name}/${base} \
+       $RPM_BUILD_ROOT%{_bindir}/${base}
+done
+
+# duplicate with %doc
+%{__rm} 
$RPM_BUILD_ROOT%{_datadir}/%{name}/{CHANGES,COPYING,FAQ,README*,UPGRADING}
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%pre
+groupadd -r %{name}
+useradd -r -g %{name} -d %{_localstatedir}/%{name} -s /bin/sh -k /etc/skel -m 
-c "RANCID" %{name}
+
+%files
+%defattr(644,root,root,755)
+%doc CHANGES cloginrc.sample COPYING FAQ README README.lg Todo
+%attr(750,rancid,rancid) %dir %{_sysconfdir}/%{name}
+%attr(640,rancid,rancid) %config(noreplace) %verify(not md5 mtime size) 
%{_sysconfdir}/%{name}/lg.conf
+%attr(640,rancid,rancid) %config(noreplace) %verify(not md5 mtime size) 
%{_sysconfdir}/%{name}/rancid.conf
+%attr(640,rancid,rancid) %config(noreplace) %verify(not md5 mtime size) 
%{_sysconfdir}/%{name}/rancid.types.base
+%config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}
+%config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/%{name}
+%attr(755,root,root) %{_bindir}/rancid
+%attr(755,root,root) %{_bindir}/rancid-cvs
+%attr(755,root,root) %{_bindir}/rancid-fe
+%attr(755,root,root) %{_bindir}/rancid-run
+%{_mandir}/man1/*.1*
+%{_mandir}/man3/rancid.3*
+%{_mandir}/man5/*.5*
+
+%dir %{_libdir}/%{name}
+%attr(755,root,root) %{_libdir}/%{name}/*
+%{_datadir}/%{name}
+%{perl_vendorlib}/%{name}
+
+%attr(750,rancid,rancid) %dir %{_localstatedir}/log/%{name}
+%attr(750,rancid,rancid) %dir %{_localstatedir}/log/%{name}/old
+%attr(750,rancid,rancid) %dir %{_localstatedir}/%{name}/
diff --git a/rancid-Makefile.patch b/rancid-Makefile.patch
new file mode 100644
index 0000000..cd74465
--- /dev/null
+++ b/rancid-Makefile.patch
@@ -0,0 +1,11 @@
+--- a/bin/Makefile.in  2014-10-06 20:47:51.219724697 -0700
++++ b/bin/Makefile.in  2014-10-06 20:48:00.763494836 -0700
+@@ -227,7 +227,7 @@
+ #INCLUDES += -I$(top_srcdir)/include
+ 
+ #CFLAGS += -g
+-CFLAGS = -g -O0
++#CFLAGS = -g -O0
+ COMM = @COMM@
+ COPYYEARS = @COPYYEARS@
+ CPP = @CPP@
diff --git a/rancid-conf.patch b/rancid-conf.patch
new file mode 100644
index 0000000..ff5949a
--- /dev/null
+++ b/rancid-conf.patch
@@ -0,0 +1,22 @@
+--- a/etc/rancid.conf.sample.in        2014-05-19 13:52:44.000000000 -0700
++++ b/etc/rancid.conf.sample.in        2014-10-06 20:39:30.935776609 -0700
+@@ -31,8 +31,8 @@
+ TMPDIR=/tmp; export TMPDIR
+ # Be careful changing this, it affects CVSROOT below.  It should be a FQPN, 
not
+ # relative.
+-BASEDIR=@localstatedir@; export BASEDIR
+-PATH=@bindir@:@ENV_PATH@; export PATH
++BASEDIR=/var/rancid; export BASEDIR
++PATH=@bindir@:/usr/sbin:@ENV_PATH@; export PATH
+ #
+ # Set to the name of the sendmail executable (or script) that will accept the
+ # -t option to take its rcpt and other headers from std-in and $MAILOPTS (see
+@@ -49,7 +49,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), "svn" or "git".  Do not
+ # change this after CVSROOT has been created with rancid-cvs.  Changing 
between
diff --git a/rancid.cron b/rancid.cron
new file mode 100644
index 0000000..26f8170
--- /dev/null
+++ b/rancid.cron
@@ -0,0 +1,6 @@
+SHELL=/bin/bash
+PATH=/sbin:/bin:/usr/sbin:/usr/bin
+MAILTO=root
+HOME=/var/rancid
+# Run config differ hourly
+1 * * * * rancid RANCIDBINDIR/rancid-run
diff --git a/rancid.logrotate b/rancid.logrotate
new file mode 100644
index 0000000..3638b8b
--- /dev/null
+++ b/rancid.logrotate
@@ -0,0 +1,8 @@
+/var/log/rancid/* {
+    weekly
+    rotate 1
+    notifempty
+    missingok
+    compress
+    olddir old
+}
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/rancid.git/commitdiff/622aebcaecfa4bec064f8b44a5c1ff20205d269c

_______________________________________________
pld-cvs-commit mailing list
pld-cvs-commit@lists.pld-linux.org
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to