[opensuse-buildservice] Need Advice of Rpmlint Newscoop openSUSE Build Log
Hi list mates, I'm trying to build Newscoop 4.1.0 on OBS [0], other repositories are successfully built except openSUSE/SLE's even it is building (noarch.rpm and src.rpm) OK on my local build and on OBS [1]. Looking for Rpmlint [2]: "... newscoop.noarch: E: files-duplicated-waste (Badness: 100) 7359205 Your package contains duplicated files that are not hard- or symlinks. You should use the %fdupes macro to link the files to one. ..." The spec file = [3]. Any hints? [0] https://build.opensuse.org/package/show?package=newscoop&project=home%3Aandi... [1] https://build.opensuse.org/package/live_build_log?arch=x86_64&package=newsco... [2] http://paste.opensuse.org/view/raw/52350265 [3] https://build.opensuse.org/package/view_file?expand=1&file=newscoop.spec&pac... Thanks in advance. -- Andi Sugandi. -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
Andi, Quoting Andi Sugandi <andisugandi@gmail.com>:
Hi list mates,
I'm trying to build Newscoop 4.1.0 on OBS [0], other repositories are successfully built except openSUSE/SLE's even it is building (noarch.rpm and src.rpm) OK on my local build and on OBS [1]. Looking for Rpmlint [2]:
"... newscoop.noarch: E: files-duplicated-waste (Badness: 100) 7359205 Your package contains duplicated files that are not hard- or symlinks. You should use the %fdupes macro to link the files to one. ..."
This error can be resolved by using the %fdupes macro (just as the error message indicates). in the preamble BuildRequires: fdupes The at the end of the %install section: %fdupes %{buildroot} (preferably select a sub-directory, like %{_datadir} or so, to ensure you do not try to hard link over partition boundaries, as this will fail. But that depends largely on your package. On the other hand, though, this gives only 100 BADNESS points. A package fails when it reaches 1000 points. Looking at your actualy build log and the error, this is more critical and actually causes the failure: [ 305s] newscoop-4.1.0-15.1.noarch.rpm: directories not owned by a package: [ 305s] - /etc/php5 [ 305s] - /etc/php5/conf.d Solution here: Either 'buildrequire' / 'require' the package owning those folders (I assume php5 would be the right thing; very likely you will have to depend on them anyway in order to have the package functional) or own them yourself (a directory can be owned by more than one package...) %dir %{_sysconfdir}/php5 %dir %{_sysconfdir}/php5/conf.d Best regards, Dominique -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
On Monday 2013-02-04 12:18, Dominique Leuenberger a.k.a. Dimstar wrote:
"... newscoop.noarch: E: files-duplicated-waste (Badness: 100) 7359205 Your package contains duplicated files that are not hard- or symlinks. You should use the %fdupes macro to link the files to one. ..."
The at the end of the %install section: %fdupes %{buildroot}
%fdupes %_prefix since fdupes (a) must not be called on /etc since it's all %config in there and (b) should not be used on files that have the same content but have different ownership
Looking at your actualy build log and the error, this is more critical and actually causes the failure:
[ 305s] newscoop-4.1.0-15.1.noarch.rpm: directories not owned by a package: [ 305s] - /etc/php5 [ 305s] - /etc/php5/conf.d
Solution here: Either 'buildrequire' / 'require' the package owning those folders (I assume php5 would be the right thing; very likely you will have to depend on them anyway in order to have the package functional) or own them yourself (a directory can be owned by more than one package...)
*Always* list everything in %files, unless it says "is already owned by filesystem" (or some other really really basic package like aaa_base). That is because, if you delete both your package and php5 via `rpm -e yourpackage php5` (or zypper or whatever), then, if php5 gets selected to be removed first (which should be valid), you end up with a non-owned directory. -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
participants (3)
-
Andi Sugandi
-
Dominique Leuenberger a.k.a. Dimstar
-
Jan Engelhardt