nigoroll / libvmod-dynamic

The Varnish dns/named director continued
BSD 2-Clause "Simplified" License
95 stars 34 forks source link

Update RPM build #95

Closed nigoroll closed 1 year ago

nigoroll commented 1 year ago

Ref https://github.com/nigoroll/libvmod-dynamic/pull/93/commits/e7c14cf7bbeaa51e15a2e2921629ab15c701b09d and #93

We should update our RPM build to support 7.1 and/or 7.2

slimhazard commented 1 year ago

@janosmiko thanks for the RPM packaging code, it has now been pushed with some minor tweaks, see d0df8eae5253fc19acbc947b2de0110d7f0eb42c. (Unfortunately I referenced #93 in that commit instead of this one.)

Code to package RPMs compatible with Varnish 7.1.2 has now been pushed to branch 7.1, and that commit is tagged as v2.7.0. The RPMs have also been uploaded to pkg.uplex.de.

@nigoroll packaging code for 7.2 will need its own branch. Unless someone yells at me to stop, I'll go ahead with that and push the new branch.

slimhazard commented 1 year ago

@nigoroll make check for the VMOD currently fails against Varnish 7.2, with this message in the vtc test output:

**** v1    CLI RX|Message from VCC-compiler:
**** v1    CLI RX|Could not open VMOD dynamic
**** v1    CLI RX|\tFile name: /path/to/libvmod-dynamic/src/.libs/libvmod_dynamic.so
**** v1    CLI RX|\tError: No VMOD JSON found
**** v1    CLI RX|('<vcl.inline>' Line 5 Pos 16)
**** v1    CLI RX|        import dynamic from "/path/to/libvmod-dynamic/src/.libs/libvmod_dynamic.so";
**** v1    CLI RX|---------------#######---------------------------------------------------------------------------------------

Presumably that has something to do with this subject mentioned in "Changes" for 7.2:

The metadata VMODs exposes to Varnishd has changed to a non-binary format, and it is incompatible with all previous releases.

But I don't see any guidelines in "Changes" or "Upgrading" for creating a compatible format.

@nigoroll I could go searching for that, but you're probably more familiar with what has to be done, and this sounds like something we'll want to collaborate on. Let me know; I'll set it aside for now.

slimhazard commented 1 year ago

Hm, on my previous attempt to build against Varnish 7.2, I must have had some strange local condition, because now I can build the VMOD successfully. Tried it several times to be sure, and the build succeeded each time.

Branch 7.2 is now updated with new RPM packaging. Since the VMOD is now ABI VRT, I have changed the Requires clause in the RPM spec to specify a VRT version rather than a Varnish version. That way, compatibility may be maintained with future Varnish versions if there are no breaking changes in VRT. (Admittedly, that happens only very rarely.) The RPM spec in branch 7.2 now specifies VRT >= 16.0 (provided since Varnish 7.2.0).

Branch 7.2 now also requires Varnish 7.2 for the build in VARNISH_PREREQ().

The commit with these changes has been tagged as 2.8.0. RPMs for version 2.8.0 are now available at pkg.uplex.de.

@nigoroll I'm going to go ahead and close this issue. Re-open of course if necessary.