Compare commits
10 Commits
e695524e80
...
ff0acd2aa5
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ff0acd2aa5 | ||
|
|
d7e675b533 | ||
|
|
7a4326aa75 | ||
|
|
2df35c7bc9 | ||
|
|
ba6c600ea6 | ||
|
|
d4878de706 | ||
|
|
deae3388f2 | ||
|
|
570fa1bd7a | ||
|
|
1211891fee | ||
|
|
f7abfc46cf |
30
0001-support-nestos-variant.patch
Normal file
30
0001-support-nestos-variant.patch
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
From 51bab9d7d655479085dcaf4faaea5fcb92701844 Mon Sep 17 00:00:00 2001
|
||||||
|
From: jianli-97 <lijian2@kylinos.cn>
|
||||||
|
Date: Mon, 15 Jan 2024 17:51:31 +0800
|
||||||
|
Subject: [PATCH] support nestos variant
|
||||||
|
|
||||||
|
---
|
||||||
|
config/config.go | 7 +++++++
|
||||||
|
1 file changed, 7 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/config/config.go b/config/config.go
|
||||||
|
index 4d095b2..2518f31 100644
|
||||||
|
--- a/config/config.go
|
||||||
|
+++ b/config/config.go
|
||||||
|
@@ -62,6 +62,13 @@ func init() {
|
||||||
|
RegisterTranslator("fcos", "1.4.0", fcos1_4.ToIgn3_3Bytes)
|
||||||
|
RegisterTranslator("fcos", "1.5.0", fcos1_5.ToIgn3_4Bytes)
|
||||||
|
RegisterTranslator("fcos", "1.6.0-experimental", fcos1_6_exp.ToIgn3_5Bytes)
|
||||||
|
+ RegisterTranslator("nestos", "1.0.0", fcos1_0.ToIgn3_0Bytes)
|
||||||
|
+ RegisterTranslator("nestos", "1.1.0", fcos1_0.ToIgn3_0Bytes)
|
||||||
|
+ RegisterTranslator("nestos", "1.2.0", fcos1_0.ToIgn3_0Bytes)
|
||||||
|
+ RegisterTranslator("nestos", "1.3.0", fcos1_0.ToIgn3_0Bytes)
|
||||||
|
+ RegisterTranslator("nestos", "1.4.0", fcos1_0.ToIgn3_0Bytes)
|
||||||
|
+ RegisterTranslator("nestos", "1.5.0", fcos1_0.ToIgn3_0Bytes)
|
||||||
|
+ RegisterTranslator("nestos", "1.6.0-experimental", fcos1_6_exp.ToIgn3_5Bytes)
|
||||||
|
RegisterTranslator("flatcar", "1.0.0", flatcar1_0.ToIgn3_3Bytes)
|
||||||
|
RegisterTranslator("flatcar", "1.1.0", flatcar1_1.ToIgn3_4Bytes)
|
||||||
|
RegisterTranslator("flatcar", "1.2.0-experimental", flatcar1_2_exp.ToIgn3_5Bytes)
|
||||||
|
--
|
||||||
|
2.33.0
|
||||||
|
|
||||||
124
butane.spec
Normal file
124
butane.spec
Normal file
@ -0,0 +1,124 @@
|
|||||||
|
%bcond_with check
|
||||||
|
%define gobuild(o:) %{expand:
|
||||||
|
%global _dwz_low_mem_die_limit 0
|
||||||
|
%ifnarch ppc64
|
||||||
|
go build -buildmode pie -compiler gc -tags="rpm_crashtraceback ${BUILDTAGS:-}" -ldflags "${LDFLAGS:-}%{?currentgoldflags} -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n') -extldflags '-Wl,-z,relro -Wl,-z,now' -compressdwarf=false" -a -v -x %{?**};
|
||||||
|
%else
|
||||||
|
go build -compiler gc -tags="rpm_crashtraceback ${BUILDTAGS:-}" -ldflags "${LDFLAGS:-}%{?currentgoldflags} -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n') -extldflags '-Wl,-z,relro -Wl,-z,now' -compressdwarf=false" -a -v -x %{?**};
|
||||||
|
%endif
|
||||||
|
}
|
||||||
|
|
||||||
|
# https://github.com/coreos/butane
|
||||||
|
%global goipath github.com/coreos/butane
|
||||||
|
%global gomodulesmode GO111MODULE=on
|
||||||
|
|
||||||
|
%global common_description %{expand:
|
||||||
|
Butane translates human-readable Butane Configs into machine-readable Ignition
|
||||||
|
configs for provisioning operating systems that use Ignition.}
|
||||||
|
|
||||||
|
%global golicenses LICENSE
|
||||||
|
%global godocs docs README.md
|
||||||
|
|
||||||
|
Name: butane
|
||||||
|
Version: 0.20.0
|
||||||
|
Release: 1
|
||||||
|
Summary: Butane config transpiler
|
||||||
|
|
||||||
|
License: Apache-2.0
|
||||||
|
URL: https://github.com/coreos/butane
|
||||||
|
Source0: %{url}/archive/refs/tags/v%{version}.tar.gz
|
||||||
|
Patch0: 0001-support-nestos-variant.patch
|
||||||
|
BuildRequires: golang
|
||||||
|
Provides: nestos-config-transpiler = %{version}-%{release}
|
||||||
|
Obsoletes: nestos-config-transpiler < 0.10.0-2
|
||||||
|
Provides: fcct = %{version}-%{release}
|
||||||
|
|
||||||
|
%description
|
||||||
|
%{common_description}
|
||||||
|
|
||||||
|
%package redistributable
|
||||||
|
Summary: Statically built Butane for Linux, macOS and Windows
|
||||||
|
License: Apache-2.0
|
||||||
|
BuildArch: noarch
|
||||||
|
Obsoletes: butane-nonlinux < 0.13.1-3
|
||||||
|
|
||||||
|
%description redistributable
|
||||||
|
%{common_description}
|
||||||
|
|
||||||
|
This package contains statically linked Linux, macOS and Windows Butane
|
||||||
|
binaries built through cross-compilation.
|
||||||
|
%prep
|
||||||
|
%autosetup -p1 -n %{name}-%{version}
|
||||||
|
|
||||||
|
%build
|
||||||
|
export LDFLAGS="-X github.com/coreos/butane/internal/version.Raw=%{version} "
|
||||||
|
export GOFLAGS="-mod=vendor"
|
||||||
|
|
||||||
|
echo "Building butane..."
|
||||||
|
%gobuild -o ./butane internal/main.go
|
||||||
|
|
||||||
|
%global gocrossbuild go build -ldflags "${LDFLAGS:-} -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n')" -a -v -x
|
||||||
|
|
||||||
|
echo "Building Linux Butane with static linking..."
|
||||||
|
CGO_ENABLED=0 GOARCH=arm64 GOOS=linux %gocrossbuild -o butane-aarch64-unknown-linux-gnu-static internal/main.go
|
||||||
|
CGO_ENABLED=0 GOARCH=ppc64le GOOS=linux %gocrossbuild -o butane-ppc64le-unknown-linux-gnu-static internal/main.go
|
||||||
|
CGO_ENABLED=0 GOARCH=s390x GOOS=linux %gocrossbuild -o butane-s390x-unknown-linux-gnu-static internal/main.go
|
||||||
|
CGO_ENABLED=0 GOARCH=amd64 GOOS=linux %gocrossbuild -o butane-x86_64-unknown-linux-gnu-static internal/main.go
|
||||||
|
|
||||||
|
echo "Building macOS Butane..."
|
||||||
|
GOARCH=amd64 GOOS=darwin %gocrossbuild -o butane-x86_64-apple-darwin internal/main.go
|
||||||
|
GOARCH=arm64 GOOS=darwin %gocrossbuild -o butane-aarch64-apple-darwin internal/main.go
|
||||||
|
|
||||||
|
echo "Building Windows Butane..."
|
||||||
|
GOARCH=amd64 GOOS=windows %gocrossbuild -o butane-x86_64-pc-windows-gnu.exe internal/main.go
|
||||||
|
|
||||||
|
%install
|
||||||
|
install -d -p %{buildroot}%{_bindir}
|
||||||
|
install -p -m 0755 ./butane %{buildroot}%{_bindir}
|
||||||
|
ln -s butane %{buildroot}%{_bindir}/fcct
|
||||||
|
install -d -p %{buildroot}%{_datadir}/butane
|
||||||
|
install -p -m 0644 ./butane-aarch64-apple-darwin %{buildroot}%{_datadir}/butane
|
||||||
|
install -p -m 0644 ./butane-aarch64-unknown-linux-gnu-static %{buildroot}%{_datadir}/butane
|
||||||
|
install -p -m 0644 ./butane-ppc64le-unknown-linux-gnu-static %{buildroot}%{_datadir}/butane
|
||||||
|
install -p -m 0644 ./butane-s390x-unknown-linux-gnu-static %{buildroot}%{_datadir}/butane
|
||||||
|
install -p -m 0644 ./butane-x86_64-apple-darwin %{buildroot}%{_datadir}/butane
|
||||||
|
install -p -m 0644 ./butane-x86_64-pc-windows-gnu.exe %{buildroot}%{_datadir}/butane
|
||||||
|
install -p -m 0644 ./butane-x86_64-unknown-linux-gnu-static %{buildroot}%{_datadir}/butane
|
||||||
|
|
||||||
|
%if %{with check}
|
||||||
|
%check
|
||||||
|
%gocheck
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%files
|
||||||
|
%license %{golicenses}
|
||||||
|
%doc %{godocs}
|
||||||
|
%{_bindir}/butane
|
||||||
|
%{_bindir}/fcct
|
||||||
|
|
||||||
|
%files redistributable
|
||||||
|
%license %{golicenses}
|
||||||
|
%dir %{_datadir}/butane
|
||||||
|
%{_datadir}/butane/butane-aarch64-apple-darwin
|
||||||
|
%{_datadir}/butane/butane-aarch64-unknown-linux-gnu-static
|
||||||
|
%{_datadir}/butane/butane-ppc64le-unknown-linux-gnu-static
|
||||||
|
%{_datadir}/butane/butane-s390x-unknown-linux-gnu-static
|
||||||
|
%{_datadir}/butane/butane-x86_64-apple-darwin
|
||||||
|
%{_datadir}/butane/butane-x86_64-pc-windows-gnu.exe
|
||||||
|
%{_datadir}/butane/butane-x86_64-unknown-linux-gnu-static
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Thu Mar 07 2024 chendexi <chendexi@kylios.cn> - 0.20.0-1
|
||||||
|
- Upgrade to 0.20.0
|
||||||
|
|
||||||
|
* Mon Jan 15 2024 lijian <lijian2@kylinos.cn> - 0.18.0-1
|
||||||
|
- Upgrade to 0.18.0
|
||||||
|
|
||||||
|
* Fri Dec 01 2023 chendexi <chendexi@kylinos.cn> - 0.14.0-3
|
||||||
|
- Delete the compilation of ppc64 and s390 architecture
|
||||||
|
|
||||||
|
* Wed Oct 26 2022 fushanqing <fushanqing@kylinos.cn> - 0.14.0-2
|
||||||
|
- support nestos variant
|
||||||
|
|
||||||
|
* Mon Jun 20 2022 fushanqing <fushanqing@kylinos.cn> - 0.14.0-1
|
||||||
|
- Initial package
|
||||||
4
butane.yaml
Normal file
4
butane.yaml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
version_control: github
|
||||||
|
src_repo: coreos/butane
|
||||||
|
tag_prefix: "^v"
|
||||||
|
separator: "."
|
||||||
BIN
v0.20.0.tar.gz
Normal file
BIN
v0.20.0.tar.gz
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user