Compare commits

...

26 Commits
master ... f36

Author SHA1 Message Date
Maxwell G
e881b231f8
Update to 3.2.0. 2022-09-02 09:23:45 -05:00
Maxwell G
381288634a
Use %{_rpmmacrodir} macro 2022-09-02 09:23:06 -05:00
Maxwell G
b683603c8b
Use correct SPDX identifier for Public Domain 2022-08-08 19:18:31 -05:00
Maxwell G
3facfd13e8
Convert top level license to SPDX.
Leave "Public Domain" subpackage for now.
2022-08-08 09:37:34 -05:00
Maxwell G
8b2cbc54e0
Stop installing duplicate go-compilers macros 2022-08-08 09:29:10 -05:00
Maxwell G
94eb8c3c37 Update to 3.1.0. 2022-08-08 09:28:15 -05:00
Maxwell G
b98334becd
Add %%golang_arches_future macro
This introduces a new %%golang_arches_future macro so packagers can
replace ExclusvieArch: %%go_arches or %%golang_arches with it to exclude
their package from %ix86.
2022-07-30 01:15:20 +02:00
Fedora Release Engineering
cbb9f295fd Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-07-21 07:13:11 +00:00
Miro Hrončok
e8344ba3bf Drop ExclusiveArch, always build go-srpm-macros and go-filesystem
Fixes https://github.com/fedora-eln/eln/issues/80
2022-06-02 10:56:06 +02:00
Maxwell G
ecb246ae10
Update to 3.0.15. 2022-01-30 11:46:27 -06:00
Maxwell G
f3a357a888
Update to 3.0.14. 2022-01-28 23:33:24 -06:00
Robert-André Mauchin
ffc4f6bd04 Fix typo 2022-01-22 22:56:42 +01:00
Robert-André Mauchin
354b424270 Fix typo 2022-01-22 21:34:39 +01:00
Robert-André Mauchin
72059acf23 Fix archive upload 2022-01-22 18:36:11 +01:00
Robert-André Mauchin
576501b5db Update to 3.0.13 2022-01-22 18:31:36 +01:00
Robert-André Mauchin
9c2688bc18 Convert to rpmautospec 2022-01-22 18:30:30 +01:00
Robert-André Mauchin
d7e32b5577 Update to 3.0.12 2022-01-22 16:18:51 +01:00
Fedora Release Engineering
a02ab588fd - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-01-20 06:54:24 +00:00
Jan Kurik
a61079afca Exchange etcd with grafana 2021-09-23 14:52:25 +02:00
Jan Kurik
69ba76f1b3 Introduced gating 2021-09-09 21:43:16 +02:00
Fedora Release Engineering
365885ea1a - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-07-22 02:31:25 +00:00
Robert-André Mauchin
3d4011af01 Update to 3.0.11 2021-05-17 17:14:25 +02:00
Alejandro Sáez
d957c03f77 Update to 3.0.10 2021-04-26 15:05:14 +02:00
Jeff Law
b1500ff47e - Drop 32 bit arches in EL 9 (originally from Petr Sabata) 2021-02-11 14:56:50 -07:00
Fedora Release Engineering
8c70e912f4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-01-26 08:55:18 +00:00
Neal Gompa
031bb4bed9 Update to 3.0.9 2020-08-13 07:42:01 -04:00
12 changed files with 280 additions and 43 deletions

1
.fmf/version Normal file
View File

@ -0,0 +1 @@
1

9
.gitignore vendored
View File

@ -1 +1,10 @@
/go-rpm-macros-3.0.8.tar.gz
/go-rpm-macros-3.0.9.tar.gz
/go-rpm-macros-3.0.10.tar.gz
/go-rpm-macros-3.0.11.tar.gz
/go-rpm-macros-3.0.12.tar.gz
/go-rpm-macros-3.0.13.tar.gz
/go-rpm-macros-3.0.14.tar.gz
/go-rpm-macros-3.0.15.tar.gz
/go-rpm-macros-3.1.0.tar.gz
/go-rpm-macros-3.2.0.tar.gz

36
changelog Normal file
View File

