diff --git a/_service b/_service index 613796a..89b1649 100644 --- a/_service +++ b/_service @@ -9,11 +9,12 @@ https://github.com/SUSE/connect-ng.git main _auto_ - @PARENT_TAG@~git@TAG_OFFSET@.%h - connect-ng + v* v(\d+\.\d+\.\d+) \1 + @PARENT_TAG@ + suseconnect-ng enable no vendor @@ -23,10 +24,10 @@ xz - connect-ng*.tar.xz - connect-ng-*/suseconnect-ng.spec - connect-ng-*/suseconnect-ng.changes - connect-ng-*/suseconnect-ng-rpmlintrc + suseconnect-ng*.tar.xz + suseconnect-ng-*/suseconnect-ng.spec + suseconnect-ng-*/suseconnect-ng.changes + suseconnect-ng-*/suseconnect-ng-rpmlintrc suseconnect-ng.spec diff --git a/_servicedata b/_servicedata index f29fd4f..170fc5d 100644 --- a/_servicedata +++ b/_servicedata @@ -1,4 +1,4 @@ https://github.com/SUSE/connect-ng.git - 21ba08ee39e18e237d920dba3f66db4faebdf47f \ No newline at end of file + aa46faa190124664fa45c5c04667c8e1736b48b8 \ No newline at end of file diff --git a/connect-ng-1.7.0~git2.21ba08e.tar.xz b/connect-ng-1.7.0~git2.21ba08e.tar.xz deleted file mode 100644 index 61f4ab0..0000000 --- a/connect-ng-1.7.0~git2.21ba08e.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0a2ff4b1a5df95c83ad7f2b7b9e482312023d05173c05d0a8bb7c4acccdb0734 -size 92092 diff --git a/suseconnect-ng-1.8.0.tar.xz b/suseconnect-ng-1.8.0.tar.xz new file mode 100644 index 0000000..10105f0 --- /dev/null +++ b/suseconnect-ng-1.8.0.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b468054dd8298c539027d13f15c330f047c1214c341d46c71ba267cdbcec4cd2 +size 97976 diff --git a/suseconnect-ng.changes b/suseconnect-ng.changes index f229ee6..77c6766 100644 --- a/suseconnect-ng.changes +++ b/suseconnect-ng.changes @@ -1,7 +1,13 @@ +------------------------------------------------------------------- +Wed Mar 13 12:37:29 UTC 2024 - José Gómez <1josegomezr@gmail.com> + +- Update to version 1.8.0 + * Allow "--rollback" flag to run on readonly filesystem (bsc#1220679) + ------------------------------------------------------------------- Wed Feb 14 18:28 UTC 2024 - Felix Schnizlein -- Update to version 1.7.0~git2.21ba08e +- Update to version 1.7.0 * Allow SUSEConnect on read write transactional systems (bsc#1219425) ------------------------------------------------------------------- diff --git a/suseconnect-ng.spec b/suseconnect-ng.spec index 6fc7fcd..a02219d 100644 --- a/suseconnect-ng.spec +++ b/suseconnect-ng.spec @@ -16,48 +16,30 @@ # -%global provider_prefix github.com/SUSE/connect-ng -%global import_path %{provider_prefix} - -# set this to enable hwinfo test in %check -%bcond_with hwinfo +%global project github.com/SUSE/connect-ng Name: suseconnect-ng -# the version will get set by the 'set_version' service -Version: 1.7.0~git2.21ba08e +Version: 1.8.0 Release: 0 URL: https://github.com/SUSE/connect-ng License: LGPL-2.1-or-later Summary: Utility to register a system with the SUSE Customer Center Group: System/Management -Source: connect-ng-%{version}.tar.xz -Source1: %name-rpmlintrc +Source: suseconnect-ng-%{version}.tar.xz +Source1: %{name}-rpmlintrc # Build against latest golang in Tumbleweed and # go1.18-openssl on all other distributions -%if 0%{?suse_version} >= 1600 +%if 0%{?suse_version} > 1600 BuildRequires: golang(API) %else -BuildRequires: go1.18-openssl +BuildRequires: go1.21-openssl %endif -BuildRequires: golang-packaging BuildRequires: ruby-devel BuildRequires: zypper ExcludeArch: %ix86 s390 ppc64 -%if %{with hwinfo} -%global test_hwinfo_args -test-hwinfo - -# packages required only for hwinfo tests -%ifarch ia64 x86_64 %arm aarch64 -BuildRequires: dmidecode -%endif -%ifarch s390x -BuildRequires: s390-tools -%endif -BuildRequires: systemd -%endif Obsoletes: SUSEConnect < 1.1.0 Provides: SUSEConnect = %version @@ -65,11 +47,13 @@ Obsoletes: zypper-migration-plugin < 0.99 Provides: zypper-migration-plugin = 0.99 Obsoletes: zypper-search-packages-plugin < 0.99 Provides: zypper-search-packages-plugin = 0.99 + %if 0%{?suse_version} Requires: ca-certificates-mozilla %else Requires: ca-certificates %endif + Requires: coreutils # ExclusiveArch from this package %ifarch ia64 x86_64 %arm aarch64 @@ -93,9 +77,6 @@ product subscriptions and enable the product repositories/services locally. suseconnect-ng reduces the size of its runtime dependencies compared to the replaced SUSEConnect. - -%{go_provides} - %package -n libsuseconnect Summary: C interface to suseconnect-ng Group: System/Management @@ -119,43 +100,45 @@ Provides: rubygem(ruby:2.5.0:suse-connect) This package provides bindings needed to use libsuseconnect from Ruby scripts. %prep -%setup -q -n connect-ng-%{version} +%autosetup -p 1 -n %{name}-%{version} %build -find %_builddir/.. +# the binary echo %{version} > internal/connect/version.txt -%goprep %{import_path} -find %_builddir/.. -go list all -%gobuild suseconnect +go build -v -ldflags "-s -w" -buildmode=pie -o bin/suseconnect %{project}/suseconnect + +# the library mkdir -p %_builddir/go/lib -go build -v -buildmode=c-shared -o %_builddir/go/lib/libsuseconnect.so %import_path/libsuseconnect -find %_builddir/.. +go build -v -ldflags "-s -w" -buildmode=c-shared -o lib/libsuseconnect.so %{project}/libsuseconnect %install -%goinstall -ln -s suseconnect %buildroot/%_bindir/SUSEConnect -install -d -m0755 %buildroot/%_sbindir %buildroot/usr/lib/zypper/commands -ln -s %_bindir/suseconnect %buildroot/%_sbindir/SUSEConnect -ln -s %_bindir/suseconnect %buildroot/usr/lib/zypper/commands/zypper-migration -ln -s %_bindir/suseconnect %buildroot/usr/lib/zypper/commands/zypper-search-packages -install -D -m0755 %_builddir/go/lib/libsuseconnect.so %buildroot/%_libdir/libsuseconnect.so -install -d -m0755 %buildroot/%_libdir/ruby/vendor_ruby/%rb_ver -cp -r %_builddir/go/src/%import_path/yast/lib/* %buildroot/%_libdir/ruby/vendor_ruby/%rb_ver -install -D -m 644 %_builddir/go/src/%import_path/man/SUSEConnect.5 %buildroot/%_mandir/man5/SUSEConnect.5 -install -D -m 644 %_builddir/go/src/%import_path/man/SUSEConnect.8 %buildroot/%_mandir/man8/SUSEConnect.8 -install -D -m 644 %_builddir/go/src/%import_path/man/zypper-migration.8 %buildroot/%_mandir/man8/zypper-migration.8 -install -D -m 644 %_builddir/go/src/%import_path/man/zypper-search-packages.8 %buildroot/%_mandir/man8/zypper-search-packages.8 -install -D -m 644 %_builddir/go/src/%import_path/SUSEConnect.example %{buildroot}%_sysconfdir/SUSEConnect.example +# Install binary + symlinks +install -D -m 0755 bin/suseconnect %{buildroot}/%{_bindir}/suseconnect +install -d -m 0755 %{buildroot}/%{_sbindir} %{buildroot}/usr/lib/zypper/commands +ln -s %{_bindir}/suseconnect %{buildroot}/%{_bindir}/SUSEConnect +ln -s %{_bindir}/suseconnect %{buildroot}/%{_sbindir}/SUSEConnect +ln -s %{_bindir}/suseconnect %{buildroot}/usr/lib/zypper/commands/zypper-migration +ln -s %{_bindir}/suseconnect %{buildroot}/usr/lib/zypper/commands/zypper-search-packages + +# Install library + ruby bindings +install -D -m 0755 lib/libsuseconnect.so %{buildroot}/%{_libdir}/libsuseconnect.so +install -d -m 0755 %{buildroot}/%{_libdir}/ruby/vendor_ruby/%{rb_ver} +cp -r yast/lib/* %{buildroot}/%{_libdir}/ruby/vendor_ruby/%{rb_ver} + +# Install metadata +install -D -m 644 man/SUSEConnect.5 %{buildroot}/%{_mandir}/man5/SUSEConnect.5 +install -D -m 644 man/SUSEConnect.8 %{buildroot}/%{_mandir}/man8/SUSEConnect.8 +install -D -m 644 man/zypper-migration.8 %{buildroot}/%{_mandir}/man8/zypper-migration.8 +install -D -m 644 man/zypper-search-packages.8 %{buildroot}/%{_mandir}/man8/zypper-search-packages.8 +install -D -m 644 SUSEConnect.example %{buildroot}%{_sysconfdir}/SUSEConnect.example # Install the SUSEConnect --keepalive timer and service. -install -D -m 644 %_builddir/go/src/%import_path/suseconnect-keepalive.timer %buildroot/%_unitdir/suseconnect-keepalive.timer -install -D -m 644 %_builddir/go/src/%import_path/suseconnect-keepalive.service %buildroot/%_unitdir/suseconnect-keepalive.service -ln -sf service %buildroot/%_sbindir/rcsuseconnect-keepalive +install -D -m 644 suseconnect-keepalive.timer %{buildroot}/%{_unitdir}/suseconnect-keepalive.timer +install -D -m 644 suseconnect-keepalive.service %{buildroot}/%{_unitdir}/suseconnect-keepalive.service +ln -sf service %{buildroot}/%{_sbindir}/rcsuseconnect-keepalive -find %_builddir/.. # we currently do not ship the source for any go module -rm -rf %buildroot/usr/share/go +rm -rf %{buildroot}/usr/share/go %pre %service_add_pre suseconnect-keepalive.service suseconnect-keepalive.timer @@ -196,7 +179,7 @@ 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. +# Record the enabled and active statuses so they can be restored in posttrans macro. 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 || : @@ -228,31 +211,26 @@ if [ -e /run/suseconnect-keepalive.timer.is-active ]; then rm /run/suseconnect-keepalive.timer.is-active ||: fi -%check -%gotest -v %import_path/internal/connect %{?test_hwinfo_args} -%gotest -v %import_path/suseconnect -make -C %_builddir/go/src/%import_path gofmt - %files %license LICENSE LICENSE.LGPL %doc README.md -%_bindir/suseconnect -%_bindir/SUSEConnect -%_sbindir/SUSEConnect -%_sbindir/rcsuseconnect-keepalive +%{_bindir}/suseconnect +%{_bindir}/SUSEConnect +%{_sbindir}/SUSEConnect +%{_sbindir}/rcsuseconnect-keepalive /usr/lib/zypper/commands -%_mandir/man8/* -%_mandir/man5/* -%_unitdir/suseconnect-keepalive.service -%_unitdir/suseconnect-keepalive.timer +%{_mandir}/man8/* +%{_mandir}/man5/* +%{_unitdir}/suseconnect-keepalive.service +%{_unitdir}/suseconnect-keepalive.timer %config %{_sysconfdir}/SUSEConnect.example %files -n libsuseconnect %license LICENSE LICENSE.LGPL -%_libdir/libsuseconnect.so +%{_libdir}/libsuseconnect.so %files -n suseconnect-ruby-bindings %doc yast/README.md -%_libdir/ruby/vendor_ruby/%rb_ver/suse +%{_libdir}/ruby/vendor_ruby/%rb_ver/suse %changelog