29 |
os => 'RPMS/', |
os => 'RPMS/', |
30 |
builds => '/builds/smeserver-7-core/', |
builds => '/builds/smeserver-7-core/', |
31 |
contribs => '/builds/smeserver-7-contribs/', |
contribs => '/builds/smeserver-7-contribs/', |
|
qa => '/builds/smeserver-7-qa/', |
|
32 |
stage => '/stage/7/', |
stage => '/stage/7/', |
33 |
}, |
}, |
34 |
'8' => { active => 1, |
'8' => { active => 1, |
38 |
os => '', |
os => '', |
39 |
builds => '/builds/smeserver-8-core/', |
builds => '/builds/smeserver-8-core/', |
40 |
contribs => '/builds/smeserver-8-contribs/', |
contribs => '/builds/smeserver-8-contribs/', |
|
qa => '/builds/smeserver-8-qa/', |
|
41 |
stage => '/stage/8/', |
stage => '/stage/8/', |
42 |
}, |
}, |
43 |
}; |
}; |
44 |
|
|
45 |
my $repos = { 'smeos' => { prio => 18, inc => 1, ver => 1, rel => 1, os => 1 }, |
my $repos = { 'smeos' => { prio => 18, inc => 1, ver => 1, rel => 1, os => 1 }, |
46 |
'smeupdates' => { prio => 17, inc => 1, ver => 1, rel => 1 }, |
'smeupdates' => { prio => 17, inc => 1, ver => 1, rel => 1 }, |
47 |
'smeupdates-testing' => { prio => 16, inc => 1, ver => 1, rel => 1 }, |
'smeupdates-testing' => { prio => 16, inc => 1, ver => 1, rel => 3 }, |
48 |
'smeextras' => { prio => 15, inc => 0, ver => 1, rel => 1 }, |
'smeextras' => { prio => 15, inc => 0, ver => 1, rel => 1 }, |
49 |
'smeaddons' => { prio => 14, inc => 0, ver => 1, rel => 1 }, |
'smeaddons' => { prio => 14, inc => 0, ver => 1, rel => 1 }, |
50 |
'smecontribs' => { prio => 13, inc => 0, ver => 1, rel => 1 }, |
'smecontribs' => { prio => 13, inc => 0, ver => 1, rel => 1 }, |
51 |
'smetest' => { prio => 12, inc => 0, ver => 2, rel => 2, devel => 2 }, |
'smetest' => { prio => 12, inc => 0, ver => 2, rel => 3, devel => 2 }, |
52 |
'smedev' => { prio => 11, inc => 0, ver => 2, rel => 2, devel => 1 }, |
'smedev' => { prio => 11, inc => 0, ver => 1, rel => 1, devel => 1 }, |
53 |
'centos' => { prio => 10, inc => 0, ver => 0, rel => 0, orig => 1, base => 1 }, |
'centos' => { prio => 10, inc => 0, ver => 0, rel => 0, orig => 1, base => 1 }, |
54 |
'epel' => { prio => 9, inc => 0, ver => 0, rel => 0, orig => 1, base => 1 }, |
'epel' => { prio => 9, inc => 0, ver => 0, rel => 0, orig => 1, base => 1 }, |
55 |
'fedora-extras' => { prio => 8, inc => 0, ver => 0, rel => 0, orig => 1, base => 1 }, |
'fedora-extras' => { prio => 8, inc => 0, ver => 0, rel => 0, orig => 1, base => 1 }, |
94 |
$baserepo->{'/mirrors/centos-qa/CentOS/~C/extras/~A/RPMS/'} = 'centos'; |
$baserepo->{'/mirrors/centos-qa/CentOS/~C/extras/~A/RPMS/'} = 'centos'; |
95 |
} |
} |
96 |
|
|
97 |
my $skippkg = { '7' => { 'centos' => { map { $_ => 1 } ( 'horde', 'imp-h3', 'ingo-h3', 'turba-h3', 'vim' ) }, |
my $skippkg = { '7' => { 'centos' => { map { $_ => 1 } ( 'horde', 'imp-h3', 'ingo-h3', 'turba-h3' ) }, |
98 |
'epel' => { map { $_ => 1 } ( 'clamav', 'perl-Razor-Agent' ) }, |
'epel' => { map { $_ => 1 } ( 'clamav', 'fping', 'ocsinventory', 'perl-Compress-Bzip2', 'perl-Compress-Raw-Zlib', 'perl-Compress-Raw-Bzip2', 'perl-Crypt-OpenSSL-Bignum', 'perl-Crypt-OpenSSL-Random', 'perl-Crypt-OpenSSL-RSA', 'perl-DateTime', 'perl-Razor-Agent', 'perl-Text-Iconv', 'proftpd' ) }, |
99 |
|
'fedora-extras' => { map { $_ => 1 } ( 'ddclient', 'hddtemp', 'pam_abl', 'perl-Compress-Bzip2', 'perl-Error', 'perl-HTML-Format', 'perl-MIME-Types', 'perl-Net-IP', 'perl-Archive-Zip', 'perl-Class-Singleton', 'perl-Razor-Agent', 'perl-Test-Inline', 'perl-Text-Autoformat', 'perl-Text-Iconv', 'perl-Text-Reform', 'perl-XML-RSS' ) }, |
100 |
'rpmforge' => { map { $_ => 1 } ( 'perl-Test-Inline' ) }, |
'rpmforge' => { map { $_ => 1 } ( 'perl-Test-Inline' ) }, |
101 |
'atrpms' => { map { $_ => 1 } ( 'dovecot', 'trac', 'yum' ) }, |
'atrpms' => { map { $_ => 1 } ( 'check4updates', 'dovecot', 'trac', 'yum' ) }, |
102 |
}, |
}, |
103 |
'8' => { 'centos' => { map { $_ => 1 } ( 'horde', 'imp-h3', 'ingo-h3', 'turba-h3' ) }, |
'8' => { 'centos' => { map { $_ => 1 } ( 'horde', 'imp-h3', 'ingo-h3', 'turba-h3' ) }, |
104 |
'fedora' => { map { $_ => 1 } ( 'kernel-xen' ) }, |
'fedora' => { map { $_ => 1 } ( 'kernel', 'kernel-xen' ) }, |
105 |
'epel' => { map { $_ => 1 } ( 'clamav', 'perl-Razor-Agent', 'smolt' ) }, |
'epel' => { map { $_ => 1 } ( 'clamav', 'horde', 'perl-Compress-Bzip2', 'perl-Compress-Raw-Zlib', 'perl-Compress-Raw-Bzip2', 'perl-Crypt-OpenSSL-Bignum', 'perl-Crypt-OpenSSL-Random', 'perl-Crypt-OpenSSL-RSA', 'perl-Razor-Agent', 'proftpd', 'smolt' ) }, |
106 |
'fedora-extras' => { map { $_ => 1 } ( 'dstat', 'gocr', 'horde', 'oidentd', 'perl-Test-Inline', 'perl-Razor-Agent', 'smolt' ) }, |
'fedora-extras' => { map { $_ => 1 } ( 'dstat', 'gocr', 'horde', 'oidentd', 'perl-Compress-Bzip2', 'perl-Crypt-OpenSSL-Bignum', 'perl-Crypt-OpenSSL-Random', 'perl-Crypt-OpenSSL-RSA', 'perl-Test-Inline', 'perl-Razor-Agent', 'smolt' ) }, |
107 |
'rpmforge' => { map { $_ => 1 } ( 'perl-Test-Inline' ) }, |
'rpmforge' => { map { $_ => 1 } ( 'perl-Test-Inline' ) }, |
108 |
}, |
}, |
109 |
}; |
}; |
142 |
last unless $dir =~ m{~A}; |
last unless $dir =~ m{~A}; |
143 |
} |
} |
144 |
} |
} |
145 |
find( { wanted => sub { process_rpm($_, $smever, 'builds'); }, no_chdir => 1, follow_fast => 1 }, ( $distrepo->{$smever}->{'builds'}, $distrepo->{$smever}->{'qa'} ) ); |
find( { wanted => sub { process_rpm($_, $smever, 'builds'); }, no_chdir => 1, follow_fast => 1 }, $distrepo->{$smever}->{'builds'} ); |
146 |
find( { wanted => sub { process_rpm($_, $smever, 'contribs'); }, no_chdir => 1, follow_fast => 1 }, $distrepo->{$smever}->{'contribs'} ); |
find( { wanted => sub { process_rpm($_, $smever, 'contribs'); }, no_chdir => 1, follow_fast => 1 }, $distrepo->{$smever}->{'contribs'} ); |
147 |
|
|
148 |
foreach my $base ( sort keys %$rpms ) { |
foreach my $base ( sort keys %$rpms ) { |
209 |
} |
} |
210 |
} elsif ( $repos->{$cmp->{repo}}->{orig}) { |
} elsif ( $repos->{$cmp->{repo}}->{orig}) { |
211 |
$orig{$cmp->{nvra}}++; |
$orig{$cmp->{nvra}}++; |
212 |
|
unless ( $repos->{$cmp->{repo}}->{base} ) { |
213 |
|
my $tag = sprintf '%s%s/%s-%s', $distrepo->{$smever}->{$cmp->{repo}}, $cmp->{name}, $cmp->{ver}, $cmp->{rel}; |
214 |
|
qx(touch $tag/PUSHED) if ! $opts{t} && -d $tag && ! -f "$tag/PUSHED"; |
215 |
|
} |
216 |
} elsif ( $cmp->{src} && $reposrc{$cmp->{repo}} ) { |
} elsif ( $cmp->{src} && $reposrc{$cmp->{repo}} ) { |
217 |
$reposrc{$cmp->{repo}}->{srpm} = $cmp; |
$reposrc{$cmp->{repo}}->{srpm} = $cmp; |
218 |
} elsif ( $seen{$cmp->{nvra}}->{repo} ne $cmp->{repo} ) { |
} elsif ( $seen{$cmp->{nvra}}->{repo} ne $cmp->{repo} ) { |
230 |
push @{$cmp->{repos}}, $dest; |
push @{$cmp->{repos}}, $dest; |
231 |
if ( $repos->{$cmp->{repo}}->{orig} ) { |
if ( $repos->{$cmp->{repo}}->{orig} ) { |
232 |
$orig{$cmp->{nvra}}++; |
$orig{$cmp->{nvra}}++; |
233 |
|
unless ( $repos->{$cmp->{repo}}->{base} ) { |
234 |
|
my $tag = sprintf '%s%s/%s-%s', $distrepo->{$smever}->{$cmp->{repo}}, $cmp->{name}, $cmp->{ver}, $cmp->{rel}; |
235 |
|
qx(touch $tag/PUSHED) if ! $opts{t} && -d $tag && ! -f "$tag/PUSHED"; |
236 |
|
} |
237 |
} elsif ( $cmp->{src} && $reposrc{$cmp->{repo}} ) { |
} elsif ( $cmp->{src} && $reposrc{$cmp->{repo}} ) { |
238 |
$reposrc{$cmp->{repo}}->{srpm} = $cmp; |
$reposrc{$cmp->{repo}}->{srpm} = $cmp; |
239 |
} else { |
} else { |
241 |
} |
} |
242 |
$cmp->{oldrepo} = $cmp->{repo} unless $cmp->{oldrepo}; |
$cmp->{oldrepo} = $cmp->{repo} unless $cmp->{oldrepo}; |
243 |
$cmp->{repo} = $dest; |
$cmp->{repo} = $dest; |
244 |
$track{repo} = $dest unless $dest eq $track{repo}; |
if ( ! $cmp->{src} && $repos->{$dest}->{prio} > $repos->{$track{repo}}->{prio} ) { |
245 |
|
$track{repo} = $dest; |
246 |
|
$track{svr} = $cmp->{svr}; |
247 |
|
} |
248 |
} |
} |
249 |
if ( $cmp->{src} && $reposrc{$cmp->{repo}} ) { |
if ( $cmp->{src} && $reposrc{$cmp->{repo}} ) { |
250 |
$reposrc{$cmp->{repo}}->{srpm} = $cmp; |
$reposrc{$cmp->{repo}}->{srpm} = $cmp; |
265 |
my $dest = $repos->{$track{repo}}->{prio} > $repos->{$devel2}->{prio} ? $track{repo} : $devel2; |
my $dest = $repos->{$track{repo}}->{prio} > $repos->{$devel2}->{prio} ? $track{repo} : $devel2; |
266 |
$dest = pkgdest($cmp, $devel1, $dest, $rpms->{$base}->{rpms}); |
$dest = pkgdest($cmp, $devel1, $dest, $rpms->{$base}->{rpms}); |
267 |
$dest = $devel1 if verrel($cmp, $dest, \%counts); |
$dest = $devel1 if verrel($cmp, $dest, \%counts); |
268 |
unless ( verrel($cmp, $dest, \%counts) ) { |
if ( $cmp->{src} && ! $reposrc{$dest} ) { |
269 |
push @{$cmp->{repos}}, $dest; |
$cmp->{delete}++; |
270 |
if ( $repos->{$cmp->{repo}}->{orig} ) { |
} elsif ( $repos->{$dest}->{prio} >= $repos->{$track{repo}}->{prio} && ! verrel($cmp, $dest, \%counts) ) { |
271 |
$orig{$cmp->{nvra}}++; |
unless ( $repos->{$cmp->{repo}}->{base} ) { |
272 |
} elsif ( $cmp->{src} && $reposrc{$cmp->{repo}} ) { |
my $tag = sprintf '%s%s/%s-%s', $distrepo->{$smever}->{$cmp->{repo}}, $cmp->{name}, $cmp->{ver}, $cmp->{rel}; |
273 |
$reposrc{$cmp->{repo}}->{srpm} = $cmp; |
qx(touch $tag/PUSHED) if ! $opts{t} && -d $tag && ! -f "$tag/PUSHED"; |
|
} else { |
|
|
$cmp->{delete}++; |
|
274 |
} |
} |
275 |
|
push @{$cmp->{repos}}, $dest; |
276 |
$cmp->{oldrepo} = $cmp->{repo} unless $cmp->{oldrepo}; |
$cmp->{oldrepo} = $cmp->{repo} unless $cmp->{oldrepo}; |
277 |
$cmp->{repo} = $dest; |
$cmp->{repo} = $dest; |
278 |
if ( $cmp->{src} && $reposrc{$cmp->{repo}} ) { |
$reposrc{$cmp->{repo}}->{srpm} = $cmp if $cmp->{src}; |
279 |
$reposrc{$cmp->{repo}}->{srpm} = $cmp; |
$orig{$cmp->{nvra}}++; |
|
} |
|
280 |
} else { |
} else { |
281 |
$cmp->{delete}++; |
$cmp->{delete}++; |
282 |
} |
} |
388 |
print "delete from ", $pkg->{repo}, " (", $pkg->{arch}, ", ", basename($pkg->{rpm}->filename), ")\n"; |
print "delete from ", $pkg->{repo}, " (", $pkg->{arch}, ", ", basename($pkg->{rpm}->filename), ")\n"; |
389 |
qx(rm -f $src) unless $opts{t}; |
qx(rm -f $src) unless $opts{t}; |
390 |
$repochg{$pkg->{repo}}++ unless $repos->{$pkg->{repo}}->{base} || $repos->{$pkg->{repo}}->{stage}; |
$repochg{$pkg->{repo}}++ unless $repos->{$pkg->{repo}}->{base} || $repos->{$pkg->{repo}}->{stage}; |
391 |
|
if ( $repos->{$pkg->{repo}}->{orig} && ! $repos->{$pkg->{repo}}->{base} ) { |
392 |
|
my $tag = sprintf '%s%s/%s-%s', $distrepo->{$smever}->{$pkg->{repo}}, $pkg->{name}, $pkg->{ver}, $pkg->{rel}; |
393 |
|
qx(rm -f $tag/PUSHED) if ! $opts{t} && -d $tag && -f "$tag/PUSHED"; |
394 |
|
} |
395 |
} |
} |
396 |
} |
} |
397 |
} |
} |
408 |
print "rebuild $repo/$arch\n"; |
print "rebuild $repo/$arch\n"; |
409 |
unless ( $opts{t} ) { |
unless ( $opts{t} ) { |
410 |
if ( -f "$dir/repodata/comps.xml" ) { |
if ( -f "$dir/repodata/comps.xml" ) { |
411 |
qx(createrepo -g repodata/comps.xml $dir); |
qx(createrepo --update --database --exclude *.src.rpm --exclude *-debuginfo-*.rpm --groupfile repodata/comps.xml $dir); |
412 |
} else { |
} else { |
413 |
qx(createrepo $dir); |
qx(createrepo --update --database --exclude *.src.rpm --exclude *-debuginfo-*.rpm $dir); |
414 |
} |
} |
415 |
qx(repoview $dir); |
qx(repoview $dir); |
416 |
qx(rm -rf $dir/.olddata) if -d "$dir/.olddata"; |
qx(rm -rf $dir/.olddata) if -d "$dir/.olddata"; |
419 |
} |
} |
420 |
} |
} |
421 |
unless ( $opts{t} ) { |
unless ( $opts{t} ) { |
422 |
finddepth(sub{rmdir}, $distrepo->{$smever}->{$_}) foreach ('builds','contribs','qa'); |
finddepth(sub{rmdir}, $distrepo->{$smever}->{$_}) foreach ('builds','contribs'); |
423 |
} |
} |
424 |
} |
} |
425 |
|
|
475 |
return if $repos->{$cmp->{repo}}->{base} && $repos->{$cmp->{repo}}->{prio} > $repos->{$repo}->{prio} && $pkg ge $cmp->{rpm}; |
return if $repos->{$cmp->{repo}}->{base} && $repos->{$cmp->{repo}}->{prio} > $repos->{$repo}->{prio} && $pkg ge $cmp->{rpm}; |
476 |
} |
} |
477 |
my ($src, $version, $release) = ($pkg->is_source_package ? $pkg->filename : $pkg->sourcerpm) =~ m{(?:^|/)([^/]*)-([^-]+)-([^-]+)\.\w+\.rpm$}; |
my ($src, $version, $release) = ($pkg->is_source_package ? $pkg->filename : $pkg->sourcerpm) =~ m{(?:^|/)([^/]*)-([^-]+)-([^-]+)\.\w+\.rpm$}; |
478 |
return if $skippkg->{$smever}->{$repo} && $skippkg->{$smever}->{$repo}->{$src}; |
return if $skippkg->{$smever}->{$repo} && ( $skippkg->{$smever}->{$repo}->{$src} || $skippkg->{$smever}->{$repo}->{$pkg->name} ); |
479 |
return if $repos->{$repo}->{base} && $nosig; |
return if $repos->{$repo}->{base} && $nosig; |
480 |
if ( $nosig && ! -f "$HOME/.rpmpass" ) { print " * missing signature (" .$pkg->filename . ")\n"; return; } |
if ( $nosig && ! -f "$HOME/.rpmpass" ) { print " * missing signature (" .$pkg->filename . ")\n"; return; } |
481 |
my $arch = 'unknown'; |
my $arch = 'unknown'; |