diff --git a/.fmf/version b/.fmf/version new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/.fmf/version @@ -0,0 +1 @@ +1 diff --git a/.gitignore b/.gitignore index 895bc9e..0414f17 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,2 @@ -m4-1.4.14.tar.xz -m4-1.4.14.tar.xz.sig -/m4-1.4.15.tar.xz -/m4-1.4.15.tar.xz.sig -/m4-1.4.16.tar.xz -/m4-1.4.16.tar.xz.sig -/m4-1.4.17.tar.xz -/m4-1.4.17.tar.xz.sig +/m4-1.4.20.tar.xz +/m4-1.4.20.tar.xz.sig diff --git a/gating.yaml b/gating.yaml new file mode 100644 index 0000000..282e16b --- /dev/null +++ b/gating.yaml @@ -0,0 +1,7 @@ +--- !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} diff --git a/m4-1.4.17-gnulib-ppc64le.patch b/m4-1.4.17-gnulib-ppc64le.patch deleted file mode 100644 index 698d5f4..0000000 --- a/m4-1.4.17-gnulib-ppc64le.patch +++ /dev/null @@ -1,19 +0,0 @@ ---- m4-1.4.17/tests/test-isnanl.h.ori -+++ m4-1.4.17/tests/test-isnanl.h -@@ -51,6 +51,15 @@ main () - /* A bit pattern that is different from a Quiet NaN. With a bit of luck, - it's a Signalling NaN. */ - { -+#if defined __powerpc__ && LDBL_MANT_DIG == 106 -+ /* This is PowerPC "double double", a pair of two doubles. Inf and Nan are -+ represented as the corresponding 64-bit IEEE values in the first double; -+ the second is ignored. Manipulate only the first double. */ -+ #undef NWORDS -+ #define NWORDS \ -+ ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) -+#endif -+ - memory_long_double m; - m.value = NaNl (); - # if LDBL_EXPBIT0_BIT > 0 - diff --git a/m4-1.4.17-perl-make-check.patch b/m4-1.4.17-perl-make-check.patch deleted file mode 100644 index ae4af40..0000000 --- a/m4-1.4.17-perl-make-check.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up m4-1.4.17/build-aux/update-copyright.orig m4-1.4.17/build-aux/update-copyright ---- m4-1.4.17/build-aux/update-copyright.orig 2015-07-13 11:25:19.502749690 +0200 -+++ m4-1.4.17/build-aux/update-copyright 2015-07-13 11:26:20.445044297 +0200 -@@ -124,7 +124,7 @@ use strict; - use warnings; - - my $copyright_re = 'Copyright'; --my $circle_c_re = '(?:\([cC]\)|@copyright{}|©)'; -+my $circle_c_re = '(?:\([cC]\)|@copyright\{}|\\\\\(co|©)'; - my $holder = $ENV{UPDATE_COPYRIGHT_HOLDER}; - $holder ||= 'Free Software Foundation, Inc.'; - my $prefix_max = 5; diff --git a/m4.spec b/m4.spec index 57d8025..7a38db8 100644 --- a/m4.spec +++ b/m4.spec @@ -1,20 +1,14 @@ -Summary: The GNU macro processor +Summary: GNU macro processor Name: m4 -Version: 1.4.17 -Release: 9%{?dist} -License: GPLv3+ -Group: Applications/Text -Source0: http://ftp.gnu.org/gnu/m4/m4-%{version}.tar.xz -Source1: http://ftp.gnu.org/gnu/m4/m4-%{version}.tar.xz.sig -URL: http://www.gnu.org/software/m4/ -# Patch0: Fixes math tests for little-endian PowerPC, rhbz#1083434 -# patch by Menanteau Guy and Ulrich Weigand -Patch0: m4-1.4.17-gnulib-ppc64le.patch -# Patch1: Fixes FTBFS, already upstream -Patch1: m4-1.4.17-perl-make-check.patch -Requires(post): /sbin/install-info -Requires(preun): /sbin/install-info -BuildRequires: autoconf automake +Version: 1.4.20 +Release: 3%{?dist} +License: GPL-3.0-or-later AND GFDL-1.3-or-later AND FSFULLR AND GPL-3.0-or-later WITH Autoconf-exception-generic-3.0 AND GPL-3.0-or-later WITH Texinfo-exception AND GPL-2.0-or-later WITH Autoconf-exception-generic AND GPL-3.0-or-later WITH Autoconf-exception-generic-3.0 AND MIT +Source0: https://ftp.gnu.org/gnu/m4/m4-%{version}.tar.xz +Source1: https://ftp.gnu.org/gnu/m4/m4-%{version}.tar.xz.sig +URL: https://www.gnu.org/software/m4/ +BuildRequires: make +BuildRequires: gcc autoconf automake +BuildRequires: gettext %ifarch ppc ppc64 BuildRequires: texinfo %endif @@ -34,41 +28,132 @@ Install m4 if you need a macro processor. %prep %setup -q -%patch0 -p1 -b .gnulib-ppc64le -%patch1 -p1 -b .perl-make-check chmod 644 COPYING %build -autoreconf -ivf %configure -make %{?_smp_mflags} +%make_build %install -make install INSTALL="%{__install} -p" DESTDIR=$RPM_BUILD_ROOT +%make_install rm -f $RPM_BUILD_ROOT%{_infodir}/dir +%find_lang %{name} %check make %{?_smp_mflags} check -%files -%doc AUTHORS COPYING ChangeLog NEWS README THANKS TODO +%files -f %{name}.lang +%license COPYING +%doc AUTHORS ChangeLog NEWS README THANKS TODO %{_bindir}/m4 %{_infodir}/* %{_mandir}/man1/m4.1* -%post -if [ -f %{_infodir}/m4.info.gz ]; then # --excludedocs? - /sbin/install-info %{_infodir}/m4.info.gz %{_infodir}/dir || : -fi - -%preun -if [ "$1" = 0 ]; then - if [ -f %{_infodir}/m4.info.gz ]; then # --excludedocs? - /sbin/install-info --delete %{_infodir}/m4.info.gz %{_infodir}/dir || : - fi -fi - %changelog +* Fri Nov 14 2025 Florian Weimer - 1.4.20-3 +- Update License tag with build system licenses + +* Thu Jul 24 2025 Fedora Release Engineering - 1.4.20-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + +* Mon May 12 2025 Frédéric Bérat - 1.4.20-1 +- Update to m4-1.4.20 (#2365446) + +* Tue Feb 04 2025 Frédéric Bérat - 1.4.19-12 +- Add -std=gnu17 to CFLAGS to fix FTBFS until new m4 release gets out (#2340807) + +* Fri Jan 17 2025 Fedora Release Engineering - 1.4.19-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + +* Thu Jul 18 2024 Fedora Release Engineering - 1.4.19-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + +* Thu Jan 25 2024 Fedora Release Engineering - 1.4.19-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Sun Jan 21 2024 Fedora Release Engineering - 1.4.19-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Tue Aug 08 2023 Frederic Berat - 1.4.19-7 +- Migrate to SPDX licenses (#2222092). + +* Thu Jul 20 2023 Fedora Release Engineering - 1.4.19-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Thu Jan 19 2023 Fedora Release Engineering - 1.4.19-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Thu Jul 21 2022 Fedora Release Engineering - 1.4.19-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Thu Jan 20 2022 Fedora Release Engineering - 1.4.19-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Thu Jul 22 2021 Fedora Release Engineering - 1.4.19-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Mon May 31 2021 Vitezslav Crhonek - 1.4.19-1 +- Update to m4-1.4.19 + Resolves: #1965719 + +* Tue Jan 26 2021 Fedora Release Engineering - 1.4.18-17 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Tue Oct 13 2020 Vitezslav Crhonek - 1.4.18-16 +- Drop workaround introduced in previous release + Resolves: #1864107 + +* Thu Aug 06 2020 Vitezslav Crhonek - 1.4.18-15 +- Disable %%check on ppc64le (workaround for FTBFS) + Resolves: #1864107 + +* Sat Aug 01 2020 Fedora Release Engineering - 1.4.18-14 +- Second attempt - Rebuilt for + https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Tue Jul 28 2020 Fedora Release Engineering - 1.4.18-13 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Wed Jan 29 2020 Fedora Release Engineering - 1.4.18-12 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Thu Jul 25 2019 Fedora Release Engineering - 1.4.18-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Fri Feb 01 2019 Fedora Release Engineering - 1.4.18-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Fri Jul 13 2018 Fedora Release Engineering - 1.4.18-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Wed May 02 2018 Vitezslav Crhonek - 1.4.18-8 +- Work around change in glibc + Resolves: #1573342 + +* Thu Feb 22 2018 Vitezslav Crhonek - 1.4.18-7 +- Add BuildRequires gcc +- Remove Group tag + +* Thu Feb 08 2018 Fedora Release Engineering - 1.4.18-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Thu Aug 03 2017 Fedora Release Engineering - 1.4.18-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Wed Jul 26 2017 Fedora Release Engineering - 1.4.18-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Fri Feb 10 2017 Fedora Release Engineering - 1.4.18-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Wed Feb 01 2017 Stephen Gallagher - 1.4.18-2 +- Add missing %%license macro + Resolves: #1418521 + +* Mon Jan 02 2017 Vitezslav Crhonek - 1.4.18-1 +- Update to m4-1.4.18 + Resolves: #1409340 + * Thu Feb 04 2016 Fedora Release Engineering - 1.4.17-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild diff --git a/plans/ci.fmf b/plans/ci.fmf new file mode 100644 index 0000000..3fd3ab7 --- /dev/null +++ b/plans/ci.fmf @@ -0,0 +1,5 @@ +summary: CI Gating Plan +discover: + how: fmf +execute: + how: tmt diff --git a/sources b/sources index f6149f1..17fc999 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -12a3c829301a4fd6586a57d3fcf196dc m4-1.4.17.tar.xz -5e527428642699b78076bf14c1857331 m4-1.4.17.tar.xz.sig +SHA512 (m4-1.4.20.tar.xz) = dc7b4f61452e564b095010029bf6ce4246e5a03959989cd76b09eb8012db7424c52819143020fab21a3471ff57ab026d3eccbd00dd3969819208980565a9fec0 +SHA512 (m4-1.4.20.tar.xz.sig) = bc75a64e47a87fe4073f26850a8344e82d15f156ac5b52cde1af701a0ba4e0d18f414323f86c868f114c4867b00c31ce205a9505343e588ad97825b05136c5eb diff --git a/tests/testsuite/Makefile b/tests/testsuite/Makefile new file mode 100644 index 0000000..12f059c --- /dev/null +++ b/tests/testsuite/Makefile @@ -0,0 +1,62 @@ +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Makefile of /tools/m4/Regression/testsuite +# Description: testsuite +# Author: Martin Cermak +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2015 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/m4/Regression/testsuite +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: Martin Cermak " > $(METADATA) + @echo "Name: $(TEST)" >> $(METADATA) + @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) + @echo "Path: $(TEST_DIR)" >> $(METADATA) + @echo "Description: testsuite" >> $(METADATA) + @echo "Type: Regression" >> $(METADATA) + @echo "TestTime: 3h" >> $(METADATA) + @echo "RunFor: m4" >> $(METADATA) + @echo "Requires: m4 rpm-build autoconf automake gettext gcc" >> $(METADATA) + @echo "Priority: Normal" >> $(METADATA) + @echo "License: GPLv2+" >> $(METADATA) + @echo "Confidential: no" >> $(METADATA) + @echo "Destructive: no" >> $(METADATA) + + rhts-lint $(METADATA) diff --git a/tests/testsuite/PURPOSE b/tests/testsuite/PURPOSE new file mode 100644 index 0000000..a8326f1 --- /dev/null +++ b/tests/testsuite/PURPOSE @@ -0,0 +1,3 @@ +PURPOSE of /tools/m4/Regression/testsuite +Description: testsuite +Author: Martin Cermak diff --git a/tests/testsuite/main.fmf b/tests/testsuite/main.fmf new file mode 100644 index 0000000..bbdfc88 --- /dev/null +++ b/tests/testsuite/main.fmf @@ -0,0 +1,17 @@ +summary: testsuite +description: '' +contact: Martin Cermak +component: + - m4 +test: ./runtest.sh +framework: beakerlib +require: + - m4 + - gcc + - rpm-build + - autoconf + - automake + - gettext +duration: 3h +extra-summary: /tools/m4/Regression/testsuite +extra-task: /tools/m4/Regression/testsuite diff --git a/tests/testsuite/runtest.sh b/tests/testsuite/runtest.sh new file mode 100755 index 0000000..3f1f8b5 --- /dev/null +++ b/tests/testsuite/runtest.sh @@ -0,0 +1,79 @@ +#!/bin/bash +# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# runtest.sh of /tools/m4/Regression/testsuite +# Description: testsuite +# Author: Martin Cermak +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2015 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="m4" +VERSION=$(rpm -q m4 --qf '%{VERSION}') + +rlJournalStart + rlPhaseStartSetup + rlAssertRpm $PACKAGE + rlRun "TMPD=$(mktemp -d)" + rlRun "pushd $TMPD" + rlFetchSrcForInstalled $PACKAGE + rlRun "rpm --define='_topdir $TMPD' -Uvh m4-*src.rpm" + rlPhaseEnd + + rlPhaseStart FAIL "Build the source" + rlRun "rpmbuild --define='_topdir $TMPD' -bc SPECS/m4.spec > stdout.log 2> stderr.log" + rlRun "test -f stderr.log && cat stderr.log || true" + rlFileSubmit stdout.log + rlFileSubmit stderr.log + rlPhaseEnd + + rlPhaseStart FAIL "Run tests" + rlRun "pushd $TMPD/BUILD/m4-${VERSION}-build/m4-${VERSION}" + rlRun "eval `rpm --eval %___build_pre_env`" + # el7 package creates couple tests/*log files (per testcase) + # el6 package doesn't, so we'll create some explicitly + rlRun "make check > tests/testout.log 2> tests/testerr.log" + rlFileSubmit testout.log + rlFileSubmit testerr.log + rlPhaseEnd + + rlPhaseStart FAIL "Check for at least one PASSed test" + rlRun "[[ $(grep ^PASS tests/*log | wc -l) -ge 1 ]]" + rlPhaseEnd + + rlPhaseStart FAIL "Check for no FAILed test" + rlRun "[[ $(cat tests/*log | grep FAIL | grep -P -v '^#' | wc -l) -eq 0 ]]" + rlPhaseEnd + + rlPhaseStart FAIL "Show test results summary" + test -f tests/test-suite.log && \ + rlRun "cat tests/test-suite.log" || \ + rlLogInfo "No summary available." + rlPhaseEnd + + rlPhaseStartCleanup + rlRun "popd -2" + rlRun "rm -r $TMPD" + rlPhaseEnd +rlJournalPrintText +rlJournalEnd