Issue
I recently updated my dev machine from Fedora 30 to 31, but I still need to target a Fedora 30 machine.
I am trying to build a SPEC using the parameter --target f30
, but I get an error for 'xargs' out of nowhere...
rpmbuild -bb ~/rpmbuild/SPECS/Project.spec --target f30
Building target platforms: f30
Building for target f30
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.hUazCA
+ umask 022
+ cd /home/matthew/rpmbuild/BUILD
+ cd /home/matthew/rpmbuild/BUILD
+ rm -rf Project-1.9.1
+ /usr/bin/gzip -dc /home/matthew/rpmbuild/SOURCES/Project-1.9.1.tar.gz
+ /usr/bin/tar -xof -
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd Project-1.9.1
+ /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ RPM_EC=0
++ jobs -p
+ exit 0
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.TnKydD
+ umask 022
+ cd /home/matthew/rpmbuild/BUILD
+ cd Project-1.9.1
+ RPM_EC=0
++ jobs -p
+ exit 0
Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.GIPsyB
+ umask 022
+ cd /home/matthew/rpmbuild/BUILD
+ '[' '/home/matthew/rpmbuild/BUILDROOT/Project-1.9.1-1.fc31.%{_arch}' '!=' / ']'
+ rm -rf '/home/matthew/rpmbuild/BUILDROOT/Project-1.9.1-1.fc31.%{_arch}'
++ dirname '/home/matthew/rpmbuild/BUILDROOT/Project-1.9.1-1.fc31.%{_arch}'
+ mkdir -p /home/matthew/rpmbuild/BUILDROOT
+ mkdir '/home/matthew/rpmbuild/BUILDROOT/Project-1.9.1-1.fc31.%{_arch}'
+ cd Project-1.9.1
+ mkdir -p '/home/matthew/rpmbuild/BUILDROOT/Project-1.9.1-1.fc31.%{_arch}/opt/Project'
+ cp -a README.md __dump__ __files__ __scripts__ __wheels__ apps dbms dbtools graph.png loc manage.py meta program requirements.txt rgs static veh '/home/matthew/rpmbuild/BUILDROOT/Project-1.9.1-1.fc31.%{_arch}/opt/Project'
+ /usr/lib/rpm/check-buildroot
xargs: invalid number for -P option
Usage: xargs [OPTION]... COMMAND [INITIAL-ARGS]...
Run COMMAND with arguments INITIAL-ARGS and more arguments read from input.
Mandatory and optional arguments to long options are also
mandatory or optional for the corresponding short option.
-0, --null items are separated by a null, not whitespace;
disables quote and backslash processing and
logical EOF processing
-a, --arg-file=FILE read arguments from FILE, not standard input
-d, --delimiter=CHARACTER items in input stream are separated by CHARACTER,
not by whitespace; disables quote and backslash
processing and logical EOF processing
-E END set logical EOF string; if END occurs as a line
of input, the rest of the input is ignored
(ignored if -0 or -d was specified)
-e, --eof[=END] equivalent to -E END if END is specified;
otherwise, there is no end-of-file string
-I R same as --replace=R
-i, --replace[=R] replace R in INITIAL-ARGS with names read
from standard input; if R is unspecified,
assume {}
-L, --max-lines=MAX-LINES use at most MAX-LINES non-blank input lines per
command line
-l[MAX-LINES] similar to -L but defaults to at most one non-
blank input line if MAX-LINES is not specified
-n, --max-args=MAX-ARGS use at most MAX-ARGS arguments per command line
-P, --max-procs=MAX-PROCS run at most MAX-PROCS processes at a time
-p, --interactive prompt before running commands
--process-slot-var=VAR set environment variable VAR in child processes
-r, --no-run-if-empty if there are no arguments, then do not run COMMAND;
if this option is not given, COMMAND will be
run at least once
-s, --max-chars=MAX-CHARS limit length of command line to MAX-CHARS
--show-limits show limits on command-line length
-t, --verbose print commands before executing them
-x, --exit exit if the size (see -s) is exceeded
--help display this help and exit
--version output version information and exit
Report bugs to <[email protected]>.
+ /usr/lib/rpm/redhat/brp-ldconfig
+ /usr/lib/rpm/brp-compress
+ /usr/lib/rpm/brp-strip /usr/bin/strip
+ /usr/lib/rpm/brp-strip-comment-note /usr/bin/strip /usr/bin/objdump
+ /usr/lib/rpm/brp-strip-static-archive /usr/bin/strip
xargs: invalid number for -P option
Usage: xargs [OPTION]... COMMAND [INITIAL-ARGS]...
Run COMMAND with arguments INITIAL-ARGS and more arguments read from input.
Mandatory and optional arguments to long options are also
mandatory or optional for the corresponding short option.
-0, --null items are separated by a null, not whitespace;
disables quote and backslash processing and
logical EOF processing
-a, --arg-file=FILE read arguments from FILE, not standard input
-d, --delimiter=CHARACTER items in input stream are separated by CHARACTER,
not by whitespace; disables quote and backslash
processing and logical EOF processing
-E END set logical EOF string; if END occurs as a line
of input, the rest of the input is ignored
(ignored if -0 or -d was specified)
-e, --eof[=END] equivalent to -E END if END is specified;
otherwise, there is no end-of-file string
-I R same as --replace=R
-i, --replace[=R] replace R in INITIAL-ARGS with names read
from standard input; if R is unspecified,
assume {}
-L, --max-lines=MAX-LINES use at most MAX-LINES non-blank input lines per
command line
-l[MAX-LINES] similar to -L but defaults to at most one non-
blank input line if MAX-LINES is not specified
-n, --max-args=MAX-ARGS use at most MAX-ARGS arguments per command line
-P, --max-procs=MAX-PROCS run at most MAX-PROCS processes at a time
-p, --interactive prompt before running commands
--process-slot-var=VAR set environment variable VAR in child processes
-r, --no-run-if-empty if there are no arguments, then do not run COMMAND;
if this option is not given, COMMAND will be
run at least once
-s, --max-chars=MAX-CHARS limit length of command line to MAX-CHARS
--show-limits show limits on command-line length
-t, --verbose print commands before executing them
-x, --exit exit if the size (see -s) is exceeded
--help display this help and exit
--version output version information and exit
Report bugs to <[email protected]>.
error: Bad exit status from /var/tmp/rpm-tmp.GIPsyB (%install)
RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.GIPsyB (%install)
Using the very verbose -vv
option with 'rpmbuild' didn't provide anything useful. Any ideas what the issue could be?
Even when targeting f31 (the platform itself) specifically, the build fails, but when not adding a target such that it defaults to f31, it succeeds.
Solution
The target option is for architecture. And even that works only if you do some other low level magic. You should do:
rpmbuild -bs ~/rpmbuild/SPECS/Project.spec
# this will produce Project.src.rpm
mock -r fedora-30-x86_64 Project.src.rpm
And it will does not matter whether you are on F30 or 31 or on CentOS.
Answered By - msuchy Answer Checked By - Robin (WPSolving Admin)