From: voidlinux-github@inbox.vuxu.org
To: ml@inbox.vuxu.org
Subject: [PR PATCH] caddy: several template improvements
Date: Mon, 27 Jan 2020 20:51:31 +0100 [thread overview]
Message-ID: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-18592@inbox.vuxu.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 319 bytes --]
There is a new pull request by steinex against master on the void-packages repository
https://github.com/steinex/void-packages caddy
https://github.com/void-linux/void-packages/pull/18592
caddy: several template improvements
A patch file from https://github.com/void-linux/void-packages/pull/18592.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-caddy-18592.patch --]
[-- Type: text/x-diff, Size: 2981 bytes --]
From 165f6005f1173294cacbdf0c46c6d3d983862e49 Mon Sep 17 00:00:00 2001
From: Frank Steinborn <steinex@nognu.de>
Date: Mon, 27 Jan 2020 20:07:15 +0100
Subject: [PATCH 1/3] caddy: disable telemetry
---
srcpkgs/caddy/template | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/srcpkgs/caddy/template b/srcpkgs/caddy/template
index e68b9f99e3c..bd5ad1f7dde 100644
--- a/srcpkgs/caddy/template
+++ b/srcpkgs/caddy/template
@@ -18,6 +18,10 @@ make_dirs="
/etc/caddy 0700 caddy caddy
/var/lib/caddy 0700 caddy caddy"
+pre_build() {
+ vsed -e 's,var EnableTelemetry = true,var EnableTelemetry = false,g' -i caddy/caddymain/run.go
+}
+
post_install() {
vsv caddy
}
From 813c4780ad69bd421af65171a5c4972c8ecb511a Mon Sep 17 00:00:00 2001
From: Frank Steinborn <steinex@nognu.de>
Date: Mon, 27 Jan 2020 20:23:48 +0100
Subject: [PATCH 2/3] caddy: add conf for run file; handle max open files
correctly
---
srcpkgs/caddy/files/caddy/conf | 1 +
srcpkgs/caddy/files/caddy/run | 6 +++++-
srcpkgs/caddy/template | 3 ++-
3 files changed, 8 insertions(+), 2 deletions(-)
create mode 100644 srcpkgs/caddy/files/caddy/conf
diff --git a/srcpkgs/caddy/files/caddy/conf b/srcpkgs/caddy/files/caddy/conf
new file mode 100644
index 00000000000..c42d26ecb0a
--- /dev/null
+++ b/srcpkgs/caddy/files/caddy/conf
@@ -0,0 +1 @@
+MAX_OPEN_FILES=8192
diff --git a/srcpkgs/caddy/files/caddy/run b/srcpkgs/caddy/files/caddy/run
index 0e23cd4ea6a..2a37e8b8c37 100644
--- a/srcpkgs/caddy/files/caddy/run
+++ b/srcpkgs/caddy/files/caddy/run
@@ -1,4 +1,8 @@
#!/bin/sh
+
+[ -r conf ] && . ./conf
+
export CADDYPATH=/var/lib/caddy
+ulimit -n $MAX_OPEN_FILES
cd /etc/caddy
-exec chpst -o 8192 -u caddy caddy
+exec chpst -u caddy caddy
diff --git a/srcpkgs/caddy/template b/srcpkgs/caddy/template
index bd5ad1f7dde..9ef8756ccdd 100644
--- a/srcpkgs/caddy/template
+++ b/srcpkgs/caddy/template
@@ -1,7 +1,7 @@
# Template file for 'caddy'
pkgname=caddy
version=1.0.4
-revision=1
+revision=2
build_style=go
go_import_path=github.com/caddyserver/caddy
go_package="${go_import_path}/caddy"
@@ -12,6 +12,7 @@ license="Apache-2.0"
homepage="https://caddyserver.com"
distfiles="https://github.com/caddyserver/caddy/archive/v${version}.tar.gz"
checksum=bf81245d2b347c89a8e8aa358a224b722d55cb6e1c266bbdffbe6acc54d130a5
+conf_files="/etc/sv/caddy/conf"
system_accounts="caddy"
make_dirs="
From 4552b0c05c21a8896c70513895917ebe8a0a3b51 Mon Sep 17 00:00:00 2001
From: Frank Steinborn <steinex@nognu.de>
Date: Mon, 27 Jan 2020 20:31:14 +0100
Subject: [PATCH 3/3] caddy: add logger to runit service
---
srcpkgs/caddy/files/caddy/log/run | 2 ++
1 file changed, 2 insertions(+)
create mode 100644 srcpkgs/caddy/files/caddy/log/run
diff --git a/srcpkgs/caddy/files/caddy/log/run b/srcpkgs/caddy/files/caddy/log/run
new file mode 100644
index 00000000000..3facf440712
--- /dev/null
+++ b/srcpkgs/caddy/files/caddy/log/run
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec logger -t caddy -p daemon.notice
next reply other threads:[~2020-01-27 19:51 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-27 19:51 voidlinux-github [this message]
2020-01-29 13:15 ` voidlinux-github
2020-01-29 15:54 ` [PR PATCH] [Updated] " voidlinux-github
2020-01-29 15:55 ` voidlinux-github
2020-01-29 15:58 ` voidlinux-github
2020-01-29 16:00 ` [PR PATCH] [Updated] " voidlinux-github
2020-01-29 16:01 ` voidlinux-github
2020-02-14 15:24 ` [PR PATCH] [Merged]: " xtraeme
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-18592@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).