Sync from SUSE:ALP:Source:Standard:1.0 suseconnect-ng revision 14471ac52b7bf0d7986c0d954ecff3b2

This commit is contained in:
Adrian Schröter 2024-03-29 17:00:21 +01:00
parent eea255b35b
commit 6c97886e3b
6 changed files with 66 additions and 81 deletions

View File

@ -9,11 +9,12 @@
<param name="url">https://github.com/SUSE/connect-ng.git</param> <param name="url">https://github.com/SUSE/connect-ng.git</param>
<param name="revision">main</param> <param name="revision">main</param>
<param name="version">_auto_</param> <param name="version">_auto_</param>
<param name="versionformat">@PARENT_TAG@~git@TAG_OFFSET@.%h</param>
<param name="filename">connect-ng</param>
<param name="match-tag">v*</param> <param name="match-tag">v*</param>
<param name="versionrewrite-pattern">v(\d+\.\d+\.\d+)</param> <param name="versionrewrite-pattern">v(\d+\.\d+\.\d+)</param>
<param name="versionrewrite-replacement">\1</param> <param name="versionrewrite-replacement">\1</param>
<param name="versionformat">@PARENT_TAG@</param>
<param name="filename">suseconnect-ng</param>
<param name="changesgenerate">enable</param> <param name="changesgenerate">enable</param>
<param name="package-meta">no</param> <param name="package-meta">no</param>
<param name="exclude">vendor</param> <param name="exclude">vendor</param>
@ -23,10 +24,10 @@
<param name="compression">xz</param> <param name="compression">xz</param>
</service> </service>
<service name="extract_file" mode="manual"> <service name="extract_file" mode="manual">
<param name="archive">connect-ng*.tar.xz</param> <param name="archive">suseconnect-ng*.tar.xz</param>
<param name="files">connect-ng-*/suseconnect-ng.spec</param> <param name="files">suseconnect-ng-*/suseconnect-ng.spec</param>
<param name="files">connect-ng-*/suseconnect-ng.changes</param> <param name="files">suseconnect-ng-*/suseconnect-ng.changes</param>
<param name="files">connect-ng-*/suseconnect-ng-rpmlintrc</param> <param name="files">suseconnect-ng-*/suseconnect-ng-rpmlintrc</param>
</service> </service>
<service name="set_version" mode="manual"> <service name="set_version" mode="manual">
<param name="file">suseconnect-ng.spec</param> <param name="file">suseconnect-ng.spec</param>

View File

@ -1,4 +1,4 @@
<servicedata> <servicedata>
<service name="tar_scm"> <service name="tar_scm">
<param name="url">https://github.com/SUSE/connect-ng.git</param> <param name="url">https://github.com/SUSE/connect-ng.git</param>
<param name="changesrevision">21ba08ee39e18e237d920dba3f66db4faebdf47f</param></service></servicedata> <param name="changesrevision">aa46faa190124664fa45c5c04667c8e1736b48b8</param></service></servicedata>

BIN
connect-ng-1.7.0~git2.21ba08e.tar.xz (Stored with Git LFS)

Binary file not shown.

