Re: F34 pkg.spec rpmbuild OK on local dev; same spec fails @ my COPR. why?

2021-05-13 Thread PGNet Dev

hi,

On 5/13/21 6:06 PM, Sérgio Basto wrote:


mock -r fedora-34-x86_64 --rebuild  
lua-resty-luajit2-git.HEAD-0.pgnd_20210513_212639.fc34.src.rpm
also fails in my machine, %forgesetup -z 0 is where it fails


hm.  whereas a non-isolated, local rpmbuild works, as per my OP,

a *mock* build here fails similarly to @ COPR:

wget 
https://download.copr.fedorainfracloud.org/results/pgfed/nginx-mainline/fedora-34-x86_64/02184528-lua-resty-luajit2/lua-resty-luajit2-git.HEAD-0.pgnd_20210513_212639.fc34.src.rpm

mock \
 -r fedora-34-x86_64 \
 --rebuild \
 
--addrepo=https://download.copr.fedorainfracloud.org/results/pgfed/pgnd-rpmbuild-macros/fedora-34-x86_64
 \
./lua-resty-luajit2-git.HEAD-0.pgnd_20210513_212639.fc34.src.rpm

...
Packaging variables read or set by %forgemeta
forgeurl0: https://github.com/openresty/luajit2
forgesource0:  
https://github.com/openresty/luajit2/archive/v2.1-agentzh/luajit2-2.1-agentzh.tar.gz
forgesetupargs0:   -n luajit2-2.1-agentzh
archivename0:  luajit2-2.1-agentzh
archiveext0:   tar.gz
archiveurl0:   
https://github.com/openresty/luajit2/archive/v2.1-agentzh/luajit2-2.1-agentzh.tar.gz
topdir0:   luajit2-2.1-agentzh
extractdir0:   luajit2-2.1-agentzh
repo0: luajit2
scm0:  git
branch0:   v2.1-agentzh
distprefix0:   .20210513gitv2.1-agentzh
dist:  .20210513gitv2.1-agentzh.fc34
(snapshot date is either manually supplied or computed once 
%{_sourcedir}/%{archivename0}.%{archiveext0} is available)
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.9O1tue
+ umask 022
+ cd /builddir/build/BUILD
+ cd /builddir/build/BUILD
+ rm -rf luajit2-2.1-agentzh
+ /usr/bin/gzip -dc /builddir/build/SOURCES/luajit2-2.1-agentzh.tar.gz
+ /usr/bin/tar -xof -
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd luajit2-2.1-agentzh
/var/tmp/rpm-tmp.9O1tue: line 38: cd: luajit2-2.1-agentzh: No such file 
or directory


