16 |
my %opts; |
my %opts; |
17 |
getopts( 'ostr:', \%opts ); |
getopts( 'ostr:', \%opts ); |
18 |
$opts{r} ||= ''; |
$opts{r} ||= ''; |
19 |
|
#available options |
20 |
|
#-o = verify we have originals of the packages in repos (not really used anymore) |
21 |
|
#-s = verify every package has a source package (so we can rebuild if necessary) |
22 |
|
#-t = test run (don't do anything just print out what would be done) |
23 |
|
#-r {regex} = regex of packages to run the script against |
24 |
|
|
25 |
my $rpm_flags = RPM2->vsf_nodsaheader | RPM2->vsf_norsaheader | RPM2->vsf_nodsa | RPM2->vsf_norsa; |
my $rpm_flags = RPM2->vsf_nodsaheader | RPM2->vsf_norsaheader | RPM2->vsf_nodsa | RPM2->vsf_norsa; |
26 |
|
|
27 |
my $osdir = 'SME'; |
my $osdir = 'Packages'; |
28 |
my $disttag = 'sme'; |
my $disttag = 'sme'; |
29 |
my $repotag = 'sme'; |
my $repotag = 'sme'; |
30 |
|
|
31 |
my $distrepo = { '8' => { active => 1, |
my $distrepo = { '8' => { active => 0, |
32 |
centos => 5, |
centos => 5, |
33 |
archs => [ 'i386', 'x86_64' ], |
archs => [ 'i386', 'x86_64' ], |
34 |
repo => '/build/smeserver/repo/8/', |
repo => '/build/smeserver/repo/8/', |
50 |
keyname => 'SME Server 7 signing key <bugteam@contribs.org>', |
keyname => 'SME Server 7 signing key <bugteam@contribs.org>', |
51 |
checksum => 'sha256', |
checksum => 'sha256', |
52 |
}, |
}, |
53 |
'10' => { active => 0, |
'10' => { active => 1, |
54 |
centos => 7, |
centos => 7, |
55 |
archs => [ 'x86_64' ], |
archs => [ 'x86_64' ], |
56 |
repo => '/build/smeserver/repo/testing/10/', |
repo => '/build/smeserver/repo/testing/10/', |
58 |
community => '/build/builds/smeserver-10-contribs/', |
community => '/build/builds/smeserver-10-contribs/', |
59 |
stage => '/build/smeserver/stage/10/', |
stage => '/build/smeserver/stage/10/', |
60 |
sign => 1, |
sign => 1, |
61 |
keyname => 'SME Server 7 signing key <bugteam@contribs.org>', |
keyname => 'Koozali SME Server signing key (10) <bugteam@koozali.org>', |
62 |
checksum => 'sha256', |
checksum => 'sha256', |
63 |
}, |
}, |
64 |
}; |
}; |
65 |
|
|
66 |
my $repos = { "${repotag}os" => { prio => 19, inc => 1, ver => 1, rel => 1, os => 1 }, |
# list here repo and priority |
67 |
"${repotag}updates" => { prio => 18, inc => 1, ver => 1, rel => 1 }, |
# prio: highest priority will hide lowest priority |
68 |
"${repotag}updates-testing" => { prio => 17, inc => 1, ver => 1, rel => 3 }, |
# inc: include for iso ? |
69 |
"${repotag}extras" => { prio => 16, inc => 0, ver => 1, rel => 1 }, |
# ver: |
70 |
"${repotag}addons" => { prio => 15, inc => 0, ver => 1, rel => 1 }, |
# rel: |
71 |
"${repotag}contribs" => { prio => 14, inc => 0, ver => 1, rel => 1 }, |
# orig: |
72 |
"${repotag}test" => { prio => 13, inc => 0, ver => 2, rel => 3, devel => 2 }, |
# base, os, stage: |
73 |
"${repotag}dev" => { prio => 12, inc => 0, ver => 1, rel => 1, devel => 1 }, |
my $repos = { "${repotag}os" => { prio => 29, inc => 1, ver => 1, rel => 1, os => 1 }, |
74 |
'centos' => { prio => 10, inc => 0, ver => 0, rel => 0, orig => 1, base => 1 }, |
"${repotag}updates" => { prio => 28, inc => 1, ver => 1, rel => 1 }, |
75 |
'epel' => { prio => 9, inc => 0, ver => 0, rel => 0, orig => 1, base => 1 }, |
"${repotag}updates-testing" => { prio => 27, inc => 1, ver => 1, rel => 3 }, |
76 |
'rpmforge' => { prio => 7, inc => 0, ver => 0, rel => 0, orig => 1, base => 1 }, |
"${repotag}extras" => { prio => 26, inc => 0, ver => 1, rel => 1 }, |
77 |
'atrpms' => { prio => 6, inc => 0, ver => 0, rel => 0, orig => 1, base => 1 }, |
"${repotag}addons" => { prio => 25, inc => 0, ver => 1, rel => 1 }, |
78 |
|
"${repotag}contribs" => { prio => 24, inc => 0, ver => 1, rel => 1 }, |
79 |
|
"${repotag}test" => { prio => 23, inc => 0, ver => 2, rel => 3, devel => 2 }, |
80 |
|
"${repotag}dev" => { prio => 22, inc => 0, ver => 1, rel => 1, devel => 1 }, |
81 |
|
'centos' => { prio => 21, inc => 0, ver => 0, rel => 0, orig => 1, base => 1 }, |
82 |
|
'remisafe' => { prio => 12, inc => 0, ver => 0, rel => 0, orig => 1, base => 1 }, |
83 |
|
'remi' => { prio => 11, inc => 0, ver => 0, rel => 0, orig => 1, base => 1 }, |
84 |
|
'epel' => { prio => 10, inc => 0, ver => 0, rel => 0, orig => 1, base => 1 }, |
85 |
|
'epeltesting' => { prio => 9, inc => 0, ver => 0, rel => 0, orig => 1, base => 1 }, |
86 |
|
'rpmfusion' => { prio => 8, inc => 0, ver => 0, rel => 0, orig => 1, base => 1 }, |
87 |
|
'openfusion' => { prio => 7, inc => 0, ver => 0, rel => 0, orig => 1, base => 1 }, |
88 |
|
'rpmforge' => { prio => 6, inc => 0, ver => 0, rel => 0, orig => 1, base => 1 }, |
89 |
|
'atrpms' => { prio => 5, inc => 0, ver => 0, rel => 0, orig => 1, base => 1 }, |
90 |
'builds' => { prio => 4, inc => 0, ver => 0, rel => 0, orig => 1 }, |
'builds' => { prio => 4, inc => 0, ver => 0, rel => 0, orig => 1 }, |
91 |
'community' => { prio => 2, inc => 0, ver => 0, rel => 0, orig => 1 }, |
'community' => { prio => 2, inc => 0, ver => 0, rel => 0, orig => 1 }, |
92 |
'stage' => { prio => 1, inc => 0, ver => 0, rel => 0, stage => 1, os => 1 }, |
'stage' => { prio => 1, inc => 0, ver => 0, rel => 0, stage => 1, os => 1 }, |
93 |
}; |
}; |
94 |
|
|
95 |
|
# list here the path on our local mirror to each upstream and our mirrors |
96 |
|
# ~A will be expanded to architecture |
97 |
|
# ~C will be expanded to Centos main version number, i.e. 7 for SME 10. |
98 |
|
# ~s will be expanded to SME version |
99 |
|
# ~S expanded to repo root |
100 |
my $baserepo = { "~S${repotag}os/~A/" => "${repotag}os", |
my $baserepo = { "~S${repotag}os/~A/" => "${repotag}os", |
101 |
"~S${repotag}updates/~A/" => "${repotag}updates", |
"~S${repotag}updates/~A/" => "${repotag}updates", |
102 |
"~S${repotag}updates-testing/~A/" => "${repotag}updates-testing", |
"~S${repotag}updates-testing/~A/" => "${repotag}updates-testing", |
115 |
'/mirrors/centos-vault/~C/os/~A/' => 'centos', |
'/mirrors/centos-vault/~C/os/~A/' => 'centos', |
116 |
'/mirrors/centos-vault/~C/extras/~A/' => 'centos', |
'/mirrors/centos-vault/~C/extras/~A/' => 'centos', |
117 |
'/mirrors/fedora/epel/~C/~A/' => 'epel', |
'/mirrors/fedora/epel/~C/~A/' => 'epel', |
118 |
'/mirrors/fedora/epel/testing/~C/~A/' => 'epel', |
'/mirrors/fedora/epel/testing/~C/~A/' => 'epeltesting', |
119 |
|
'/mirrors/remi/enterprise/~C/remi/~A/' => 'remi', |
120 |
|
'/mirrors/remi/SRPMS/' => 'remi', |
121 |
|
'/mirrors/remi/enterprise/~C/safe/~A/' => 'remisafe', |
122 |
|
'/mirrors/rpmfusion/updates/~C/~A/' => 'rpmfusion', |
123 |
'/mirrors/rpmforge/redhat/el~C/en/~A/dag/' => 'rpmforge', |
'/mirrors/rpmforge/redhat/el~C/en/~A/dag/' => 'rpmforge', |
124 |
'/mirrors/rpmforge/redhat/el~C/en/~A/extras/' => 'rpmforge', |
'/mirrors/rpmforge/redhat/el~C/en/~A/extras/' => 'rpmforge', |
125 |
'/mirrors/rpmforge/source/' => 'rpmforge', |
'/mirrors/rpmforge/source/' => 'rpmforge', |
127 |
'/mirrors/atrpms/el~C-~A/atrpms/testing/' => 'atrpms', |
'/mirrors/atrpms/el~C-~A/atrpms/testing/' => 'atrpms', |
128 |
'/mirrors/atrpms/src/el~C-~A/atrpms/stable/' => 'atrpms', |
'/mirrors/atrpms/src/el~C-~A/atrpms/stable/' => 'atrpms', |
129 |
'/mirrors/atrpms/src/el~C-~A/atrpms/testing/' => 'atrpms', |
'/mirrors/atrpms/src/el~C-~A/atrpms/testing/' => 'atrpms', |
130 |
|
'/mirrors/openfusion/centos~C-~A/' => 'openfusion', |
131 |
|
'/mirrors/openfusion/srpms-el~C/' => 'openfusion', |
132 |
}; |
}; |
133 |
|
|
134 |
|
# add here packages to exclude |
135 |
|
# for each version, if a repo is listed and rpm are listed they will be ignored fromt his repo |
136 |
my $skippkg = { '8' => { 'atrpms' => { map { $_ => 1 } ( 'clamav', 'gnupg' ) }, |
my $skippkg = { '8' => { 'atrpms' => { map { $_ => 1 } ( 'clamav', 'gnupg' ) }, |
137 |
'centos' => { map { $_ => 1 } ( 'horde', 'imp-h3', 'ingo-h3', 'turba-h3' ) }, |
'centos' => { map { $_ => 1 } ( 'horde', 'imp-h3', 'ingo-h3', 'turba-h3' ) }, |
138 |
'epel' => { map { $_ => 1 } ( 'clamav', 'fping', 'html2ps', 'horde', 'libtalloc', 'libtdb', 'oidentd', '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', 'smolt' ) }, |
'epel' => { map { $_ => 1 } ( 'clamav', 'cppunit', 'fping', 'html2ps', 'horde', 'libtalloc', 'libtdb', 'oidentd', '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', 'smolt' ) }, |
139 |
'rpmforge' => { map { $_ => 1 } ( 'dovecot', 'libtalloc', 'mod_auth_tkt', 'perl-Test-Inline', 'spamassassin' ) }, |
'epeltesting' => { map { $_ => 1 } ( 'clamav', 'cppunit', 'fping', 'html2ps', 'horde', 'libtalloc', 'libtdb', 'oidentd', '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', 'smolt' ) }, |
140 |
|
'rpmforge' => { map { $_ => 1 } ( 'dovecot', 'libtalloc', 'mod_auth_tkt', 'perl-Test-Inline', 'spamassassin', 'lzo', 'perl-Convert-TNEF', 'perl-Mail-SPF', 'proftpd', 'erlang', 'perl-DateTime-Format-Mail', 'perl-DateTime-Format-W3CDTF', 'perl-Email-Abstract', 'perl-Email-MIME-Attachment-Stripper', 'perl-Email-Reply', 'perl-Font-AFM', 'perl-IPC-Run', 'rkhunter') }, |
141 |
}, |
}, |
142 |
'9' => { 'atrpms' => { map { $_ => 1 } ( 'clamav', 'perl-Pod-Escapes', 'perl-Pod-Simple' ) }, |
'9' => { 'atrpms' => { map { $_ => 1 } ( 'clamav', 'perl-Pod-Escapes', 'perl-Pod-Simple','libvorbis' , 'libogg','iksemel' ) }, |
143 |
'epel' => { map { $_ => 1 } ( 'oidentd', 'perl-Razor-Agent' ) }, |
'epel' => { map { $_ => 1 } ( 'clamav', 'oidentd', 'perl-Razor-Agent' ) }, |
144 |
'rpmforge' => { map { $_ => 1 } ( 'perl-CGI', 'perl-Compress-Raw-Zlib', 'perl-ExtUtils-ParseXS', 'perl-Pod-Escapes', 'perl-Pod-Simple', 'perl-Time-HiRes', 'perl-version', 'spamassassin' ) }, |
'epeltesting' => { map { $_ => 1 } ( 'clamav', 'oidentd', 'perl-Razor-Agent' ) }, |
145 |
|
'rpmforge' => { map { $_ => 1 } ( 'perl-CGI', 'perl-Compress-Raw-Zlib', 'perl-ExtUtils-ParseXS', 'perl-Pod-Escapes', 'perl-Pod-Simple', 'perl-Time-HiRes', 'perl-version', 'spamassassin', 'portreserve', 'perl-libwww-perl' , 'lzo', 'perl-BSD-Resource', 'perl-Convert-ASN1', 'perl-DBD-SQLite', 'perl-Devel-StackTrace', 'perl-Digest-SHA1', 'perl-JSON', 'perl-MIME-tools', 'perl-MailTools', 'perl-PPI', 'perl-URI', 'perl-XML-NamespaceSupport', 'perl-XML-Parser', 'perl-XML-SAX-Writer', 'perl-YAML-Syck', 'proftpd', 'syslinux') }, |
146 |
}, |
}, |
147 |
'10' => { |
'10' => { |
148 |
|
'epel' => { map { $_ => 1 } ( 'clamav') }, |
149 |
|
'epeltesting' => { map { $_ => 1 } ( 'clamav', 'tidy') }, |
150 |
|
'openfusion' => { map { $_ => 1 } ( 'daemontools-encore') }, |
151 |
}, |
}, |
152 |
}; |
}; |
153 |
|
|
154 |
|
# add here include only conditions |
155 |
|
# for each version if a repo is listed here, only listed rpm will be considered |
156 |
|
my $onlypkg = { '8' => { |
157 |
|
'openfusion' => { }, |
158 |
|
'remi' => { }, |
159 |
|
'remisafe' => { }, |
160 |
|
}, |
161 |
|
'9' => { |
162 |
|
'openfusion' => { map { $_ => 1 } ( 'perl-Carp', 'perl-Scalar-List-Utils', 'perl-Class-Method-Modifiers', 'perl-B-Hooks-OP-Check', 'perl-Sub-Exporter-Progressive', 'perl-Devel-GlobalDestruction', 'perl-Socket', 'perl-Data-Validate-IP', 'perl-Eval-Closure', 'perl-Params-Classify', 'perl-Module-Runtime', 'perl-Module-Implementation', 'perl-Class-Load-XS', 'perl-MooX-Types-MooseLike', 'perl-Hash-FieldHash', 'perl-Algorithm-C3', 'perl-Class-C3', 'perl-MRO-Compat', 'perl-Class-XSAccessor', 'perl-ExtUtils-Manifest', 'perl-IPC-Cmd', 'perl-Module-Build', 'perl-ExtUtils-CBuilder', 'perl-Perl-OSType', 'perl-ExtUtils-Install', 'perl-Params-Validate', 'perl-Sub-Name', 'perl-Sub-Quote', 'perl-Sub-Identify', 'perl-Role-Tiny', 'perl-File-HomeDir', 'perl-Data-Dumper-Concise', 'perl-multidimensional', 'perl-Test-Warnings', 'perl-Term-ANSIColor', 'perl-Task-Weaken', 'perl-Clone-PP', 'perl-Data-IEEE754', 'perl-DateTime-TimeZone', 'perl-Exporter-Tiny', 'perl-List-AllUtils', 'perl-Dist-CheckConflicts', 'perl-Moose', 'perl-DateTime-Locale', 'perl-DateTime', 'perl-Variable-Magic', 'perl-B-Hooks-EndOfScope', 'perl-namespace-clean', 'perl-namespace-autoclean', 'perl-Lexical-SealRequireHints', 'perl-bareword-filehandles', 'perl-indirect', 'perl-strictures', 'perl-Moo', 'perl-MooX-StrictConstructor', 'perl-Throwable', 'perl-Math-Int64', 'perl-Math-Int128', 'perl-MaxMind-DB-Common', 'perl-Net-Works', 'perl-Sort-Naturally', 'perl-Data-Printer', 'perl-MaxMind-DB-Reader', 'perl-GeoIP2', 'perl-Data-OptList','perl-Class-Load', 'perl-App-cpanminus' )}, # not for moment : perl-Devel-StackTrace perl-parent perl-ExtUtils-MakeMaker perl-List-MoreUtils |
163 |
|
'remi' => { }, |
164 |
|
}, |
165 |
|
'10' => { |
166 |
|
'openfusion' => {map { $_ => 1 } ( 'perl-Carp', 'perl-Scalar-List-Utils', 'perl-Class-Method-Modifiers', 'perl-B-Hooks-OP-Check', 'perl-Sub-Exporter-Progressive', 'perl-Devel-GlobalDestruction', 'perl-Socket', 'perl-Data-Validate-IP', 'perl-Eval-Closure', 'perl-Params-Classify', 'perl-Module-Runtime', 'perl-Module-Implementation', 'perl-Class-Load-XS', 'perl-MooX-Types-MooseLike', 'perl-Hash-FieldHash', 'perl-Algorithm-C3', 'perl-Class-C3', 'perl-MRO-Compat', 'perl-Class-XSAccessor', 'perl-ExtUtils-Manifest', 'perl-IPC-Cmd', 'perl-Module-Build', 'perl-ExtUtils-CBuilder', 'perl-Perl-OSType', 'perl-ExtUtils-Install', 'perl-Params-Validate', 'perl-Sub-Name', 'perl-Sub-Quote', 'perl-Sub-Identify', 'perl-Role-Tiny', 'perl-File-HomeDir', 'perl-Data-Dumper-Concise', 'perl-multidimensional', 'perl-Test-Warnings', 'perl-Term-ANSIColor', 'perl-Task-Weaken', 'perl-Clone-PP', 'perl-Data-IEEE754', 'perl-DateTime-TimeZone', 'perl-Exporter-Tiny', 'perl-List-AllUtils', 'perl-Dist-CheckConflicts', 'perl-Moose', 'perl-DateTime-Locale', 'perl-DateTime', 'perl-Variable-Magic', 'perl-B-Hooks-EndOfScope', 'perl-namespace-clean', 'perl-namespace-autoclean', 'perl-Lexical-SealRequireHints', 'perl-bareword-filehandles', 'perl-indirect', 'perl-strictures', 'perl-Moo', 'perl-MooX-StrictConstructor', 'perl-Throwable', 'perl-Math-Int64', 'perl-Math-Int128', 'perl-MaxMind-DB-Common', 'perl-Net-Works', 'perl-Sort-Naturally', 'perl-Data-Printer', 'perl-MaxMind-DB-Reader', 'perl-GeoIP2', 'perl-Data-OptList','perl-Class-Load', 'perl-App-cpanminus', 'perl-Array-Compare', 'perl-Unicode-IMAPUtf7', 'perl-Filesys-DiskFree') }, |
167 |
|
'remi' => { map { $_ => 1 } ( 'php-pear' )}, |
168 |
|
}, |
169 |
|
}; |
170 |
|
|
171 |
my ($stage) = sort { $repos->{$a}->{stage} <=> $repos->{$b}->{stage} } grep { $repos->{$_}->{stage} } keys %$repos; |
my ($stage) = sort { $repos->{$a}->{stage} <=> $repos->{$b}->{stage} } grep { $repos->{$_}->{stage} } keys %$repos; |
172 |
my ($devel1, $devel2) = sort { $repos->{$a}->{devel} <=> $repos->{$b}->{devel} } grep { $repos->{$_}->{devel} } keys %$repos; |
my ($devel1, $devel2) = sort { $repos->{$a}->{devel} <=> $repos->{$b}->{devel} } grep { $repos->{$_}->{devel} } keys %$repos; |
173 |
$devel2 ||= $devel1; |
$devel2 ||= $devel1; |
181 |
%sources = (); |
%sources = (); |
182 |
%base = (); |
%base = (); |
183 |
|
|
184 |
|
@{$distrepo->{$ver}->{all_archs}} = ('noarch', @{$distrepo->{$ver}->{'archs'}}); |
185 |
|
if ( grep $_ eq 'i386', @{$distrepo->{$ver}->{'archs'}} ) { |
186 |
|
push @{$distrepo->{$ver}->{all_archs}}, ('i586', 'i686'); |
187 |
|
} |
188 |
|
|
189 |
foreach my $dir ( sort { $repos->{$baserepo->{$b}}->{prio} <=> $repos->{$baserepo->{$a}}->{prio} || $a cmp $b } keys %$baserepo ) { |
foreach my $dir ( sort { $repos->{$baserepo->{$b}}->{prio} <=> $repos->{$baserepo->{$a}}->{prio} || $a cmp $b } keys %$baserepo ) { |
190 |
my $bdir = $dir; |
my $bdir = $dir; |
191 |
$bdir =~ s/~S/$distrepo->{$ver}->{repo}/; |
$bdir =~ s/~S/$distrepo->{$ver}->{repo}/; |
192 |
$bdir =~ s/~s/$ver/; |
$bdir =~ s/~s/$ver/; |
193 |
$bdir =~ s/~C/$distrepo->{$ver}->{centos}/; |
$bdir =~ s/~C/$distrepo->{$ver}->{centos}/; |
214 |
} |
} |
215 |
next unless -d $adir; |
next unless -d $adir; |
216 |
opendir DIR, $adir or next; |
opendir DIR, $adir or next; |
217 |
process_rpm("$adir$_", $ver, $baserepo->{$dir}) foreach readdir DIR; |
my @txt = grep { /\.rpm$/ && -f "$adir/$_" } readdir DIR; |
218 |
closedir DIR; |
closedir DIR; |
219 |
|
if (scalar(@txt)) { |
220 |
|
opendir DIR, $adir or next; |
221 |
|
process_rpm("$adir$_", $ver, $baserepo->{$dir}) foreach readdir DIR; |
222 |
|
closedir DIR; |
223 |
|
} elsif ($baserepo->{$dir} eq 'epel') { |
224 |
|
# EPEL 7 uses a structure with subfolders of first letter of package |
225 |
|
find( { wanted => sub { process_rpm($_, $ver, $baserepo->{$dir}) if ($_ =~ m/\.rpm$/);}, no_chdir => 1, follow_fast => 1 }, $adir ); |
226 |
|
} |
227 |
last unless $dir =~ m{~A}; |
last unless $dir =~ m{~A}; |
228 |
} |
} |
229 |
} |
} |
360 |
} |
} |
361 |
} elsif ( $repos->{$cmp->{repo}}->{stage} ) { |
} elsif ( $repos->{$cmp->{repo}}->{stage} ) { |
362 |
$cmp->{delete}++; |
$cmp->{delete}++; |
363 |
} else { |
} elsif ( $cmp->{src} || grep $_ eq $cmp->{rpm}->arch, @{$distrepo->{$ver}->{all_archs}} ) { |
364 |
$srpm = $cmp if ! $srpm && $cmp->{src}; |
$srpm = $cmp if ! $srpm && $cmp->{src}; |
365 |
my $dest = $repos->{$track{repo}}->{prio} > $repos->{$devel2}->{prio} ? $track{repo} : $devel2; |
my $dest = $repos->{$track{repo}}->{prio} > $repos->{$devel2}->{prio} ? $track{repo} : $devel2; |
366 |
$dest = pkgdest($cmp, $devel1, $dest, $rpms->{$base}->{rpms}); |
$dest = pkgdest($cmp, $devel1, $dest, $rpms->{$base}->{rpms}); |
459 |
push @{$p2->{repos}}, $p2->{repo}; |
push @{$p2->{repos}}, $p2->{repo}; |
460 |
} |
} |
461 |
} elsif ( scalar @{$acnt->{$r}->{$p}->{$a}} != 1 ) { |
} elsif ( scalar @{$acnt->{$r}->{$p}->{$a}} != 1 ) { |
462 |
print "\n * many packages ($r, $a, $p)\n" unless $p =~ m{^syslinux-nonlinux-[0-9]}; |
print "\n * many packages ($r, $a, $p)\n" unless ( ($p =~ m{^syslinux-nonlinux-[0-9]}) || ($p =~ m{^lib(mcrypt|webp)-[0-9]}) ) ; |
463 |
} |
} |
464 |
} |
} |
465 |
} |
} |
513 |
push @d, "${head}SRPMS/" . basename($pkg->{rpm}->filename); |
push @d, "${head}SRPMS/" . basename($pkg->{rpm}->filename); |
514 |
} elsif ( $pkg->{rpm}->arch eq 'noarch' ) { |
} elsif ( $pkg->{rpm}->arch eq 'noarch' ) { |
515 |
push @d, map { "${head}$_/$tail" . basename($pkg->{rpm}->filename) } @{$distrepo->{$ver}->{'archs'}}; |
push @d, map { "${head}$_/$tail" . basename($pkg->{rpm}->filename) } @{$distrepo->{$ver}->{'archs'}}; |
516 |
|
} elsif ($ver>=10 && $pkg->{rpm}->arch =~ m{^(i[356]86)$} && $pkg->{arch} =~ m{^(x86_64)$} ) { |
517 |
|
#add copy of i686 packages in x86_64 folder for SME>=10 |
518 |
|
push @d, map { "${head}$_/$tail" . basename($pkg->{rpm}->filename) } @{$distrepo->{$ver}->{'archs'}}; |
519 |
} elsif ( $pkg->{rpm}->arch =~ m{^(i[356]86)$} ) { |
} elsif ( $pkg->{rpm}->arch =~ m{^(i[356]86)$} ) { |
520 |
push @d, "${head}i386/$tail" . basename($pkg->{rpm}->filename); |
push @d, "${head}i386/$tail" . basename($pkg->{rpm}->filename); |
521 |
} else { |
} else { |
572 |
my $checksum = "--checksum $distrepo->{$ver}->{checksum}"; |
my $checksum = "--checksum $distrepo->{$ver}->{checksum}"; |
573 |
|
|
574 |
my $exclude = ""; |
my $exclude = ""; |
575 |
$exclude .= " --exclude ${osdir}/*" if -d "$dir/Packages"; |
$exclude .= " --exclude ${osdir}/*" if ( -d "$dir/Packages" && ${osdir} ne "Packages" ); |
576 |
$exclude .= " --exclude *smeserver-release*.rpm" if $dir =~ m{test/|-testing/}; |
$exclude .= " --exclude *smeserver-release*.rpm" if $dir =~ m{test/|-testing/}; |
577 |
|
|
578 |
my $groupfile = ""; |
my $groupfile = ""; |
590 |
} |
} |
591 |
} |
} |
592 |
unless ( $opts{t} ) { |
unless ( $opts{t} ) { |
593 |
foreach (@{$distrepo->{$ver}->{builds}}) |
foreach (@{$distrepo->{$ver}->{'builds'}}) |
594 |
{ |
{ |
595 |
finddepth(sub{rmdir}, "$_") if -d "$_"; |
finddepth(sub{rmdir}, "$_") if -d "$_"; |
596 |
} |
} |
597 |
finddepth(sub{rmdir}, $distrepo->{$ver}->{community}) if -d "$distrepo->{$ver}->{community}"; |
finddepth(sub{rmdir}, $distrepo->{$ver}->{'community'}) if -d "$distrepo->{$ver}->{'community'}"; |
598 |
} |
} |
599 |
} |
} |
600 |
|
|
656 |
} |
} |
657 |
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$}; |
658 |
return if $skippkg->{$ver}->{$repo} && ( $skippkg->{$ver}->{$repo}->{$src} || $skippkg->{$ver}->{$repo}->{$pkg->name} ); |
return if $skippkg->{$ver}->{$repo} && ( $skippkg->{$ver}->{$repo}->{$src} || $skippkg->{$ver}->{$repo}->{$pkg->name} ); |
659 |
|
return if $onlypkg->{$ver}->{$repo} && !( $onlypkg->{$ver}->{$repo}->{$src} || $onlypkg->{$ver}->{$repo}->{$pkg->name} ); |
660 |
return if $repos->{$repo}->{base} && $nosig && $baserepo->{$ver}->{sign}; |
return if $repos->{$repo}->{base} && $nosig && $baserepo->{$ver}->{sign}; |
661 |
if ( $nosig && ! -f "$HOME/.rpmpass" ) { print " * missing signature (" .$pkg->filename . ")\n"; return; } |
if ( $nosig && ! -f "$HOME/.rpmpass" ) { print " * missing signature (" .$pkg->filename . ")\n"; return; } |
662 |
my $arch = 'unknown'; |
my $arch = 'unknown'; |