From bb6481af0eeb45a625c92d6ca71070dc57cbc8c0 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Thu, 16 Sep 2021 14:39:56 +0200 Subject: gnu: varnish: Update to 7.0.0. * gnu/packages/web.scm (varnish): Update to 7.0.0. [arguments]: Set CC in #:configure-flags. Rewrite use-absolute-file-names phase to use named inputs instead of WHICH and patch one more file. Remove trailing #t's. [inputs]: Add BASH-MINIMAL and COREUTILS. Replace PCRE with PCRE2, and PYTHON-WRAPPER with PYTHON. --- gnu/packages/web.scm | 47 ++++++++++++++++++++++++++--------------------- 1 file changed, 26 insertions(+), 21 deletions(-) diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm index 09b57712c0..07290bc447 100644 --- a/gnu/packages/web.scm +++ b/gnu/packages/web.scm @@ -19,7 +19,7 @@ ;;; Copyright © 2016–2021 Tobias Geerinckx-Rice ;;; Copyright © 2016 Bake Timmons ;;; Copyright © 2017 Thomas Danckaert -;;; Copyright © 2017, 2018, 2020 Marius Bakke +;;; Copyright © 2017, 2018, 2020, 2021 Marius Bakke ;;; Copyright © 2017 Kei Kebreau ;;; Copyright © 2017 Petter ;;; Copyright © 2017, 2021 Pierre Langlois @@ -5998,16 +5998,17 @@ deployments.") (package (name "varnish") (home-page "https://varnish-cache.org/") - (version "6.5.1") + (version "7.0.0") (source (origin (method url-fetch) (uri (string-append home-page "_downloads/varnish-" version ".tgz")) (sha256 (base32 - "1dfdswri6lkfk6kml3szvffm91y49pajgqy1k5y26llqixl4r5hi")))) + "11z0pa618lh925ih67wmp1gqk7i46l486j4spjy71g1n3w5mqylc")))) (build-system gnu-build-system) (arguments `(#:configure-flags (list (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib") + (string-append "CC=" ,(cc-for-target)) ;; Use absolute path of GCC so it's found at runtime. (string-append "PTHREAD_CC=" (assoc-ref %build-inputs "gcc") @@ -6016,23 +6017,26 @@ deployments.") #:phases (modify-phases %standard-phases (add-after 'unpack 'use-absolute-file-names - (lambda _ - (substitute* '("bin/varnishtest/vtc_varnish.c" - "bin/varnishtest/vtc_process.c" - "bin/varnishd/mgt/mgt_vcc.c" - "bin/varnishtest/tests/u00014.vtc") - (("/bin/sh") (which "sh"))) - (substitute* "bin/varnishd/mgt/mgt_shmem.c" - (("rm -rf") (string-append (which "rm") " -rf"))) - (substitute* "bin/varnishtest/vtc_main.c" - (("/bin/rm") (which "rm"))) - #t)) + (lambda* (#:key inputs #:allow-other-keys) + (let* ((bash (assoc-ref inputs "bash-minimal")) + (sh (string-append bash "/bin/sh")) + (coreutils (assoc-ref inputs "coreutils")) + (rm (string-append coreutils "/bin/rm"))) + (substitute* '("bin/varnishtest/vtc_varnish.c" + "bin/varnishtest/vtc_process.c" + "bin/varnishtest/vtc_haproxy.c" + "bin/varnishtest/tests/u00014.vtc" + "bin/varnishd/mgt/mgt_vcc.c") + (("/bin/sh") sh)) + (substitute* "bin/varnishd/mgt/mgt_shmem.c" + (("rm -rf") (string-append rm " -rf"))) + (substitute* "bin/varnishtest/vtc_main.c" + (("/bin/rm") rm))))) (add-before 'install 'patch-Makefile (lambda _ (substitute* "Makefile" ;; Do not create /var/varnish during install. - (("^install-data-am: install-data-local") "install-data-am: ")) - #t)) + (("^install-data-am: install-data-local") "install-data-am: ")))) (add-after 'install 'wrap-varnishd ;; Varnish uses GCC to compile VCL, so wrap it with required GCC ;; environment variables to avoid propagating them to profiles. @@ -6045,17 +6049,18 @@ deployments.") ;; Add binutils to PATH so gcc finds the 'as' executable. `("PATH" ":" prefix (,PATH)) ;; Make sure 'crti.o' et.al is found. - `("LIBRARY_PATH" ":" prefix (,LIBRARY_PATH))) - #t)))))) + `("LIBRARY_PATH" ":" prefix (,LIBRARY_PATH))))))))) (native-inputs `(("pkg-config" ,pkg-config) ("python-sphinx" ,python-sphinx) ("rst2man" ,python-docutils))) (inputs - `(("jemalloc" ,jemalloc) + `(("bash-minimal" ,bash-minimal) + ("coreutils" ,coreutils) + ("jemalloc" ,jemalloc) ("ncurses" ,ncurses) - ("pcre" ,pcre) - ("python" ,python-wrapper) + ("pcre2" ,pcre2) + ("python" ,python) ("readline" ,readline))) (synopsis "Web application accelerator") (description -- cgit v1.2.3