LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Fedora (http://www.linuxquestions.org/questions/fedora-35/)
-   -   rpmbuild doesn't generate rpm package (http://www.linuxquestions.org/questions/fedora-35/rpmbuild-doesnt-generate-rpm-package-745355/)

bujecas 08-05-2009 02:35 PM

rpmbuild doesn't generate rpm package
 
Hello,

I'm trying to do a rpm package that only changes some config files of other installed package. I don't need source and buildroot. Just use the post directive to run some shell script. When I rpmbuild -ba the SPEC file only the src.rpm is generated and the noarch.rpm does not.

Here's my SPEC file:

Code:

Name: syslog-clients-config
Version: 0.9
Release: 1
License: GPL
Group: DES/EDS
BuildArch: noarch
Packager: someone@somewhere.com
Requires: syslog-ng

%description
whatever

%post
cp /etc/syslog-ng/syslog-ng.conf /etc/syslog-ng/syslog-ng.conf.`date +"%Y%m%d%H%M%S"`
cat /dev/null >/etc/syslog-ng/syslog-ng.conf
service syslog-ng reload

Any help?

jvhiii 08-06-2009 05:27 PM

Add %files
 
Try adding %files. I tried this with your example, and even with nothing in the %files section it wrote a noarch.rpm. I'm using rpm-4.4.2.2. So like:

%description
whatever

%files

%post
cp blah blah


-John

bujecas 08-07-2009 11:36 AM

It worked, thanks.


All times are GMT -5. The time now is 01:13 PM.