New directive for %files section (%exclude)

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

 



I'm new to the list, so apologies if this has already come up.

I was working recently on a .spec file for the proftpd package for the 1.3.1 release, and ran into the following issue.

There are multiple dynamically loadable plug-in modules that can be built as part of this software package, but not all of them are useful for all users, and not everyone wants to pull in a kitchen sink-full of required packages to support it (such as libcap, libwrap, openssl, krb5-libs, openldap, etc).

So I was thinking that the base package would include the more useful modules, or the modules that don't have any external dependencies, and then the remaining modules that require LDAP, Postgres, SSL, MySQL, etc. couple be splintered into optional sub-packages.

So far so good, right?

Well, then it starts getting complicated, because I have:

%package
...

%files
...
%{_libexecdir}/mod_*.so
...

%package mysql
...
%files mysql
%{_libexecdir}/mod_sql_mysql.so

etc.

And indeed, predictably, /usr/libexec/mod_sql_mysql.so ends up being included in both packages.

So I was thinking that having a directive like:

%files
...
%exclude %{_libexecdir}/mod_sql_mysql.so
%{_libexecdir}/mod_*.so

would be handy. That is, first all the patterns would be applied and the list built, then %exclude directives would be applied and the list whittled down.

This would also be handy in another instance: Fedora doesn't require the .a and .la files that libtool seems to want to install unconditionally (grrrr)... and having a script like:

%install
make install DESTDIR=$RPM_BUILD_ROOT
rm -f $DESTDIR/%{_libexedir}/mod_*.{la,a}
...

seems just plain wrong. So the %exclude directive would exclude them from the package, but also tell RPM, "Yes, these files will be left behind as artifacts of the 'make install', and I know that, so don't crap out telling me that files were left over" (or whatever).

Does this seem reasonable, or am I missing something?

-Philip

_______________________________________________
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