From f68adda56a6c730b24aa187ec78b6a06f3b13ea8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20=C5=A0abata?= Date: Thu, 15 Oct 2020 16:37:54 +0200 Subject: [PATCH] RHEL 9.0.0 Alpha bootstrap The content of this branch was automatically imported from Fedora ELN with the following as its source: https://src.fedoraproject.org/rpms/libmpc#10cf4b98f37e6112bda99fce13581155f2952ed0 --- .gitignore | 4 + libmpc.rpmlintrc | 8 + libmpc.spec | 268 ++++++++++++++++++++++++++++ sources | 1 + tests/internal-testsuite/Makefile | 63 +++++++ tests/internal-testsuite/PURPOSE | 60 +++++++ tests/internal-testsuite/runtest.sh | 60 +++++++ tests/tests.yml | 17 ++ 8 files changed, 481 insertions(+) create mode 100644 libmpc.rpmlintrc create mode 100644 libmpc.spec create mode 100644 sources create mode 100644 tests/internal-testsuite/Makefile create mode 100644 tests/internal-testsuite/PURPOSE create mode 100644 tests/internal-testsuite/runtest.sh create mode 100644 tests/tests.yml diff --git a/.gitignore b/.gitignore index e69de29..a271f29 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1,4 @@ +*.rpm +.build-* +mpc-*/ +/mpc-*.tar.gz diff --git a/libmpc.rpmlintrc b/libmpc.rpmlintrc new file mode 100644 index 0000000..5e696af --- /dev/null +++ b/libmpc.rpmlintrc @@ -0,0 +1,8 @@ +# THIS FILE IS FOR WHITELISTING RPMLINT ERRORS AND WARNINGS IN TASKOTRON +# https://fedoraproject.org/wiki/Taskotron/Tasks/dist.rpmlint#Whitelisting_errors + +# The dictionary lacks some technical words +addFilter(r'spelling-error .* symlinks') + +# Documentation is in the -doc subpackage +addFilter(r'^libmpc.*-devel\.[^:]+: W: no-documentation') diff --git a/libmpc.spec b/libmpc.spec new file mode 100644 index 0000000..e4d861e --- /dev/null +++ b/libmpc.spec @@ -0,0 +1,268 @@ +# build compat-libmpc for bootstrapping purposes +%global bootstrap 0 +%global bootstrap_version 0.9 + +Summary: C library for multiple precision complex arithmetic +Name: libmpc +Version: 1.1.0 +Release: 9%{?dist} +License: LGPLv3+ +URL: http://www.multiprecision.org/mpc/ +Source0: https://ftp.gnu.org/gnu/mpc/mpc-%{version}.tar.gz +%if 0%{?bootstrap} +Source1: https://ftp.gnu.org/gnu/mpc/mpc-%{bootstrap_version}.tar.gz +%endif + +BuildRequires: gcc +BuildRequires: gmp-devel >= 5.0.0 +BuildRequires: mpfr-devel + +# This can be removed before the next build +Obsoletes: libmpc-mpfr3 < 1.1.0-7 +Provides: libmpc-mpfr3 = %{version}-%{release} + +%if 0%{?bootstrap} == 0 +Obsoletes: compat-libmpc < %{version}-1 +Provides: compat-libmpc = %{version}-%{release} +%endif + +%description +MPC is a C library for the arithmetic of complex numbers with +arbitrarily high precision and correct rounding of the result. It is +built upon and follows the same principles as Mpfr. + +%package devel +Summary: Headers and shared development libraries for MPC +Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: gmp-devel%{?_isa} +Requires: mpfr-devel%{?_isa} + +# This can be removed before the next build +Obsoletes: libmpc-mpfr3-devel < 1.1.0-7 +Provides: libmpc-mpfr3-devel = %{version}-%{release} + +%description devel +Header files and shared library symlinks for the MPC library. + +%package doc +Summary: Documentation for the MPC library +License: GFDL +BuildArch: noarch + +%description doc +Documentation for the MPC library. + +%if 0%{?bootstrap} +%package -n compat-libmpc +Summary: compat/bootstrap mpc-%{bootstrap_version} library + +%description -n compat-libmpc +Contains the .so files for mpc version %{bootstrap-version}. +%endif + +%prep +%setup -q -n mpc-%{version} +%if 0%{?bootstrap} +%setup -q -n mpc-%{version} -a 1 +%endif + +%build +%configure --disable-static + +# Get rid of undesirable hardcoded rpaths; workaround libtool reordering +# -Wl,--as-needed after all the libraries. +sed -e 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' \ + -e 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' \ + -e 's|CC="\(g..\)"|CC="\1 -Wl,--as-needed"|' \ + -i libtool + +%make_build + +%if 0%{?bootstrap} +export CPPFLAGS="%{optflags} -std=gnu99" +export CFLAGS="%{optflags} -std=gnu99" +export EGREP=egrep + +pushd mpc-%{bootstrap_version} +%configure --disable-static +%make_build +popd +%endif + +%install +%if 0%{?bootstrap} +%make_install -C mpc-%{bootstrap_version} + +## remove everything but shlib +rm -fv %{buildroot}%{_libdir}/libmpc.so +rm -fv %{buildroot}%{_includedir}/* +rm -fv %{buildroot}%{_infodir}/* +%endif + +%make_install +rm -f %{buildroot}/%{_libdir}/*.la +rm -f %{buildroot}/%{_infodir}/dir + +%check +export LD_LIBRARY_PATH=%{buildroot}%{_libdir} +make check + +%files +%license COPYING.LESSER +%doc README NEWS +%{_libdir}/libmpc.so.3* + +%files devel +%{_libdir}/libmpc.so +%{_includedir}/mpc.h + +%files doc +%doc AUTHORS +%{_infodir}/*.info* + +%if 0%{?bootstrap} +%files -n compat-libmpc +%{_libdir}/libmpc.so.2* +%endif + +%changelog +* Tue Jul 28 2020 Fedora Release Engineering - 1.1.0-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Wed Jan 29 2020 Fedora Release Engineering - 1.1.0-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Fri Oct 11 2019 Jerry James - 1.1.0-7 +- Drop the libmpc-mpfr3 and libmpc-mpfr3-devel subpackages + +* Wed Oct 9 2019 Jerry James - 1.1.0-6 +- Build the main package against mpfr4 + +* Tue Oct 8 2019 Jerry James - 1.1.0-5 +- Make mpfr3 and mpfr3-devel subpackages +- Drop the compat-libmpc package; nothing in Fedora needs it +- Update project URL +- Add a -doc subpackage to hold the GFDL-licensed content +- Drop unnecessary texinfo BR +- Drop ldconfig_scriptlets; this version cannot appear in distros that need it +- Make sure there are no rpaths and that -Wl,--as-needed takes effect + +* Thu Jul 25 2019 Fedora Release Engineering - 1.1.0-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Fri Feb 01 2019 Fedora Release Engineering - 1.1.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Fri Jul 13 2018 Fedora Release Engineering - 1.1.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Fri Jun 15 2018 Serhii Turivnyi - 1.1.0-1 +- Add tests according to the CI wiki. PR: https://src.fedoraproject.org/rpms/libmpc/pull-request/3 + +* Mon Feb 26 2018 Zbigniew Jędrzejewski-Szmek - 1.1.0-1 +- Modernization of the spec file (remove Group, use new make and ldconfig macros, + add gcc to BuildRequires) +- Move build to %%build + +* Mon Feb 26 2018 James Paul Turner - 1.1.0-1 +- Upgrade to libmpc version 1.1.0 +- Fix broken compat package build + +* Wed Feb 07 2018 Fedora Release Engineering - 1.0.2-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Thu Aug 03 2017 Fedora Release Engineering - 1.0.2-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Wed Jul 26 2017 Fedora Release Engineering - 1.0.2-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Wed Feb 01 2017 Stephen Gallagher - 1.0.2-6 +- Add missing %%license macro + +* Thu Feb 04 2016 Fedora Release Engineering - 1.0.2-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Wed Jun 17 2015 Fedora Release Engineering - 1.0.2-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Sun Aug 17 2014 Fedora Release Engineering - 1.0.2-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Sat Jun 07 2014 Fedora Release Engineering - 1.0.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Mon Feb 24 2014 Peter Robinson 1.0.2-1 +- mpc-1.0.2 + +* Sat Aug 03 2013 Fedora Release Engineering - 1.0.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Tue Feb 19 2013 Rex Dieter - 1.0.1-1 +- compat-libmpc (for bootsrapping purposes) +- mpc-1.0.1 +- update Source URLs +- fix License: tag + +* Thu Feb 14 2013 Fedora Release Engineering - 1.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Thu Aug 02 2012 Rex Dieter - 1.0-2 +- %%files: track lib soname (so bumps aren't a surprise) +- tighten subpkg deps (%%_isa) +- %%build: --disable-static + +* Thu Aug 2 2012 Petr Machata - 1.0-1 +- Upstream 1.0 + +* Thu Jul 19 2012 Fedora Release Engineering - 0.9-3.2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Fri Jan 13 2012 Fedora Release Engineering - 0.9-2.2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Wed Oct 26 2011 Marcela Mašláňová - 0.9-1.2 +- rebuild with new gmp without compat lib + +* Wed Oct 12 2011 Peter Schiffer - 0.9-1.1 +- rebuild with new gmp + +* Wed Jun 22 2011 - 0.9-1 +- Upstream 0.9 + +* Tue Feb 08 2011 Fedora Release Engineering - 0.8.3-0.3.svn855 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Tue Nov 30 2010 Petr Machata - 0.8.3-0.2.svn855 +- Bump for rebuild against the new mpfr + +* Fri Nov 19 2010 Petr Machata - 0.8.3-0.1.svn855 +- Devel updates (to-be-0.8.3, SVN release 855) + - New functions mpc_set_dc, mpc_set_ldc, mpc_get_dc, mpc_get_ldc + - Speed-up mpc_pow_si and mpc_pow_z + - Bug fixes in trigonometric functions, exp, sqrt +- Upstream 0.8.2 + - Speed-up mpc_pow_ui +- Adjust BuildRequires +- Resolves: #653931 + +* Wed Jan 20 2010 Petr Machata - 0.8.1-1 +- Upstream 0.8.1 + - acosh, asinh, atanh: swap of precisions between real and imaginary parts + - atan: memory leak + - log: wrong ternary value in data file; masked by bug in Mpfr 2.4.1 +- Resolves: #555471 FTBFS libmpc-0.8-3.fc13 + +* Fri Nov 13 2009 Petr Machata - 0.8-3 +- Require mpfr-devel, gmp-devel in -devel subpackage +- Don't pass --entry to install-info + +* Thu Nov 12 2009 Petr Machata - 0.8-2 +- Rename the package to libmpc, it's a better choice of name +- %%preun should uninstall mpc's info page, not make's +- Move info page to -devel +- BR on -devel packages +- Drop postscript documentation + +* Thu Nov 12 2009 Petr Machata - 0.8-1 +- Initial package. diff --git a/sources b/sources new file mode 100644 index 0000000..7cad0be --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (mpc-1.1.0.tar.gz) = 72d657958b07c7812dc9c7cbae093118ce0e454c68a585bfb0e2fa559f1bf7c5f49b93906f580ab3f1073e5b595d23c6494d4d76b765d16dde857a18dd239628 diff --git a/tests/internal-testsuite/Makefile b/tests/internal-testsuite/Makefile new file mode 100644 index 0000000..25a2a8d --- /dev/null +++ b/tests/internal-testsuite/Makefile @@ -0,0 +1,63 @@ +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Makefile of /tools/libmpc/Regression/internal-testsuite +# Description: internal-testsuite +# Author: Martin Coufal +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2016 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/libmpc/Regression/internal-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 Coufal " > $(METADATA) + @echo "Name: $(TEST)" >> $(METADATA) + @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) + @echo "Path: $(TEST_DIR)" >> $(METADATA) + @echo "Description: internal-testsuite" >> $(METADATA) + @echo "Type: Regression" >> $(METADATA) + @echo "TestTime: 30m" >> $(METADATA) + @echo "RunFor: libmpc" >> $(METADATA) + @echo "Requires: libmpc gmp-devel mpfr-devel texinfo rpm-build gcc gcc-c++" >> $(METADATA) + @echo "Priority: Normal" >> $(METADATA) + @echo "License: GPLv2+" >> $(METADATA) + @echo "Confidential: no" >> $(METADATA) + @echo "Destructive: no" >> $(METADATA) + @echo "Releases: -RHEL4 -RHELClient5 -RHELServer5" >> $(METADATA) + + rhts-lint $(METADATA) diff --git a/tests/internal-testsuite/PURPOSE b/tests/internal-testsuite/PURPOSE new file mode 100644 index 0000000..cf90af1 --- /dev/null +++ b/tests/internal-testsuite/PURPOSE @@ -0,0 +1,60 @@ +#!/bin/bash +# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# runtest.sh of /tools/libmpc/Regression/internal-testsuite +# Description: internal-testsuite +# Author: Martin Coufal +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2016 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/bin/rhts-environment.sh || exit 1 +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +PACKAGE="${PACKAGE:-$(rpm -qf --qf='%{name}\n' /usr/lib64/libmpc.so.3)}" +export PACKAGE + +rlJournalStart + rlPhaseStartSetup + rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory" + rlRun "pushd $TmpDir" + rlFetchSrcForInstalled $PACKAGE + rlAssertRpm $PACKAGE + rlRun "dnf builddep -y $PACKAGE" + rlRun "rpm --define='_topdir $TmpDir' -Uvh *src.rpm" + rlRun "rpmbuild --define='_topdir $TmpDir' -bc SPECS/libmpc.spec" + rlPhaseEnd + + rlPhaseStartTest + rlRun "pushd BUILD/mpc-*" + # test + rlRun "make RUNTESTFLAGS='--tool_exec=$BIN' check |& tee $TmpDir/check.log" + rlRun "popd" + # no unexpected results should appear + rlRun "grep '^# of unexpected' check.log" 1 + rlPhaseEnd + + rlPhaseStartCleanup + rlRun "popd" + rlRun "rm -r $TmpDir" 0 "Removing tmp directory" + rlPhaseEnd +rlJournalPrintText +rlJournalEnd diff --git a/tests/internal-testsuite/runtest.sh b/tests/internal-testsuite/runtest.sh new file mode 100644 index 0000000..cf90af1 --- /dev/null +++ b/tests/internal-testsuite/runtest.sh @@ -0,0 +1,60 @@ +#!/bin/bash +# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# runtest.sh of /tools/libmpc/Regression/internal-testsuite +# Description: internal-testsuite +# Author: Martin Coufal +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2016 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/bin/rhts-environment.sh || exit 1 +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +PACKAGE="${PACKAGE:-$(rpm -qf --qf='%{name}\n' /usr/lib64/libmpc.so.3)}" +export PACKAGE + +rlJournalStart + rlPhaseStartSetup + rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory" + rlRun "pushd $TmpDir" + rlFetchSrcForInstalled $PACKAGE + rlAssertRpm $PACKAGE + rlRun "dnf builddep -y $PACKAGE" + rlRun "rpm --define='_topdir $TmpDir' -Uvh *src.rpm" + rlRun "rpmbuild --define='_topdir $TmpDir' -bc SPECS/libmpc.spec" + rlPhaseEnd + + rlPhaseStartTest + rlRun "pushd BUILD/mpc-*" + # test + rlRun "make RUNTESTFLAGS='--tool_exec=$BIN' check |& tee $TmpDir/check.log" + rlRun "popd" + # no unexpected results should appear + rlRun "grep '^# of unexpected' check.log" 1 + rlPhaseEnd + + rlPhaseStartCleanup + rlRun "popd" + rlRun "rm -r $TmpDir" 0 "Removing tmp directory" + rlPhaseEnd +rlJournalPrintText +rlJournalEnd diff --git a/tests/tests.yml b/tests/tests.yml new file mode 100644 index 0000000..1293d73 --- /dev/null +++ b/tests/tests.yml @@ -0,0 +1,17 @@ +--- +# This first play always runs on the local staging system +- hosts: localhost + roles: + - role: standard-test-beakerlib + tags: + - classic + tests: + - internal-testsuite + required_packages: + - libmpc + - gmp-devel + - mpfr-devel + - texinfo + - rpm-build + - gcc + - gcc-c++