Github messages for voidlinux
 help / color / mirror / Atom feed
From: voidlinux-github@inbox.vuxu.org
To: ml@inbox.vuxu.org
Subject: [PR PATCH] varnish: update to 6.3.0.
Date: Wed, 02 Oct 2019 06:29:22 +0200	[thread overview]
Message-ID: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-14940@inbox.vuxu.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 1581 bytes --]

There is a new pull request by nilium against master on the void-packages repository

https://github.com/nilium/ecks-bops-packages varnish
https://github.com/void-linux/void-packages/pull/14940

varnish: update to 6.3.0.
Adds Varnish back to packages.

  - Don't use jemalloc on -musl builds. This appears to be leading to
    the segfault described in the earlier broken= message for those.
    Noticed the segfault doesn't happen in Alpine's build, and the only
    major difference there is that they disable jemalloc (because they
    don't support it, but given that it's the only difference, it was
    worth disabling to get builds working).

    jemalloc remains enabled for glibc.

  - Disable pcrejit by default. There is a build option to turn it on,
    but this is disabled by default for cross builds. We could add
    a check for target machine == host machine and enable it on those
    by default if desired, but the build option may be easier. Could
    also hack around the config cache, but I'm less confident in JIT
    availability on ARM and such than I am basic socket definitions.

  - The package originally included a varnish-vcl-reload file in the
    files directory. This has been removed because it is, as far as
    I can tell, unused.

  - Rewrite run file. Old one doesn't work at all, no reason to
    preserve it.

  - Add _varnish and _vcache system users for default jail argument in
    run file. These share a system group.

A patch file from https://github.com/void-linux/void-packages/pull/14940.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-varnish-14940.patch --]
[-- Type: text/x-diff, Size: 7793 bytes --]

From 724935bea991744a468da4a41eba0981a425d19d Mon Sep 17 00:00:00 2001
From: Noel Cower <ncower@gmail.com>
Date: Sun, 29 Sep 2019 22:19:34 -0700
Subject: [PATCH] varnish: update to 6.3.0.

Adds Varnish back to packages.

  - Don't use jemalloc on -musl builds. This appears to be leading to
    the segfault described in the earlier broken= message for those.
    Noticed the segfault doesn't happen in Alpine's build, and the only
    major difference there is that they disable jemalloc (because they
    don't support it, but given that it's the only difference, it was
    worth disabling to get builds working).

    jemalloc remains enabled for glibc.

  - Disable pcrejit by default. There is a build option to turn it on,
    but this is disabled by default for cross builds. We could add
    a check for target machine == host machine and enable it on those
    by default if desired, but the build option may be easier. Could
    also hack around the config cache, but I'm less confident in JIT
    availability on ARM and such than I am basic socket definitions.

  - The package originally included a varnish-vcl-reload file in the
    files directory. This has been removed because it is, as far as
    I can tell, unused.

  - Rewrite run file. Old one doesn't work at all, no reason to
    preserve it.

  - Add _varnish and _vcache system users for default jail argument in
    run file. These share a system group.
---
 common/shlibs                          |  1 +
 srcpkgs/libvarnishapi                  |  1 +
 srcpkgs/libvarnishapi-devel            |  1 +
 srcpkgs/varnish/INSTALL.msg            |  1 -
 srcpkgs/varnish/files/varnishd/log/run |  2 +
 srcpkgs/varnish/files/varnishd/run     | 20 +++++++
 srcpkgs/varnish/patches/musl.patch     | 22 ++++++++
 srcpkgs/varnish/template               | 75 +++++++++++++++++++++++---
 srcpkgs/varnish/update                 |  1 +
 9 files changed, 117 insertions(+), 7 deletions(-)
 create mode 120000 srcpkgs/libvarnishapi
 create mode 120000 srcpkgs/libvarnishapi-devel
 delete mode 100644 srcpkgs/varnish/INSTALL.msg
 create mode 100755 srcpkgs/varnish/files/varnishd/log/run
 create mode 100755 srcpkgs/varnish/files/varnishd/run
 create mode 100644 srcpkgs/varnish/patches/musl.patch
 create mode 100644 srcpkgs/varnish/update

