[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now


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

Posted on 2004-11-02
Medium Priority
Last Modified: 2013-11-13
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


make[1]: Leaving directory `/home/blow/rpm/BUILD/syslog-ng-1.6.5'
+ install -m644 /home/blow/rpm/SOURCES/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

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


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
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)


ok, untar the tar and mv contrib/init.d.Redhat to

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


+ 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
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)


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.

Question by:amlp
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
LVL 40

Accepted Solution

jlevie earned 1000 total points
ID: 12475571
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
touch SOURCES/mysql-syslog.pipe
touch SOURCES/mysql-syslog.buffer

and finally:

rpmbuild -ta SOURCES/syslog-ng-1.6.5.tar.gz
LVL 38

Expert Comment

ID: 12475625

   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


Author Comment

ID: 12476743

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.

LVL 40

Expert Comment

ID: 12478805
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,

Featured Post

Enroll in October's Free Course of the Month

Do you work with and analyze data? Enroll in October's Course of the Month for 7+ hours of SQL training, allowing you to quickly and efficiently store or retrieve data. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
If you don't know how to downgrade, my instructions below should be helpful.
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Suggested Courses

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question