diff options
author | Marius Bakke <marius@gnu.org> | 2023-04-30 19:03:42 +0800 |
---|---|---|
committer | Marius Bakke <marius@gnu.org> | 2023-09-08 18:53:46 +0800 |
commit | b41ea5dcd4a70af3b5efdcac939b56a0e2243a69 (patch) | |
tree | 88923e23262278a157959795843af831eead4470 /gnu/packages/patches/ganeti-procps-compat.patch | |
parent | d4645d5d25c9de0def9745c48a96504e500ec850 (diff) |
gnu: ganeti: Fix build.
* gnu/packages/patches/ganeti-lens-compat.patch,
gnu/packages/patches/ganeti-procps-compat.patch,
gnu/packages/patches/ganeti-relax-dependencies.patch,
gnu/packages/patches/ganeti-reorder-arbitrary-definitions.patch,
gnu/packages/patches/ganeti-template-haskell-2.17.patch,
gnu/packages/patches/ganeti-template-haskell-2.18.patch: New files.
* gnu/local.mk (dist_patch_DATA): Adjust accordingly.
* gnu/packages/virtualization.scm (ganeti)[source](patches): Add them.
Diffstat (limited to 'gnu/packages/patches/ganeti-procps-compat.patch')
-rw-r--r-- | gnu/packages/patches/ganeti-procps-compat.patch | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/gnu/packages/patches/ganeti-procps-compat.patch b/gnu/packages/patches/ganeti-procps-compat.patch new file mode 100644 index 0000000000..a2145274cb --- /dev/null +++ b/gnu/packages/patches/ganeti-procps-compat.patch @@ -0,0 +1,45 @@ +Fix compatibility with procps 4. + +Negative UIDs are no longer allowed. Use a very high one instead. + +Taken from upstream: + + https://github.com/ganeti/ganeti/commit/9cd67e6a81c66ed326d68ea8c3241d14eea6550b + +diff --git a/test/py/ganeti.uidpool_unittest.py b/test/py/ganeti.uidpool_unittest.py +index b2f5bc5cf2..2d9227cbf5 100755 +--- a/test/py/ganeti.uidpool_unittest.py ++++ b/test/py/ganeti.uidpool_unittest.py +@@ -106,23 +106,24 @@ def testRequestUnusedUid(self): + + # Check with a single, known unused user-id + # +- # We use "-1" here, which is not a valid user-id, so it's +- # guaranteed that it's unused. +- uid = uidpool.RequestUnusedUid(set([-1])) +- self.assertEqualValues(uid.GetUid(), -1) ++ # We use 2^30+42 here, which is a valid UID, but unlikely to be used on ++ # most systems (even as a subuid). ++ free_uid = 2**30 + 42 ++ uid = uidpool.RequestUnusedUid(set([free_uid])) ++ self.assertEqualValues(uid.GetUid(), free_uid) + + # Check uid-pool exhaustion + # +- # uid "-1" is locked now, so RequestUnusedUid is expected to fail ++ # free_uid is locked now, so RequestUnusedUid is expected to fail + self.assertRaises(errors.LockError, + uidpool.RequestUnusedUid, +- set([-1])) ++ set([free_uid])) + + # Check unlocking + uid.Unlock() + # After unlocking, "-1" should be available again +- uid = uidpool.RequestUnusedUid(set([-1])) +- self.assertEqualValues(uid.GetUid(), -1) ++ uid = uidpool.RequestUnusedUid(set([free_uid])) ++ self.assertEqualValues(uid.GetUid(), free_uid) + + + if __name__ == "__main__": |