diff -Nru debomatic-0.23+git20180514/ChangeLog debomatic-0.24/ChangeLog --- debomatic-0.23+git20180514/ChangeLog 2018-05-14 21:09:21.000000000 +0000 +++ debomatic-0.24/ChangeLog 2018-11-04 14:19:06.000000000 +0000 @@ -1,3 +1,6 @@ +0.24 "novemberrain" (2018-11-04) +* Several bugfixes + 0.23 "Mogendorf" (2018-05-01) * Private repositories * Periodic trigger of modules diff -Nru debomatic-0.23+git20180514/debian/changelog debomatic-0.24/debian/changelog --- debomatic-0.23+git20180514/debian/changelog 2018-05-27 09:00:22.000000000 +0000 +++ debomatic-0.24/debian/changelog 2018-11-04 15:00:55.000000000 +0000 @@ -1,3 +1,13 @@ +debomatic (0.24-1) unstable; urgency=medium + + * New upstream release. + * debian/patches/sbin.patch: + - Refresh for new upstream release. + * debian/control: + - Compliant with Debian Policy 4.2.1. + + -- Luca Falavigna Sun, 04 Nov 2018 16:00:55 +0100 + debomatic (0.23+git20180514-1) unstable; urgency=medium [ Luca Falavigna ] diff -Nru debomatic-0.23+git20180514/debian/control debomatic-0.24/debian/control --- debomatic-0.23+git20180514/debian/control 2018-05-27 08:58:57.000000000 +0000 +++ debomatic-0.24/debian/control 2018-11-04 15:00:55.000000000 +0000 @@ -13,7 +13,7 @@ texlive-fonts-recommended, texlive-latex-extra, texlive-plain-generic -Standards-Version: 4.1.4 +Standards-Version: 4.2.1 Homepage: https://debomatic.github.io Vcs-Git: https://salsa.debian.org/python-team/applications/debomatic.git Vcs-Browser: https://salsa.debian.org/python-team/applications/debomatic diff -Nru debomatic-0.23+git20180514/debian/patches/sbin.patch debomatic-0.24/debian/patches/sbin.patch --- debomatic-0.23+git20180514/debian/patches/sbin.patch 2018-05-27 08:58:57.000000000 +0000 +++ debomatic-0.24/debian/patches/sbin.patch 2018-11-04 15:00:55.000000000 +0000 @@ -28,7 +28,7 @@ =================================================================== --- debomatic-0.13~git20140911.orig/lib/systemd/system/debomatic.service +++ debomatic-0.13~git20140911/lib/systemd/system/debomatic.service -@@ -4,8 +4,8 @@ ConditionPathExists=/etc/debomatic/debom +@@ -5,8 +5,8 @@ ConditionPathExists=/etc/debomatic/debom [Service] Type=notify diff -Nru debomatic-0.23+git20180514/Debomatic/build.py debomatic-0.24/Debomatic/build.py --- debomatic-0.23+git20180514/Debomatic/build.py 2018-05-14 21:09:21.000000000 +0000 +++ debomatic-0.24/Debomatic/build.py 2018-11-04 14:19:06.000000000 +0000 @@ -168,6 +168,8 @@ if self.hostarchitecture: command.pop(5) command.insert(5, '--host=%s' % self.hostarchitecture) + command.insert(6, '--add-depends=libc6-dev:%s' % + self.hostarchitecture) suite = dom.dists.get(self.distribution, 'suite') if self.distribution != suite: command.insert(-1, '--build-dep-resolver=aspcud') @@ -202,6 +204,7 @@ if self.binnmu: command.insert(-1, '--binNMU=%s' % self.binnmu[0]) command.insert(-1, '--make-binNMU=%s' % self.binnmu[1]) + command.insert(-1, '--no-arch-all') buildlog = '%s+b%s_%s.build' % (packageversion, self.binnmu[0], architecture) else: diff -Nru debomatic-0.23+git20180514/Debomatic/configuration.py debomatic-0.24/Debomatic/configuration.py --- debomatic-0.23+git20180514/Debomatic/configuration.py 2018-05-14 21:09:21.000000000 +0000 +++ debomatic-0.24/Debomatic/configuration.py 2018-11-04 14:19:06.000000000 +0000 @@ -39,6 +39,7 @@ 'dpr': {'dpr': bool, 'prefix': str, 'repository': str}} modules = {'autopkgtest': {'options': str}, 'blhc': {'options': str}, + 'buildcleaner': {'testbuild': bool}, 'lintian': {'options': str}, 'mailer': {'sender': str, 'server': str, 'port': int, 'tls': bool, 'authrequired': bool, 'user': str, 'passwd': str, diff -Nru debomatic-0.23+git20180514/Debomatic/modules.py debomatic-0.24/Debomatic/modules.py --- debomatic-0.23+git20180514/Debomatic/modules.py 2018-05-14 21:09:21.000000000 +0000 +++ debomatic-0.24/Debomatic/modules.py 2018-11-04 14:19:06.000000000 +0000 @@ -56,12 +56,15 @@ self._use_modules = True if dom.opts.has_option('modules', 'path'): mod_path = dom.opts.get('modules', 'path') - path.append(mod_path) + for p in mod_path.split(':'): + path.append(p) else: self._use_modules = False + modules = set() try: - modules = set([os.path.splitext(os.path.basename(m))[0] for m in - glob(os.path.join(mod_path, '*.py'))]) + for p in mod_path.split(':'): + modules |= set([os.path.splitext(os.path.basename(m))[0] for m in + glob(os.path.join(p, '*.py'))]) except OSError: self._use_modules = False if not modules: diff -Nru debomatic-0.23+git20180514/docs/configuration.rst debomatic-0.24/docs/configuration.rst --- debomatic-0.23+git20180514/docs/configuration.rst 2018-05-14 21:09:21.000000000 +0000 +++ debomatic-0.24/docs/configuration.rst 2018-11-04 14:19:06.000000000 +0000 @@ -301,6 +301,7 @@ * ``path`` This option indicates the directory where Deb-o-Matic expects to find modules. + Multiple directories can be listed, separated with a colon (``:``). Suggested value: ``/usr/share/debomatic/modules`` diff -Nru debomatic-0.23+git20180514/docs/conf.py debomatic-0.24/docs/conf.py --- debomatic-0.23+git20180514/docs/conf.py 2018-05-14 21:09:21.000000000 +0000 +++ debomatic-0.24/docs/conf.py 2018-11-04 14:19:06.000000000 +0000 @@ -26,8 +26,8 @@ master_doc = 'index' project = 'Deb-o-Matic' copyright = '2007-2018, Luca Falavigna' -version = '0.23' -release = '0.23' +version = '0.24' +release = '0.24' exclude_patterns = ['_build'] pygments_style = 'sphinx' html_theme = 'default' diff -Nru debomatic-0.23+git20180514/docs/modules.rst debomatic-0.24/docs/modules.rst --- debomatic-0.23+git20180514/docs/modules.rst 2018-05-14 21:09:21.000000000 +0000 +++ debomatic-0.24/docs/modules.rst 2018-11-04 14:19:06.000000000 +0000 @@ -31,7 +31,7 @@ In order for this module to work properly, ``blhc`` package must be installed. Parameters ----------- +.......... .. CAUTION:: @@ -44,6 +44,43 @@ Suggested value: ``--all`` +BuildCleaner +------------ + +This modules deletes obsolete files created during previous builds to avoid +picking obsolete files by mistake. It currently deletes these files: + +* \*.deb +* \*.udeb +* \*.ddeb +* \*.gz +* \*.bz2 +* \*.xz +* \*.dsc +* \*.build +* \*.contents +* \*.lintian +* \*.piuparts +* \*.changes +* \*.autopkgtest +* \*.bhlc + +Parameters +.......... + +.. CAUTION:: + + These parameters must be listed under the ``buildcleaner`` section. + Make sure you create it in your configuration file. + +* ``testbuild`` + +This option indicates whether to remove binary packages immediately after +build has completed. Useful for test builds, where it is not important to +keeo binaries for a long period of time. + + Suggested value: ``False`` + Contents -------- @@ -170,26 +207,6 @@ Suggested value: ``--log-level=info`` -PrevBuildCleaner ----------------- - -This modules deletes obsolete files created during previous builds to avoid -picking obsolete files by mistake. It currently deletes these files: - -* \*.deb -* \*.ddeb -* \*.gz -* \*.bz2 -* \*.xz -* \*.dsc -* \*.build -* \*.contents -* \*.lintian -* \*.piuparts -* \*.changes -* \*.autopkgtest -* \*.bhlc - RemoveChroots ------------- diff -Nru debomatic-0.23+git20180514/etc/debomatic/debomatic.conf debomatic-0.24/etc/debomatic/debomatic.conf --- debomatic-0.23+git20180514/etc/debomatic/debomatic.conf 2018-05-14 21:09:21.000000000 +0000 +++ debomatic-0.24/etc/debomatic/debomatic.conf 2018-11-04 14:19:06.000000000 +0000 @@ -46,6 +46,9 @@ [blhc] options: --all +[buildcleaner] +testbuild: False + [lintian] options: -i -I -E --pedantic diff -Nru debomatic-0.23+git20180514/etc/debomatic/distributions debomatic-0.24/etc/debomatic/distributions --- debomatic-0.23+git20180514/etc/debomatic/distributions 2018-05-14 21:09:21.000000000 +0000 +++ debomatic-0.24/etc/debomatic/distributions 2018-11-04 14:19:06.000000000 +0000 @@ -49,6 +49,14 @@ # Ubuntu +[disco] +suite: disco +mirror: http://archive.ubuntu.com/ubuntu +components: main restricted universe multiverse +extramirrors: deb http://archive.ubuntu.com/ubuntu/ disco-updates main restricted universe multiverse + deb http://security.ubuntu.com/ubuntu disco-security main restricted universe multiverse +extrapackages: pkgbinarymangler + [cosmic] suite: cosmic mirror: http://archive.ubuntu.com/ubuntu @@ -65,14 +73,6 @@ deb http://security.ubuntu.com/ubuntu bionic-security main restricted universe multiverse extrapackages: pkgbinarymangler -[artful] -suite: artful -mirror: http://archive.ubuntu.com/ubuntu -components: main restricted universe multiverse -extramirrors: deb http://archive.ubuntu.com/ubuntu/ artful-updates main restricted universe multiverse - deb http://security.ubuntu.com/ubuntu artful-security main restricted universe multiverse -extrapackages: pkgbinarymangler - [xenial] suite: xenial mirror: http://archive.ubuntu.com/ubuntu diff -Nru debomatic-0.23+git20180514/modules/BuildCleaner.py debomatic-0.24/modules/BuildCleaner.py --- debomatic-0.23+git20180514/modules/BuildCleaner.py 2018-05-14 21:09:21.000000000 +0000 +++ debomatic-0.24/modules/BuildCleaner.py 2018-11-04 14:19:06.000000000 +0000 @@ -1,6 +1,7 @@ # Deb-o-Matic - Package build path cleaner # # Copyright (C) 2009 Alessio Treglia +# Copyright (C) 2009-2018 Luca Falavigna # # Authors: Alessio Treglia # @@ -24,11 +25,18 @@ class DebomaticModule_BuildCleaner: + def __init__(self): + self.after = ['Lintian', 'Piuparts'] + self.before = ['Repository'] + def pre_build(self, args): + if args.opts.has_section('buildcleaner'): + if args.opts.getboolean('buildcleaner', 'testbuild'): + return exts_to_clean = ['.deb', '.ddeb', '.gz', '.bz2', '.xz', '.dsc', '.changes', '.build', '.buildlog', '.buildinfo', '.contents', '.lintian', '.piuparts', '.blhc', - '.autopkgtest'] + '.autopkgtest', '.udeb'] pkg_build_path = ('%(directory)s/pool/%(package)s' % {'directory': args.directory, 'package': args.package}) @@ -36,3 +44,16 @@ name, ext = os.path.splitext(filename) if ext in exts_to_clean: os.remove(os.path.join(pkg_build_path, filename)) + + def post_build(self, args): + exts_to_clean = ['.deb', '.ddeb', '.udeb', '.changes', + '.gz', '.bz2', '.xz', '.dsc'] + pkg_build_path = ('%(directory)s/pool/%(package)s' % + {'directory': args.directory, + 'package': args.package}) + if args.opts.has_section('buildcleaner'): + if args.opts.getboolean('buildcleaner', 'testbuild'): + for filename in os.listdir(pkg_build_path): + name, ext = os.path.splitext(filename) + if ext in exts_to_clean: + os.remove(os.path.join(pkg_build_path, filename)) diff -Nru debomatic-0.23+git20180514/modules/Repository.py debomatic-0.24/modules/Repository.py --- debomatic-0.23+git20180514/modules/Repository.py 2018-05-14 21:09:21.000000000 +0000 +++ debomatic-0.24/modules/Repository.py 2018-11-04 14:19:06.000000000 +0000 @@ -77,10 +77,6 @@ if not os.access(self.gpg, os.X_OK): return distribution = os.path.basename(args.directory) - if args.hostarchitecture: - arch = args.hostarchitecture - else: - arch = args.architecture archive = args.directory pool = os.path.join(archive, 'pool') distslink = os.path.join(archive, 'dists', distribution) @@ -90,43 +86,44 @@ tmpdir = mkdtemp(prefix='.', dir=os.path.join(archive, 'dists')) os.symlink(tmpdir, distslink) dists = mkdtemp(prefix='.', dir=os.path.join(archive, 'dists')) - packages = os.path.join(dists, 'main', 'binary-%s' % arch) - packages_file = os.path.join(packages, 'Packages') - arch_release_file = os.path.join(packages, 'Release') - release_file = os.path.join(dists, 'Release') - release_gpg = os.path.join(dists, 'Release.gpg') - inrelease_gpg = os.path.join(dists, 'InRelease') - for dir in (pool, packages): - if not os.path.isdir(dir): - os.makedirs(dir) - with self.Lock(distribution, arch) as lock: - if lock.skip(): - rmtree(dists) - else: - with open(packages_file, 'w') as fd: - Popen([self.af, 'packages', 'pool'], - stdout=fd, stderr=PIPE, cwd=archive).wait() - with open(arch_release_file, 'w') as fd: - fd.write('Origin: Deb-O-Matic\n') - fd.write('Label: Deb-O-Matic\n') - fd.write('Archive: %s\n' % distribution) - fd.write('Component: main\n') - fd.write('Architecture: %s\n' % arch) - with open(release_file, 'w') as fd: - afstring = 'APT::FTPArchive::Release::' - Popen([self.af, '-qq', - '-o', '%sOrigin=Deb-o-Matic' % afstring, - '-o', '%sLabel=Deb-o-Matic' % afstring, - '-o', '%sSuite=%s' % (afstring, distribution), - '-o', '%sArchitectures=%s' % (afstring, arch), - '-o', '%sComponents=main' % afstring, - 'release', 'dists/%s' % os.path.basename(dists)], - stdout=fd, stderr=PIPE, cwd=archive).wait() - with open(release_file, 'r+') as fd: - data = fd.read() - fd.seek(0) - fd.write(data.replace('MD5Sum', - 'NotAutomatic: yes\nMD5Sum')) + for arch in [a for a in (args.architecture, + args.hostarchitecture) if a is not None]: + packages = os.path.join(dists, 'main', 'binary-%s' % arch) + packages_file = os.path.join(packages, 'Packages') + arch_release_file = os.path.join(packages, 'Release') + release_file = os.path.join(dists, 'Release') + release_gpg = os.path.join(dists, 'Release.gpg') + inrelease_gpg = os.path.join(dists, 'InRelease') + for dir in (pool, packages): + if not os.path.isdir(dir): + os.makedirs(dir) + with self.Lock(distribution, arch) as lock: + if not lock.skip(): + with open(packages_file, 'w') as fd: + Popen([self.af, '-a', arch, 'packages', 'pool'], + stdout=fd, stderr=PIPE, cwd=archive).wait() + with open(arch_release_file, 'w') as fd: + fd.write('Origin: Deb-O-Matic\n') + fd.write('Label: Deb-O-Matic\n') + fd.write('Archive: %s\n' % distribution) + fd.write('Component: main\n') + fd.write('Architecture: %s\n' % arch) + with open(release_file, 'w') as fd: + afstring = 'APT::FTPArchive::Release::' + Popen([self.af, '-qq', + '-o', '%sOrigin=Deb-o-Matic' % afstring, + '-o', '%sLabel=Deb-o-Matic' % afstring, + '-o', '%sSuite=%s' % (afstring, distribution), + '-o', '%sArchitectures=%s' % (afstring, arch), + '-o', '%sComponents=main' % afstring, + 'release', + 'dists/%s' % os.path.basename(dists)], + stdout=fd, stderr=PIPE, cwd=archive).wait() + with open(release_file, 'r+') as fd: + data = fd.read() + fd.seek(0) + fd.write(data.replace('MD5Sum', + 'NotAutomatic: yes\nMD5Sum')) with open(release_gpg, 'w') as fd: Popen([self.gpg, '--no-default-keyring', '--keyring', pubring, '-u', gpgkey, '--yes', '-a', '-o', fd.name, @@ -135,13 +132,16 @@ Popen([self.gpg, '--no-default-keyring', '--keyring', pubring, '-u', gpgkey, '--yes', '-a', '-o', fd.name, '--clearsign', release_file], cwd=archive).wait() - olddists = os.readlink(distslink) - (tmp, tmplink) = mkstemp(prefix='.', - dir=os.path.dirname(olddists)) - os.close(tmp) - os.unlink(tmplink) - os.symlink(dists, tmplink) - os.chmod(dists, S_IRWXU | S_IRGRP | S_IXGRP | - S_IROTH | S_IXOTH) - os.rename(tmplink, distslink) - rmtree(olddists) + olddists = os.readlink(distslink) + (tmp, tmplink) = mkstemp(prefix='.', + dir=os.path.dirname(olddists)) + os.close(tmp) + os.unlink(tmplink) + os.symlink(dists, tmplink) + os.chmod(dists, S_IRWXU | S_IRGRP | S_IXGRP | + S_IROTH | S_IXOTH) + os.rename(tmplink, distslink) + try: + rmtree(olddists) + except FileNotFoundError: + pass diff -Nru debomatic-0.23+git20180514/setup.py debomatic-0.24/setup.py --- debomatic-0.23+git20180514/setup.py 2018-05-14 21:09:21.000000000 +0000 +++ debomatic-0.24/setup.py 2018-11-04 14:19:06.000000000 +0000 @@ -68,7 +68,7 @@ setup(name='debomatic', - version='0.23', + version='0.24', author='Luca Falavigna', author_email='dktrkranz@debian.org', description='Automatic build machine for Debian source packages',