Discussion:
Philosophical question: rpmbuild and user input
Richard Siddall
2007-12-21 02:08:54 UTC
Permalink
I know there's a general prohibition on RPMs requiring user input so
that they can be installed unattended. Does the same rule apply to spec
files, so that RPMs can be built unattended?

(I'm asking because I noticed that the programs I'm using to make RPMs
from Perl modules don't do anything with standard input when executing
"perl Makefile.PL" and some of the makefiles ask for input. You can get
a rather interesting infinite loop if you add a "< /dev/null" to the end
of the perl Makefile.PL line and then try building some modules on a
machine on which cpan has not been configured and some of the mandatory
prerequisite Perl modules have not been installed. ;>)

I guess I'm actually asking if Perl module spec files should use
perl Makefile.PL < /dev/null
instead of just
perl Makefile.PL

Regards,

Richard.
Matthew Miller
2007-12-21 04:48:00 UTC
Permalink
Post by Richard Siddall
I know there's a general prohibition on RPMs requiring user input so
that they can be installed unattended. Does the same rule apply to spec
files, so that RPMs can be built unattended?
Yes -- spec files are often built using automated systems like mock. Plus,
in the ideal, every build of a spec file generates the same results.

Generally what I've done with perl modules that expect input is added a ptch
which changes the makefile to just assume the answers I want.
--
Matthew Miller ***@mattdm.org <http://mattdm.org/>
Boston University Linux ------> <http://linux.bu.edu/>
Loading...