Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-certbot-dns-google for openSUSE:Factory checked in at 2022-04-16 00:14:36 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-certbot-dns-google (Old) and /work/SRC/openSUSE:Factory/.python-certbot-dns-google.new.1941 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-certbot-dns-google" Sat Apr 16 00:14:36 2022 rev:33 rq:970264 version:1.26.0 Changes: -------- --- /work/SRC/openSUSE:Factory/python-certbot-dns-google/python-certbot-dns-google.changes 2022-04-08 22:46:26.718655285 +0200 +++ /work/SRC/openSUSE:Factory/.python-certbot-dns-google.new.1941/python-certbot-dns-google.changes 2022-04-16 00:14:58.749707577 +0200 @@ -1,0 +2,6 @@ +Thu Apr 14 21:24:57 UTC 2022 - Ben Greiner <c...@bnavigator.de> + +- Add certbot-pr8928-replace-oauth2client.patch + gh#certbot/certbot#8928 + +------------------------------------------------------------------- New: ---- certbot-pr8928-replace-oauth2client.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-certbot-dns-google.spec ++++++ --- /var/tmp/diff_new_pack.BtbRL2/_old 2022-04-16 00:14:59.325708346 +0200 +++ /var/tmp/diff_new_pack.BtbRL2/_new 2022-04-16 00:14:59.329708351 +0200 @@ -25,9 +25,11 @@ License: Apache-2.0 URL: https://github.com/certbot/certbot Source: https://files.pythonhosted.org/packages/source/c/certbot-dns-google/certbot-dns-google-%{version}.tar.gz +# PATCH-FIX-UPSTREAM certbot-pr8928-replace-oauth2client.patch -- gh#certbot/certbot#8928 +Patch0: certbot-pr8928-replace-oauth2client.patch BuildRequires: %{python_module certbot >= %{version}} BuildRequires: %{python_module google-api-python-client >= 1.5.5} -BuildRequires: %{python_module oauth2client >= 4.0} +BuildRequires: %{python_module google-auth >= 1.32.1} BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools} BuildRequires: fdupes @@ -35,7 +37,7 @@ Requires: python-acme >= %{version} Requires: python-certbot >= %{version} Requires: python-google-api-python-client >= 1.5.5 -Requires: python-oauth2client >= 4.0 +Requires: python-google-auth >= 1.32.1 Requires: python-zope.interface BuildArch: noarch %python_subpackages @@ -44,7 +46,7 @@ Google Cloud DNS Authenticator plugin for Certbot. %prep -%setup -q -n certbot-dns-google-%{version} +%autosetup -p1 -n certbot-dns-google-%{version} %build %python_build ++++++ certbot-pr8928-replace-oauth2client.patch ++++++ diff -ur certbot-dns-google-1.26.0/certbot_dns_google/_internal/dns_google.py certbot-dns-google-1.26.0.patched/certbot_dns_google/_internal/dns_google.py --- certbot-dns-google-1.26.0/certbot_dns_google/_internal/dns_google.py 2022-04-05 19:41:26.000000000 +0200 +++ certbot-dns-google-1.26.0.patched/certbot_dns_google/_internal/dns_google.py 2022-04-14 23:33:21.655685158 +0200 @@ -9,7 +9,7 @@ from googleapiclient import discovery from googleapiclient import errors as googleapiclient_errors import httplib2 -from oauth2client.service_account import ServiceAccountCredentials +from google.oauth2.service_account import Credentials from certbot import errors from certbot.plugins import dns_common @@ -84,7 +84,7 @@ scopes = ['https://www.googleapis.com/auth/ndev.clouddns.readwrite'] if account_json is not None: try: - credentials = ServiceAccountCredentials.from_json_keyfile_name(account_json, scopes) + credentials = Credentials.from_service_account_file(account_json, scopes=scopes) with open(account_json) as account: self.project_id = json.load(account)['project_id'] except Exception as e: Nur in certbot-dns-google-1.26.0.patched/certbot_dns_google/_internal: dns_google.py.rej. diff -ur certbot-dns-google-1.26.0/setup.py certbot-dns-google-1.26.0.patched/setup.py --- certbot-dns-google-1.26.0/setup.py 2022-04-05 19:41:27.000000000 +0200 +++ certbot-dns-google-1.26.0.patched/setup.py 2022-04-14 23:32:13.462011363 +0200 @@ -8,7 +8,7 @@ install_requires = [ 'google-api-python-client>=1.5.5', - 'oauth2client>=4.0', + 'google-auth>=1.32.1', 'setuptools>=41.6.0', # already a dependency of google-api-python-client, but added for consistency 'httplib2' Nur in certbot-dns-google-1.26.0.patched: setup.py.rej. diff -ur certbot-dns-google-1.26.0/tests/dns_google_test.py certbot-dns-google-1.26.0.patched/tests/dns_google_test.py --- certbot-dns-google-1.26.0/tests/dns_google_test.py 2022-04-05 19:41:26.000000000 +0200 +++ certbot-dns-google-1.26.0.patched/tests/dns_google_test.py 2022-04-14 23:29:26.673917555 +0200 @@ -107,7 +107,7 @@ return client, mock_changes @mock.patch('googleapiclient.discovery.build') - @mock.patch('oauth2client.service_account.ServiceAccountCredentials.from_json_keyfile_name') + @mock.patch('google.oauth2.service_account.Credentials.from_service_account_file') @mock.patch('certbot_dns_google._internal.dns_google._GoogleClient.get_project_id') def test_client_without_credentials(self, get_project_id_mock, credential_mock, unused_discovery_mock): @@ -116,24 +116,24 @@ self.assertFalse(credential_mock.called) self.assertTrue(get_project_id_mock.called) - @mock.patch('oauth2client.service_account.ServiceAccountCredentials.from_json_keyfile_name') + @mock.patch('google.oauth2.service_account.Credentials.from_service_account_file') def test_client_bad_credentials_file(self, credential_mock): - credential_mock.side_effect = ValueError('Some exception buried in oauth2client') + credential_mock.side_effect = ValueError('Some exception buried in google-auth') with self.assertRaises(errors.PluginError) as cm: self._setUp_client_with_mock([]) self.assertEqual( str(cm.exception), "Error parsing credentials file '/not/a/real/path.json': " - "Some exception buried in oauth2client" + "Some exception buried in google-auth" ) - @mock.patch('oauth2client.service_account.ServiceAccountCredentials.from_json_keyfile_name') + @mock.patch('google.oauth2.service_account.Credentials.from_service_account_file') @mock.patch('certbot_dns_google._internal.dns_google.open', mock.mock_open(read_data='{"project_id": "' + PROJECT_ID + '"}'), create=True) @mock.patch('certbot_dns_google._internal.dns_google._GoogleClient.get_project_id') def test_add_txt_record(self, get_project_id_mock, credential_mock): client, changes = self._setUp_client_with_mock([{'managedZones': [{'id': self.zone}]}]) - credential_mock.assert_called_once_with('/not/a/real/path.json', mock.ANY) + credential_mock.assert_called_once_with('/not/a/real/path.json', scopes=mock.ANY) self.assertFalse(get_project_id_mock.called) client.add_txt_record(DOMAIN, self.record_name, self.record_content, self.record_ttl) @@ -155,7 +155,7 @@ managedZone=self.zone, project=PROJECT_ID) - @mock.patch('oauth2client.service_account.ServiceAccountCredentials.from_json_keyfile_name') + @mock.patch('google.oauth2.service_account.Credentials.from_service_account_file') @mock.patch('certbot_dns_google._internal.dns_google.open', mock.mock_open(read_data='{"project_id": "' + PROJECT_ID + '"}'), create=True) def test_add_txt_record_and_poll(self, unused_credential_mock): @@ -173,7 +173,7 @@ managedZone=self.zone, project=PROJECT_ID) - @mock.patch('oauth2client.service_account.ServiceAccountCredentials.from_json_keyfile_name') + @mock.patch('google.oauth2.service_account.Credentials.from_service_account_file') @mock.patch('certbot_dns_google._internal.dns_google.open', mock.mock_open(read_data='{"project_id": "' + PROJECT_ID + '"}'), create=True) def test_add_txt_record_delete_old(self, unused_credential_mock): @@ -189,7 +189,7 @@ self.assertIn("sample-txt-contents", deletions["rrdatas"]) self.assertEqual(self.record_ttl, deletions["ttl"]) - @mock.patch('oauth2client.service_account.ServiceAccountCredentials.from_json_keyfile_name') + @mock.patch('google.oauth2.service_account.Credentials.from_service_account_file') @mock.patch('certbot_dns_google._internal.dns_google.open', mock.mock_open(read_data='{"project_id": "' + PROJECT_ID + '"}'), create=True) def test_add_txt_record_delete_old_ttl_case(self, unused_credential_mock): @@ -206,7 +206,7 @@ self.assertIn("sample-txt-contents", deletions["rrdatas"]) self.assertEqual(custom_ttl, deletions["ttl"]) #otherwise HTTP 412 - @mock.patch('oauth2client.service_account.ServiceAccountCredentials.from_json_keyfile_name') + @mock.patch('google.oauth2.service_account.Credentials.from_service_account_file') @mock.patch('certbot_dns_google._internal.dns_google.open', mock.mock_open(read_data='{"project_id": "' + PROJECT_ID + '"}'), create=True) def test_add_txt_record_noop(self, unused_credential_mock): @@ -216,7 +216,7 @@ "example-txt-contents", self.record_ttl) self.assertIs(changes.create.called, False) - @mock.patch('oauth2client.service_account.ServiceAccountCredentials.from_json_keyfile_name') + @mock.patch('google.oauth2.service_account.Credentials.from_service_account_file') @mock.patch('certbot_dns_google._internal.dns_google.open', mock.mock_open(read_data='{"project_id": "' + PROJECT_ID + '"}'), create=True) def test_add_txt_record_error_during_zone_lookup(self, unused_credential_mock): @@ -225,7 +225,7 @@ self.assertRaises(errors.PluginError, client.add_txt_record, DOMAIN, self.record_name, self.record_content, self.record_ttl) - @mock.patch('oauth2client.service_account.ServiceAccountCredentials.from_json_keyfile_name') + @mock.patch('google.oauth2.service_account.Credentials.from_service_account_file') @mock.patch('certbot_dns_google._internal.dns_google.open', mock.mock_open(read_data='{"project_id": "' + PROJECT_ID + '"}'), create=True) def test_add_txt_record_zone_not_found(self, unused_credential_mock): @@ -235,7 +235,7 @@ self.assertRaises(errors.PluginError, client.add_txt_record, DOMAIN, self.record_name, self.record_content, self.record_ttl) - @mock.patch('oauth2client.service_account.ServiceAccountCredentials.from_json_keyfile_name') + @mock.patch('google.oauth2.service_account.Credentials.from_service_account_file') @mock.patch('certbot_dns_google._internal.dns_google.open', mock.mock_open(read_data='{"project_id": "' + PROJECT_ID + '"}'), create=True) def test_add_txt_record_error_during_add(self, unused_credential_mock): @@ -245,7 +245,7 @@ self.assertRaises(errors.PluginError, client.add_txt_record, DOMAIN, self.record_name, self.record_content, self.record_ttl) - @mock.patch('oauth2client.service_account.ServiceAccountCredentials.from_json_keyfile_name') + @mock.patch('google.oauth2.service_account.Credentials.from_service_account_file') @mock.patch('certbot_dns_google._internal.dns_google.open', mock.mock_open(read_data='{"project_id": "' + PROJECT_ID + '"}'), create=True) def test_del_txt_record_multi_rrdatas(self, unused_credential_mock): @@ -284,7 +284,7 @@ managedZone=self.zone, project=PROJECT_ID) - @mock.patch('oauth2client.service_account.ServiceAccountCredentials.from_json_keyfile_name') + @mock.patch('google.oauth2.service_account.Credentials.from_service_account_file') @mock.patch('certbot_dns_google._internal.dns_google.open', mock.mock_open(read_data='{"project_id": "' + PROJECT_ID + '"}'), create=True) def test_del_txt_record_single_rrdatas(self, unused_credential_mock): @@ -313,7 +313,7 @@ managedZone=self.zone, project=PROJECT_ID) - @mock.patch('oauth2client.service_account.ServiceAccountCredentials.from_json_keyfile_name') + @mock.patch('google.oauth2.service_account.Credentials.from_service_account_file') @mock.patch('certbot_dns_google._internal.dns_google.open', mock.mock_open(read_data='{"project_id": "' + PROJECT_ID + '"}'), create=True) def test_del_txt_record_error_during_zone_lookup(self, unused_credential_mock): @@ -321,7 +321,7 @@ client.del_txt_record(DOMAIN, self.record_name, self.record_content, self.record_ttl) changes.create.assert_not_called() - @mock.patch('oauth2client.service_account.ServiceAccountCredentials.from_json_keyfile_name') + @mock.patch('google.oauth2.service_account.Credentials.from_service_account_file') @mock.patch('certbot_dns_google._internal.dns_google.open', mock.mock_open(read_data='{"project_id": "' + PROJECT_ID + '"}'), create=True) def test_del_txt_record_zone_not_found(self, unused_credential_mock): @@ -330,7 +330,7 @@ client.del_txt_record(DOMAIN, self.record_name, self.record_content, self.record_ttl) changes.create.assert_not_called() - @mock.patch('oauth2client.service_account.ServiceAccountCredentials.from_json_keyfile_name') + @mock.patch('google.oauth2.service_account.Credentials.from_service_account_file') @mock.patch('certbot_dns_google._internal.dns_google.open', mock.mock_open(read_data='{"project_id": "' + PROJECT_ID + '"}'), create=True) def test_del_txt_record_error_during_delete(self, unused_credential_mock): @@ -339,7 +339,7 @@ client.del_txt_record(DOMAIN, self.record_name, self.record_content, self.record_ttl) - @mock.patch('oauth2client.service_account.ServiceAccountCredentials.from_json_keyfile_name') + @mock.patch('google.oauth2.service_account.Credentials.from_service_account_file') @mock.patch('certbot_dns_google._internal.dns_google.open', mock.mock_open(read_data='{"project_id": "' + PROJECT_ID + '"}'), create=True) def test_get_existing_found(self, unused_credential_mock): @@ -350,7 +350,7 @@ self.assertEqual(found["rrdatas"], ["\"example-txt-contents\""]) self.assertEqual(found["ttl"], 60) - @mock.patch('oauth2client.service_account.ServiceAccountCredentials.from_json_keyfile_name') + @mock.patch('google.oauth2.service_account.Credentials.from_service_account_file') @mock.patch('certbot_dns_google._internal.dns_google.open', mock.mock_open(read_data='{"project_id": "' + PROJECT_ID + '"}'), create=True) def test_get_existing_not_found(self, unused_credential_mock): @@ -359,7 +359,7 @@ not_found = client.get_existing_txt_rrset(self.zone, "nonexistent.tld") self.assertIsNone(not_found) - @mock.patch('oauth2client.service_account.ServiceAccountCredentials.from_json_keyfile_name') + @mock.patch('google.oauth2.service_account.Credentials.from_service_account_file') @mock.patch('certbot_dns_google._internal.dns_google.open', mock.mock_open(read_data='{"project_id": "' + PROJECT_ID + '"}'), create=True) def test_get_existing_with_error(self, unused_credential_mock): @@ -369,7 +369,7 @@ found = client.get_existing_txt_rrset(self.zone, "_acme-challenge.example.org") self.assertIsNone(found) - @mock.patch('oauth2client.service_account.ServiceAccountCredentials.from_json_keyfile_name') + @mock.patch('google.oauth2.service_account.Credentials.from_service_account_file') @mock.patch('certbot_dns_google._internal.dns_google.open', mock.mock_open(read_data='{"project_id": "' + PROJECT_ID + '"}'), create=True) def test_get_existing_fallback(self, unused_credential_mock):