RPM build errors:
error: Bad exit status from /var/tmp/rpm-tmp.9O1tue (%prep)
Setting %{branch} = v2.1-agentzh
Setting %{forgeurl0} = https://github.com/openresty/luajit2
Setting %{fileref0} = 2.1-agentzh
Setting %{ref0} = v2.1-agentzh
Setting %{archivename0} = %{repo0}-2.1-agentzh
Setting %{archiveext0} = tar.gz
Setting %{archiveurl0} = 
https://github.com/openresty/luajit2/archive/v2.1-agentzh/%{repo0}-2.1-agentzh.tar.gz
Setting %{scm0} = git
Setting %{topdir0} = %{repo0}-2.1-agentzh
Setting %{repo0} = luajit2
Setting %{forgesource0} = 
https://github.com/openresty/luajit2/archive/v2.1-agentzh/luajit2-2.1-agentzh.tar.gz
Setting %{forgesetupargs0} = -n %{extractdir0}
Setting %{extractdir0} = luajit2-2.1-agentzh
Setting %{distprefix0} = .20210513gitv2.1-agentzh
Setting %{forgesource} = 
https://github.com/openresty/luajit2/archive/v2.1-agentzh/luajit2-2.1-agentzh.tar.gz
Setting %{forgesetupargs} = -n luajit2-2.1-agentzh
Setting %{archivename} = luajit2-2.1-agentzh
Setting %{archiveext} = tar.gz
Setting %{archiveurl} = 
https://github.com/openresty/luajit2/archive/v2.1-agentzh/luajit2-2.1-agentzh.tar.gz
Setting %{topdir} = luajit2-2.1-agentzh
Setting %{extractdir} = luajit2-2.1-agentzh
Setting %{repo} = luajit2
Setting %{scm} = git
Setting %{distprefix} = .20210513gitv2.1-agentzh
Bad exit status from /var/tmp/rpm-tmp.9O1tue (%prep)
Finish: rpmbuild 
lua-resty-luajit2-git.HEAD-0.pgnd_20210513_212639.fc34.src.rpm
Finish: build phase for 
lua-resty-luajit2-git.HEAD-0.pgnd_20210513_212639.fc34.src.rpm
ERROR: 
Exception(./lua-resty-luajit2-git.HEAD-0.pgnd_20210513_212639.fc34.src.rpm) 
Config(fedora-34-x86_64) 0 minutes 19 seconds
INFO: Results and/or logs in: /home/mock/resultdir
INFO: Cleaning up build root ('cleanup_on_failure=True')
Start: clean chroot
Finish: clean chroot
ERROR: Command failed:
# /usr/bin/systemd-nspawn -q -M a5a65f56173f44919d9e4890b40b3e55 -D 
/var/lib/mock/fedora-34-x86_64/root -a -u mockbuild --capability=cap_ipc_lock 
--bind=/dev/btrfs-control --bind=/dev/loop-control --bind=/dev/loop0 --bind=/dev/loop1 
--bind=/dev/loop2 --bind=/dev/loop3 --bind=/dev/loop4 --bind=/dev/loop5 --bind=/dev/loop6 
--bind=/dev/loop7 --bind=/dev/loop8 --bind=/dev/loop9 --bind=/dev/loop10 --bind=/dev/loop11 
--console=pipe --setenv=TERM=vt100 --setenv=SHELL=/bin/bash --setenv=HOME=/builddir 
--setenv=HOSTNAME=mock 

Re: F34 pkg.spec rpmbuild OK on local dev; same spec fails @ my COPR. why?

2021-05-13 Thread Sérgio Basto

mock -r fedora-34-x86_64 --rebuild  
lua-resty-luajit2-git.HEAD-0.pgnd_20210513_212639.fc34.src.rpm

also fails in my machine, %forgesetup -z 0 is where it fails, have you a 
different or custom /usr/lib/rpm/macros.d/macros.forge ?



On Thu, 2021-05-13 at 17:43 -0400, PGNet Dev wrote:
I've a package .spec, that uses forgemeta macros, that builds locally
just fine on F34.

Same spec @ COPR, F34 chroot, fails.

Something's either missing on my end, or broken @COPR.  Likely obvious
pebkac, but I'm not seeing it.

Any insights as to why the same spec, @COPR, is failing would be
appreciated.


With this spec,

cat ~/rpmbuild/SPECS/lua-resty-luajit2.spec

---
%{?_pgnd_macros}
%define _owner pgnd
%define _build_timestamp %( date +%%Y%%m%%d_%%H%%M%%S -
-utc )

%define _lua_resty_luajit2_name lua-resty-
luajit2
%define _lua_resty_luajit2_comment  OpenResty's
maintained branch of LuaJIT
%define _lua_resty_luajit2_checkout_dirname luajit2
%define _lua_resty_luajit2_branch   v2.1-
agentzh
%define _lua_resty_luajit2_shortbranch  HEAD
%define compat_lua_ver   5.1
%define compat_lua_ext   5.2

%global forgeurl0   
https://github.com/openresty/luajit2
%global branch0 %{_lua_resty_luajit2_branch}

%forgemeta -i -v -a
%global dist .%{_owner}_%{_build_timestamp}.fc%{fedora}

