[Bug 196401] Review Request: mozldap

bugzilla at redhat.com bugzilla at redhat.com
Thu Jul 13 21:04:20 UTC 2006


Please do not reply directly to this email. All additional
comments should be made in the comments box of this bug report.

Summary: Review Request: mozldap
Alias: mozldap

https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=196401





------- Additional Comments From jwilson at redhat.com  2006-07-13 16:55 EST -------
Initial feedback on first pass through the spec and some rpmlint'ing:

1) Should add %dist tag

2) Source0: should be a URL, if not, explain why

3) Remove useless Provides:

4) Requires: on sub-packages should be explicit %{name} = %{version}-%{release}
instead of >=

5) Use %configure instead of ./configure

6) Should quote around "$RPM_OPT_FLAGS", I've seen issues if not done

7) %install is missing buildroot cleaning

8) don't create directories/files in the buildroot in %build, needs to be done
in %install (since the first thing in %install is supposed to be a buildroot
purging).

9) extraneous slashes in some path names (ex: $RPM_BUILD_ROOT/%{_libdir})

10) standard practice in Fedora is to symlink back to the actual .so rather than
create a trail of symlinks

11) preferred ldconfig post/postun format is "%post -p /sbin/ldconfig"

12) %defattr should be (-,root,root,-)

13) lots of extra, unnecessary %dir lines in various %files sections

14) unversioned .so files must go in -devel package when there are also
versioned .so's

15) rpmlint complains about invalid sonames, I presume this is a side-effect of
renaming them:

E: mozldap invalid-soname /usr/lib64/libssldap-5.0.so.5.17 libssldap50.so
E: mozldap invalid-soname /usr/lib64/libprldap-5.0.so.5.17 libprldap50.so
E: mozldap invalid-soname /usr/lib64/libldap-5.0.so.5.17 libldap50.so

16) the binaries all define rpaths, which is a big no-no

The following spec diff should address all but 15 and 16:

----------
--- mozldap-orig.spec   2006-07-13 15:58:24.000000000 -0400
+++ mozldap.spec        2006-07-13 16:50:58.000000000 -0400
@@ -10,7 +10,7 @@
 Summary:          Mozilla LDAP C SDK
 Name:             mozldap
 Version:          %{major}.%{minor}
-Release:          3
+Release:          3%{?dist}
 License:          MPL/GPL/LGPL
 URL:              http://www.mozilla.org/directory/csdk.html
 Group:            System Environment/Libraries
@@ -20,8 +20,8 @@
 BuildRequires:    %{nspr_name}-devel >= %{nspr_version}
 BuildRequires:    %{nss_name}-devel >= %{nss_version}
 BuildRequires:    %{svrcore_name} >= %{svrcore_version}
-Provides:         mozldap

+# Only available from cvs, tag LDAPCSDK_5_1_7_RTM
 Source0:          %{name}-%{version}.tar.gz

 %description
@@ -35,11 +35,10 @@
 %package tools
 Summary:          Tools for the Mozilla LDAP C SDK
 Group:            System Environment/Base
-Requires:         %{name} >= %{version}-%{release}
+Requires:         %{name} = %{version}-%{release}
 BuildRequires:    %{nspr_name}-devel >= %{nspr_version}
 BuildRequires:    %{nss_name}-devel >= %{nss_version}
 BuildRequires:    %{svrcore_name} >= %{svrcore_version}
-Provides:         %{name}-tools

 %description tools
 The mozldap-tools package provides the ldapsearch,
@@ -50,10 +49,9 @@
 %package devel
 Summary:          Development libraries and examples for Mozilla LDAP C SDK
 Group:            Development/Libraries
-Requires:         %{name} >= %{version}-%{release}
+Requires:         %{name} = %{version}-%{release}
 Requires:         %{nspr_name}-devel >= %{nspr_version}
 Requires:         %{nss_name}-devel >= %{nss_version}
