Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.kernel > #90938
| From | Benjamin Drung <bdrung@debian.org> |
|---|---|
| Newsgroups | linux.debian.bugs.dist, linux.debian.kernel |
| Subject | Bug#1125948: dracut: Missing dependency on cpio (?) |
| Date | 2026-01-23 21:50 +0100 |
| Message-ID | <Mgwgp-cLt3-5@gated-at.bofh.it> (permalink) |
| References | <MeWeZ-bHrV-1@gated-at.bofh.it> <MeWeZ-bHrV-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Cross-posted to 2 groups.
On Mon, 2026-01-19 at 13:01 +0100, Santiago Vila wrote:
> During a rebuild of all packages in unstable, package src:linux-signed-amd64
> failed to build with this error message:
>
> /usr/bin/dracut: line 2772: cpio: command not found
>
> So it seems as if dracut had a missing dependency on cpio. Or maybe it fails
> to detect that 3cpio is installed instead and keeps using cpio anyway. Or maybe
> 3cpio should provide cpio and use the alternatives mechanism so that /usr/bin/cpio
> exists and may be used. This is why I've put "?" in the subject. Please use
> reassign if appropriate.
>
> The error does not always happen, which is strange, but it happens often enough
> to consider the issue as RC. I've put a bunch of failed build logs
> here (for linux-signed-amd64) for reference:
>
> https://people.debian.org/~sanvila/build-logs/202601/
>
> As always, if you cannot reproduce the bug please contact me privately, as I
> am willing to provide ssh access to a virtual machine where this randomness
> is reproducible.
I saw this failure in a log as well but was not able to reproduce it.
Help in debugging will be appreciated. Here is the current debugging
status:
dracut either needs 3cpio or cpio to read/write cpio files. It will
prefer 3cpio if available. dracut uses this check to see if 3cpio is
available (line 1489):
```
CPIO=cpio
if 3cpio --help 2> /dev/null | grep -q -- --create; then
CPIO=3cpio
fi
```
Later on (line 2732) it will take different code paths based on CPIO:
```
if [[ -n $enhanced_cpio ]]; then
[...]
elif [[ $CPIO == 3cpio ]]; then
[...]
else
[...]
fi
```
That's where dracut takes else branch and fails (only 3cpio is available
and not cpio).
We have line 1103 that ensures that $PATH has the common path included:
```
# Ensure that the standard search paths are searched.
for path in /usr/sbin /usr/bin /sbin /bin; do
if ! [[ ":${PATH}:" =~ .*:${path}:.* ]]; then
PATH="${PATH:+${PATH}:}$path"
fi
done
```
Is the 3cpio --help call failing? If so, why?
--
Benjamin Drung
Debian & Ubuntu Developer
Back to linux.debian.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
Bug#1125948: dracut: Missing dependency on cpio (?) Benjamin Drung <bdrung@debian.org> - 2026-01-23 21:50 +0100
Bug#1125948: dracut: fails to detect 3cpio Santiago Vila <sanvila@debian.org> - 2026-01-24 14:30 +0100
Bug#1125948: dracut: fails to detect 3cpio Benjamin Drung <bdrung@debian.org> - 2026-01-24 15:20 +0100
Bug#1125948: dracut: fails to detect 3cpio Santiago Vila <sanvila@debian.org> - 2026-01-24 17:40 +0100
Bug#1125948: dracut: fails to detect 3cpio Santiago Vila <sanvila@debian.org> - 2026-01-24 19:30 +0100
csiph-web