From 85d19ea593610de7fe113e4e1a01099a5039214aacd5158b342b741d642c36d5 Mon Sep 17 00:00:00 2001 From: Miquel Sabate Sola Date: Wed, 7 Jun 2023 06:16:00 +0000 Subject: [PATCH] - Update to version 1.1.0~git2.f42b4b2a060e: * Keep keepalive timer states when replacing SUSEConnect (bsc#1211588) OBS-URL: https://build.opensuse.org/package/show/systemsmanagement:SCC/suseconnect-ng?expand=0&rev=57 --- _servicedata | 2 +- connect-ng-1.1.0~git0.e3c41e60892e.tar.xz | 3 --- connect-ng-1.1.0~git2.f42b4b2a060e.tar.xz | 3 +++ suseconnect-ng.changes | 6 ++++++ suseconnect-ng.spec | 19 ++++++++++++++++++- 5 files changed, 28 insertions(+), 5 deletions(-) delete mode 100644 connect-ng-1.1.0~git0.e3c41e60892e.tar.xz create mode 100644 connect-ng-1.1.0~git2.f42b4b2a060e.tar.xz diff --git a/_servicedata b/_servicedata index a57143a..7af9b7b 100644 --- a/_servicedata +++ b/_servicedata @@ -1,4 +1,4 @@ https://github.com/SUSE/connect-ng.git - 472bdddd7894f8ddbf002143d472b5052a84d633 \ No newline at end of file + f42b4b2a060e4235acf8f6b9e236abd12f088b98 \ No newline at end of file diff --git a/connect-ng-1.1.0~git0.e3c41e60892e.tar.xz b/connect-ng-1.1.0~git0.e3c41e60892e.tar.xz deleted file mode 100644 index f890c9e..0000000 --- a/connect-ng-1.1.0~git0.e3c41e60892e.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:22eeb2ba64f8849ae967054cc6ce33686ca49d27bc57cf0850d28d809d2fcde3 -size 78948 diff --git a/connect-ng-1.1.0~git2.f42b4b2a060e.tar.xz b/connect-ng-1.1.0~git2.f42b4b2a060e.tar.xz new file mode 100644 index 0000000..acb6fae --- /dev/null +++ b/connect-ng-1.1.0~git2.f42b4b2a060e.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:591eba0faf9740008af0076aabe8e634d671564ad4e50dd0bbe8e4b69a521150 +size 79172 diff --git a/suseconnect-ng.changes b/suseconnect-ng.changes index 862f0ea..831072e 100644 --- a/suseconnect-ng.changes +++ b/suseconnect-ng.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Jun 07 06:11:07 UTC 2023 - msabate@suse.com + +- Update to version 1.1.0~git2.f42b4b2a060e: + * Keep keepalive timer states when replacing SUSEConnect (bsc#1211588) + ------------------------------------------------------------------- Fri Mar 17 10:34:15 UTC 2023 - msabate@suse.com diff --git a/suseconnect-ng.spec b/suseconnect-ng.spec index 3daa363..8a37e78 100644 --- a/suseconnect-ng.spec +++ b/suseconnect-ng.spec @@ -23,7 +23,7 @@ %bcond_with hwinfo Name: suseconnect-ng -Version: 1.1.0~git0.e3c41e60892e +Version: 1.1.0~git2.f42b4b2a060e Release: 0 URL: https://github.com/SUSE/connect-ng Summary: Utility to register a system with the SUSE Customer Center @@ -187,6 +187,13 @@ about these improvements and any ideas you might have. EOF fi +# If the keepalive timer exists on package install (not upgrade), then we are replacing SUSEConnect. +# Record the enabled and active statuses so they can be restored in %posttrans. +if [ "$1" -eq 1 ]; then + /usr/bin/systemctl is-enabled suseconnect-keepalive.timer >/dev/null 2>&1 && touch /run/suseconnect-keepalive.timer.is-enabled || : + /usr/bin/systemctl is-active suseconnect-keepalive.timer >/dev/null 2>&1 && touch /run/suseconnect-keepalive.timer.is-active || : +fi + %post %service_add_post suseconnect-keepalive.service suseconnect-keepalive.timer @@ -196,6 +203,16 @@ fi %postun %service_del_postun suseconnect-keepalive.service suseconnect-keepalive.timer +%posttrans +if [ -e /run/suseconnect-keepalive.timer.is-enabled ]; then + /usr/bin/systemctl enable suseconnect-keepalive.timer >/dev/null 2>&1 || : + rm /run/suseconnect-keepalive.timer.is-enabled ||: +fi +if [ -e /run/suseconnect-keepalive.timer.is-active ]; then + /usr/bin/systemctl start suseconnect-keepalive.timer >/dev/null 2>&1 || : + rm /run/suseconnect-keepalive.timer.is-active ||: +fi + %check %gotest -v %import_path/internal/connect %{?test_hwinfo_args} %gotest -v %import_path/suseconnect