Bug 30097 - Q: why find-debuginfo script uses cpio?
Summary: Q: why find-debuginfo script uses cpio?
Status: UNCONFIRMED
Alias: None
Product: debugedit
Classification: Unclassified
Component: find-debuginfo (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-02-08 03:04 UTC by kloczek
Modified: 2023-08-28 11:32 UTC (History)
3 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description kloczek 2023-02-08 03:04:21 UTC
Trying to minimize base build build env I found that only package which needs cpio  is find-debuginfo scipt.
I have difficulty ith understandig why it needed to try to remove that dependency.

Is it reall ynecessary to use cpio in this case?
Comment 1 Panu Matilainen 2023-02-08 06:25:26 UTC
Historical reasons? The cpio use was there already in the first-ever version in 2007 by Roland McGrath.
Comment 2 Mark Wielaard 2023-08-28 11:04:22 UTC
(In reply to kloczek from comment #0)
> Trying to minimize base build build env I found that only package which
> needs cpio  is find-debuginfo scipt.
> I have difficulty ith understandig why it needed to try to remove that
> dependency.
> 
> Is it reall necessary to use cpio in this case?

It is just an convenient way to package up a bunch of files.
It could be replaced with any other packaging system.
cpio is just known to always be there.

What would you suggest instead? And do you have a working patch?
Comment 3 kloczek 2023-08-28 11:13:20 UTC
Issue is that cpio is minimal build env is required only by thy part.

IMO it would be better to use tar because tar is usually used in %prep.
Comment 4 Panu Matilainen 2023-08-28 11:21:50 UTC
> cpio is just known to always be there.

Note that rpm itself does not use the external cpio command for anything at all. The only reason rpm-build in Fedora depends on cpio is because nobody thought to remove the dependency when the debuginfo-stuff got split.

While we've come to expect to cpio being always there, few packages actually depend on it.

I'm not arguing for replacing, cpio is tiny enough that it hardly matters at all. Just FWIW.
Comment 5 Mark Wielaard 2023-08-28 11:28:02 UTC
In my experience cpio is more common than tar.
And the format seems more stable than that of tar.
Because that cpio in POSIX is replaced by pax,
which does support the cpio format (and ustar).
Maybe we should use pax instead?

I am not going to work it, but patches welcome if someone feels this is important.
Comment 6 kloczek 2023-08-28 11:32:07 UTC
> In my experience cpio is more common than tar.

This is not about coder experience.
None of the source archives are cpio.{gz|xz|bz2}.
Almost all of them are tar.{gz|xz|bz2}.