Compare commits

...

10 Commits

Author SHA1 Message Date
openeuler-ci-bot
bafea8269a
!11 Delete the compilation of unsupport architecture windows
From: @duyiwei7w 
Reviewed-by: @jianli-97 
Signed-off-by: @jianli-97
2024-06-18 03:05:06 +00:00
duyiwei
6df205dd12
Delete the compilation of unsupport architecture windows
Signed-off-by: duyiwei <duyiwei@kylinos.cn>
2024-06-18 01:57:20 +00:00
openeuler-ci-bot
b8a2d09b6c
!8 upgrade version to 0.17.0
From: @duyiwei7w 
Reviewed-by: @jianli-97 
Signed-off-by: @jianli-97
2024-03-28 07:27:06 +00:00
duyiwei
e7c040ba77 upgrade version to 0.17.0 2024-03-28 14:51:46 +08:00
openeuler-ci-bot
1933a29a32
!5 [sync] PR-3: Delete the compilation of ppc64 and s390 architecture
From: @openeuler-sync-bot 
Reviewed-by: @duyiwei7w 
Signed-off-by: @duyiwei7w
2023-12-01 03:33:02 +00:00
chendexi
31ef680982 Delete the compilation of ppc64 and s390 architecture
Signed-off-by: chendexi <chendexi@kylinos.cn>
(cherry picked from commit d4878de706736e34854c27fea55ca7e67df0d253)
2023-12-01 11:13:08 +08:00
openeuler-ci-bot
a53b12a714
!4 [sync] PR-2: support nestos variant
From: @openeuler-sync-bot 
Reviewed-by: @duyiwei7w 
Signed-off-by: @duyiwei7w
2023-12-01 03:12:12 +00:00
fu-shanqing
fef83cc5e3 support nestos variant
(cherry picked from commit 570fa1bd7a50a34c5d64b0d10685592a294cf2c8)
2023-12-01 10:53:23 +08:00
openeuler-ci-bot
1211891fee
!1 Package init
From: @fu-shanqing 
Reviewed-by: @yangzhao_kl 
Signed-off-by: @yangzhao_kl
2022-06-30 09:07:45 +00:00
fu-shanqing
f7abfc46cf Initial package 2022-06-21 11:39:18 +08:00
2 changed files with 110 additions and 0 deletions

BIN
butane-0.17.0.tar.gz Normal file

Binary file not shown.

110
butane.spec Normal file
View File

@ -0,0 +1,110 @@
%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.17.0
Release: 2
Summary: Butane config transpiler
# Upstream license specification: Apache-2.0
License: ASL 2.0
URL: https://github.com/coreos/butane
Source0: butane-0.17.0.tar.gz
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: ASL 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=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
%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-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-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-unknown-linux-gnu-static
%{_datadir}/butane/butane-x86_64-apple-darwin
%{_datadir}/butane/butane-x86_64-unknown-linux-gnu-static
%changelog
* Tue Jun 18 2024 duyiwei <duyiwei@kylinos.cn> - 0.17.0-2
- Delete the compilation of unsupport architecture windows
* Thu Mar 28 2024 duyiwei <duyiwei@kylinos.cn> - 0.17.0-1
- upgrade version to 0.17.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