[Rpm-maint] [rpm-software-management/rpm] Make `%setup` work with archives regardless of inner structure (Issue #2664)

Neal Gompa (ニール・ゴンパ) notifications at github.com
Wed Sep 13 22:29:28 UTC 2023


In a conversation in [`#devel:fedoraproject.org`](https://matrix.to/#/#devel:fedoraproject.org) with @penguinpee, I realized that there's a potential quality of life improvement we could look into making around `%setup`: Making it so we don't ever need to use `-n`.

It started with asking about how to pass in `--strip-components=1` to `%setup`, and I realized something: now that libarchive exists, it would be possible for us to have a universal unarchiver program with RPM that can give us the ability to automatically handle extracting archives properly, regardless of what the name of the top level directory is or whether there is even one at all.

For some prior art, Debian's packaging tooling can do this, and it uses that to 1) extract the tarball into a `name-version` directory, and 2) blow away `debian` directory of an upstream tarball if it exists so its own version can be unpacked in-tree.

Obviously, we don't need to do the second thing, but the first thing would be extremely useful.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/2664
You are receiving this because you are subscribed to this thread.

Message ID: <rpm-software-management/rpm/issues/2664 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20230913/55ab4f54/attachment-0001.html>


More information about the Rpm-maint mailing list