! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Make rpm fails due to missing spec file in dist file.
Status:
RESOLVED: FIXED

Comments

Description Joe Wrigley 2008-03-04 16:50:26 CET
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.12) Gecko/20080208 Fedora/2.0.0.12-1.fc8 Firefox/2.0.0.12
Build Identifier: 

When trying to build the exo rpm from svn, it fails with:

error: Name field must be present in package: (main package)
error: Version field must be present in package: (main package)
error: Release field must be present in package: (main package)
error: Summary field must be present in package: (main package)
error: Group field must be present in package: (main package)
error: License field must be present in package: (main package)
make: *** [rpm] Error 1


Reproducible: Always

Steps to Reproduce:
1. svn co http://svn.xfce.org/svn/xfce/libexo/trunk
2. cd trunk; ./autogen.sh --enable-xsltproc --enable-gtk-doc (seems to be requirement for building the rpm
3. sudo make rpm

Actual Results:  
error: Name field must be present in package: (main package)
error: Version field must be present in package: (main package)
error: Release field must be present in package: (main package)
error: Summary field must be present in package: (main package)
error: Group field must be present in package: (main package)
error: License field must be present in package: (main package)
make: *** [rpm] Error 1


Expected Results:  
rpm to be built in /usr/src/redhat/RPMS/i386

The initial failure is, as far as I can tell, due to the omission of the generated exo.spec file in the tar file when make dist is run.

svn diff Makefile.am 
Index: Makefile.am
===================================================================
--- Makefile.am (revision 26652)
+++ Makefile.am (working copy)
@@ -49,6 +49,7 @@
        THANKS                                                          \
        TODO                                                            \
        exo.spec.in                                                     \
+       exo.spec                                                        \
        intltool-extract.in                                             \
        intltool-merge.in                                               \

Once that's fixed, there is a problem with the version, which includes a hyphen and causes the rpmbuild to fail with:

error: line 3: Illegal char '-' in version: Version:            0.3.5svn-r26661

A naive fix is:
$ svn diff configure.in.in 
Index: configure.in.in
===================================================================
--- configure.in.in     (revision 26652)
+++ configure.in.in     (working copy)
@@ -16,7 +16,7 @@
 m4_define([libexo_version_nano], [])
 m4_define([libexo_version_build], [r@REVISION@])
 m4_define([libexo_version_tag], [svn])
-m4_define([libexo_version], [libexo_version_major().libexo_version_minor().libexo_version_micro()ifelse(libexo_version_nano(), [], [], [.libexo_version_nano()])ifelse(libexo_version_tag(), [svn], [libexo_version_tag()-libexo_version_build()], [libexo_version_tag()])])
+m4_define([libexo_version], [libexo_version_major().libexo_version_minor().libexo_version_micro()ifelse(libexo_version_nano(), [], [], [.libexo_version_nano()])ifelse(libexo_version_tag(), [svn], [libexo_version_tag().libexo_version_build()], [libexo_version_tag()])])
 
 dnl ********************************************
 dnl *** Full debug support for SVN snapshots ***

and
$ svn diff exo.spec.in 
Index: exo.spec.in
===================================================================
--- exo.spec.in (revision 26652)
+++ exo.spec.in (working copy)
@@ -1,5 +1,5 @@
 Summary:               Application library for the Xfce desktop environment
-Name:                  @PACKAGE_TARNAME@@LIBEXO_VERSION_API@
+Name:                  @PACKAGE_TARNAME@
 Version:               @PACKAGE_VERSION@
 Release:               1
 License:               LGPL

Finally, when that is fixed an is raised for some installed but unpackaged files:

RPM build errors:
    Installed (but unpackaged) file(s) found:
   /usr/bin/exo-eject
   /usr/bin/exo-mount
   /usr/bin/exo-unmount
make: *** [rpm] Error 1

Which can be fixed with:

$ svn diff exo.spec.in 
Index: exo.spec.in
===================================================================
--- exo.spec.in (revision 26652)
+++ exo.spec.in (working copy)
@@ -1,5 +1,5 @@
 Summary:               Application library for the Xfce desktop environment
-Name:                  @PACKAGE_TARNAME@@LIBEXO_VERSION_API@
+Name:                  @PACKAGE_TARNAME@
 Version:               @PACKAGE_VERSION@
 Release:               1
 License:               LGPL
@@ -58,6 +58,9 @@
 %defattr(-,root,root)
 %{_bindir}/exo-desktop-item-edit
 %{_bindir}/exo-open
+%{_bindir}/exo-eject
+%{_bindir}/exo-mount
+%{_bindir}/exo-unmount
 %{_bindir}/exo-preferred-applications
 %{_datadir}/applications
 %{_datadir}/icons

I'll attach the whole patch for review.
Comment 1 Joe Wrigley 2008-03-04 16:53:02 CET
Created attachment 1543 
Patches as described to fix make rpm

Most of the changes seem OK to me, but I'm not sure about the version fix. Perhaps s/-/\./ is too naive?
Comment 2 Nick Schermer editbugs 2009-08-27 18:01:04 CEST
We never put the .spec files in extradist since it's generated. Other things have been fixed.

Bug #3915

Reported by:
Joe Wrigley
Reported on: 2008-03-04
Last modified on: 2009-10-09

People

Assignee:
Nick Schermer
CC List:
1 user

Version

Version:
unspecified

Attachments

Additional information