Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package osc for openSUSE:Factory checked in at 2024-09-01 19:22:27 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/osc (Old) and /work/SRC/openSUSE:Factory/.osc.new.2698 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "osc" Sun Sep 1 19:22:27 2024 rev:200 rq:1198012 version:1.9.1 Changes: -------- --- /work/SRC/openSUSE:Factory/osc/osc.changes 2024-08-20 16:14:59.750130351 +0200 +++ /work/SRC/openSUSE:Factory/.osc.new.2698/osc.changes 2024-09-01 19:23:00.179887168 +0200 @@ -1,0 +2,16 @@ +Tue Aug 27 11:54:50 UTC 2024 - Daniel Mach <daniel.m...@suse.com> + +- 1.9.1 + - Command-line: + - Add 'createrequest release' subcommand + - Change 'review list' command to omit requests with 'declined' state + - Fix `osc build --local-package` + - Fix typos + - Library: + - Fix extraction of the 'ar' archives when they don't contain header with long filenames + - Fix iterating through arch_list in core.get_repos_of_project() + - Check for None & len() of ET.Element instead of bool() in PackageBase.get_meta_value() + - Spec: + - Replace 'setup.py test' that was removed in setuptools 72 with 'python3 -m unittest' + +------------------------------------------------------------------- Old: ---- osc-1.9.0.tar.gz New: ---- osc-1.9.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ osc.spec ++++++ --- /var/tmp/diff_new_pack.uiVqvj/_old 2024-09-01 19:23:00.819913373 +0200 +++ /var/tmp/diff_new_pack.uiVqvj/_new 2024-09-01 19:23:00.819913373 +0200 @@ -67,7 +67,7 @@ %endif Name: osc -Version: 1.9.0 +Version: 1.9.1 Release: 0 Summary: Command-line client for the Open Build Service License: GPL-2.0-or-later @@ -210,7 +210,7 @@ %python3_fix_shebang %check -%{use_python} setup.py test +%{use_python} -m unittest %files %defattr(-,root,root,-) ++++++ PKGBUILD ++++++ --- /var/tmp/diff_new_pack.uiVqvj/_old 2024-09-01 19:23:00.851914682 +0200 +++ /var/tmp/diff_new_pack.uiVqvj/_new 2024-09-01 19:23:00.859915010 +0200 @@ -1,5 +1,5 @@ pkgname=osc -pkgver=1.9.0 +pkgver=1.9.1 pkgrel=0 pkgdesc="Command-line client for the Open Build Service" arch=('x86_64') ++++++ debian.changelog ++++++ --- /var/tmp/diff_new_pack.uiVqvj/_old 2024-09-01 19:23:00.899916648 +0200 +++ /var/tmp/diff_new_pack.uiVqvj/_new 2024-09-01 19:23:00.903916811 +0200 @@ -1,4 +1,4 @@ -osc (1.9.0-0) unstable; urgency=low +osc (1.9.1-0) unstable; urgency=low * Placeholder ++++++ osc-1.9.0.tar.gz -> osc-1.9.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-1.9.0/NEWS new/osc-1.9.1/NEWS --- old/osc-1.9.0/NEWS 2024-07-29 13:24:13.000000000 +0200 +++ new/osc-1.9.1/NEWS 2024-08-27 13:52:02.000000000 +0200 @@ -1,3 +1,16 @@ +- 1.9.1 + - Command-line: + - Add 'createrequest release' subcommand + - Change 'review list' command to omit requests with 'declined' state + - Fix `osc build --local-package` + - Fix typos + - Library: + - Fix extraction of the 'ar' archives when they don't contain header with long filenames + - Fix iterating through arch_list in core.get_repos_of_project() + - Check for None & len() of ET.Element instead of bool() in PackageBase.get_meta_value() + - Spec: + - Replace 'setup.py test' that was removed in setuptools 72 with 'python3 -m unittest' + - 1.9.0 - Security: - Fix possibility to overwrite special files in .osc (CVE-2024-22034 boo#1225911) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-1.9.0/osc/__init__.py new/osc-1.9.1/osc/__init__.py --- old/osc-1.9.0/osc/__init__.py 2024-07-29 13:24:13.000000000 +0200 +++ new/osc-1.9.1/osc/__init__.py 2024-08-27 13:52:02.000000000 +0200 @@ -13,7 +13,7 @@ from .util import git_version -__version__ = git_version.get_version('1.9.0') +__version__ = git_version.get_version('1.9.1') # vim: sw=4 et diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-1.9.0/osc/_private/package.py new/osc-1.9.1/osc/_private/package.py --- old/osc-1.9.0/osc/_private/package.py 2024-07-29 13:24:13.000000000 +0200 +++ new/osc-1.9.1/osc/_private/package.py 2024-08-27 13:52:02.000000000 +0200 @@ -66,9 +66,9 @@ raise NotImplementedError() def get_meta_value(self, option): - if not self._meta_node: + if self._meta_node is None or len(self._meta_node) == 0: self._meta_node = self._get_meta_node() - if not self._meta_node: + if self._meta_node is None or len(self._meta_node) == 0: return None node = api.find_node(self._meta_node, "package", option) if node is None or not node.text: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-1.9.0/osc/build.py new/osc-1.9.1/osc/build.py --- old/osc-1.9.0/osc/build.py 2024-07-29 13:24:13.000000000 +0200 +++ new/osc-1.9.1/osc/build.py 2024-08-27 13:52:02.000000000 +0200 @@ -925,7 +925,7 @@ bc_file = None bi_filename = '_buildinfo-%s-%s.xml' % (repo, arch) bc_filename = '_buildconfig-%s-%s' % (repo, arch) - if store.is_package and os.access(core.store, os.W_OK): + if not opts.local_package and store.is_package and os.access(core.store, os.W_OK): bi_filename = os.path.join(os.getcwd(), core.store, bi_filename) bc_filename = os.path.join(os.getcwd(), core.store, bc_filename) elif not os.access('.', os.W_OK): @@ -950,7 +950,7 @@ if opts.noinit: buildargs.append('--noinit') - if not store.is_package: + if opts.local_package or not store.is_package: opts.skip_local_service_run = True # check for source services @@ -1551,7 +1551,7 @@ cmd = [change_personality[bi.buildarch]] + cmd # record our settings for later builds - if store.is_package: + if not opts.local_package and store.is_package: store.last_buildroot = repo, arch, vm_type try: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-1.9.0/osc/commandline.py new/osc-1.9.1/osc/commandline.py --- old/osc-1.9.0/osc/commandline.py 2024-07-29 13:24:13.000000000 +0200 +++ new/osc-1.9.1/osc/commandline.py 2024-08-27 13:52:02.000000000 +0200 @@ -2632,6 +2632,20 @@ return actionxml + def _release_request(self, args, opts): + if len(args) != 4: + raise oscerr.WrongArgs('Wrong number of arguments for release' + str(len(args))) + + project = self._process_project_name(args[0]) + package = args[1] + target_project = args[2] + target_repository = args[3] + + actionxml = """ <action type="release"> <source project="%s" package="%s" /> <target project="%s" repository="%s" /> </action> """ % \ + (project, package, target_project, target_repository) + + return actionxml + def _add_me(self, args, opts): if len(args) > 3: raise oscerr.WrongArgs('Too many arguments.') @@ -2754,7 +2768,7 @@ @cmdln.alias("creq") def do_createrequest(self, subcmd, opts, *args): """ - Create multiple requests with a single command + Create a request with multiple actions usage: osc creq [OPTIONS] [ @@ -2765,9 +2779,10 @@ -a add_group GROUP ROLE PROJECT [PACKAGE] -a add_role USER ROLE PROJECT [PACKAGE] -a set_bugowner USER PROJECT [PACKAGE] + -a release PROJECT PACKAGE TARGET_PROJECT TARGET_REPOSITORY ] - Option -m works for all types of request, the rest work only for submit. + Option -m works for all types of request actions, the rest work only for submit. Example: osc creq -a submit -a delete home:someone:branches:openSUSE:Tools -a change_devel openSUSE:Tools osc home:someone:branches:openSUSE:Tools -m ok @@ -2804,6 +2819,8 @@ actionsxml += self._delete_request(args, opts) elif action == 'change_devel': actionsxml += self._changedevel_request(args, opts) + elif action == 'release': + actionsxml += self._release_request(args, opts) elif action == 'add_me': actionsxml += self._add_me(args, opts) elif action == 'add_group': @@ -2827,6 +2844,7 @@ root = ET.parse(f).getroot() rid = root.get('id') + print(f"Request {rid} created") for srid in supersede: change_request_state(apiurl, srid, 'superseded', f'superseded by {rid}', rid) @@ -3322,7 +3340,7 @@ if subcmd == 'review': # FIXME: do the review list for the user and for all groups he belong to results = get_review_list(apiurl, project, package, who, opts.group, opts.project, opts.package, state_list, - opts.type, req_states=("new", "review", "declined")) + opts.type, req_states=("new", "review")) else: if opts.involved_projects: who = who or conf.get_apiurl_usr(apiurl) @@ -3676,7 +3694,7 @@ """ apiurl = self.get_api_url() - # assume we're in a working copy if no args were specfied + # assume we're in a working copy if no args were specified update_working_copy = not args args = list(args) @@ -4379,7 +4397,7 @@ With getpac or bco, the branched package will come from one of %(getpac_default_project)s (list of projects from oscrc:getpac_default_project) - if nothing else is specfied on the command line. + if nothing else is specified on the command line. In case of branch errors, where the source has currently merge conflicts use --linkrev=base option. @@ -5581,7 +5599,7 @@ @cmdln.option('-F', '--file', metavar='FILE', help='read log message from FILE, \'-\' denotes standard input.') @cmdln.option('-f', '--force', default=False, action="store_true", - help='Allow empty commit with no changes. When commiting a project, allow removing packages even if other packages depend on them.') + help='Allow empty commit with no changes. When committing a project, allow removing packages even if other packages depend on them.') @cmdln.option("--skip-local-service-run", "--noservice", "--no-service", default=False, action="store_true", help="Skip run of local source services as specified in _service file.") def do_commit(self, subcmd, opts, *args): @@ -7320,7 +7338,7 @@ osc build [OPTS] --alternative-project openSUSE:10.3 standard i586 BUILD_DESCR usage: - osc build [OPTS] # will try to guess a build environement + osc build [OPTS] # will try to guess a build environment osc build [OPTS] REPOSITORY ARCH BUILD_DESCR osc build [OPTS] REPOSITORY ARCH osc build [OPTS] REPOSITORY (ARCH = hostarch, BUILD_DESCR is detected automatically) @@ -7370,22 +7388,28 @@ if len(args) > 3: raise oscerr.WrongArgs('Too many arguments') - store = osc_store.get_store(Path.cwd(), print_warnings=True) - store.assert_is_package() + if not opts.local_package: + store = osc_store.get_store(Path.cwd(), print_warnings=True) + store.assert_is_package() - try: - if opts.alternative_project and opts.alternative_project == store.project: - opts.alternative_project = None - except RuntimeError: + try: + if opts.alternative_project and opts.alternative_project == store.project: + opts.alternative_project = None + except RuntimeError: # ignore the following exception: Couldn't map git branch '<BRANCH>' to a project - pass + pass + else: + try: + store = osc_store.get_store(os.path.dirname(Path.cwd()), print_warnings=True) + except oscerr.NoWorkingCopy: + store = None # HACK: avoid calling some underlying store_*() functions from parse_repoarchdescr() method # We'll fix parse_repoarchdescr() later because it requires a larger change if not opts.alternative_project and isinstance(store, git_scm.GitStore): opts.alternative_project = store.project - if len(args) == 0 and store.is_package and store.last_buildroot: + if len(args) == 0 and store and store.is_package and store.last_buildroot: # build env not specified, just read from last build attempt args = [store.last_buildroot[0], store.last_buildroot[1]] if not opts.vm_type: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-1.9.0/osc/core.py new/osc-1.9.1/osc/core.py --- old/osc-1.9.0/osc/core.py 2024-07-29 13:24:13.000000000 +0200 +++ new/osc-1.9.1/osc/core.py 2024-08-27 13:52:02.000000000 +0200 @@ -3975,7 +3975,7 @@ project_obj = obs_api.Project.from_api(apiurl, prj) for repo in project_obj.repository_list or []: - for arch in repo.arch_list: + for arch in repo.arch_list or []: yield Repo(repo.name, arch) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-1.9.0/osc/util/ar.py new/osc-1.9.1/osc/util/ar.py --- old/osc-1.9.0/osc/util/ar.py 2024-07-29 13:24:13.000000000 +0200 +++ new/osc-1.9.1/osc/util/ar.py 2024-08-27 13:52:02.000000000 +0200 @@ -147,8 +147,10 @@ """ # read extended header with long file names and then only seek into the right offsets - self.__file.seek(self.ext_fnhdr.dataoff, os.SEEK_SET) - ext_fnhdr_data = self.__file.read(self.ext_fnhdr.size) + ext_fnhdr_data = None + if self.ext_fnhdr: + self.__file.seek(self.ext_fnhdr.dataoff, os.SEEK_SET) + ext_fnhdr_data = self.__file.read(self.ext_fnhdr.size) for h in self.hdrs: if h.file == b'/': @@ -159,8 +161,12 @@ h.file = h.file[:-1] continue + if not h.file.startswith(b'/'): + continue + # long file name assert h.file[0:1] == b"/" + assert ext_fnhdr_data is not None start = int(h.file[1:]) end = ext_fnhdr_data.find(b'/', start) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-1.9.0/osc/util/git_version.py new/osc-1.9.1/osc/util/git_version.py --- old/osc-1.9.0/osc/util/git_version.py 2024-07-29 13:24:13.000000000 +0200 +++ new/osc-1.9.1/osc/util/git_version.py 2024-08-27 13:52:02.000000000 +0200 @@ -9,7 +9,7 @@ """ # the `version` variable contents get substituted during `git archive` # it requires adding this to .gitattributes: <path to this file> export-subst - version = "1.9.0" + version = "1.9.1" if version.startswith(("$", "%")): # "$": version hasn't been substituted during `git archive` # "%": "Format:" and "$" characters get removed from the version string (a GitHub bug?) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-1.9.0/tests/fixtures/README new/osc-1.9.1/tests/fixtures/README --- old/osc-1.9.0/tests/fixtures/README 2024-07-29 13:24:13.000000000 +0200 +++ new/osc-1.9.1/tests/fixtures/README 2024-08-27 13:52:02.000000000 +0200 @@ -33,3 +33,9 @@ printf "/tmp/foo\0/123\0very-long-long-long-long-name\0very-long-long-long-long-name2\0very-long-name -with-newline\0a\nb\0dir/file\0" | cpio -ocv0 --owner=root:root > archive.cpio + + +Create archive-no-ext_fnhdr.ar +------------------------------ + +ar qP archive-no-ext_fnhdr.ar dir/file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-1.9.0/tests/fixtures/archive-no-ext_fnhdr.ar new/osc-1.9.1/tests/fixtures/archive-no-ext_fnhdr.ar --- old/osc-1.9.0/tests/fixtures/archive-no-ext_fnhdr.ar 1970-01-01 01:00:00.000000000 +0100 +++ new/osc-1.9.1/tests/fixtures/archive-no-ext_fnhdr.ar 2024-08-27 13:52:02.000000000 +0200 @@ -0,0 +1,3 @@ +!<arch> +dir/file/ 1724142481 1000 1000 100644 14 ` +file-in-a-dir diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-1.9.0/tests/test_util_ar.py new/osc-1.9.1/tests/test_util_ar.py --- old/osc-1.9.0/tests/test_util_ar.py 2024-07-29 13:24:13.000000000 +0200 +++ new/osc-1.9.1/tests/test_util_ar.py 2024-08-27 13:52:02.000000000 +0200 @@ -81,6 +81,12 @@ # this is supposed to throw an error, extracting files with absolute paths might overwrite system files self.assertRaises(ArError, f.saveTo, self.tmpdir) + def test_no_exthdr(self): + self.archive = os.path.join(FIXTURES_DIR, "archive-no-ext_fnhdr.ar") + self.ar = Ar(self.archive) + self.ar.read() + self.test_saveTo_subdir() + if __name__ == "__main__": unittest.main() ++++++ osc.dsc ++++++ --- /var/tmp/diff_new_pack.uiVqvj/_old 2024-09-01 19:23:01.359935482 +0200 +++ /var/tmp/diff_new_pack.uiVqvj/_new 2024-09-01 19:23:01.363935645 +0200 @@ -1,6 +1,6 @@ Format: 1.0 Source: osc -Version: 1.9.0-0 +Version: 1.9.1-0 Binary: osc Maintainer: Adrian Schroeter <adr...@suse.de> Architecture: any