[GH-ISSUE #2925] make rpms broken on fedora 30 #1826

Closed
opened 2026-05-05 08:29:40 -06:00 by gitea-mirror · 3 comments
Owner

Originally created by @rusty-snake on GitHub (Aug 25, 2019).
Original GitHub issue: https://github.com/netblue30/firejail/issues/2925

GitLab CI show simelar, fedora is broken but redhat not.

$ make rpms
./platform/rpm/mkrpm.sh firejail 0.9.61
tar: The following options were used after any non-optional arguments in archive create or update mode.  These options are positional and affect only arguments that follow them.  Please, rearrange them properly.
tar: --exclude ‘./.git*’ has no effect
tar: --exclude ‘./test*’ has no effect
tar: Exiting with failure status due to previous errors
configure: WARNING: unrecognized options: --disable-dependency-tracking
configure: WARNING: unrecognized options: --disable-dependency-tracking
error: Empty %files file /tmp/tmp.JxyYdhzfrZ/BUILD/firejail-0.9.61/debugsourcefiles.list
    Empty %files file /tmp/tmp.JxyYdhzfrZ/BUILD/firejail-0.9.61/debugsourcefiles.list
mv: cannot stat '/tmp/tmp.JxyYdhzfrZ/SRPMS/*.rpm': No such file or directory
mv: cannot stat '/tmp/tmp.JxyYdhzfrZ/RPMS/*/*rpm': No such file or directory
make: *** [Makefile:227: rpms] Error 1

Error 1: tar complains about trailing --exclude arguments
Error 2: building firejail-debuginfo fail

Here is a patch, but I' m not sure if that's the best solution (especially for error 2).

diff --git a/platform/rpm/firejail.spec b/platform/rpm/firejail.spec
index b32407c7..92142d41 100644
--- a/platform/rpm/firejail.spec
+++ b/platform/rpm/firejail.spec
@@ -15,6 +15,8 @@ Firejail is a SUID sandbox program that reduces the risk of security
 breaches by restricting the running environment of untrusted applications
 using Linux namespaces. It includes a sandbox profile for Mozilla Firefox.
 
+%global debug_package %{nil}
+
 %prep
 %setup -q
 
diff --git a/platform/rpm/mkrpm.sh b/platform/rpm/mkrpm.sh
index b63340e4..351b92be 100755
--- a/platform/rpm/mkrpm.sh
+++ b/platform/rpm/mkrpm.sh
@@ -33,7 +33,7 @@ sed -e "s/__NAME__/${name}/g" -e "s/__VERSION__/${version}/g" platform/rpm/${nam
 # FIXME: We could parse RELNOTES and create a %changelog section here
 
 # Copy the source to build into a tarball
-tar czf ${tmpdir}/SOURCES/${name}-${version}.tar.gz . --transform "s/^./${name}-${version}/" --exclude='./.git*' --exclude='./test*'
+tar --exclude='./.git*' --exclude='./test' --transform "s/^./${name}-${version}/" -czf ${tmpdir}/SOURCES/${name}-${version}.tar.gz .
 
 # Build the files (rpm, debug rpm and source rpm)
 rpmbuild --quiet --define "_topdir ${tmpdir}" -ba ${tmp_spec_file}
Originally created by @rusty-snake on GitHub (Aug 25, 2019). Original GitHub issue: https://github.com/netblue30/firejail/issues/2925 [GitLab CI](https://gitlab.com/Firejail/firejail_ci/pipelines) show simelar, fedora is broken but redhat not. ``` $ make rpms ./platform/rpm/mkrpm.sh firejail 0.9.61 tar: The following options were used after any non-optional arguments in archive create or update mode. These options are positional and affect only arguments that follow them. Please, rearrange them properly. tar: --exclude ‘./.git*’ has no effect tar: --exclude ‘./test*’ has no effect tar: Exiting with failure status due to previous errors configure: WARNING: unrecognized options: --disable-dependency-tracking configure: WARNING: unrecognized options: --disable-dependency-tracking error: Empty %files file /tmp/tmp.JxyYdhzfrZ/BUILD/firejail-0.9.61/debugsourcefiles.list Empty %files file /tmp/tmp.JxyYdhzfrZ/BUILD/firejail-0.9.61/debugsourcefiles.list mv: cannot stat '/tmp/tmp.JxyYdhzfrZ/SRPMS/*.rpm': No such file or directory mv: cannot stat '/tmp/tmp.JxyYdhzfrZ/RPMS/*/*rpm': No such file or directory make: *** [Makefile:227: rpms] Error 1 ``` Error 1: tar complains about trailing `--exclude` arguments Error 2: building firejail-debuginfo fail Here is a patch, but I' m not sure if that's the best solution (especially for error 2). ```diff diff --git a/platform/rpm/firejail.spec b/platform/rpm/firejail.spec index b32407c7..92142d41 100644 --- a/platform/rpm/firejail.spec +++ b/platform/rpm/firejail.spec @@ -15,6 +15,8 @@ Firejail is a SUID sandbox program that reduces the risk of security breaches by restricting the running environment of untrusted applications using Linux namespaces. It includes a sandbox profile for Mozilla Firefox. +%global debug_package %{nil} + %prep %setup -q diff --git a/platform/rpm/mkrpm.sh b/platform/rpm/mkrpm.sh index b63340e4..351b92be 100755 --- a/platform/rpm/mkrpm.sh +++ b/platform/rpm/mkrpm.sh @@ -33,7 +33,7 @@ sed -e "s/__NAME__/${name}/g" -e "s/__VERSION__/${version}/g" platform/rpm/${nam # FIXME: We could parse RELNOTES and create a %changelog section here # Copy the source to build into a tarball -tar czf ${tmpdir}/SOURCES/${name}-${version}.tar.gz . --transform "s/^./${name}-${version}/" --exclude='./.git*' --exclude='./test*' +tar --exclude='./.git*' --exclude='./test' --transform "s/^./${name}-${version}/" -czf ${tmpdir}/SOURCES/${name}-${version}.tar.gz . # Build the files (rpm, debug rpm and source rpm) rpmbuild --quiet --define "_topdir ${tmpdir}" -ba ${tmp_spec_file} ```
Author
Owner

@SkewedZeppelin commented on GitHub (Aug 25, 2019):

I cannot reproduce this.

$ cd /tmp
$ git clone https://github.com/netblue30/firejail.git
$ cd firejail
$ ./configure && make rpms
$ ls -lha *.rpm
-rw-rw-r--. 1 user user  13M Aug 25 14:32 firejail-0.9.61-1.src.rpm
-rw-rw-r--. 1 user user 532K Aug 25 14:32 firejail-0.9.61-1.x86_64.rpm
-rw-rw-r--. 1 user user 576K Aug 25 14:32 firejail-debuginfo-0.9.61-1.x86_64.rpm
-rw-rw-r--. 1 user user 188K Aug 25 14:32 firejail-debugsource-0.9.61-1.x86_64.rpm
<!-- gh-comment-id:524653345 --> @SkewedZeppelin commented on GitHub (Aug 25, 2019): I cannot reproduce this. ```sh $ cd /tmp $ git clone https://github.com/netblue30/firejail.git $ cd firejail $ ./configure && make rpms $ ls -lha *.rpm -rw-rw-r--. 1 user user 13M Aug 25 14:32 firejail-0.9.61-1.src.rpm -rw-rw-r--. 1 user user 532K Aug 25 14:32 firejail-0.9.61-1.x86_64.rpm -rw-rw-r--. 1 user user 576K Aug 25 14:32 firejail-debuginfo-0.9.61-1.x86_64.rpm -rw-rw-r--. 1 user user 188K Aug 25 14:32 firejail-debugsource-0.9.61-1.x86_64.rpm ```
Author
Owner

@rusty-snake commented on GitHub (Aug 25, 2019):

Ok, with an new, clean repo it works. IDK what was wrong.

But tar still complains about the excludes.

<!-- gh-comment-id:524654743 --> @rusty-snake commented on GitHub (Aug 25, 2019): Ok, with an new, clean repo it works. IDK what was wrong. But tar still complains about the excludes.
Author
Owner

@SkewedZeppelin commented on GitHub (Aug 25, 2019):

But tar still complains about the excludes.

go ahead and commit that line

<!-- gh-comment-id:524654811 --> @SkewedZeppelin commented on GitHub (Aug 25, 2019): > But tar still complains about the excludes. go ahead and commit that line
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/firejail#1826
No description provided.