ports/156810: 220.backup-pkgdb on RELENG_7 emits tar leading slash warning

Jeremy Chadwick freebsd at jdc.parodius.com
Wed May 4 10:40:09 UTC 2011


>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 at 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:



More information about the freebsd-ports-bugs mailing list