How to debug locally copr build

Hello,

I’m trying to build this project posterazor on copr

I wrote this spec file

before to try it on remote servers I tried locally inside a container (fedora:34) following steps:

  1. clone repository containing spec file
  2. run spectool -g -R posterazor.spec
  3. run dnf builddep -y posterazor.spec
  4. run rpmbuild -ba -vv posterazor.spec

and every thing work well.

Now on copr I have this build log

I think the error is here :
Complete!
Finish: build setup for posterazor-1.9.6-1.fc34.src.rpm
Start: rpmbuild posterazor-1.9.6-1.fc34.src.rpm
Building target platforms: x86_64
Building for target x86_64
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.chxinC
+ umask 022
+ cd /builddir/build/BUILD
+ cd /builddir/build/BUILD
+ rm -rf posterazor
+ /usr/bin/gzip -dc /builddir/build/SOURCES/PosteRazor_1_9_6.tar.gz
+ /usr/bin/tar -xof -
+ STATUS=0
+ ‘[’ 0 -ne 0 ‘]’
+ cd posterazor <------ Here
/var/tmp/rpm-tmp.chxinC: line 39: cd: posterazor: No such file or directory
error: Bad exit status from /var/tmp/rpm-tmp.chxinC (%prep)
Bad exit status from /var/tmp/rpm-tmp.chxinC (%prep)

It seems it is not able to extract source … What I miss ? How can I reproduce locally this ?

1 Like

I downloaded your spec file and uploaded to copr without any change and it is built successfully, here is the build log:

https://download.copr.fedorainfracloud.org/results/ersen/testndebug/fedora-34-x86_64/02173683-posterazor/builder-live.log.gz

1 Like

Please follow this guide maybe help you, in your task:

https://docs.pagure.org/copr.copr/screenshots_tutorial.html#screenshots-tutorial
https://developer.fedoraproject.org/deployment/copr/copr-cli.html

Regards.,

1 Like

Tanks for your suggestions : ) I’have read them and I will look for more info about copr-cli, like

I proceeded with some tentatives:

  1. I reconfigured the project new link
  2. tried to build using those configuration:

and it fails :confused:

  1. @ersen said he used my spec file directly. so i tried :

and it worked

  1. I checkd my git repo :
    image

and it seems ok, I mean I have uploaded the same file is present in the git repo.

I’m confused…