Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package osc for openSUSE:Factory checked in at 2022-03-02 18:20:31 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/osc (Old) and /work/SRC/openSUSE:Factory/.osc.new.1958 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "osc" Wed Mar 2 18:20:31 2022 rev:159 rq:958420 version:0.176.0 Changes: -------- --- /work/SRC/openSUSE:Factory/osc/osc.changes 2021-12-02 22:31:14.634445112 +0100 +++ /work/SRC/openSUSE:Factory/.osc.new.1958/osc.changes 2022-03-02 18:20:48.356655317 +0100 @@ -1,0 +2,31 @@ +Mon Feb 28 17:34:00 UTC 2022 - Daniel Mach <daniel.m...@suse.com> + +- 0.176.0 + * add -F option to osc submitreq + * add --verbose option to build command + * fix getbinaries command to fetch also multibuild packages + * fix getbinaries -M/--multibuild-package option usage + * skip fetching metadata and logs in the getbinaries command + * do not download a bdep with a hdrmd5 from the api by default + * re-download file from API when hdrmd5 doesn't match + * honor --download-api-only option + * remove Windows from the supported operating systems + * fix license in setup.py + * add py3.10 and py3.11 to the classifiers in setup.py + * use the latest version of COPYING file from gnu.org + * fix crash on terminal resize during download + * do not fail with a traceback in case of a config error + * preserve oscrc symlink when writing conf file + * escape % character in binary download URLs + * fix printing paths to built debian packages + +------------------------------------------------------------------- +Tue Feb 22 01:21:11 UTC 2022 - Matthew Davis <opens...@virtual.drop.net> + +- 0.175.1: + * Modified SPEC file to be more compatible with KOJI and COPR. + ** Modified SPEC file to use python3 for CentOS/RHEL 7 + ** Modified SPEC file use fedora/rhel version macros. + ** Changed perl to sed in %install section of SPEC file. + +------------------------------------------------------------------- Old: ---- osc-0.175.0.tar.gz New: ---- osc-0.176.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ osc.spec ++++++ --- /var/tmp/diff_new_pack.3iXeV7/_old 2022-03-02 18:20:49.088655343 +0100 +++ /var/tmp/diff_new_pack.3iXeV7/_new 2022-03-02 18:20:49.092655343 +0100 @@ -1,7 +1,7 @@ # # spec file for package osc # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,7 +16,7 @@ # -%if 0%{?suse_version} >= 1500 || 0%{?fedora_version} >= 29 || 0%{?centos_version} >= 800 || 0%{?mageia} >= 8 +%if 0%{?suse_version} >= 1500 || 0%{?fedora} >= 29 || 0%{?rhel} >= 7 || 0%{?mageia} >= 8 %bcond_without python3 %else %bcond_with python3 @@ -27,7 +27,7 @@ %define use_python python %endif -%define version_unconverted 0.175.0 +%define version_unconverted 0.176.0 %define osc_plugin_dir %{_prefix}/lib/osc-plugins %define macros_file macros.osc %if ! %{defined _rpmmacrodir} @@ -35,7 +35,7 @@ %endif Name: osc -Version: 0.175.0 +Version: 0.176.0 Release: 0 Summary: Open Build Service Commander License: GPL-2.0-or-later @@ -53,7 +53,7 @@ BuildRequires: python-rpm Requires: python-rpm %else -%if 0%{?suse_version} >= 1500 || 0%{?fedora_version} >= 32 || 0%{?centos_version} >= 800 +%if 0%{?suse_version} >= 1500 || 0%{?fedora} >= 32 || 0%{?rhel} >= 7 BuildRequires: %{use_python}-rpm Requires: %{use_python}-rpm %else @@ -95,18 +95,14 @@ %endif %endif # needed for storing credentials in kwallet/gnome-keyring -%if 0%{?suse_version} > 1000 || 0%{?mandriva_version} || 0%{?mdkversion} +%if 0%{?suse_version} > 1000 || 0%{?mandriva_version} || 0%{?mdkversion} || 0%{?fedora} >= 29 || 0%{?rhel} >= 8 %if %{with python3} Recommends: python3-keyring %else Recommends: python-keyring %endif %endif -%if 0%{?rhel_version} && 0%{?rhel_version} < 600 -BuildRequires: python-elementtree -Requires: python-elementtree -%endif -%if 0%{?centos_version} && 0%{?centos_version} < 600 +%if 0%{?rhel} && 0%{?rhel} < 6 BuildRequires: python-elementtree Requires: python-elementtree %endif @@ -121,7 +117,7 @@ Requires: python-m2crypto > 0.19 %endif %else -%if 0%{?fedora_version} >= 29 || 0%{?centos_version} >= 800 +%if 0%{?fedora} >= 29 || 0%{?rhel} >= 7 BuildRequires: python3-m2crypto Requires: python3-m2crypto %else @@ -162,7 +158,7 @@ %install %{use_python} setup.py install --prefix=%{_prefix} --root=%{buildroot} -perl -p -i -e 's{#!.*python}{#!%{_bindir}/%{use_python}}' osc-wrapper.py +sed -i -E 's|#!.*python|#!%{_bindir}/%{use_python}|' osc-wrapper.py ln -s osc-wrapper.py %{buildroot}/%{_bindir}/osc mkdir -p %{buildroot}%{osc_plugin_dir} mkdir -p %{buildroot}%{_localstatedir}/lib/osc-plugins ++++++ PKGBUILD ++++++ --- /var/tmp/diff_new_pack.3iXeV7/_old 2022-03-02 18:20:49.140655344 +0100 +++ /var/tmp/diff_new_pack.3iXeV7/_new 2022-03-02 18:20:49.140655344 +0100 @@ -1,5 +1,5 @@ pkgname=osc -pkgver=0.175.0 +pkgver=0.176.0 pkgrel=0 pkgdesc="Open Build Service client" arch=('x86_64') ++++++ _service ++++++ --- /var/tmp/diff_new_pack.3iXeV7/_old 2022-03-02 18:20:49.164655345 +0100 +++ /var/tmp/diff_new_pack.3iXeV7/_new 2022-03-02 18:20:49.164655345 +0100 @@ -1,8 +1,8 @@ <services> <service name="tar_scm" mode="disabled"> - <param name="version">0.175.0</param> - <param name="revision">0.175.0</param> - <param name="url">git://github.com/openSUSE/osc.git</param> + <param name="version">0.176.0</param> + <param name="revision">0.176.0</param> + <param name="url">https://github.com/openSUSE/osc.git</param> <param name="scm">git</param> </service> <service name="recompress" mode="disabled"> ++++++ debian.changelog ++++++ --- /var/tmp/diff_new_pack.3iXeV7/_old 2022-03-02 18:20:49.204655347 +0100 +++ /var/tmp/diff_new_pack.3iXeV7/_new 2022-03-02 18:20:49.212655347 +0100 @@ -1,4 +1,4 @@ -osc (0.175.0-0) unstable; urgency=low +osc (0.176.0-0) unstable; urgency=low - Update to 0.174.0: - fix password deletion via "osc config -d <apiurl> pass" - support changing the password store via "osc config <apiurl> ++++++ osc-0.175.0.tar.gz -> osc-0.176.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-0.175.0/COPYING new/osc-0.176.0/COPYING --- old/osc-0.175.0/COPYING 2021-12-02 08:48:19.000000000 +0100 +++ new/osc-0.176.0/COPYING 2022-02-28 16:44:11.000000000 +0100 @@ -1,12 +1,12 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 51 Franklin Steet, Fifth Floor, Boston, MA 02111-1307 USA + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. - Preamble + Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public @@ -15,7 +15,7 @@ General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to +the GNU Lesser General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not @@ -55,8 +55,8 @@ The precise terms and conditions for copying, distribution and modification follow. - - GNU GENERAL PUBLIC LICENSE + + GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains @@ -110,7 +110,7 @@ License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) - + These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in @@ -168,7 +168,7 @@ access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. - + 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is @@ -225,7 +225,7 @@ This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. - + 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License @@ -255,7 +255,7 @@ of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. - NO WARRANTY + NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN @@ -277,9 +277,9 @@ PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it @@ -303,10 +303,9 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Steet, Fifth Floor, Boston, MA 02111-1307 USA - + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Also add information on how to contact you by electronic and paper mail. @@ -336,5 +335,5 @@ This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General +library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-0.175.0/NEWS new/osc-0.176.0/NEWS --- old/osc-0.175.0/NEWS 2021-12-02 08:48:19.000000000 +0100 +++ new/osc-0.176.0/NEWS 2022-02-28 16:44:11.000000000 +0100 @@ -1,3 +1,22 @@ +0.176.0 + - add -F option to osc submitreq + - add --verbose option to build command + - fix getbinaries command to fetch also multibuild packages + - fix getbinaries -M/--multibuild-package option usage + - skip fetching metadata and logs in the getbinaries command + - do not download a bdep with a hdrmd5 from the api by default + - re-download file from API when hdrmd5 doesn't match + - honor --download-api-only option + - remove Windows from the supported operating systems + - fix license in setup.py + - add py3.10 and py3.11 to the classifiers in setup.py + - use the latest version of COPYING file from gnu.org + - fix crash on terminal resize during download + - do not fail with a traceback in case of a config error + - preserve oscrc symlink when writing conf file + - escape % character in binary download URLs + - fix printing paths to built debian packages + 0.175.0 - do not crash when running "osc search --binary --verbose foo" - don't run source services when building outside of an OSC package working copy diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-0.175.0/osc/babysitter.py new/osc-0.176.0/osc/babysitter.py --- old/osc-0.175.0/osc/babysitter.py 2021-12-02 08:48:19.000000000 +0100 +++ new/osc-0.176.0/osc/babysitter.py 2022-02-28 16:44:11.000000000 +0100 @@ -17,6 +17,7 @@ from osc.util.cpio import CpioError from osc.util.packagequery import PackageError from osc.util.helper import decode_it +from osc.OscConfigParser import configparser try: from M2Crypto.SSL.Checker import SSLVerificationError @@ -56,9 +57,6 @@ if num: signal.signal(num, catchterm) -# Signals which should be ignored -for sig in (signal.SIGWINCH,): - signal.signal(sig, signal.SIG_IGN) def run(prg, argv=None): try: @@ -154,6 +152,8 @@ print(e, file=sys.stderr) except (oscerr.ConfigError, oscerr.NoConfigfile) as e: print(e.msg, file=sys.stderr) + except configparser.Error as e: + print(e.message, file=sys.stderr) except oscerr.OscIOError as e: print(e.msg, file=sys.stderr) if getattr(prg.options, 'debug', None) or \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-0.175.0/osc/build.py new/osc-0.176.0/osc/build.py --- old/osc-0.175.0/osc/build.py 2021-12-02 08:48:19.000000000 +0100 +++ new/osc-0.176.0/osc/build.py 2022-02-28 16:44:11.000000000 +0100 @@ -180,7 +180,8 @@ self.pathes.append(node.get('project')+"/"+node.get('repository')) # a hash providing the matching URL for specific repos for newer OBS instances if node.get('url'): - self.urls[node.get('project')+"/"+node.get('repository')] = node.get('url') + '/%(arch)s/%(filename)s' + url = node.get('url').replace('%', '%%') + self.urls[node.get('project')+"/"+node.get('repository')] = url + '/%(arch)s/%(filename)s' self.vminstall_list = [ dep.name for dep in self.deps if dep.vminstall ] self.preinstall_list = [ dep.name for dep in self.deps if dep.preinstall ] @@ -353,12 +354,22 @@ def get_built_files(pacdir, buildtype): if buildtype == 'spec': - b_built = subprocess.Popen(['find', os.path.join(pacdir, 'RPMS'), - '-name', '*.rpm'], - stdout=subprocess.PIPE).stdout.read().strip() - s_built = subprocess.Popen(['find', os.path.join(pacdir, 'SRPMS'), - '-name', '*.rpm'], - stdout=subprocess.PIPE).stdout.read().strip() + debs_dir = os.path.join(pacdir, 'DEBS') + sdebs_dir = os.path.join(pacdir, 'SDEBS') + if os.path.isdir(debs_dir) or os.path.isdir(sdebs_dir): + # (S)DEBS directories detected, list their *.(s)deb files + b_built = subprocess.Popen(['find', debs_dir, '-name', '*.deb'], + stdout=subprocess.PIPE).stdout.read().strip() + s_built = subprocess.Popen(['find', sdebs_dir, '-name', '*.sdeb'], + stdout=subprocess.PIPE).stdout.read().strip() + else: + # default: (S)RPMS directories and their *.rpm files + b_built = subprocess.Popen(['find', os.path.join(pacdir, 'RPMS'), + '-name', '*.rpm'], + stdout=subprocess.PIPE).stdout.read().strip() + s_built = subprocess.Popen(['find', os.path.join(pacdir, 'SRPMS'), + '-name', '*.rpm'], + stdout=subprocess.PIPE).stdout.read().strip() elif buildtype == 'kiwi': b_built = subprocess.Popen(['find', os.path.join(pacdir, 'KIWI'), '-type', 'f'], @@ -731,6 +742,8 @@ if opts.multibuild_package: buildargs.append('--buildflavor=%s' % opts.multibuild_package) pac = pac + ":" + opts.multibuild_package + if opts.verbose: + buildargs.append('--verbose=%s' % opts.verbose) if opts.wipe: buildargs.append("--wipe") @@ -1034,7 +1047,7 @@ # we have now specific download repositories per repository. Could be removed IMHO, since the api fallback # is there. In worst case it could fetch the wrong rpm... if bi.downloadurl: - urllist.append(bi.downloadurl + '/%(extproject)s/%(extrepository)s/%(arch)s/%(filename)s') + urllist.append(bi.downloadurl.replace('%', '%%') + '/%(extproject)s/%(extrepository)s/%(arch)s/%(filename)s') if opts.disable_cpio_bulk_download: urllist.append( '%(apiurl)s/build/%(project)s/%(repository)s/%(repoarch)s/%(repopackage)s/%(repofilename)s' ) @@ -1045,7 +1058,8 @@ http_debug = config['http_debug'], modules = bi.modules, enable_cpio = not opts.disable_cpio_bulk_download, - cookiejar=cookiejar) + cookiejar=cookiejar, + download_api_only=opts.download_api_only) if not opts.trust_all_projects: # implicitly trust the project we are building for diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-0.175.0/osc/commandline.py new/osc-0.176.0/osc/commandline.py --- old/osc-0.175.0/osc/commandline.py 2021-12-02 08:48:19.000000000 +0100 +++ new/osc-0.176.0/osc/commandline.py 2022-02-28 16:44:11.000000000 +0100 @@ -1177,6 +1177,8 @@ @cmdln.option('-m', '--message', metavar='TEXT', help='specify message TEXT') + @cmdln.option('-F', '--file', metavar='FILE', + help='read log message from FILE, \'-\' denotes standard input.') @cmdln.option('-r', '--revision', metavar='REV', help='specify a certain source revision ID (the md5 sum) for the source package') @cmdln.option('-s', '--supersede', metavar='REQUEST_ID', @@ -1257,6 +1259,14 @@ if opts.message: opts.message = str(opts.message.encode().decode('unicode_escape')) + elif opts.file: + if opts.file == '-': + opts.message = sys.stdin.read() + else: + try: + opts.message = open(opts.file).read() + except: + sys.exit('could not open file \'%s\'.' % opts.file) myreqs = [] if opts.supersede: @@ -4653,8 +4663,6 @@ prj_dir = opts.output_dir if opts.output_dir else project if not opts.output_dir and conf.config['checkout_no_colon']: prj_dir = prj_dir.replace(':', '/') - if sys.platform[:3] == 'win': - prj_dir = prj_dir.replace(':', ';') if os.path.exists(prj_dir): sys.exit('osc: project directory \'%s\' already exists' % prj_dir) @@ -6541,6 +6549,8 @@ help='only fetch packages from the api') @cmdln.option('--oldpackages', metavar='DIR', help='take previous build from DIR (special values: _self, _link)') + @cmdln.option('--verbose', metavar='VERBOSE', + help='set a verbose mode, arguments can be "all" or "vm"') @cmdln.option('--wipe', action='store_true', help=SUPPRESS_HELP) @cmdln.option('--shell', action='store_true', @@ -7427,8 +7437,9 @@ help='do not show downloading progress') @cmdln.option('-d', '--destdir', default='./binaries', metavar='DIR', help='destination directory') - @cmdln.option('-M', '--multibuild-package', action='append', - help='get binaries from specified multibuild package') + @cmdln.option('-M', '--multibuild-package', metavar="FLAVOR", action='append', + help='Get binaries from the specified flavor of a multibuild package.' + ' It is meant for use from a package checkout when it is not possible to specify package:flavor.') @cmdln.option('--sources', action="store_true", help='also fetch source packages') @cmdln.option('--debug', action="store_true", @@ -7458,6 +7469,9 @@ package = None binary = None + if opts.multibuild_package and ((len(args) > 2) or (len(args) <= 2 and is_project_dir(os.getcwd()))): + self.optparser.error("The -M/--multibuild-package option can be only used from a package checkout.") + if len(args) < 1 and is_package_dir('.'): self.print_repos() @@ -7496,7 +7510,7 @@ if package is None: - package = meta_get_packagelist(apiurl, project) + package = meta_get_packagelist(apiurl, project, deleted=0) else: if opts.multibuild_package: packages = [] @@ -7524,6 +7538,12 @@ for i in binaries: if binary != None and binary != i.name: continue + # skip metadata (unless explicitly specified as the `FILE` (== `binary`) argument) + if not binary and i.name.startswith("_"): + continue + # skip logs (unless explicitly specified as the `FILE` (== `binary`) argument) + if not binary and i.name.endswith(".log"): + continue # skip source rpms if not opts.sources and (i.name.endswith('src.rpm') or i.name.endswith('sdeb')): continue diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-0.175.0/osc/conf.py new/osc-0.176.0/osc/conf.py --- old/osc-0.175.0/osc/conf.py 2021-12-02 08:48:19.000000000 +0100 +++ new/osc-0.176.0/osc/conf.py 2022-02-28 16:44:11.000000000 +0100 @@ -695,8 +695,20 @@ if os.path.exists(fname) and not os.path.isfile(fname): # only write to a regular file return + + # config file is behind a symlink + # resolve the symlink and continue writing the config as usual + if os.path.islink(fname): + fname = os.readlink(fname) + + # create directories to the config file (if they don't exist already) if not os.path.exists(os.path.dirname(fname)): - os.makedirs(os.path.dirname(fname), mode=0o700) + try: + os.makedirs(os.path.dirname(fname), mode=0o700) + except OSError as e: + if e.errno != errno.EEXIST: + raise + with open(fname + '.new', 'w') as f: cp.write(f, comments=True) try: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-0.175.0/osc/core.py new/osc-0.176.0/osc/core.py --- old/osc-0.175.0/osc/core.py 2021-12-02 08:48:19.000000000 +0100 +++ new/osc-0.176.0/osc/core.py 2022-02-28 16:44:11.000000000 +0100 @@ -5,7 +5,7 @@ from __future__ import print_function -__version__ = '0.175.0' +__version__ = '0.176.0' # __store_version__ is to be incremented when the format of the working copy # "store" changes in an incompatible way. Please add any needed migration @@ -3449,6 +3449,11 @@ query = {} if deleted: query['deleted'] = 1 + elif deleted in (False, 0): + # HACK: Omitted 'deleted' and 'deleted=0' produce different results. + # By explicit 'deleted=0', we also get multibuild packages listed. + # See: https://github.com/openSUSE/open-build-service/issues/9715 + query['deleted'] = 0 if expand: query['expand'] = 1 @@ -4082,8 +4087,6 @@ def get_default_editor(): system = platform.system() - if system == 'Windows': - return 'notepad' if system == 'Linux': dist = _get_linux_distro() if dist == 'debian': @@ -4095,8 +4098,6 @@ def get_default_pager(): system = platform.system() - if system == 'Windows': - return 'less' if system == 'Linux': dist = _get_linux_distro() if dist == 'debian': @@ -5061,12 +5062,8 @@ if not prj_dir: prj_dir = olddir - else: - if sys.platform[:3] == 'win': - prj_dir = prj_dir[:2] + prj_dir[2:].replace(':', ';') - else: - if conf.config['checkout_no_colon']: - prj_dir = prj_dir.replace(':', '/') + elif conf.config['checkout_no_colon']: + prj_dir = prj_dir.replace(':', '/') root_dots = '.' if conf.config['checkout_rooted']: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-0.175.0/osc/fetch.py new/osc-0.176.0/osc/fetch.py --- old/osc-0.175.0/osc/fetch.py 2021-12-02 08:48:19.000000000 +0100 +++ new/osc-0.176.0/osc/fetch.py 2022-02-28 16:44:11.000000000 +0100 @@ -29,7 +29,7 @@ class Fetcher: def __init__(self, cachedir='/tmp', api_host_options={}, urllist=[], http_debug=False, cookiejar=None, offline=False, - enable_cpio=True, modules=[]): + enable_cpio=True, modules=[], download_api_only=False): # set up progress bar callback self.progress_obj = None if sys.stdout.isatty(): @@ -43,6 +43,7 @@ self.offline = offline self.cpio = {} self.enable_cpio = enable_cpio + self.download_api_only = download_api_only self.gr = OscFileGrabber(progress_obj=self.progress_obj) @@ -195,6 +196,8 @@ sys.exit(1) def _build_urllist(self, buildinfo, pac): + if self.download_api_only: + return [] urllist = self.urllist key = '%s/%s' % (pac.project, pac.repository) project_repo_url = buildinfo.urls.get(key) @@ -220,7 +223,6 @@ if not i.name.startswith('container:') and i.pacsuffix != 'rpm': continue if i.hdrmd5: - from .util import packagequery if i.name.startswith('container:'): hdrmd5 = dgst(i.fullfilename) else: @@ -243,10 +245,6 @@ '--offline not possible.' % i.fullfilename) self.dirSetup(i) - if i.hdrmd5 and self.enable_cpio: - self.__add_cpio(i) - done += 1 - continue try: # if there isn't a progress bar, there is no output at all prefix = '' @@ -256,6 +254,20 @@ prefix = '[%d/%d] ' % (done, needed) self.fetch(i, prefix=prefix) + if not os.path.isfile(i.fullfilename): + # if the file wasn't downloaded and cannot be found on disk, + # mark it for downloading from the API + self.__add_cpio(i) + else: + # if the checksum of the downloaded package doesn't match, + # delete it and mark it for downloading from the API + hdrmd5 = packagequery.PackageQuery.queryhdrmd5(i.fullfilename) + if not hdrmd5 or hdrmd5 != i.hdrmd5: + print('%s/%s: attempting download from api, since the hdrmd5 did not match' + % (i.project, i.name)) + os.unlink(i.fullfilename) + self.__add_cpio(i) + except KeyboardInterrupt: print('Cancelled by user (ctrl-c)') print('Exiting.') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-0.175.0/osc/meter.py new/osc-0.176.0/osc/meter.py --- old/osc-0.175.0/osc/meter.py 2021-12-02 08:48:19.000000000 +0100 +++ new/osc-0.176.0/osc/meter.py 2022-02-28 16:44:11.000000000 +0100 @@ -3,6 +3,9 @@ # and distributed under the terms of the GNU General Public Licence, # either version 2, or (at your option) any later version. + +import signal + try: import progressbar as pb have_pb_module = True @@ -23,6 +26,11 @@ # a ZeroDivisionException widgets.insert(1, pb.Percentage()) self.bar = pb.ProgressBar(widgets=widgets, maxval=size) + # When a signal handler is set, it resets SA_RESTART flag + # - see signal.siginterrupt() python docs. + # ProgressBar's constructor sets signal handler for SIGWINCH. + # So let's make sure that it doesn't interrupt syscalls in osc. + signal.siginterrupt(signal.SIGWINCH, False) self.bar.start() def update(self, amount_read): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-0.175.0/setup.cfg new/osc-0.176.0/setup.cfg --- old/osc-0.175.0/setup.cfg 1970-01-01 01:00:00.000000000 +0100 +++ new/osc-0.176.0/setup.cfg 2022-02-28 16:44:11.000000000 +0100 @@ -0,0 +1,3 @@ +[flake8] +exclude = .git,__pycache__ +max-line-length = 120 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-0.175.0/setup.py new/osc-0.176.0/setup.py --- old/osc-0.175.0/setup.py 2021-12-02 08:48:19.000000000 +0100 +++ new/osc-0.176.0/setup.py 2022-02-28 16:44:11.000000000 +0100 @@ -5,21 +5,12 @@ from distutils.command import build, install_data import gzip import os.path -import sys import setuptools import osc.core from osc import commandline -# optional support for py2exe -try: - import py2exe - - HAVE_PY2EXE = True -except: - HAVE_PY2EXE = False - class build_osc(build.build, object): """ @@ -90,17 +81,8 @@ self.data_files = data_files -addparams = {} -if HAVE_PY2EXE: - addparams['console'] = [ - {'script': 'osc-wrapper.py', 'dest_base': 'osc', 'icon_resources': [(1, 'osc.ico')]}] - addparams['zipfile'] = 'shared.lib' - addparams['options'] = {'py2exe': {'optimize': 0, 'compressed': True, - 'packages': ['xml.etree', 'StringIO', 'gzip']}} - data_files = [] -if sys.platform[:3] != 'win': - data_files.append((os.path.join('share', 'man', 'man1'), ['osc.1.gz'])) +data_files.append((os.path.join('share', 'man', 'man1'), ['osc.1.gz'])) with open("README") as fh: long_description = fh.read() @@ -113,8 +95,8 @@ long_description_content_type="text/plain", author='openSUSE project', author_email='opensuse-buildserv...@opensuse.org', - license='GPL', - platforms=['Linux', 'Mac OSX', 'Windows XP/2000/NT', 'Windows 95/98/ME', 'FreeBSD'], + license='GPLv2+', + platforms=['Linux', 'MacOS X', 'FreeBSD'], keywords=['openSUSE', 'SUSE', 'RPM', 'build', 'buildservice'], url='http://en.opensuse.org/openSUSE:OSC', download_url='https://github.com/openSUSE/osc', @@ -129,7 +111,9 @@ "Intended Audience :: Information Technology", "Intended Audience :: System Administrators", "License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)", - "Operating System :: OS Independent", + "Operating System :: MacOS :: MacOS X", + "Operating System :: POSIX :: BSD :: FreeBSD", + "Operating System :: POSIX :: Linux", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", @@ -138,6 +122,8 @@ "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", "Topic :: Software Development :: Build Tools", "Topic :: System :: Archiving :: Packaging", ], @@ -149,5 +135,4 @@ 'build_docs': build_docs, 'install_data': install_data }, - **addparams ) ++++++ osc.dsc ++++++ --- /var/tmp/diff_new_pack.3iXeV7/_old 2022-03-02 18:20:49.572655360 +0100 +++ /var/tmp/diff_new_pack.3iXeV7/_new 2022-03-02 18:20:49.576655360 +0100 @@ -1,6 +1,6 @@ Format: 1.0 Source: osc -Version: 0.175.0-0 +Version: 0.176.0-0 Binary: osc Maintainer: Adrian Schroeter <adr...@suse.de> Architecture: any