News for hackers. Stuff that matters.
Re:The cpio trailer problem (2018) by tyingq on Sunday July 19, 2020 @09:59AM (#23889410)
Seems they still use the same logic though: https://github.com/rpm-software-management/rpm/blob/853c48ba...
Re:The cpio trailer problem (2018) by rwmj on Sunday July 19, 2020 @10:12AM (#23889491)
That doesn't actually matter though does it, because RPM is no longer using cpio, it's now using a custom format that happens to once have been related to cpio. What matters is what RPM does, not what cpio does.

In this case it's not possible to create such an archive using rpmbuild as all files added to RPMs much start with "/". I just tried it and got:

  RPM build errors:
      File must begin with "/": TRAILER!!!
You cannot hack on your own rpmbuild because you wouldn't be able to make a signed RPM (as those can only be built through the Koji build system which doesn't have your hacked rpmbuild), so you couldn't distribute that RPM to Fedora or Red Hat Enterprise Linux.

In other words this is essentially a non-problem for RPM.

Re:The cpio trailer problem (2018) by tyingq on Sunday July 19, 2020 @10:18AM (#23889519)
The comparison is just to the filename, not including the path. You may be right, but that check doesn't prove it.

Edit: Thanks for the reply! Apparently they are including the path.

Re:The cpio trailer problem (2018) by rwmj on Sunday July 19, 2020 @10:39AM (#23889648)
I can create an RPM containing a filename "TRAILER!!!" just fine:

  $ rpm -qlp /home/rjones/d/fedora/virt-what/master/x86_64/virt-what-1.20-1.fc33.x86_64.rpm
  /TRAILER!!!
  /usr/lib/.build-id
  /usr/lib/.build-id/59
  /usr/lib/.build-id/59/59c1cb95689b7babd5a6cb1b5bc58f12e20b3a
  /usr/libexec/virt-what-cpuid-helper
  /usr/sbin/virt-what
  /usr/share/doc/virt-what
  /usr/share/doc/virt-what/COPYING
  /usr/share/doc/virt-what/README
  /usr/share/man/man1/virt-what.1.gz
Furthermore I installed and uninstalled it with no ill effects, and the file was created and removed in /. So whatever problem cpio may have with this file does not affect the RPM-not-quite-cpio format.