Description of problem: When building Pacemaker in mock, we also use publican to build our in-tree documentation. $(PUBLICAN) build --publish --langs=$(DOCBOOK_LANGS) --formats=$(DOCBOOK_FORMATS) However because the mock env variables are set publican thinks it should check the SRPM - not realising it is the Pacemaker SRPM and not one generated by 'publican package'. # Try to catch SRPMS created using outdated versions of publican in brew/koji if ( ( $ENV{RPM_BUILD_DIR} ) && ( $ENV{RPM_BUILD_DIR} ne "" ) && ( $ENV{RPM_PACKAGE_NAME} ne "publican" ) && (-f "/builddir/build/SRPMS/$ENV{RPM_PACKAGE_NAME}-$ENV{RPM_PACKAGE_VERSION}-$ENV{RPM_PACKAGE_RELEASE}.src.rpm" ) ) In Pacemaker's case, there are some unavoidable rpmlint errors which triggers the following abort: # sad we need to do this kind of thing if ( system( "rpmlint", "-f", "/usr/share/publican/rpmlint.cfg", "-i", $pkg ) != 0 ) { croak( "\n\nERROR: Package failed rpmlint validation. Fix errors and retry." ); } Version-Release number of selected component (if applicable): Name : publican Version : 2.6 Release : 3.fc15 How reproducible: Every time Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info:
Please include the actual error being generated. It's not possible to know if the SRPM being compiled was generated by publican, so we need to look at what error is being generated and if we can work around it.
Surely you don't want to know about every rpmlint complaint for every project that uses publican for their docs. Why not have a switch to explicitly enable or disable that check? That way the 'publican package' spec template could have it on and everyone else can have it off.
(In reply to comment #2) > Surely you don't want to know about every rpmlint complaint for every project > that uses publican for their docs. I'm not weakening our own protection without a very good reason; and when we weaken things it will be targeted at verified issues. > Why not have a switch to explicitly enable or disable that check? Because the people who require checks the most will use the switch. > That way the 'publican package' spec template could have it on and everyone > else can have it off. This isn't reliable for us, it would mean anyone who can use a text editor can disable the check, this would defeat the whole purpose of having it.
> Because the people who require checks the most will use the switch. Which would make any breakage their responsibility wouldn't it? People can always find a way to stupid stuff. The point I would make, is that making life difficult for everyone else isn't going to help the project much. Anyway, errors follow: # make mock Tue Sep 6 15:19:50 EST 2011: Rebuilt pacemaker-1de2436.tar.bz2 Rebuilt pacemaker-fedora.spec Wrote: /mnt/Development/sources/pacemaker/devel/pacemaker-1.1.6-117.fedora.src.rpm mock --root=fedora-15-x86_64 --rebuild --resultdir=/mnt/Development/sources/pacemaker/devel/mock --no-cleanup-after /mnt/Development/sources/pacemaker/devel/*.src.rpm ERROR: Exception(/mnt/Development/sources/pacemaker/devel/pacemaker-1.1.6-117.fedora.src.rpm) Config(fedora-15-x86_64) 9 minutes 32 seconds ERROR: Command failed. See logs for output. # ['bash', '--login', '-c', 'rpmbuild -bb --target x86_64 --nodeps builddir/build/SPECS/pacemaker.spec'] make: *** [mock-fedora-15-x86_64] Error 1 from build.log cd Pacemaker_Explained && /usr/bin/publican build --publish --langs=en-US --formats=html-desktop,txt ERROR: The version of publican used to create the SRPM is too old to use with this version of publican. Upgrade publican on your local machine to at least version 2.6 and try again. at /usr/bin/publican line 50 ERROR: The version of publican used to create the SRPM is too old to use with this version of publican. Upgrade publican on your local machine to at least version 2.6 and try again. at /usr/bin/publican line 50 gmake[1]: *** [Clusters_from_Scratch.txt] Error 255 gmake[1]: *** Waiting for unfinished jobs.... gmake[1]: *** [Pacemaker_Explained.txt] Error 255 gmake[1]: Leaving directory `/builddir/build/BUILD/pacemaker-1de2436/doc' make: *** [all-recursive] Error 1 error: Bad exit status from /var/tmp/rpm-tmp.eYQ1qC (%build) Which is annoying since publican didn't create the SRPM and the installed version is 2.6-3.fc15 which does satisfy the requirement. However, once I use a versioned BuildRequires for publican in pacemaker.spec, the error changes to the one I created the bug for: Tue Sep 6 15:37:22 EST 2011: Using existing tarball: pacemaker-1de2436.tar.bz2 Rebuilt pacemaker-fedora.spec Wrote: /mnt/Development/sources/pacemaker/devel/pacemaker-1.1.6-119.fedora.src.rpm mock --root=fedora-15-x86_64 --rebuild --resultdir=/mnt/Development/sources/pacemaker/devel/mock --no-cleanup-after /mnt/Development/sources/pacemaker/devel/*.src.rpm ERROR: Exception(/mnt/Development/sources/pacemaker/devel/pacemaker-1.1.6-119.fedora.src.rpm) Config(fedora-15-x86_64) 6 minutes 5 seconds ERROR: Command failed. See logs for output. from build.log ... cd Pacemaker_Explained && /usr/bin/publican build --publish --langs=en-US --formats=html-desktop,txt pacemaker.src: I: enchant-dictionary-not-found en_USpacemaker.src: I: enchant-dictionary-not-found en_US A dictionary for the Enchant spell checking library is not available for the language given in the info message. Spell checking will proceed with rpmlint's built-in implementation for localized tags in this language. For better spell checking results in this language, install the appropriate dictionary that Enchant will use for this language, often for example hunspell-* or aspell-*.A dictionary for the Enchant spell checking library is not available for the language given in the info message. Spell checking will proceed with rpmlint's built-in implementation for localized tags in this language. For better spell checking results in this language, install the appropriate dictionary that Enchant will use for this language, often for example hunspell-* or aspell-*. pacemaker.src:355: E: hardcoded-library-path in /usr/lib/ocf A library path is hardcoded to one of the following paths: /lib, /usr/lib. It should be replaced by something like /%{_lib} or %{_libdir}. pacemaker.src:356: E: hardcoded-library-path in /usr/lib/ocf/resource.d pacemaker.src:355: E: hardcoded-library-path in /usr/lib/ocf A library path is hardcoded to one of the following paths: /lib, /usr/lib. It should be replaced by something like /%{_lib} or %{_libdir}. pacemaker.src:357: E: hardcoded-library-path in /usr/lib/ocf/resource.d/pacemaker A library path is hardcoded to one of the following paths: /lib, /usr/lib. It should be replaced by something like /%{_lib} or %{_libdir}. A library path is hardcoded to one of the following paths: /lib, /usr/lib. It should be replaced by something like /%{_lib} or %{_libdir}. pacemaker.src:356: E: hardcoded-library-path in /usr/lib/ocf/resource.d A library path is hardcoded to one of the following paths: /lib, /usr/lib. It should be replaced by something like /%{_lib} or %{_libdir}. pacemaker.src:357: E: hardcoded-library-path in /usr/lib/ocf/resource.d/pacemaker A library path is hardcoded to one of the following paths: /lib, /usr/lib. It should be replaced by something like /%{_lib} or %{_libdir}. pacemaker.src:439: W: mixed-use-of-spaces-and-tabs (spaces: line 439, tab: line 11) The specfile mixes use of spaces and tabs for indentation, which is a cosmetic annoyance. Use either spaces or tabs for indentation, not both. pacemaker.src:439: W: mixed-use-of-spaces-and-tabs (spaces: line 439, tab: line 11) The specfile mixes use of spaces and tabs for indentation, which is a cosmetic annoyance. Use either spaces or tabs for indentation, not both. pacemaker.src: W: invalid-url Source0: pacemaker-1de2436.tar.bz2pacemaker.src: W: invalid-url Source0: pacemaker-1de2436.tar.bz2 The value should be a valid, public HTTP, HTTPS, or FTP URL. The value should be a valid, public HTTP, HTTPS, or FTP URL. 1 packages and 0 specfiles checked; 3 errors, 2 warnings. 1 packages and 0 specfiles checked; 3 errors, 2 warnings. ERROR: Package failed rpmlint validation. Fix errors and retry. at /usr/bin/publican line 60 ERROR: Package failed rpmlint validation. Fix errors and retry. at /usr/bin/publican line 60 gmake[1]: *** [Clusters_from_Scratch.txt] Error 64 gmake[1]: *** Waiting for unfinished jobs.... gmake[1]: *** [Pacemaker_Explained.txt] Error 64 gmake[1]: Leaving directory `/builddir/build/BUILD/pacemaker-1de2436/doc' make: *** [all-recursive] Error 1 Note that it is impossible for me to change the location of /usr/lib/ocf and avoid the error.
(In reply to comment #4) > However, once I use a versioned BuildRequires for publican in pacemaker.spec, > the error changes to the one I created the bug for: > > pacemaker.src:355: E: hardcoded-library-path in /usr/lib/ocf > A library path is hardcoded to one of the following paths: /lib, /usr/lib. It > should be replaced by something like /%{_lib} or %{_libdir}. > pacemaker.src:356: E: hardcoded-library-path in /usr/lib/ocf/resource.d > > Note that it is impossible for me to change the location of /usr/lib/ocf and > avoid the error. Isn't this error just saying that you need to change the path in %files from /usr/lib/ocf/resource.d to %{_lib}/ocf/resource.d?
%{_lib} is "lib64" on 64-bit arches and the location would no longer conform to the OCF standard.
(In reply to comment #6) > %{_lib} is "lib64" on 64-bit arches and the location would no longer conform to > the OCF standard. It's not valid to have 64 bit libraries on that path though, if you are only shipping 32 bit libs then you should be setting ExclusiveArch: <bunch of 32 bit arches> Anyway, can you test a work around for me? Append the following line to /usr/share/publican/rpmlint.cfg setBadness('hardcoded-library-path', 0) and then run rpmlint -f /usr/share/publican/rpmlint.cfg $srpm
Removed rpmlint checks.