diff options
-rw-r--r-- | NEWS | 5 | ||||
-rwxr-xr-x | iurt | 2 | ||||
-rwxr-xr-x | iurt_root_command | 2 | ||||
-rw-r--r-- | lib/Iurt/Urpmi.pm | 5 |
4 files changed, 9 insertions, 5 deletions
@@ -1,3 +1,8 @@ +- iurt: Use ip instead of ifconfig to bring lo up + +0.9.4 +- iurt: Fix getting srpm name when parsing the spec causes some output on stdout + 0.9.3 - ulri: Fix a crash on build failure. This caused to not send failure emails and not cleanup packages for other architectures. @@ -324,7 +324,7 @@ plog_init($program_name, $run{logfd} || $LOG, 7, 1); # For parsing command line # Display version information # -my $version = '0.9.3'; +my $version = '0.9.4'; plog("MSG", "This is iurt version $version"); my $todo = parseCommandLine($program_name, \@ARGV, \@params); diff --git a/iurt_root_command b/iurt_root_command index fa9a13d..5dbc4f5 100755 --- a/iurt_root_command +++ b/iurt_root_command @@ -424,7 +424,7 @@ sub netns_create { check_path_authorized($dest) or return; my $nsname = basename($dest); system("ip", "netns", "add", $nsname) and return; - system("ip", "netns", "exec", $nsname, "ifconfig", "lo", "up"); + system("ip", "netns", "exec", $nsname, "ip", "link", "set", "lo", "up"); # We don't configure a DNS server so make sure one is not excepted system('sed', '-i', 's|^hosts:.*|hosts: files|', "$dest/etc/nsswitch.conf"); # Some packages want a default route diff --git a/lib/Iurt/Urpmi.pm b/lib/Iurt/Urpmi.pm index aa14c57..a5162ce 100644 --- a/lib/Iurt/Urpmi.pm +++ b/lib/Iurt/Urpmi.pm @@ -449,7 +449,7 @@ sub get_srpm_name { $log_spool_existed = 0; mkdir $log_spool; } - if (!perform_command(qq(chroot $chroot_tmp su $luser -c "rpmspec -q --qf %{NVR}.src.rpm --srpm /home/$luser/rpmbuild/SPECS/$spec > /home/$luser/rpmbuild/SPECS/$spec.srpm_name"), + if (!perform_command(qq(chroot $chroot_tmp su $luser -c "rpmspec -q --qf %{NVR}.src.rpm --srpm /home/$luser/rpmbuild/SPECS/$spec | tail -n1 > /home/$luser/rpmbuild/SPECS/$spec.srpm_name"), $run, $config, use_iurt_root_command => 1, log => $log_spool, @@ -596,7 +596,6 @@ sub install_dynamic_buildrequires { return; } my $nosrc = $new_srpm =~ s/src.rpm$/buildreqs.nosrc.rpm/r; - while (1) { # There is no way with perform_command to get the actual error code. # We can however tell it that error 11 (missing BuildRequires) is ok so @@ -631,7 +630,7 @@ sub install_dynamic_buildrequires { unlink("$chroot_tmp/home/$luser/rpmbuild/SRPMS/$nosrc"); } else { # This was a failure for another reason, no point retrying - plog('ERROR', "Failed to generate dynamic BuildRequires."); + plog('ERROR', "Failed to generate dynamic BuildRequires ($chroot_tmp/home/$luser/rpmbuild/SRPMS/$nosrc does not exist)."); $run->{status}{$srpm} = 'build_failure'; return 0; } |