From 6680a34f8ebae7d7d0f3fe4c9b6aa46da0ddfd22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Mon, 28 Mar 2022 12:48:53 +0200 Subject: [PATCH] Fix build with package notes The issue that in %prep the flags are sligtly different than in %build or %install (%buildsubdir is not set), and we end up with the wrong path in the Makefile, see rhbz#2055863. This moves the sed into %build, which is somewhat ugly, but solves the issue. The sequence of commands that is executed is the same, except that the sed is invoked as first thing in %build, not as the last in %prep. I think that for such a simple package this is acceptable, and it's not worth waiting for a "proper" solution (which will likely require some new funtionality in rpm). --- argon2.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/argon2.spec b/argon2.spec index fc75b65..6fe000a 100644 --- a/argon2.spec +++ b/argon2.spec @@ -18,7 +18,7 @@ Name: argon2 Version: %{upstream_version}%{?upstream_prever:~%{upstream_prever}} -Release: 8%{?dist} +Release: 9%{?dist} Summary: The password-hashing tools License: Public Domain or ASL 2.0 @@ -88,6 +88,7 @@ fi # Fix pkgconfig file sed -e 's:lib/@HOST_MULTIARCH@:%{_lib}:;s/@UPSTREAM_VER@/%{version}/' -i %{libname}.pc +%build # Honours default RPM build options and library path, do not use -march=native sed -e '/^CFLAGS/s:^CFLAGS:LDFLAGS=%{build_ldflags}\nCFLAGS:' \ -e 's:-O3 -Wall:%{optflags}:' \ @@ -96,7 +97,6 @@ sed -e '/^CFLAGS/s:^CFLAGS:LDFLAGS=%{build_ldflags}\nCFLAGS:' \ -e 's:CFLAGS += -march=\$(OPTTARGET)::' \ -i Makefile -%build # parallel build is not supported make -j1 @@ -135,6 +135,9 @@ make test %changelog +* Mon Mar 28 2022 Zbigniew Jędrzejewski-Szmek - 20171227-9 +- Fix build with package notes (rhbz#2066558) + * Wed Jan 19 2022 Fedora Release Engineering - 20171227-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild