From b6f8e2e02c330b5b3e6766a66ef95314e9d3aaf6 Mon Sep 17 00:00:00 2001 From: Charles R. Anderson Date: Mar 17 2023 08:33:22 +0000 Subject: fix BASEDIR and LOGDIR (#2092029) --- diff --git a/rancid-conf.patch b/rancid-conf.patch deleted file mode 100644 index ff5949a..0000000 --- a/rancid-conf.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- 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.spec b/rancid.spec index 5bc263b..0026588 100644 --- a/rancid.spec +++ b/rancid.spec @@ -1,6 +1,6 @@ Name: rancid Version: 3.13 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Really Awesome New Cisco confIg Differ License: BSD with advertising @@ -46,6 +46,7 @@ including software and hardware (cards, serial numbers, etc) and uses CVS --sysconfdir=%{_sysconfdir}/%{name} \ --bindir=%{_libexecdir}/%{name} \ --libdir=%{perl_vendorlib} \ + --localstatedir=%{_localstatedir}/%{name} \ --enable-conf-install %make_build @@ -71,6 +72,9 @@ install -D -p -m 0644 %{SOURCE1} %{buildroot}/%{_sysconfdir}/cron.d/%{name} #Patch cron file to point to correct installation directory sed -i 's|RANCIDBINDIR|%{_libexecdir}/%{name}|g' %{buildroot}/%{_sysconfdir}/cron.d/%{name} +#Patch to point to correct log directory +grep -rlF '$BASEDIR/logs' %{buildroot} | xargs sed -i 's|\$BASEDIR/logs|%{_localstatedir}/log/%{name}|' + %pre getent group %{name} >/dev/null || groupadd -r %{name} @@ -110,6 +114,9 @@ exit 0 %changelog +* Fri Mar 10 2023 Chris Adams - 3.13-6 +- fix BASEDIR and LOGDIR (#2092029) + * Fri Jan 20 2023 Fedora Release Engineering - 3.13-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild