Closed troelsarvin closed 1 year ago
Ah, Midnight Commander, the good old file manager I had long forgotten about.
The generated RPM file has the "Build Date" set to "(none)". the mc scripts do not take "(none)" into account. The e)
is an improperly extracted string from "Build Date : (none)". This behavior can be observed by running sh -x /usr/libexec/mc/extfs.d/rpm list target/generate-rpm/genrpm-0.1.0-1.x86_64.rpm
.
This can be attributed to an omission in the mightnight commander script, or to a lack of functionality in the rust rpm library (missing function to set the build date).
OK, so I'l try to propose a code change (or at least raise a ticket about it) to the relevant RPM crate for adding bulid date. I'm trying to find out which RPM crate is the official one, and it's confusing. It seems there are at least two different codebases, and both have several forks:
:-(
https://github.com/Richterrettich/rpm-rs/ ( https://crates.io/crates/rpm-rs ) is original but no longer maintained. https://github.com/rpm-rs/rpm/ ( https://crates.io/crates/rpm ) is active now.
see also #51
I've sent a pull request to rpm-rs. It's not relevant to keep this issue open any longer.
The Midnight Commander (mc) tool is nice for inspecting RPM files. Unfortunately, for some reason, mc cannot open the RPM files resulting from "cargo generate-rpm". mc writes a number of error messages like "Cannot parse: -r--r--r-- 1 root root 495 e) HEADER", see attached screenshot:
Attached is also some code which can be used to reproduce the issue: genrpm.tar.gz
Perhaps generate-rpm is not be producing metadata which mc needs? Some may see this as an issue in mc, but there could be other RPM-related tools which will also trip over this, hence this ticket. The related mc code seems to be this script, but I don't see anything obviously wrong in it: https://github.com/MidnightCommander/mc/blob/master/src/vfs/extfs/helpers/rpm