[Bug 196393] Review Request: svrcore-devel

bugzilla at redhat.com bugzilla at redhat.com
Thu Jul 13 15:50:19 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: svrcore-devel
Alias: svrcore-devel

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





------- Additional Comments From jwilson at redhat.com  2006-07-13 11:41 EST -------
Okay, first pass through, spec is NOT yet okay. :)

1) Per http://fedoraproject.org/wiki/Extras/FullExceptionList, gawk, perl and
sed shouldn't be in BuildRequires:, not sure why Parag had issues there, package
builds okay in an FC6/x86_64 mock buildroot with them removed.

2) Provides: svrcore-devel is not necessary, its already named that and will
auto-provide it. (rpmlint says "E: svrcore-devel useless-explicit-provides
svrcore-devel")

3) You can make the spec cleaner using 'export VAR=value' all on one line.

4) The '%{__mkdir_p} $RPM_BUILD_ROOT/%{_libdir}/pkgconfig' line should not be
under %build, it should be in %install (rpmlint complains about this: "W:
svrcore-devel rpm-buildroot-usage %build %{__mkdir_p}
$RPM_BUILD_ROOT%{_libdir}/pkgconfig")

5) The first line in %install should be an rm -rf of the buildroot (rpmlint: "E:
svrcore-devel no-cleaning-of-buildroot").

6) You have extraneous slashes throughout the spec. (ex:
$RPM_BUILD_ROOT/%{_libdir} should be just $RPM_BUILD_ROOT%{_libdir}, because
%{_libdir} expands out to /usr/lib or /usr/lib64).

7) Source includes a LICENSE and README file, they should be installed as docs
(rpmlint warns about lack of docs).

8) %defattr should generally be (-,root,root,-)

Here's a spec diff that cleans up all of the above issues:
----------

--- svrcore-devel-orig.spec     2006-06-26 11:18:43.000000000 -0400
+++ svrcore-devel.spec  2006-07-13 11:45:08.000000000 -0400
@@ -13,11 +13,7 @@
 BuildRoot:        %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildRequires:    nspr-devel >= %{nspr_version}
 BuildRequires:    nss-devel >= %{nss_version}
-BuildRequires:    gawk
-BuildRequires:    perl
-BuildRequires:    sed
 BuildRequires:    pkgconfig
-Provides:         svrcore-devel

 Source0:         
ftp://ftp.mozilla.org/pub/mozilla.org/directory/svrcore/releases/4.0.2/%{name}-%{version}.tar.gz

@@ -33,28 +29,19 @@
 %build

 # Enable compiler optimizations and disable debugging code
-BUILD_OPT=1
-export BUILD_OPT
+export BUILD_OPT=1

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

-PKG_CONFIG_ALLOW_SYSTEM_LIBS=1
-PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1
+export PKG_CONFIG_ALLOW_SYSTEM_LIBS=1
+export PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1

-export PKG_CONFIG_ALLOW_SYSTEM_LIBS
-export PKG_CONFIG_ALLOW_SYSTEM_CFLAGS
-
-NSPR_INCLUDE_DIR=`/usr/bin/pkg-config --variable=includedir nspr`
-export NSPR_INCLUDE_DIR
-
-NSS_INCLUDE_DIR=`/usr/bin/pkg-config --variable=includedir nss`
-export NSS_INCLUDE_DIR
+export NSPR_INCLUDE_DIR=`/usr/bin/pkg-config --variable=includedir nspr`
+export NSS_INCLUDE_DIR=`/usr/bin/pkg-config --variable=includedir nss`

 %ifarch x86_64 ppc64 ia64 s390x
-USE_64=1
-export USE_64
+export USE_64=1
 %endif

 cd mozilla/security/svrcore
@@ -63,35 +50,36 @@
 # dependencies, etc.
 make EXPORTS="" RELEASE="" REQUIRES="" MODULE="" IMPORTS="" OBJDIR=. INSTALL=true

+%install
+%{__rm} -rf $RPM_BUILD_ROOT
+
 # Set up our package file
-%{__mkdir_p} $RPM_BUILD_ROOT/%{_libdir}/pkgconfig
-%{__cat} svrcore.pc.in | sed -e "s,%%libdir%%,%{_libdir},g" \
+%{__mkdir_p} $RPM_BUILD_ROOT%{_libdir}/pkgconfig
+%{__cat} mozilla/security/svrcore/svrcore.pc.in | sed -e
"s,%%libdir%%,%{_libdir},g" \
                           -e "s,%%prefix%%,%{_prefix},g" \
                           -e "s,%%exec_prefix%%,%{_prefix},g" \
                           -e "s,%%includedir%%,%{_includedir},g" \
                           -e "s,%%NSPR_VERSION%%,%{nspr_version},g" \
                           -e "s,%%NSS_VERSION%%,%{nss_version},g" \
                           -e "s,%%SVRCORE_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}
-%{__mkdir_p} $RPM_BUILD_ROOT/%{_libdir}
+%{__mkdir_p} $RPM_BUILD_ROOT%{_includedir}
+%{__mkdir_p} $RPM_BUILD_ROOT%{_libdir}

 cd mozilla/security/svrcore
 # Copy the binary libraries we want
 for file in libsvrcore.a
 do
-  %{__install} -m 644 $file $RPM_BUILD_ROOT/%{_libdir}
+  %{__install} -m 644 $file $RPM_BUILD_ROOT%{_libdir}
 done

 # Copy the include files
 for file in svrcore.h
 do
-  %{__install} -m 644 $file $RPM_BUILD_ROOT/%{_includedir}
+  %{__install} -m 644 $file $RPM_BUILD_ROOT%{_includedir}
 done


@@ -99,7 +87,8 @@
 %{__rm} -rf $RPM_BUILD_ROOT

 %files
-%defattr(0644,root,root)
+%defattr(-,root,root,-)
+%doc mozilla/security/svrcore/LICENSE mozilla/security/svrcore/README
 %{_libdir}/pkgconfig/%{name}.pc
 %{_libdir}/libsvrcore.a
 %{_includedir}/svrcore.h


----------

With these changes, I have the rpmlint output down to:
E: svrcore-devel-debuginfo empty-debuginfo-package

Not quite sure yet why the debuginfo package is empty, will investigate more a
bit later...

-- 
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 package-review mailing list