Re: Building rpm packages question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



shane.dawalt@xxxxxxxxxx (Shane Dawalt) writes:

>   I've been building a few source rpms and playing around with .spec
> files.  But the rpm building process leads me down roads I'd rather
> not walk.  For example, I have attempted to build several source rpms
> that have certain features I simply won't use.  These features require
> certain packages (mysql-devel, php-devel, etc.) that I don't want nor
> care about.  I simply see no reason to build these parts of the rpm
> nor install the dependent packages.  Is there some way to influence
> rpmbuild to build only certain packages within a source rpm so that
> these dependencies are not needed?  If not then is there a recommended
> way to tweak the build process short of modifying the spec file?
> 
>   And this seems to bring up a question with upgrading the package
> whose spec file is modified.  How is a modified spec file merged with
> the spec file from a newer package?   By hand, I would guess?

With rpm that's have been built with this in mind you can rebuild the
binary rpm from the source rpm using the construction

rpm -ba --with .... xxx.spec

Of course this requires you build from source so you can't use
anything like yum to automatically update your packages unless yum
knows where to find the prebuilt packages with the required options.

OpenPKG rpm (www.openpkg.org) (which works independently of the system
rpm [if it exists]) allows you to do what you want. That is because
openpkg normally provides source rpms and also the rpm -qi output
indicates the options that the rpm was built with and the build
environment (openpkg-tools) makes use of this information.  It's a
very nice facility but has the disadvantage that it can not be used by
the system rpm.  It does however work on most Linuxes and also other
platforms such as Solaris and FreeBSD.  If you only want to do this
for one rpm then it is probably too much overhead but if you want to
extend this to multiple servers and packages it may be worth looking
to see if OpenPKG solves your problem.

Simon

_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/rpm-list

[Index of Archives]     [RPM Ecosystem]     [Linux Kernel]     [Red Hat Install]     [PAM]     [Red Hat Watch]     [Red Hat Development]     [Red Hat]     [Gimp]     [Yosemite News]     [IETF Discussion]

  Powered by Linux