On (18/07/14 17:07), Jakub Hrozek wrote:
>On Fri, Jul 18, 2014 at 05:02:33PM +0200, Lukas Slebodnik wrote:
>> On (15/07/14 17:28), Jakub Hrozek wrote:
>> >On Mon, Jul 14, 2014 at 10:10:59PM +0300, Noam Meltzer wrote:
>> >> On Mon, Jul 14, 2014 at 7:30 PM, Jakub Hrozek
<jhrozek(a)redhat.com> wrote:
>> >>
>> >> > On Fri, Jun 27, 2014 at 09:44:38AM +0300, Noam Meltzer wrote:
>> >> > > ---
>> >> > > contrib/sssd.spec.in | 7 +++++++
>> >> > > 1 file changed, 7 insertions(+)
>> >> > >
>> >> > > diff --git a/contrib/sssd.spec.in b/contrib/sssd.spec.in
>> >> > > index b5e7903..8d2f2be 100644
>> >> > > --- a/contrib/sssd.spec.in
>> >> > > +++ b/contrib/sssd.spec.in
>> >> > > @@ -138,6 +138,11 @@ BuildRequires: systemd-devel
>> >> > > %if (0%{?with_cifs_utils_plugin} == 1)
>> >> > > BuildRequires: cifs-utils-devel
>> >> > > %endif
>> >> > > +%if ((0%{?fedora} >= 15) || (0%{?rhel} >= 7))
>> >> > > +BuildRequires: libnfsidmap-devel
>> >> > > +%else
>> >> > > +BuildRequires: nfs-utils-lib-devel
>> >> > > +%endif
>> >> > >
>> >> > > # RHEL 5 is too old to support samba4 and the PAC responder
>> >> > > %if !0%{?is_rhel5}
>> >> > > @@ -451,6 +456,7 @@ autoreconf -ivf
>> >> > >
--with-krb5-rcache-dir=%{_localstatedir}/cache/krb5rcache \
>> >> > > --enable-nsslibdir=/%{_lib} \
>> >> > > --enable-pammoddir=/%{_lib}/security \
>> >> > > + --enable-nfsidmaplibdir=%{_libdir}/libnfsidmap \
>> >> > > --disable-static \
>> >> > > --disable-rpath \
>> >> > > %{?with_ccache} \
>> >> > > @@ -600,6 +606,7 @@ rm -rf $RPM_BUILD_ROOT
>> >> > > # 3rd party application libraries
>> >> > > %{_libdir}/sssd/modules/libsss_autofs.so
>> >> > > %{_libdir}/libsss_sudo.so
>> >> > > +%{_libdir}/libnfsidmap/sss_nfs.so
>> >> >
>> >> > Here I've got a question, the directory %{_libdir}/libnfsidmap
seems not
>> >> > to be owned by any package, at least on Fedora-20, however the
>> >> > individual files are:
>> >> > $ rpm -qf /usr/lib64/libnfsidmap/
>> >> > file /usr/lib64/libnfsidmap is not owned by any package
>> >> > $ rpm -qf /usr/lib64/libnfsidmap/nsswitch.so
>> >> > libnfsidmap-0.25-8.fc20.x86_64
>> >> >
>> >> > The reason I'm curious is that initially I wanted to Require
the package
>> >> > that owns this directory..
>> >> >
>> >> > Do you agree this is a packaging bug of libnfsidmap ?
>> >> >
>> >>
>> >> I agree
>> >
>> >It's been filed for some time already:
>> >
https://bugzilla.redhat.com/show_bug.cgi?id=986678
>> >>
>> >>
>> >> >
>> >> > Otherwise ACK to your patch.
>> >
>> >Actually, I think we should also add:
>> > Requires: libnfsidmap
>> >to the spec file.
>> >
>> This requirement is automatically detected by rpm.
>>
>> sh-4.2$ rpm -q --requires -p sssd-common-1.12.1-0.el6.x86_64.rpm | grep nfs
>> libnfsidmap.so.0()(64bit)
>>
>> sh-4.2$ rpm -qf /lib64/libnfsidmap.so.0
>> libnfsidmap-0.25-8.fc20.x86_64
>>
>> sh-4.2$ rpm -q --provides libnfsidmap
>> config(libnfsidmap) = 0.25-8.fc20
>> libnfsidmap = 0.25-8.fc20
>> libnfsidmap(x86-64) = 0.25-8.fc20
>> libnfsidmap.so.0()(64bit)
>> nfs-utils-lib
>
>Yes, but we do depend on a filesystem path. Isn't it safer to explicitly
>require it?
You would need to addd another if-else in spec file. The similar as with
BuildRequires.
bash-4.1# rpm -ql nfs-utils-lib-1.1.5-6.el6.x86_64
/etc/idmapd.conf
/usr/lib64/libnfsidmap.so.0
/usr/lib64/libnfsidmap.so.0.3.0
/usr/lib64/libnfsidmap/nsswitch.so
/usr/lib64/libnfsidmap/static.so
/usr/lib64/libnfsidmap/umich_ldap.so
/usr/lib64/librpcsecgss.so.3
/usr/lib64/librpcsecgss.so.3.0.0
/usr/share/doc/nfs-utils-lib-1.1.5
/usr/share/doc/nfs-utils-lib-1.1.5/libnfsidmap-0.24
/usr/share/doc/nfs-utils-lib-1.1.5/libnfsidmap-0.24/AUTHORS
/usr/share/doc/nfs-utils-lib-1.1.5/libnfsidmap-0.24/ChangeLog
/usr/share/doc/nfs-utils-lib-1.1.5/libnfsidmap-0.24/NEWS
/usr/share/doc/nfs-utils-lib-1.1.5/libnfsidmap-0.24/README
/usr/share/doc/nfs-utils-lib-1.1.5/librpcsecgss-0.18
/usr/share/doc/nfs-utils-lib-1.1.5/librpcsecgss-0.18/AUTHORS
/usr/share/doc/nfs-utils-lib-1.1.5/librpcsecgss-0.18/ChangeLog
/usr/share/doc/nfs-utils-lib-1.1.5/librpcsecgss-0.18/NEWS
/usr/share/doc/nfs-utils-lib-1.1.5/librpcsecgss-0.18/README
/usr/share/man/man3/nfs4_uid_to_name.3.gz
/usr/share/man/man5/idmapd.conf.5.gz
sh-4.2$ rpm -ql libnfsidmap-0.25-8.fc20.x86_64
/etc/idmapd.conf
/lib64/libnfsidmap.so.0
/lib64/libnfsidmap.so.0.3.0
/lib64/libnfsidmap/nsswitch.so
/lib64/libnfsidmap/static.so
/lib64/libnfsidmap/umich_ldap.so
/usr/share/doc/libnfsidmap
/usr/share/doc/libnfsidmap/AUTHORS
/usr/share/doc/libnfsidmap/COPYING
/usr/share/doc/libnfsidmap/ChangeLog
/usr/share/doc/libnfsidmap/NEWS
/usr/share/doc/libnfsidmap/README
/usr/share/man/man3/nfs4_uid_to_name.3.gz
/usr/share/man/man5/idmapd.conf.5.gz
As you can see in both cases dynamic library $(libdir)/libnfsidmap.so.0 and
directory $(libdir)libnfsidmap/ are in the same package.
If you want to add it explicitly please consider rhel6
OK, I'm convinced. Given it's extremely unlikely the package that provides
libnfsidmap (as detected by RPM) and the one that provides the directory
with the plugins will be different, the Requires is not needed.
Thanks!