fix: u-root (#4455) (#5779)

apply all patches until the one that replaces cpuid

(cherry picked from commit 29570e7208)

Co-authored-by: madomado <madonuko@outlook.com>
This commit is contained in:
Raboneko
2025-07-05 21:35:20 -07:00
committed by GitHub
parent c5388bc505
commit ffa4e6c7b1
+43 -34
View File
@@ -1,74 +1,83 @@
# Generated by go2rpm 1.9.0
%bcond_without check
%define debug_package %nil
# Generated by go2rpm 1.16.0
%bcond check 0
%bcond bootstrap 0
%if %{with bootstrap}
%global debug_package %{nil}
%endif
%if %{with bootstrap}
%global __requires_exclude %{?__requires_exclude:%{__requires_exclude}|}^golang\\(.*\\)$
%endif
# https://github.com/u-root/u-root
%global goipath github.com/u-root/u-root
Version: 0.14.0
%global commit 5721ed3ad38a5c889e6c1ed5bbf5242f98a4b591
%gometa -f
%global common_description %{expand:
A fully Go userland with Linux bootloaders! u-root can create a one-binary root
file system (initramfs) containing a busybox-like set of tools written in Go.}
%global golicenses LICENSE
%global godocs docs examples AUTHORS SECURITY.md tricksandtips.md\\\
CONTRIBUTING.md README.md roadmap.md\\\
cmds/core/tail/test_samples/read_backwards.txt\\\
cmds/core/tail/test_samples/read_from_beginning.txt\\\
cmds/exp/esxiboot/README.md\\\
configs/README.md\\\
configs/amd64_config.txt configs/arm_config.txt\\\
configs/generic_config.txt integration/README.md\\\
pkg/boot/systembooter/README.md pkg/smbios/README.md\\\
pkg/tarutil/test2.txt pkg/tarutil/test0/a.txt\\\
pkg/tarutil/test0/dir/b.txt pkg/tarutil/test1/a1.txt\\\
tools/golang_patched_dce/README.md
%global godocs docs examples AUTHORS CONTRIBUTING.md README.md\\\
SECURITY.md roadmap.md tricksandtips.md\\\
cmds/exp/esxiboot/README.md cmds/exp/tftpd/README.md\\\
cmds/exp/uefiboot/README.md cmds/exp/vmboot/README.md\\\
configs/README.md configs/amd64_config.txt\\\
configs/arm_config.txt configs/generic_config.txt\\\
integration/README.md pkg/boot/systembooter/README.md\\\
pkg/netcat/doc.md pkg/netstat/doc.md\\\
pkg/smbios/README.md pkg/tc/readme.md\\\
tools/golang_patched_dce/README.md tools/tinygo-\\\
buildstatus/README.md tools/tinygobb/README.md
Name: %{goname}
Release: 1%?dist
Name: golang-github-u-root
Release: 2%?dist
Summary: A fully Go userland with Linux bootloaders! u-root can create a one-binary root file system (initramfs) containing a busybox-like set of tools written in Go
License: BSD-3-Clause
URL: %{gourl}
Source: %{gosource}
BuildRequires: anda-srpm-macros
%description %{common_description}
%gopkg
%prep
%goprep
%goprep -A
%autopatch -p1
go mod download
%if %{without bootstrap}
%build
go build -ldflags "-B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n') -s -w -extldflags '--static-pie'" -buildmode=pie -tags 'osusergo,netgo,static_build' -v -x -o %{gobuilddir}/bin/u-root %{goipath}
%define gomodulesmode GO111MODULE=on
%gobuild -o %{gobuilddir}/bin/u-root %{goipath}
%endif
%install
%gopkginstall
%if %{without bootstrap}
install -m 0755 -vd %{buildroot}%{_bindir}
install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/
%endif
# if {with check}
# check
# gocheck
# endif
%if %{without bootstrap}
%if %{with check}
%check
%gocheck
%endif
%endif
%if %{without bootstrap}
%files
%license LICENSE
%doc docs examples AUTHORS SECURITY.md tricksandtips.md CONTRIBUTING.md
%doc README.md roadmap.md cmds/core/tail/test_samples/read_backwards.txt
%doc cmds/core/tail/test_samples/read_from_beginning.txt
%doc configs/README.md tools/golang_patched_dce/README.md
%doc docs examples AUTHORS CONTRIBUTING.md README.md SECURITY.md roadmap.md
%doc tricksandtips.md
%doc configs/amd64_config.txt configs/arm_config.txt configs/generic_config.txt
%doc integration/README.md pkg/boot/systembooter/README.md pkg/smbios/README.md
%{_bindir}/*
%{_bindir}/u-root
%endif
%gopkgfiles