https://bugzilla.redhat.com/show_bug.cgi?id=1836267
Bug ID: 1836267
Summary: rpmbuild with .rpmrc and .rpmmacros: Too many levels
of recursion when expanding the macro. This is
probably caused by a recursive macro declaration.
Product: Fedora
Version: 31
Hardware: x86_64
Status: NEW
Component: perl-rpm-build-perl
Severity: low
Assignee: ppisar(a)redhat.com
Reporter: d.kucher(a)dk-software.org
QA Contact: extras-qa(a)fedoraproject.org
CC: perl-devel(a)lists.fedoraproject.org, ppisar(a)redhat.com
Target Milestone: ---
Classification: Fedora
Description of problem:
when i try to build rpms with my .rpmrc and .rpmmacros (see it down) file it
fails - it works with none spec file with my pure-ftpd.spec file its the same
error - see down on the page my pure-ftpd file
installed rpm-build version:
[root@buildserver:~]$rpm -qa | grep rpm-build
rpm-build-4.15.1-2.fc31.x86_64
rpm-build-libs-4.15.1-2.fc31.x86_64
[builduser@buildserver:~/rpmbuild/SPECS]$rpmbuild -bb wireguard-tools.spec
Error: /home/d.kucher/rpmbuild/SPECS/wireguard-tools.spec: line 20: Too many
levels of recursion when expanding the macro. This is probably caused by a
recursive macro declaration.
SPEC-File:
Name: wireguard-tools
Summary: Fast, modern and secure VPN tunnel
Version: 1.0.20200513
Release: 1%{?dist}
Epoch: 1
License: GPLv2
URL:
https://git.zx2c4.com/wireguard-tools/
Source0: %{name}-%{version}.tar.xz
BuildRequires: autoconf
Provides: wireguard = %{version}
Obsoletes: wireguard < %{version}
%description
WireGuard is a VPN that runs inside the Linux Kernel and utilizes
state-of-the-art cryptography
%prep
%autosetup -p1
%build
export CFLAGS="%{optflags} -fPIE"
export LDFLAGS="-Wl,--as-needed -Wl,-z,now -Wl,-z,relro -pie -fPIE"
%make_build RUNSTATEDIR=%{_rundir} -C src
%install
mkdir -p %{buildroot}%{_bindir}
%make_install BINDIR=%{_bindir} MANDIR=%{_mandir} RUNSTATEDIR=%{_rundir}
WITH_BASHCOMPLETION=yes WITH_WGQUICK=no WITH_SYSTEMDUNITS=no -C src
strip --strip-unneeded %{buildroot}%{_bindir}/wg
rm -rf %{buildroot}%{_mandir}
%files
%{_bindir}/wg
%{_datadir}/bash-completion/completions/wg
[builduser@buildserver:~]$cat .rpmrc
optflags: x86_64 %{__global_cflags} -m64 -march=core2 -mtune=core2
[builduser@buildserver:~]$cat .rpmmacros
%_topdir %(echo $HOME)/rpmbuild
%__arch_install_post /usr/lib/rpm/check-rpaths /usr/lib/rpm/check-buildroot
%fedora 31
%dist .fc%fedora.%(echo $(/usr/bin/date +%Y%m%d)).dk
%packager Dominik Kucher
%vendor Dominik Kucher
%php_api .php71
%php_debug_build 0
%O3_flags -O3 -fno-strict-aliasing -fno-gcse-after-reload
-fno-inline-functions -fno-ipa-cp -fno-ipa-cp-clone -fno-peel-loops
-fno-predictive-commoning -fno-tree-loop-distribute-patterns
-fno-unswitch-loops
%_smp_mflags -j8
%_include_minidebuginfo 0
%debug_package %{nil}
%__perl_requires %{nil}
%_binary_payload w1.gzdio
%_source_payload w1.gzdio
%__global_ldflags -Wl,-z,now -Wl,-z,relro -Wl,-z,noexecstack
-specs=/usr/lib/rpm/redhat/redhat-hardened-ld
%configure \
CFLAGS="${CFLAGS:-%optflags}"; export CFLAGS; \
CXXFLAGS="${CXXFLAGS:-%optflags}"; export CXXFLAGS; \
FFLAGS="${FFLAGS:-%optflags -I%_fmoddir}"; export FFLAGS; \
FCFLAGS="${FCFLAGS:-%optflags -I%_fmoddir}"; export FCFLAGS; \
LDFLAGS="${LDFLAGS:-%__global_ldflags}"; export LDFLAGS; \
./configure \\\
--host=x86_64-redhat-linux \\\
--build=x86_64-redhat-linux \\\
--target=x86_64-redhat-linux \\\
--program-prefix=%{?_program_prefix} \\\
--disable-dependency-tracking \\\
--prefix=%{_prefix} \\\
--exec-prefix=%{_exec_prefix} \\\
--bindir=%{_bindir} \\\
--sbindir=%{_sbindir} \\\
--sysconfdir=%{_sysconfdir} \\\
--datadir=%{_datadir} \\\
--includedir=%{_includedir} \\\
--libdir=%{_libdir} \\\
--libexecdir=%{_libexecdir} \\\
--localstatedir=%{_localstatedir} \\\
--sharedstatedir=%{_sharedstatedir} \\\
--mandir=%{_mandir} \\\
––––––––––––––––––––––––––––––––––––––––––––––––––––––––
Name: pure-ftpd
Version: 1.0.49
Release: 1%{?dist}
Epoch: 1
Summary: Lightweight, fast and secure FTP server
Group: System Environment/Daemons
License: BSD
URL:
https://www.pureftpd.org/project/pure-ftpd
Source0: %{name}-%{version}.tar.bz2
Source1: %{name}.service
Provides: ftpserver
BuildRequires: pam-devel
BuildRequires: perl
BuildRequires: python
BuildRequires: libcap-devel
BuildRequires: mariadb-devel
BuildRequires: checkpolicy
Requires: usermode
%description
Pure-FTPd is a fast, production-quality, standard-comformant FTP server,
based upon Troll-FTPd. Unlike other popular FTP servers, it has no known
security flaw, it is really trivial to set up and it is especially designed
for modern Linux and FreeBSD kernels.
%prep
%setup -q
%build
export CFLAGS="%{optflags} -fPIE -fuse-ld=gold -fuse-linker-plugin"
export CXXFLAGS="$CFLAGS"
export FFLAGS="$CFLAGS"
export CC="gcc $CFLAGS"
export LDFLAGS="-Wl,-z,now -Wl,-z,relro -Wl,-z,noexecstack -pie $CFLAGS"
%configure \
--sysconfdir=%{_sysconfdir}/%{name} \
--with-capabilities \
--with-sendfile \
--with-paranoidmsg \
--with-altlog \
--with-puredb \
--with-pam \
--with-throttling \
--with-virtualhosts \
--with-virtualchroot \
--with-diraliases \
--with-mysql \
--with-privsep \
--with-rfc2640 \
--with-boring \
--without-inetd \
--without-sysquotas \
--without-uploadscript \
--without-ratios \
--without-quotas \
--without-ftpwho \
--without-implicittls \
--without-tls \
--without-ldap \
--without-pgsql \
--without-peruserlimits \
--without-usernames \
--without-bonjour \
--without-humor \
--without-inetd \
--without-debug
%{__make} %{?_smp_mflags}
%install
make install-strip DESTDIR=%{buildroot}
install -d -m 755 %{buildroot}%{_unitdir}
install -p -m 644 %{SOURCE1} %{buildroot}%{_unitdir}/%{name}.service
install -d -m 755 $RPM_BUILD_ROOT%{_sbindir}
rm %{buildroot}%{_sbindir}/pure-ftpwho
%{buildroot}%{_sbindir}/pure-uploadscript
rm -rf %{buildroot}%{_mandir} %{buildroot}%{_sysconfdir}/%{name}
%post
%systemd_post
%files
%{_bindir}/pure-*
%{_sbindir}/pure-*
%{_unitdir}/%{name}.service
--
You are receiving this mail because:
You are on the CC list for the bug.