@ -0,0 +1,36 @@
* Sat Jan 22 2022 Robert-André Mauchin <zebob.m@gmail.com> - 3.0.12-3
- Update to 3.0.12
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.11-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.11-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Mon May 17 2021 Robert-André Mauchin <zebob.m@gmail.com> - 3.0.11-1
- Update to 3.0.11
* Mon Apr 26 2021 Alejandro Sáez <asm@redhat.com> - 3.0.10-1
- Update to 3.0.10
* Thu Feb 11 2021 Jeff Law <law@redhat.com> - 3.0.9-3
- Drop 32 bit arches in EL 9 (originally from Petr Sabata)
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.9-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Thu Aug 13 2020 Neal Gompa <ngompa13@gmail.com> - 3.0.9-1
- Update to 3.0.9
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.8-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.8-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.8-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Wed Jun 05 2019 Nicolas Mailhot <nim@fedoraproject.org>
- 3.0.8-3
- initial Fedora import, for golist 0.10.0 and redhat-rpm-config 130

19
gating.yaml Normal file
View File

@ -0,0 +1,19 @@
--- !Policy
product_versions:
- fedora-*
decision_context: bodhi_update_push_stable
subject_type: koji_build
rules:
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional}
--- !Policy
product_versions:
- rhel-8
decision_context: osci_compose_gate
rules:
- !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.tier1.functional}
--- !Policy
product_versions:
- rhel-9
decision_context: osci_compose_gate
rules:
- !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.tier1.functional}

View File

