Date: Wed, 4 May 2011 03:31:21 -0700 (PDT) From: Jeremy Chadwick <freebsd@jdc.parodius.com> To: FreeBSD-gnats-submit@FreeBSD.org Cc: dougb@FreeBSD.org, florent.thoumie@gmail.com Subject: ports/156810: 220.backup-pkgdb on RELENG_7 emits tar leading slash warning Message-ID: <20110504103121.65EE7102C36@icarus.home.lan> Resent-Message-ID: <201105041040.p44Ae8b1028580@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 156810 >Category: ports >Synopsis: 220.backup-pkgdb on RELENG_7 emits tar leading slash warning >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Wed May 04 10:40:08 UTC 2011 >Closed-Date: >Last-Modified: >Originator: Jeremy Chadwick >Release: FreeBSD 8.2-STABLE amd64 >Organization: >Environment: System: FreeBSD icarus.home.lan 8.2-STABLE FreeBSD 8.2-STABLE #0: Tue May 3 04:29:11 PDT 2011 root@icarus.home.lan:/usr/obj/usr/src/sys/X7SBA_RELENG_8_amd64 amd64 >Description: First, please note the above Release and Environment statements are not from a RELENG_7 box (obviously :-) ). The issue I'm describing is specific to RELENG_7's version of tar, which differs from RELENG_8. RELENG_7 tar spits out a warning when attempting to tar something with a leading slash: Backing up package db directory: tar: Removing leading '/' from member names RELENG_8 tar has different logic in util.c, causing it not to output said warning. I'm not sure if there's any effort underway to backport RELENG_8's tar to RELENG_7. >How-To-Repeat: Run /etc/periodic/daily/220.backup-pkgdb on a present-day RELENG_7 box. >Fix: There's multiple ways to fix this, but I think the easiest is to simply redirect stderr to /dev/null like so (diff): - if tar -cjf "${new_bak_file}" "$pkg_dbdir"; then + if tar -cjf "${new_bak_file}" "$pkg_dbdir" 2>/dev/null; then I've tested this on a RELENG_7 (7.4-STABLE) box dated 2011/04/30 and it does work. >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110504103121.65EE7102C36>