* Remove k8s from Mariner

* Fix license check error
This commit is contained in:
jslobodzian 2023-07-14 17:52:35 -07:00 коммит произвёл GitHub
Родитель feb36fe447
Коммит 9018b05f7d
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
16 изменённых файлов: 0 добавлений и 1132 удалений

1
SPECS/LICENSES-AND-NOTICES/LICENSES-MAP.md сгенерированный

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Просмотреть файл

@ -3058,15 +3058,6 @@
"zsh"
]
},
"Rancher": {
"license": "[ASL 2.0 License](http://www.apache.org/licenses/LICENSE-2.0)",
"specs": [
"k3s",
"k3s-1.24.12",
"k3s-1.24.6",
"k3s-1.25.8"
]
},
"RPM software management source": {
"license": "[GPLv2+ License](https://github.com/rpm-software-management/dnf5/blob/main/COPYING.md)",
"specs": [

Просмотреть файл

@ -1,9 +0,0 @@
{
"Signatures": {
"k3s-1.24.12-vendor.tar.gz": "fa1debb49a14b2c9f2dc1fe054a12db5d81cd8c19aa73a53348131c27ecafc7f",
"k3s-1.24.12.tar.gz": "fc3a37e417951aa51b624d5c0a97a3cfc84bfb95e19e2f78c2a617a4b0bf0021"
}
}

Просмотреть файл

@ -1,144 +0,0 @@
%global debug_package %{nil}
%define install_path %{_prefix}/local/bin
%define util_path %{_datadir}/k3s
%define install_sh %{util_path}/setup/install.sh
%define uninstall_sh %{util_path}/setup/uninstall.sh
%define k3s_binary k3s
Summary: Lightweight Kubernetes
Name: k3s
Version: 1.24.12
Release: 3%{?dist}
License: ASL 2.0
# Note: k3s is not exclusive with coredns, etcd, containerd, runc and other CBL-Mariner packages which it embeds.
# This means there may be multiple versions of these packages. At this time exclusivity is not being enforced to
# allow k3s to use its required version even when other versions are installed.
Vendor: Microsoft Corporation
Distribution: Mariner
Group: System Environment/Base
URL: https://k3s.io
Source0: https://github.com/k3s-io/%{name}/archive/refs/tags/v%{version}+k3s1.tar.gz#/%{name}-%{version}.tar.gz
# Below is a manually created tarball, no download link.
# We're using pre-populated Go modules from this tarball, since network is disabled during build time.
# We are also pre-cloning 3 git repositories
# How to re-build this file:
# 1. wget https://github.com/k3s-io/%%{name}/archive/refs/tags/v%%{version}+k3s1.tar.gz -O %%{name}-%%{version}.tar.gz
# 2. tar -xf %%{name}-%%{version}.tar.gz
# 3. cd %%{name}-%%{version}-k3s1
# 4. go mod vendor
# 5. pushd vendor
# 6. git clone --single-branch --branch="v1.6.18" --depth=1 https://github.com/k3s-io/containerd
# 7. git clone -b "v1.1.1-k3s1" https://github.com/rancher/plugins.git
# 8. git clone --single-branch --branch="v1.1.4" --depth=1 https://github.com/opencontainers/runc
# 9. popd
# 10. tar -cf %%{name}-%%{version}-vendor.tar.gz vendor
Source1: %{name}-%{version}-vendor.tar.gz
Patch0: vendor_build-1.24.12.patch
BuildRequires: btrfs-progs-devel
BuildRequires: git
BuildRequires: golang
BuildRequires: libseccomp-devel
Requires: apparmor-parser
# K3s on Mariner is supported on x86_64 only:
ExclusiveArch: x86_64
%description
The certified Kubernetes distribution built for IoT & Edge computing.
%prep
%autosetup -p1 -n %{name}-%{version}-k3s1
tar -xvf %{SOURCE1}
%build
mkdir -p build/static
mkdir etc
./scripts/build
./scripts/package-cli
%install
install -d %{buildroot}%{install_path}
install dist/artifacts/%{k3s_binary} %{buildroot}%{install_path}/%{k3s_binary}
install -d %{buildroot}%{util_path}/setup
install package/rpm/install.sh %{buildroot}%{install_sh}
%post
export INSTALL_K3S_SKIP_DOWNLOAD=true
export INSTALL_K3S_SKIP_ENABLE=true
export INSTALL_K3S_SKIP_START=true
export UNINSTALL_K3S_SH=%{uninstall_sh}
%{install_sh}
exit 0
%postun
# do not run uninstall script on upgrade
if [ $1 = 0 ]; then
%{uninstall_sh}
rm -rf %{util_path}
fi
exit 0
%files
%{install_path}/k3s
%{install_sh}
%changelog
* Thu Jul 13 2023 CBL-Mariner Servicing Account <cblmargh@microsoft.com> - 1.24.12-3
- Bump release to rebuild with go 1.19.11
* Thu Jun 15 2023 CBL-Mariner Servicing Account <cblmargh@microsoft.com> - 1.24.12-2
- Bump release to rebuild with go 1.19.10
* Thu Apr 20 2023 Anuj Garg <anujgarg@microsoft.com> - 1.24.12-1
- Updated k3s to 1.24.12
- Drop version constraint on golang <= 1.18.8
* Wed Apr 05 2023 CBL-Mariner Servicing Account <cblmargh@microsoft.com> - 1.25.0-8
- Bump release to rebuild with go 1.19.8
* Tue Mar 28 2023 CBL-Mariner Servicing Account <cblmargh@microsoft.com> - 1.25.0-7
- Bump release to rebuild with go 1.19.7
* Wed Mar 15 2023 CBL-Mariner Servicing Account <cblmargh@microsoft.com> - 1.25.0-6
- Bump release to rebuild with go 1.19.6
* Wed Jan 18 2023 CBL-Mariner Servicing Account <cblmargh@microsoft.com> - 1.25.0-5
- - Set golang <= 1.18.8 build requires
* Fri Dec 16 2022 Daniel McIlvaney <damcilva@microsoft.com> - 1.25.0-4
- Bump release to rebuild with go 1.18.8 with patch for CVE-2022-41717
* Thu Dec 08 2022 Vinayak Gupta <guptavinayak@microsoft.com> - 1.25.0-3
- Update the vendor tarball with the corrected versions of the dependencies
* Tue Nov 01 2022 Olivia Crain <oliviacrain@microsoft.com> - 1.25.0-2
- Bump release to rebuild with go 1.18.8
* Tue Sep 20 2022 Animesh Garg <animeshgarg@microsoft.com> - 1.25.0-1
- Updated k3s to 1.25.0
* Tue Aug 30 2022 Animesh Garg <animeshgarg@microsoft.com> - 1.24.3-1
- Updated k3s to 1.24.3
* Mon Aug 22 2022 Olivia Crain <oliviacrain@microsoft.com> - 1.23.6-4
- Bump release to rebuild against Go 1.18.5
* Thu Jul 21 2022 Lior Lustgarten <lilustga@microsoft.com> 1.23.6-3
- Fixes the install section. Allows integration of k3s at runtime in the Mariner build environment.
* Wed Jun 29 2022 Lior Lustgarten <lilustga@microsoft.com> 1.23.6-2
- Fixed uninstall path
- Added exclusivity for x86_64
* Thu Jun 23 2022 Lior Lustgarten <lilustga@microsoft.com> 1.23.6-1
- Switched to building using the upstream k3s tarball and a separate vendor tarball
* Tue May 24 2022 Manuel Huber <mahuber@microsoft.com> 1.23.6-1
- Changes to install phase on Mariner
* Fri May 20 2022 Lior Lustgarten <lilustga@microsoft.com> 1.23.6-1
- License verified
- Initial changes to build for Mariner
- Initial CBL-Mariner import from Rancher (license: ASL 2.0).
* Mon Mar 2 2020 Erik Wilson <erik@rancher.com> 0.1-1
- Initial version

Просмотреть файл

@ -1,6 +0,0 @@
{
"Signatures": {
"k3s-1.24.6-vendor.tar.gz": "bc6a7e6357888983b10fe7a757596b0c08805aceaa2759c273e2c4cab8b6a338",
"k3s-1.24.6.tar.gz": "7e2e78a0f9e85a63203d203865ce0182e6628b06374beda436c465ac3db964fb"
}
}

Просмотреть файл

@ -1,140 +0,0 @@
Summary: Lightweight Kubernetes
Name: k3s
Version: 1.24.6
Release: 6%{?dist}
License: ASL 2.0
Group: System Environment/Base
URL: http://k3s.io
Source0: https://github.com/k3s-io/%{name}/archive/refs/tags/v%{version}+k3s1.tar.gz#/%{name}-%{version}.tar.gz
# Below is a manually created tarball, no download link.
# We're using pre-populated Go modules from this tarball, since network is disabled during build time.
# We are also pre-cloning 3 git repositories
# How to re-build this file:
# 1. wget https://github.com/k3s-io/%%{name}/archive/refs/tags/v%%{version}+k3s1.tar.gz -O %%{name}-%%{version}.tar.gz
# 2. tar -xf %%{name}-%%{version}.tar.gz
# 3. cd %%{name}-%%{version}-k3s1
# 4. go mod vendor
# 5. pushd vendor
# 6. git clone --single-branch --branch="v1.6.8-k3s1" --depth=1 https://github.com/k3s-io/containerd
# 7. git clone -b "v1.1.1-k3s1" https://github.com/rancher/plugins.git
# 8. git clone --single-branch --branch="v1.1.4" --depth=1 https://github.com/opencontainers/runc
# 9. popd
# 10. tar -cf %%{name}-%%{version}-vendor.tar.gz vendor
Source1: %{name}-%{version}-vendor.tar.gz
Patch0: vendor_build-1.24.6.patch
%global debug_package %{nil}
%define install_path /usr/local/bin
%define util_path %{_datadir}/k3s
%define install_sh %{util_path}/setup/install.sh
%define uninstall_sh %{util_path}/setup/uninstall.sh
%define k3s_binary k3s
BuildRequires: golang
BuildRequires: libseccomp-devel
BuildRequires: btrfs-progs-devel
Requires: apparmor-parser
# K3s on Mariner is supported on x86_64 only:
ExclusiveArch: x86_64
# Note: k3s is not exclusive with coredns, etcd, containerd, runc and other CBL-Mariner packages which it embeds.
# This means there may be multiple versions of these packages. At this time exclusivity is not being enforced to
# allow k3s to use its required version even when other versions are installed.
%description
The certified Kubernetes distribution built for IoT & Edge computing.
%prep
%autosetup -p1 -n %{name}-%{version}-k3s1
tar -xvf %{SOURCE1}
%build
mkdir -p build/static
mkdir etc
./scripts/build
./scripts/package-cli
%install
install -d %{buildroot}%{install_path}
install dist/artifacts/%{k3s_binary} %{buildroot}%{install_path}/%{k3s_binary}
install -d %{buildroot}%{util_path}/setup
install package/rpm/install.sh %{buildroot}%{install_sh}
%post
export INSTALL_K3S_SKIP_DOWNLOAD=true
export INSTALL_K3S_SKIP_ENABLE=true
export INSTALL_K3S_SKIP_START=true
export UNINSTALL_K3S_SH=%{uninstall_sh}
%{install_sh}
exit 0
%postun
# do not run uninstall script on upgrade
if [ $1 = 0 ]; then
%{uninstall_sh}
rm -rf %{util_path}
fi
exit 0
%files
%{install_path}/k3s
%{install_sh}
%changelog
* Thu Jul 13 2023 CBL-Mariner Servicing Account <cblmargh@microsoft.com> - 1.24.6-6
- Bump release to rebuild with go 1.19.11
* Thu Jun 15 2023 CBL-Mariner Servicing Account <cblmargh@microsoft.com> - 1.24.6-5
- Bump release to rebuild with go 1.19.10
* Wed Apr 05 2023 CBL-Mariner Servicing Account <cblmargh@microsoft.com> - 1.24.6-4
- Bump release to rebuild with go 1.19.8
* Tue Mar 28 2023 CBL-Mariner Servicing Account <cblmargh@microsoft.com> - 1.24.6-3
- Bump release to rebuild with go 1.19.7
* Wed Mar 15 2023 CBL-Mariner Servicing Account <cblmargh@microsoft.com> - 1.24.6-2
- Bump release to rebuild with go 1.19.6
* Tue Feb 07 2023 Vinayak Gupta <guptavinayak@microsoft.com> - 1.24.6-1
- Updated k3s to 1.24.6
* Fri Feb 03 2023 CBL-Mariner Servicing Account <cblmargh@microsoft.com> - 1.24.3-6
- Bump release to rebuild with go 1.19.5
* Wed Jan 18 2023 CBL-Mariner Servicing Account <cblmargh@microsoft.com> - 1.24.3-5
- Bump release to rebuild with go 1.19.4
* Fri Dec 16 2022 Daniel McIlvaney <damcilva@microsoft.com> - 1.24.3-4
- Bump release to rebuild with go 1.18.8 with patch for CVE-2022-41717
* Thu Dec 08 2022 Vinayak Gupta <guptavinayak@microsoft.com> - 1.24.3-3
- Update the vendor tarball with the corrected versions of the dependencies
* Tue Nov 01 2022 Olivia Crain <oliviacrain@microsoft.com> - 1.24.3-2
- Bump release to rebuild with go 1.18.8
* Tue Aug 30 2022 Animesh Garg <animeshgarg@microsoft.com> - 1.24.3-1
- Updated k3s to 1.24.3
* Mon Aug 22 2022 Olivia Crain <oliviacrain@microsoft.com> - 1.23.6-4
- Bump release to rebuild against Go 1.18.5
* Thu Jul 21 2022 Lior Lustgarten <lilustga@microsoft.com> 1.23.6-3
- Fixes the install section. Allows integration of k3s at runtime in the Mariner build environment.
* Wed Jun 29 2022 Lior Lustgarten <lilustga@microsoft.com> 1.23.6-2
- Fixed uninstall path
- Added exclusivity for x86_64
* Thu Jun 23 2022 Lior Lustgarten <lilustga@microsoft.com> 1.23.6-1
- Switched to building using the upstream k3s tarball and a separate vendor tarball
* Tue May 24 2022 Manuel Huber <mahuber@microsoft.com> 1.23.6-1
- Changes to install phase on Mariner
* Fri May 20 2022 Lior Lustgarten <lilustga@microsoft.com> 1.23.6-1
- License verified
- Initial changes to build for Mariner
- Initial CBL-Mariner import from Rancher (license: ASL 2.0).
* Mon Mar 2 2020 Erik Wilson <erik@rancher.com> 0.1-1
- Initial version

Просмотреть файл

@ -1,6 +0,0 @@
{
"Signatures": {
"k3s-1.25.8-vendor.tar.gz": "0269c3d3234f3d1f96f67f1606494f8fb90cb2509f48a0042c27564604cfb681",
"k3s-1.25.8.tar.gz": "35323b1a2b6b1fcb3be3ac4521f71aa51bea37a05a08e3475f541c8aed838f37"
}
}

Просмотреть файл

@ -1,140 +0,0 @@
%global debug_package %{nil}
%define install_path %{_prefix}/local/bin
%define util_path %{_datadir}/k3s
%define install_sh %{util_path}/setup/install.sh
%define uninstall_sh %{util_path}/setup/uninstall.sh
%define k3s_binary k3s
Summary: Lightweight Kubernetes
Name: k3s
Version: 1.25.8
Release: 3%{?dist}
License: ASL 2.0
# Note: k3s is not exclusive with coredns, etcd, containerd, runc and other CBL-Mariner packages which it embeds.
# This means there may be multiple versions of these packages. At this time exclusivity is not being enforced to
# allow k3s to use its required version even when other versions are installed.
Vendor: Microsoft Corporation
Distribution: Mariner
Group: System Environment/Base
URL: https://k3s.io
Source0: https://github.com/k3s-io/%{name}/archive/refs/tags/v%{version}+k3s1.tar.gz#/%{name}-%{version}.tar.gz
# Below is a manually created tarball, no download link.
# We're using pre-populated Go modules from this tarball, since network is disabled during build time.
# We are also pre-cloning 3 git repositories
# How to re-build this file:
# 1. wget https://github.com/k3s-io/%%{name}/archive/refs/tags/v%%{version}+k3s1.tar.gz -O %%{name}-%%{version}.tar.gz
# 2. tar -xf %%{name}-%%{version}.tar.gz
# 3. cd %%{name}-%%{version}-k3s1
# 4. go mod vendor
# 5. pushd vendor
# 6. git clone --single-branch --branch="v1.6.18" --depth=1 https://github.com/k3s-io/containerd
# 7. git clone -b "v1.1.1-k3s1" https://github.com/rancher/plugins.git
# 8. git clone --single-branch --branch="v1.1.4" --depth=1 https://github.com/opencontainers/runc
# 9. popd
# 10. tar -cf %%{name}-%%{version}-vendor.tar.gz vendor
Source1: %{name}-%{version}-vendor.tar.gz
Patch0: vendor_build-1.25.8.patch
BuildRequires: btrfs-progs-devel
BuildRequires: git
BuildRequires: golang <= 1.18.8
BuildRequires: libseccomp-devel
Requires: apparmor-parser
# K3s on Mariner is supported on x86_64 only:
ExclusiveArch: x86_64
%description
The certified Kubernetes distribution built for IoT & Edge computing.
%prep
%autosetup -p1 -n %{name}-%{version}-k3s1
tar -xvf %{SOURCE1}
%build
mkdir -p build/static
mkdir etc
./scripts/build
./scripts/package-cli
%install
install -d %{buildroot}%{install_path}
install dist/artifacts/%{k3s_binary} %{buildroot}%{install_path}/%{k3s_binary}
install -d %{buildroot}%{util_path}/setup
install package/rpm/install.sh %{buildroot}%{install_sh}
%post
export INSTALL_K3S_SKIP_DOWNLOAD=true
export INSTALL_K3S_SKIP_ENABLE=true
export INSTALL_K3S_SKIP_START=true
export UNINSTALL_K3S_SH=%{uninstall_sh}
%{install_sh}
exit 0
%postun
# do not run uninstall script on upgrade
if [ $1 = 0 ]; then
%{uninstall_sh}
rm -rf %{util_path}
fi
exit 0
%files
%{install_path}/k3s
%{install_sh}
%changelog
* Thu Jul 13 2023 CBL-Mariner Servicing Account <cblmargh@microsoft.com> - 1.25.8-3
- Bump release to rebuild with go 1.19.11
* Thu Jun 15 2023 CBL-Mariner Servicing Account <cblmargh@microsoft.com> - 1.25.8-2
- Bump release to rebuild with go 1.19.10
* Mon Apr 17 2023 Anuj Garg <anujgarg@microsoft.com> - 1.25.8-1
- Updated k3s to 1.25.8
* Tue Mar 28 2023 CBL-Mariner Servicing Account <cblmargh@microsoft.com> - 1.25.0-7
- Bump release to rebuild with go 1.19.7
* Wed Mar 15 2023 CBL-Mariner Servicing Account <cblmargh@microsoft.com> - 1.25.0-6
- Bump release to rebuild with go 1.19.6
* Wed Jan 18 2023 CBL-Mariner Servicing Account <cblmargh@microsoft.com> - 1.25.0-5
- - Set golang <= 1.18.8 build requires
* Fri Dec 16 2022 Daniel McIlvaney <damcilva@microsoft.com> - 1.25.0-4
- Bump release to rebuild with go 1.18.8 with patch for CVE-2022-41717
* Thu Dec 08 2022 Vinayak Gupta <guptavinayak@microsoft.com> - 1.25.0-3
- Update the vendor tarball with the corrected versions of the dependencies
* Tue Nov 01 2022 Olivia Crain <oliviacrain@microsoft.com> - 1.25.0-2
- Bump release to rebuild with go 1.18.8
* Tue Sep 20 2022 Animesh Garg <animeshgarg@microsoft.com> - 1.25.0-1
- Updated k3s to 1.25.0
* Tue Aug 30 2022 Animesh Garg <animeshgarg@microsoft.com> - 1.24.3-1
- Updated k3s to 1.24.3
* Mon Aug 22 2022 Olivia Crain <oliviacrain@microsoft.com> - 1.23.6-4
- Bump release to rebuild against Go 1.18.5
* Thu Jul 21 2022 Lior Lustgarten <lilustga@microsoft.com> 1.23.6-3
- Fixes the install section. Allows integration of k3s at runtime in the Mariner build environment.
* Wed Jun 29 2022 Lior Lustgarten <lilustga@microsoft.com> 1.23.6-2
- Fixed uninstall path
- Added exclusivity for x86_64
* Thu Jun 23 2022 Lior Lustgarten <lilustga@microsoft.com> 1.23.6-1
- Switched to building using the upstream k3s tarball and a separate vendor tarball
* Tue May 24 2022 Manuel Huber <mahuber@microsoft.com> 1.23.6-1
- Changes to install phase on Mariner
* Fri May 20 2022 Lior Lustgarten <lilustga@microsoft.com> 1.23.6-1
- License verified
- Initial changes to build for Mariner
- Initial CBL-Mariner import from Rancher (license: ASL 2.0).
* Mon Mar 2 2020 Erik Wilson <erik@rancher.com> 0.1-1
- Initial version

Просмотреть файл

@ -1,8 +0,0 @@
{
"Signatures": {
"k3s-1.26.3-vendor.tar.gz": "d6173a57eebaae179a4aeb0a72d77e0a7ce8f4944ab56a024773e46b0829ee72",
"k3s-1.26.3.tar.gz": "685287c34c4f39d635d047bca4ff3f2e34f469bd20a292b5d787e2f551c3e030"
}
}

Просмотреть файл

@ -1,144 +0,0 @@
%global debug_package %{nil}
%define install_path %{_prefix}/local/bin
%define util_path %{_datadir}/k3s
%define install_sh %{util_path}/setup/install.sh
%define uninstall_sh %{util_path}/setup/uninstall.sh
%define k3s_binary k3s
Summary: Lightweight Kubernetes
Name: k3s
Version: 1.26.3
Release: 3%{?dist}
License: ASL 2.0
# Note: k3s is not exclusive with coredns, etcd, containerd, runc and other CBL-Mariner packages which it embeds.
# This means there may be multiple versions of these packages. At this time exclusivity is not being enforced to
# allow k3s to use its required version even when other versions are installed.
Vendor: Microsoft Corporation
Distribution: Mariner
Group: System Environment/Base
URL: https://k3s.io
Source0: https://github.com/k3s-io/%{name}/archive/refs/tags/v%{version}+k3s1.tar.gz#/%{name}-%{version}.tar.gz
# Below is a manually created tarball, no download link.
# We're using pre-populated Go modules from this tarball, since network is disabled during build time.
# We are also pre-cloning 3 git repositories
# How to re-build this file:
# 1. wget https://github.com/k3s-io/%%{name}/archive/refs/tags/v%%{version}+k3s1.tar.gz -O %%{name}-%%{version}.tar.gz
# 2. tar -xf %%{name}-%%{version}.tar.gz
# 3. cd %%{name}-%%{version}-k3s1
# 4. go mod vendor
# 5. pushd vendor
# 6. git clone --single-branch --branch="v1.6.18" --depth=1 https://github.com/k3s-io/containerd
# 7. git clone -b "v1.1.1-k3s1" https://github.com/rancher/plugins.git
# 8. git clone --single-branch --branch="v1.1.4" --depth=1 https://github.com/opencontainers/runc
# 9. popd
# 10. tar -cf %%{name}-%%{version}-vendor.tar.gz vendor
Source1: %{name}-%{version}-vendor.tar.gz
Patch0: vendor_build.patch
BuildRequires: btrfs-progs-devel
BuildRequires: git
BuildRequires: golang
BuildRequires: libseccomp-devel
Requires: apparmor-parser
# K3s on Mariner is supported on x86_64 only:
ExclusiveArch: x86_64
%description
The certified Kubernetes distribution built for IoT & Edge computing.
%prep
%autosetup -p1 -n %{name}-%{version}-k3s1
tar -xvf %{SOURCE1}
%build
mkdir -p build/static
mkdir etc
./scripts/build
./scripts/package-cli
%install
install -d %{buildroot}%{install_path}
install dist/artifacts/%{k3s_binary} %{buildroot}%{install_path}/%{k3s_binary}
install -d %{buildroot}%{util_path}/setup
install package/rpm/install.sh %{buildroot}%{install_sh}
%post
export INSTALL_K3S_SKIP_DOWNLOAD=true
export INSTALL_K3S_SKIP_ENABLE=true
export INSTALL_K3S_SKIP_START=true
export UNINSTALL_K3S_SH=%{uninstall_sh}
%{install_sh}
exit 0
%postun
# do not run uninstall script on upgrade
if [ $1 = 0 ]; then
%{uninstall_sh}
rm -rf %{util_path}
fi
exit 0
%files
%{install_path}/k3s
%{install_sh}
%changelog
* Thu Jul 13 2023 CBL-Mariner Servicing Account <cblmargh@microsoft.com> - 1.26.3-3
- Bump release to rebuild with go 1.19.11
* Thu Jun 15 2023 CBL-Mariner Servicing Account <cblmargh@microsoft.com> - 1.26.3-2
- Bump release to rebuild with go 1.19.10
* Mon Apr 17 2023 Anuj Garg <anujgarg@microsoft.com> - 1.26.3-1
- Updated k3s to 1.26.3
- Drop version constraint on golang <= 1.18.8
* Wed Apr 05 2023 CBL-Mariner Servicing Account <cblmargh@microsoft.com> - 1.25.0-8
- Bump release to rebuild with go 1.19.8
* Tue Mar 28 2023 CBL-Mariner Servicing Account <cblmargh@microsoft.com> - 1.25.0-7
- Bump release to rebuild with go 1.19.7
* Wed Mar 15 2023 CBL-Mariner Servicing Account <cblmargh@microsoft.com> - 1.25.0-6
- Bump release to rebuild with go 1.19.6
* Wed Jan 18 2023 CBL-Mariner Servicing Account <cblmargh@microsoft.com> - 1.25.0-5
- - Set golang <= 1.18.8 build requires
* Fri Dec 16 2022 Daniel McIlvaney <damcilva@microsoft.com> - 1.25.0-4
- Bump release to rebuild with go 1.18.8 with patch for CVE-2022-41717
* Thu Dec 08 2022 Vinayak Gupta <guptavinayak@microsoft.com> - 1.25.0-3
- Update the vendor tarball with the corrected versions of the dependencies
* Tue Nov 01 2022 Olivia Crain <oliviacrain@microsoft.com> - 1.25.0-2
- Bump release to rebuild with go 1.18.8
* Tue Sep 20 2022 Animesh Garg <animeshgarg@microsoft.com> - 1.25.0-1
- Updated k3s to 1.25.0
* Tue Aug 30 2022 Animesh Garg <animeshgarg@microsoft.com> - 1.24.3-1
- Updated k3s to 1.24.3
* Mon Aug 22 2022 Olivia Crain <oliviacrain@microsoft.com> - 1.23.6-4
- Bump release to rebuild against Go 1.18.5
* Thu Jul 21 2022 Lior Lustgarten <lilustga@microsoft.com> 1.23.6-3
- Fixes the install section. Allows integration of k3s at runtime in the Mariner build environment.
* Wed Jun 29 2022 Lior Lustgarten <lilustga@microsoft.com> 1.23.6-2
- Fixed uninstall path
- Added exclusivity for x86_64
* Thu Jun 23 2022 Lior Lustgarten <lilustga@microsoft.com> 1.23.6-1
- Switched to building using the upstream k3s tarball and a separate vendor tarball
* Tue May 24 2022 Manuel Huber <mahuber@microsoft.com> 1.23.6-1
- Changes to install phase on Mariner
* Fri May 20 2022 Lior Lustgarten <lilustga@microsoft.com> 1.23.6-1
- License verified
- Initial changes to build for Mariner
- Initial CBL-Mariner import from Rancher (license: ASL 2.0).
* Mon Mar 2 2020 Erik Wilson <erik@rancher.com> 0.1-1
- Initial version

Просмотреть файл

@ -1,115 +0,0 @@
diff --git a/package/rpm/install.sh b/package/rpm/install.sh
index 432090ba03..a74a5cbc27 100755
--- a/package/rpm/install.sh
+++ b/package/rpm/install.sh
@@ -43,12 +43,8 @@ set -e
# Commit of k3s to download from temporary cloud storage.
# * (for developer & QA use)
#
-# - INSTALL_K3S_BIN_DIR
-# Directory to install k3s binary, links, and uninstall script to, or use
-# /usr/local/bin as the default
-#
# - INSTALL_K3S_BIN_DIR_READ_ONLY
-# If set to true will not write files to INSTALL_K3S_BIN_DIR, forces
+# If set to true will not write files to BIN_DIR, forces
# setting INSTALL_K3S_SKIP_DOWNLOAD=true
#
# - INSTALL_K3S_SYSTEMD_DIR
@@ -114,15 +110,8 @@ fatal()
# --- fatal if no systemd or openrc ---
verify_system() {
- if [ -x /sbin/openrc-run ]; then
- HAS_OPENRC=true
- return
- fi
- if [ -d /run/systemd ]; then
- HAS_SYSTEMD=true
- return
- fi
- fatal 'Can not find systemd or openrc to use as a process supervisor for k3s'
+ HAS_SYSTEMD=true
+ return
}
# --- add quotes to command arguments ---
@@ -219,7 +208,7 @@ setup_env() {
fi
# --- use binary install directory if defined or create default ---
- BIN_DIR=${INSTALL_K3S_BIN_DIR:-/usr/local/bin}
+ BIN_DIR=/usr/local/bin
DATA_DIR=/var/lib/rancher/k3s
# --- set related files from system name ---
diff --git a/scripts/build b/scripts/build
index fb538350d0..3712ef2abf 100755
--- a/scripts/build
+++ b/scripts/build
@@ -117,15 +117,17 @@ if [ ! -x ${INSTALLBIN}/cni ]; then
echo Building cni
TMPDIR=$(mktemp -d)
trap cleanup EXIT
- WORKDIR=$TMPDIR/src/github.com/containernetworking/plugins
- git clone -b $VERSION_CNIPLUGINS https://github.com/rancher/plugins.git $WORKDIR
- cd $WORKDIR
- GO111MODULE=off GOPATH=$TMPDIR CGO_ENABLED=0 "${GO}" build -tags "$TAGS" -gcflags="all=${GCFLAGS}" -ldflags "$VERSIONFLAGS $LDFLAGS $STATIC" -o $INSTALLBIN/cni
+ WORKDIR=$TMPDIR/src/github.com/containernetworking
+ mkdir -p $WORKDIR
+ ls
+ cp -r vendor/plugins $WORKDIR
+ cd $WORKDIR/plugins
+ GO111MODULE=off GOPATH=$TMPDIR CGO_ENABLED=0 "${GO}" build -tags "$TAGS" -ldflags "$VERSIONFLAGS $LDFLAGS $STATIC" -o $INSTALLBIN/cni
)
fi
echo Building k3s
-CGO_ENABLED=1 "${GO}" build -tags "$TAGS" -gcflags="all=${GCFLAGS}" -ldflags "$VERSIONFLAGS $LDFLAGS $STATIC" -o bin/k3s ./cmd/server/main.go
+CGO_ENABLED=1 "${GO}" build -mod=vendor -tags "$TAGS" -ldflags "$VERSIONFLAGS $LDFLAGS $STATIC" -o bin/k3s ./cmd/server/main.go
ln -s k3s ./bin/k3s-agent
ln -s k3s ./bin/k3s-server
ln -s k3s ./bin/k3s-token
@@ -140,16 +142,22 @@ ln -s k3s ./bin/ctr
export GOPATH=$(pwd)/build
echo Building containerd
-pushd ./build/src/github.com/containerd/containerd
+CONTAINERD_DIR=build/src/github.com/containerd
+mkdir -p $CONTAINERD_DIR
+cp -r vendor/containerd $CONTAINERD_DIR
+pushd ./$CONTAINERD_DIR/containerd
TAGS="${TAGS/netcgo/netgo}"
-CGO_ENABLED=1 "${GO}" build -tags "$TAGS" -gcflags="all=${GCFLAGS}" -ldflags "$VERSIONFLAGS $LDFLAGS $STATIC" -o bin/containerd ./cmd/containerd
-CGO_ENABLED=1 "${GO}" build -tags "$TAGS" -gcflags="all=${GCFLAGS}" -ldflags "$VERSIONFLAGS $LDFLAGS $STATIC" -o bin/containerd-shim-runc-v2 ./cmd/containerd-shim-runc-v2
+CGO_ENABLED=1 "${GO}" build -mod=vendor -tags "$TAGS" -ldflags "$VERSIONFLAGS $LDFLAGS $STATIC" -o bin/containerd ./cmd/containerd
+CGO_ENABLED=1 "${GO}" build -mod=vendor -tags "$TAGS" -ldflags "$VERSIONFLAGS $LDFLAGS $STATIC" -o bin/containerd-shim-runc-v2 ./cmd/containerd-shim-runc-v2
popd
-cp -vf ./build/src/github.com/containerd/containerd/bin/* ./bin/
+cp -vf ./$CONTAINERD_DIR/containerd/bin/* ./bin/
echo Building runc
-pushd ./build/src/github.com/opencontainers/runc
+RUNC_DIR=build/src/github.com/opencontainers
+mkdir -p $RUNC_DIR
+cp -r vendor/runc $RUNC_DIR
+pushd ./$RUNC_DIR/runc
rm -f runc
-make EXTRA_FLAGS="-gcflags=\"all=${GCFLAGS}\"" EXTRA_LDFLAGS="$LDFLAGS" BUILDTAGS="$RUNC_TAGS" $RUNC_STATIC
+make EXTRA_LDFLAGS="-w -s" BUILDTAGS="$RUNC_TAGS" $RUNC_STATIC GOMODVENDOR=1
popd
-cp -vf ./build/src/github.com/opencontainers/runc/runc ./bin/
+cp -vf ./$RUNC_DIR/runc/runc ./bin/
diff --git a/scripts/package-cli b/scripts/package-cli
index 2c71e851d1..9cd914b8db 100755
--- a/scripts/package-cli
+++ b/scripts/package-cli
@@ -60,7 +60,7 @@ LDFLAGS="
"
TAGS="urfave_cli_no_docs"
STATIC="-extldflags '-static'"
-CGO_ENABLED=0 "${GO}" build -tags "$TAGS" -ldflags "$LDFLAGS $STATIC" -o ${CMD_NAME} ./cmd/k3s/main.go
+CGO_ENABLED=0 "${GO}" build -mod=vendor -tags "$TAGS" -ldflags "$LDFLAGS $STATIC" -o ${CMD_NAME} ./cmd/k3s/main.go
stat ${CMD_NAME}

Просмотреть файл

@ -1,139 +0,0 @@
From cb484822743c3cfde06c41ae8af989c82bb420d2 Mon Sep 17 00:00:00 2001
From: Lior Lustgarten <lilustg@microsoft.com>
Date: Thu, 21 Jul 2022 13:20:43 -0700
Subject: [PATCH 1/2] enable vendor build
---
scripts/build | 30 +++++++++++++++++++-----------
scripts/package-cli | 2 +-
2 files changed, 20 insertions(+), 12 deletions(-)
diff --git a/scripts/build b/scripts/build
index b25156f91e..82bfc46d99 100755
--- a/scripts/build
+++ b/scripts/build
@@ -103,15 +103,17 @@ if [ ! -x ${INSTALLBIN}/cni ]; then
echo Building cni
TMPDIR=$(mktemp -d)
trap cleanup EXIT
- WORKDIR=$TMPDIR/src/github.com/containernetworking/plugins
- git clone -b $VERSION_CNIPLUGINS https://github.com/rancher/plugins.git $WORKDIR
- cd $WORKDIR
+ WORKDIR=$TMPDIR/src/github.com/containernetworking
+ mkdir -p $WORKDIR
+ ls
+ cp -r vendor/plugins $WORKDIR
+ cd $WORKDIR/plugins
GO111MODULE=off GOPATH=$TMPDIR CGO_ENABLED=0 "${GO}" build -tags "$TAGS" -ldflags "$VERSIONFLAGS $LDFLAGS $STATIC" -o $INSTALLBIN/cni
)
fi
echo Building k3s
-CGO_ENABLED=1 "${GO}" build -tags "$TAGS" -ldflags "$VERSIONFLAGS $LDFLAGS $STATIC" -o bin/k3s ./cmd/server/main.go
+CGO_ENABLED=1 "${GO}" build -mod=vendor -tags "$TAGS" -ldflags "$VERSIONFLAGS $LDFLAGS $STATIC" -o bin/k3s ./cmd/server/main.go
ln -s k3s ./bin/k3s-agent
ln -s k3s ./bin/k3s-server
ln -s k3s ./bin/k3s-etcd-snapshot
@@ -125,16 +127,22 @@ ln -s k3s ./bin/ctr
export GOPATH=$(pwd)/build
echo Building containerd
-pushd ./build/src/github.com/containerd/containerd
+CONTAINERD_DIR=build/src/github.com/containerd
+mkdir -p $CONTAINERD_DIR
+cp -r vendor/containerd $CONTAINERD_DIR
+pushd ./$CONTAINERD_DIR/containerd
TAGS="${TAGS/netcgo/netgo}"
-CGO_ENABLED=1 "${GO}" build -tags "$TAGS" -ldflags "$VERSIONFLAGS $LDFLAGS $STATIC" -o bin/containerd ./cmd/containerd
-CGO_ENABLED=1 "${GO}" build -tags "$TAGS" -ldflags "$VERSIONFLAGS $LDFLAGS $STATIC" -o bin/containerd-shim-runc-v2 ./cmd/containerd-shim-runc-v2
+CGO_ENABLED=1 "${GO}" build -mod=vendor -tags "$TAGS" -ldflags "$VERSIONFLAGS $LDFLAGS $STATIC" -o bin/containerd ./cmd/containerd
+CGO_ENABLED=1 "${GO}" build -mod=vendor -tags "$TAGS" -ldflags "$VERSIONFLAGS $LDFLAGS $STATIC" -o bin/containerd-shim-runc-v2 ./cmd/containerd-shim-runc-v2
popd
-cp -vf ./build/src/github.com/containerd/containerd/bin/* ./bin/
+cp -vf ./$CONTAINERD_DIR/containerd/bin/* ./bin/
echo Building runc
-pushd ./build/src/github.com/opencontainers/runc
+RUNC_DIR=build/src/github.com/opencontainers
+mkdir -p $RUNC_DIR
+cp -r vendor/runc $RUNC_DIR
+pushd ./$RUNC_DIR/runc
rm -f runc
-make EXTRA_LDFLAGS="-w -s" BUILDTAGS="$RUNC_TAGS" $RUNC_STATIC
+make EXTRA_LDFLAGS="-w -s" BUILDTAGS="$RUNC_TAGS" $RUNC_STATIC GOMODVENDOR=1
popd
-cp -vf ./build/src/github.com/opencontainers/runc/runc ./bin/
+cp -vf ./$RUNC_DIR/runc/runc ./bin/
diff --git a/scripts/package-cli b/scripts/package-cli
index 4dc2c80db1..d813ec8959 100755
--- a/scripts/package-cli
+++ b/scripts/package-cli
@@ -60,7 +60,7 @@ LDFLAGS="
"
TAGS="urfave_cli_no_docs"
STATIC="-extldflags '-static'"
-CGO_ENABLED=0 "${GO}" build -tags "$TAGS" -ldflags "$LDFLAGS $STATIC" -o ${CMD_NAME} ./cmd/k3s/main.go
+CGO_ENABLED=0 "${GO}" build -mod=vendor -tags "$TAGS" -ldflags "$LDFLAGS $STATIC" -o ${CMD_NAME} ./cmd/k3s/main.go
stat ${CMD_NAME}
--
2.25.1
From e7f67ee7b8e9d581112d3daf61ba3911fef08fd2 Mon Sep 17 00:00:00 2001
From: Lior Lustgarten <lilustg@microsoft.com>
Date: Thu, 21 Jul 2022 18:06:07 -0700
Subject: [PATCH 2/2] Adds install fix for vhdx
---
package/rpm/install.sh | 19 ++++---------------
1 file changed, 4 insertions(+), 15 deletions(-)
diff --git a/package/rpm/install.sh b/package/rpm/install.sh
index ed0b4fbba6..a3a07cc601 100755
--- a/package/rpm/install.sh
+++ b/package/rpm/install.sh
@@ -43,12 +43,8 @@ set -e
# Commit of k3s to download from temporary cloud storage.
# * (for developer & QA use)
#
-# - INSTALL_K3S_BIN_DIR
-# Directory to install k3s binary, links, and uninstall script to, or use
-# /usr/local/bin as the default
-#
# - INSTALL_K3S_BIN_DIR_READ_ONLY
-# If set to true will not write files to INSTALL_K3S_BIN_DIR, forces
+# If set to true will not write files to BIN_DIR, forces
# setting INSTALL_K3S_SKIP_DOWNLOAD=true
#
# - INSTALL_K3S_SYSTEMD_DIR
@@ -114,15 +110,8 @@ fatal()
# --- fatal if no systemd or openrc ---
verify_system() {
- if [ -x /sbin/openrc-run ]; then
- HAS_OPENRC=true
- return
- fi
- if [ -d /run/systemd ]; then
- HAS_SYSTEMD=true
- return
- fi
- fatal 'Can not find systemd or openrc to use as a process supervisor for k3s'
+ HAS_SYSTEMD=true
+ return
}
# --- add quotes to command arguments ---
@@ -219,7 +208,7 @@ setup_env() {
fi
# --- use binary install directory if defined or create default ---
- BIN_DIR=${INSTALL_K3S_BIN_DIR:-/usr/local/bin}
+ BIN_DIR=/usr/local/bin
DATA_DIR=/var/lib/rancher/k3s
# --- set related files from system name ---
--
2.25.1

Просмотреть файл

@ -1,115 +0,0 @@
diff --git a/package/rpm/install.sh b/package/rpm/install.sh
index 5acaf7092c..04ba98e075 100755
--- a/package/rpm/install.sh
+++ b/package/rpm/install.sh
@@ -43,12 +43,8 @@ set -e
# Commit of k3s to download from temporary cloud storage.
# * (for developer & QA use)
#
-# - INSTALL_K3S_BIN_DIR
-# Directory to install k3s binary, links, and uninstall script to, or use
-# /usr/local/bin as the default
-#
# - INSTALL_K3S_BIN_DIR_READ_ONLY
-# If set to true will not write files to INSTALL_K3S_BIN_DIR, forces
+# If set to true will not write files to BIN_DIR, forces
# setting INSTALL_K3S_SKIP_DOWNLOAD=true
#
# - INSTALL_K3S_SYSTEMD_DIR
@@ -114,15 +110,8 @@ fatal()
# --- fatal if no systemd or openrc ---
verify_system() {
- if [ -x /sbin/openrc-run ]; then
- HAS_OPENRC=true
- return
- fi
- if [ -d /run/systemd ]; then
- HAS_SYSTEMD=true
- return
- fi
- fatal 'Can not find systemd or openrc to use as a process supervisor for k3s'
+ HAS_SYSTEMD=true
+ return
}
# --- add quotes to command arguments ---
@@ -219,7 +208,7 @@ setup_env() {
fi
# --- use binary install directory if defined or create default ---
- BIN_DIR=${INSTALL_K3S_BIN_DIR:-/usr/local/bin}
+ BIN_DIR=/usr/local/bin
DATA_DIR=/var/lib/rancher/k3s
# --- set related files from system name ---
diff --git a/scripts/build b/scripts/build
index fb538350d0..3712ef2abf 100755
--- a/scripts/build
+++ b/scripts/build
@@ -117,15 +117,17 @@ if [ ! -x ${INSTALLBIN}/cni ]; then
echo Building cni
TMPDIR=$(mktemp -d)
trap cleanup EXIT
- WORKDIR=$TMPDIR/src/github.com/containernetworking/plugins
- git clone -b $VERSION_CNIPLUGINS https://github.com/rancher/plugins.git $WORKDIR
- cd $WORKDIR
- GO111MODULE=off GOPATH=$TMPDIR CGO_ENABLED=0 "${GO}" build -tags "$TAGS" -gcflags="all=${GCFLAGS}" -ldflags "$VERSIONFLAGS $LDFLAGS $STATIC" -o $INSTALLBIN/cni
+ WORKDIR=$TMPDIR/src/github.com/containernetworking
+ mkdir -p $WORKDIR
+ ls
+ cp -r vendor/plugins $WORKDIR
+ cd $WORKDIR/plugins
+ GO111MODULE=off GOPATH=$TMPDIR CGO_ENABLED=0 "${GO}" build -tags "$TAGS" -ldflags "$VERSIONFLAGS $LDFLAGS $STATIC" -o $INSTALLBIN/cni
)
fi
echo Building k3s
-CGO_ENABLED=1 "${GO}" build -tags "$TAGS" -gcflags="all=${GCFLAGS}" -ldflags "$VERSIONFLAGS $LDFLAGS $STATIC" -o bin/k3s ./cmd/server/main.go
+CGO_ENABLED=1 "${GO}" build -mod=vendor -tags "$TAGS" -ldflags "$VERSIONFLAGS $LDFLAGS $STATIC" -o bin/k3s ./cmd/server/main.go
ln -s k3s ./bin/k3s-agent
ln -s k3s ./bin/k3s-server
ln -s k3s ./bin/k3s-token
@@ -140,16 +142,22 @@ ln -s k3s ./bin/ctr
export GOPATH=$(pwd)/build
echo Building containerd
-pushd ./build/src/github.com/containerd/containerd
+CONTAINERD_DIR=build/src/github.com/containerd
+mkdir -p $CONTAINERD_DIR
+cp -r vendor/containerd $CONTAINERD_DIR
+pushd ./$CONTAINERD_DIR/containerd
TAGS="${TAGS/netcgo/netgo}"
-CGO_ENABLED=1 "${GO}" build -tags "$TAGS" -gcflags="all=${GCFLAGS}" -ldflags "$VERSIONFLAGS $LDFLAGS $STATIC" -o bin/containerd ./cmd/containerd
-CGO_ENABLED=1 "${GO}" build -tags "$TAGS" -gcflags="all=${GCFLAGS}" -ldflags "$VERSIONFLAGS $LDFLAGS $STATIC" -o bin/containerd-shim-runc-v2 ./cmd/containerd-shim-runc-v2
+CGO_ENABLED=1 "${GO}" build -mod=vendor -tags "$TAGS" -ldflags "$VERSIONFLAGS $LDFLAGS $STATIC" -o bin/containerd ./cmd/containerd
+CGO_ENABLED=1 "${GO}" build -mod=vendor -tags "$TAGS" -ldflags "$VERSIONFLAGS $LDFLAGS $STATIC" -o bin/containerd-shim-runc-v2 ./cmd/containerd-shim-runc-v2
popd
-cp -vf ./build/src/github.com/containerd/containerd/bin/* ./bin/
+cp -vf ./$CONTAINERD_DIR/containerd/bin/* ./bin/
echo Building runc
-pushd ./build/src/github.com/opencontainers/runc
+RUNC_DIR=build/src/github.com/opencontainers
+mkdir -p $RUNC_DIR
+cp -r vendor/runc $RUNC_DIR
+pushd ./$RUNC_DIR/runc
rm -f runc
-make EXTRA_FLAGS="-gcflags=\"all=${GCFLAGS}\"" EXTRA_LDFLAGS="$LDFLAGS" BUILDTAGS="$RUNC_TAGS" $RUNC_STATIC
+make EXTRA_LDFLAGS="-w -s" BUILDTAGS="$RUNC_TAGS" $RUNC_STATIC GOMODVENDOR=1
popd
-cp -vf ./build/src/github.com/opencontainers/runc/runc ./bin/
+cp -vf ./$RUNC_DIR/runc/runc ./bin/
diff --git a/scripts/package-cli b/scripts/package-cli
index 2c71e851d1..9cd914b8db 100755
--- a/scripts/package-cli
+++ b/scripts/package-cli
@@ -60,7 +60,7 @@ LDFLAGS="
"
TAGS="urfave_cli_no_docs"
STATIC="-extldflags '-static'"
-CGO_ENABLED=0 "${GO}" build -tags "$TAGS" -ldflags "$LDFLAGS $STATIC" -o ${CMD_NAME} ./cmd/k3s/main.go
+CGO_ENABLED=0 "${GO}" build -mod=vendor -tags "$TAGS" -ldflags "$LDFLAGS $STATIC" -o ${CMD_NAME} ./cmd/k3s/main.go
stat ${CMD_NAME}

Просмотреть файл

@ -1,115 +0,0 @@
diff --git a/package/rpm/install.sh b/package/rpm/install.sh
index 93b79a1aba..fe6de8b4b3 100755
--- a/package/rpm/install.sh
+++ b/package/rpm/install.sh
@@ -43,12 +43,8 @@ set -e
# Commit of k3s to download from temporary cloud storage.
# * (for developer & QA use)
#
-# - INSTALL_K3S_BIN_DIR
-# Directory to install k3s binary, links, and uninstall script to, or use
-# /usr/local/bin as the default
-#
# - INSTALL_K3S_BIN_DIR_READ_ONLY
-# If set to true will not write files to INSTALL_K3S_BIN_DIR, forces
+# If set to true will not write files to BIN_DIR, forces
# setting INSTALL_K3S_SKIP_DOWNLOAD=true
#
# - INSTALL_K3S_SYSTEMD_DIR
@@ -114,15 +110,8 @@ fatal()
# --- fatal if no systemd or openrc ---
verify_system() {
- if [ -x /sbin/openrc-run ]; then
- HAS_OPENRC=true
- return
- fi
- if [ -d /run/systemd ]; then
- HAS_SYSTEMD=true
- return
- fi
- fatal 'Can not find systemd or openrc to use as a process supervisor for k3s'
+ HAS_SYSTEMD=true
+ return
}
# --- add quotes to command arguments ---
@@ -219,7 +208,7 @@ setup_env() {
fi
# --- use binary install directory if defined or create default ---
- BIN_DIR=${INSTALL_K3S_BIN_DIR:-/usr/local/bin}
+ BIN_DIR=/usr/local/bin
DATA_DIR=/var/lib/rancher/k3s
# --- set related files from system name ---
diff --git a/scripts/build b/scripts/build
index fb538350d0..3712ef2abf 100755
--- a/scripts/build
+++ b/scripts/build
@@ -117,15 +117,17 @@ if [ ! -x ${INSTALLBIN}/cni ]; then
echo Building cni
TMPDIR=$(mktemp -d)
trap cleanup EXIT
- WORKDIR=$TMPDIR/src/github.com/containernetworking/plugins
- git clone -b $VERSION_CNIPLUGINS https://github.com/rancher/plugins.git $WORKDIR
- cd $WORKDIR
- GO111MODULE=off GOPATH=$TMPDIR CGO_ENABLED=0 "${GO}" build -tags "$TAGS" -gcflags="all=${GCFLAGS}" -ldflags "$VERSIONFLAGS $LDFLAGS $STATIC" -o $INSTALLBIN/cni
+ WORKDIR=$TMPDIR/src/github.com/containernetworking
+ mkdir -p $WORKDIR
+ ls
+ cp -r vendor/plugins $WORKDIR
+ cd $WORKDIR/plugins
+ GO111MODULE=off GOPATH=$TMPDIR CGO_ENABLED=0 "${GO}" build -tags "$TAGS" -ldflags "$VERSIONFLAGS $LDFLAGS $STATIC" -o $INSTALLBIN/cni
)
fi
echo Building k3s
-CGO_ENABLED=1 "${GO}" build -tags "$TAGS" -gcflags="all=${GCFLAGS}" -ldflags "$VERSIONFLAGS $LDFLAGS $STATIC" -o bin/k3s ./cmd/server/main.go
+CGO_ENABLED=1 "${GO}" build -mod=vendor -tags "$TAGS" -ldflags "$VERSIONFLAGS $LDFLAGS $STATIC" -o bin/k3s ./cmd/server/main.go
ln -s k3s ./bin/k3s-agent
ln -s k3s ./bin/k3s-server
ln -s k3s ./bin/k3s-token
@@ -140,16 +142,22 @@ ln -s k3s ./bin/ctr
export GOPATH=$(pwd)/build
echo Building containerd
-pushd ./build/src/github.com/containerd/containerd
+CONTAINERD_DIR=build/src/github.com/containerd
+mkdir -p $CONTAINERD_DIR
+cp -r vendor/containerd $CONTAINERD_DIR
+pushd ./$CONTAINERD_DIR/containerd
TAGS="${TAGS/netcgo/netgo}"
-CGO_ENABLED=1 "${GO}" build -tags "$TAGS" -gcflags="all=${GCFLAGS}" -ldflags "$VERSIONFLAGS $LDFLAGS $STATIC" -o bin/containerd ./cmd/containerd
-CGO_ENABLED=1 "${GO}" build -tags "$TAGS" -gcflags="all=${GCFLAGS}" -ldflags "$VERSIONFLAGS $LDFLAGS $STATIC" -o bin/containerd-shim-runc-v2 ./cmd/containerd-shim-runc-v2
+CGO_ENABLED=1 "${GO}" build -mod=vendor -tags "$TAGS" -ldflags "$VERSIONFLAGS $LDFLAGS $STATIC" -o bin/containerd ./cmd/containerd
+CGO_ENABLED=1 "${GO}" build -mod=vendor -tags "$TAGS" -ldflags "$VERSIONFLAGS $LDFLAGS $STATIC" -o bin/containerd-shim-runc-v2 ./cmd/containerd-shim-runc-v2
popd
-cp -vf ./build/src/github.com/containerd/containerd/bin/* ./bin/
+cp -vf ./$CONTAINERD_DIR/containerd/bin/* ./bin/
echo Building runc
-pushd ./build/src/github.com/opencontainers/runc
+RUNC_DIR=build/src/github.com/opencontainers
+mkdir -p $RUNC_DIR
+cp -r vendor/runc $RUNC_DIR
+pushd ./$RUNC_DIR/runc
rm -f runc
-make EXTRA_FLAGS="-gcflags=\"all=${GCFLAGS}\"" EXTRA_LDFLAGS="$LDFLAGS" BUILDTAGS="$RUNC_TAGS" $RUNC_STATIC
+make EXTRA_LDFLAGS="-w -s" BUILDTAGS="$RUNC_TAGS" $RUNC_STATIC GOMODVENDOR=1
popd
-cp -vf ./build/src/github.com/opencontainers/runc/runc ./bin/
+cp -vf ./$RUNC_DIR/runc/runc ./bin/
diff --git a/scripts/package-cli b/scripts/package-cli
index 2c71e851d1..9cd914b8db 100755
--- a/scripts/package-cli
+++ b/scripts/package-cli
@@ -60,7 +60,7 @@ LDFLAGS="
"
TAGS="urfave_cli_no_docs"
STATIC="-extldflags '-static'"
-CGO_ENABLED=0 "${GO}" build -tags "$TAGS" -ldflags "$LDFLAGS $STATIC" -o ${CMD_NAME} ./cmd/k3s/main.go
+CGO_ENABLED=0 "${GO}" build -mod=vendor -tags "$TAGS" -ldflags "$LDFLAGS $STATIC" -o ${CMD_NAME} ./cmd/k3s/main.go
stat ${CMD_NAME}

Просмотреть файл

@ -8006,46 +8006,6 @@
}
}
},
{
"component": {
"type": "other",
"other": {
"name": "k3s",
"version": "1.24.6",
"downloadUrl": "https://github.com/k3s-io/k3s/archive/refs/tags/v1.24.6+k3s1.tar.gz"
}
}
},
{
"component": {
"type": "other",
"other": {
"name": "k3s",
"version": "1.24.12",
"downloadUrl": "https://github.com/k3s-io/k3s/archive/refs/tags/v1.24.12+k3s1.tar.gz"
}
}
},
{
"component": {
"type": "other",
"other": {
"name": "k3s",
"version": "1.25.8",
"downloadUrl": "https://github.com/k3s-io/k3s/archive/refs/tags/v1.25.8+k3s1.tar.gz"
}
}
},
{
"component": {
"type": "other",
"other": {
"name": "k3s",
"version": "1.26.3",
"downloadUrl": "https://github.com/k3s-io/k3s/archive/refs/tags/v1.26.3+k3s1.tar.gz"
}
}
},
{
"component": {
"type": "other",

Просмотреть файл

@ -21,7 +21,6 @@ VALID_SOURCE_ATTRIBUTIONS = {
"OpenMamba": r'\n-\s+Initial CBL-Mariner import from OpenMamba(\.|\n|$)',
"OpenSUSE": r'\n-\s+Initial CBL-Mariner import from openSUSE \w+ \(license: same as "License" tag\)(\.|\n|$)',
"Photon": r'\n-\s+Initial CBL-Mariner import from Photon \(license: Apache2\)(\.|\n|$)',
"Rancher": r'\n-\s+Initial CBL-Mariner import from Rancher \(license: ASL 2\.0\)(\.|\n|$)',
"Sysbench source": r'\n-\s+Initial CBL-Mariner import from Sysbench source \(license: GPLv2\+\)(\.|\n|$)',
"RPM software management source": r'\n-\s+Initial CBL-Mariner import from RPM software management source \(license: GPLv2\+\)(\.|\n|$)'
}