Bug 1450746 - perl-Sys-Hostname-Long-1.5-6.fc27 FTBFS in mock-1.4.1
Summary: perl-Sys-Hostname-Long-1.5-6.fc27 FTBFS in mock-1.4.1
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: perl-Sys-Hostname-Long
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Paul Howarth
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-05-15 06:24 UTC by Petr Pisar
Modified: 2017-06-09 18:57 UTC (History)
3 users (show)

Fixed In Version: perl-Sys-Hostname-Long-1.5-8.fc26
Clone Of:
Environment:
Last Closed: 2017-06-09 18:57:51 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Proposed fix (1.98 KB, patch)
2017-05-15 06:26 UTC, Petr Pisar
no flags Details | Diff

Description Petr Pisar 2017-05-15 06:24:24 UTC
perl-Sys-Hostname-Long-1.5-6.fc27 fails to build in nspawned mock environment because a test fails there:

+ make test
PERL_DL_NONLAZY=1 "/usr/bin/perl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
Can't exec "hostname": No such file or directory at lib/Sys/Hostname/Long.pm line 82.
Use of uninitialized value $tmp in transliteration (tr///) at lib/Sys/Hostname/Long.pm line 84.
Sys::Hostname::Long - Last Dispatch method = ip at lib/Sys/Hostname/Long.pm line 206.
Use of uninitialized value $hostname in string ne at t/local.t line 13.
# Failed test 1 in t/local.t at line 13
#  t/local.t line 13 is: ok($hostname ne "");
Use of uninitialized value $hostname in concatenation (.) or string at t/local.t line 15.
t/local.t .. 
Failed 1/1 subtests 

The nspawned mock mode is default in mock-1.4.1 and it probably isolate host network from the mock environment which is good. But then the Sys-Hostname-Long test fails because it does not have "hostname" program available and a fall back to resolving an local IP also fails because there is not local IP address.

Solution could be build-requiring (and run-recommending) "hostname" package.

Another option would be to patch the tests not to fail if a FQDN cannot be obtained because at the end this can happen in the real world.

Comment 1 Petr Pisar 2017-05-15 06:26:35 UTC
Created attachment 1278789 [details]
Proposed fix

Comment 2 Fedora Update System 2017-05-15 09:49:58 UTC
perl-Sys-Hostname-Long-1.5-7.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-281d963a51

Comment 3 Paul Howarth 2017-05-15 09:51:36 UTC
I made it a hard dependency rather than a Recommends: since hostname is in the core group anyway.

Comment 4 Fedora Update System 2017-05-15 22:05:32 UTC
perl-Sys-Hostname-Long-1.5-8.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-281d963a51

Comment 5 Fedora Update System 2017-06-09 18:57:51 UTC
perl-Sys-Hostname-Long-1.5-8.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.