diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3aa8108 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +*.rpm +*.log +*spec-20* +*.tgz diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..ae89dd4 --- /dev/null +++ b/Makefile @@ -0,0 +1,21 @@ +# Makefile for source rpm: smeserver-mock +# $Id: Makefile,v 1.1 2018/03/11 04:57:18 jpp Exp $ +NAME := smeserver-mock +SPECFILE = $(firstword $(wildcard *.spec)) + +define find-makefile-common +for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done +endef + +MAKEFILE_COMMON := $(shell $(find-makefile-common)) + +ifeq ($(MAKEFILE_COMMON),) +# attept a checkout +define checkout-makefile-common +test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 +endef + +MAKEFILE_COMMON := $(shell $(checkout-makefile-common)) +endif + +include $(MAKEFILE_COMMON) diff --git a/README.md b/README.md index 543acb3..62630e0 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,17 @@ -# smeserver-mock +# smeserver-mock -SMEServer Koozali developed git repo for smeserver-mock smeserver \ No newline at end of file +SMEServer Koozali developed git repo for smeserver-mock smeserver + +## Wiki +
https://wiki.koozali.org/Rpm_build_example_using_cvs/mock + +## Bugzilla +Show list of outstanding bugs: [here](https://bugs.koozali.org/buglist.cgi?component=smeserver-mock&product=SME%20Server%2010.X&query_format=advanced&limit=0&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=CONFIRMED) + +## Description + +
*This description has been generated by an LLM AI system and cannot be relied on to be fully correct.* +*Once it has been checked, then this comment will be deleted* +
up + +Software mockups are a great way to visualize the design and layout of a project before it is coded. Mockups are used to help communicate the look and feel of a project to stakeholders, potential customers, and even developers. Mockups typically consist of a representation of all the elements on a web page, including text, images, and navigation. By laying out the pieces of a project ahead of time, software mockups save time in the development process. Mockups are useful in that they can help pick up bugs early on and give the team an idea of what the final product should look like. diff --git a/contriborbase b/contriborbase new file mode 100644 index 0000000..ef36a67 --- /dev/null +++ b/contriborbase @@ -0,0 +1 @@ +sme10 diff --git a/root/etc/mock/perl.prov b/root/etc/mock/perl.prov new file mode 100644 index 0000000..bbc5643 --- /dev/null +++ b/root/etc/mock/perl.prov @@ -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.1 $ =~ /(\d+)\.(\d+)/); + #ExtUtils/Install.pm:$VERSION = substr q$Revision: 1.1 $, 10; + #CGI/Apache.pm:$VERSION = (qw$Revision: 1.1 $)[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 --git a/root/etc/mock/sme-site-defaults.cfg b/root/etc/mock/sme-site-defaults.cfg new file mode 100644 index 0000000..921017a --- /dev/null +++ b/root/etc/mock/sme-site-defaults.cfg @@ -0,0 +1,291 @@ +### KOOZALI SME SERVER BEGIN GENERATED CONTENT +#Koozali SME SERVER build default config +config_opts['root_log_fmt_name'] = "unadorned" +config_opts['cleanup_on_success'] = 1 +config_opts['cleanup_on_failure'] = 1 + +config_opts['plugin_conf']['ccache_opts']['max_cache_size'] = '2G' +config_opts['plugin_conf']['ccache_opts']['dir'] = "%(cache_topdir)s/ccache/%(root)s/" +config_opts['plugin_conf']['yum_cache_enable'] = True +config_opts['plugin_conf']['yum_cache_opts']['dir'] = "%(cache_topdir)s/yum/%(root)s/" +config_opts['plugin_conf']['root_cache_enable'] = True +config_opts['plugin_conf']['root_cache_opts']['dir'] = "%(cache_topdir)s/root/%(root)s/" +config_opts['plugin_conf']['tmpfs_enable'] = False +config_opts['plugin_conf']['tmpfs_opts']['required_ram_mb'] = 10240 +config_opts['plugin_conf']['tmpfs_opts']['max_fs_size'] = '9g' +# Things that are best suited for individual chroot config files: +config_opts['chroot_setup_cmd'] = 'groupinstall build' + +############################################################ +# RHEL6 Fixes: So that packages build correctly +############################################################ + +# Generic missing dependencies (all versions) +config_opts['more_buildreqs']['grub'] = '/usr/lib/libc.a' +config_opts['more_buildreqs']['subversion'] = 'qt-devel' + +# Missing dependencies (complete nvr) +config_opts['more_buildreqs']['classpathx-jaf-1.0-15.4.el6'] = 'java-1.5.0-gcj-javadoc' +config_opts['more_buildreqs']['doxygen-1.6.1-4.el6'] = 'qt-devel' +config_opts['more_buildreqs']['geronimo-specs-1.0-3.4.M2.el6'] = 'java-1.5.0-gcj-javadoc' +config_opts['more_buildreqs']['gimp-help-2.4.2-5.1.el6'] = 'w3m' +config_opts['more_buildreqs']['ibus-qt-1.3.0-2.el6'] = 'qt-devel' +config_opts['more_buildreqs']['jakarta-taglibs-standard-1.1.1-11.4.el6'] = 'java-1.5.0-gcj-javadoc' +config_opts['more_buildreqs']['kio_sysinfo-20090930-1.el6'] = 'kdelibs-devel' +config_opts['more_buildreqs']['ksshaskpass-0.5.1-4.1.el6'] = 'kdelibs-devel' +config_opts['more_buildreqs']['openmpi-1.4.1-4.3.el6'] = 'flex' +config_opts['more_buildreqs']['postgresql-jdbc-8.4.701-3.el6'] = 'java-1.5.0-gcj-devel' +config_opts['more_buildreqs']['python-lxml-2.2.3-1.1.el6'] = 'python-devel' +config_opts['more_buildreqs']['yap-5.1.3-2.1.el6'] = 'yap' + +# Multiple fixes +config_opts['more_buildreqs']['perl-CGI-Session-4.35-5.el6'] = ['perl-Time-HiRes','perl-CGI','fix-no_vendor_perl'] +config_opts['more_buildreqs']['perl-GSSAPI-0.26-5.el6'] = ['krb5-appl-servers','fix-no_vendor_perl'] +config_opts['more_buildreqs']['perl-IPC-Run3-0.043-3.el6'] = ['perl-Time-HiRes','fix-no_vendor_perl'] +config_opts['more_buildreqs']['perl-Makefile-Parser-0.211-1.1.el6'] = ['perl-Time-HiRes','fix-no_vendor_perl'] +config_opts['more_buildreqs']['perl-Sys-Virt-0.2.4-1.el6'] = ['perl-Time-HiRes','fix-no_vendor_perl'] +config_opts['more_buildreqs']['perl-Test-Memory-Cycle-1.04-7.1.el6'] = ['perl-CGI','fix-no_vendor_perl'] +config_opts['more_buildreqs']['perl-Test-MockObject-1.09-3.1.el6'] = ['perl-CGI','fix-no_vendor_perl'] + +# Fixes +config_opts['more_buildreqs']['389-ds-base-1.2.8.2-1.el6'] = 'fix-no_pyc' +config_opts['more_buildreqs']['ImageMagick-6.5.4.7-5.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['OpenIPMI-2.0.16-12.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['amanda-2.6.1p2-7.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['anaconda-yum-plugins-1.0-5.1.el6'] = 'fix-no_pyc' +config_opts['more_buildreqs']['crypto-utils-2.4.1-24.2.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['cyrus-imapd-2.3.16-6.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['foomatic-4.0.4-1.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['graphviz-2.26.0-4.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['hivex-1.2.2-1.el6'] = ['fix-no_vendor_perl','fix-no_pyo'] +config_opts['more_buildreqs']['infiniband-diags-1.5.5-1.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['irssi-0.8.15-3.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['jython-2.2.1-4.8.el6'] = 'fix-no_pyo' +config_opts['more_buildreqs']['libguestfs-1.2.7-1.24.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['linuxdoc-tools-0.9.65-3.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['mod_perl-2.0.4-10.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['nkf-2.0.8b-6.2.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perltidy-20090616-2.1.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Algorithm-Diff-1.1902-9.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-AppConfig-1.66-6.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Archive-Zip-1.30-2.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Authen-SASL-2.13-2.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-BSD-Resource-1.29.03-3.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Bit-Vector-7.1-2.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Business-ISBN-2.05-2.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Business-ISBN-Data-20081208-2.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-B-Keywords-1.09-3.1.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-CSS-Tiny-1.15-4.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Cache-Memcached-1.28-2.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Carp-Clan-6.03-2.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Class-Accessor-0.31-6.1.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Class-Data-Inheritable-0.08-3.1.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Class-Inspector-1.24-4.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Class-Singleton-1.4-6.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Class-Trigger-0.13-2.1.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Clone-0.31-3.1.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Config-General-2.44-1.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Config-Simple-4.59-5.1.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Config-Tiny-2.12-7.1.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Convert-ASN1-0.22-1.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Convert-BinHex-1.119-10.1.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Crypt-OpenSSL-Bignum-0.04-8.1.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Crypt-OpenSSL-RSA-0.25-10.1.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Crypt-OpenSSL-Random-0.04-9.1.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Crypt-PasswdMD5-1.3-6.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Crypt-SSLeay-0.57-16.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-DBD-MySQL-4.013-3.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-DBD-Pg-2.15.1-3.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-DBD-SQLite-1.27-3.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-DBIx-Simple-1.32-3.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-DBI-1.609-4.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Data-OptList-0.104-4.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-DateTime-0.5300-1.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-DateTime-Format-DateParse-0.04-1.1.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-DateTime-Format-Mail-0.3001-6.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-DateTime-Format-W3CDTF-0.04-8.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Date-Calc-6.3-2.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Date-Manip-5.54-4.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Devel-Cover-0.65-1.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Devel-Cycle-1.10-3.1.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Devel-Leak-0.03-10.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Devel-StackTrace-1.22-4.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Devel-Symdump-2.08-2.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Digest-BubbleBabble-0.01-11.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Digest-HMAC-1.01-22.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Digest-SHA1-2.12-2.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Email-Date-Format-1.002-5.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Encode-Detect-1.01-2.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Error-0.17015-4.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Exception-Class-1.29-1.1.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-ExtUtils-MakeMaker-Coverage-0.05-8.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-File-Copy-Recursive-0.38-4.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-File-Find-Rule-0.30-9.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-File-Find-Rule-Perl-1.09-2.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-File-HomeDir-0.86-3.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-File-Remove-1.42-4.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-File-Slurp-9999.13-7.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-File-Which-1.09-2.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-File-pushd-1.00-3.1.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Font-AFM-1.20-3.1.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Font-TTF-0.45-6.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-FreezeThaw-0.45-5.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Frontier-RPC-0.07b4p1-9.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-GDGraph3d-0.63-12.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-GDGraph-1.44-7.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-GDTextUtil-0.86-15.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-GD-2.44-3.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-GD-Barcode-1.15-6.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-HTML-Format-2.04-11.1.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-HTML-Parser-3.64-2.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-HTML-Tagset-3.20-4.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-HTML-Tree-3.23-10.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Hook-LexWrap-0.22-4.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-IO-Socket-INET6-2.56-4.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-IO-Socket-SSL-1.31-2.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-IO-String-1.08-9.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-IO-stringy-2.110-10.1.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Image-Base-1.07-14.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Image-Info-1.28-6.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Image-Size-3.2-4.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Image-Xbm-1.08-12.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Image-Xpm-1.09-12.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-JSON-2.15-5.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-LDAP-0.40-1.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-List-MoreUtils-0.22-10.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Locale-Maketext-Gettext-1.27-1.1.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Locale-PO-0.21-2.1.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-MIME-Lite-3.027-2.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-MIME-Types-1.28-2.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-MIME-tools-5.427-4.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-MailTools-2.04-4.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Mail-DKIM-0.37-2.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Makefile-DOM-0.004-1.1.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Module-Find-0.08-3.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Module-Info-0.31-7.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Module-Install-0.91-4.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Module-ScanDeps-0.95-2.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-NetAddr-IP-4.027-3.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Net-DNS-0.65-2.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Net-IP-1.25-13.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Net-Jabber-2.0-12.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Net-LibIDN-0.12-3.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Net-SMTP-SSL-1.01-4.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Net-SSLeay-1.35-9.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Net-Telnet-3.03-11.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Net-XMPP-1.02-8.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Newt-1.08-26.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Number-Compare-0.01-13.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Object-Deadly-0.09-6.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-PAR-Dist-0.46-2.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-PDF-Reuse-0.35-3.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-PPI-1.206-4.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-PPI-HTML-1.07-7.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Package-Generator-0.103-2.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-PadWalker-1.9-1.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Params-Util-1.00-3.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Params-Validate-0.92-3.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Parse-Yapp-1.05-41.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Perlilog-0.3-4.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Perl-Critic-1.105-2.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Perl-MinimumVersion-1.20-3.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Pod-Coverage-0.20-4.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Pod-POM-0.25-2.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Pod-Spell-1.01-6.1.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Probe-Perl-0.01-4.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Readonly-1.03-11.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Readonly-XS-1.05-3.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-SGMLSpm-1.03ii-21.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-SNMP_Session-1.12-4.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-SOAP-Lite-0.710.10-2.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Socket6-0.23-3.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Spiffy-0.30-12.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-String-CRC32-1.4-9.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-String-Format-1.15-2.1.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Sub-Exporter-0.982-4.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Sub-Install-0.925-6.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Sub-Uplevel-0.2002-4.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Syntax-Highlight-Engine-Kate-0.04-5.1.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Taint-Runtime-0.03-9.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Task-Weaken-1.02-7.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-TeX-Hyphen-0.140-9.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Template-Toolkit-2.22-5.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-TermReadKey-2.30-10.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Test-Base-0.58-3.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Test-CPAN-Meta-0.13-1.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Test-ClassAPI-1.06-2.1.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Test-Deep-0.106-1.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Test-Differences-0.4801-3.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Test-Exception-0.27-4.1.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Test-Manifest-1.22-5.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Test-MinimumVersion-0.011-2.1.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Test-NoWarnings-0.084-5.1.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Test-Object-0.07-6.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Test-Output-0.12-3.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Test-Perl-Critic-1.01-7.1.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Test-Pod-1.40-1.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Test-Pod-Coverage-1.08-8.1.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Test-Prereq-1.037-2.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Test-Script-1.06-1.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Test-SubCalls-1.09-1.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Test-Taint-1.04-9.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Test-Tester-0.107-5.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Test-Warn-0.21-2.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Text-Autoformat-1.14.0-5.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Text-Diff-1.37-2.1.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Text-Glob-0.08-7.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Text-Iconv-1.7-6.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Text-PDF-0.29a-2.1.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Text-Reform-1.12.2-6.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Text-Unidecode-0.04-7.1.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Tie-IxHash-1.21-10.1.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-TimeDate-1.16-11.1.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Time-modules-2006.0814-5.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Tree-DAG_Node-1.06-6.1.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-UNIVERSAL-can-1.15-1.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-UNIVERSAL-isa-1.03-1.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-URI-1.40-2.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Unicode-Map8-0.12-20.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-Unicode-String-2.09-12.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-WWW-Curl-4.09-3.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-XML-DOM-1.44-7.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-XML-DOM-XPath-0.14-4.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-XML-Dumper-0.81-6.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-XML-Filter-BufferText-1.01-8.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-XML-Grove-0.46alpha-40.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-XML-LibXML-1.70-5.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-XML-LibXSLT-1.70-1.1.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-XML-NamespaceSupport-1.10-3.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-XML-Parser-2.36-7.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-XML-RSS-1.45-2.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-XML-RegExp-0.03-7.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-XML-SAX-0.96-7.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-XML-SAX-Writer-0.50-8.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-XML-Simple-2.18-6.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-XML-Stream-1.22-12.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-XML-TokeParser-0.05-2.1.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-XML-TreeBuilder-3.09-16.1.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-XML-Twig-3.34-1.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-XML-Writer-0.606-6.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-XML-XPathEngine-0.12-3.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-XML-XPath-1.13-10.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-YAML-0.70-4.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-YAML-Syck-1.07-4.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-YAML-Tiny-1.40-2.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-libintl-1.20-1.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-libwww-perl-5.833-2.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-libxml-perl-0.08-10.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['perl-prefork-1.04-2.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['python-2.6.5-3.el6'] = 'fix-no_pyc' +config_opts['more_buildreqs']['python-2.6.5-3.el6_0.2'] = 'fix-no_pyc' +config_opts['more_buildreqs']['rrdtool-1.3.8-6.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['samba4-4.0.0-23.alpha11.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['sblim-cmpi-samba-1.0-1.el6'] = 'fix-no_pyc' +config_opts['more_buildreqs']['spamassassin-3.3.1-2.el6'] = 'fix-no_vendor_perl' +config_opts['more_buildreqs']['tix-8.4.3-5.el6'] = 'fix-no_pyc' +config_opts['more_buildreqs']['uuid-1.6.1-10.el6'] = 'fix-no_vendor_perl' + +# Fix /etc/hosts to not have IPv6 address +# Also add host so gnome-doc packages build +config_opts['files']['etc/hosts'] = '127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4\n::1 localhost6 localhost6.localdomain6\n173.14.237.131 www.oasis-open.org\n' +### KOOZALI SME SERVER END GENERATED CONTENT diff --git a/root/etc/mock/smeserver-10-x86_64-base.cfg b/root/etc/mock/smeserver-10-x86_64-base.cfg new file mode 100644 index 0000000..215607f --- /dev/null +++ b/root/etc/mock/smeserver-10-x86_64-base.cfg @@ -0,0 +1,117 @@ +config_opts['package_manager'] = 'yum' +config_opts['use_nspawn'] = False + +# see bugs https://bugzilla.redhat.com/show_bug.cgi?id=2076847 and https://bugzilla.redhat.com/show_bug.cgi?id=2076847 +config_opts['plugin_conf']["copy_enable"] = True +config_opts['plugin_conf']['copy_opts']= { + 'files': [ ("/etc/mock/perl.prov", "/usr/lib/rpm/redhat/perl.prov"), + ("/etc/mock/perl.prov", "/usr/lib/rpm/perl.prov"), + ], +} + +config_opts['root'] = 'smeserver-10-x86_64' +config_opts['target_arch'] = 'x86_64' +config_opts['dist'] = '.el7.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 v10" +config_opts['macros']['%packager'] = "Koozali.org " +config_opts['macros']['%vendor'] = "Koozali.org " +config_opts['macros']['%dist'] = ".el7.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/7/os/x86_64 +exclude=buildsys-macros + +[updates] +name=updates +baseurl=http://buildsys.koozali.org/build/7/updates/x86_64 +exclude=buildsys-macros + +[smeos] +name=os +baseurl=http://buildsys.koozali.org/build/10/smeos/x86_64 +exclude=buildsys-macros + +[smeupdates] +name=os +baseurl=http://buildsys.koozali.org/build/10/smeupdates/x86_64 +exclude=buildsys-macros + +[fastrack] +name=fastrack +baseurl=http://buildsys.koozali.org/build/7/fastrack/x86_64 + +# centos cr +[opt1] +name=opt1 +baseurl=http://buildsys.koozali.org/build/7/opt1/x86_64 + +# centos extra +[opt2] +name=opt2 +baseurl=http://buildsys.koozali.org/build/7/opt2/x86_64 + +# Not used +[opt3] +name=opt3 +baseurl=http://buildsys.koozali.org/build/7/opt3/x86_64 + +[epel] +name=epel +baseurl=http://download.fedoraproject.org/pub/epel/7/x86_64 +#baseurl=http://buildsys.koozali.org/build/7/epel/x86_64 +includepkgs=ccache mhash* perl-Taint-Util libdb4 libdb4-devel php-channel-horde php-horde-* perl-Class-Method-Modifiers perl-Class-XSAccessor perl-Devel-GlobalDestruction perl-Sub-Name perl-indirect perl-B-Hooks-OP-Check perl-ExtUtils-Depends perl-Lexical-SealRequireHints perl-Params-Classify perl-Dist-CheckConflicts perl-Math-Int64 perl-Sort-Naturally perl-Sub-Exporter* perl-Bytes-Random-Secure perl-Crypt-Random-TESHA2 perl-Crypt-Random-Seed perl-Math-Random-ISAAC kmodtool libmaxminddb-devel libmaxminddb perl-Module-Build-Tiny perl-Mojolicious perl-Net-CIDR-Lite mod_perl mod_perl-devel perl-Apache-Test pyzor perl-Linux-Pid perl-BSD-Resource perl-dev perl-Data-Dumper perl-Razor-Agent perl-generators* perl-Net-Patricia meson libidn2* ninja-build python36-Cython epel-rpm-macros lua-srpm-macros libnetfilter_log* courier-unicode* perl-Path-Class perl-String-Random perl-Test-Class perl-Test-Mojo perl-MRO-Compat perl-Class-Accessor libebml* libmatroska* pugixml* spdlog* multilib-rpm-config cmake3* libuv libzstd rhash google-benchmark* libnet10-* perl-Crypt-GPG gnupg1 perl-Lingua-Stem-Snowball* perl-Lingua-StopWords perl-rpm-build-perl* fmt* perl-Class-Virtual perl-Carp-Assert pyPdf python2-apipkg python2-bottle python2-dateutil python2-docutils python-gevent python2-simplejson python-sqlite3dbm python2-future python2-attrs python2-packaging python2-certifi perl-Email-MIME perl-Email-Simple perl-Net-IP perl-Net-SMTPS perl-Throwable perl-Sub-Override perl-Moose perl-Email-Abstract perl-Eval-Closure perl-Email-Date-Format perl-Devel-PartialDump perl-namespace-clean perl-B-Hooks-EndOfScope perl-Variable-Magic latexmk python3-sphinx* python36-sphinx* python36-pygments python36-jinja2 python36-docutils python36-markupsafe clamav* perl-TAP-Harness-Env rust ghc-* rust-* llvm13-libs pandoc golang* perl-Net-LibIDN* perl-Net-Patricia re2c perl-Data-Validate-IP perl-Clone-PP perl-ExtUtils-Manifest* perl-ExtUtils-InstallPaths* perl-ExtUtils-Helpers* perl-ExtUtils-Config* + +[openfusion] +name=openfusion +baseurl=http://repo.openfusion.net/centos7-x86_64 +includepkgs=perl-Lingua* perl-Snowball* perl-Text-German perl-MooX* perl-Scalar-List-Utils perl-Throwable perl-Moose perl-Try-Tiny perl-Devel-StackTrace perl-Devel-OverloadInfo perl-Sub-Name perl-Module-Runtime-Conflicts perl-Test-File-ShareDir perl-Test-Exception perl-Test-Output perl-Net-IDN-Encode perl-Path-Tiny perl-Class-Tiny perl-Unicode-UTF8 perl-Net-Server perl-Email-Address-XS perl-MaxMind-* perl-Geo-IP perl-IP-Country-DB_File perl-IP-Country perl-Math-Int128 perl-Data-IEEE754 perl-namespace-autoclean perl-Net-Works perl-List-AllUtils perl-Data-Printer perl-IP-Country perl-Sub-Identify perl-Test-Warnings perl-Hash-FieldHash perl-Data-Dumper-Concise perl-Encode-Detect + +[rpmfusion] +name=rpmfusion +baseurl=http://download1.rpmfusion.org/free/el/updates/7/x86_64 +#mirrorlist=http://mirrors.rpmfusion.org/mirrorlist?repo=free-el-updates-released-7&arch=$basearch +#baseurl=http://ucmirror.canterbury.ac.nz/linux/rpmfusion/free/el/updates/7/x86_64/ +includepkgs=ffmpeg* libva* x264-libs xvidcore librtmp buildsys-build-rpmfusion-kerneldevpkgs-current-* buildsys-build-rpmfusion-* libmpeg2* mpeg2dec + +[sclo-sclo] +name=sclo-sclo +baseurl=http://mirror.centos.org/centos/7/sclo/x86_64/sclo +includepkgs=python27* + +[sclo-rh] +name=sclo-rh +baseurl=http://mirror.centos.org/centos/7/sclo/x86_64/rh +includepkgs=python27* python33* rh-mongodb26* rh-mongodb32* rh-mongodb34* nodejs010* rh-nodejs6* devtoolset-* devtoolset-9* + +[buildsys-core] +name=buildsys-core +baseurl=http://buildsys.koozali.org/build/10/smeserver-core/x86_64 +includepkgs=bglibs bglibs-devel buildsys-macros cvm* dietlibc* e-smith-devtools perl-Test-Inline perl-IO-Socket-IP perl-Geography-Countries perl-Object-Persistence perl-bareword-filehandles perl-multidimensional perl-strictures perl-Module-Runtime perl-Role-Tiny perl-Sub-Quote perl-Bytes-Random-Secure perl-Net-Ident perl-generators DCC python3-lxml libnetfilter_acct* qmail perl-Net-IMAP-Simple perl-Regexp-Common perl-Email-Sender perl-Moo perl-Mail-DMARC clamav* + +[buildsys-contribs] +name=buildsys-contribs +baseurl=http://buildsys.koozali.org/build/10/smeserver-contribs/x86_64 +includepkgs=libevent2* perl-Ezmlm perl-IPC-Run libevhtp* libsearpc* ccnet* libccnet* libzdb* libccnet* evhtp* sqlite* ocaml camlp5 python27-python-versiontools libarchive* libupnp-* duktape-* fmt-* spdlog-* ezmlm* c-icap* + +[groups] +name=groups +baseurl=http://buildsys.koozali.org/build/10/smeserver-groups/x86_64 +""" diff --git a/root/etc/mock/smeserver-10-x86_64-iso.cfg b/root/etc/mock/smeserver-10-x86_64-iso.cfg new file mode 100644 index 0000000..9422fb4 --- /dev/null +++ b/root/etc/mock/smeserver-10-x86_64-iso.cfg @@ -0,0 +1,109 @@ +config_opts['package_manager'] = 'yum' +config_opts['use_nspawn'] = False + +config_opts['root'] = 'smeserver-10-x86_64' +config_opts['target_arch'] = 'x86_64' +config_opts['dist'] = '.el7.sme' + +config_opts['plugin_conf']['ccache_opts']['dir'] = "%(cache_topdir)s/ccache/x86_64/" + +config_opts['macros']['%distribution'] = "SME Server v10" +config_opts['macros']['%packager'] = "Koozali.org " +config_opts['macros']['%vendor'] = "Koozali.org " +config_opts['macros']['%dist'] = ".el7.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/7/os/x86_64 +exclude=buildsys-macros + +[updates] +name=updates +baseurl=http://buildsys.koozali.org/build/7/updates/x86_64 +exclude=buildsys-macros + +[smeos] +name=os +baseurl=http://buildsys.koozali.org/build/10/smeos/x86_64 +exclude=buildsys-macros + +[smeupdates] +name=os +baseurl=http://buildsys.koozali.org/build/10/smeupdates/x86_64 +exclude=buildsys-macros + +[fastrack] +name=fastrack +baseurl=http://buildsys.koozali.org/build/7/fastrack/x86_64 + +# centos cr +[opt1] +name=opt1 +baseurl=http://buildsys.koozali.org/build/7/opt1/x86_64 + +# centos extra +[opt2] +name=opt2 +baseurl=http://buildsys.koozali.org/build/7/opt2/x86_64 + +# Not used +[opt3] +name=opt3 +baseurl=http://buildsys.koozali.org/build/7/opt3/x86_64 + +[epel] +name=epel +baseurl=http://buildsys.koozali.org/build/7/epel/x86_64 +includepkgs=ccache mhash* perl-Taint-Util libdb4 libdb4-devel repoview python-kid + +#[rpmforge] +#name=rpmforge +#baseurl=http://buildsys.koozali.org/build/7/rpmforge/x86_64 +#includepkgs=perl-Taint-Util + +[buildsys-core] +name=buildsys-core +baseurl=http://buildsys.koozali.org/build/10/smeserver-core/x86_64 +includepkgs=bglibs buildsys-macros cvm* dietlibc* e-smith-devtools perl-Test-Inline perl-IO-Socket-IP perl-Geography-Countries perl-Object-Persistence zsync jigdo + +[groups] +name=groups +baseurl=http://buildsys.koozali.org/build/10/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 --git a/root/etc/yum.repos.d/smeserver-mock.repo b/root/etc/yum.repos.d/smeserver-mock.repo new file mode 100644 index 0000000..3816156 --- /dev/null +++ b/root/etc/yum.repos.d/smeserver-mock.repo @@ -0,0 +1,41 @@ +[smeserver-mock] +enabled=1 +mirrorlist=http://mirrorlist.contribs.org/mirrorlist/smeos-10 +name=SME Server - os smeserver-mock +gpgcheck=0 +enablegroups=1 +includepkgs=smeserver-mock + +[smeserver-mock-updates] +enabled=1 +mirrorlist=http://mirrorlist.contribs.org/mirrorlist/smeupdates-10 +name=SME Server - updates smeserver-mock +gpgcheck=1 +enablegroups=1 +includepkgs=smeserver-mock + +[smeserver-mock-test] +enabled=0 +mirrorlist=http://mirrorlist.contribs.org/mirrorlist/smetest-10 +name=SME Server - test smeserver-mock +gpgcheck=0 +enablegroups=1 +includepkgs=smeserver-mock + +[smeserver-mock-dev] +enabled=0 +mirrorlist=http://mirrorlist.contribs.org/mirrorlist/smedev-10 +name=SME Server - dev smeserver-mock +gpgcheck=0 +enablegroups=1 +includepkgs=smeserver-mock + +[smeserver-mock-updates-testing] +enabled=0 +mirrorlist=http://mirrorlist.contribs.org/mirrorlist/smeupdates-testing-10 +name=SME Server - updates-testing smeserver-mock +gpgcheck=0 +enablegroups=1 +includepkgs=smeserver-mock + + diff --git a/root/usr/bin/BogusDateBot.sh b/root/usr/bin/BogusDateBot.sh new file mode 100755 index 0000000..6e6d020 --- /dev/null +++ b/root/usr/bin/BogusDateBot.sh @@ -0,0 +1,76 @@ +#!/bin/bash +# Copyright 2014 Edward J Huff ejhuff at gmail.com, not a work for hire. +# License: any GPL or BSD or MIT or any free software license. + +# bash script to fix bogus weekdays in rpm spec files. + +# This script automatically corrects bogus weekdays in spec files, generating a +# changelog entry and adding a line after the bogus date noting the original date. +# (The weekday might have been correct and the day of the month wrong). +# The input file is copied to a backup file, and a diff is printed. +# JP PIALASSE : added ? to handle date with one digit + +[[ $# > 0 ]] || { echo "Usage: $0 packagename.spec ..."; exit 1; } +export LC_ALL=C +Www='[A-Z][a-z][a-z]' +Mmm='[A-Z][a-z][a-z]' +DD1='[0-9]' +DD0='[0-9]{1,2}' +DD='[0-9][0-9]' +YYYY='[12][90][0-9][0-9]' +WwwMmmDDYYYY="\($Www\) \($Mmm\) \($DD\) \($YYYY\)" +WwwMmmDD1YYYY="\($Www\) \($Mmm\) \($DD1\) \($YYYY\)" +WwwMmmDD0YYYY="\($Www\) \($Mmm\) \($DD0\) \($YYYY\)" + +while [[ $# > 0 ]]; do + [[ -f "$1" ]] || { echo "$0: $1: no such file."; exit 1; } + changelog=$(mktemp --tmpdir=. changelog-XXXXXXXXX.txt) + sedscript=$(mktemp --tmpdir=. sedscript-XXXXXXXXX.sed) + printf "%s\n" \ + "* $(date +'%a %b %d %Y') BogusDateBot" \ + '- Eliminated rpmbuild "bogus date" warnings due to inconsistent weekday,' \ + " by assuming the date is correct and changing the weekday." \ + > "$changelog" + cat "$1" | \ + grep -P "^\* $Www $Mmm $DD0 $YYYY" | \ + grep -v '^echo' | \ + sed 's/^\* '"$WwwMmmDDYYYY"'.*$/echo "$(date --date="\2 \3 \4" +"%a \1 %b %d %Y")"/' | \ + sed 's/^\* '"$WwwMmmDD1YYYY"'.*$/echo "$(date --date="\2 0\3 \4" +"%a \1 %b %d %Y")"/' | \ + grep '^echo' | \ + bash | \ + egrep -v "Mon Mon|Tue Tue|Wed Wed|Thu Thu|Fri Fri|Sat Sat|Sun Sun" | \ + sort -u --key=5,5n --key=3,3M --key=4,4n | \ + while read correct wrong Month Day Year; do + date="$Month $Day $Year" + alternatives="$wrong $Month $Day $Year --> "$( + for ((i = -6; i < 7; i++ )); do + date --date "$date $i day" +"%a %b %d %Y or "; + done | egrep "$date|$wrong" | tr -d \\n; + printf "%s" "....") + printf " %s\n" "$alternatives" >> "$changelog" + # re='^\* '"$wrong $Month $Day $Year"'\(.*\)$' + # subs='* '"$correct $Month $Day $Year"'\1\n '"$alternatives" + # printf "%s\n" "s:$re:$subs:" >> "$sedscript" + # if $Day only one digit + if [[ "$Day" =~ ^0([0-9])$ ]]; + then echo "${BASH_REMATCH[1]}"; + re='^\* '"$wrong $Month ${BASH_REMATCH[1]} $Year"'\(.*\)$' + subs='* '"$correct $Month $Day $Year"'\1\n '"$alternatives" + else + + re='^\* '"$wrong $Month $Day $Year"'\(.*\)$' + subs='* '"$correct $Month $Day $Year"'\1\n '"$alternatives" + + fi + printf "%s\n" "s:$re:$subs:" >> "$sedscript" + + done + printf "\n" >> "$changelog" + backup="$1"-$(date --utc --ref="$1" +"%Y-%m-%d-%H-%M-%S-%NZ") + cp -vpf "$1" "$backup" + cat "$backup" | sed -f "$sedscript" -e '/^%changelog *$/ r '"$changelog" > "$1" + rm -f "$changelog" "$sedscript" + diff -u "$backup" "$1" + shift +done + diff --git a/root/usr/bin/change-log b/root/usr/bin/change-log new file mode 100755 index 0000000..95c3914 --- /dev/null +++ b/root/usr/bin/change-log @@ -0,0 +1,65 @@ +#!/bin/bash + +LANG="en_us_8859_1"; +dateJ=`date "+%Y-%m-%d"`; +dateH=`date "+%a %b %d %Y"`; + + +#if [[ $1 ]] && [ -f $1 ] && [ ${1: -4} == ".spec" ] +if [[ $1 ]] && [ ${1##*.} == "spec" ] +then +specfile=$1 +else +specfile=`grep '\.spec' ./CVS/Entries|cut -d'/' -f2` +fi + +echo "search for release in $specfile"; +# could be +#%define main_release 12.6 +#%define release 2 +#%define release 2%{?dist} +#Release: 24 +#Release: 24%{?dist} +rele=0; +release=`cat $specfile|egrep '^%define\s+(main_)?release'|sed -r 's/\s+/ /g'|cut -d " " -f3|cut -d% -f1`; +if [[ ! $release ]]; then + release=`cat $specfile|egrep '^Release:'|cut -d ":" -f2| tr -d "[:space:]"|cut -d% -f1`; + rele=1; +fi + +echo "search for version in $specfile"; +#%define version 23 +#Version: 23 +version=`cat $specfile|egrep -i '%define\s+version'|sed -r 's/\s+/ /g' |cut -d " " -f3|cut -d% -f1`; +echo "version : $version" +if [[ ! $version ]]; then + version=`cat $specfile|egrep '^Version:'|cut -d ":" -f2| tr -d "[:space:]"`; +fi +echo "version : $version" + + +echo "update release"; +oldrelease=$release; +#release=$(($release + 1));# do not handle float +#release=`echo "$release + 1"|bc`; # not always available +addme=1; +if [[ "$release" =~ ^[0-9]+\.[0-9]+$ ]] +then +addme=0.1; +fi +release=`lua -e "print( $release + $addme)"`; +echo "update release $oldrelease ==> $release"; +if [ "$rele" -eq "0" ]; then + cat $specfile |sed -r "s/(^%define\s+(main_)?release) *$oldrelease/\1 $release/">$specfile.tmp; +else + cat $specfile |sed -r "s/(^Release:\s+)$oldrelease/\1$release/">$specfile.tmp; +fi +cat $specfile.tmp > $specfile; + +echo "updating changelog $specfile"; +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; +rm -f $specfile.tmp +echo "vim $specfile" diff --git a/root/usr/bin/cleantree b/root/usr/bin/cleantree new file mode 100644 index 0000000..54311f4 --- /dev/null +++ b/root/usr/bin/cleantree @@ -0,0 +1,13 @@ +#!/bin/sh + +#find . -regex .*patch|cut -f2 -d/>~filetoremove + +for f in `find . -regex .*patch |cut -f2 -d/` +do + echo "Processing $f" + # do something on $f + rm -f $f + cvs remove $f +done + +cvs commit -m "cleaning tree from patchs" diff --git a/root/usr/bin/clog b/root/usr/bin/clog new file mode 100755 index 0000000..504b942 --- /dev/null +++ b/root/usr/bin/clog @@ -0,0 +1,3 @@ +#!/bin/bash +rm -f clog +cvs commit -m "$(make clog)" diff --git a/root/usr/bin/createBuildDir b/root/usr/bin/createBuildDir new file mode 100644 index 0000000..9789d17 --- /dev/null +++ b/root/usr/bin/createBuildDir @@ -0,0 +1,6 @@ +#!/bin/sh +mkdir ~/rpmbuild +for i in BUILD BUILDROOT RPMS SOURCES SPECS SRPMS +do + mkdir ~/rpmbuild/$i +done diff --git a/root/usr/bin/importNew b/root/usr/bin/importNew new file mode 100644 index 0000000..360d6e7 --- /dev/null +++ b/root/usr/bin/importNew @@ -0,0 +1,221 @@ +#!/bin/bash + +if [ $# -eq 0 ] + then + echo "No arguments supplied" +fi +if [ $# -lt 3 ] + then + echo "Usage: +importNew type version pkgname [rpmpath] +examples: +# importNew contribs 10 smeserver-mycontrib [~/smeserver-mycontribs-1.0-1.src.rpm] +# importNew sme 10 smeserver-package [~/smeserver-package-1.0-1.src.rpm] +This script is intended to create a new tree, if needed,and a new branch to import a provided srpm. +It will then run cvs-import.sh script for you if you provided a srpm location. If not provided you can populate the branch +with what you want. If you only intend to copy the content of a branch to another, you might search for newbranch script. + +" + exit +fi + +sme=$1 +if [[ "$sme" != "sme" && "$sme" != "contribs" ]] +then + echo "wrong first parameter should be either 'sme' or 'contribs'" + exit +fi +re='^[0-9]+$' +if ! [[ $2 =~ $re ]] ; then + echo "Error: Second argument should be a version number (e.g.: 10) for the branch ((e.g.: contribs10) where you want to put the SRPM content if provided." >&2; exit 1 +fi +ver=$2 +pkgname=$3 +rpmpath=$4 +curpwd=`pwd` +packageroot='smecontribs' +CVSROOT=":ext:shell.koozali.org:/cvs/smecontribs" +if [[ "$sme" == "sme" ]] +then + packageroot='smeserver' + CVSROOT=":ext:shell.koozali.org:/cvs/smeserver" +fi + + +#this one is directly from commons/Makefile.common +CreateBranchMakefile() { + cat >Makefile <&2 +endef + +MAKEFILE_COMMON := \$(shell \$(checkout-makefile-common)) +endif + +include \$(MAKEFILE_COMMON) +EOF +} + + + +# update modules files +cd ~/$packageroot/CVSROOT +cvs -Q update -dPA 1>/dev/null +if [ -d ~/$packageroot/rpms ] + then + # update current tree + cd ~/$packageroot/rpms + cvs -Q update -dPA $pkgname common 1>/dev/null +else + # checkout rpms + cd ~/$packageroot + cvs -Q -z3 -d:ext:shell.koozali.org:/cvs/$packageroot co -P rpms 1>/dev/null +fi + + +newmodule=true; +# better test would be to actually grep module file! +#if [ -d ~/$packageroot/rpms/$pkgname ] +cd ~/$packageroot/CVSROOT +cvs -Q update -dPA 1>/dev/null +grep -Eq "^$pkgname\s+rpms/$pkgnames.*" ~/$packageroot/CVSROOT/modules +if (( $? == 0 )) +then + echo "package exists already" + newmodule=false; +fi +change=0 +cd ~/$packageroot/rpms +#if [ -d ~/$packageroot/rpms/$pkgname ] +if ( cvs status -l $pkgname 2>/dev/null|grep -q 'Unknown' ) +then + echo "creating $pkgname tree ..." + mkdir -p $pkgname + cvs add $pkgname + change=1 +fi +#if [ -d ~/$packageroot/rpms/$pkgname/$sme$ver ] +if ( cvs status -l $pkgname/$sme$ver 2>/dev/null|grep -q 'Unknown' ) +then + echo "creating $pkgname/$sme$ver branch with content..." + mkdir -p $pkgname/$sme$ver + cvs add $pkgname/$sme$ver + change=1 +fi +#if [ -f ~/$packageroot/rpms/$pkgname/$sme$ver/.cvsignore ] +if ( cvs status $pkgname/$sme$ver/.cvsignore 2>/dev/null|grep -q 'Unknown' ) +then + touch $pkgname/$sme$ver/.cvsignore + cvs add $pkgname/$sme$ver/.cvsignore + change=1 +fi +#if [ -f ~/$packageroot/rpms/$pkgname/$sme$ver/import.log ] +if ( cvs status $pkgname/$sme$ver/import.log 2>/dev/null|grep -q 'Unknown' ) +then + touch $pkgname/$sme$ver/import.log + cvs add $pkgname/$sme$ver/import.log + change=1 +fi +#create Makefile here +pushd $pkgname/$sme$ver >/dev/null +#if [ ! -f Makefile ] +if ( cvs status Makefile 2>/dev/null|grep -q 'Unknown' ) +then + NAME=$pkgname + CreateBranchMakefile + cvs -Q add Makefile + change=1 +fi +popd >/dev/null + +if [ "$change" == "1" ] +then +echo "commit..." +cvs -Q commit -m "Prep for $pkgname import" $pkgname +fi + +if ( $newmodule ) +then + cd ~/$packageroot/CVSROOT + cvs -Q update -dPA 1>/dev/null + echo "$pkgname rpms/$pkgname &common" >> modules + linenumb=`cat modules |grep -n "#Start Auto-Maintenance" | grep -Eo '^[^:]+'` + # "#Start Auto-Maintenance" + #(head -n $linenumb; sort -nk$linenumb) < sample.txt 1<> sample.txt + (head -n $linenumb; sort) < modules 1<> modules + #echo "cvs commit -m \"adding $pkgname to modules\"" + cvs commit -m "adding $pkgname to modules" +fi + +if [[ "$HOSTNAME" == "shell.koozali.org" ]] +then + if [ $# -eq 3 ] + then + echo "importing the srpm for you" + cd ~/$packageroot; + cd CVSROOT/; + cvs -Q update -dPA 1>/dev/null; + cd ../rpms/; + 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 + echo "no srpm provided" + fi + +else + echo "##########################" + if [[ $rpmpath != "" ]] + then + echo "sending $rpmpath to shell.koozali.org ..." + echo "scp $rpmpath shell.koozali.org:/tmp/" + cd $curpwd + 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/; 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" + echo "cd ~/$packageroot" + if [ $# -eq 3 ] + then + echo "./common/cvs-import.sh -b $sme$ver -m 'Initial import' /tmp/$(basename $rpmpath)" + else + echo "./common/cvs-import.sh -b $sme$ver -m 'Initial import' YOURSRPM " + fi + echo "exit" + 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 "##########################" +echo "now you can:" +echo "cd ~/$packageroot/rpms/$pkgname/$sme$ver" + +unset CVSROOT diff --git a/root/usr/bin/newbranch b/root/usr/bin/newbranch new file mode 100644 index 0000000..835941e --- /dev/null +++ b/root/usr/bin/newbranch @@ -0,0 +1,105 @@ +#!/bin/bash + +if [ $# -eq 0 ] + then + echo "No arguments supplied" +fi +if [ $# -lt 4 ] + then + echo "Usage: +newbranch type versionOri versionDest pkgname +examples: +# newbranch contribs 9 10 smeserver-mycontrib +# newbranch sme 9 10 smeserver-package +This script is intended to create a new branch of an existing tree by copying the content of another branch in it. You can then alter the new branch content as you want. +If you need to create the tree for the package then you should use importNew script. It will also allow you to import a srpm content. + +" + exit +fi + +sme=$1 +if [[ "$sme" != "sme" && "$sme" != "contribs" ]] +then + echo "wrong first parameter should be either 'sme' or 'contribs'" + exit +fi +re='^[0-9]+$' +if ! [[ $2 =~ $re ]] ; then + echo "Error: Second argument should be a version number (e.g.: 9) with an existing branch (e.g.: sme9)." >&2; exit 1 +fi +if ! [[ $3 =~ $re ]] ; then + echo "Error: Third argument should be a version number (e.g.: 10) needing a new branch (e.g.: sme10)." >&2; exit 1 +fi +#verd=$(($2 + 1));# rem we might want to go down too +vero=$2 +verd=$3 +pkgname=$4 +curpwd=`pwd` +packageroot='smecontribs' +if [[ "$sme" == "sme" ]] +then + packageroot='smeserver' +fi + +cd ~/$packageroot/CVSROOT +cvs -Q update -dPA 1>/dev/null +grep -Eq "^$pkgname\s+rpms/$pkgnames.*" ~/$packageroot/CVSROOT/modules +if (( $? != 0 )) +then + echo "Package $pkgname does not exists in modules, please create the proper tree in cvs and add it to modules. You might consider using importNew script." + exit +fi + + +# if does not exist we test if it is in cvs +# if not we fail +if [ ! -d ~/$packageroot/rpms/$pkgname ] +then + cd ~/$packageroot/rpms + # rem to test + cvs -Q -z3 -d:ext:shell.koozali.org:/cvs/$packageroot co -P $pkgname #1>/dev/null + + if [ ! -d ~/$packageroot/rpms/$pkgname ] + then + echo "no such module $pkgname" + exho "use instead importNew script" + exit; + fi +fi + +cd ~/$packageroot/rpms; +cvs update -dPA $pkgname >/dev/null + +if [ ! -d ~/$packageroot/rpms/$pkgname/$sme$vero ] + then + echo "Branch $sme$vero does not exist. Nothing to do."; + exit; + fi + +if [ -d ~/$packageroot/rpms/$pkgname/$sme$verd ] + then + echo "Branch $sme$verd exists. Nothing to do."; + else + cd ~/$packageroot/rpms + rm -rf ~/$packageroot/rpms/$pkgname + cd ~/$packageroot/rpms + cvs -Q co $pkgname + cd $pkgname + # then you can copy + cp -a $sme$vero $sme$verd + rm -rf $sme$verd/CVS + cvs add $sme$verd + cd $sme$verd + find ./ -name CVS -prune -o -print | xargs cvs add + cvs commit -m 'Initial import' + echo "# then you have to do:" + echo "cd ~/$packageroot/rpms/$pkgname/$sme$verd/" + echo "make local" + echo "make tag ;make build" + echo "# Alternatively you can do:" + echo "# make mockbuild" + echo "# make tag ;make build" + fi + + diff --git a/root/usr/bin/prepa b/root/usr/bin/prepa new file mode 100755 index 0000000..9255b9b --- /dev/null +++ b/root/usr/bin/prepa @@ -0,0 +1,16 @@ +#!/bin/bash +cvs update -dPA +make clean +make prep +if [ -f 'sources' ] ; then +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 + echo "$folder exist" + if [ -d $oldy ] ; then + rm -rf $oldy && echo "removing $oldy" + fi + cp -a $folder $oldy && echo "creating $oldy as fresh copy of $folder" +fi +fi + diff --git a/root/usr/bin/refresh b/root/usr/bin/refresh new file mode 100644 index 0000000..5883d27 --- /dev/null +++ b/root/usr/bin/refresh @@ -0,0 +1,57 @@ +#!/bin/bash + +if [ $# -eq 0 ] + then + echo "No arguments supplied" + echo "Usage: +refresh [sme|contribs] +examples: +# refresh sme +This script will refresh or create the tree for smeserver (sme) or smecontribs (contribs). + +" + exit +fi +sme=$1 +if [[ "$sme" != "sme" && "$sme" != "contribs" ]] +then + echo "Wrong first parameter should be either 'sme' or 'contribs'" + exit +fi + +packageroot='smecontribs' +if [[ "$sme" == "sme" ]] +then + packageroot='smeserver' +fi + +#create if missing +if [ ! -d ~/$packageroot ] + then + "creating ~/$packageroot and populating..." + mkdir -p ~/$packageroot + cd ~/$packageroot + cvs -Q -z3 -d:ext:shell.koozali.org:/cvs/$packageroot co -P CVSROOT rpms common 1>/dev/null + exit +fi + +if [[ "$2" == "force" ]] + then + "Forcing checkout for ~/$packageroot and populating with CVSROOT rpms common..." + mkdir -p ~/$packageroot + cvs -Q -z3 -d:ext:shell.koozali.org:/cvs/$packageroot co -P CVSROOT rpms common 1>/dev/null + exit +fi + +# check if module rpms exist and populate it if necessary or update it +if [ -d ~/$packageroot/rpms ] + then + # update current tree + cd ~/$packageroot/rpms + cvs -Q update -dPA 1>/dev/null +else + # checkout rpms + cd ~/$packageroot + cvs -Q -z3 -d:ext:shell.koozali.org:/cvs/$packageroot co -P rpms 1>/dev/null +fi + diff --git a/root/usr/bin/tagbuild b/root/usr/bin/tagbuild new file mode 100755 index 0000000..4275eb4 --- /dev/null +++ b/root/usr/bin/tagbuild @@ -0,0 +1,5 @@ +#!/bin/sh +make tag +make build +echo '' +grep .spec ./CVS/Entries|cut -d'/' -f2|xargs cat|grep -i '^%changelog' -A5 diff --git a/root/usr/lib/python3.6/site-packages/mockbuild/plugins/copy.py b/root/usr/lib/python3.6/site-packages/mockbuild/plugins/copy.py new file mode 100644 index 0000000..0d030bd --- /dev/null +++ b/root/usr/lib/python3.6/site-packages/mockbuild/plugins/copy.py @@ -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) + + + + + + + + + + + + + diff --git a/smeserver-mock.spec b/smeserver-mock.spec new file mode 100644 index 0000000..ae5ccec --- /dev/null +++ b/smeserver-mock.spec @@ -0,0 +1,183 @@ +# $Id: smeserver-mock.spec,v 1.27 2023/07/16 13:34:25 terryfage Exp $ +%global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g') +Summary: smeserver-mock tools for building RPMs +%define name smeserver-mock +Name: %{name} +%define version 1.0 +%define release 23 +Version: %{version} +Release: %{release}%{?dist} +License: GPL +Group: Networking/Daemons +Source: %{name}-%{version}.tar.xz + +BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot +BuildArchitectures: noarch +Requires: e-smith-devtools +Requires: mock +Requires: glances +Requires: make rpm-build rpm-sign wget +Requires: cmake automake libtool +Buildrequires: e-smith-devtools +# needed for scl +#Requires: scl-utils scl-utils-build centos-release-scl centos-release-scl-rh +#Requires: python27-build +AutoReqProv: no + +%changelog +* Thu Oct 26 2023 cvs2git.sh aka Brian Read 1.0-23.sme +- Roll up patches and move to git repo [SME: 12338] + +* Thu Oct 26 2023 BogusDateBot +- Eliminated rpmbuild "bogus date" warnings due to inconsistent weekday, + by assuming the date is correct and changing the weekday. + +* Sun Jul 16 2023 TerryFage 1.0-22.sme +- add to mock*.cfg facilitate build with external packages [SME: 12381] + +* Mon Jun 05 2023 TerryFage 1.0-21.sme +- add to mock*.cfg facilitate build with external packages [SME: 12350] +- attribute solutions Trevor Batley, Terry Fage + +* Thu May 04 2023 TerryFage 1.0-20.sme +- add to mock*.cfg facilitate build with external packages [SME: 12350] +- attribute solutions Trevor Batley, Terry Fage + +* Sun Apr 30 2023 TerryFage 1.0-19.sme +- add package to mock*.cfg facilitate cvm build [SME: 12350] +- attribute solution to Trevor batley + +* Thu Apr 13 2023 Jean-Philippe Pialasse 1.0-18.sme +- fixpost scriptled not working [SME: 12349] +- add smeos and smeupdates in mock file + +* Wed Apr 12 2023 Jean-Philippe Pialasse 1.0-17.sme +- fix change-log [SME: 12340] +- update smeserver 10 base mockfile +- perl.prov workaround in mock file + +* Fri Nov 18 2022 Jean-Philippe Pialasse 1.0-16.sme +- fix change-log not handling tab for version or release + +* Thu Jun 30 2022 Jean-Philippe Pialasse 1.0-15.sme +- update sme10 mock files [SME: 12089] +- remove python scl dependencies blocks a lot from using the rpm + almost never needed [SME: 12090] +- cleaning remove sme8 and sme9 mock files +- added workaround to perl.prov not working [SME: 11958] + added mock plugin copy.py and an updated perl.prov +- update embded bins + +* Mon Dec 27 2021 Michel Begue 1.0-13.sme +- fix build deps for Mojo::JWT [SME: 11005] + +* Thu Nov 26 2020 Jean-Philipe Pialasse 1.0-12.sme +- fix build deps for spamassassin [SME: 11203] + +* Fri Sep 04 2020 Michel Begue 1.0-11.sme +- update dependencies to build Mojo::JWT package [SME: 11005] + +* Tue Aug 18 2020 Michel Begue 1.0-10.sme +- update dependencies to build kmod packages [SME: 10993] + +* Thu May 14 2020 Jean-Philipe Pialasse 1.0-9.sme +- fix nspawn and package_manager set to yum [SME: 10946] +- updating list of included packages for SME10 and SME9 repo +- updating the attached bins to help building [SME: 10924] + +* Mon Sep 30 2019 Michel Begue 1.0-8.sme +- added include pkg ocaml, camlp5 [SME: 10809] + +* Tue Nov 13 2018 Jean-Philipe Pialasse 1.0-7.sme +- fix non needed Requires python-ctypes [SME: 10647] + +* Wed Jun 20 2018 Jean-Philipe Pialasse 1.0-6.sme +- added include pkg for video tools [SME: 1600] +- applied patch for previous bug fix [SME: 10599] + +* Tue Jun 19 2018 Jean-Philipe Pialasse 1.0-5.sme +- update dependencies to build spamassassin [SME: 10599] + +* Sun Mar 18 2018 Jean-Philipe Pialasse 1.0-4.sme +- update include package values according to buildsys + +* Sat Mar 17 2018 Jean-Philipe Pialasse 1.0-3.sme +- set %config on mock config files +- a rpmsave of the previous version will be created if modified. +- fix typo in filename + +* Sun Mar 11 2018 Jean-Philipe Pialasse 1.0-2.sme +- update of site-default.cfg via post script [SME: 10537] +- removed e-smith-devtools of requirements +- added Requires python27-build + +* Sat Mar 10 2018 Jean-Philipe Pialasse 1.0-1.sme +- Initial release with SME iServer mock config files [SME: 10537] +- tools added : BogusDateBot.sh change-log clog createBuildDir prepa tagbuild + +%description +Tools for use in building RPMs for the Koozali SME server and gateway. + +Few tools are also provided to help you with package building. + +%prep +%setup + +%build + +%install +rm -rf $RPM_BUILD_ROOT +(cd root ; /usr/bin/find . -depth -print | /bin/cpio -dump $RPM_BUILD_ROOT) +/bin/rm -f %{name}-%{version}-filelist +/sbin/e-smith/genfilelist $RPM_BUILD_ROOT \ + --file /usr/bin/BogusDateBot.sh '%attr(0755,root,root)' \ + --file /usr/bin/change-log '%attr(0755,root,root)' \ + --file /usr/bin/clog '%attr(0755,root,root)' \ + --file /usr/bin/createBuildDir '%attr(0755,root,root)' \ + --file /usr/bin/prepa '%attr(0755,root,root)' \ + --file /usr/bin/tagbuild '%attr(0755,root,root)' \ + --file /etc/mock/perl.prov '%attr(0755,root,root)' \ + --ignoredir /usr/lib/python3.6/site-packages/mockbuild/plugins \ + --ignoredir /usr/lib/python3.6/site-packages/mockbuild \ + --ignoredir /usr/lib/python3.6/site-packages \ + --ignoredir /usr/lib/python3.6 \ + --ignoredir /etc/mock \ + | grep -v copy.pyc \ + | grep -v copy.pyo \ + > %{name}-%{version}-filelist + +%clean +rm -rf $RPM_BUILD_ROOT + +%pre +%preun +%post -p /bin/bash + +# updates sme site defaults +main=/etc/mock/site-defaults.cfg +tmp=/tmp/site-defaults.cfg +gen=/etc/mock/sme-site-defaults.cfg + +# position of the tags +BEGIN_GEN=$(cat $main | grep -n '### KOOZALI SME SERVER BEGIN GENERATED CONTENT' | sed 's/\(.*\):.*/\1/g' ) +END_GEN=$(cat $main | grep -n '### KOOZALI SME SERVER END GENERATED CONTENT' | sed 's/\(.*\):.*/\1/g' ) +#if tag is absent set first to 0 +if [[ "$BEGIN_GEN" -eq "" ]]; then BEGIN_GEN=0; fi +if [[ "$END_GEN" -eq "" ]]; then + # if second tag is absent just concatenate + cat <(head -n $(expr $BEGIN_GEN - 1) $main) $gen >$tmp; + +else + # if both tags are present replace content + cat <(head -n $(expr $BEGIN_GEN - 1) $main) $gen <(tail -n +$(expr $END_GEN + 1) $main) >$tmp; + +fi +# mv tmp file to main file +mv $tmp $main + + +%postun + +%files -f %{name}-%{version}-filelist +%defattr(-,root,root,-) +/etc/mock/* %config %attr(0755,root,mock)