Changes

Jump to navigation Jump to search
Line 1: Line 1: −
Login as brianr.
+
<!-- Updated - July 2023 - Added latest smeserver-10-x86_64-base.cfg contents and git details
 +
 
 +
Updated Aug 2023 - Add Rocky 8 build details and notification of EL8 plague-client.
 +
 
 +
And added in instructions for pulling git repos down and mockbuilding locall.
 +
-->
 +
<nowiki>__TOC__</nowiki>
 +
 
 +
==Creating the build system==
 +
 
 +
Build yourself a Rock8 system, probably minimal, but any level will do.
 +
 
 +
https://rockylinux.org/download/
 +
 
 +
Then login to the new system as "brianr" (or whatever user you created as part of the install.)
    
  sudo dnf install epel-release
 
  sudo dnf install epel-release
Line 5: Line 19:  
  sudo /usr/sbin/usermod -G mock brianr
 
  sudo /usr/sbin/usermod -G mock brianr
 
  sudo dnf install glances
 
  sudo dnf install glances
  sudo yum install make rpm-build rpm-sig
+
  sudo yum install make rpm-build rpm-sign
 +
sudo dnf install xz
 +
 
    
(Missing python-ctypes??)
 
(Missing python-ctypes??)
Line 24: Line 40:  
  sudo chown root:mock /etc/mock/*
 
  sudo chown root:mock /etc/mock/*
   −
Note that the smeserver-10 file is incomplete (and actually the only one we really want!). Ideally the full one will be uploaded in time. See later, I copied from my Centos 7 build system.
+
Note that the /etc/mock/smeserver-10-x86_64-base.cfg  file is incomplete (and actually the only one we really want!). Ideally the full one will be uploaded in time. See later, I copied from my Centos 7 build system.
    
Here it is:
 
Here it is:
Line 30: Line 46:  
  config_opts['package_manager'] = 'yum'
 
  config_opts['package_manager'] = 'yum'
 
  config_opts['use_nspawn'] = False
 
  config_opts['use_nspawn'] = False
 +
 +
# see bugs <nowiki>https://bugzilla.redhat.com/show_bug.cgi?id=2076847</nowiki> and <nowiki>https://bugzilla.redhat.com/show_bug.cgi?id=2076847</nowiki>
 +
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['root'] = 'smeserver-10-x86_64'
Line 39: Line 63:  
    
 
    
 
  config_opts['macros']['%distribution'] = "SME Server v10"
 
  config_opts['macros']['%distribution'] = "SME Server v10"
  config_opts['macros']['%packager'] = "Koozali.org <http://www.koozali.org>"
+
  config_opts['macros']['%packager'] = "Koozali.org <<nowiki>http://www.koozali.org</nowiki>>"
  config_opts['macros']['%vendor'] = "Koozali.org <http://www.koozali.org>"
+
  config_opts['macros']['%vendor'] = "Koozali.org <<nowiki>http://www.koozali.org</nowiki>>"
 
  config_opts['macros']['%dist'] = ".el7.sme"
 
  config_opts['macros']['%dist'] = ".el7.sme"
 
    
 
    
Line 58: Line 82:  
  [os]
 
  [os]
 
  name=os
 
  name=os
  baseurl=http://buildsys.koozali.org/build/7/os/x86_64
+
  baseurl=<nowiki>http://buildsys.koozali.org/build/7/os/x86_64</nowiki>
 
  exclude=buildsys-macros
 
  exclude=buildsys-macros
 
    
 
    
 
  [updates]
 
  [updates]
 
  name=updates
 
  name=updates
  baseurl=http://buildsys.koozali.org/build/7/updates/x86_64
+
  baseurl=<nowiki>http://buildsys.koozali.org/build/7/updates/x86_64</nowiki>
 
  exclude=buildsys-macros
 
  exclude=buildsys-macros
 
    
 
    
 +
[smeos]
 +
name=os
 +
baseurl=<nowiki>http://buildsys.koozali.org/build/10/smeos/x86_64</nowiki>
 +
exclude=buildsys-macros
 +
 +
[smeupdates]
 +
name=os
 +
baseurl=<nowiki>http://buildsys.koozali.org/build/10/smeupdates/x86_64</nowiki>
 +
exclude=buildsys-macros
 +
 
  [fastrack]
 
  [fastrack]
 
  name=fastrack
 
  name=fastrack
  baseurl=http://buildsys.koozali.org/build/7/fastrack/x86_64
+
  baseurl=<nowiki>http://buildsys.koozali.org/build/7/fastrack/x86_64</nowiki>
 
    
 
    
 
  # centos cr
 
  # centos cr
 
  [opt1]
 
  [opt1]
 
  name=opt1
 
  name=opt1
  baseurl=http://buildsys.koozali.org/build/7/opt1/x86_64
+
  baseurl=<nowiki>http://buildsys.koozali.org/build/7/opt1/x86_64</nowiki>
 
    
 
    
 
  # centos extra
 
  # centos extra
 
  [opt2]
 
  [opt2]
 
  name=opt2
 
  name=opt2
  baseurl=http://buildsys.koozali.org/build/7/opt2/x86_64
+
  baseurl=<nowiki>http://buildsys.koozali.org/build/7/opt2/x86_64</nowiki>
 
   
 
   
 
  # Not used
 
  # Not used
 
  [opt3]
 
  [opt3]
 
  name=opt3
 
  name=opt3
  baseurl=http://buildsys.koozali.org/build/7/opt3/x86_64
+
  baseurl=<nowiki>http://buildsys.koozali.org/build/7/opt3/x86_64</nowiki>
 
   
 
   
 
  [epel]
 
  [epel]
 
  name=epel
 
  name=epel
  baseurl=http://download.fedoraproject.org/pub/epel/7/x86_64
+
  baseurl=<nowiki>http://download.fedoraproject.org/pub/epel/7/x86_64</nowiki>
  #baseurl=http://buildsys.koozali.org/build/7/epel/x86_64
+
  #baseurl=<nowiki>http://buildsys.koozali.org/build/7/epel/x86_64</nowiki>
  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-Progressive perl-Bytes-Random-Secure perl-Crypt-Random-TESHA2 perl-Crypt-Random-Seed perl-Math-Random-ISAAC kmodtool libmaxminddb-devel libmaxminddb
+
  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=<nowiki>http://repo.openfusion.net/centos7-x86_64</nowiki>
 +
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
 
   
 
   
#[rpmforge]
  −
#name=rpmforge
  −
#baseurl=http://buildsys.koozali.org/build/7/rpmforge/x86_64
  −
#includepkgs=perl-Taint-Util
  −
 
   
  [rpmfusion]
 
  [rpmfusion]
 
  name=rpmfusion
 
  name=rpmfusion
  baseurl=http://download1.rpmfusion.org/free/el/updates/7/x86_64
+
  baseurl=<nowiki>http://download1.rpmfusion.org/free/el/updates/7/x86_64</nowiki>
  includepkgs=ffmpeg* libva* x264-libs xvidcore librtmp  
+
#mirrorlist=<nowiki>http://mirrors.rpmfusion.org/mirrorlist?repo=free-el-updates-released-7&arch=$basearch</nowiki>
 +
#baseurl=<nowiki>http://ucmirror.canterbury.ac.nz/linux/rpmfusion/free/el/updates/7/x86_64/</nowiki>
 +
  includepkgs=ffmpeg* libva* x264-libs xvidcore librtmp buildsys-build-rpmfusion-kerneldevpkgs-current-* buildsys-build-rpmfusion-* libmpeg2* mpeg2dec
 
   
 
   
 
  [sclo-sclo]
 
  [sclo-sclo]
 
  name=sclo-sclo
 
  name=sclo-sclo
  baseurl=http://mirror.centos.org/centos/7/sclo/x86_64/sclo
+
  baseurl=<nowiki>http://mirror.centos.org/centos/7/sclo/x86_64/sclo</nowiki>
 
  includepkgs=python27*
 
  includepkgs=python27*
 
   
 
   
 
  [sclo-rh]
 
  [sclo-rh]
 
  name=sclo-rh
 
  name=sclo-rh
  baseurl=http://mirror.centos.org/centos/7/sclo/x86_64/rh
+
  baseurl=<nowiki>http://mirror.centos.org/centos/7/sclo/x86_64/rh</nowiki>
  includepkgs=python27* python33* rh-mongodb26* rh-mongodb32* rh-mongodb34* nodejs010* rh-nodejs6*
+
  includepkgs=python27* python33* rh-mongodb26* rh-mongodb32* rh-mongodb34* nodejs010* rh-nodejs6* devtoolset-* devtoolset-9*
 
   
 
   
 
  [buildsys-core]
 
  [buildsys-core]
 
  name=buildsys-core
 
  name=buildsys-core
  baseurl=http://buildsys.koozali.org/build/10/smeserver-core/x86_64
+
  baseurl=<nowiki>http://buildsys.koozali.org/build/10/smeserver-core/x86_64</nowiki>
  includepkgs=bglibs 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
+
  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]
 
  [buildsys-contribs]
 
  name=buildsys-contribs
 
  name=buildsys-contribs
  baseurl=http://buildsys.koozali.org/build/10/smeserver-contribs/x86_64
+
  baseurl=<nowiki>http://buildsys.koozali.org/build/10/smeserver-contribs/x86_64</nowiki>
  includepkgs=libevent2* perl-Ezmlm perl-Crypt-GPG perl-IPC-Run libevhtp* libsearpc* ccnet* libccnet* libzdb* libccnet* evhtp* sqlite* ocaml camlp5 python27-python-versiontools libarchive*
+
  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]
 
  [groups]
 
  name=groups
 
  name=groups
  baseurl=http://buildsys.koozali.org/build/10/smeserver-groups/x86_64
+
  baseurl=<nowiki>http://buildsys.koozali.org/build/10/smeserver-groups/x86_64</nowiki>
 
  """
 
  """
   −
+
 
 +
Then:
    
  #!/bin/sh
 
  #!/bin/sh
Line 134: Line 171:  
   mkdir ~/rpmbuild/$i
 
   mkdir ~/rpmbuild/$i
 
  done
 
  done
 +
 +
==Install / Access CVS==
    
  sudo dnf install cvs
 
  sudo dnf install cvs
Line 168: Line 207:     
and reboot.
 
and reboot.
 +
 +
==GIT==
 +
 +
The git utilities currently developed live in the smedev/smeserver-gitutils repo.
 +
 +
Pull it over as follows:
 +
 +
git clone  https://src.koozali.org/smedev/smeserver-gitutils.git
 +
 +
Then copy the shell scripts to ~/bin or wherever.
 +
 +
mkdir ~/bin
 +
cp smeserver-gitutils/git-*.sh  ~/bin/.
 +
mkdir ~/.smegit
 +
cp smeserver-gitutils/conf ~/.smegit/config
 +
 +
Then edit the ~/.smegit/conf for your own setup.  Make sure that ~/bin is in the $PATH - you can use .bashrc to set this up if necessary.
 +
 +
The gitutils use the change-log and BogusDataBot.sh scripts which are normally installed from smeserver-mock.  Until an EL8 rpm is built, then you need to copy these to ~/bin or /usr/bin from your EL7 or SMEServer system.
 +
 +
They also use the json utilities "jq", and "git-lfs" plugin and "lua" (needed for change-log) so you need:
 +
 +
sudo dnf install jq
 +
sudo dnf install lua
 +
sudo dnf install git-lfs
 +
 +
 +
Git is quite sensitive to the local time, so make sure your timezone is correct: 
 +
 +
timedatectl
 +
timedatectl list_timezones | grep London
 +
timedatectl set-timezone Europe/London
 +
 +
If you want to save your credentials to the gitea server, then do this:
 +
 +
git config --global credential.helper store
 +
 +
Then next time you need to access the repo to push and it asks for your credentials it will save them. 
 +
This saves them apparently in plain to a restricted file called ".git-credentials" somewhere, however I've not found it yet!
 +
 +
===Using the git utilities===
 +
 +
Say you want to move a package from CVS to the GIT system. Here are the instructions:
 +
 +
* git-cvs2git.sh packagename organisation  #Bring it across from CVS, create an equivalent git repo
 +
* git-get-repo-and-build.sh packagename organisation #Prime it down from the gitr repo and "make mockbuild" on it.
 +
* git-make-release.sh packagename organisation tagname releasetype #Create the release as part of the repo and copy the rpms to it as attachments.
 +
 +
releasetypes are draft, prerelease or release. Note that a draft release is not visible unless you are logged in with write access to the repo.
 +
 +
=== Mockbuilding direct from the git repos ===
 +
 +
First create some sort of directory structure to hold the repo contents - this is what I use:<syntaxhighlight lang="shell">
 +
cd ~
 +
mkdir -p GITFiles
 +
cd GITFiles
 +
mkdir -p {smedev,smecontribs,smeserver}
 +
 +
</syntaxhighlight>and add in the common directory which provides an environment for the mockbuild .<syntaxhighlight lang="shell">
 +
cd smecontribs
 +
git clone https://src.koozali.org/smedev/common.git
 +
cd smeserver
 +
git clone https://src.koozali.org/smedev/common.git
 +
</syntaxhighlight>we then can add in the repo we want to work on (you get the git clone link by browsing to [https://src.koozali.org/smecontribs/smeserver-mailstats https://src.koozali.org] and then (e.g.) https://src.koozali.org/smecontribs/smeserver-mailstats, or you can "guess" the URL!<syntaxhighlight lang="shell">
 +
cd ~/GITFiles/smecontribs
 +
git clone https://src.koozali.org/smecontribs/smeserver-mailstats
 +
</syntaxhighlight>Then to mockbuild it  locally you can:<syntaxhighlight>
 +
cd ~/smecontribs/smeserver-mailstats
 +
make mockbuild
 +
</syntaxhighlight>after a lot of on screen messages you should finally see a positive outcome message.
 +
 +
If you want to pull down a complete set of repos for (e.g.) the core system, then by using one of the git-utils you can do this:<syntaxhighlight lang="shell">
 +
cd ~/GITFiles/smeserver
 +
git-list-all-org-repos.sh smeserver | xargs -I % sh -c 'git clone https://src.koozali.org/smeserver/%'
 +
</syntaxhighlight>
 +
 +
==Submitting jobs to the build system==
    
Need also to copy over from current build system ~/.plague-client.cfg .rpmmacros .cvspass (although this one is empty?)
 
Need also to copy over from current build system ~/.plague-client.cfg .rpmmacros .cvspass (although this one is empty?)
  −
AND smeserver-10-x86_64-base.cfg from (and to) /etc/mock as the one downloaded above seems to be not complete for sme10.
      
make mockbuild runs ok.
 
make mockbuild runs ok.
Line 184: Line 298:  
Need python2
 
Need python2
 
   sudo dnf install python2
 
   sudo dnf install python2
 +
Unfortunately it seems that the plague client needs things that Rocky is unable to provide (or at least I can't sort out!!). The perceived wisdom is to wait for the move from CVS to git which is expected for SME11. (Aug 2023) Apparently Jean-Paul has built a Plague-client for EL8 now - but I've not tried it!
 +
 +
[[Category:Developer]]

Navigation menu