/[smecontribs]/rpms/smeserver-extrarepositories/contribs9/smeserver-extrarepositories.spec
ViewVC logotype

Diff of /rpms/smeserver-extrarepositories/contribs9/smeserver-extrarepositories.spec

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

Revision 1.6 by jpp, Sun Feb 18 21:16:16 2018 UTC Revision 1.8 by jpp, Sun Mar 18 09:27:52 2018 UTC
# Line 1  Line 1 
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}
# Line 18  AutoReqProv: no Line 18  AutoReqProv: no
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    
# Line 618  createrepo Line 622  createrepo
622    
623  #####################  #####################
624  #####################  #####################
625    #Sogo4 nightly
626    #####################
627    #####################
628    REPO['reponame']='sogo4'
629    REPO['fullreponame']='Inverse SOGo 4 Repository'
630    REPO['EnableGroups']='no'
631    REPO['Visible']='yes'
632    REPO['status']='disabled'
633    REPO['BaseURL']='http://packages.inverse.ca/SOGo/nightly/4/rhel/$releasever/$basearch'
634    REPO['MirrorList']=''
635    REPO['GPGCheck']='no'
636    REPO['GPGKey']=''
637    REPO['Exclude']=''
638    REPO['IncludePkgs']='gnustep-base,gnustep-make,libmemcached,libwbxml,sogo*,sope49*'
639    createrepo
640    
641    #####################
642    #####################
643  #Sogo stable  #Sogo stable
644  #####################  #####################
645  #####################  #####################
# Line 763  REPO['BaseURL']='http://zmrepo.mehvc.com Line 785  REPO['BaseURL']='http://zmrepo.mehvc.com
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


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed