Closed jeremyvisser closed 10 years ago
In addition to the above issue, the resulting /usr/lib/rancid/bin/control_rancid
binary file literally contained the following on line 461:
${exec_prefix}/bin/par -q -n $PAR_COUNT -c "rancid-fe {}" $devlistfile
It should have been (as far as I can tell — at least, I edited it to this to make it work):
/usr/lib/rancid/bin/par -q -n $PAR_COUNT -c "rancid-fe {}" $devlistfile
The original line from control_rancid.in
was:
@bindir@/par -q -n $PAR_COUNT -c "rancid-fe {}" $devlistfile
On a side note, the file /usr/share/man/man1/par.1.gz
is present in the resulting Debian package, causing it to conflict with the real par package.
Thanks for the autoconf spot, I've fixed it as best I can. Unfortunately, I'm not a skilled packager, so I appreciate any input you may have.
Regarding the control_rancid element, I'm actually not sure how to proceed, because ./configure should fill in the exec_prefix variable before make is called. I'll think about this and come back to it later in the week, hopefully.
Thanks again.
I'm not a skilled packager either. All in the same boat here. :-)
Just a quick question about exec_prefix — is the call supposed to be ${exec_prefix}/bin/par
(with exec_prefix defined earlier in the script, e.g. exec_prefix=/usr/lib/rancid
), or is it supposed to be more like a string subsitution (with the command literally reading /usr/lib/rancid/bin/par
)?
I'd like to do some digging on this one myself, but want to make sure I'm following the right trail first. :-)
Can't remember exactly, think it might be libexec somewhere, but as I work in a CentOS shop I haven't got anything to test with ATM!
Will look into spinning up a vagrant Debian at some point and test things out properly!
I’ve built the following script that will build the package on a freshly installed Debian Wheezy system:
https://gist.github.com/jeremyvisser/8533999
$ cd ~
$ wget https://gist.github.com/jeremyvisser/8533999/raw/0e42150ff1a5ae8162f88120178dbfb78db11076/build-rancid-git.sh && chmod +x build-rancid-git.sh && sudo ./build-rancid-git.sh
By building that script I discovered two further bugs:
dpatch
should be listed inside Build-Depends
/etc/rancid/rancid.conf
should ship with RCSSYS=git
(currently the default is RCSSYS=cvs
which is fine for a generic package, but this package is unashamed to be called rancid-git
)After running that script, you can see the resulting control_rancid
script:
$ grep 'bin/par' /usr/lib/rancid/bin/control_rancid
${exec_prefix}/bin/par -q -n $PAR_COUNT -c "rancid-fe {}" $devlistfile
${exec_prefix}/bin/par -q -n $PAR_COUNT -c "rancid-fe \{}" $DIR/routers.up.missed
dpatch is already a Build-Depends in debian/control AFAICT, and you're absolutely right about RCSSYS -- that's a problem with the way the git patch works. I've amended the autoconf script to automatically use git.
Hopefully that solves most of the issues, I just need to find a solution to the "par" problem!
My apologies, I can see why I got the dpatch
bit mistaken — because I attempted to run dpkg-buildpackage -S
to generate the source package needed to run mk-build-deps
, which obviously happened before said Build-Depends were installed. Doh.
Just noticed commits ece122de27 and ed72e23c8c, and realised this isn't the first time you've dealt with this problem. Sorry I'm not much more help — I have close to 0% experience with automake.
Hey, not a problem. You're doing a better job than most by actually reporting these bugs rather than most who just complain about it on third party web forums and I never hear about the angst of people new to the project!
Which reminds me, I really need to write some better documentation!
A further issue on this. It should depend on telnet
, as you can go add method <host> telnet
in .cloginrc
, and if telnet is not installed, it will silently fail (well, it will claim the host is unreachable, which is inaccurate enough to count as a silent failure).
Perhaps a "suggests" rather than "depends", but yes, I agree.
Ok, I've bundled quite a few fixes in to the build. Seems to work ok. Hopefully that should close this issue!
I provisioned a fresh copy of Debian Wheezy on EC2 (ami-4e099a74, ap-southeast-2), and ran the following to attempt to build the package:
I ended up with the following error:
After a bit of experimentation, I noticed that the 'manual' (non-Debian) instructions on the site at http://dotwaffle.github.io/rancid-git/ suggested running
autoreconf
. So I editeddebian/rules
and changed these lines:To these:
It then builds successfully with
debuild
. Is that a bug?