public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Zac Medico" <zmedico@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: www-servers/caddy/
Date: Sat, 15 Mar 2025 00:31:28 +0000 (UTC)	[thread overview]
Message-ID: <1741998447.56c19a17f2eb5d986acf6d51de9f8bb0aee307fa.zmedico@gentoo> (raw)

commit:     56c19a17f2eb5d986acf6d51de9f8bb0aee307fa
Author:     Rahil Bhimjiani <me <AT> rahil <DOT> rocks>
AuthorDate: Fri Mar 14 18:28:05 2025 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sat Mar 15 00:27:27 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=56c19a17

www-servers/caddy: update to 2.9.1

Signed-off-by: Rahil Bhimjiani <me <AT> rahil.rocks>
From: https://github.com/gentoo/gentoo/pull/41080
Signed-off-by: Zac Medico <zmedico <AT> gentoo.org>

 www-servers/caddy/Manifest           |   3 +
 www-servers/caddy/caddy-2.9.1.ebuild | 127 +++++++++++++++++++++++++++++++++++
 2 files changed, 130 insertions(+)

diff --git a/www-servers/caddy/Manifest b/www-servers/caddy/Manifest
index 6b66de814525..6b62b0e0a6ba 100644
--- a/www-servers/caddy/Manifest
+++ b/www-servers/caddy/Manifest
@@ -7,3 +7,6 @@ DIST caddy-2.8.4.tar.gz 662064 BLAKE2B 77aa671c22e55dff6bab3d251fa9f0a082e41176b
 DIST caddy-2.9.0-deps.tar.xz 10147016 BLAKE2B 3f33fa41cea04e47ef30f3eba5de7b88731154e1598fd37bc55cb63905a98c2c3ee1119a7b386b2c9f278465484c6d4d00dd8bc90962d472fe0acd559f8675fa SHA512 74124dcb80f87eff1d6834569ac3e8428d55b99044f6cac043f6e997e3b2de1e31089ab712c1b2f4fb0d64b6732291dd30316bfc92c6b9000bd2cda39b4d0a90
 DIST caddy-2.9.0-docs.tar.gz 24713 BLAKE2B c022672d818bf56160a561c307bc2526f0e0c6cc920286a744fc800273c9240e2852955c8c7035edad7591a168a177bf5c15822bbaee8704c4c3ca44bc44314d SHA512 f6f8a8d465373b4b2672bdf5a8124d3cedc90c8eea933f1494e6e6eab85ee788320a04c6ca7ccedac0ecbb8a335e0e179a8dd4ba07aeca685f297e525d21c368
 DIST caddy-2.9.0.tar.gz 700749 BLAKE2B 299e5bcda972af0b50d51c135a844221222fef91a1b38d9fda70113087f3587253c8c1d6efda1895a1b64a42444b4d95cd4a80822bc9af7979b55b93b3e6a492 SHA512 e2e7f38d11a69159ef347acb93779a35778267440d55a80b90da75739aabc95ee385fb9256eb79e25326d5e16cf831746d98dc03ccfe97e11d8d52f521154a68
+DIST caddy-2.9.1-deps.tar.xz 10115764 BLAKE2B a5dbfe050f1e71dd40feea375f93ef94a31bd75dd6605e460265351719130be04e3883523e550256fe03dd976dbf117292b5f9f44ce8c70030c0f9def423ebb2 SHA512 5a794d5afff72eed255badfcb4043e4714a47ed44ad724d16cf6d3f5b73015700951cf67c3f4d7916a44553ad3c0e629d0f257fe6132dcfd8f882c914a04b1af
+DIST caddy-2.9.1-docs.tar.gz 24734 BLAKE2B 5c9dd78cd43cd2960f477f1fa89b8a6c4fc4e3d2c1b656051bde06afed8bebf5d1768fff77aab9fd8d5260044159e09e70474dd678cff245632fa7e14dcf05a0 SHA512 91efb7b10f68ab5e6bbfd2789a6f79c325d20692cb84a7651cce0487c97cd7699929e351ca78922ad34716958ebbf9b237e97465abdb263592745f4529cb4909
+DIST caddy-2.9.1.tar.gz 701830 BLAKE2B cb36a2dae6f5944ebe44e4233e1e558389394c2176725c8f771d98a69c81de523fa04aed504a9ab7ae97fea4dce7c774d62b799a255a2af658d8677e8c079471 SHA512 2ed36bfe8de3a2c7270e202b2d9ab4c3c78174fcd09c02e38d61d1bd57afa6471a2a690f15edcf91f2bfb105dbf2b0c2186d0c5e6f20ec169e98c66f8f71d0f8

