1 |
%define name smeserver-extrarepositories |
%define name smeserver-extrarepositories |
2 |
%define version 0.1 |
%define version 0.1 |
3 |
%define release 18 |
%define release 19 |
4 |
Summary: easy configuration of extra yum repo |
Summary: easy configuration of extra yum repo |
5 |
Name: %{name} |
Name: %{name} |
6 |
Version: %{version} |
Version: %{version} |
18 |
Provides configuration for external yum repository comaptible with Koozali SME Server. |
Provides configuration for external yum repository comaptible with Koozali SME Server. |
19 |
|
|
20 |
%changelog |
%changelog |
21 |
|
* Fri Jan 04 2019 Jean-Philipe Pialasse <tests@pialasse.com> 0.1-19.sme |
22 |
|
- improve zmrepo migrate fragment to avoid action if not needed. |
23 |
|
- migrate fragment for openfusion |
24 |
|
|
25 |
* Fri Jan 04 2019 John Crisp <jcrisp@safeandsoundit.co.uk> 0.1-18.sme |
* Fri Jan 04 2019 John Crisp <jcrisp@safeandsoundit.co.uk> 0.1-18.sme |
26 |
- remove perl-version from pkg lists |
- remove perl-version from pkg lists |
27 |
|
|
925 |
{ |
{ |
926 |
my $repo = $DB->get($name) or next; |
my $repo = $DB->get($name) or next; |
927 |
my $BaseURL = $repo->prop('BaseURL') || ''; |
my $BaseURL = $repo->prop('BaseURL') || ''; |
928 |
$BaseURL =~ s/zmrepo.mehvc.com/zmrepo.zoneminder.com/g; |
if ($BaseURL =~ s/zmrepo.mehvc.com/zmrepo.zoneminder.com/g) |
929 |
$repo->set_prop('BaseURL', $BaseURL); |
{$repo->set_prop('BaseURL', $BaseURL);} |
930 |
$repo->delete('Exclude'); |
$repo->delete('Exclude') if $repo->prop('delete'); |
931 |
} |
} |
932 |
|
|
933 |
} |
} |
940 |
{ |
{ |
941 |
my $repo = $DB->get($name) or next; |
my $repo = $DB->get($name) or next; |
942 |
my $BaseURL = $repo->prop('BaseURL') || ''; |
my $BaseURL = $repo->prop('BaseURL') || ''; |
943 |
$BaseURL =~ s/centos\$/centos\/\$/g; |
if ($BaseURL =~ s/centos\$/centos\/\$/g) |
944 |
$repo->set_prop('BaseURL', $BaseURL); |
{$repo->set_prop('BaseURL', $BaseURL);} |
945 |
|
} |
946 |
|
|
947 |
|
} |
948 |
|
|
949 |
|
EOF |
950 |
|
|
951 |
|
cat << 'EOF' >$RPM_BUILD_ROOT/etc/e-smith/db/yum_repositories/migrate/10openfusion |
952 |
|
{ |
953 |
|
my @addexclude = split(/,/,"perl-Devel-StackTrace,perl-ExtUtils-MakeMaker,perl-List-MoreUtils,perl-Exporter-Tiny,perl-ExtUtils-Install,perl-parent"); |
954 |
|
my %removeexclude = map { $_ => 1 } split(/[,; ]+/, 'perl-version'); |
955 |
|
my @addinclude = split(/,/,"perl-Algorithm-C3,perl-App-cpanminus,perl-B-Hooks-EndOfScope,perl-B-Hooks-OP-Check,perl-CPAN-Metanoarch,perl-Carp,perl-Class-C3,perl-Class-Load,perl-Class-Load-XS,perl-Class-Method-Modifiers,perl-Class-Singleton,perl-Class-XSAccessor,perl-Clone-PP,perl-Data-Dumper-Concise,perl-Data-IEEE754,perl-Data-OptList,perl-Data-Printer,perl-Data-Validate-IP,perl-DateTime,perl-DateTime-Locale,perl-DateTime-TimeZone,perl-Devel-GlobalDestruction,perl-Dist-CheckConflicts,perl-Eval-Closure,perl-Exporter-Tiny,perl-ExtUtils-CBuilder,perl-ExtUtils-Install,perl-ExtUtils-Manifest,perl-File-HomeDir,perl-File-Which,perl-GeoIP2,perl-Hash-FieldHash,perl-IPC-Cmd,perl-Lexical-SealRequireHints,perl-List-AllUtils,perl-Locale-Maketext-Simple,perl-MRO-Compat,perl-Math-Int128,perl-Math-Int64,perl-MaxMind-DB-Common,perl-MaxMind-DB-Reader,perl-Module-Build,perl-Module-CoreList,perl-Module-Implementation,perl-Module-Load,perl-Module-Load-Conditional,perl-Module-Runtime,perl-Moo,perl-MooX-StrictConstructor,perl-MooX-Types-MooseLike,perl-Moose,perl-Net-Works,perl-Package-DeprecationManager,perl-Package-Stash,perl-Package-Stash-XS,perl-Params-Check,perl-Params-Classify,perl-Params-Validate,perl-Perl-OSType,perl-Role-Tiny,perl-Scalar-List-Utils,perl-Socket,perl-Sort-Naturally,perl-Sub-Exporter,perl-Sub-Exporter-Progressive,perl-Sub-Identify,perl-Sub-Install,perl-Sub-Name,perl-Sub-Quote,perl-Task-Weaken,perl-Term-ANSIColor,perl-Test-Warnings,perl-Throwable,perl-Try-Tiny,perl-Variable-Magic,perl-bareword-filehandles,perl-indirect,perl-multidimensional,perl-namespace-autoclean,perl-namespace-clean,perl-strictures,perl-Devel-StackTrace,perl-ExtUtils-MakeMaker,perl-List-MoreUtils,perl-parent"); |
956 |
|
my %removeinclude = map { $_ => 1 } split(/[,; ]+/, ''); |
957 |
|
|
958 |
|
for my $name ( qw(openfusion) ) |
959 |
|
{ |
960 |
|
my $repo = $DB->get($name) or next; |
961 |
|
|
962 |
|
my @exclude = split(/,/, $repo->prop('Exclude') || ''); |
963 |
|
push @exclude, @addexclude; |
964 |
|
@exclude = grep(!defined $removeexclude{$_} , @exclude); |
965 |
|
# remove duplicates |
966 |
|
undef %saw; |
967 |
|
@exclude = grep(!$saw{$_}++, @exclude); |
968 |
|
if ($#exclude >= 0) |
969 |
|
{ |
970 |
|
$repo->set_prop('Exclude', join(',', @exclude)); |
971 |
|
} |
972 |
|
else |
973 |
|
{ |
974 |
|
$repo->delete('Exclude'); |
975 |
|
} |
976 |
|
|
977 |
|
my @include = split(/,/, $repo->prop('IncludePkgs') || ''); |
978 |
|
push @include, @addinclude; |
979 |
|
@include = grep(!defined $removeinclude{$_} , @include); |
980 |
|
# remove duplicates |
981 |
|
undef %saw; |
982 |
|
@include = grep(!$saw{$_}++, @include); |
983 |
|
if ($#include >= 0) |
984 |
|
{ |
985 |
|
$repo->set_prop('IncludePkgs', join(',', @include)); |
986 |
|
} |
987 |
|
else |
988 |
|
{ |
989 |
|
$repo->delete('IncludePkgs'); |
990 |
|
} |
991 |
|
|
992 |
|
|
993 |
|
|
994 |
} |
} |
995 |
|
|
996 |
} |
} |