Bug 1703673

Summary: Can not get correct source tar.gz. tar.gz doesn`t get into srpm
Product: [Community] Copr Reporter: Patsev Anton <patsev.anton>
Component: backendAssignee: Miroslav Suchý <msuchy>
Status: CLOSED NOTABUG QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: praiskup
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-07-26 07:33:32 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Patsev Anton 2019-04-27 12:37:47 UTC
Description of problem:
I try build wal-g into rpm on copr.fedorainfracloud.org
Github repo https://github.com/patsevanton/wal-g-rpm
Project https://copr.fedorainfracloud.org/coprs/antonpatsev/wal-g/
Log https://copr-be.cloud.fedoraproject.org/results/antonpatsev/wal-g/epel-7-x86_64/00891051-wal-g/builder-live.log

wal-g-0.2.7-1.src.rpm	2019-Apr-27 12:04:19	7.54K 	RPM File

+ /usr/bin/tar -xf -
+ /usr/bin/gzip -dc /builddir/build/SOURCES/wal-g.linux-amd64.tar.gz
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ exit 0
Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.Vdxk7R
+ umask 022
+ cd /builddir/build/BUILD
+ '[' /builddir/build/BUILDROOT/wal-g-0.2.7-1.x86_64 '!=' / ']'
+ rm -rf /builddir/build/BUILDROOT/wal-g-0.2.7-1.x86_64
++ dirname /builddir/build/BUILDROOT/wal-g-0.2.7-1.x86_64
+ mkdir -p /builddir/build/BUILDROOT
+ mkdir /builddir/build/BUILDROOT/wal-g-0.2.7-1.x86_64
+ cd wal-g-0.2.7
+ tree
.
`-- wal-g-0.2.7
    |-- LICENSE
    |-- README.md
    |-- build.sh
    |-- server-s3.conf
    |-- wal-g-rpm.spec
    `-- wal-g-rpm.spec-backup

1 directory, 6 files
+ /usr/bin/install -m 0755 -d /builddir/build/BUILDROOT/wal-g-0.2.7-1.x86_64/usr/local/bin
+ tree /builddir/build/SOURCES
/builddir/build/SOURCES
`-- wal-g.linux-amd64.tar.gz

0 directories, 1 file
+ ls -lh /builddir/build/SOURCES
total 8.0K
-rw-rw-r--. 1 mockbuild mock 5.4K Apr 27 12:14 wal-g.linux-amd64.tar.gz
+ cp wal-g /builddir/build/BUILDROOT/wal-g-0.2.7-1.x86_64/usr/local/bin/wal-g
cp: cannot stat 'wal-g': No such file or directory


How pack binary file from wal-g.linux-amd64.tar.gz to rpm ?

Comment 1 Pavel Raiskup 2019-07-26 07:33:32 UTC
Hi, thanks for the question.  You are usually not supposed to re-distribute the
source0 as RPM payload.

If you really want to do this, you have to access the file wia %Source0 macro:
cp %Source0 /destination/dir.