diff --git a/common/shlibs b/common/shlibs
index e559ff69e92..794f6c55901 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3514,3 +3514,4 @@ libnozzle.so.1 libnozzle1-1.11_2
 libmygpo-qt5.so.1 libmygpo-qt-1.1.0_1
 libluv.so.1 libluv-1.30.1.0_1
 libarmadillo.so.9 armadillo-9.700.2_1
+libvarnishapi.so.2 libvarnishapi-6.3.0_1
diff --git a/srcpkgs/libvarnishapi b/srcpkgs/libvarnishapi
new file mode 120000
index 00000000000..1605f8f84bb
--- /dev/null
+++ b/srcpkgs/libvarnishapi
@@ -0,0 +1 @@
+varnish
\ No newline at end of file
diff --git a/srcpkgs/libvarnishapi-devel b/srcpkgs/libvarnishapi-devel
new file mode 120000
index 00000000000..1605f8f84bb
--- /dev/null
+++ b/srcpkgs/libvarnishapi-devel
@@ -0,0 +1 @@
+varnish
\ No newline at end of file
diff --git a/srcpkgs/varnish/INSTALL.msg b/srcpkgs/varnish/INSTALL.msg
deleted file mode 100644
index 3b1bebb7afb..00000000000
--- a/srcpkgs/varnish/INSTALL.msg
+++ /dev/null
@@ -1 +0,0 @@
-varnish is no longer provided by Void Linux, and will be fully removed from the repos on 2019/04/25
diff --git a/srcpkgs/varnish/files/varnishd/log/run b/srcpkgs/varnish/files/varnishd/log/run
new file mode 100755
index 00000000000..280d955ac11
--- /dev/null
+++ b/srcpkgs/varnish/files/varnishd/log/run
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec logger -t varnishd -p daemon.info
diff --git a/srcpkgs/varnish/files/varnishd/run b/srcpkgs/varnish/files/varnishd/run
new file mode 100755
index 00000000000..1f480573394
--- /dev/null
+++ b/srcpkgs/varnish/files/varnishd/run
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+# Default options
+VARNISH_ADDR=0.0.0.0:80
+VARNISH_MGMT_ADDR=localhost:6082
+VARNISH_CONFIG=/etc/varnish/default.vcl
+VARNISH_STORAGE=malloc,64M
+VARNISH_JAIL=unix,user=_varnish,workuser=_vcache
+VARNISH_OPTIONS=
+
+[ -r ./conf ] && . ./conf
+
+exec varnishd \
+  -F \
+  ${VARNISH_ADDR:+-a "$VARNISH_ADDR"} \
+  ${VARNISH_CONFIG:+-f "$VARNISH_CONFIG"} \
+  ${VARNISH_ADDR:+-T "$VARNISH_MGMT_ADDR"} \
+  ${VARNISH_STORAGE:+-s "$VARNISH_STORAGE"} \
+  ${VARNISH_JAIL:+-j "$VARNISH_JAIL"} \
+  ${VARNISH_OPTIONS}
diff --git a/srcpkgs/varnish/patches/musl.patch b/srcpkgs/varnish/patches/musl.patch
new file mode 100644
index 00000000000..a417c319043
--- /dev/null
+++ b/srcpkgs/varnish/patches/musl.patch
@@ -0,0 +1,22 @@
+--- include/vpf.h	2016-03-03 14:40:01.000000000 +0100
++++ include/vpf.h	2018-01-11 11:45:26.521900821 +0100
+@@ -30,6 +30,8 @@
+ #ifndef VPF_H_INCLUDED
+ #define VPF_H_INCLUDED
+ 
++#include <sys/types.h>
++
+ struct vpf_fh;
+ 
+ struct vpf_fh *VPF_Open(const char *path, mode_t mode, pid_t *pidptr);
+--- include/vsb.h	2017-11-14 14:39:22.000000000 +0100
++++ include/vsb.h	2018-01-11 11:48:15.505912873 +0100
+@@ -31,6 +31,8 @@
+ #ifndef VSB_H_INCLUDED
+ #define VSB_H_INCLUDED
+ 
++#include <sys/types.h>
++
+ /*
+  * Structure definition
+  */
diff --git a/srcpkgs/varnish/template b/srcpkgs/varnish/template
index 0dc852ece20..4b31ecd3864 100644
--- a/srcpkgs/varnish/template
+++ b/srcpkgs/varnish/template
@@ -1,9 +1,72 @@
 # Template file for 'varnish'
 pkgname=varnish
