Bug 70806 - oinkmaster use tar options incompatible to bsdtar
Summary: oinkmaster use tar options incompatible to bsdtar
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-08-22 01:00 UTC by SANETO Takanori
Modified: 2004-08-29 04:44 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description SANETO Takanori 2004-08-22 01:00:43 UTC
      oinkmaster uses option "tPf" to tar. It is OK for gtar, but bsdtar does not permit -P to be used with -t.
On -CURRENT, /usr/bin/tar is bsdtar by default (as of Jul 17), this is problem.

Fix: Following fix solved the problem:



post-patch:
        @${REINPLACE_CMD} -e 's,/usr/bin/perl,${PERL},g' \
+               -e 's,system("tar",system("gtar",g' \
                ${WRKSRC}/oinkmaster.pl

 do-install:--UKPDveFx51gO3ePfOClRinH2kX0xhNn8qPEcUedNsYGKZAjg
Content-Type: text/plain; name="file.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="file.diff"

diff -u -r1.7 Makefile
--- Makefile    2 Jul 2004 07:54:15 -0000       1.7
+++ Makefile    21 Aug 2004 23:27:18 -0000
@@ -29,6 +29,7 @@
How-To-Repeat:       Run oinkmaster and you will get following error:

Loading /usr/local/etc/oinkmaster.conf
Downloading file from http://www.snort.org/dl/rules/snortrules-snapshot-2_1.tar.gz... done.
tar: Option -P is not permitted in mode -t

/usr/local/bin/oinkmaster: Error: could not list files in tar archive (is it broken?)
Comment 1 Tim Kientzle freebsd_committer freebsd_triage 2004-08-26 07:29:01 UTC
You might also just remove the -P option.
In gtar, -P has no effect when used with -t.

$ gtar -cPf - /etc | gtar -tf - | head
/etc/
/etc/defaults/
/etc/defaults/rc.conf
/etc/defaults/pccard.conf

$ gtar -cPf - /etc | gtar -tPf - | head
/etc/
/etc/defaults/
/etc/defaults/rc.conf
/etc/defaults/pccard.conf
Comment 2 SANETO Takanori 2004-08-28 04:35:07 UTC
Just removing P from tar options sounds reasonable.

I'll ask the author of oinkmaster use "tf" instead of "tPf".
Comment 3 SANETO Takanori 2004-08-29 00:36:32 UTC
Oinkmaster's author (Andreas) kindly accepted the change ("tPF" -> "tf") and
oinkmaster-1.1 will include it.
For the time being, following patch will do:

Index: security/oinkmaster/Makefile
===================================================================
RCS file: /export/cvsup/cvs/ports/security/oinkmaster/Makefile,v
retrieving revision 1.7
diff -u -u -r1.7 Makefile
--- security/oinkmaster/Makefile        2 Jul 2004 07:54:15 -0000       1.7
+++ security/oinkmaster/Makefile        28 Aug 2004 02:50:28 -0000
@@ -29,6 +29,7 @@

 post-patch:
        @${REINPLACE_CMD} -e 's,/usr/bin/perl,${PERL},g' \
+               -e 's,"tPf","tf",' \
                ${WRKSRC}/oinkmaster.pl

 do-install:
Comment 4 Mark Linimon freebsd_committer freebsd_triage 2004-08-29 04:44:03 UTC
State Changed
From-To: open->closed

Committed, thanks.