1 |
%define name smeserver-extrarepositories |
%define name smeserver-extrarepositories |
2 |
%define version 0.1 |
%define version 0.1 |
3 |
%define release 3 |
%define release 4 |
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 |
|
* Sun Mar 18 2018 Jean-Philipe Pialasse <tests@pialasse.com> 0.1-4.sme |
22 |
|
- exclude ffmpeg-2.6.4 and celt-0.11 from zmrepo [SME: 10543] |
23 |
|
- add Sogo4 repo + migrate to exclude gnustep from epel if sogo repo present |
24 |
|
|
25 |
* Sun Feb 18 2018 Jean-Philipe Pialasse <tests@pialasse.com> 0.1-3.sme |
* Sun Feb 18 2018 Jean-Philipe Pialasse <tests@pialasse.com> 0.1-3.sme |
26 |
- fix wrong escape sequence for $basearch and $releasever [SME: 10239] |
- fix wrong escape sequence for $basearch and $releasever [SME: 10239] |
27 |
|
|
622 |
|
|
623 |
##################### |
##################### |
624 |
##################### |
##################### |
625 |
#Sogo3 nightly |
#Sogo4 nightly |
626 |
##################### |
##################### |
627 |
##################### |
##################### |
628 |
REPO['reponame']='sogo4' |
REPO['reponame']='sogo4' |
638 |
REPO['IncludePkgs']='gnustep-base,gnustep-make,libmemcached,libwbxml,sogo*,sope49*' |
REPO['IncludePkgs']='gnustep-base,gnustep-make,libmemcached,libwbxml,sogo*,sope49*' |
639 |
createrepo |
createrepo |
640 |
|
|
|
|
|
641 |
##################### |
##################### |
642 |
##################### |
##################### |
643 |
#Sogo stable |
#Sogo stable |
785 |
REPO['MirrorList']='' |
REPO['MirrorList']='' |
786 |
REPO['GPGCheck']='no' |
REPO['GPGCheck']='no' |
787 |
REPO['GPGKey']="" |
REPO['GPGKey']="" |
788 |
REPO['Exclude']='' |
REPO['Exclude']='ffmpeg-2.6.4,celt-0.11' |
789 |
REPO['IncludePkgs']='' |
REPO['IncludePkgs']='' |
790 |
createrepo |
createrepo |
791 |
|
|
792 |
|
|
793 |
|
##################################################### |
794 |
|
# migrates |
795 |
|
###################################################### |
796 |
|
mkdir -p $RPM_BUILD_ROOT/etc/e-smith/db/yum_repositories/migrate |
797 |
|
cat << 'EOF' >$RPM_BUILD_ROOT/etc/e-smith/db/yum_repositories/migrate/90sogo |
798 |
|
{ |
799 |
|
my @add = split(/[,; ]+/, 'gnustep-*'); |
800 |
|
my %remove = map { $_ => 1 } split(/[,; ]+/, ''); |
801 |
|
|
802 |
|
for my $name ( qw(epel) ) |
803 |
|
{ |
804 |
|
my $repo = $DB->get($name) or next; |
805 |
|
|
806 |
|
my @exclude = split(/,/, $repo->prop('Exclude') || ''); |
807 |
|
push @exclude, @add; |
808 |
|
@exclude = grep(!defined $remove{$_} && !/^CENTOS_/, @exclude); |
809 |
|
|
810 |
|
# remove duplicates |
811 |
|
undef %saw; |
812 |
|
@exclude = grep(!$saw{$_}++, @exclude); |
813 |
|
|
814 |
|
if ($#exclude >= 0) |
815 |
|
{ |
816 |
|
$repo->set_prop('Exclude', join(',', @exclude)); |
817 |
|
} |
818 |
|
else |
819 |
|
{ |
820 |
|
$repo->delete('Exclude'); |
821 |
|
} |
822 |
|
} |
823 |
|
} |
824 |
|
|
825 |
|
EOF |
826 |
|
|
827 |
|
|
828 |
|
cat << 'EOF' >$RPM_BUILD_ROOT/etc/e-smith/db/yum_repositories/migrate/10epel |
829 |
|
{ |
830 |
|
my @add = split(/[,; ]+/, ''); |
831 |
|
my %remove = map { $_ => 1 } split(/[,; ]+/, 'gnustep-*,gnustep*,gnustep-base,gnustep-make'); |
832 |
|
|
833 |
|
for my $name ( qw(epel) ) |
834 |
|
{ |
835 |
|
my $repo = $DB->get($name) or next; |
836 |
|
|
837 |
|
my @exclude = split(/,/, $repo->prop('Exclude') || ''); |
838 |
|
push @exclude, @add; |
839 |
|
@exclude = grep(!defined $remove{$_} && !/^CENTOS_/, @exclude); |
840 |
|
|
841 |
|
# remove duplicates |
842 |
|
undef %saw; |
843 |
|
@exclude = grep(!$saw{$_}++, @exclude); |
844 |
|
|
845 |
|
if ($#exclude >= 0) |
846 |
|
{ |
847 |
|
$repo->set_prop('Exclude', join(',', @exclude)); |
848 |
|
} |
849 |
|
else |
850 |
|
{ |
851 |
|
$repo->delete('Exclude'); |
852 |
|
} |
853 |
|
} |
854 |
|
} |
855 |
|
|
856 |
|
EOF |
857 |
|
|
858 |
|
|
859 |
|
|
860 |
|
|
861 |
|
|
862 |
|
|
863 |
|
########################################################## |
864 |
|
|
865 |
rm -f %{name}-%{version}-filelist* |
rm -f %{name}-%{version}-filelist* |
866 |
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT > %{name}-%{version}-filelist |
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT > %{name}-%{version}-filelist |
867 |
cat %{name}-%{version}-filelist| grep atomic > %{name}-%{version}-filelist-atomic |
cat %{name}-%{version}-filelist| grep atomic > %{name}-%{version}-filelist-atomic |