Solved

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
531 Views
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

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

0
Question by:amlp
    4 Comments
     
    LVL 40

    Accepted Solution

    by:
    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
     
    LVL 38

    Expert Comment

    by:wesly_chen
    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
     

    Author Comment

    by:amlp
    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
     
    LVL 40

    Expert Comment

    by:jlevie
    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

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Anonabox PRO Tor & VPN Router

    PRO is the most advanced way to fortify your privacy and online anonymity by layering the Tor network with VPN services. Use both together or separately, and without needing to download software onto your devices.

    Suggested Solutions

    One of the major drawbacks of deploying applications by GPO is the complete lack of any centralized reporting. After a normal deployment, there are two ways to find out if it was successful – by looking in the event log, and by looking in the log of…
    Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
    Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
    Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

    913 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

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now