diff -Nur --no-dereference smeserver-mock-1.0.old/root/etc/mock/perl.prov smeserver-mock-1.0/root/etc/mock/perl.prov --- smeserver-mock-1.0.old/root/etc/mock/perl.prov 1969-12-31 19:00:00.000000000 -0500 +++ smeserver-mock-1.0/root/etc/mock/perl.prov 2022-06-30 11:34:44.562000000 -0400 @@ -0,0 +1,222 @@ +#!/usr/bin/perl + +# RPM (and it's source code) is covered under two separate licenses. + +# The entire code base may be distributed under the terms of the GNU +# General Public License (GPL), which appears immediately below. +# Alternatively, all of the source code in the lib subdirectory of the +# RPM source code distribution as well as any code derived from that +# code may instead be distributed under the GNU Library General Public +# License (LGPL), at the choice of the distributor. The complete text +# of the LGPL appears at the bottom of this file. + +# This alternative is allowed to enable applications to be linked +# against the RPM library (commonly called librpm) without forcing +# such applications to be distributed under the GPL. + +# Any questions regarding the licensing of RPM should be addressed to +# Erik Troan . + +# a simple script to print the proper name for perl libraries. + +# To save development time I do not parse the perl grammar but +# instead just lex it looking for what I want. I take special care to +# ignore comments and pod's. + +# it would be much better if perl could tell us the proper name of a +# given script. + +# The filenames to scan are either passed on the command line or if +# that is empty they are passed via stdin. + +# If there are lines in the file which match the pattern +# (m/^\s*\$VERSION\s*=\s+/) +# then these are taken to be the version numbers of the modules. +# Special care is taken with a few known idioms for specifying version +# numbers of files under rcs/cvs control. + +# If there are strings in the file which match the pattern +# m/^\s*\$RPM_Provides\s*=\s*["'](.*)['"]/i +# then these are treated as additional names which are provided by the +# file and are printed as well. + +# I plan to rewrite this in C so that perl is not required by RPM at +# build time. + +# by Ken Estes Mail.com kestes@staff.mail.com + +if ("@ARGV") { + foreach (@ARGV) { + next if !/\.pm$/; + process_file($_); + } +} else { + + # notice we are passed a list of filenames NOT as common in unix the + # contents of the file. + + foreach (<>) { + next if !/\.pm$/; + process_file($_); + } +} + + +foreach $module (sort keys %require) { + if (length($require{$module}) == 0) { + print "perl($module)\n"; + } else { + + # I am not using rpm3.0 so I do not want spaces around my + # operators. Also I will need to change the processing of the + # $RPM_* variable when I upgrade. + + print "perl($module) = $require{$module}\n"; + } +} + +exit 0; + + + +sub process_file { + + my ($file) = @_; + chomp $file; + + if (!open(FILE, $file)) { + warn("$0: Warning: Could not open file '$file' for reading: $!\n"); + return; + } + + my ($package, $version, $incomment, $inover, $inheredoc) = (); + + while () { + + # Skip contents of HEREDOCs + if (! defined $inheredoc) { + # skip the documentation + + # we should not need to have item in this if statement (it + # properly belongs in the over/back section) but people do not + # read the perldoc. + + if (m/^=(head[1-4]|pod|for|item)/) { + $incomment = 1; + } + + if (m/^=(cut)/) { + $incomment = 0; + $inover = 0; + } + + if (m/^=(over)/) { + $inover = 1; + } + + if (m/^=(back)/) { + $inover = 0; + } + + if ($incomment || $inover || m/^\s*#/) { + next; + } + + # skip the data section + if (m/^__(DATA|END)__$/) { + last; + } + + # Find the start of a HEREDOC + if (m/<<\s*[\"\'](\w+)[\"\']\s*;\s*$/) { + $inheredoc = $1; + } + } else { + # We're in a HEREDOC; continue until the end of it + if (m/^$inheredoc\s*$/) { + $inheredoc = undef; + } + next; + } + + # not everyone puts the package name of the file as the first + # package name so we report all namespaces except some common + # false positives as if they were provided packages (really ugly). + + if (m/^\s*package\s+([_:a-zA-Z0-9]+)\s*(?:v?([0-9_.]+)\s*)?[;{]/) { + $package = $1; + $version = $2; + if ($package eq 'main') { + undef $package; + } else { + # If $package already exists in the $require hash, it means + # the package definition is broken up over multiple blocks. + # In that case, don't stomp a previous $VERSION we might have + # found. (See BZ#214496.) + $require{$package} = $version unless (exists $require{$package}); + } + } + + # after we found the package name take the first assignment to + # $VERSION as the version number. Exporter requires that the + # variable be called VERSION so we are safe. + + # here are examples of VERSION lines from the perl distribution + + #FindBin.pm:$VERSION = $VERSION = sprintf("%d.%02d", q$Revision: 1.9 $ =~ /(\d+)\.(\d+)/); + #ExtUtils/Install.pm:$VERSION = substr q$Revision: 1.9 $, 10; + #CGI/Apache.pm:$VERSION = (qw$Revision: 1.9 $)[1]; + #DynaLoader.pm:$VERSION = $VERSION = "1.03"; # avoid typo warning + #General.pm:$Config::General::VERSION = 2.33; + # + # or with the new "our" pragma you could (read will) see: + # + # our $VERSION = '1.00' + if ($package && m/^\s*(our\s+)?\$(\Q$package\E::)?VERSION\s*=\s+/) { + + # first see if the version string contains the string + # '$Revision' this often causes bizarre strings and is the most + # common method of non static numbering. + + if (m/\$Revision: (\d+[.0-9]+)/) { + $version = $1; + } elsif (m/=\s*['"]?(\d+[._0-9]+)['"]?/) { + + # look for a static number hard coded in the script + + $version = $1; + } + $require{$package} = $version; + } + + # Allow someone to have a variable that defines virtual packages + # The variable is called $RPM_Provides. It must be scoped with + # "our", but not "local" or "my" (just would not make sense). + # + # For instance: + # + # $RPM_Provides = "blah bleah" + # + # Will generate provides for "blah" and "bleah". + # + # Each keyword can appear multiple times. Don't + # bother with datastructures to store these strings, + # if we need to print it print it now. + + if (m/^\s*(our\s+)?\$RPM_Provides\s*=\s*["'](.*)['"]/i) { + foreach $_ (split(/\s+/, $2)) { + print "$_\n"; + } + } + + } + + if (defined $inheredoc) { + die "Unclosed HEREDOC [$inheredoc] in file: '$file'\n"; + } + + close(FILE) || + die("$0: Could not close file: '$file' : $!\n"); + + return; +} diff -Nur --no-dereference smeserver-mock-1.0.old/root/etc/mock/smeserver-8-i386-base.cfg smeserver-mock-1.0/root/etc/mock/smeserver-8-i386-base.cfg --- smeserver-mock-1.0.old/root/etc/mock/smeserver-8-i386-base.cfg 2022-06-30 11:01:08.996000000 -0400 +++ smeserver-mock-1.0/root/etc/mock/smeserver-8-i386-base.cfg 1969-12-31 19:00:00.000000000 -0500 @@ -1,77 +0,0 @@ -config_opts['package_manager'] = 'yum' -config_opts['use_nspawn'] = False - -config_opts['root'] = 'smeserver-8-i386' -config_opts['target_arch'] = 'i386' -config_opts['dist'] = '.el5.sme' - -config_opts['plugin_conf']['ccache_opts']['dir'] = "%(cache_topdir)s/ccache/i386/" - -config_opts['macros']['%distribution'] = "SME Server v8" -config_opts['macros']['%packager'] = "Contribs.org " -config_opts['macros']['%vendor'] = "Contribs.org " -config_opts['macros']['%dist'] = ".el5.sme" - -config_opts['yum.conf'] = """ -[main] -cachedir=/var/cache/yum -debuglevel=1 -logfile=/var/log/yum.log -reposdir=/dev/null -retries=20 -obsoletes=1 -gpgcheck=0 -assumeyes=1 -syslog_ident=mock -syslog_device= -exclude=*.x86_64 - -[os] -name=os -baseurl=http://buildsys.koozali.org/build/5/os/i386 -exclude=buildsys-macros - -[updates] -name=updates -baseurl=http://buildsys.koozali.org/build/5/updates/i386 -exclude=buildsys-macros - -[fastrack] -name=fastrack -baseurl=http://buildsys.koozali.org/build/5/fastrack/i386 - - -# centos cr -[opt1] -name=opt1 -baseurl=http://buildsys.koozali.org/build/5/opt1/i386 - -# centos extra -[opt2] -name=opt2 -baseurl=http://buildsys.koozali.org/build/5/opt2/i386 - -# Not used -[opt3] -name=opt3 -baseurl=http://buildsys.koozali.org/build/5/opt3/i386 - -[epel] -name=epel -baseurl=http://buildsys.koozali.org/build/5/epel/i386 -includepkgs=ccache fakeroot* rpmdevtools perl-Crypt-GPG perl-IPC-Run - -[buildsys-core] -name=buildsys-core -baseurl=http://buildsys.koozali.org/build/8/smeserver-core/i386 -includepkgs=bglibs buildsys-macros cvm* dietlibc* e-smith-devtools perl-Test-Inline perl-Ezmlm - -[buildsys-contribs] -name=buildsys-core -baseurl=http://buildsys.koozali.org/build/8/smeserver-contribs/i386 -includepkgs=perl-Ezmlm - -[groups] -name=groups -baseurl=http://buildsys.koozali.org/build/8/smeserver-groups/i386 -""" diff -Nur --no-dereference smeserver-mock-1.0.old/root/etc/mock/smeserver-8-i386-iso.cfg smeserver-mock-1.0/root/etc/mock/smeserver-8-i386-iso.cfg --- smeserver-mock-1.0.old/root/etc/mock/smeserver-8-i386-iso.cfg 2022-06-30 11:01:08.996000000 -0400 +++ smeserver-mock-1.0/root/etc/mock/smeserver-8-i386-iso.cfg 1969-12-31 19:00:00.000000000 -0500 @@ -1,92 +0,0 @@ -config_opts['package_manager'] = 'yum' -config_opts['use_nspawn'] = False - -config_opts['root'] = 'smeserver-8-i386' -config_opts['target_arch'] = 'i386' - -config_opts['yum.conf'] = """ -[main] -cachedir=/var/cache/yum -debuglevel=1 -logfile=/var/log/yum.log -reposdir=/dev/null -retries=20 -obsoletes=1 -gpgcheck=0 -assumeyes=1 -syslog_ident=mock -syslog_device= -exclude=*.x86_64 - -[os] -name=os -baseurl=http://buildsys.koozali.org/build/5/os/i386 -exclude=buildsys-macros - -[updates] -name=updates -baseurl=http://buildsys.koozali.org/build/5/updates/i386 -exclude=buildsys-macros - -[fastrack] -name=fastrack -baseurl=http://buildsys.koozali.org/build/5/fastrack/i386 - -# centos cr -[opt1] -name=opt1 -baseurl=http://buildsys.koozali.org/build/5/opt1/i386 - -# centos extra -[opt2] -name=opt2 -baseurl=http://buildsys.koozali.org/build/5/opt2/i386 - -# Not used -[opt3] -name=opt3 -baseurl=http://buildsys.koozali.org/build/5/opt3/i386 - -[epel] -name=epel -baseurl=http://buildsys.koozali.org/build/5/epel/i386 -includepkgs=deltaiso deltarpm jigdo python-hashlib python-kid repoview xz-libs - -[rpmforge] -name=rpmforge -baseurl=http://buildsys.koozali.org/build/5/rpmforge/i386 -includepkgs=zsync jigdo - -[rpmforge-extras] -name=rpmforge-extras -baseurl=http://buildsys.koozali.org/build/5/rpmforge-extras/i386 -includepkgs=rsync - -[groups] -name=groups -baseurl=http://buildsys.koozali.org/build/8/smeserver-groups/i386 -""" - -config_opts['cleanup_on_failure'] = 0 -config_opts['cleanup_on_success'] = 0 - -config_opts['plugin_conf']['ccache_enable'] = False -config_opts['plugin_conf']['root_cache_enable'] = False -config_opts['plugin_conf']['tmpfs_enable'] = False - -config_opts['chroot_setup_cmd'] = 'groupinstall build iso-build' - -config_opts['chrootuid'] = os.getuid() - -config_opts['plugins'].append('iso_prepare') - -config_opts['plugin_conf']['iso_prepare_enable'] = True -config_opts['plugin_conf']['iso_prepare_opts'] = {} - -config_opts['plugin_conf']['mount_enable'] = True -config_opts['plugin_conf']['mount_opts'] = {} -config_opts['plugin_conf']['mount_opts']['dirs'] = [] - -config_opts['plugin_conf']['mount_opts']['dirs'].append(('files.koozali.org:/build', '/build', 'nfs', 'defaults,noatime,nodiratime,nosuid')) -config_opts['plugin_conf']['mount_opts']['dirs'].append(('files.koozali.org:/mirrors', '/mirrors', 'nfs', 'defaults,noatime,nodiratime,nosuid')) - diff -Nur --no-dereference smeserver-mock-1.0.old/root/etc/mock/smeserver-8-x86_64-base.cfg smeserver-mock-1.0/root/etc/mock/smeserver-8-x86_64-base.cfg --- smeserver-mock-1.0.old/root/etc/mock/smeserver-8-x86_64-base.cfg 2022-06-30 11:01:08.996000000 -0400 +++ smeserver-mock-1.0/root/etc/mock/smeserver-8-x86_64-base.cfg 1969-12-31 19:00:00.000000000 -0500 @@ -1,78 +0,0 @@ -config_opts['package_manager'] = 'yum' -config_opts['use_nspawn'] = False - -config_opts['root'] = 'smeserver-8-x86_64' -config_opts['target_arch'] = 'x86_64' -config_opts['dist'] = '.el5.sme' - -config_opts['plugin_conf']['ccache_opts']['dir'] = "%(cache_topdir)s/ccache/x86_64/" - -config_opts['macros']['%distribution'] = "SME Server v8" -config_opts['macros']['%packager'] = "Contribs.org " -config_opts['macros']['%vendor'] = "Contribs.org " -config_opts['macros']['%dist'] = ".el5.sme" - -config_opts['yum.conf'] = """ -[main] -cachedir=/var/cache/yum -debuglevel=1 -logfile=/var/log/yum.log -reposdir=/dev/null -retries=20 -obsoletes=1 -gpgcheck=0 -assumeyes=1 -syslog_ident=mock -syslog_device= -exclude=[1-9A-Za-fh-z]*.i?86 g[0-9A-Za-km-z]*.i?86 gl[0-9A-Za-hj-z]*.i?86 gli[0-9A-Zac-z]*.i?86 glib[0-9A-Za-bd-z]*.i?86 - -[os] -name=os -baseurl=http://buildsys.koozali.org/build/5/os/x86_64 -#baseurl=http://centos.bhs.mirrors.ovh.net/ftp.centos.org/5/os/x86_64 -exclude=buildsys-macros - -[updates] -name=updates -baseurl=http://buildsys.koozali.org/build/5/updates/x86_64 -exclude=buildsys-macros - -[fastrack] -name=fastrack -baseurl=http://buildsys.koozali.org/build/5/fastrack/x86_64 - -# centos cr -[opt1] -name=opt1 -baseurl=http://buildsys.koozali.org/build/5/opt1/x86_64 - -# centos extra -[opt2] -name=opt2 -baseurl=http://buildsys.koozali.org/build/5/opt2/x86_64 - -# Not used -[opt3] -name=opt3 -baseurl=http://buildsys.koozali.org/build/5/opt3/x86_64 - -[epel] -name=epel -baseurl=http://buildsys.koozali.org/build/5/epel/x86_64 -includepkgs=ccache fakeroot* rpmdevtools perl-IPC-Run perl-Crypt-GPG - -[buildsys-core] -name=buildsys-core -baseurl=http://buildsys.koozali.org/build/8/smeserver-core/x86_64 -includepkgs=bglibs buildsys-macros clam* cvm* dietlibc* e-smith-devtools perl-Test-Inline - -[buildsys-contribs] -name=buildsys-core -baseurl=http://buildsys.koozali.org/build/8/smeserver-contribs/x86_64 -includepkgs=perl-Ezmlm - - -[groups] -name=groups -baseurl=http://buildsys.koozali.org/build/8/smeserver-groups/x86_64 -""" diff -Nur --no-dereference smeserver-mock-1.0.old/root/etc/mock/smeserver-8-x86_64-iso.cfg smeserver-mock-1.0/root/etc/mock/smeserver-8-x86_64-iso.cfg --- smeserver-mock-1.0.old/root/etc/mock/smeserver-8-x86_64-iso.cfg 2022-06-30 11:01:08.996000000 -0400 +++ smeserver-mock-1.0/root/etc/mock/smeserver-8-x86_64-iso.cfg 1969-12-31 19:00:00.000000000 -0500 @@ -1,92 +0,0 @@ -config_opts['package_manager'] = 'yum' -config_opts['use_nspawn'] = False - -config_opts['root'] = 'smeserver-8-x86_64' -config_opts['target_arch'] = 'x86_64' - -config_opts['yum.conf'] = """ -[main] -cachedir=/var/cache/yum -debuglevel=1 -logfile=/var/log/yum.log -reposdir=/dev/null -retries=20 -obsoletes=1 -gpgcheck=0 -assumeyes=1 -syslog_ident=mock -syslog_device= -exclude=[1-9A-Za-fh-z]*.i?86 g[0-9A-Za-km-z]*.i?86 gl[0-9A-Za-hj-z]*.i?86 gli[0-9A-Zac-z]*.i?86 glib[0-9A-Za-bd-z]*.i?86 - -[os] -name=os -baseurl=http://buildsys.koozali.org/build/5/os/x86_64 -exclude=buildsys-macros - -[updates] -name=updates -baseurl=http://buildsys.koozali.org/build/5/updates/x86_64 -exclude=buildsys-macros - -[fastrack] -name=fastrack -baseurl=http://buildsys.koozali.org/build/5/fastrack/x86_64 - -# centos cr -[opt1] -name=opt1 -baseurl=http://buildsys.koozali.org/build/5/opt1/x86_64 - -# centos extra -[opt2] -name=opt2 -baseurl=http://buildsys.koozali.org/build/5/opt2/x86_64 - -# Not used -[opt3] -name=opt3 -baseurl=http://buildsys.koozali.org/build/5/opt3/x86_64 - -[epel] -name=epel -baseurl=http://buildsys.koozali.org/build/5/epel/x86_64 -includepkgs=deltaiso deltarpm jigdo python-hashlib python-kid repoview xz-libs - -[rpmforge] -name=rpmforge -baseurl=http://buildsys.koozali.org/build/5/rpmforge/x86_64 -includepkgs=zsync jigdo - -[rpmforge-extras] -name=rpmforge-extras -baseurl=http://buildsys.koozali.org/build/5/rpmforge-extras/x86_64 -includepkgs=rsync - -[groups] -name=groups -baseurl=http://buildsys.koozali.org/build/8/smeserver-groups/x86_64 -""" - -config_opts['cleanup_on_failure'] = 0 -config_opts['cleanup_on_success'] = 0 - -config_opts['plugin_conf']['ccache_enable'] = False -config_opts['plugin_conf']['root_cache_enable'] = False -config_opts['plugin_conf']['tmpfs_enable'] = False - -config_opts['chroot_setup_cmd'] = 'groupinstall build iso-build' - -config_opts['chrootuid'] = os.getuid() - -config_opts['plugins'].append('iso_prepare') - -config_opts['plugin_conf']['iso_prepare_enable'] = True -config_opts['plugin_conf']['iso_prepare_opts'] = {} - -config_opts['plugin_conf']['mount_enable'] = True -config_opts['plugin_conf']['mount_opts'] = {} -config_opts['plugin_conf']['mount_opts']['dirs'] = [] - -config_opts['plugin_conf']['mount_opts']['dirs'].append(('files.koozali.org:/build', '/build', 'nfs', 'defaults,noatime,nodiratime,nosuid')) -config_opts['plugin_conf']['mount_opts']['dirs'].append(('files.koozali.org:/mirrors', '/mirrors', 'nfs', 'defaults,noatime,nodiratime,nosuid')) - diff -Nur --no-dereference smeserver-mock-1.0.old/root/etc/mock/smeserver-9-i386-base.cfg smeserver-mock-1.0/root/etc/mock/smeserver-9-i386-base.cfg --- smeserver-mock-1.0.old/root/etc/mock/smeserver-9-i386-base.cfg 2022-06-30 11:01:08.997000000 -0400 +++ smeserver-mock-1.0/root/etc/mock/smeserver-9-i386-base.cfg 1969-12-31 19:00:00.000000000 -0500 @@ -1,91 +0,0 @@ -config_opts['package_manager'] = 'yum' -config_opts['use_nspawn'] = False - -config_opts['root'] = 'smeserver-9-i386' -config_opts['target_arch'] = 'i386' -config_opts['dist'] = '.el6.sme' - -config_opts['plugin_conf']['ccache_opts']['dir'] = "%(cache_topdir)s/ccache/i386/" - -config_opts['macros']['%distribution'] = "SME Server v9" -config_opts['macros']['%packager'] = "Contribs.org " -config_opts['macros']['%vendor'] = "Contribs.org " -config_opts['macros']['%dist'] = ".el6.sme" - -config_opts['yum.conf'] = """ -[main] -cachedir=/var/cache/yum -debuglevel=1 -logfile=/var/log/yum.log -reposdir=/dev/null -retries=20 -obsoletes=1 -gpgcheck=0 -assumeyes=1 -syslog_ident=mock -syslog_device= - -[os] -name=os -baseurl=http://buildsys.koozali.org/build/6/os/i386 -exclude=buildsys-macros - -[updates] -name=updates -baseurl=http://buildsys.koozali.org/build/6/updates/i386 -exclude=buildsys-macros - -[fastrack] -name=fastrack -baseurl=http://buildsys.koozali.org/build/6/fastrack/i386 - -# centos cr -[opt1] -name=opt1 -baseurl=http://buildsys.koozali.org/build/6/opt1/i386 - -# centos extra -[opt2] -name=opt2 -baseurl=http://buildsys.koozali.org/build/6/opt2/i386 - -# Not used -[opt3] -name=opt3 -baseurl=http://buildsys.koozali.org/build/6/opt3/i386 - -[epel] -name=epel -baseurl=http://buildsys.koozali.org/build/6/epel/i386 -includepkgs=ccache mhash* pyzor perl-Perl-OSType perl-IPC-Run perl-File-ShareDir perl-Email-Simple perl-Email-MIME perl-Email-MIME-Creator perl-Email-MIME-Encodings perl-Email-MIME-ContentType perl-EMail-MIME-Modifier perl-Email-MessageID perl-Email-Address perl-Email-Date perl-Mail-SPF perl-Net-IMAP-Simple perl-Razor-Agent perl-Net-SMTPS jansson* vala* fdupes js-devel js celt* libevent2* libarchive3 libva* celt enca fribidi libass openal-soft lame* schroedinger dirac-libs libmp4v2* liblastfm* id3lib* libupnp* perl-Class-Method-Modifiers perl-Devel-GlobalDestruction perl-Module-Runtime perl-Test-Fatal perl-Crypt-Random-TESHA2 perl-Crypt-Random-Seed perl-Math-Random-ISAAC kmodtool libmaxminddb-devel libmaxminddb python2-numpy - - -#[rpmforge] -#name=rpmforge -#baseurl=http://buildsys.koozali.org/build/6/rpmforge/i386 -#includepkgs=perl-Taint-Util perl-IP-Country perl-Geography-Countries perl-Razor-Agent perl-Net-Ident - -[atrpms] -name=atrpms -baseurl=http://buildsys.koozali.org/build/6/atrpms/i386 -includepkgs=perl-Mail-SPF DCC - -[rpmfusion] -name=rpmfusion -baseurl=http://download1.rpmfusion.org/free/el/updates/6/i386 -includepkgs=ffmpeg* libva* x264-libs xvidcore librtmp buildsys-build-rpmfusion* - -[buildsys-core] -name=buildsys-core -baseurl=http://buildsys.koozali.org/build/9/smeserver-core/i386 -includepkgs=bglibs buildsys-macros cvm* DCC dietlibc* e-smith-devtools perl-Geography-Countries perl-Test-Inline perl-ExtUtils-Constant perl-Socket perl-IO-Socket-IP perl-IP-Country perl-Time-Local perl-Net-Ident perl-Net-SSLeay clamav* perl-Regexp-Common perl-Bytes-Random-Secure perl-Razor-Agent - -[buildsys-contribs] -name=buildsys-contribs -baseurl=http://buildsys.koozali.org/build/9/smeserver-contribs/i386 -includepkgs=libevent2* perl-Ezmlm perl-Crypt-GPG perl-IPC-Run libevhtp* libsearpc* libccnet* libzdb* ccnet* evhtp* sqlite* rtl-sdr* ocaml camlp5 - -[groups] -name=groups -baseurl=http://buildsys.koozali.org/build/9/smeserver-groups/i386 -""" diff -Nur --no-dereference smeserver-mock-1.0.old/root/etc/mock/smeserver-9-i386-iso.cfg smeserver-mock-1.0/root/etc/mock/smeserver-9-i386-iso.cfg --- smeserver-mock-1.0.old/root/etc/mock/smeserver-9-i386-iso.cfg 2022-06-30 11:01:08.997000000 -0400 +++ smeserver-mock-1.0/root/etc/mock/smeserver-9-i386-iso.cfg 1969-12-31 19:00:00.000000000 -0500 @@ -1,96 +0,0 @@ -config_opts['package_manager'] = 'yum' -config_opts['use_nspawn'] = False - -config_opts['root'] = 'smeserver-9-i386' -config_opts['target_arch'] = 'i386' - -config_opts['yum.conf'] = """ -[main] -cachedir=/var/cache/yum -debuglevel=1 -logfile=/var/log/yum.log -reposdir=/dev/null -retries=20 -obsoletes=1 -gpgcheck=0 -assumeyes=1 -syslog_ident=mock -syslog_device= - -[os] -name=os -baseurl=http://buildsys.koozali.org/build/6/os/i386 -exclude=buildsys-macros - -[updates] -name=updates -baseurl=http://buildsys.koozali.org/build/6/updates/i386 -exclude=buildsys-macros - -[fastrack] -name=fastrack -baseurl=http://buildsys.koozali.org/build/6/fastrack/i386 - -# centos cr -[opt1] -name=opt1 -baseurl=http://buildsys.koozali.org/build/6/opt1/i386 - -# centos extra -[opt2] -name=opt2 -baseurl=http://buildsys.koozali.org/build/6/opt2/i386 - -# Not used -[opt3] -name=opt3 -baseurl=http://buildsys.koozali.org/build/6/opt3/i386 - -[epel] -name=epel -baseurl=http://buildsys.koozali.org/build/6/epel/i386 -includepkgs=ccache mhash* pyzor - -[rpmforge] -name=rpmforge -baseurl=http://buildsys.koozali.org/build/6/rpmforge/i386 -includepkgs=perl-Taint-Util perl-IP-Country perl-Geography-Countries perl-Razor-Agent perl-Net-Ident - -#[atrpms] -#name=atrpms -#baseurl=http://buildsys.koozali.org/build/6/atrpms/i386 -#includepkgs=perl-Mail-SPF DCC - -[buildsys-core] -name=buildsys-core -baseurl=http://buildsys.koozali.org/build/9/smeserver-core/i386 -includepkgs=jigdo anaconda - -[groups] -name=groups -baseurl=http://buildsys.koozali.org/build/9/smeserver-groups/x86_64 -""" - -config_opts['cleanup_on_failure'] = 0 -config_opts['cleanup_on_success'] = 0 - -config_opts['plugin_conf']['ccache_enable'] = False -config_opts['plugin_conf']['root_cache_enable'] = False -config_opts['plugin_conf']['tmpfs_enable'] = False - -config_opts['chroot_setup_cmd'] = 'groupinstall iso-build' - -config_opts['chrootuid'] = os.getuid() - -config_opts['plugins'].append('iso_prepare') - -config_opts['plugin_conf']['iso_prepare_enable'] = True -config_opts['plugin_conf']['iso_prepare_opts'] = {} - -config_opts['plugin_conf']['mount_enable'] = True -config_opts['plugin_conf']['mount_opts'] = {} -config_opts['plugin_conf']['mount_opts']['dirs'] = [] - -config_opts['plugin_conf']['mount_opts']['dirs'].append(('files.koozali.org:/build', '/build', 'nfs', 'defaults,noatime,nodiratime,nosuid')) -config_opts['plugin_conf']['mount_opts']['dirs'].append(('files.koozali.org:/mirrors', '/mirrors', 'nfs', 'defaults,noatime,nodiratime,nosuid')) - diff -Nur --no-dereference smeserver-mock-1.0.old/root/etc/mock/smeserver-9-x86_64-base.cfg smeserver-mock-1.0/root/etc/mock/smeserver-9-x86_64-base.cfg --- smeserver-mock-1.0.old/root/etc/mock/smeserver-9-x86_64-base.cfg 2022-06-30 11:01:08.997000000 -0400 +++ smeserver-mock-1.0/root/etc/mock/smeserver-9-x86_64-base.cfg 1969-12-31 19:00:00.000000000 -0500 @@ -1,102 +0,0 @@ -config_opts['package_manager'] = 'yum' -config_opts['use_nspawn'] = False - -config_opts['root'] = 'smeserver-9-x86_64' -config_opts['target_arch'] = 'x86_64' -config_opts['dist'] = '.el6.sme' -config_opts['chroot_setup_cmd'] = ' install @buildsys-build @buildsys scl-utils-build python27-build ' - -config_opts['plugin_conf']['ccache_opts']['dir'] = "%(cache_topdir)s/ccache/x86_64/" - -config_opts['macros']['%distribution'] = "SME Server v9" -config_opts['macros']['%packager'] = "Contribs.org " -config_opts['macros']['%vendor'] = "Contribs.org " -config_opts['macros']['%dist'] = ".el6.sme" - -config_opts['yum.conf'] = """ -[main] -cachedir=/var/cache/yum -debuglevel=4 -logfile=/var/log/yum.log -reposdir=/dev/null -retries=20 -obsoletes=1 -gpgcheck=0 -assumeyes=1 -syslog_ident=mock -syslog_device= - -[os] -name=os -baseurl=http://buildsys.koozali.org/build/6/os/x86_64 -exclude=buildsys-macros - -[updates] -name=updates -baseurl=http://buildsys.koozali.org/build/6/updates/x86_64 -exclude=buildsys-macros - -[fastrack] -name=fastrack -baseurl=http://buildsys.koozali.org/build/6/fastrack/x86_64 - -# centos cr -#[opt1] -#name=opt1 -#baseurl=http://buildsys.koozali.org/build/6/opt1/x86_64 - -# centos extra -[opt2] -name=opt2 -baseurl=http://buildsys.koozali.org/build/6/opt2/x86_64 - -# Not used -[opt3] -name=opt3 -baseurl=http://buildsys.koozali.org/build/6/opt3/x86_64 - -[epel] -name=epel -baseurl=http://buildsys.koozali.org/build/6/epel/x86_64 -includepkgs=ccache mhash* pyzor perl-Perl-OSType perl-IPC-Run perl-File-ShareDir perl-Email-Simple perl-Email-MIME perl-Email-MIME-Creator perl-Email-MIME-Encodings perl-Email-MIME-ContentType perl-EMail-MIME-Modifier perl-Email-MessageID perl-Email-Address perl-Email-Date perl-Mail-SPF perl-Net-IMAP-Simple perl-Razor-Agent perl-Net-SMTPS jansson* vala* fdupes js-devel js celt* libevent2* libarchive3 libva* celt enca fribidi libass openal-soft lame* schroedinger dirac-libs libmp4v2* liblastfm* id3lib* libupnp* perl-Class-Method-Modifiers perl-Devel-GlobalDestruction perl-Module-Runtime perl-Test-Fatal perl-Crypt-Random-TESHA2 perl-Crypt-Random-Seed perl-Math-Random-ISAAC kmodtool libmaxminddb-devel libmaxminddb python2-numpy - -#[rpmforge] -#name=rpmforge -#baseurl=http://buildsys.koozali.org/build/6/rpmforge/x86_64 -#includepkgs=perl-Taint-Util perl-IP-Country perl-Geography-Countries perl-Razor-Agent perl-Net-Ident - -[atrpms] -name=atrpms -baseurl=http://buildsys.koozali.org/build/6/atrpms/x86_64 -includepkgs=perl-Mail-SPF DCC - -[rpmfusion] -name=rpmfusion -baseurl=http://download1.rpmfusion.org/free/el/updates/6/x86_64 -includepkgs=ffmpeg* libva* x264-libs xvidcore librtmp libmpeg2* mpeg2dec buildsys-build-rpmfusion* - -[sclo-sclo] -name=sclo-sclo -baseurl=http://mirror.centos.org/centos/6/sclo/x86_64/sclo -includepkgs=python27* - -[sclo-rh] -name=sclo-rh -baseurl=http://mirror.centos.org/centos/6/sclo/x86_64/rh -includepkgs=python27* python33* rh-mongodb26* rh-mongodb32* rh-mongodb34* nodejs010* rh-nodejs6* -# issue if you put the three following : nodejs010* rh-nodejs4* rh-nodejs6* - -[buildsys-core] -name=buildsys-core -baseurl=http://buildsys.koozali.org/build/9/smeserver-core/x86_64 -includepkgs=bglibs buildsys-macros cvm* DCC dietlibc* e-smith-devtools perl-Geography-Countries perl-Test-Inline perl-ExtUtils-Constant perl-Socket perl-IO-Socket-IP perl-IP-Country perl-Time-Local perl-Net-Ident perl-Net-SSLeay clamav* perl-Regexp-Common perl-Bytes-Random-Secure perl-Razor-Agent - -[buildsys-contribs] -name=buildsys-contribs -baseurl=http://buildsys.koozali.org/build/9/smeserver-contribs/x86_64 -includepkgs=libevent2* perl-Ezmlm perl-Crypt-GPG perl-IPC-Run libevhtp* libsearpc* ccnet* libccnet* libzdb* evhtp* sqlite* python27-python-versiontools rtl-sdr* ocaml camlp5 - -[groups] -name=groups -baseurl=http://buildsys.koozali.org/build/9/smeserver-groups/x86_64 -""" diff -Nur --no-dereference smeserver-mock-1.0.old/root/etc/mock/smeserver-9-x86_64-iso.cfg smeserver-mock-1.0/root/etc/mock/smeserver-9-x86_64-iso.cfg --- smeserver-mock-1.0.old/root/etc/mock/smeserver-9-x86_64-iso.cfg 2022-06-30 11:01:08.997000000 -0400 +++ smeserver-mock-1.0/root/etc/mock/smeserver-9-x86_64-iso.cfg 1969-12-31 19:00:00.000000000 -0500 @@ -1,97 +0,0 @@ -config_opts['package_manager'] = 'yum' -config_opts['use_nspawn'] = False - -config_opts['root'] = 'smeserver-9-x86_64' -config_opts['target_arch'] = 'x86_64' - -config_opts['yum.conf'] = """ -[main] -cachedir=/var/cache/yum -debuglevel=1 -logfile=/var/log/yum.log -reposdir=/dev/null -retries=20 -obsoletes=1 -gpgcheck=0 -assumeyes=1 -syslog_ident=mock -syslog_device= -exclude=[1-9A-Za-fh-z]*.i?86 g[0-9A-Za-km-z]*.i?86 gl[0-9A-Za-hj-z]*.i?86 gli[0-9A-Zac-z]*.i?86 glib[0-9A-Za-bd-z]*.i?86 - -[os] -name=os -baseurl=http://buildsys.koozali.org/build/6/os/x86_64 -exclude=buildsys-macros - -[updates] -name=updates -baseurl=http://buildsys.koozali.org/build/6/updates/x86_64 -exclude=buildsys-macros - -[fastrack] -name=fastrack -baseurl=http://buildsys.koozali.org/build/6/fastrack/x86_64 - -# centos cr -[opt1] -name=opt1 -baseurl=http://buildsys.koozali.org/build/6/opt1/x86_64 - -# centos extra -[opt2] -name=opt2 -baseurl=http://buildsys.koozali.org/build/6/opt2/x86_64 - -# Not used -[opt3] -name=opt3 -baseurl=http://buildsys.koozali.org/build/6/opt3/x86_64 - -[epel] -name=epel -baseurl=http://buildsys.koozali.org/build/6/epel/x86_64 -includepkgs=ccache mhash* pyzor - -#[rpmforge] -#name=rpmforge -#baseurl=http://buildsys.koozali.org/build/6/rpmforge/x86_64 -#includepkgs=perl-Taint-Util perl-IP-Country perl-Geography-Countries perl-Razor-Agent perl-Net-Ident - -#[atrpms] -#name=atrpms -#baseurl=http://buildsys.koozali.org/build/6/atrpms/x86_64 -#includepkgs=perl-Mail-SPF DCC - -[buildsys-core] -name=buildsys-core -baseurl=http://buildsys.koozali.org/build/9/smeserver-core/x86_64 -includepkgs=jigdo anaconda - -[groups] -name=groups -baseurl=http://buildsys.koozali.org/build/9/smeserver-groups/x86_64 -""" - -config_opts['cleanup_on_failure'] = 0 -config_opts['cleanup_on_success'] = 0 - -config_opts['plugin_conf']['ccache_enable'] = False -config_opts['plugin_conf']['root_cache_enable'] = False -config_opts['plugin_conf']['tmpfs_enable'] = False - -config_opts['chroot_setup_cmd'] = 'groupinstall build iso-build' - -config_opts['chrootuid'] = os.getuid() - -config_opts['plugins'].append('iso_prepare') - -config_opts['plugin_conf']['iso_prepare_enable'] = True -config_opts['plugin_conf']['iso_prepare_opts'] = {} - -config_opts['plugin_conf']['mount_enable'] = True -config_opts['plugin_conf']['mount_opts'] = {} -config_opts['plugin_conf']['mount_opts']['dirs'] = [] - -config_opts['plugin_conf']['mount_opts']['dirs'].append(('files.koozali.org:/build', '/build', 'nfs', 'defaults,noatime,nodiratime,nosuid')) -config_opts['plugin_conf']['mount_opts']['dirs'].append(('files.koozali.org:/mirrors', '/mirrors', 'nfs', 'defaults,noatime,nodiratime,nosuid')) - diff -Nur --no-dereference smeserver-mock-1.0.old/root/usr/bin/change-log smeserver-mock-1.0/root/usr/bin/change-log --- smeserver-mock-1.0.old/root/usr/bin/change-log 2022-06-30 11:01:09.000000000 -0400 +++ smeserver-mock-1.0/root/usr/bin/change-log 2022-06-30 16:19:27.345000000 -0400 @@ -55,7 +55,7 @@ cat $specfile.tmp > $specfile; echo "updating changelog $specfile"; -entete="* $dateH Jean-Philipe Pialasse $version-$release.sme" +entete="* $dateH ME MYSELF $version-$release.sme" changelog="- fix [SME: ]" cat $specfile |sed "/^%changelog/a $entete\n$changelog\n" >$specfile.tmp; cat $specfile.tmp>$specfile; diff -Nur --no-dereference smeserver-mock-1.0.old/root/usr/bin/importNew smeserver-mock-1.0/root/usr/bin/importNew --- smeserver-mock-1.0.old/root/usr/bin/importNew 2022-06-30 11:01:09.001000000 -0400 +++ smeserver-mock-1.0/root/usr/bin/importNew 2022-06-30 16:20:42.501000000 -0400 @@ -78,7 +78,7 @@ then # update current tree cd ~/$packageroot/rpms - cvs -Q update -dPA 1>/dev/null + cvs -Q update -dPA $pkgname common 1>/dev/null else # checkout rpms cd ~/$packageroot @@ -169,7 +169,7 @@ cd CVSROOT/; cvs -Q update -dPA 1>/dev/null; cd ../rpms/; - cvs -Q update -dPA 1>/dev/null ; + cvs -Q update -dPA common $pkgname 1>/dev/null ; cd ~/$packageroot; ./common/cvs-import.sh -b $sme$ver -m 'Initial import' /tmp/$(basename $rpmpath) else @@ -178,18 +178,17 @@ else echo "##########################" - echo "sending $rpmpath to shell.koozali.org ..." if [[ $rpmpath != "" ]] then + echo "sending $rpmpath to shell.koozali.org ..." echo "scp $rpmpath shell.koozali.org:/tmp/" cd $curpwd - scp $rpmpath shell.koozali.org:/tmp/ + scp $rpmpath shell.koozali.org:~ echo "now trying to push this on shell.koozali.org and run ./common/cvs-import.sh" echo "this could fails if your srpm was not initially on ~/smecontrib/ and if you have not ForwardAgent yes and user set in your .ss/config file for shell.koozali.org" - ssh shell.koozali.org "cd ~/$packageroot;cd CVSROOT/; cvs -Q update -dPA 1>/dev/null; cd ../rpms/; cvs -Q update -dPA $pkgname 1>/dev/null ;cd ~/$packageroot; ./common/cvs-import.sh -b $sme$ver -m 'Initial import' /tmp/$(basename $rpmpath)" - fi - cd ~/$packageroot/rpms/$pkgname/$sme$ver - cvs update -dPA; make prep +# ssh shell.koozali.org "cd ~/$packageroot;cd CVSROOT/; echo 'updating CVSROOT/modules...'; cvs -Q update -dPA modules; cd ../rpms/;echo 'checkout $pkgname ...' cvs co $pkgname 1>/dev/null ;cd ~/$packageroot; if [[ -f ~/$(basename $rpmpath) ]]; then ./common/cvs-import.sh -b $sme$ver -m 'Initial import' ~/$(basename $rpmpath); fi " + ssh shell.koozali.org "cd ~/$packageroot;cd CVSROOT/; echo 'updating CVSROOT/modules...'; cvs -Q update -dPA modules && cd ../rpms/ && echo 'checkout $pkgname ...' && cvs co $pkgname 1>/dev/null && cd ~/$packageroot && if [[ -f ~/$(basename $rpmpath) ]]; then echo './common/cvs-import.sh -b $sme$ver -m Initial import ~/$(basename $rpmpath)'; ./common/cvs-import.sh -b $sme$ver -m 'Initial import' ~/$(basename $rpmpath); fi " + echo "in case of failure do:" echo "scp $rpmpath shell.koozali.org:/tmp/" echo "ssh shell.koozali.org" @@ -201,7 +200,18 @@ echo "./common/cvs-import.sh -b $sme$ver -m 'Initial import' YOURSRPM " fi echo "exit" - echo "cd ~/$packageroot/rpms/$pkgname/$sme$ver ; cvs update -dPA; make prep" + fi + cd ~/$packageroot/rpms/$pkgname/$sme$ver + if [ -f $pkgname}.spec ] + then + ### if there is no spec file this will fail : make prep + cvs update -dPA; make prep + else + echo "# now do:" + echo "cd ~/$packageroot/rpms/$pkgname/$sme$ver ; cvs update -dPA;" + echo "then create your own spec file and cvs add it." + echo "then create your own archive and import it to lookaside cache if needed" + fi fi echo "##########################" diff -Nur --no-dereference smeserver-mock-1.0.old/root/usr/bin/prepa smeserver-mock-1.0/root/usr/bin/prepa --- smeserver-mock-1.0.old/root/usr/bin/prepa 2022-06-30 11:01:09.006000000 -0400 +++ smeserver-mock-1.0/root/usr/bin/prepa 2022-06-30 16:21:38.757000000 -0400 @@ -3,9 +3,9 @@ make clean make prep if [ -f 'sources' ] ; then -folder=`sed -rn 's/^[a-z0-9]{32}\s+(.+)\.(tar|t)\.?(gz|xz|bz)*$/\1/p' sources` +folder=`sed -rn 's/^[a-z0-9]{32}\s+(.+)\.(tar|t)\.?(gz|xz|bz|bz2)*$/\1/p' sources` oldy="$folder.old" -if [ -d $folder ] ; then +if [ -d "$folder" ] ; then echo "$folder exist" if [ -d $oldy ] ; then rm -rf $oldy && echo "removing $oldy" diff -Nur --no-dereference smeserver-mock-1.0.old/root/usr/lib/python3.6/site-packages/mockbuild/plugins/copy.py smeserver-mock-1.0/root/usr/lib/python3.6/site-packages/mockbuild/plugins/copy.py --- smeserver-mock-1.0.old/root/usr/lib/python3.6/site-packages/mockbuild/plugins/copy.py 1969-12-31 19:00:00.000000000 -0500 +++ smeserver-mock-1.0/root/usr/lib/python3.6/site-packages/mockbuild/plugins/copy.py 2022-06-30 11:34:15.759000000 -0400 @@ -0,0 +1,83 @@ +# -*- coding: utf-8 -*- +# vim:expandtab:autoindent:tabstop=4:shiftwidth=4:filetype=python:textwidth=0: +# License: GPL2 or later see COPYING +# Written by Jean-Philippe Pialasse +# Copyright (C) 2022 Jean-Philippe Pialasse + + +""" +# The copy plugin is enabled by default. +# To disable it, use following option: +config_opts['plugin_conf']['copy'] = False +# To configure the copy plugin, for each file use following option: +config_opts['plugin_conf']['copy_opts']['files'].append( + ("/usr/local/myfile", "/usr/bin/myfile_inchroot")) +# A real life example: +config_opts['plugin_conf']['copy_opts']['files'].append( + ("/usr/lib/rpm/redhat/perl.prov", "/usr/lib/rpm/redhat/perl.prov")) +""" +import shutil +import os +from mockbuild.mounts import FileSystemMountPoint +from mockbuild.trace_decorator import getLog, traceLog +#from mockbuild.buildroot import make_chroot_path +from mockbuild import file_util + +requires_api_version = "1.1" + + +# plugin entry point +@traceLog() +def init(plugins, conf, buildroot): + Copy(plugins, conf, buildroot) + + +class Copy(object): + """copy files into chroot""" + # pylint: disable=too-few-public-methods + @traceLog() + def __init__(self, plugins, conf, buildroot): + self.buildroot = buildroot + self.config = buildroot.config + self.state = buildroot.state + self.opts = conf + # Skip copy user-specified files if we're in the boostrap chroot + if buildroot.is_bootstrap: + return + getLog().info(conf['files']) + getLog().info("enabled package copy") + plugins.add_hook("postinit", self._copyFiles) + plugins.add_hook('postyum', self._copyFiles) + self._copyFiles + #for ori_file, dest_file in self.opts['files']: + # getLog().info(ori_file) + # self._copyFiles + + @traceLog() + def _copyFiles(self): + # pylint: disable=unused-variable + for ori_file, dest_file in self.opts['files']: + cdest_file = self.buildroot.make_chroot_path(dest_file) + try: + os.remove(cdest_file) + except FileNotFoundError: + pass + file_util.mkdirIfAbsent(os.path.dirname(cdest_file)) + if os.path.exists(ori_file): + shutil.copy2(ori_file, cdest_file) + getLog().info("File %s copied to %s !",ori_file , cdest_file ) + elif warn: + getlog.warning("File %s not present. It is not copied into the chroot.", ori_file) + + + + + + + + + + + + +