Bug 688211 - Interactive SRPM
Summary: Interactive SRPM
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: perl-Net-DNS
Version: 6.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Petr Šabata
QA Contact: Martin Cermak
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-03-16 15:08 UTC by Zenon Panoussis
Modified: 2011-09-07 13:07 UTC (History)
6 users (show)

Fixed In Version: perl-Net-DNS-0.65-4.el6
Doc Type: Bug Fix
Doc Text:
Prior to this update, perl-Net-DNS lacked a complete IPv6 functionality. This update adds the dependencies related to IPv6 and, in addition, prevents the possibility of interactive (re)build.
Clone Of:
: 710375 (view as bug list)
Environment:
Last Closed: 2011-09-07 13:07:53 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:1271 0 normal SHIPPED_LIVE perl-Net-DNS bug fix update 2011-09-07 13:07:44 UTC

Description Zenon Panoussis 2011-03-16 15:08:42 UTC
Attempting to build stops with 

+ cd Net-DNS-0.65
+ LANG=C
+ export LANG
+ unset DISPLAY
+ /usr/bin/perl Makefile.PL INSTALLDIRS=vendor --no-online-tests
Testing if you have a C compiler and the needed header files....
You have a working compiler.
Would you like to enable IPv6 tests? [y] 

I can't figure any better way to prevent this than --no-IPv6-tests.

Comment 2 Marcela Mašláňová 2011-03-16 15:20:37 UTC
You are right.

I wonder how we build it without it.

Comment 3 Petr Šabata 2011-03-16 15:23:07 UTC
RHEL6 package was built without IPv6 support. IO::Socket::INET6 and Socket6 modules weren't present in buildroot.

Comment 4 Petr Šabata 2011-03-16 15:31:28 UTC
After adding IO::Socket::INET6 and Socket6 BRs, the package builds fine with IPv6 support and tests pass.

Zenon, the default answer is 'y' in non-interactive environment.

Comment 5 Zenon Panoussis 2011-03-16 17:06:33 UTC
I don't mean that it doesn't build; it builds just fine. The problem is the interactivity itself, that it asks questions. 

$ rpm -q perl-IO-Socket-INET6
perl-IO-Socket-INET6-2.56-4.el6.noarch

$ rpm -q perl-Socket6
perl-Socket6-0.23-3.el6.x86_64

$ rpmbuild -bb rpmbuild/SPECS/perl-Net-DNS.spec 
<snip>
You have a working compiler.
Would you like to enable IPv6 tests? [y] 


BTW, if it relies on IO::Socket::INET6 and Socket6 being installed, the spec would need the corresponding BuildRequires.

Comment 6 Petr Šabata 2011-03-16 17:14:38 UTC
(In reply to comment #5)
> I don't mean that it doesn't build; it builds just fine. The problem is the
> interactivity itself, that it asks questions. 

At first I thought it could hang the build in buildsystems. This is not the case since the default answer is used if there's no input. I don't find interactive build to be an issue for manual/rpmbuild rebuilds.

In case you disagree, contact upstream developer about this.

> 
> $ rpm -q perl-IO-Socket-INET6
> perl-IO-Socket-INET6-2.56-4.el6.noarch
> 
> $ rpm -q perl-Socket6
> perl-Socket6-0.23-3.el6.x86_64
> 
> $ rpmbuild -bb rpmbuild/SPECS/perl-Net-DNS.spec 
> <snip>
> You have a working compiler.
> Would you like to enable IPv6 tests? [y] 
> 
> 
> BTW, if it relies on IO::Socket::INET6 and Socket6 being installed, the spec
> would need the corresponding BuildRequires.

Yes, that's true.

Comment 7 Zenon Panoussis 2011-03-16 18:02:47 UTC
(In reply to comment #6)

> At first I thought it could hang the build in buildsystems. This is not the
> case since the default answer is used if there's no input. I don't find
> interactive build to be an issue for manual/rpmbuild rebuilds.

I don't understand how the default answer is used, unless someone manually hits <enter>. It did indeed hang my buildsystem. 

Anyway, there's a better solution than what I suggested before: 

%{__perl} Makefile.PL INSTALLDIRS=vendor --no-online-tests --IPv6-tests

This prevents the interactivity *and* it gets flipped back by the Makefile if IO::Socket::INET6 and Socket6 are not found.

Comment 8 Petr Šabata 2011-03-16 18:26:42 UTC
(In reply to comment #7)
> (In reply to comment #6)
> 
> > At first I thought it could hang the build in buildsystems. This is not the
> > case since the default answer is used if there's no input. I don't find
> > interactive build to be an issue for manual/rpmbuild rebuilds.
> 
> I don't understand how the default answer is used, unless someone manually hits
> <enter>. It did indeed hang my buildsystem. 

http://perldoc.perl.org/ExtUtils/MakeMaker.html#Other-Handy-Functions
What buildsystem do you use? I don't observe any hangs in Koji (or mock respectively).

Comment 9 Zenon Panoussis 2011-03-17 00:32:49 UTC
(In reply to comment #8)

I don't use koji or mock; I use a couple of my own scripts, but that's irrelevant. The point is, rpm is not supposed to be interactive. Interactivity is a sacred "no, no, no", carved in stone since day one. Any package that requires user input, be it during build or during install, violates one of the most fundamental laws of RPM package management. 

(In reply to comment #6)

> I don't find interactive build to be an issue for manual/rpmbuild rebuilds.

It is not a matter of opinion; it is a matter of policy. Of Red Hat policy, to be precise. If that policy has changed, a link to the change notice would be much appreciated by a lot of people.

Comment 10 Zenon Panoussis 2011-03-17 01:00:37 UTC
Checking the perldoc link that you gave in comment #8 and wondering why mock could succeed where my scripts fail, I think the answer is in PERL_MM_USE_DEFAULT. If you can set that from the specfile, then the problem would be solved and policy respected as well.

Comment 11 Petr Šabata 2011-03-17 08:16:11 UTC
(In reply to comment #10)
> Checking the perldoc link that you gave in comment #8 and wondering why mock
> could succeed where my scripts fail, I think the answer is in
> PERL_MM_USE_DEFAULT. If you can set that from the specfile, then the problem
> would be solved and policy respected as well.

This would be a nice and elegant way to deal with such situations -- actually, the best thing here would be getting rpmbuild to set this variable automatically rather than including this in every possibly interactive (all) spec file.

Comment 14 Petr Šabata 2011-06-03 07:35:22 UTC
IO::Socket::INET6 and Socket6 BRs added in perl-Net-DNS-0.65-3.el6
Also PERL_MM_USE_DEFAULT is now defined to prevent interactive build.

Comment 17 Petr Kovar 2011-08-01 17:09:13 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Prior to this update, perl-Net-DNS lacked a complete IPv6 functionality. This update adds the dependencies related to IPv6 and, in addition, prevents the possibility of interactive (re)build.

Comment 18 errata-xmlrpc 2011-09-07 13:07:53 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-1271.html


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