Bug 10866 - busybox tar does not mention -o (--no-same-owner) option anywhere in its help output
Summary: busybox tar does not mention -o (--no-same-owner) option anywhere in its help...
Status: RESOLVED FIXED
Alias: None
Product: Busybox
Classification: Unclassified
Component: Other (show other bugs)
Version: 1.27.x
Hardware: All Linux
: P5 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-03-16 02:47 UTC by alt.j2-4o4s2yon
Modified: 2018-04-07 19:02 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description alt.j2-4o4s2yon 2018-03-16 02:47:46 UTC
sudo tar xof make-3.82.tar.gz works (i.e. all files are owned by root, not by "1000") yet nowhere in busybox's output this option is mentioned.

$ busybox tar
BusyBox v1.27.2 (2018-01-04 01:07:56 WET) multi-call binary.

Usage: tar -[cxtzJjahmvO] [-X FILE] [-T FILE] [-f TARFILE] [-C DIR] [FILE]...

Create, extract, or list files from a tar file

Operation:
        c       Create
        x       Extract
        t       List
        f       Name of TARFILE ('-' for stdin/out)
        C       Change to DIR before operation
        v       Verbose
        z       (De)compress using gzip
        J       (De)compress using xz
        j       (De)compress using bzip2
        a       (De)compress using lzma
        O       Extract to stdout
        h       Follow symlinks
        m       Don't restore mtime
        exclude File to exclude
        X       File with names to exclude
        T       File with names to include


it's not mentioned here tar -[cxtzJjahmvO]  nor later as a line in the operation output.

arguably -o should be the default behaviour anyway... the behaviour to create files with a random owner when root extracts it seems to predate the internet.
Comment 1 Denys Vlasenko 2018-04-07 19:02:44 UTC
BusyBox v1.29.0.git (2018-04-07 15:43:16 CEST) multi-call binary.

Usage: tar c|x|t [-ZzJjahmvokO] [-f TARFILE] [-C DIR] [-T FILE] [-X FILE] [--exclude PATTERN]... [FILE]...

Create, extract, or list files from a tar file

Operation:
	c	Create
	x	Extract
	t	List
	-f FILE	Name of TARFILE ('-' for stdin/out)
	-C DIR	Change to DIR before operation
	-v	Verbose
	-O	Extract to stdout
	-m	Don't restore mtime
	-o	Don't restore user:group
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
	-k	Don't replace existing files
	-Z	(De)compress using compress
	-z	(De)compress using gzip
	-J	(De)compress using xz
	-j	(De)compress using bzip2
	-a	(De)compress using lzma
	-h	Follow symlinks
	-T FILE	File with names to include
	-X FILE	File with glob patterns to exclude
	--exclude PATTERN	Glob pattern to exclude