diff options
author | Olivier Blin <blino@mageia.org> | 2010-11-02 07:29:57 +0000 |
---|---|---|
committer | Olivier Blin <blino@mageia.org> | 2010-11-02 07:29:57 +0000 |
commit | bcd61a5aeec78fefd70b01a083ae424cc9897a7d (patch) | |
tree | 6729ded5423392f7c31ab453e8b039ea0f9568a5 /lib | |
parent | 3cd2ea382ff6c119b178ee5479135eb31caac4a1 (diff) | |
download | iurt-bcd61a5aeec78fefd70b01a083ae424cc9897a7d.tar iurt-bcd61a5aeec78fefd70b01a083ae424cc9897a7d.tar.gz iurt-bcd61a5aeec78fefd70b01a083ae424cc9897a7d.tar.bz2 iurt-bcd61a5aeec78fefd70b01a083ae424cc9897a7d.tar.xz iurt-bcd61a5aeec78fefd70b01a083ae424cc9897a7d.zip |
create rpm dirs in /etc/skel (actually needed to copy the src.rpm before rpmbuild runs)
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Iurt/Chroot.pm | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/lib/Iurt/Chroot.pm b/lib/Iurt/Chroot.pm index 23d4992..b680c15 100644 --- a/lib/Iurt/Chroot.pm +++ b/lib/Iurt/Chroot.pm @@ -182,14 +182,6 @@ sub add_local_user { # uid of files # if (system(qq|sudo chroot $chroot_tmp usermod -u $run->{uid} builder|)) { - # this should not be necessary as the builder user is supposed to have - # the macros already - - foreach my $p ('RPMS', 'BUILD', 'SPECS', 'SRPMS', 'SOURCES') { - -d "$chroot_tmp/home/builder/rpm/$p" and next; - sudo($run, $config, "--mkdir", "$chroot_tmp/home/builder/rpm/$p"); - } - if ($uid) { if (sudo($run, $config, "--useradd", $chroot_tmp, $luser, $uid) || system("$sudo chroot $chroot_tmp id $luser >/dev/null 2>&1")) { plog('ERR', "ERROR: setting userid $uid to $luser in " . @@ -553,6 +545,9 @@ sub build_chroot { sudo($run, $config, "--cp", "$tmp_chroot/tmp/qa", "$tmp_chroot/var/log/qa"); unlink("$tmp_chroot/tmp/qa"); + sudo($run, $config, "--mkdir", "$tmp_chroot/etc/skel/rpm/$_") + foreach "", qw(RPMS BUILD SPECS SRPMS SOURCES tmp); + # # CM: Choose a sub-500 uid to prevent collison with $luser # |