From 0035855d694ae17ab3c67e4f56d219d2e7f00055 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Oct 05 2021 20:14:24 +0000 Subject: import rhc-0.2.0-2.el8 --- diff --git a/.gitignore b/.gitignore index 80c3eb9..50876d0 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/rhc-0.1.2.tar.gz +SOURCES/rhc-0.2.0.tar.gz diff --git a/.rhc.metadata b/.rhc.metadata index 35b81e9..b1110d3 100644 --- a/.rhc.metadata +++ b/.rhc.metadata @@ -1 +1 @@ -8e753a9b4a9047ee557ba0db57f1fd60eca5614d SOURCES/rhc-0.1.2.tar.gz +8f9f437c9d7ee2afe09b2000aa77fd384fc91d2f SOURCES/rhc-0.2.0.tar.gz diff --git a/SOURCES/0001-fix-Improve-output-during-disconnect.patch b/SOURCES/0001-fix-Improve-output-during-disconnect.patch new file mode 100644 index 0000000..2059b7e --- /dev/null +++ b/SOURCES/0001-fix-Improve-output-during-disconnect.patch @@ -0,0 +1,45 @@ +From 31db6e5a21afb62183ea6721fd79d515fc9b77b9 Mon Sep 17 00:00:00 2001 +From: Link Dupont +Date: Wed, 30 Jun 2021 12:36:17 -0400 +Subject: [PATCH 1/2] fix: Improve output during 'disconnect' + +Now print the status of the disconnection process, including the results afterwards. + +Fixes ESSNTL-837 + +Signed-off-by: Link Dupont +--- + cmd/ygg/main.go | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +diff --git a/cmd/ygg/main.go b/cmd/ygg/main.go +index 5226bce..f5c5c47 100644 +--- a/cmd/ygg/main.go ++++ b/cmd/ygg/main.go +@@ -162,17 +162,21 @@ func main() { + fmt.Printf("Disconnecting %v from %v.\nThis might take a few seconds.\n\n", hostname, yggdrasil.Provider) + + s := spinner.New(spinner.CharSets[9], 100*time.Millisecond) +- defer s.Stop() +- s.Suffix = " Disconnecting..." ++ s.Suffix = fmt.Sprintf(" Deactivating the %v daemon", yggdrasil.BrandName) + s.Start() + if err := deactivate(); err != nil { + return cli.Exit(err, 1) + } ++ s.Stop() ++ fmt.Printf(failPrefix+" Deactivated the %v daemon\n", yggdrasil.BrandName) + ++ s.Suffix = " Disconnecting from Red Hat Subscription Management..." ++ s.Start() + if err := unregister(); err != nil { + return cli.Exit(err, 1) + } + s.Stop() ++ fmt.Printf(failPrefix + " Disconnected from Red Hat Subscription Management\n") + + fmt.Printf("\nManage your Red Hat connector systems: https://red.ht/connector\n") + +-- +2.31.1 + diff --git a/SOURCES/0002-feat-Include-Description-in-help-output.patch b/SOURCES/0002-feat-Include-Description-in-help-output.patch new file mode 100644 index 0000000..bb66650 --- /dev/null +++ b/SOURCES/0002-feat-Include-Description-in-help-output.patch @@ -0,0 +1,34 @@ +From 1d2d42276b6acc8cba062da9536e8acae69034be Mon Sep 17 00:00:00 2001 +From: Link Dupont +Date: Wed, 30 Jun 2021 14:47:00 -0400 +Subject: [PATCH 2/2] feat: Include Description in help output + +Fixes ESSNTL-838 + +Signed-off-by: Link Dupont +--- + cmd/ygg/main.go | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/cmd/ygg/main.go b/cmd/ygg/main.go +index f5c5c47..5524347 100644 +--- a/cmd/ygg/main.go ++++ b/cmd/ygg/main.go +@@ -28,6 +28,14 @@ func main() { + app.Name = yggdrasil.ShortName + app.Version = yggdrasil.Version + app.Usage = "control the system's connection to " + yggdrasil.Provider ++ app.Description = "The " + app.Name + " command controls the system's connection to " + yggdrasil.Provider + ".\n\n" + ++ "To connect the system using an activation key:\n" + ++ "\t" + app.Name + " connect --organization ID --activation-key KEY\n\n" + ++ "To connect the system using a username and password:\n" + ++ "\t" + app.Name + " connect --username USERNAME --password PASSWORD\n\n" + ++ "To disconnect the system:\n" + ++ "\t" + app.Name + " disconnect\n\n" + ++ "Run '" + app.Name + " command --help' for more details." + + log.SetFlags(0) + log.SetPrefix("") +-- +2.31.1 + diff --git a/SOURCES/config.toml b/SOURCES/config.toml index b6fc5be..5e34c30 100644 --- a/SOURCES/config.toml +++ b/SOURCES/config.toml @@ -1,4 +1,4 @@ -# yggdrasil global configuration settings +# rhc global configuration settings broker = ["wss://connect.cloud.redhat.com:443"] cert-file = "/etc/pki/consumer/cert.pem" diff --git a/SPECS/rhc.spec b/SPECS/rhc.spec index 34a21b5..3991fbf 100644 --- a/SPECS/rhc.spec +++ b/SPECS/rhc.spec @@ -1,7 +1,7 @@ %define debug_package %{nil} Name: rhc -Version: 0.1.2 +Version: 0.2.0 Release: 2%{?dist} Epoch: 1 Summary: Message dispatch agent for cloud-connected systems @@ -11,6 +11,10 @@ URL: https://github.com/redhatinsights/yggdrasil Source0: %{name}-%{version}.tar.gz Source1: config.toml +# Fixed upstream +Patch0: 0001-fix-Improve-output-during-disconnect.patch +Patch1: 0002-feat-Include-Description-in-help-output.patch + ExclusiveArch: %{go_arches} BuildRequires: git @@ -24,7 +28,7 @@ BuildRequires: systemd-devel a receiving queue for instructions to be sent to the system via a broker. %prep -%autosetup +%autosetup -p1 %build @@ -35,7 +39,10 @@ make PREFIX=%{_prefix} \ LONGNAME=%{name} \ PKGNAME=%{name} \ 'BRANDNAME=Red Hat connector' \ - TOPICPREFIX=redhat/insights + TOPICPREFIX=redhat/insights \ + VERSION=%{version} \ + DATAHOST=cert.cloud.redhat.com \ + 'PROVIDER=Red Hat' %install @@ -48,6 +55,9 @@ make PREFIX=%{_prefix} \ PKGNAME=%{name} \ 'BRANDNAME=Red Hat connector' \ TOPICPREFIX=redhat/insights \ + VERSION=%{version} \ + DATAHOST=cert.cloud.redhat.com \ + 'PROVIDER=Red Hat' \ install %{__install} -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/%{name}/ @@ -56,7 +66,7 @@ make PREFIX=%{_prefix} \ %doc README.md %{_bindir}/%{name} %{_sbindir}/%{name}d -%{_sysconfdir}/%{name}/config.toml +%config(noreplace) %{_sysconfdir}/%{name}/config.toml %{_unitdir}/%{name}d.service %{_datadir}/bash-completion/completions/* %{_mandir}/man1/* @@ -65,6 +75,19 @@ make PREFIX=%{_prefix} \ %changelog +* Thu Jul 1 2021 Link Dupont - 0.2.0-2 +- Add two patches that fix some UX issues + +* Mon Jun 28 2021 Link Dupont - 0.2.0-1 +- New upstream release +- Mark config file as a noreplace config file + +* Wed Apr 28 2021 Link Dupont - 0.1.4-2 +- Rebuild for fixed binutils on aarch64 (Resolves: RHBZ#1954449) + +* Fri Apr 9 2021 Link Dupont - 0.1.4-1 +- New upstream release + * Fri Feb 19 2021 Link Dupont - 0.1.2-2 - Update default broker URI - Set Epoch to 1