@ -1,5 +1,5 @@
%global forgeurl https://pagure.io/go-rpm-macros
Version: 3.0.8
Version: 3.2.0
%forgemeta
#https://src.fedoraproject.org/rpms/redhat-rpm-config/pull-request/51
@ -7,20 +7,22 @@ Version: 3.0.8
%global _docdir_fmt %{name}
# Master definition that will be written to macro files
%global golang_arches %{ix86} x86_64 %{arm} aarch64 ppc64le s390x
%global golang_arches_future x86_64 %{arm} aarch64 ppc64le s390x
%global golang_arches %{ix86} %{golang_arches_future}
%global gccgo_arches %{mips}
%if 0%{?rhel} >= 9
%global golang_arches x86_64 aarch64 ppc64le s390x
%endif
# Go sources can contain arch-specific files and our macros will package the
# correct files for each architecture. Therefore, move gopath to _libdir and
# make Go devel packages archful
%global gopath %{_datadir}/gocode
ExclusiveArch: %{golang_arches} %{gccgo_arches}
Name: go-rpm-macros
Release: 6%{?dist}
Release: %autorelease
Summary: Build-stage rpm automation for Go packages
License: GPLv3+
License: GPL-3.0-or-later
URL: %{forgeurl}
Source: %{forgesource}
@ -66,7 +68,7 @@ go-srpm-macros will pull in for Go packages only.
%package -n go-filesystem
Summary: Directories used by Go packages
License: Public Domain
License: LicenseRef-Fedora-Public-Domain
%description -n go-filesystem
This package contains the basic directory layout used by Go packages.
@ -74,7 +76,7 @@ This package contains the basic directory layout used by Go packages.
%package -n go-rpm-templates
Summary: RPM spec templates for Go packages
License: MIT
BuildArch: noarch
# go-rpm-macros only exists on some architectures, so this package cannot be noarch
Requires: go-rpm-macros = %{version}-%{release}
#https://src.fedoraproject.org/rpms/redhat-rpm-config/pull-request/51
#Requires: redhat-rpm-templates
@ -84,8 +86,8 @@ This package contains documented rpm spec templates showcasing how to use the
macros provided by go-rpm-macros to create Go packages.
%prep
%forgesetup
%writevars -f rpm/macros.d/macros.go-srpm golang_arches gccgo_arches gopath
%forgeautosetup -p1
%writevars -f rpm/macros.d/macros.go-srpm golang_arches golang_arches_future gccgo_arches gopath
for template in templates/rpm/*\.spec ; do
target=$(echo "${template}" | sed "s|^\(.*\)\.spec$|\1-bare.spec|g")
grep -v '^#' "${template}" > "${target}"
@ -93,6 +95,13 @@ for template in templates/rpm/*\.spec ; do
done
%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
# This is not intentional, but mips is not a primary Fedora architecture
# Patches and PRs are welcome
@ -107,12 +116,8 @@ install -m 0644 -vp templates/rpm/*spec \
install -m 0755 -vd %{buildroot}%{_bindir}
install -m 0755 bin/* %{buildroot}%{_bindir}
install -m 0755 -vd %{buildroot}%{rpmmacrodir}
install -m 0644 -vp rpm/macros.d/macros.go-* \
install -m 0644 -vp rpm/macros.d/macros.go-*rpm* \
%{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 0644 -vp rpm/lua/rpm/*lua \
%{buildroot}%{_rpmluadir}/fedora/rpm
@ -121,17 +126,22 @@ install -m 0644 -vp rpm/fileattrs/*.attr \
%{buildroot}%{_rpmconfigdir}/fileattrs/
install -m 0755 -vp rpm/*\.{prov,deps} \
%{buildroot}%{_rpmconfigdir}/
%else
install -m 0644 -vp rpm/macros.d/macros.go-srpm \
%{buildroot}%{rpmmacrodir}
%endif
%ifarch %{golang_arches}
install -m 0644 -vp rpm/macros.d/macros.go-compilers-golang \
%{buildroot}%{_rpmconfigdir}/macros.d/macros.go-compiler-golang
install -m 0644 -vp rpm/macros.d/macros.go-compilers-golang{,-pie} \
%{buildroot}%{_rpmconfigdir}/macros.d/
%endif
%ifarch %{gccgo_arches}
install -m 0644 -vp rpm/macros.d/macros.go-compilers-gcc \
%{buildroot}%{_rpmconfigdir}/macros.d/macros.go-compiler-gcc
%{buildroot}%{_rpmconfigdir}/macros.d/
%endif
%ifarch %{golang_arches} %{gccgo_arches}
%files
%license LICENSE.txt
%doc README.md
@ -139,20 +149,10 @@ install -m 0644 -vp rpm/macros.d/macros.go-compilers-gcc \
%{_rpmconfigdir}/fileattrs/*.attr
%{_rpmconfigdir}/*.prov
%{_rpmconfigdir}/*.deps
%{_rpmconfigdir}/macros.d/macros.go-rpm*
%{_rpmconfigdir}/macros.d/macros.go-compiler*
%{_rpmmacrodir}/macros.go-rpm*
%{_rpmmacrodir}/macros.go-compiler*
%{_rpmluadir}/fedora/rpm/*.lua
%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
%license LICENSE-templates.txt
%doc README.md
@ -161,16 +161,19 @@ install -m 0644 -vp rpm/macros.d/macros.go-compilers-gcc \
%dir %{_spectemplatedir}
%{_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
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.8-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.8-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.8-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Wed Jun 05 2019 Nicolas Mailhot <nim@fedoraproject.org>
- 3.0.8-3
- initial Fedora import, for golist 0.10.0 and redhat-rpm-config 130
%autochangelog

6
plans/ci.fmf Normal file
View File

@ -0,0 +1,6 @@
summary: CI Gating Plan
discover:
how: fmf
directory: tests
execute:
how: beakerlib

View File

@ -1 +1 @@
SHA512 (go-rpm-macros-3.0.8.tar.gz) = 1ad7054125f8e1bcad49984bcd695f57eb9410ee79d9f0d63bfba7f8a65ffa62f82e3e071922823091fe4c3445b1bb0f788a625529d1a226a5192cb9ccf6e3cd
SHA512 (go-rpm-macros-3.2.0.tar.gz) = 5d1a7773c0044b3046d6c0006b8aae441b17a52a79b65b3a704619433b1ed27cd59972703ba4cba17ec3f15755d7d81ae99401a7daac2217c3e58adb360a91c7

2
tests/README Normal file
View File

@ -0,0 +1,2 @@
The test's Makefiles are not used in Fedora CI infrastructure. But are kept here
for backward compatibility with traditional beakerlib test harness in RHEL.

View File

@ -0,0 +1,66 @@
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Makefile of /tools/go-rpm-macros/Sanity/gobuild-grafana
# Description: golang rpm macros usage building grafana
# Author: Jan Kuřík <jkurik@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2021 Red Hat, Inc.
#
# This program is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 2 of
# the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see http://www.gnu.org/licenses/.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export TEST=/tools/go-rpm-macros/Sanity/gobuild-grafana
export TESTVERSION=1.0
BUILT_FILES=
FILES=$(METADATA) runtest.sh Makefile PURPOSE
.PHONY: all install download clean
run: $(FILES) build
./runtest.sh
build: $(BUILT_FILES)
test -x runtest.sh || chmod a+x runtest.sh
clean:
rm -f *~ $(BUILT_FILES)
include /usr/share/rhts/lib/rhts-make.include
$(METADATA): Makefile
@echo "Owner: Jan Kuřík <jkurik@redhat.com>" > $(METADATA)
@echo "Name: $(TEST)" >> $(METADATA)
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
@echo "Path: $(TEST_DIR)" >> $(METADATA)
@echo "Description: golang rpm macros usage building" >> $(METADATA)
@echo "Type: Sanity" >> $(METADATA)
@echo "TestTime: 2h" >> $(METADATA)
@echo "RunFor: golang" >> $(METADATA)
@echo "Requires: golang" >> $(METADATA)
@echo "Requires: go-rpm-macros go-srpm-macros" >> $(METADATA)
@echo "Requires: /usr/bin/yumdownloader /usr/bin/yum-builddep" >> $(METADATA)
@echo "Requires: /usr/bin/rpmbuild" >> $(METADATA)
@echo "Priority: Normal" >> $(METADATA)
@echo "License: GPLv2+" >> $(METADATA)
@echo "Confidential: no" >> $(METADATA)
@echo "Destructive: no" >> $(METADATA)
@echo "Releases: Fedora" >> $(METADATA)
rhts-lint $(METADATA)

View File

@ -0,0 +1,3 @@
PURPOSE of /tools/go-rpm-macros/Sanity/gobuild-grafana
Description: golang rpm macros usage building grafana
Author: Jan Kuřík <jkurik@redhat.com>

View File

@ -0,0 +1,17 @@
summary: golang rpm macros usage building
description: ''
contact: Jan Kuřík <jkurik@redhat.com>
component:
- golang
test: ./runtest.sh
framework: beakerlib
recommend:
- golang
- go-rpm-macros
- go-srpm-macros
- /usr/bin/yumdownloader
- /usr/bin/yum-builddep
- /usr/bin/rpmbuild
duration: 2h
extra-summary: /tools/go-rpm-macros/Sanity/gobuild-grafana
extra-task: /tools/go-rpm-macros/Sanity/gobuild-grafana

View File

@ -0,0 +1,75 @@
#!/bin/bash
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# runtest.sh of /tools/go-rpm-macros/Sanity/gobuild-grafana
# Description: golang rpm macros usage building grafana
# Author: Jan Kuřík <jkurik@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2021 Red Hat, Inc.
#
# This program is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 2 of
# the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see http://www.gnu.org/licenses/.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Include Beaker environment
. /usr/share/beakerlib/beakerlib.sh || exit 1
PACKAGE="go-rpm-macros"
GO_PACKAGE="$(rpm -qf $(which go))"
# Conserve the non-zero return value through the pipe
set -o pipefail
rlJournalStart
rlPhaseStartSetup
rlRun "TmpDir=\$(mktemp -d /var/tmp/XXXXXXX)" 0 "Creating tmp directory"
rlRun "pushd $TmpDir"
rlPhaseEnd
rlPhaseStartTest "check macros"
rlRun "gobuild_string=\"$(rpm -E '%gobuild')\"" 127
rlRun "gotest_string=\"$(rpm -E '%gotest')\"" 127
rlAssertNotEquals "Checking if %gobuild macro is defined" "$gobuild_string" "%gobuild"
rlAssertNotEquals "Checking if %gotest macro is defined" "$gotest_string" "%gotest"
rlPhaseEnd
rlPhaseStart FAIL "setup grafana sources"
rlRun "SRPM=\$(basename \$(yumdownloader --source --url grafana | tail -n 1))"
rlRun "yumdownloader --source grafana"
rlRun "yum-builddep --enablerepo=\* -y --srpm ${SRPM}"
rlRun "rpm -i -D '_topdir $TmpDir' ${SRPM}"
rlRun "sed -i 's/^\s*%define\s*compile_frontend\s.*/%define compile_frontend 0/g' \
SPECS/grafana.spec" 0 "Make sure we build only the golang part, no JS stuff"
rlPhaseEnd
rlPhaseStartTest "rpmbuild grafana"
rlRun "rpmbuild --showrc &> ${TmpDir}/rpm.rc"
rlFileSubmit "${TmpDir}/rpm.rc"
rlAssertGrep "%gobuild" SPECS/grafana.spec -w
rlAssertGrep "%gotest" SPECS/grafana.spec -w
rlRun "rpmbuild -bc --define='_topdir $TmpDir' SPECS/grafana.spec \
|& tee grafana.rpmbuild.log"
rlFileSubmit "grafana.rpmbuild.log"
rlPhaseEnd
rlPhaseStartCleanup
rlRun "popd"
rlRun "rm -r $TmpDir" 0 "Removing tmp directory"
rlPhaseEnd
rlJournalPrintText
rlJournalEnd