Name:  %{_lua_resty_luajit2_name}
Version:  
%{scm0}.%{_lua_resty_luajit2_shortbranch}
Release:   0%{?dist}
Summary:   %{_lua_resty_luajit2_comment}
License:   MIT

URL:   %{forgeurl0}
Source0:   %{forgesource0}

BuildRequires: compat-lua
BuildRequires: compat-lua-devel
BuildRequires: coreutils
BuildRequires: gcc
BuildRequires: git
BuildRequires: gzip
BuildRequires: openssl-devel

Requires:  compat-lua >= %{compat_lua_ver}
Requires:  compat-lua <  %{compat_lua_ext}
Requires:  compat-lua-devel >=
%{compat_lua_ver}
Requires:  compat-lua-devel < 
%{compat_lua_ext}
Requires:  openssl
Requires:  gzip
Requires:  unzip
Requires:  zip

Provides:  %{_lua_resty_luajit2_name}
Conflicts: luajit
Conflicts: luajit-devel

%description
%{_lua_resty_luajit2_comment}

%prep
%forgesetup -z 0

%build
perl -pi -e '\
s|^(export PREFIX=).*|${1}
/usr/local/%{_lua_resty_luajit2_name}|g; \
s|^(export MULTILIB=).*|${1} lib64|g' \
Makefile
make %{?_smp_mflags}

%install
make DESTDIR=%{buildroot} install

%post

%preun

%files
/usr/local/%{_lua_resty_luajit2_name}/

%changelog
---


a local build

cd ~/rpmbuild/SPECS/
rpmbuild -bb ./lua-resty-luajit2.spec




builds OK, no error

...
Packaging variables read or set by %forgemeta
forgeurl0: https://github.com/openresty/luajit2
forgesource0:  
https://github.com/openresty/luajit2/archive/v2.1-agentzh/luajit2-2.1-agentzh.tar.gz
forgesetupargs0:   -n luajit2-2.1-agentzh
archivename0:  luajit2-2.1-agentzh
archiveext0:   tar.gz
archiveurl0:   
https://github.com/openresty/luajit2/archive/v2.1-agentzh/luajit2-2.1-agentzh.tar.gz
topdir0:   luajit2-2.1-agentzh
extractdir0:   luajit2-2.1-agentzh
repo0: luajit2
scm0:  git
branch0:   v2.1-agentzh
distprefix0:   .gitv2.1-agentzh
dist:  .gitv2.1-agentzh.fc34
(snapshot date is either manually supplied or computed once
%{_sourcedir}/%{archivename0}.%{archiveext0} is available)
warning: Downloading 
https://github.com/openresty/luajit2/archive/v2.1-agentzh/luajit2-2.1-agentzh.tar.gz
 to /root/rpmbuild/SOURCES/luajit2-2.1-agentzh.tar.gz
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.2DphWx
...
Wrote: /root/rpmbuild/RPMS/x86_64/lua-resty-luajit2-git.HEAD-
0.pgnd_20210513_212124.fc34.x86_64.rpm


the resultant rpm's install-/use-able

pushing the same 

F34 pkg.spec rpmbuild OK on local dev; same spec fails @ my COPR. why?

2021-05-13 Thread PGNet Dev

I've a package .spec, that uses forgemeta macros, that builds locally just fine 
on F34.

Same spec @ COPR, F34 chroot, fails.

Something's either missing on my end, or broken @COPR.  Likely obvious pebkac, 
but I'm not seeing it.

Any insights as to why the same spec, @COPR, is failing would be appreciated.


With this spec,

cat ~/rpmbuild/SPECS/lua-resty-luajit2.spec

---
%{?_pgnd_macros}
%define _owner pgnd
%define _build_timestamp %( date +%%Y%%m%%d_%%H%%M%%S --utc )

