Sync from SUSE:SLFO:Main elemental-register revision d52530e3df8545b954dea3d890626ef7

This commit is contained in:
Adrian Schröter 2024-11-12 15:39:53 +01:00
commit 397cbdde0c
5 changed files with 169 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

5
_scminfo Normal file
View File

@ -0,0 +1,5 @@
tag: v1.8.0-dev
mtime: 1729854821
commit: f300a43fd9777a187ae28d75a8596a847f6b678c
versionRPM: 1.8.0~dev
versionOCI: 1.8.0-dev

View File

@ -0,0 +1,14 @@
-------------------------------------------------------------------
Fri Oct 25 11:13:41 UTC 2024 - Elemental Bot <elemental@suse.de>
- Changes on top of v1.8.0-dev:
* 6372ec67 Only reset network if a network configurator is used (#874)
* cf1a2d64 Do not include Config to MachineRegistration as pointer (#870)
* fad205a5 Split elemental-operator and elemental-register at OBS level
* ab193eca Add support for agent-tls-mode Rancher setting (#863)
* de3c37df RBAC: restrict SeedImage controller auth to fleet-default (#864)
-------------------------------------------------------------------
Tue Oct 8 07:54:33 UTC 2024 - Elemental Bot <elemental@suse.de>
- Initial commit

124
elemental-register.spec Normal file
View File

@ -0,0 +1,124 @@
#
# spec file for package elemental-register
#
# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%define commit f300a43fd9777a187ae28d75a8596a847f6b678c
%define c_date 20241025
Name: elemental-register
Version: 1.8.0~dev
Release: 0
Summary: The Elemental Operator registration client
License: Apache-2.0
Group: System/Management
URL: https://github.com/rancher/elemental-operator
Source: %{name}.tar.xz
# go-tpm-tools aren't _that_ portable :-(
ExclusiveArch: x86_64 aarch64
BuildRequires: gcc-c++
BuildRequires: glibc-devel
BuildRequires: openssl-devel
BuildRequires: make
BuildRequires: grep
%if 0%{?suse_version}
BuildRequires: golang(API) >= 1.22
BuildRequires: golang-packaging
%{go_provides}
%else
%global goipath google.golang.org/api
%global forgeurl https://github.com/rancher/elemental-operator
%global commit 25abcdc57b9409d4c5b2009cf0a2f9aa6ff647ad
%gometa
%if (0%{?centos_version} == 800) || (0%{?rhel_version} == 800)
BuildRequires: go1.22
%else
BuildRequires: compiler(go-compiler) >= 1.22
%endif
%endif
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
The elemental-register command is responsible of the node registration
against an elemental-operator instance running under Rancher.
%package -n elemental-support
Summary: Collect important logs for support
%description -n elemental-support
This collects essential configuration files and logs to improve issue
resolution.
%prep
%setup -q -n %{name}
%build
%if 0%{?suse_version}
%goprep .
%endif
mkdir -p bin
if [ "$(uname)" = "Linux" ]; then
OTHER_LINKFLAGS="-extldflags -static -s"
fi
if [ "%{commit}" = "_replaceme_" ]; then
echo "No commit hash provided"
exit 1
fi
if [ "%{c_date}" = "_replaceme_" ]; then
echo "No commit date provided"
exit 1
fi
export GIT_TAG=$(echo "%{version}" | cut -d "+" -f 1)
GIT_COMMIT=$(echo "%{commit}")
export GIT_COMMIT=${GIT_COMMIT:0:8}
export COMMITDATE="%{c_date}"
# build binaries
CGO_ENABLED=1 make register
make support
%install
%if 0%{?suse_version}
%goinstall
%endif
# /usr/sbin
%{__install} -d -m 755 %{buildroot}/%{_sbindir}
# binary
%{__install} -m 755 build/elemental-register %{buildroot}%{_sbindir}
%{__install} -m 755 build/elemental-support %{buildroot}%{_sbindir}
%files
%defattr(-,root,root,-)
%license LICENSE
%{_sbindir}/elemental-register
%files -n elemental-support
%defattr(-,root,root,-)
%license LICENSE
%{_sbindir}/elemental-support
%changelog

BIN
elemental-register.tar.xz (Stored with Git LFS) Normal file

Binary file not shown.