Am Mittwoch, 7. August 2013, 12:58:33 schrieb Bernhard Voelker:
On 08/07/2013 12:43 PM, Philipp Thomas wrote:
* Andreas Schwab (schwab@suse.de) [20130807 12:35]:
No, it is %prep, %build, %install, %check, %clean.
OK, my wrong. But to answer Berny's question, it wouldn't matter for the testsuite package as even when check is run after install the test log is still packaged as the check section creates the compressed log and the %files section references it.
That means, that the %install section is the "official" way of getting root access during the RPM build in OBS? Just kidding. ;-)
Now, as I can add such a new group and user in %install (needed in %check), is there a way to guard these commands to only be executed in OBS/osc environment, i.e., to prevent this to be executed on real-world hosts where coreutils-testsuite is (accidentally) installed?
only packages building as root can do that in %install. We usually do not allow to build as root. Not because of security, but because it is a bad habbit and the src.rpms might be dangerous for users. So, just do not do it that way. There are documented ways to create users during package installation time.
Have a nice day, Berny
-- Adrian Schroeter email: adrian@suse.de SUSE LINUX GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 21284 (AG Nürnberg) Maxfeldstraße 5 90409 Nürnberg Germany -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org