Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package product-composer for openSUSE:Factory checked in at 2024-07-08 19:09:06 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/product-composer (Old) and /work/SRC/openSUSE:Factory/.product-composer.new.2080 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "product-composer" Mon Jul 8 19:09:06 2024 rev:14 rq:1186131 version:0.4.12 Changes: -------- --- /work/SRC/openSUSE:Factory/product-composer/product-composer.changes 2024-05-24 19:53:57.739702202 +0200 +++ /work/SRC/openSUSE:Factory/.product-composer.new.2080/product-composer.changes 2024-07-08 19:09:30.521479536 +0200 @@ -1,0 +2,29 @@ +Mon Jul 8 09:37:08 UTC 2024 - Adrian Schröter <adr...@suse.de> + +- update to version 0.4.12 + * fixed susedata generation (only a single language translation was generated) + * Added option to include all available packages + +------------------------------------------------------------------- +Wed Jun 26 11:55:22 UTC 2024 - Adrian Schröter <adr...@suse.de> + +- update to version 0.4.11 + * canonized filenames (get rid of ::import prefixes) + +------------------------------------------------------------------- +Wed Jun 26 10:36:50 UTC 2024 - Adrian Schröter <adr...@suse.de> + +- update to version 0.4.10 + * support building on 15.6, using python311 stack (added sle-15-defaults.patch) + * changing createrepo defaults for SLE 15 only + * crash fix on incomplete generated groups by pkglistgen + +------------------------------------------------------------------- +Wed Jun 26 07:57:25 UTC 2024 - Adrian Schröter <adr...@suse.de> + +- update to version 0.4.9 + * Introduce "extension" product-type as alias for "module" + Technical the same, but handled different in user accounting + * fix for building without debug or source media + +------------------------------------------------------------------- @@ -107 +136 @@ -- Set service to manaul run: server side execution not permitted in +- Set service to manual run: server side execution not permitted in Old: ---- product-composer-0.4.8.obscpio New: ---- product-composer-0.4.12.obscpio sle-15-defaults.patch BETA DEBUG BEGIN: New:- update to version 0.4.10 * support building on 15.6, using python311 stack (added sle-15-defaults.patch) * changing createrepo defaults for SLE 15 only BETA DEBUG END: ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ product-composer.spec ++++++ --- /var/tmp/diff_new_pack.yhNKUG/_old 2024-07-08 19:09:31.001497091 +0200 +++ /var/tmp/diff_new_pack.yhNKUG/_new 2024-07-08 19:09:31.005497238 +0200 @@ -16,26 +16,34 @@ # +%if "%{?sle_version}" == "150600" +%define used_python python311 +%else +%define used_python python3 +%endif + Name: product-composer -Version: 0.4.8 +Version: 0.4.12 Release: 0 Summary: Product Composer License: GPL-2.0-or-later Group: Development/Tools/Building URL: https://github.com/openSUSE/product-composer Source: %name-%{version}.tar.xz -BuildRequires: python3-pip -BuildRequires: python3-poetry-core -BuildRequires: python3-setuptools -BuildRequires: python3-wheel -Requires: python3-PyYAML -Requires: python3-pydantic -Requires: python3-rpm -Requires: python3-zstandard +# Should become a build option +Patch1: sle-15-defaults.patch +BuildRequires: %{used_python}-pip +BuildRequires: %{used_python}-poetry-core +BuildRequires: %{used_python}-setuptools +BuildRequires: %{used_python}-wheel +Requires: %{used_python}-PyYAML +Requires: %{used_python}-pydantic +Requires: %{used_python}-rpm +Requires: %{used_python}-zstandard # build for signdummy Requires: build Requires: checkmedia -Requires: createrepo +Requires: createrepo_c Requires: inst-source-utils Requires: mkisofs BuildArch: noarch @@ -46,17 +54,32 @@ likely to break with productcompose file syntax changes. %prep -%autosetup -n %name-%version -p1 +%setup -q -n %name-%version +%if "%{?sle_version}" == "150600" +%patch -P 1 -p1 +%endif %build +%if "%{?sle_version}" == "150600" +%python311_pyproject_wheel +%else %python3_pyproject_wheel +%endif %install +%if "%{?sle_version}" == "150600" +%python311_pyproject_install +%else %python3_pyproject_install +%endif mv %buildroot/usr/bin/productcomposer %buildroot%_bindir/product-composer %files %doc README.rst docs examples %_bindir/product-composer +%if "%{?sle_version}" == "150600" +%{python311_sitelib}/* +%else %{python3_sitelib}/* +%endif ++++++ _service ++++++ --- /var/tmp/diff_new_pack.yhNKUG/_old 2024-07-08 19:09:31.033498261 +0200 +++ /var/tmp/diff_new_pack.yhNKUG/_new 2024-07-08 19:09:31.033498261 +0200 @@ -2,8 +2,8 @@ <service name="obs_scm" mode="manual"> <param name="url">https://github.com/openSUSE/product-composer</param> <param name="scm">git</param> - <param name="version">0.4.8</param> - <param name="revision">0.4.8</param> + <param name="revision">0.4.12</param> + <param name="version">0.4.12</param> </service> <service name="set_version" mode="manual" /> <service name="tar" mode="buildtime" /> ++++++ product-composer-0.4.8.obscpio -> product-composer-0.4.12.obscpio ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/product-composer-0.4.8/docs/build_description.adoc new/product-composer-0.4.12/docs/build_description.adoc --- old/product-composer-0.4.8/docs/build_description.adoc 2024-05-24 15:52:19.000000000 +0200 +++ new/product-composer-0.4.12/docs/build_description.adoc 2024-07-08 11:33:08.000000000 +0200 @@ -59,6 +59,44 @@ The packageset requires at least a packages definition, but may optionaly also a name, flavors or architectures. +==== name + +Defines the name of the package set. 'main' is the default +name. + +==== architecture + +Lists the architectures where the set is to be used. The +default is for all architectures. + +==== flavor + +Lists the flavors where the set is to be used. The +default is for all flavors. + +==== add + +Can be used to add further packagesets by specifing +their names. + +A special packageset called '__all__' will add all +package names local available. + +==== sub + +Can be used to remove packages from the specified +packageset names. + +==== intersect + +Can be used to filter packages with specified package +set lists. + +==== packages + +Lists all package names to be added. This is just the rpm +name, not the file name. + === Details ==== name @@ -79,6 +117,8 @@ Either 'base' for operation systems or 'module' for any product depending on any existing installation. +'extension' is handled as alias for 'module'. + ==== architectures An array of the master architectures to be put into the repository. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/product-composer-0.4.8/src/productcomposer/cli.py new/product-composer-0.4.12/src/productcomposer/cli.py --- old/product-composer-0.4.8/src/productcomposer/cli.py 2024-05-24 15:52:19.000000000 +0200 +++ new/product-composer-0.4.12/src/productcomposer/cli.py 2024-07-08 11:33:08.000000000 +0200 @@ -235,6 +235,7 @@ os.mkdir(maindir) workdirectories = [ maindir ] + debugdir = sourcedir = None if "source" in yml: if yml['source'] == 'split': sourcedir = outdir + '/' + product_base_dir + '-Source' @@ -603,11 +604,13 @@ susedata.set('xmlns', 'http://linux.duke.edu/metadata/susedata') susedata.set('packages', str(susedatas_count[lang])) ET.indent(susedata, space=" ", level=0) - susedata_fn = rpmdir + (f'/susedata.{lang}.xml' if lang else '/susedata.xml') + mdtype = (f'susedata.{lang}' if lang else 'susedata') + susedata_fn = f'{rpmdir}/{mdtype}.xml' with open(susedata_fn, 'x') as sd_file: sd_file.write(ET.tostring(susedata, encoding=ET_ENCODING)) mr = ModifyrepoWrapper( file=susedata_fn, + mdtype=mdtype, directory=os.path.join(rpmdir, "repodata"), ) mr.run_cmd() @@ -624,7 +627,7 @@ # build the union of the package sets for all requested architectures main_pkgset = PkgSet('main') for arch in yml['architectures']: - pkgset = main_pkgset.add(create_package_set(yml, arch, flavor, 'main')) + pkgset = main_pkgset.add(create_package_set(yml, arch, flavor, 'main', pool=pool)) main_pkgset_names = main_pkgset.names() uitemp = None @@ -736,7 +739,7 @@ if 'product-type' in yml: if yml['product-type'] == 'base': product_type = '/o' - elif yml['product-type'] == 'module': + elif yml['product-type'] in ['module', 'extension']: product_type = '/a' else: die('Undefined product-type') @@ -802,7 +805,14 @@ return pkgset -def create_package_set(yml, arch, flavor, setname): +def create_package_set_all(setname, pool, arch): + if pool is None: + die('need a package pool to create the __all__ package set') + pkgset = PkgSet(setname) + pkgset.add_specs(pool.names(arch)) + return pkgset + +def create_package_set(yml, arch, flavor, setname, pool=None): if 'packagesets' not in yml: pkgset = create_package_set_compat(yml, arch, flavor, setname) if pkgset is None: @@ -816,7 +826,9 @@ die(f'package set {name} is already defined') pkgsets[name] = None if 'flavors' in entry: - if flavor is None or flavor not in entry['flavors']: + if flavor is None or entry['flavors'] is None: + continue + if flavor not in entry['flavors']: continue if 'architectures' in entry: if arch not in entry['architectures']: @@ -831,6 +843,8 @@ if setop not in entry: continue for oname in entry[setop]: + if oname == '__all__' and oname not in pkgsets: + pkgsets[oname] = create_package_set_all(oname, pool, arch) if oname == name or oname not in pkgsets: die(f'package set {oname} does not exist') if pkgsets[oname] is None: @@ -859,7 +873,7 @@ if 'add_slsa_provenance' in yml['build_options']: add_slsa = True - main_pkgset = create_package_set(yml, arch, flavor, 'main') + main_pkgset = create_package_set(yml, arch, flavor, 'main', pool=pool) missing_package = None for sel in main_pkgset: @@ -909,28 +923,32 @@ die('Abort due to missing packages') -def link_file_into_dir(filename, directory): +def link_file_into_dir(source, directory, name=None): if not os.path.exists(directory): os.mkdir(directory) - outname = directory + '/' + os.path.basename(filename) + if name is None: + name = os.path.basename(source) + outname = directory + '/' + name if not os.path.exists(outname): - if os.path.islink(filename): + if os.path.islink(source): # osc creates a repos/ structure with symlinks to it's cache # but these would point outside of our media - shutil.copyfile(filename, outname) + shutil.copyfile(source, outname) else: - os.link(filename, outname) + os.link(source, outname) def link_entry_into_dir(entry, directory, add_slsa=False): - outname = directory + '/' + entry.arch + '/' + os.path.basename(entry.location) + canonfilename = entry.canonfilename + outname = directory + '/' + entry.arch + '/' + canonfilename if not os.path.exists(outname): - link_file_into_dir(entry.location, directory + '/' + entry.arch) + link_file_into_dir(entry.location, directory + '/' + entry.arch, name=canonfilename) add_entry_to_report(entry, outname) if add_slsa: - slsaname = entry.location.removesuffix('.rpm') + '.slsa_provenance.json' - if os.path.exists(slsaname): - link_file_into_dir(slsaname, directory + '/' + entry.arch) + slsalocation = entry.location.removesuffix('.rpm') + '.slsa_provenance.json' + if os.path.exists(slsalocation): + slsaname = canonfilename.removesuffix('.rpm') + '.slsa_provenance.json' + link_file_into_dir(slsalocation, directory + '/' + entry.arch, name=slsaname) def add_entry_to_report(entry, outname): # first one wins, see link_file_into_dir diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/product-composer-0.4.8/src/productcomposer/core/Package.py new/product-composer-0.4.12/src/productcomposer/core/Package.py --- old/product-composer-0.4.8/src/productcomposer/core/Package.py 2024-05-24 15:52:19.000000000 +0200 +++ new/product-composer-0.4.12/src/productcomposer/core/Package.py 2024-07-08 11:33:08.000000000 +0200 @@ -46,6 +46,10 @@ return f"{self.name}-{self.evr}.{self.arch}" @property + def canonfilename(self): + return f"{self.name}-{self.version}-{self.release}.{self.arch}.rpm" + + @property def provides(self): h = self._read_rpm_header() if h is None: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/product-composer-0.4.8/src/productcomposer/core/Pool.py new/product-composer-0.4.12/src/productcomposer/core/Pool.py --- old/product-composer-0.4.8/src/productcomposer/core/Pool.py 2024-05-24 15:52:19.000000000 +0200 +++ new/product-composer-0.4.12/src/productcomposer/core/Pool.py 2024-07-08 11:33:08.000000000 +0200 @@ -57,4 +57,15 @@ def lookup_all_updateinfos(self): return self.updateinfos.values() + def names(self, arch=None): + if arch is None: + return set(self.rpms.keys()) + names = set() + for name in self.rpms: + for pkg in self.rpms[name]: + if pkg.matches(arch, None, None, None, None, None): + names.add(name) + break + return names + # vim: sw=4 et ++++++ product-composer.obsinfo ++++++ --- /var/tmp/diff_new_pack.yhNKUG/_old 2024-07-08 19:09:31.133501918 +0200 +++ /var/tmp/diff_new_pack.yhNKUG/_new 2024-07-08 19:09:31.137502065 +0200 @@ -1,5 +1,5 @@ name: product-composer -version: 0.4.8 -mtime: 1716558739 -commit: c83a1737ac73d82d1ac9f4ce6115323c36b39f5e +version: 0.4.12 +mtime: 1720431188 +commit: 14d97cc1852fc5e18a52955694c840f221eaeb9c ++++++ sle-15-defaults.patch ++++++ diff --git a/src/productcomposer/defaults.py b/src/productcomposer/defaults.py index 4493328..1b351ef 100644 --- a/src/productcomposer/defaults.py +++ b/src/productcomposer/defaults.py @@ -7,5 +7,5 @@ and explicitly pass them to the programs. """ -CREATEREPO_CHECKSUM_TYPE: str = "sha512" -CREATEREPO_GENERAL_COMPRESS_TYPE: str = "zstd" +CREATEREPO_CHECKSUM_TYPE: str = "sha256" +CREATEREPO_GENERAL_COMPRESS_TYPE: str = "gz"