-version=6.1.1
-revision=3
-archs=noarch
-build_style=meta
-short_desc="A fast caching HTTP reverse proxy (removed package)"
-license="metapackage"
+version=6.3.0
+revision=1
+build_style=gnu-configure
+configure_args="--cache-file=config.void --disable-static $(vopt_enable pcrejit pcre-jit)"
+hostmakedepends="pkg-config python3 python3-docutils python3-Sphinx"
+makedepends="pcre-devel readline-devel"
+short_desc="Fast caching HTTP reverse proxy"
+maintainer="Noel Cower <ncower@gmail.com>"
+license="BSD-2-Clause"
 homepage="https://varnish-cache.org/"
+distfiles="https://varnish-cache.org/_downloads/${pkgname}-${version}.tgz"
+checksum=95ccdec5f1dcba8b41d24e685b3f2379fbc6b9701d106cc78011d4d09a73947f
+lib32disabled=yes
+
+build_options="pcrejit"
+
+conf_files="/etc/varnish/default.vcl"
+make_dirs="/var/lib/varnish 0750 _varnish _varnish
+ /var/log/varnish 0750 _varnish _varnish"
+
+system_accounts="_varnish _vcache"
+_varnish_homedir="/var/lib/varnish"
+_vcache_pgroup="_varnish"
+
+if [ yes = "$(vopt_if pcrejit yes)" ]; then
+	# Don't permit nocross if pcrejit is set.
+	nocross="Cannot run test program when cross compiling (PCRE_JIT)"
+elif [ "${XBPS_MACHINE%-musl}" != "${XBPS_TARGET_MACHINE%-musl}" ]; then
+	# Mark builds with different architectures as nocross.
+	nocross="Host and target architectures must be the same to run the program during build"
+fi
+
+case "$XBPS_TARGET_MACHINE" in
+	*-musl)
+		configure_args+=" --without-jemalloc"
+		makedepends+=" libexecinfo-devel"
+		;;
+	*)
+		makedepends+=" jemalloc-devel"
+		;;
+esac
+
+pre_configure() {
+	# Pre-cache some attributes that can't be determined in cross-compilation.
+	echo ac_cv_have_tcp_keep=yes >config.void
+	echo ac_cv_have_tcp_fastopen=yes >>config.void
+}
+
+post_install() {
+	vinstall etc/example.vcl 644 etc/varnish default.vcl
+	vsv varnishd
+	vlicense LICENSE
+}
+
+libvarnishapi_package() {
+	short_desc+=" - API runtime library"
+	pkg_install() {
+		vmove "usr/lib/*.so.*"
+	}
+}
+libvarnishapi-devel_package() {
+	depends="libvarnishapi>=${version}_${revision}"
+	short_desc+=" - API development files"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/lib/pkgconfig
+		vmove "usr/lib/*.so"
+		vmove usr/share/man/man3
+	}
+}
diff --git a/srcpkgs/varnish/update b/srcpkgs/varnish/update
new file mode 100644
index 00000000000..30fbc3a065b
--- /dev/null
+++ b/srcpkgs/varnish/update
@@ -0,0 +1 @@
+site="https://varnish-cache.org/releases/index.html"

             reply	other threads:[~2019-10-02  4:29 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-02  4:29 voidlinux-github [this message]
2019-10-02  4:32 ` [PR PATCH] [Updated] " voidlinux-github
2019-10-02  4:32 ` voidlinux-github
2019-10-02  4:33 ` voidlinux-github
2019-10-02  4:33 ` voidlinux-github
2019-10-04  8:22 ` [PR PATCH] [Merged]: " voidlinux-github

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-14940@inbox.vuxu.org \
    --to=voidlinux-github@inbox.vuxu.org \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).