From 59e989414733113b660dd3794efc2c8c0236764b Mon Sep 17 00:00:00 2001 From: Carlos Abalde Date: Fri, 13 Sep 2024 18:58:58 +0200 Subject: [PATCH] Migrated to Varnish Cache 7.6.x --- .github/workflows/main.yml | 5 +- Dockerfile | 7 +- README.rst | 4 +- configure.ac | 4 +- debian/changelog | 195 +++++++++++++++++++++++++++++++++++++ debian/compat | 1 + debian/control | 20 ++++ debian/copyright | 8 ++ debian/dirs | 1 + debian/docs | 2 + debian/rules | 12 +++ docker-compose.yml | 3 +- redhat/vmod-cfg.spec | 114 ++++++++++++++++++++++ 13 files changed, 366 insertions(+), 10 deletions(-) create mode 100644 debian/changelog create mode 100644 debian/compat create mode 100644 debian/control create mode 100644 debian/copyright create mode 100644 debian/dirs create mode 100644 debian/docs create mode 100755 debian/rules create mode 100644 redhat/vmod-cfg.spec diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 3960cc4..d3568e4 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -39,8 +39,9 @@ jobs: - name: Install Varnish Cache run: | - git clone https://github.com/varnishcache/varnish-cache.git ./varnish - pushd varnish + wget --no-check-certificate https://varnish-cache.org/_downloads/varnish-7.6.0.tgz + tar zxvf varnish-*.tgz + pushd varnish-*/ ./autogen.sh CC='${{ matrix.cc }}' ./configure make -sj32 diff --git a/Dockerfile b/Dockerfile index b6cc600..c594ce5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -45,8 +45,11 @@ RUN apt update \ && apt clean \ && rm -rf /var/lib/apt/lists/* -RUN git clone https://github.com/varnishcache/varnish-cache.git /tmp/varnish \ - && cd /tmp/varnish \ +RUN cd /tmp \ + && wget --no-check-certificate https://varnish-cache.org/_downloads/varnish-7.6.0.tgz \ + && tar zxvf varnish-*.tgz \ + && rm -f varnish-*.tgz \ + && cd varnish-* \ && ./autogen.sh \ && ./configure \ && make \ diff --git a/README.rst b/README.rst index bc2c2f4..f438702 100644 --- a/README.rst +++ b/README.rst @@ -1,8 +1,8 @@ -.. image:: https://github.com/carlosabalde/libvmod-cfg/workflows/CI/badge.svg?branch=master +.. image:: https://github.com/carlosabalde/libvmod-cfg/workflows/CI/badge.svg?branch=7.6 :alt: GitHub Actions CI badge :target: https://github.com/carlosabalde/libvmod-cfg/actions -.. image:: https://codecov.io/gh/carlosabalde/libvmod-cfg/branch/master/graph/badge.svg +.. image:: https://codecov.io/gh/carlosabalde/libvmod-cfg/branch/7.6/graph/badge.svg :alt: Codecov badge :target: https://codecov.io/gh/carlosabalde/libvmod-cfg diff --git a/configure.ac b/configure.ac index 22b2a43..9bcdac1 100644 --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,5 @@ AC_PREREQ([2.68]) -AC_INIT([libvmod-cfg], [trunk], [], [vmod-cfg]) +AC_INIT([libvmod-cfg], [18.0], [], [vmod-cfg]) AC_COPYRIGHT([Copyright (c) Carlos Abalde ]) AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_SRCDIR(src/vmod_cfg.vcc) @@ -94,7 +94,7 @@ fi m4_ifndef([VARNISH_PREREQ], AC_MSG_ERROR([Need varnish.m4 -- see README.rst])) -#VARNISH_PREREQ([5.0], [5.1]) +VARNISH_PREREQ([7.6], [7.7]) VARNISH_VMODS([cfg]) VMOD_TESTS="$(cd $srcdir/src && echo tests/*.vtc)" diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..7a66974 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,195 @@ +libvmod-cfg (18.0-1) stable; urgency=low + + * Migrated to Varnish Cache 7.6.x + + -- Carlos Abalde Fri, 13 Sep 2024 16:00:00 +0200 + +libvmod-cfg (17.0-1) stable; urgency=low + + * Migrated to Varnish Cache 7.5.x + + -- Carlos Abalde Tue, 19 Mar 2024 16:00:00 +0100 + +libvmod-cfg (16.0-1) stable; urgency=low + + * Migrated to Varnish Cache 7.4.x + + -- Carlos Abalde Fri, 15 Sep 2023 16:00:00 +0200 + +libvmod-cfg (15.0-1) stable; urgency=low + + * Migrated to Varnish Cache 7.3.x + + -- Carlos Abalde Wed, 15 Mar 2023 16:00:00 +0100 + +libvmod-cfg (14.0-1) stable; urgency=low + + * Migrated to Varnish Cache 7.2.x + + -- Carlos Abalde Thu, 15 Sep 2022 16:00:00 +0200 + +libvmod-cfg (13.0-1) stable; urgency=low + + * Migrated to Varnish Cache 7.1.x + + -- Carlos Abalde Tue, 15 Mar 2022 16:00:00 +0100 + +libvmod-cfg (12.0-1) stable; urgency=low + + * Migrated to Varnish Cache 7.0.x + + -- Carlos Abalde Wed, 15 Sep 2021 16:00:00 +0200 + +libvmod-cfg (11.0-1) stable; urgency=low + + * Migrated to Varnish Cache 6.6.x + + -- Carlos Abalde Mon, 15 Mar 2021 16:00:00 +0100 + +libvmod-cfg (10.0-1) stable; urgency=low + + * Migrated to Varnish Cache 6.5.x + + -- Carlos Abalde Tue, 15 Sep 2020 16:00:00 +0200 + +libvmod-cfg (9.0-1) stable; urgency=low + + * Migrated to Varnish Cache 6.4.x + + -- Carlos Abalde Fri, 20 Mar 2020 16:00:00 +0100 + +libvmod-cfg (8.2-1) stable; urgency=low + + * Add inspect() support for files, rules & scripts + * Add VRT_FlushThreadCache() support (Varnish Enterprise) + + -- Carlos Abalde Fri, 14 Feb 2020 16:00:00 +0100 + +libvmod-cfg (8.1-1) stable; urgency=low + + * Fixed error in new_remote() when https URLs are used + * Added some Linux Alpine fixes + + -- Carlos Abalde Mon, 11 Nov 2019 16:00:00 +0100 + +libvmod-cfg (8.0-1) stable; urgency=low + + * Migrated to Varnish Cache 6.3.x + + -- Carlos Abalde Mon, 30 Sep 2019 16:00:00 +0200 + +libvmod-cfg (7.3-1) stable; urgency=low + + * Added support for execution of ECMAScript scripts + * Added support for loading of arbitrary Lua extensions + * Added 'varnish.engine' & 'varnish.shared' helpers + + -- Carlos Abalde Mon, 29 Jul 2019 16:00:00 +0200 + +libvmod-cfg (7.2-1) stable; urgency=low + + * Fixed error in check_remote() when backup file can't be opened + + -- Carlos Abalde Mon, 27 May 2019 16:00:00 +0200 + +libvmod-cfg (7.1-1) stable; urgency=low + + * Added backup feature + * Added varnish.get_header() & varnish.set_header() Lua helpers + * Added varnish.regmatch(), varnish.regsub() & varnish.regsuball() Lua helpers + * Added 'engines.current' & 'regexps.current' metrics to stats + * Updated cJSON & inih dependencies + + -- Carlos Abalde Wed, 15 May 2019 16:00:00 +0200 + +libvmod-cfg (7.0-1) stable; urgency=low + + * Migrated to Varnish Cache 6.2.x + + -- Carlos Abalde Mon, 18 Mar 2019 16:00:00 +0100 + +libvmod-cfg (6.3-1) stable; urgency=low + + * Triggered 'thread.tcache.flush' also on LuaJIT executions + * Added Lua / LuaJIT memory consumption to stats + * Added Lua 5.2 & 5.3 support to build system + + -- Carlos Abalde Thu, 25 Oct 2018 16:00:00 +0200 + +libvmod-cfg (6.2-1) stable; urgency=low + + * Flushed 'thread.tcache.flush' on Lua (not LuaJIT) script executions + + -- Carlos Abalde Tue, 16 Oct 2018 16:00:00 +0200 + +libvmod-cfg (6.1-1) stable; urgency=low + + * Added new parameter 'prefix' to .dump() methods + * Linked against LuaJIT when possible + * Added new parameter 'gc_collect' to .execute() method + + -- Carlos Abalde Sat, 13 Oct 2018 16:00:00 +0200 + +libvmod-cfg (6.0-1) stable; urgency=low + + * Migrated to Varnish Cache 6.1.x + + -- Carlos Abalde Tue, 18 Sep 2018 16:00:00 +0200 + +libvmod-cfg (5.2-1) stable; urgency=low + + * Increased INI_MAX_LINE from 2KB to 16KB + + -- Carlos Abalde Tue, 07 Aug 2018 16:00:00 +0200 + +libvmod-cfg (5.1-1) stable; urgency=low + + * Added cfg.rules() + * Added cfg.script() + * Added stream option to .dump() methods + + -- Carlos Abalde Wed, 27 Jun 2018 16:00:00 +0200 + +libvmod-cfg (5.0-1) stable; urgency=low + + * Migrated to Varnish Cache 6.0.x + + -- Carlos Abalde Thu, 15 Mar 2018 16:00:00 +0100 + +libvmod-cfg (4.0-1) stable; urgency=low + + * Migrated to Varnish Cache 5.2.x + + -- Carlos Abalde Fri, 15 Sep 2017 16:00:00 +0200 + +libvmod-cfg (3.1-1) stable; urgency=low + + * Added JSON support + + -- Carlos Abalde Fri, 25 Aug 2017 16:00:00 +0200 + +libvmod-cfg (3.0-1) stable; urgency=low + + * Migrated to Varnish Cache 5.1.x + + -- Carlos Abalde Fri, 17 Mar 2017 16:00:00 +0100 + +libvmod-cfg (2.0-1) stable; urgency=low + + * Migrated to Varnish Cache 5.0.x + + -- Carlos Abalde Fri, 17 Mar 2017 16:00:00 +0100 + +libvmod-cfg (1.3-1) stable; urgency=low + + * Fixed bug reading files from disk + * Added reporting of error code when failed to parse .ini files + * Updated .ini parser + + -- Carlos Abalde Thu, 02 Feb 2017 16:00:00 +0100 + +libvmod-cfg (1.2-1) stable; urgency=low + + * Initial version + + -- Carlos Abalde Fri, 16 Sep 2016 16:00:00 +0200 diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000..7f8f011 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +7 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..41253ef --- /dev/null +++ b/debian/control @@ -0,0 +1,20 @@ +Source: libvmod-cfg +Section: web +Priority: extra +Maintainer: Carlos Abalde +Build-Depends: debhelper (>= 7), + build-essential, + pkg-config, + python-docutils | python3-docutils, + varnish (>= 7.6.0), + libvarnishapi-dev (>= 7.6.0), + libcurl4-gnutls-dev, + libluajit-5.1-dev, + libjemalloc-dev, + vim-common +Standards-Version: 3.8.1 + +Package: libvmod-cfg +Architecture: any +Depends: varnish (>= 7.6.0), libcurl3-gnutls, libluajit-5.1-2, ${shlibs:Depends}, ${misc:Depends}, ${Varnish:ABI} +Description: Config VMOD for Varnish diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..010372e --- /dev/null +++ b/debian/copyright @@ -0,0 +1,8 @@ +Copyright: + + Copyright Carlos Abalde + +License: + +You're free to use and distribute this under terms in the +LICENSE file. diff --git a/debian/dirs b/debian/dirs new file mode 100644 index 0000000..74c9fb2 --- /dev/null +++ b/debian/dirs @@ -0,0 +1 @@ +usr/share/doc/libvmod-cfg diff --git a/debian/docs b/debian/docs new file mode 100644 index 0000000..92bab46 --- /dev/null +++ b/debian/docs @@ -0,0 +1,2 @@ +README.rst +LICENSE diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..af8f2d0 --- /dev/null +++ b/debian/rules @@ -0,0 +1,12 @@ +#!/usr/bin/make -f +export DH_VERBOSE=1 + +override_dh_gencontrol: + if [ -n "$$DEBIAN_OVERRIDE_BINARY_VERSION" ]; then \ + dh_gencontrol -- -v$$DEBIAN_OVERRIDE_BINARY_VERSION; \ + else \ + dh_gencontrol ; \ + fi + +%: + dh $@ diff --git a/docker-compose.yml b/docker-compose.yml index a1b6ebb..69559d4 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -14,14 +14,13 @@ version: '3.7' -name: libvmod-cfg-master +name: libvmod-cfg-7_6 services: dev: hostname: dev build: context: . - no_cache: true privileged: true environment: HOST_UID: ${UID:?} diff --git a/redhat/vmod-cfg.spec b/redhat/vmod-cfg.spec new file mode 100644 index 0000000..e76661d --- /dev/null +++ b/redhat/vmod-cfg.spec @@ -0,0 +1,114 @@ +Summary: Config VMOD for Varnish +Name: vmod-cfg +Version: 18.0 +Release: 1%{?dist} +License: BSD +URL: https://github.com/carlosabalde/libvmod-cfg +Group: System Environment/Daemons +Source0: libvmod-cfg.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +Requires: varnish >= 7.6.0, libcurl, luajit +BuildRequires: make, python-docutils, varnish >= 7.6.0, varnish-devel >= 7.6.0, libcurl-devel, luajit-devel, jemalloc-devel, vim-common + +%description +Config VMOD for Varnish + +%prep +%setup -n libvmod-cfg + +%build +./autogen.sh +./configure --prefix=/usr/ --docdir='${datarootdir}/doc/%{name}' --libdir='%{_libdir}' +%{__make} +%{__make} check + +%install +[ %{buildroot} != "/" ] && %{__rm} -rf %{buildroot} +%{__make} install DESTDIR=%{buildroot} + +%clean +[ %{buildroot} != "/" ] && %{__rm} -rf %{buildroot} + +%files +%defattr(-,root,root,-) +%{_libdir}/varnish*/vmods/lib* +%doc /usr/share/doc/%{name}/* +%{_mandir}/man?/* + +%changelog +* Fri Sep 13 2024 Carlos Abalde - 18.0-1.20240913 +- Migrated to Varnish Cache 7.6.x. +* Tue Mar 19 2024 Carlos Abalde - 17.0-1.20240319 +- Migrated to Varnish Cache 7.5.x. +* Fri Sep 15 2023 Carlos Abalde - 16.0-1.20230915 +- Migrated to Varnish Cache 7.4.x. +* Wed Mar 15 2023 Carlos Abalde - 15.0-1.20230315 +- Migrated to Varnish Cache 7.3.x. +* Thu Sep 15 2022 Carlos Abalde - 14.0-1.20220915 +- Migrated to Varnish Cache 7.2.x. +* Tue Mar 15 2022 Carlos Abalde - 13.0-1.20220315 +- Migrated to Varnish Cache 7.1.x. +* Wed Sep 15 2021 Carlos Abalde - 12.0-1.20210915 +- Migrated to Varnish Cache 7.0.x. +* Mon Mar 15 2021 Carlos Abalde - 11.0-1.20210315 +- Migrated to Varnish Cache 6.6.x. +* Tue Sep 15 2020 Carlos Abalde - 10.0-1.20200915 +- Migrated to Varnish Cache 6.5.x. +* Fri Mar 20 2020 Carlos Abalde - 9.0-1.20200320 +- Migrated to Varnish Cache 6.4.x. +* Fri Feb 14 2020 Carlos Abalde - 8.2-1.20200214 +- Add inspect() support for files, rules & scripts. +- Add VRT_FlushThreadCache() support (Varnish Enterprise). +* Mon Nov 11 2019 Carlos Abalde - 8.1-1.20191111 +- Fixed error in new_remote() when https URLs are used. +- Added some Linux Alpine fixes. +* Mon Sep 30 2019 Carlos Abalde - 8.0-1.20190930 +- Migrated to Varnish Cache 6.3.x. +* Mon Jul 29 2019 Carlos Abalde - 7.3-1.20190729 +- Added support for execution of ECMAScript scripts. +- Added support for loading of arbitrary Lua extensions. +- Added 'varnish.engine' & 'varnish.shared' helpers. +* Mon May 27 2019 Carlos Abalde - 7.2-1.20190527 +- Fixed error in check_remote() when backup file can't be opened. +* Wed May 15 2019 Carlos Abalde - 7.1-1.20190515 +- Added backup feature. +- Added varnish.get_header() & varnish.set_header() Lua helpers. +- Added varnish.regmatch(), varnish.regsub() & varnish.regsuball() Lua helpers. +- Added 'engines.current' & 'regexps.current' metrics to stats. +- Updated cJSON & inih dependencies. +* Mon Mar 18 2019 Carlos Abalde - 7.0-1.20190318 +- Migrated to Varnish Cache 6.2.x. +* Thu Oct 25 2018 Carlos Abalde - 6.3-1.20181025 +- Triggered 'thread.tcache.flush' also on LuaJIT executions. +- Added Lua / LuaJIT memory consumption to stats. +- Added Lua 5.2 & 5.3 support to build system. +* Tue Oct 16 2018 Carlos Abalde - 6.2-1.20181016 +- Flushed 'thread.tcache.flush' on Lua (not LuaJIT) script executions. +* Sat Oct 13 2018 Carlos Abalde - 6.1-1.20181013 +- Added new parameter 'prefix' to .dump() methods. +- Linked against LuaJIT when possible. +- Added new parameter 'gc_collect' to .execute() method. +* Tue Sep 18 2018 Carlos Abalde - 6.0-1.20180918 +- Migrated to Varnish Cache 6.1.x. +* Tue Aug 07 2018 Carlos Abalde - 5.2-1.20180807 +- Increased INI_MAX_LINE from 2KB to 16KB +* Wed Jun 27 2018 Carlos Abalde - 5.1-1.20180627 +- Added cfg.rules(). +- Added cfg.script(). +- Added stream option to .dump() methods. +* Thu Mar 15 2018 Carlos Abalde - 5.0-1.20180315 +- Migrated to Varnish Cache 6.0.x. +* Fri Sep 15 2017 Carlos Abalde - 4.0-1.20170915 +- Migrated to Varnish Cache 5.2.x. +* Fri Aug 25 2017 Carlos Abalde - 3.1-1.20170825 +- Added JSON support. +* Fri Mar 17 2017 Carlos Abalde - 3.0-1.20170317 +- Migrated to Varnish Cache 5.1.x. +* Fri Mar 17 2017 Carlos Abalde - 2.0-1.20170317 +- Migrated to Varnish Cache 5.0.x. +* Thu Feb 02 2017 Carlos Abalde - 1.3-1.20170202 +- Fixed bug reading files from disk. +- Added reporting of error code when failed to parse .ini files. +- Updated .ini parser. +* Fri Sep 16 2016 Carlos Abalde - 1.2-1.20160916 +- Initial version.