BIN
suseconnect-ng-1.8.0.tar.xz (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -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 <fschnizlein@suse.com> Wed Feb 14 18:28 UTC 2024 - Felix Schnizlein <fschnizlein@suse.com>
- Update to version 1.7.0~git2.21ba08e - Update to version 1.7.0
* Allow SUSEConnect on read write transactional systems (bsc#1219425) * Allow SUSEConnect on read write transactional systems (bsc#1219425)
------------------------------------------------------------------- -------------------------------------------------------------------

View File

@ -16,48 +16,30 @@
# #
%global provider_prefix github.com/SUSE/connect-ng %global project github.com/SUSE/connect-ng
%global import_path %{provider_prefix}
# set this to enable hwinfo test in %check
%bcond_with hwinfo
Name: suseconnect-ng Name: suseconnect-ng
# the version will get set by the 'set_version' service Version: 1.8.0
Version: 1.7.0~git2.21ba08e
Release: 0 Release: 0
URL: https://github.com/SUSE/connect-ng URL: https://github.com/SUSE/connect-ng
License: LGPL-2.1-or-later License: LGPL-2.1-or-later
Summary: Utility to register a system with the SUSE Customer Center Summary: Utility to register a system with the SUSE Customer Center
Group: System/Management Group: System/Management
Source: connect-ng-%{version}.tar.xz Source: suseconnect-ng-%{version}.tar.xz
Source1: %name-rpmlintrc Source1: %{name}-rpmlintrc
# Build against latest golang in Tumbleweed and # Build against latest golang in Tumbleweed and
# go1.18-openssl on all other distributions # go1.18-openssl on all other distributions
%if 0%{?suse_version} >= 1600 %if 0%{?suse_version} > 1600
BuildRequires: golang(API) BuildRequires: golang(API)
%else %else
BuildRequires: go1.18-openssl BuildRequires: go1.21-openssl
%endif %endif
BuildRequires: golang-packaging
BuildRequires: ruby-devel BuildRequires: ruby-devel
BuildRequires: zypper BuildRequires: zypper
ExcludeArch: %ix86 s390 ppc64 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 Obsoletes: SUSEConnect < 1.1.0
Provides: SUSEConnect = %version Provides: SUSEConnect = %version
@ -65,11 +47,13 @@ Obsoletes: zypper-migration-plugin < 0.99
Provides: zypper-migration-plugin = 0.99 Provides: zypper-migration-plugin = 0.99
Obsoletes: zypper-search-packages-plugin < 0.99 Obsoletes: zypper-search-packages-plugin < 0.99
Provides: zypper-search-packages-plugin = 0.99 Provides: zypper-search-packages-plugin = 0.99
%if 0%{?suse_version} %if 0%{?suse_version}
Requires: ca-certificates-mozilla Requires: ca-certificates-mozilla
%else %else
Requires: ca-certificates Requires: ca-certificates
%endif %endif
Requires: coreutils Requires: coreutils
# ExclusiveArch from this package # ExclusiveArch from this package
%ifarch ia64 x86_64 %arm aarch64 %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 suseconnect-ng reduces the size of its runtime dependencies compared to the
replaced SUSEConnect. replaced SUSEConnect.
%{go_provides}
%package -n libsuseconnect %package -n libsuseconnect
Summary: C interface to suseconnect-ng Summary: C interface to suseconnect-ng
Group: System/Management 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. This package provides bindings needed to use libsuseconnect from Ruby scripts.
%prep %prep
%setup -q -n connect-ng-%{version} %autosetup -p 1 -n %{name}-%{version}
%build %build
find %_builddir/.. # the binary
echo %{version} > internal/connect/version.txt echo %{version} > internal/connect/version.txt
%goprep %{import_path} go build -v -ldflags "-s -w" -buildmode=pie -o bin/suseconnect %{project}/suseconnect
find %_builddir/..
go list all # the library
%gobuild suseconnect
mkdir -p %_builddir/go/lib mkdir -p %_builddir/go/lib
go build -v -buildmode=c-shared -o %_builddir/go/lib/libsuseconnect.so %import_path/libsuseconnect go build -v -ldflags "-s -w" -buildmode=c-shared -o lib/libsuseconnect.so %{project}/libsuseconnect
find %_builddir/..
%install %install
%goinstall # Install binary + symlinks
ln -s suseconnect %buildroot/%_bindir/SUSEConnect install -D -m 0755 bin/suseconnect %{buildroot}/%{_bindir}/suseconnect
install -d -m0755 %buildroot/%_sbindir %buildroot/usr/lib/zypper/commands install -d -m 0755 %{buildroot}/%{_sbindir} %{buildroot}/usr/lib/zypper/commands
ln -s %_bindir/suseconnect %buildroot/%_sbindir/SUSEConnect ln -s %{_bindir}/suseconnect %{buildroot}/%{_bindir}/SUSEConnect
ln -s %_bindir/suseconnect %buildroot/usr/lib/zypper/commands/zypper-migration ln -s %{_bindir}/suseconnect %{buildroot}/%{_sbindir}/SUSEConnect
ln -s %_bindir/suseconnect %buildroot/usr/lib/zypper/commands/zypper-search-packages ln -s %{_bindir}/suseconnect %{buildroot}/usr/lib/zypper/commands/zypper-migration
install -D -m0755 %_builddir/go/lib/libsuseconnect.so %buildroot/%_libdir/libsuseconnect.so ln -s %{_bindir}/suseconnect %{buildroot}/usr/lib/zypper/commands/zypper-search-packages
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 library + ruby bindings
install -D -m 644 %_builddir/go/src/%import_path/man/SUSEConnect.5 %buildroot/%_mandir/man5/SUSEConnect.5 install -D -m 0755 lib/libsuseconnect.so %{buildroot}/%{_libdir}/libsuseconnect.so
install -D -m 644 %_builddir/go/src/%import_path/man/SUSEConnect.8 %buildroot/%_mandir/man8/SUSEConnect.8 install -d -m 0755 %{buildroot}/%{_libdir}/ruby/vendor_ruby/%{rb_ver}
install -D -m 644 %_builddir/go/src/%import_path/man/zypper-migration.8 %buildroot/%_mandir/man8/zypper-migration.8 cp -r yast/lib/* %{buildroot}/%{_libdir}/ruby/vendor_ruby/%{rb_ver}
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 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 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 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 install -D -m 644 suseconnect-keepalive.service %{buildroot}/%{_unitdir}/suseconnect-keepalive.service
ln -sf service %buildroot/%_sbindir/rcsuseconnect-keepalive ln -sf service %{buildroot}/%{_sbindir}/rcsuseconnect-keepalive
find %_builddir/..
# we currently do not ship the source for any go module # we currently do not ship the source for any go module
rm -rf %buildroot/usr/share/go rm -rf %{buildroot}/usr/share/go
%pre %pre
%service_add_pre suseconnect-keepalive.service suseconnect-keepalive.timer %service_add_pre suseconnect-keepalive.service suseconnect-keepalive.timer
@ -196,7 +179,7 @@ EOF
fi fi
# If the keepalive timer exists on package install (not upgrade), then we are replacing SUSEConnect. # 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 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-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 || : /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 ||: rm /run/suseconnect-keepalive.timer.is-active ||:
fi 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 %files
%license LICENSE LICENSE.LGPL %license LICENSE LICENSE.LGPL
%doc README.md %doc README.md
%_bindir/suseconnect %{_bindir}/suseconnect
%_bindir/SUSEConnect %{_bindir}/SUSEConnect
%_sbindir/SUSEConnect %{_sbindir}/SUSEConnect
%_sbindir/rcsuseconnect-keepalive %{_sbindir}/rcsuseconnect-keepalive
/usr/lib/zypper/commands /usr/lib/zypper/commands
%_mandir/man8/* %{_mandir}/man8/*
%_mandir/man5/* %{_mandir}/man5/*
%_unitdir/suseconnect-keepalive.service %{_unitdir}/suseconnect-keepalive.service
%_unitdir/suseconnect-keepalive.timer %{_unitdir}/suseconnect-keepalive.timer
%config %{_sysconfdir}/SUSEConnect.example %config %{_sysconfdir}/SUSEConnect.example
%files -n libsuseconnect %files -n libsuseconnect
%license LICENSE LICENSE.LGPL %license LICENSE LICENSE.LGPL
%_libdir/libsuseconnect.so %{_libdir}/libsuseconnect.so
%files -n suseconnect-ruby-bindings %files -n suseconnect-ruby-bindings
%doc yast/README.md %doc yast/README.md
%_libdir/ruby/vendor_ruby/%rb_ver/suse %{_libdir}/ruby/vendor_ruby/%rb_ver/suse
%changelog %changelog