Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RPM source_date_epoch test should check rpmbuild version, not system rpm #455

Open
nacl opened this issue Nov 4, 2021 · 3 comments
Open
Labels
P3 An issue that we are not working on but will review quarterly rpm

Comments

@nacl
Copy link
Collaborator

nacl commented Nov 4, 2021

We have a skip in this test, but we dumbly check the system "rpm" binary than the rpmbuild binary used to build the RPM in the first place. We have skipping logic here:

# These tests will fail on unsupported versions of rpm(8), so skip them
# in that case.
if not self.rpmBinSupportsSourceDateEpoch():
self.skipTest("RPM version too old to support SOURCE_DATE_EPOCH."
" Must be {} or newer (is {})".format(
version_to_string(self.SOURCE_DATE_EPOCH_MIN_VERSION),
version_to_string(self.rpm_bin_version),
))

But it could not be working for numerous reasons. Investigate further.

Originally posted by @nacl in #443 (comment)

@nacl
Copy link
Collaborator Author

nacl commented Nov 4, 2021

See also #443 (comment)

@nacl nacl added the P3 An issue that we are not working on but will review quarterly label Nov 4, 2021
@nacl nacl added the rpm label Nov 4, 2021
@nacl nacl changed the title RPM source_date_epoch should check rpmbuild version, not system rpm RPM source_date_epoch test should check rpmbuild version, not system rpm Nov 4, 2021
@aiuto
Copy link
Collaborator

aiuto commented Feb 1, 2022

So... I notice that the tests fail on my machine, but my rpmbuild version is 4.17.0
The suspicious thing is

rror: Unable to open sqlite database zzz/.rpmdb/rpmdb.sqlite: unable to open database file
error: cannot open Packages index using sqlite - Operation not permitted (1)
error: cannot open Packages database in /zzz/.rpmdb
Ferror: Unable to open sqlite database /zzz/.rpmdb/rpmdb.sqlite: unable to open database file

then

  self.assertEqual(actual_epoch, EXPECTED_EPOCH)
AssertionError: '1643058161' != '1616472000'
- 1643058161
+ 1616472000

So, I am not sure if there is more to it than that.

@aiuto
Copy link
Collaborator

aiuto commented Feb 1, 2022

Also, sending a PR to get rpmbuild version into the toolchain.
if you want to go that route, we can make source date epoch support a condition, and use exec_compatible_with on the tests which would require it. Much like have_rpmbuild.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P3 An issue that we are not working on but will review quarterly rpm
Projects
None yet
Development

No branches or pull requests

2 participants