Forums before death by AOL, social media and spammers... "We can't have nice things"
|    linux.debian.kernel    |    Debian kernel discussions    |    2,884 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 2,427 of 2,884    |
|    Benjamin Drung to Santiago Vila    |
|    Bug#1125948: dracut: Missing dependency     |
|    23 Jan 26 21:50:01    |
   
   XPost: linux.debian.bugs.dist   
   From: bdrung@debian.org   
      
   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   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca