Getting the hang of building RPM packages, but still have some questions

Issues related to applications and software problems
Post Reply
Worlder
Posts: 6
Joined: 2015/04/12 19:43:16

Getting the hang of building RPM packages, but still have some questions

Post by Worlder » 2016/06/19 01:50:58

Hi I want to ask those who have a good experience building rpm packages.

I've been working towards making a custom rpm package of the latest version of Dovecot (i.e. version 2.2.24).

While I've managed to comprehend a good portion of the process thanks to guides and tutorials that I've found on the Internet, I still have some questions regarding what should be put into the package.

I know one uses the %file section to list the files one would like to include in the package, but after reviewing the spec file for the dovecot 2.2.10 source rpm, it seems one doesn't need to put every file generated by the compilation process into the package. For example, the spec file had this section of code in it:

Code: Select all

#drop -devel files
rm -rf $RPM_BUILD_ROOT/%{_includedir}/dovecot
rm -f  $RPM_BUILD_ROOT/%{_datadir}/aclocal/dovecot.m4
rm -f  $RPM_BUILD_ROOT/%{_libdir}/dovecot/libdovecot*.so
rm -f  $RPM_BUILD_ROOT/%{_libdir}/dovecot/dovecot-config
This snippet suggests that some files aren't essential for the application to function properly. So what I want to know is in a general case of rpm package building, what files can one safely exclude from the final package?

User avatar
TrevorH
Forum Moderator
Posts: 28089
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Getting the hang of building RPM packages, but still have some questions

Post by TrevorH » 2016/06/19 11:06:43

There is no one-answer-fits-all for this. It's application specific and you have to include all the things it needs in order to function.

You might be interested in looking at the ghettoforge yum repository which already has dovecot22* packages for CentOS 7. They are in the disabled-by-default ghettoforge-plus repo so that they do not accidentally replace the distro copies - you have to take action to make them install,
CentOS 6 will die in November 2020 - migrate sooner rather than later!
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 is dead, do not use it.
Full time Geek, part time moderator. Use the FAQ Luke

Post Reply

Return to “CentOS 7 - Software Support”