Bug 244606 - archivers/rpm4 xargs: illegal option -- d
Summary: archivers/rpm4 xargs: illegal option -- d
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Rodrigo Osorio
Depends on:
Reported: 2020-03-05 10:22 UTC by Brian Zou
Modified: 2020-03-22 16:08 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (rodrigo)

nano spec file for FreeBSD (1.70 KB, text/plain)
2020-03-09 05:15 UTC, Brian Zou
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Brian Zou 2020-03-05 10:22:57 UTC
rpmbuild -ba nano.spec
+ /usr/local/lib/rpm/brp-compress /usr
+ /usr/local/lib/rpm/brp-strip /usr/bin/strip
+ /usr/local/lib/rpm/brp-strip-static-archive /usr/bin/strip
xargs: illegal option -- d
usage: xargs [-0opt] [-E eofstr] [-I replstr [-R replacements] [-S replsize]]
             [-J replstr] [-L number] [-n number [-x]] [-P maxprocs]
             [-s size] [utility [argument ...]]
error: Bad exit status from /var/tmp/rpm-tmp.WIBuTI (%install)

Find error shell file and line:
/usr/local/lib/rpm/brp-strip-static-archive #18
Comment 1 Rodrigo Osorio freebsd_committer 2020-03-06 10:13:04 UTC

Can you attach the nano.spec file to this ticket ?

-- rodrigo
Comment 2 Brian Zou 2020-03-09 05:15:34 UTC
Created attachment 212273 [details]
nano spec file for FreeBSD
Comment 3 Rodrigo Osorio freebsd_committer 2020-03-17 08:33:36 UTC
Hi Brian,

The issue was caused by the use of GNU xargs switches not available in the
BSD version. I did a fix by replacing the calls to xags by the gxargs (the GNU version available in ports).

I'm not a rpm4 user, but if you wanna try the fix, I can provide you a test buid for your arch and version or a patch if you wanna build it in your own.

You can also bypass the limitation - and somehow test the fix - with the current package by performing the following steps:
- install misc/findutils
- alias xargs gxargs
- run rpm4 for the nano package again

Let me know how it works so I can push the changes.

-- rodrigo
Comment 4 commit-hook freebsd_committer 2020-03-22 16:06:22 UTC
A commit references this bug:

Author: rodrigo
Date: Sun Mar 22 16:05:51 UTC 2020
New revision: 528924
URL: https://svnweb.freebsd.org/changeset/ports/528924

  archivers/rpm4: Replace calls to xargs by gxargs

  Latest version of archivers/rpm4 uses GNU specific option
  when calls xargs. This causes the proccess to fail.

  This commit adds misc/findutils as a run dependency and
  replaces xargs calls by its GNU variant gxargs.

  Also Bump portrevision.

  PR:		244606
  Reported by:	Brian Zou <zoujiaqing@gmail.com>

Comment 5 Rodrigo Osorio freebsd_committer 2020-03-22 16:08:10 UTC
A fix was committed, thanks for reporting the issue.