https://bugzilla.redhat.com/show_bug.cgi?id=1263600
--- Comment #4 from Petr Å abata <psabata(a)redhat.com> ---
(In reply to Jan Holcapek from comment #2)
(In reply to Petr Å abata from comment #1)
> * The package doesn't even build in mock. Seriously?
Now it does. Sorry, didn't know of [1] till today.
[1]
https://fedoraproject.org/wiki/Using_Mock_to_test_package_builds
Ack.
One always learns :)
You can also test whether your package builds in koji which provides very
similar yet slightly different environment than mock (e.g. no network access).
$ koji build --scratch rawhide package.src.rpm
> * Missing some build deps:
> - perl, called in the spec
> - perl(IO::Handle), lib/Log/Log4perl/Appender/Socket/UNIX.pm:10
> - perl(Log::Log4perl::Appender), lib/Log/Log4perl/Appender/Socket/UNIX.pm:5
> - perl(Socket), lib/Log/Log4perl/Appender/Socket/UNIX.pm:11
> - perl(strict), Build.PL:2
> - perl(Test::More), t/1_load.t:16
> - perl(warnings), Build.PL:2
Fixed. But honestly, I was trusting cpanspec to figure that out. How did you
found about these build deps? (Well, I can simply look into and grep the
code for use-es and require-s, but I guess this could be (semi)automated
somehow?)
cpanspec only reads upstream provided metadata which is almost always
incorrect.
Indeed, to be sure, you simply need to read the code. Remember there are many
ways to load a module in perl, not just use and require statements.
You can also use this tool, `tangerine', which helps a great deal with this
task.
$ tangerine Build.PL lib/ t/
> * Optional but recommended for build consistency:
> - perl(Test::NoWarnings), t/1_load.t:8
Fixed.
Ack.
> * Missing a runtime dependency on Log::Log4perl::Appender;
> this won't get autodetected.
Fixed.
Ack.
> * Drop %defattr, it's no longer required.
Dropped.
Ack.
> * The Group tag is optional and can be dropped.
Dropped.
Ack.
> * License texts need to be packaged using the %license macro.
Fixed. Another news for me, thanks. However, rpmlint complains upon the rpm:
perl-Log-Log4perl-Appender-Socket-UNIX.noarch: E: incorrect-fsf-address
/usr/share/licenses/perl-Log-Log4perl-Appender-Socket-UNIX/LICENSE
That's safe to ignore for packaging purposes but it's a good idea to let
upstream know they distribute an old copy of the license text.
> * Consider packaging the `examples' directory as
documentation.
FIncluded.
Ack.
> * The README file is useless in this case. Drop it.
Dropped.
Ack.
--
You are receiving this mail because:
You are on the CC list for the bug.
You are always notified about changes to this product and component