rpmbuild -ta syslog-ng aborts when can't find some file it is looking for, or, 'what's a .sysconfig'?

Hey folks,

Using ES3.

Since redhat, in it's infinite wisdom, only supports legacy syslog, I'm trying to roll-my-own syslog-ng.
Was doing alright until:

cd rpm/SOURCES
rpmbuild -ta syslog-ng-1.6.5.tar.gz

<snip>

make[1]: Leaving directory `/home/blow/rpm/BUILD/syslog-ng-1.6.5'
+ install -m644 /home/blow/rpm/SOURCES/syslog-ng.conf
/home/blow/rpm/tmp/syslog-ng-buildroot/etc/syslog-ng/syslog-ng.conf
install: cannot stat `/home/blow/rpm/SOURCES/syslog-ng.conf': No such
file or directory error: Bad exit status from
/home/blow/rpm/tmp/rpm-tmp.38571 (%install)

## ok, cp over /etc/syslog-ng.conf from old machine, or could use
contrib/syslog-ng.conf.RedHat

scp netmon:/etc/syslog-ng/syslog-ng.conf ~/rpm/SOURCES
rpmbuild -ta syslog-ng-1.6.5.tar.gz

<snip>

make[1]: Leaving directory `/home/blow/rpm/BUILD/syslog-ng-1.6.5'
+ install -m644 /home/blow/rpm/SOURCES/syslog-ng.conf
/home/blow/rpm/tmp/syslog-ng-buildroot/etc/syslog-ng/syslog-ng.conf +
install -m755 /home/blow/rpm/SOURCES/syslog-ng.init
/home/blow/rpm/tmp/syslog-ng-buildroot/etc/rc.d/init.d/syslog-ng
install: cannot stat `/home/blow/rpm/SOURCES/syslog-ng.init': No such
file or directory error: Bad exit status from
/home/blow/rpm/tmp/rpm-tmp.83428 (%install)

*sigh*

ok, untar the tar and mv contrib/init.d.Redhat to
~/rpm/SOURCES/syslog-ng.init

rpmbuild -ta syslog-ng-1.6.5.tar.gz

<snip>

+ install -m644 /home/blow/rpm/SOURCES/syslog-ng.conf
/home/blow/rpm/tmp/syslog-ng-buildroot/etc/syslog-ng/syslog-ng.conf +
install -m755 /home/blow/rpm/SOURCES/syslog-ng.init
/home/blow/rpm/tmp/syslog-ng-buildroot/etc/rc.d/init.d/syslog-ng +
install -m700 /home/blow/rpm/SOURCES/mysql-syslog.pipe
/home/blow/rpm/tmp/syslog-ng-buildroot/etc/syslog-ng/mysql-syslog.pipe
install: cannot stat `/home/blow/rpm/SOURCES/mysql-syslog.pipe': No
such file or directory error: Bad exit status from
/home/blow/rpm/tmp/rpm-tmp.30612 (%install)

*sigh*

touch ~/rpm/SOURCES/mysql-syslog.pipe
<and also ~/rpm/SOURCES/mysql-syslog.buffer>
rpmbuild -ta syslog-ng-1.6.5.tar.gz

+ install -m700 /home/blow/rpm/SOURCES/syslog-ng.sysconfig
/home/blow/rpm/tmp/syslog-ng-buildroot/etc/sysconfig/syslog-ng install:
cannot stat `/home/blow/rpm/SOURCES/syslog-ng.sysconfig': No such file
or directory error: Bad exit status from
/home/blow/rpm/tmp/rpm-tmp.78368 (%install)

OK, wtf do I do now?  what's a syslog-ng.sysconfig?  no reference anywhere.
Googling gives three obscure entries from years ago that have to do
with patches (presumably long since incorporated).  Where's the RTFM that
talks about .sysconfig?

Pardon my frustration, and thanks in advance.

amlpAsked:
Who is Participating?
 
jlevieConnect With a Mentor Commented:
It looks to me like the specfile for an ordinary build is basically broken. But you can work around that, like:

cp libol-0.3.14.tar.gz /usr/src/redhat/SOURCES
cp syslog-ng-1.6.5.tar.gz /usr/src/redhat/SOURCES
cd /usr/src/redhat
rpmbuild -ta SOURCES/libol-0.3.14.tar.gz
rpm -i RPMS/i386/libol-0.3.14-1.i386.rpm RPMS/i386/libol-devel-0.3.14-1.i386.rpm
rpmbuild -ta SOURCES/syslog-ng-1.6.5.tar.gz

The last build will fail so you do:

cp BUILD/syslog-ng-1.6.5/contrib/init.d.RedHat-7.3 SOURCES/syslog-ng.init
cp BUILD/syslog-ng-1.6.5/contrib/syslog-ng.conf.RedHat SOURCES/syslog-ng.conf
cat >SOURCES/syslog-ng.sysconfig <<EOF
SYSLOGNG_OPTIONS=
EOF
touch SOURCES/mysql-syslog.pipe
touch SOURCES/mysql-syslog.buffer

and finally:

rpmbuild -ta SOURCES/syslog-ng-1.6.5.tar.gz
0
 
wesly_chenCommented:
Hi,

   How about
# rpm -ta syslog-ng-1.6.5.tar.gz
and then
# rpm -ivh /usr/src/redhat/RPMS/i386/syslog-ng-1.6.5*.rpm

Wesly
0
 
amlpAuthor Commented:
jlevie:

Ok, that's kinda what I was leaning towards, just making a file named syslog-ng.sysconfig with nothing in it, just like I did with the mysql-pipe and mysql-buffer (which I happen to know are just placeholders (sockets?).

Poking around, it looks like the packagename.sysconfig is the file that goes in redhat's /etc/sysconfig.   It looks like these files hold the commandline options for any deamons the 'package' starts.  Since there aren't any for syslog-ng, keeping it empty should be ok.  I guess.

But to fix the package, should it be done some kinda way in syslog-ng.spec?  or included in the .tar.gz?  Side gripe:  why isn't this explicitly documented somewhere /side gripe.

thx
0
 
jlevieCommented:
It looks to me like the spec file is just included for those that want to make an SRPM for a particular distro. The way it is written it presumes that the necessary files are present in the SOURCES dir and they do get included in the SRPM that gets built. Once the SRPM is built future rebuilds can use that rather than the source tarball,
0
All Courses

From novice to tech pro — start learning today.