-Provides:         %{name}-devel

 %description devel
 Header and Library files for doing development with the Mozilla LDAP C SDK
@@ -64,7 +62,8 @@
 arg64="--enable-64bit"
 %endif
 cd mozilla/directory/c-sdk
-./configure $arg64 --with-system-svrcore --enable-optimize --disable-debug
+%configure $arg64 --with-system-svrcore --enable-optimize --disable-debug
+#./configure $arg64 --with-system-svrcore --enable-optimize --disable-debug

 %build

@@ -73,7 +72,7 @@
 export BUILD_OPT

 # Generate symbolic info for debuggers
-XCFLAGS=$RPM_OPT_FLAGS
+XCFLAGS="$RPM_OPT_FLAGS"
 export XCFLAGS

 PKG_CONFIG_ALLOW_SYSTEM_LIBS=1
@@ -90,9 +89,12 @@
 cd mozilla/directory/c-sdk
 make BUILDCLU=1 HAVE_SVRCORE=1 BUILD_OPT=1

+%install
+%{__rm} -rf $RPM_BUILD_ROOT
+
 # Set up our package file
-%{__mkdir_p} $RPM_BUILD_ROOT/%{_libdir}/pkgconfig
-%{__cat} %{name}.pc.in | sed -e "s,%%libdir%%,%{_libdir},g" \
+%{__mkdir_p} $RPM_BUILD_ROOT%{_libdir}/pkgconfig
+%{__cat} mozilla/directory/c-sdk/%{name}.pc.in | sed -e
"s,%%libdir%%,%{_libdir},g" \
                           -e "s,%%prefix%%,%{_prefix},g" \
                           -e "s,%%exec_prefix%%,%{_prefix},g" \
                           -e "s,%%includedir%%,%{_includedir}/%{name},g" \
@@ -100,69 +102,63 @@
                           -e "s,%%NSS_VERSION%%,%{nss_version},g" \
                           -e "s,%%SVRCORE_VERSION%%,%{svrcore_version},g" \
                           -e "s,%%MOZLDAP_VERSION%%,%{version},g" > \
-                          $RPM_BUILD_ROOT/%{_libdir}/pkgconfig/%{name}.pc
-
-%install
+                          $RPM_BUILD_ROOT%{_libdir}/pkgconfig/%{name}.pc

 # There is no make install target so we'll do it ourselves.

-%{__mkdir_p} $RPM_BUILD_ROOT/%{_includedir}/%{name}
-%{__mkdir_p} $RPM_BUILD_ROOT/%{_libdir}
-%{__mkdir_p} $RPM_BUILD_ROOT/%{_libdir}/%{name}
+%{__mkdir_p} $RPM_BUILD_ROOT%{_includedir}/%{name}
+%{__mkdir_p} $RPM_BUILD_ROOT%{_libdir}
+%{__mkdir_p} $RPM_BUILD_ROOT%{_libdir}/%{name}

 # Copy the binary libraries we want
 for file in libssldap50.so libprldap50.so libldap50.so
 do
-  %{__install} -m 755 mozilla/dist/lib/$file $RPM_BUILD_ROOT/%{_libdir}
+  %{__install} -m 755 mozilla/dist/lib/$file $RPM_BUILD_ROOT%{_libdir}
 done

 # Copy the binaries we want
 for file in ldapsearch ldapmodify ldapdelete ldapcmp ldapcompare
 do