diff --git a/www-servers/caddy/caddy-2.9.1.ebuild b/www-servers/caddy/caddy-2.9.1.ebuild
new file mode 100644
index 000000000000..15958c6dfe2c
--- /dev/null
+++ b/www-servers/caddy/caddy-2.9.1.ebuild
@@ -0,0 +1,127 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit fcaps go-module systemd shell-completion
+
+DESCRIPTION="Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS"
+HOMEPAGE="https://caddyserver.com"
+
+if [[ "${PV}" == 9999* ]]; then
+	inherit git-r3
+	EGIT_REPO_URI="https://github.com/caddyserver/caddy.git"
+else
+	SRC_URI="
+		https://github.com/caddyserver/caddy/archive/v${PV}.tar.gz -> ${P}.tar.gz
+		https://github.com/rahilarious/gentoo-distfiles/releases/download/${P}/deps.tar.xz -> ${P}-deps.tar.xz
+		https://github.com/caddyserver/dist/archive/refs/tags/v${PV}.tar.gz -> ${P}-docs.tar.gz
+"
+	KEYWORDS="~amd64 ~arm64 ~loong ~riscv"
+fi
+
+# MAIN
+LICENSE="Apache-2.0"
+# deps
+LICENSE+=" BSD ECL-2.0 MIT CC0-1.0"
+SLOT="0"
+
+IUSE='events-handlers-exec security'
+RESTRICT="test"
+
+RDEPEND="
+	acct-user/http
+	acct-group/http"
+DEPEND="${RDEPEND}"
+
+FILECAPS=(
+	-m 755 'cap_net_bind_service=+ep' usr/bin/"${PN}"
+)
+
+# takes a module as an only arg
+add_custom_module() {
+	local LINE_NO=$(grep -n 'plug in Caddy modules here' cmd/caddy/main.go | awk -F: '{print $1;}' || die)
+	sed -i -e "${LINE_NO:?}a \        _ \"$1\"" cmd/caddy/main.go || die
+}
+
+src_unpack() {
+	declare -A MOOMODULES || die
+
+	use events-handlers-exec && { MOOMODULES[exec]="github.com/mholt/caddy-events-exec" || die ; }
+	use security && { MOOMODULES[sec]="github.com/greenpau/caddy-security" || die ; }
+
+	export MY_MODULES="${MOOMODULES[@]}" || die
+
+	if [[ "${PV}" == 9999* ]]; then
+		# clone main git repo
+		git-r3_src_unpack
+
+		# get extra modules
+		pushd "${P}" || die
+		for moo in ${MY_MODULES}; do
+			add_custom_module "${moo}"
+			ego get "${moo}"
+		done
+		popd || die
+
+		# clone dist repo (docs and misc)
+		EGIT_REPO_URI="https://github.com/caddyserver/dist.git"
+		EGIT_CHECKOUT_DIR="${WORKDIR}/dist-${PV}"
+		git-r3_src_unpack
+
+		go-module_live_vendor
+	else
+		default
+	fi
+}
+
+src_prepare() {
+	default
+	sed -i -e "s|User=caddy|User=http|g;s|Group=caddy|Group=http|g;" ../dist-*/init/*service || die
+
+	if [[ "${PV}" != 9999* ]]; then
+		ln -sv ../vendor ./ || die
+		eapply ../go-mod-sum.patch
+
+		for moo in ${MY_MODULES}; do
+			add_custom_module "${moo}"
+		done
+	fi
+}
+
+src_compile() {
+	# https://github.com/caddyserver/caddy/blob/master/caddy.go#L843
+	if [[ ${PV} == 9999* ]]; then
+		local CUSTOM_VER="git-$(git rev-parse --short HEAD)"
+	else
+		local CUSTOM_VER="${PV}"
+	fi
+
+	ego build -ldflags "-X github.com/caddyserver/caddy/v2.CustomVersion=${CUSTOM_VER}" ./cmd/caddy
+	local sh
+	for sh in bash fish zsh; do
+		./caddy completion "${sh}" > completion."${sh}" || die
+	done
+	./caddy manpage -o manpages || die
+}
+
+src_install() {
+	default
+
+	dobin "${PN}"
+	insinto /etc/"${PN}"
+	doins ../dist-*/config/Caddyfile
+	systemd_dounit ../dist-*/init/*.service
+	newinitd "${FILESDIR}"/initd-2.7.5 "${PN}"
+	newconfd "${FILESDIR}"/confd-2.7.5 "${PN}"
+	insinto /etc/logrotate.d
+	newins "${FILESDIR}/logrotated" "${PN}"
+	insinto /usr/share/"${PN}"
+	doins ../dist-*/welcome/index.html
+
+	newbashcomp completion.bash "${PN}"
+	newfishcomp completion.fish "${PN}".fish
+	newzshcomp completion.zsh _"${PN}"
+	newdoc ../dist-*/init/README.md systemd-services-README.md
+	doman manpages/*
+}


             reply	other threads:[~2025-03-15  0:31 UTC|newest]

Thread overview: 81+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-15  0:31 Zac Medico [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-03-15  7:40 [gentoo-commits] repo/gentoo:master commit in: www-servers/caddy/ Sam James
2025-03-15  7:40 Sam James
2025-03-15  0:31 Zac Medico
2025-01-01  1:47 Zac Medico
2024-06-29  3:15 Zac Medico
2024-06-29  3:15 Zac Medico
2024-06-29  3:15 Zac Medico
2024-06-16 23:07 Zac Medico
2024-05-13 12:37 Arthur Zamarin
2024-05-12 22:05 Zac Medico
2024-05-12 22:05 Zac Medico
2024-05-11 15:16 Arthur Zamarin
2024-04-14 20:50 Zac Medico
2024-03-16 22:44 Zac Medico
2024-03-16 22:44 Zac Medico
2024-03-15 16:13 Arthur Zamarin
2024-03-15 15:37 Arthur Zamarin
2024-02-09  5:08 Zac Medico
2024-02-09  5:08 Zac Medico
2024-01-12  6:43 Joonas Niilola
2024-01-11 18:32 Sam James
2023-12-10 22:54 Zac Medico
2023-12-10 22:54 Zac Medico
2023-11-24 20:38 Sam James
2023-10-31 17:19 Mike Gilbert
2023-10-30  2:07 Zac Medico
2023-10-30  2:07 Zac Medico
2023-09-29  7:27 WANG Xuerui
2023-09-29  7:27 WANG Xuerui
2023-09-25  4:08 Zac Medico
2023-09-08 14:10 William Hubbs
2023-09-07 20:31 William Hubbs
2023-04-30 23:50 Sam James
2023-02-21  0:28 Zac Medico
2022-10-14  1:21 Zac Medico
2022-09-15  4:20 Zac Medico
2022-07-23  0:54 Zac Medico
2022-07-23  0:54 Zac Medico
2022-07-15 17:43 Zac Medico
2022-06-03  2:09 Zac Medico
2022-06-03  2:09 Zac Medico
2022-05-15 22:07 Zac Medico
2022-05-15 22:07 Zac Medico
2022-05-12  0:02 William Hubbs
2022-05-08 16:37 Zac Medico
2022-05-07 16:44 Zac Medico
2022-05-07 16:36 Zac Medico
2022-03-18  4:40 Zac Medico
2022-03-18  4:23 Zac Medico
2021-11-08 22:32 Zac Medico
2021-10-20  3:02 Zac Medico
2021-09-01 16:42 William Hubbs
2021-06-14 17:30 Zac Medico
2021-06-14 17:21 Zac Medico
2021-04-05 16:55 Zac Medico
2021-04-04 10:26 Zac Medico
2021-04-04 10:25 Zac Medico
2021-04-04 10:21 Zac Medico
2021-01-18  9:28 Joonas Niilola
2020-10-26 13:16 Joonas Niilola
2020-07-12 18:58 William Hubbs
2020-06-22 15:48 William Hubbs
2019-09-11 16:21 Michał Górny
2019-02-07 10:53 Manuel Rüger
2018-08-20 14:54 Manuel Rüger
2018-07-01 16:41 Sebastian Pipping
2018-02-21 14:33 Manuel Rüger
2018-02-21 14:33 Manuel Rüger
2017-10-09 14:07 Manuel Rüger
2017-09-18 11:08 Manuel Rüger
2017-09-14 13:14 Manuel Rüger
2017-09-10 10:49 Manuel Rüger
2017-09-08 22:02 Manuel Rüger
2017-08-12 12:25 Manuel Rüger
2017-08-01 12:31 Manuel Rüger
2017-08-01 12:30 Manuel Rüger
2017-07-19 14:56 Manuel Rüger
2017-05-16 20:34 Manuel Rüger
2017-04-21 15:03 Manuel Rüger
2017-03-13 15:49 Manuel Rüger

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=1741998447.56c19a17f2eb5d986acf6d51de9f8bb0aee307fa.zmedico@gentoo \
    --to=zmedico@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.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