[Rpm-maint] [rpm-software-management/rpm] rpmuncompress option `-C` does not work with some tar archives (Issue #3250)
Mikolaj Izdebski
notifications at github.com
Tue Aug 20 15:54:35 UTC 2024
**Describe the bug**
rpmuncompress option `-C` does not work with some tar archives (that do have a single top directory).
Related: #2859
**To Reproduce**
Steps to reproduce the behavior:
1. `wget https://src.fedoraproject.org/lookaside/pkgs/apache-commons-io/commons-io-2.16.1-src.tar.gz/sha512/07298e3af85726f2ec07a660fbb743f82cd88f8043a57e2e1063b758c81429dfafd77a024e2cdd48efe5d403299c20e898f5b3dd729f52bd55b8a6fb50c9a13a/commons-io-2.16.1-src.tar.gz`
2. `/usr/lib/rpm/rpmuncompress -x -v -C apache-commons-io-2.16.1 commons-io-2.16.1-src.tar.gz`
**Expected behavior**
Option `--strip-components=1` is passed to `tar` command.
Sources are unpacked directly in directory named `apache-commons-io-2.16.1`, per `-C` option.
Subdirectory `apache-commons-io-2.16.1/commons-io-2.16.1` is not created.
**Output**
Option `--strip-components=1` is not passed to `tar` command.
Sources are unpacked in directory `apache-commons-io-2.16.1/commons-io-2.16.1`.
```
$ /usr/lib/rpm/rpmuncompress -x -v -C apache-commons-io-2.16.1 commons-io-2.16.1-src.tar.gz
mkdir 'apache-commons-io-2.16.1' ; /usr/bin/gzip -dc 'commons-io-2.16.1-src.tar.gz' | /usr/bin/tar -xvvof - -C 'apache-commons-io-2.16.1'
-rw-r--r-- root/root 6596 2024-04-04 22:10 commons-io-2.16.1-src/CONTRIBUTING.md
drwxr-xr-x Creating directory: commons-io-2.16.1-src
-rw-r--r-- root/root 11359 2024-04-04 22:10 commons-io-2.16.1-src/LICENSE.txt
-rw-r--r-- root/root 172 2024-04-04 22:10 commons-io-2.16.1-src/NOTICE.txt
[...]
```
**Environment**
- OS / Distribution: Fedora Linux 42 (rawhide)
- Version: rpm-4.19.92-6.fc41
**Additional context**
This affects multiple Java packages in Fedora, blocking adoption of `%autosetup -C` and declarative builds.
--
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/3250
You are receiving this because you are subscribed to this thread.
Message ID: <rpm-software-management/rpm/issues/3250 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20240820/e709ddd1/attachment.html>
More information about the Rpm-maint
mailing list