Compare commits
No commits in common. "c9s" and "c9-beta" have entirely different histories.
8
.gitignore
vendored
8
.gitignore
vendored
@ -1,6 +1,2 @@
|
|||||||
/go-rpm-macros-3.0.8.tar.gz
|
SOURCES/go-rpm-macros-3.6.0.tar.gz
|
||||||
/go-rpm-macros-3.0.9.tar.gz
|
SOURCES/golist-0.10.4.tar.gz
|
||||||
/golist-0.10.1.tar.gz
|
|
||||||
/go-rpm-macros-3.2.0.tar.gz
|
|
||||||
/go-rpm-macros-3.6.0.tar.gz
|
|
||||||
/golist-0.10.4.tar.gz
|
|
||||||
|
2
.go-rpm-macros.metadata
Normal file
2
.go-rpm-macros.metadata
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
9db262bd1b5acd1c3490d55b839819a878e6659c SOURCES/go-rpm-macros-3.6.0.tar.gz
|
||||||
|
4a105131658d029fe0b2d312b078a056748af2b4 SOURCES/golist-0.10.4.tar.gz
|
@ -18,26 +18,25 @@ Version: 3.6.0
|
|||||||
# make Go devel packages archful
|
# make Go devel packages archful
|
||||||
%global gopath %{_datadir}/gocode
|
%global gopath %{_datadir}/gocode
|
||||||
|
|
||||||
|
# whether to bundle golist or require it as a dependency
|
||||||
%global bundle_golist 1
|
%global bundle_golist 1
|
||||||
|
|
||||||
%global golist_version 0.10.4
|
|
||||||
%if 0%{?bundle_golist}
|
%if 0%{?bundle_golist}
|
||||||
%global golist_builddir golist-%{golist_version}
|
# do not create debuginfo packages when we add a build section
|
||||||
|
%global debug_package %{nil}
|
||||||
|
%global golist_version 0.10.4
|
||||||
|
%global golist_builddir %{_builddir}/golist-%{golist_version}/_build
|
||||||
%global golist_goipath pagure.io/golist
|
%global golist_goipath pagure.io/golist
|
||||||
# where to bundle the golist executable
|
# where to bundle the golist executable
|
||||||
%global golist_execdir %{_libexecdir}/go-rpm-macros
|
%global golist_execdir %{_libexecdir}/go-rpm-macros/
|
||||||
# define gobuild to avoid this package requiring itself to build
|
# define gobuild to avoid this package requiring itself to build
|
||||||
%undefine _auto_set_build_flags
|
%define gobuild(o:) GO111MODULE=off go build -buildmode pie -compiler gc -tags="rpm_crashtraceback ${BUILDTAGS:-}" -ldflags "${LDFLAGS:-} -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n') -extldflags '-Wl,-z,relro -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld '" -a -v %{?**};
|
||||||
%global _dwz_low_mem_die_limit 0
|
|
||||||
%define gobuild(o:) GO111MODULE=on go build -buildmode pie -compiler gc -tags="rpm_crashtraceback ${GO_BUILDTAGS-${BUILDTAGS-}}" -a -v -x -ldflags "${GO_LDFLAGS-${LDFLAGS-}} -B 0x$(echo "%{name}-%{version}-%{release}-${SOURCE_DATE_EPOCH:-}" | sha1sum | cut -d ' ' -f1) -compressdwarf=false -linkmode=external -extldflags '%{build_ldflags}'" %{?**};
|
|
||||||
%else
|
|
||||||
%global debug_package %{nil}
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
ExclusiveArch: %{golang_arches} %{gccgo_arches}
|
ExclusiveArch: %{golang_arches} %{gccgo_arches}
|
||||||
|
|
||||||
Name: go-rpm-macros
|
Name: go-rpm-macros
|
||||||
Release: 7%{?dist}
|
Release: 3%{?dist}
|
||||||
Summary: Build-stage rpm automation for Go packages
|
Summary: Build-stage rpm automation for Go packages
|
||||||
|
|
||||||
License: GPLv3+
|
License: GPLv3+
|
||||||
@ -52,7 +51,6 @@ Requires: go-filesystem = %{version}-%{release}
|
|||||||
|
|
||||||
%if 0%{?bundle_golist}
|
%if 0%{?bundle_golist}
|
||||||
BuildRequires: golang
|
BuildRequires: golang
|
||||||
Provides: bundled(golist) = %{golist_version}
|
|
||||||
%else
|
%else
|
||||||
Requires: golist
|
Requires: golist
|
||||||
%endif
|
%endif
|
||||||
@ -144,11 +142,23 @@ done
|
|||||||
%if 0%{?bundle_golist}
|
%if 0%{?bundle_golist}
|
||||||
# Add libexec to PATH
|
# Add libexec to PATH
|
||||||
%patch2 -p1
|
%patch2 -p1
|
||||||
tar -xf %{SOURCE1}
|
pushd %{_builddir}
|
||||||
pushd %{golist_builddir}
|
tar -xf %{_sourcedir}/golist-%{golist_version}.tar.gz
|
||||||
|
cd golist-%{golist_version}
|
||||||
%patch1 -p1
|
%patch1 -p1
|
||||||
|
cp %{_builddir}/golist-%{golist_version}/LICENSE %{_builddir}/go-rpm-macros-%{version}/LICENSE-golist
|
||||||
popd
|
popd
|
||||||
cp %{golist_builddir}/LICENSE LICENSE-golist
|
|
||||||
|
# create directory structure for a Go build
|
||||||
|
if [[ ! -e %{golist_builddir}/bin ]]; then
|
||||||
|
install -m 0755 -vd %{golist_builddir}/bin
|
||||||
|
export GOPATH=%{golist_builddir}:${GOPATH:+${GOPATH}:}/usr/share/gocode
|
||||||
|
fi
|
||||||
|
if [[ ! -e %{golist_builddir}/src/%{golist_goipath} ]]; then
|
||||||
|
install -m 0755 -vd %{golist_builddir}/src/pagure.io
|
||||||
|
ln -sf $(dirname %{golist_builddir}) %{golist_builddir}/src/%{golist_goipath}
|
||||||
|
|
||||||
|
fi
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%patch3 -p1
|
%patch3 -p1
|
||||||
@ -157,22 +167,15 @@ cp %{golist_builddir}/LICENSE LICENSE-golist
|
|||||||
%build
|
%build
|
||||||
# build golist
|
# build golist
|
||||||
%if 0%{?bundle_golist}
|
%if 0%{?bundle_golist}
|
||||||
pushd %{golist_builddir}
|
pushd %{golist_builddir}/src/%{golist_goipath}
|
||||||
go mod init %{golist_goipath} && go mod tidy
|
export GOPATH=%{golist_builddir}:${GOPATH:+${GOPATH}:}/usr/share/gocode
|
||||||
for cmd in cmd/* ; do
|
for cmd in cmd/* ; do
|
||||||
%gobuild -o bin/$(basename $cmd) ./$cmd
|
%gobuild -o %{golist_builddir}/bin/$(basename $cmd) %{golist_goipath}/$cmd
|
||||||
done
|
done
|
||||||
popd
|
popd
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%install
|
%install
|
||||||
install -m 0755 -vd %{buildroot}%{rpmmacrodir}
|
|
||||||
|
|
||||||
install -m 0755 -vd %{buildroot}%{_rpmluadir}/fedora/srpm
|
|
||||||
install -m 0644 -vp rpm/lua/srpm/*lua \
|
|
||||||
%{buildroot}%{_rpmluadir}/fedora/srpm
|
|
||||||
|
|
||||||
%ifarch %{golang_arches} %{gccgo_arches}
|
|
||||||
# Some of those probably do not work with gcc-go right now
|
# Some of those probably do not work with gcc-go right now
|
||||||
# This is not intentional, but mips is not a primary Fedora architecture
|
# This is not intentional, but mips is not a primary Fedora architecture
|
||||||
# Patches and PRs are welcome
|
# Patches and PRs are welcome
|
||||||
@ -181,14 +184,20 @@ install -m 0755 -vd %{buildroot}%{gopath}/src
|
|||||||
|
|
||||||
install -m 0755 -vd %{buildroot}%{_spectemplatedir}
|
install -m 0755 -vd %{buildroot}%{_spectemplatedir}
|
||||||
|
|
||||||
install -m 0644 -vp templates/rpm/*spec \
|
if ls templates/rpm/*\.spec; then
|
||||||
%{buildroot}%{_spectemplatedir}
|
install -m 0644 -vp templates/rpm/*spec \
|
||||||
|
%{buildroot}%{_spectemplatedir}
|
||||||
|
fi
|
||||||
|
|
||||||
install -m 0755 -vd %{buildroot}%{_bindir}
|
install -m 0755 -vd %{buildroot}%{_bindir}
|
||||||
install -m 0755 bin/* %{buildroot}%{_bindir}
|
install -m 0755 bin/* %{buildroot}%{_bindir}
|
||||||
|
|
||||||
install -m 0644 -vp rpm/macros.d/macros.go-*rpm* \
|
install -m 0755 -vd %{buildroot}%{rpmmacrodir}
|
||||||
|
install -m 0644 -vp rpm/macros.d/macros.go-* \
|
||||||
%{buildroot}%{rpmmacrodir}
|
%{buildroot}%{rpmmacrodir}
|
||||||
|
install -m 0755 -vd %{buildroot}%{_rpmluadir}/fedora/srpm
|
||||||
|
install -m 0644 -vp rpm/lua/srpm/*lua \
|
||||||
|
%{buildroot}%{_rpmluadir}/fedora/srpm
|
||||||
install -m 0755 -vd %{buildroot}%{_rpmluadir}/fedora/rpm
|
install -m 0755 -vd %{buildroot}%{_rpmluadir}/fedora/rpm
|
||||||
install -m 0644 -vp rpm/lua/rpm/*lua \
|
install -m 0644 -vp rpm/lua/rpm/*lua \
|
||||||
%{buildroot}%{_rpmluadir}/fedora/rpm
|
%{buildroot}%{_rpmluadir}/fedora/rpm
|
||||||
@ -197,50 +206,47 @@ install -m 0644 -vp rpm/fileattrs/*.attr \
|
|||||||
%{buildroot}%{_rpmconfigdir}/fileattrs/
|
%{buildroot}%{_rpmconfigdir}/fileattrs/
|
||||||
install -m 0755 -vp rpm/*\.{prov,deps} \
|
install -m 0755 -vp rpm/*\.{prov,deps} \
|
||||||
%{buildroot}%{_rpmconfigdir}/
|
%{buildroot}%{_rpmconfigdir}/
|
||||||
%else
|
|
||||||
install -m 0644 -vp rpm/macros.d/macros.go-srpm \
|
|
||||||
%{buildroot}%{rpmmacrodir}
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%ifarch %{golang_arches}
|
%ifarch %{golang_arches}
|
||||||
install -m 0644 -vp rpm/macros.d/macros.go-compilers-golang{,-pie} \
|
install -m 0644 -vp rpm/macros.d/macros.go-compilers-golang \
|
||||||
%{buildroot}%{_rpmconfigdir}/macros.d/
|
%{buildroot}%{_rpmconfigdir}/macros.d/macros.go-compiler-golang
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%ifarch %{gccgo_arches}
|
%ifarch %{gccgo_arches}
|
||||||
install -m 0644 -vp rpm/macros.d/macros.go-compilers-gcc \
|
install -m 0644 -vp rpm/macros.d/macros.go-compilers-gcc \
|
||||||
%{buildroot}%{_rpmconfigdir}/macros.d/
|
%{buildroot}%{_rpmconfigdir}/macros.d/macros.go-compiler-gcc
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
# install golist
|
# install golist
|
||||||
%if 0%{?bundle_golist}
|
%if 0%{?bundle_golist}
|
||||||
install -m 0755 -vd %{buildroot}%{golist_execdir}
|
install -m 0755 -vd %{buildroot}%{golist_execdir}
|
||||||
install -m 0755 -vp %{golist_builddir}/bin/* %{buildroot}%{golist_execdir}/
|
install -m 0755 -vp %{golist_builddir}/bin/* %{buildroot}%{golist_execdir}/
|
||||||
sed -i "s,golist ,%{golist_execdir}/golist ,g" \
|
|
||||||
%{buildroot}%{_bindir}/go-rpm-integration \
|
|
||||||
%{buildroot}%{_rpmconfigdir}/gosymlink.deps \
|
|
||||||
%{buildroot}%{_rpmmacrodir}/macros.go-rpm
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%ifarch %{golang_arches} %{gccgo_arches}
|
|
||||||
%files
|
%files
|
||||||
%license LICENSE.txt
|
%license LICENSE.txt LICENSE-golist
|
||||||
%if %{defined bundle_golist}
|
|
||||||
%license LICENSE-golist
|
|
||||||
%endif
|
|
||||||
%doc README.md
|
%doc README.md
|
||||||
%{_bindir}/*
|
%{_bindir}/*
|
||||||
%{_rpmconfigdir}/fileattrs/*.attr
|
%{_rpmconfigdir}/fileattrs/*.attr
|
||||||
%{_rpmconfigdir}/*.prov
|
%{_rpmconfigdir}/*.prov
|
||||||
%{_rpmconfigdir}/*.deps
|
%{_rpmconfigdir}/*.deps
|
||||||
%{_rpmmacrodir}/macros.go-rpm*
|
%{_rpmconfigdir}/macros.d/macros.go-rpm*
|
||||||
%{_rpmmacrodir}/macros.go-compiler*
|
%{_rpmconfigdir}/macros.d/macros.go-compiler*
|
||||||
%{_rpmluadir}/fedora/rpm/*.lua
|
%{_rpmluadir}/fedora/rpm/*.lua
|
||||||
# package golist
|
# package golist
|
||||||
%if 0%{?bundle_golist}
|
%if 0%{?bundle_golist}
|
||||||
%{golist_execdir}/golist
|
%{golist_execdir}/golist
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%files -n go-srpm-macros
|
||||||
|
%license LICENSE.txt
|
||||||
|
%doc README.md
|
||||||
|
%{_rpmconfigdir}/macros.d/macros.go-srpm
|
||||||
|
%{_rpmluadir}/fedora/srpm/*.lua
|
||||||
|
|
||||||
|
%files -n go-filesystem
|
||||||
|
%dir %{gopath}
|
||||||
|
%dir %{gopath}/src
|
||||||
|
|
||||||
%files -n go-rpm-templates
|
%files -n go-rpm-templates
|
||||||
%license LICENSE-templates.txt
|
%license LICENSE-templates.txt
|
||||||
@ -250,36 +256,7 @@ sed -i "s,golist ,%{golist_execdir}/golist ,g" \
|
|||||||
%dir %{_spectemplatedir}
|
%dir %{_spectemplatedir}
|
||||||
%{_spectemplatedir}/*.spec
|
%{_spectemplatedir}/*.spec
|
||||||
|
|
||||||
%files -n go-filesystem
|
|
||||||
%dir %{gopath}
|
|
||||||
%dir %{gopath}/src
|
|
||||||
%endif
|
|
||||||
|
|
||||||
# we only build go-srpm-macros on all architectures
|
|
||||||
%files -n go-srpm-macros
|
|
||||||
%license LICENSE.txt
|
|
||||||
%doc README.md
|
|
||||||
%{_rpmmacrodir}/macros.go-srpm
|
|
||||||
%{_rpmluadir}/fedora/srpm/*.lua
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Wed Nov 13 2024 Alejandro Sáez <asm@redhat.com>
|
|
||||||
- Revert go-rpm-templates to noarch
|
|
||||||
- Resolves: RHEL-67300
|
|
||||||
- Related: RHEL-52226
|
|
||||||
|
|
||||||
* Wed Nov 06 2024 Alejandro Sáez <asm@redhat.com> - 3.6.0-6
|
|
||||||
- Add back again ExclusiveArch, it was removed by mistake.
|
|
||||||
- Resolves: RHEL-52226
|
|
||||||
|
|
||||||
* Mon Nov 04 2024 Alejandro Sáez <asm@redhat.com> - 3.6.0-5
|
|
||||||
- Make golist non optional
|
|
||||||
- Resolves: RHEL-52226
|
|
||||||
|
|
||||||
* Thu Oct 31 2024 Alejandro Sáez <asm@redhat.com> - 3.6.0-4
|
|
||||||
- Enable debuginfo package
|
|
||||||
- Resolves: RHEL-52226
|
|
||||||
|
|
||||||
* Wed Jul 31 2024 Alejandro Sáez <asm@redhat.com> - 3.6.0-3
|
* Wed Jul 31 2024 Alejandro Sáez <asm@redhat.com> - 3.6.0-3
|
||||||
- Fix typo in add-gobuild-and-gotest.patch
|
- Fix typo in add-gobuild-and-gotest.patch
|
||||||
- Resolves: RHEL-7437
|
- Resolves: RHEL-7437
|
@ -1,6 +0,0 @@
|
|||||||
--- !Policy
|
|
||||||
product_versions:
|
|
||||||
- rhel-9
|
|
||||||
decision_context: osci_compose_gate
|
|
||||||
rules:
|
|
||||||
- !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.tier1.functional}
|
|
2
sources
2
sources
@ -1,2 +0,0 @@
|
|||||||
SHA512 (go-rpm-macros-3.6.0.tar.gz) = 904406180a1bedb70dd0bacc3794dee7f1ff8e4329230750ef903338f22c2beb995e23f1d647191a4e094860b31933ae7b3acfa35d6ca67aed8c591bdd45c3bb
|
|
||||||
SHA512 (golist-0.10.4.tar.gz) = 81fc9cdc4cb0fa1b78ade56c60cb2ac0070dcb11130a333e61053a266e2312b03e64a6705415d6d20883ae4f8cd0be57722c93835c3efffdfaeb9330f4cc12ea
|
|
Loading…
Reference in New Issue
Block a user