Hello, Here is a patch to fix the mockchain command.
It adds createrepo as a dependency. It also adds python3-requests which is also missing. Lastly it contains a patch that switches from createrepo_c to createrepo in mockchain. Regards, Pierre-Francois Carpentier
diff --git a/mock/debian/changelog b/mock/debian/changelog index 403e758..806c175 100644 --- a/mock/debian/changelog +++ b/mock/debian/changelog @@ -1,3 +1,10 @@ +mock (1.3.2-3) unstable; urgency=medium + + * Use createrepo instead of createrepo_c in mockchain (Closes: #875701) + * Depend on python3-requests and createrepo (necessary for mockchain) + + -- Pierre-Francois Carpentier <[email protected]> Mon, 03 Dec 2018 17:12:33 +0100 + mock (1.3.2-2) unstable; urgency=medium * Fix debian/watch for github (Closes: #762885) diff --git a/mock/debian/control b/mock/debian/control index de9aee2..db809e8 100644 --- a/mock/debian/control +++ b/mock/debian/control @@ -17,7 +17,7 @@ Vcs-Browser: https://anonscm.debian.org/cgit/collab-maint/mock.git Package: mock Architecture: all Depends: python, ${misc:Depends}, ${python3:Depends}, - python3-rpm, yum (>> 3.2.26), usermode, yum-utils, python3-six + python3-rpm, yum (>> 3.2.26), usermode, yum-utils, python3-six, createrepo, python3-requests Suggests: pigz Description: Build rpm packages inside a chroot Mock creates chroots and builds rpms in them. Its only task is to diff --git a/mock/debian/patches/series b/mock/debian/patches/series index 1a0edfd..d6825c0 100644 --- a/mock/debian/patches/series +++ b/mock/debian/patches/series @@ -1,6 +1,7 @@ fedora25_key.patch pam_debian.patch remove_home_rpmdb.patch +switch_to_createrepo.patch spelling.patch make_all.patch python3.patch diff --git a/mock/debian/patches/switch_to_createrepo.patch b/mock/debian/patches/switch_to_createrepo.patch new file mode 100644 index 0000000..e6ba960 --- /dev/null +++ b/mock/debian/patches/switch_to_createrepo.patch @@ -0,0 +1,42 @@ +diff --git a/etc/mock/site-defaults.cfg b/etc/mock/site-defaults.cfg +index 8c2c6f6..8b6533c 100644 +--- a/etc/mock/site-defaults.cfg ++++ b/etc/mock/site-defaults.cfg +@@ -89,7 +89,7 @@ + # if you want mock to automatically run createrepo on the rpms in your + # resultdir. + # config_opts['createrepo_on_rpms'] = False +-# config_opts['createrepo_command'] = '/usr/bin/createrepo_c -d -q -x *.src.rpm' ++# config_opts['createrepo_command'] = '/usr/bin/createrepo -d -q -x *.src.rpm' + + # if you want mock to backup the contents of a result dir before clean + # config_opts['backup_on_clean'] = False +diff --git a/py/mockbuild/util.py b/py/mockbuild/util.py +index 8e87a28..67af517 100644 +--- a/py/mockbuild/util.py ++++ b/py/mockbuild/util.py +@@ -743,7 +743,7 @@ def setup_default_config_opts(unprivUid, version, pkgpythondir): + '.bashrc'] + + config_opts['createrepo_on_rpms'] = False +- config_opts['createrepo_command'] = '/usr/bin/createrepo_c -d -q -x *.src.rpm' # default command ++ config_opts['createrepo_command'] = '/usr/bin/createrepo -d -q -x *.src.rpm' # default command + + config_opts['backup_on_clean'] = False + config_opts['backup_base_dir'] = os.path.join(config_opts['basedir'], "backup") +diff --git a/py/mockchain.py b/py/mockchain.py +index 9c9deb6..0aed37e 100755 +--- a/py/mockchain.py ++++ b/py/mockchain.py +@@ -56,9 +56,9 @@ mockconfig_path = '/etc/mock' + + def createrepo(path): + if os.path.exists(path + '/repodata/repomd.xml'): +- comm = ['/usr/bin/createrepo_c', '--update', path] ++ comm = ['/usr/bin/createrepo', '--update', path] + else: +- comm = ['/usr/bin/createrepo_c', path] ++ comm = ['/usr/bin/createrepo', path] + cmd = subprocess.Popen( + comm, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + out, err = cmd.communicate()