%define _lua_resty_luajit2_name lua-resty-luajit2
%define _lua_resty_luajit2_comment  OpenResty's 
maintained branch of LuaJIT
%define _lua_resty_luajit2_checkout_dirname luajit2
%define _lua_resty_luajit2_branch   v2.1-agentzh
%define _lua_resty_luajit2_shortbranch  HEAD
%define compat_lua_ver   5.1
%define compat_lua_ext   5.2

%global forgeurl0   https://github.com/openresty/luajit2
%global branch0 %{_lua_resty_luajit2_branch}

%forgemeta -i -v -a
%global dist .%{_owner}_%{_build_timestamp}.fc%{fedora}

Name:  %{_lua_resty_luajit2_name}
Version:   %{scm0}.%{_lua_resty_luajit2_shortbranch}
Release:   0%{?dist}
Summary:   %{_lua_resty_luajit2_comment}
License:   MIT

URL:   %{forgeurl0}
Source0:   %{forgesource0}

BuildRequires: compat-lua
BuildRequires: compat-lua-devel
BuildRequires: coreutils
BuildRequires: gcc
BuildRequires: git
BuildRequires: gzip
BuildRequires: openssl-devel

Requires:  compat-lua >= %{compat_lua_ver}
Requires:  compat-lua <  %{compat_lua_ext}
Requires:  compat-lua-devel >= %{compat_lua_ver}
Requires:  compat-lua-devel <  %{compat_lua_ext}
Requires:  openssl
Requires:  gzip
Requires:  unzip
Requires:  zip

Provides:  %{_lua_resty_luajit2_name}
Conflicts: luajit
Conflicts: luajit-devel

%description
%{_lua_resty_luajit2_comment}

%prep
%forgesetup -z 0

%build
perl -pi -e '\
s|^(export PREFIX=).*|${1} 
/usr/local/%{_lua_resty_luajit2_name}|g; \
s|^(export MULTILIB=).*|${1} lib64|g' \
Makefile
make %{?_smp_mflags}

%install
make DESTDIR=%{buildroot} install

%post

%preun

%files
/usr/local/%{_lua_resty_luajit2_name}/

%changelog
---


a local build

cd ~/rpmbuild/SPECS/
rpmbuild -bb ./lua-resty-luajit2.spec


builds OK, no error

...
Packaging variables read or set by %forgemeta
forgeurl0: https://github.com/openresty/luajit2
forgesource0:  
https://github.com/openresty/luajit2/archive/v2.1-agentzh/luajit2-2.1-agentzh.tar.gz
forgesetupargs0:   -n luajit2-2.1-agentzh
archivename0:  luajit2-2.1-agentzh
archiveext0:   tar.gz
archiveurl0:   
https://github.com/openresty/luajit2/archive/v2.1-agentzh/luajit2-2.1-agentzh.tar.gz
topdir0:   luajit2-2.1-agentzh
extractdir0:   luajit2-2.1-agentzh
repo0: luajit2
scm0:  git
branch0:   v2.1-agentzh
distprefix0:   .gitv2.1-agentzh
dist:  .gitv2.1-agentzh.fc34
(snapshot date is either manually supplied or computed once 
%{_sourcedir}/%{archivename0}.%{archiveext0} is available)
warning: Downloading 
https://github.com/openresty/luajit2/archive/v2.1-agentzh/luajit2-2.1-agentzh.tar.gz
 to /root/rpmbuild/SOURCES/luajit2-2.1-agentzh.tar.gz
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.2DphWx
...
Wrote: 
/root/rpmbuild/RPMS/x86_64/lua-resty-luajit2-git.HEAD-0.pgnd_20210513_212124.fc34.x86_64.rpm


the resultant rpm's install-/use-able

pushing the same spec to COPR, fails @ %prep

@,

https://download.copr.fedorainfracloud.org/results/pgfed/nginx-mainline/fedora-34-x86_64/02184528-lua-resty-luajit2/builder-live.log.gz

Packaging variables read or set by %forgemeta
forgeurl0: https://github.com/openresty/luajit2