Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package openSUSE-release-tools for
openSUSE:Factory checked in at 2023-06-29 17:29:08
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/openSUSE-release-tools (Old)
and /work/SRC/openSUSE:Factory/.openSUSE-release-tools.new.13546 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "openSUSE-release-tools"
Thu Jun 29 17:29:08 2023 rev:477 rq:1095915 version:20230629.3b612be
Changes:
--------
---
/work/SRC/openSUSE:Factory/openSUSE-release-tools/openSUSE-release-tools.changes
2023-06-28 21:33:40.657972664 +0200
+++
/work/SRC/openSUSE:Factory/.openSUSE-release-tools.new.13546/openSUSE-release-tools.changes
2023-06-29 17:29:25.346643858 +0200
@@ -1,0 +2,6 @@
+Thu Jun 29 07:29:32 UTC 2023 - [email protected]
+
+- Update to version 20230629.3b612be:
+ * Cleanups for accepting scm-staging bot submissions
+
+-------------------------------------------------------------------
Old:
----
openSUSE-release-tools-20230627.8b1c308.obscpio
New:
----
openSUSE-release-tools-20230629.3b612be.obscpio
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ openSUSE-release-tools.spec ++++++
--- /var/tmp/diff_new_pack.JPd9uA/_old 2023-06-29 17:29:26.166648661 +0200
+++ /var/tmp/diff_new_pack.JPd9uA/_new 2023-06-29 17:29:26.170648685 +0200
@@ -20,7 +20,7 @@
%define source_dir openSUSE-release-tools
%define announcer_filename factory-package-news
Name: openSUSE-release-tools
-Version: 20230627.8b1c308
+Version: 20230629.3b612be
Release: 0
Summary: Tools to aid in staging and release work for openSUSE/SUSE
License: GPL-2.0-or-later AND MIT
++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.JPd9uA/_old 2023-06-29 17:29:26.210648919 +0200
+++ /var/tmp/diff_new_pack.JPd9uA/_new 2023-06-29 17:29:26.214648943 +0200
@@ -1,7 +1,7 @@
<servicedata>
<service name="tar_scm">
<param
name="url">https://github.com/openSUSE/openSUSE-release-tools.git</param>
- <param
name="changesrevision">8b1c308e45a61631513cc2ea7c14e18db3209b5d</param>
+ <param
name="changesrevision">3b612be2daa7ecd1569bc7713dd15f3594e34d2f</param>
</service>
</servicedata>
++++++ openSUSE-release-tools-20230627.8b1c308.obscpio ->
openSUSE-release-tools-20230629.3b612be.obscpio ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/openSUSE-release-tools-20230627.8b1c308/check_source.py
new/openSUSE-release-tools-20230629.3b612be/check_source.py
--- old/openSUSE-release-tools-20230627.8b1c308/check_source.py 2023-06-27
21:04:55.000000000 +0200
+++ new/openSUSE-release-tools-20230629.3b612be/check_source.py 2023-06-29
09:28:04.000000000 +0200
@@ -1,5 +1,6 @@
#!/usr/bin/python3
+from contextlib import suppress
import difflib
import glob
import os
@@ -62,7 +63,7 @@
self.allow_valid_source_origin =
str2bool(config.get('check-source-allow-valid-source-origin', 'False'))
self.valid_source_origins =
set(config.get('check-source-valid-source-origins', '').split(' '))
self.add_devel_project_review =
str2bool(config.get('check-source-add-devel-project-review', 'False'))
- self.allowed_scm_submission_sources =
set(config.get('allowed-scm-submission-sources', '').split(' '))
+ self.allowed_scm_submission_sources =
config.get('allowed-scm-submission-sources', '').split()
if self.action.type == 'maintenance_incident':
# The workflow effectively enforces the names to match and the
@@ -142,7 +143,7 @@
if self.ensure_source_exist_in_baseproject and self.devel_baseproject:
if not entity_exists(self.apiurl, self.devel_baseproject,
target_package) and source_project not in self.valid_source_origins:
- self.review_messages['declined'] = "Per our development
policy, please submit to %s first." % self.devel_baseproject
+ self.review_messages['declined'] = f"Per our development
policy, please submit to {self.devel_baseproject} first."
return False
inair_renamed = target_package != source_package
@@ -158,18 +159,22 @@
# => waive the devel project source submission requirement
meta = ET.fromstringlist(show_package_meta(self.apiurl,
devel_project, devel_package))
scm_sync = meta.find('scmsync')
- if (
- (scm_sync is None) or
- (
- (scm_sync is not None) and
- not
scm_sync.text.startswith(f"https://src.opensuse.org/pool/{source_package}")
- and all(not
source_project.startswith(allowed_src) for allowed_src in
self.allowed_scm_submission_sources)
- )
- ):
+ if scm_sync is None:
# Not from proper devel project/package and not
self-submission and not scmsync.
self.review_messages['declined'] = 'Expected
submission from devel package %s/%s' % (
devel_project, devel_package)
return False
+
+ scm_pool_repository =
f"https://src.opensuse.org/pool/{source_package}"
+ if not scm_sync.text.startswith(scm_pool_repository):
+ # devel project uses scm sync not from the trusted src
location
+ self.review_message['declined'] = f"Expected a devel
project scm sync from {scm_pool_repository}"
+ return False
+ if not
self.source_is_scm_staging_submission(source_project):
+ # Not a submission coming from the scm-sync bot
+ self.review_message['declined'] = "Expected a
submitrequest coming from scm-sync project"
+ return False
+
else:
# Check to see if other packages exist with the same source
project
# which indicates that the project has already been used as
devel.
@@ -192,7 +197,9 @@
if match:
inair_renamed = target_package != match.group(1)
- if not self.source_has_correct_maintainers(source_project):
+ # TODO(dmllr): ensure requird maintainers are set in the temporary
project that is created
+ # by the scm-staging bot
+ if not self.source_is_scm_staging_submission(source_project) and not
self.source_has_required_maintainers(source_project):
declined_msg = (
'This request cannot be accepted unless %s is a maintainer of
%s.' %
(self.required_maintainer, source_project)
@@ -210,15 +217,15 @@
return False
# Checkout and see if renaming package screws up version parsing.
- dir = os.path.expanduser('~/co/%s' % self.request.reqid)
- if os.path.exists(dir):
- self.logger.warning('directory %s already exists' % dir)
- shutil.rmtree(dir)
- os.makedirs(dir)
- os.chdir(dir)
+ copath = os.path.expanduser('~/co/%s' % self.request.reqid)
+ if os.path.exists(copath):
+ self.logger.warning('directory %s already exists' % copath)
+ shutil.rmtree(copath)
+ os.makedirs(copath)
+ os.chdir(copath)
try:
- CheckSource.checkout_package(self.apiurl, target_project,
target_package, pathname=dir,
+ CheckSource.checkout_package(self.apiurl, target_project,
target_package, pathname=copath,
server_service_files=True,
expand_link=True)
shutil.rmtree(os.path.join(target_package, '.osc'))
os.rename(target_package, '_old')
@@ -229,20 +236,25 @@
raise e
CheckSource.checkout_package(self.apiurl, source_project,
source_package, revision=source_revision,
- pathname=dir, server_service_files=True,
expand_link=True)
+ pathname=copath,
server_service_files=True, expand_link=True)
os.rename(source_package, target_package)
shutil.rmtree(os.path.join(target_package, '.osc'))
+ # TODO(dmllr): Fix in the source checker
+ with suppress(FileNotFoundError):
+ os.remove(os.path.join(target_package, '.gitattributes'))
new_info = self.package_source_parse(source_project, source_package,
source_revision, target_package)
filename = new_info.get('filename', '')
expected_name = target_package
if filename == '_preinstallimage':
expected_name = 'preinstallimage'
- if not (filename.endswith('.kiwi') or filename == 'Dockerfile') and
new_info['name'] != expected_name:
- shutil.rmtree(dir)
- self.review_messages['declined'] = "A package submitted as %s has
to build as 'Name: %s' - found Name '%s'" % (
- target_package, expected_name, new_info['name'])
- return False
+ # TODO(dmllr): self.package_source_parse cannot handle scm_sync
submissions, so skip the check for now
+ if not self.source_is_scm_staging_submission(source_project):
+ if not (filename.endswith('.kiwi') or filename == 'Dockerfile')
and new_info['name'] != expected_name:
+ shutil.rmtree(copath)
+ self.review_messages['declined'] = "A package submitted as %s
has to build as 'Name: %s' - found Name '%s'" % (
+ target_package, expected_name, new_info['name'])
+ return False
if not self.check_service_file(target_package):
return False
@@ -271,7 +283,7 @@
by_user=self.review_user,
message=self.review_messages['new'])
return None
- shutil.rmtree(dir)
+ shutil.rmtree(copath)
self.review_messages['accepted'] = 'Check script succeeded'
if self.skip_add_reviews:
@@ -425,7 +437,12 @@
return True
- def source_has_correct_maintainers(self, source_project):
+ def source_is_scm_staging_submission(self, source_project):
+ """Checks whether the source project is a scm_submission source
project"""
+
+ return any(source_project.startswith(allowed_src) for allowed_src in
self.allowed_scm_submission_sources)
+
+ def source_has_required_maintainers(self, source_project):
"""Checks whether the source project has the required maintainer
If a 'required-source-maintainer' is set, it checks whether it is a
@@ -686,7 +703,7 @@
if not npatches and not opatches:
return True
- patches_to_mention = dict()
+ patches_to_mention = {}
for p in opatches:
patches_to_mention[p] = 'old'
for p in npatches:
++++++ openSUSE-release-tools.obsinfo ++++++
--- /var/tmp/diff_new_pack.JPd9uA/_old 2023-06-29 17:29:26.950653253 +0200
+++ /var/tmp/diff_new_pack.JPd9uA/_new 2023-06-29 17:29:26.954653278 +0200
@@ -1,5 +1,5 @@
name: openSUSE-release-tools
-version: 20230627.8b1c308
-mtime: 1687892695
-commit: 8b1c308e45a61631513cc2ea7c14e18db3209b5d
+version: 20230629.3b612be
+mtime: 1688023684
+commit: 3b612be2daa7ecd1569bc7713dd15f3594e34d2f