[rpmbuild使用--target时,由于未知原因而失败

问题描述 投票:0回答:1

我最近将我的开发机从Fedora 30升级到31,但是我仍然需要定位Fedora 30机。

我正在尝试使用参数--target f30构建SPEC,但我从无处得到'xargs'的错误...

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)

在'rpmbuild'中使用非常冗长的-vv选项并没有提供任何有用的信息。任何想法可能是什么问题?

即使特别针对f31(平台本身),构建也会失败,但是如果不添加默认为f31的目标,则构建成功。

build rpm
1个回答
0
投票

目标选项用于体系结构。甚至只有当您执行其他一些低级魔法时,它才有效。您应该这样做:

rpmbuild -bs ~/rpmbuild/SPECS/Project.spec
# this will produce Project.src.rpm
mock -r fedora-30-x86_64 Project.src.rpm

[无论您是使用F30还是31,还是使用CentOS,都没有关系。

© www.soinside.com 2019 - 2024. All rights reserved.