-  %{__install} -m 755 mozilla/dist/bin/$file $RPM_BUILD_ROOT/%{_libdir}/%{name}
+  %{__install} -m 755 mozilla/dist/bin/$file $RPM_BUILD_ROOT%{_libdir}/%{name}
 done

 # Copy the include files
 for file in mozilla/dist/public/ldap/*.h
 do
-  %{__install} -m 644 $file $RPM_BUILD_ROOT/%{_includedir}/%{name}
+  %{__install} -m 644 $file $RPM_BUILD_ROOT%{_includedir}/%{name}
 done

 # Copy the developer files
 %{__mkdir_p} $RPM_BUILD_ROOT%{_datadir}/%{name}
 cp -r mozilla/directory/c-sdk/ldap/examples $RPM_BUILD_ROOT%{_datadir}/%{name}
-%{__mkdir_p} $RPM_BUILD_ROOT%{_datadir}/%{name}/etc
+%{__mkdir_p} $RPM_BUILD_ROOT%{_datadir}%{name}/etc
 %{__install} -m 644 mozilla/directory/c-sdk/ldap/examples/xmplflt.conf
$RPM_BUILD_ROOT%{_datadir}/%{name}/etc
 %{__install} -m 644
mozilla/directory/c-sdk/ldap/libraries/libldap/ldaptemplates.conf
$RPM_BUILD_ROOT%{_datadir}/%{name}/etc
 %{__install} -m 644
mozilla/directory/c-sdk/ldap/libraries/libldap/ldapfilter.conf
$RPM_BUILD_ROOT%{_datadir}/%{name}/etc
 %{__install} -m 644
mozilla/directory/c-sdk/ldap/libraries/libldap/ldapsearchprefs.conf
$RPM_BUILD_ROOT%{_datadir}/%{name}/etc

 # Rename the libraries and create the symlinks
-cd $RPM_BUILD_ROOT/%{_libdir}
+cd $RPM_BUILD_ROOT%{_libdir}
 for file in libssldap50.so libprldap50.so libldap50.so
 do
   mv $file $file.%{major}.%{minor}
   ln -s $file.%{major}.%{minor} $file.%{major}
-  ln -s $file.%{major} $file
+  ln -s $file.%{major}.%{minor} $file
 done

 %clean
 %{__rm} -rf $RPM_BUILD_ROOT


-%post
-/sbin/ldconfig >/dev/null 2>/dev/null
+%post -p /sbin/ldconfig


-%postun
-/sbin/ldconfig >/dev/null 2>/dev/null
+%postun -p /sbin/ldconfig


 %files
-%defattr(0755,root,root)
-%{_libdir}/libssldap50.so
-%{_libdir}/libprldap50.so
-%{_libdir}/libldap50.so
+%defattr(-,root,root,-)
+%doc mozilla/directory/c-sdk/README.rpm
 %{_libdir}/libssldap50.so.%{major}
 %{_libdir}/libprldap50.so.%{major}
 %{_libdir}/libldap50.so.%{major}
@@ -171,8 +167,8 @@
 %{_libdir}/libldap50.so.%{major}.%{minor}

 %files tools
-%defattr(0755,root,root)
-%attr(0755,root,root) %dir %{_libdir}/%{name}
+%defattr(-,root,root,-)
+%dir %{_libdir}/%{name}
 %{_libdir}/%{name}/ldapsearch
 %{_libdir}/%{name}/ldapmodify
 %{_libdir}/%{name}/ldapdelete
@@ -180,13 +176,12 @@
 %{_libdir}/%{name}/ldapcompare

 %files devel
-%defattr(0644,root,root)
+%defattr(-,root,root,-)
+%{_libdir}/libssldap50.so
+%{_libdir}/libprldap50.so
+%{_libdir}/libldap50.so
 %{_libdir}/pkgconfig/%{name}.pc
-%attr(0755,root,root) %dir %{_includedir}/%{name}
 %{_includedir}/%{name}
-%attr(0755,root,root) %dir %{_datadir}/%{name}
-%attr(0755,root,root) %dir %{_datadir}/%{name}/etc
-%attr(0755,root,root) %dir %{_datadir}/%{name}/examples
 %{_datadir}/%{name}

 %changelog


-- 
Configure bugmail: https://bugzilla.redhat.com/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.




More information about the Fedora-package-review mailing list