Bug 41089

Summary: [patch] pax(1) -B option does not mention interaction with -z option
Product: Documentation Reporter: areilly
Component: Manual PagesAssignee: Chris Rees <crees>
Status: Closed FIXED    
Severity: Affects Only Me CC: crees, doc
Priority: Normal Keywords: patch
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
pax.txt none

Description areilly 2002-07-28 23:40:01 UTC
	
	-B option of pax says that it limits the number of bytes
	written to a volume, but when the -z option is also used
	the number of bytes written is less than that specified,
	by the compression ratio.  For example, see
	How-To-Repeat.

Fix: 

Add a sentence or two to the description of the -B option
	along the lines of:
	"Note that the specified size is for the pax image
	itself.  If the -z option is also used, the resulting
	file may contain fewer bytes, according to the
	compressability of the archive contents."

	Alternatively, perhaps the pax author could be persuaded
	to run the archive size counter on the _output_ of the
	gzip pipe?  That would certainly be more useful.
How-To-Repeat: 	You won't get the same result, because you don't have my
	file system contents, but any file tree should do (other
	than one full of MP3 files or the like...)
	pax -w -t -z -f /backup/full-${today_d}.pax -B667m $dirs
	resulted in the warning message
	"pax: User specified archive volume byte limit reached."
	but a subsequent listing of the /backup directory shows:
	-rw-r--r--  1 root  wheel  352215042 Jul 29 03:11 full-020729.pax
Comment 1 Sevan Janiyan 2014-05-26 02:12:11 UTC
Attached diff adds proposed fix to pax(1).
Comment 2 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 07:59:33 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped
Comment 3 Chris Rees freebsd_committer freebsd_triage 2018-12-29 21:53:32 UTC
See review at https://reviews.freebsd.org/D18686
Comment 4 Chris Rees freebsd_committer freebsd_triage 2018-12-29 23:09:23 UTC
Committed, with minor changes.  Thanks!
Comment 5 commit-hook freebsd_committer freebsd_triage 2018-12-29 23:09:59 UTC
A commit references this bug:

Author: crees
Date: Sat Dec 29 23:08:59 UTC 2018
New revision: 342601
URL: https://svnweb.freebsd.org/changeset/base/342601

Log:
  Add a note that the use of -B option does not guarantee a size of fragment
  if -z option also used.

  Recommend the use of zip(1) if compressed files of predictable size needed.

  PR:			docs/41089
  Submitted by:		Sevan Janiyan
  Reported by:		areilly@bigpond.net.au

  While here, pet igor

  Reviewed by:		bcr
  Differential Revision:	https://reviews.freebsd.org/D18686

Changes:
  head/bin/pax/pax.1