daemon: Fix compilation with older rpm that lacks RPMVSF_MASK_NOSIGNATURES

On RHEL 7 (rpm-devel-4.11.3-45.el7.x86_64):

rpm-c.c: In function ‘guestfs_int_daemon_rpm_start_iterator’:
rpm-c.c:97:44: error: ‘RPMVSF_MASK_NOSIGNATURES’ undeclared (first use in this function)
   rpmtsSetVSFlags (ts, rpmtsVSFlags (ts) | RPMVSF_MASK_NOSIGNATURES);
                                            ^
rpm-c.c:97:44: note: each undeclared identifier is reported only once for each function it appears in

Fixes: commit aa6f8038f8
This commit is contained in:
Richard W.M. Jones
2022-04-25 16:40:12 +01:00
parent 03a18f5f31
commit bc96e0b7d7

View File

@@ -93,8 +93,10 @@ guestfs_int_daemon_rpm_start_iterator (value unitv)
ts = rpmtsCreate ();
#ifdef RPMVSF_MASK_NOSIGNATURES
/* Disable signature checking (RHBZ#2064182). */
rpmtsSetVSFlags (ts, rpmtsVSFlags (ts) | RPMVSF_MASK_NOSIGNATURES);
#endif
iter = rpmtsInitIterator (ts, RPMDBI_PACKAGES, NULL, 0);
CAMLreturn (Val_unit);