1830899 Members
2623 Online
110017 Solutions
New Discussion

Re: help with rpmbuild

 
SOLVED
Go to solution
K.C. Chan
Trusted Contributor

help with rpmbuild

All,
I am trying to understand and use rpmbuild, so to start out with, I am tring to build an rpm package and have installed just one shell script in /usr/local/bin. But I am getting this error when doing an rpmbuild -bl :

installed (but unpackaged) files found

Any idea? thanks.
Reputation of a thousand years can be determined by the conduct of an hour
6 REPLIES 6
Martin P.J. Zinser
Honored Contributor

Re: help with rpmbuild

Hello K.C.,

you might want to check

http://genetikayos.com/code/repos/rpm-tutorial/trunk/rpm-tutorial.html

Else the contents of the spec file might be of help to diagnose the problem.

Greetings, Martin
Jerome Henry
Honored Contributor

Re: help with rpmbuild

Hi
rpm-4.1 and later has tough build policy, exits if all files in $RPM_BUILD_ROOT are not found in some %files manifest. Either include files in package, remove from $RPM_BUILD_ROOT, or don't add
%_unpackage_files_terminate_build 0
to configuration/specfile.

hth

J
You can lean only on what resists you...
K.C. Chan
Trusted Contributor

Re: help with rpmbuild

All,
here's the file spec:

Summary: A custom shell script to test rpm packing
Name: myscript
Version: 1.0
Release: 1
Copyright: GPL
Group: Applications/System
Source: $RPM_BUILD_SOURCE/myscript-%{version}.tgz
BuildRoot: /tmp/%{name}-buildroot

%description
testing building rpm with myscript.sh

%prep
%setup -q
%configure

%install
mkdir -p $RPM_BUILD_ROOT
make
install -m 555 myscript.sh $RPM_BUILD_ROOT/myscript.sh
Reputation of a thousand years can be determined by the conduct of an hour
K.C. Chan
Trusted Contributor

Re: help with rpmbuild

Now I am getting this error
Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1
Requires: /bin/bash

Any idea? Thanks.
Reputation of a thousand years can be determined by the conduct of an hour
K.C. Chan
Trusted Contributor

Re: help with rpmbuild

All,
I figured it out. But I am wondering if you can add a postinstall section which can run chkconfig command to activate the startup script? Have any one done this with rpmbuild before? Thanks.
Reputation of a thousand years can be determined by the conduct of an hour
Stuart Browne
Honored Contributor
Solution

Re: help with rpmbuild

Simply:

%postinstall
chkconfig

tacked onto the end should suffice.

It's when you start mixing it with %pre's and stuff that it gets confusing ;)
One long-haired git at your service...