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: Sun, 12 May 2024 22:05:50 +0000 (UTC)	[thread overview]
Message-ID: <1715551335.59689314fcd8fc268ccdf0100eddb283a02cc76b.zmedico@gentoo> (raw)

commit:     59689314fcd8fc268ccdf0100eddb283a02cc76b
Author:     Rahil Bhimjiani <me <AT> rahil <DOT> rocks>
AuthorDate: Sat May  4 09:06:34 2024 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sun May 12 22:02:15 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=59689314

www-servers/caddy: add 2.8.0_beta2, guide on deps tar creation

Changes:
* Support versions including beta
* Instead of `mv`ing vendor dir do symlink.
* use aesterisks instead of hardcoding dir name at various
places (dist dir)

Instructions for creating deps tarball:
1. git init, git add ./
2. `go get` ALL the modules
3. import ALL modules in cmd/caddy/main.go
4. git diff > go-mod-sum.patch
5. go mod vendor -v
6. tar -c vendor/ go-mod-sum.patch

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

 www-servers/caddy/Manifest                           |  3 +++
 .../{caddy-9999.ebuild => caddy-2.8.0_beta2.ebuild}  | 20 +++++++++++---------
 www-servers/caddy/caddy-9999.ebuild                  | 20 +++++++++++---------
 3 files changed, 25 insertions(+), 18 deletions(-)

diff --git a/www-servers/caddy/Manifest b/www-servers/caddy/Manifest
index 73920dd08a5d..631af198827c 100644
--- a/www-servers/caddy/Manifest
+++ b/www-servers/caddy/Manifest
@@ -2,3 +2,6 @@ DIST caddy-2.7.6-docs.tar.gz 24583 BLAKE2B d3dbbb701d86cbfaf538f10911fdd3613b8c3
 DIST caddy-2.7.6-r1-deps.tar.xz 129331604 BLAKE2B 50b83c012c70637936c83ec765758cdcd80014ca224d76a746de8640a6b36ae15ce11ec57d9fdb20a5f7b3add946209c6dde7bb4e4bd4a47ffe3ffc8971725db SHA512 a4bc56de4f7ec8e9967dde3d7ca4cbb74cba9ce0b8906ffe16f8dae3f52fff1164827942df8154eadbae80cce3ee603535b9135cf8a5126d84a9017e8aece078
 DIST caddy-2.7.6-r2-deps.tar.xz 8511804 BLAKE2B ad3c78ee483474754ad83284fabf249c376423217c2929740cd171446d0e755f121e380130c80f291422d39ca69ea7e6ac52f5ce5cdec740616099b665cef5af SHA512 c48d299d9a0b27ebe467f64dc433625de26293674d8153122ad6798a6b95ed4fe55f764a18d3e9211a8e2f966724d20996f1789e2e84dbb0181cfcf5340303fb
 DIST caddy-2.7.6.tar.gz 606077 BLAKE2B 1237edc164ec6095c9dff27c332925c4ce9d91a60e629770463bbffb1503b8b11e36033e852df3eb5bb69ffa448833b6ee2891dc0ba6dc9b43b6cce27d492179 SHA512 ef0cb6fd7f6f2a296290b4bb520300e043ad31cc612e734632ffa25cdaa23fd7d601ac4ceaa1c76285d54a07ee773360f795103ef3c2ec79516a4f18a5e844b5
+DIST caddy-2.8.0_beta2-deps.tar.xz 9983432 BLAKE2B 5ce369219b03688a18f01d7e0f14158a4831bdb02f90c9d4cd2554c8a516f8575155473134197c58c6b65b8752b2fc6a2cdf56b4eaacde20a01233c3f5b1dd38 SHA512 e4fd9432adb4cc98b1f765d5b7f3920030fc433e838a5b7f388f8ba220fe0f23e0c0ce5da01507e3241d03f3e7f010a49dde6ba49402f363fb005bb879c2c1a6
+DIST caddy-2.8.0_beta2-docs.tar.gz 24678 BLAKE2B 5e03bada381b63a4549715c25f651e51eed81fc97d9e89cadb1128db55ba8344335590b10ac57a70395f7b57aa8ece93c5a8c2b6f4dd8e199f703bbed2147631 SHA512 d185e77d8020e7afd05a8dd7798fc29a9688268088129be8f813768f2fdd19abbd9e14440d80445c16844976f0740f5aa377ffc8084263c337d313c03adf7556
+DIST caddy-2.8.0_beta2.tar.gz 656863 BLAKE2B 6d1364798629949611c8cc5094e0f91928c9a50fc7de2a084b85402cce07e553d9da2652f1fa55daac8c94c877beb08de7226b7f3befd57367b901e593be1d2c SHA512 64c3f6fb4e32947ff55307f71b416aeb8610d8fd3273514c59c6ebcf323a3552ceea0e3f6281ba4a879d24f1fa02d232e6f634e53fa9edebbce76f78c174032d

diff --git a/www-servers/caddy/caddy-9999.ebuild b/www-servers/caddy/caddy-2.8.0_beta2.ebuild
similarity index 84%
copy from www-servers/caddy/caddy-9999.ebuild
copy to www-servers/caddy/caddy-2.8.0_beta2.ebuild
index 86a00c5d6ef9..c66b0a78cfe2 100644
--- a/www-servers/caddy/caddy-9999.ebuild
+++ b/www-servers/caddy/caddy-2.8.0_beta2.ebuild
@@ -13,13 +13,15 @@ if [[ "${PV}" == 9999* ]]; then
 	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/caddyserver/caddy/archive/v${PV/_beta/-beta.}.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
+		https://github.com/caddyserver/dist/archive/refs/tags/v${PV/_beta/-beta.}.tar.gz -> ${P}-docs.tar.gz
 "
-	KEYWORDS="~amd64 ~arm64 ~loong ~riscv"
+	[[ ${PV} != *beta* ]] && \
+		KEYWORDS="~amd64 ~arm64 ~loong ~riscv"
 fi
 
+S="${WORKDIR}/${PN}-${PV/_beta/-beta.}"
 # MAIN
 LICENSE="Apache-2.0"
 # deps
@@ -81,10 +83,10 @@ src_unpack() {
 
 src_prepare() {
 	default
-	sed -i -e "s|User=caddy|User=http|g;s|Group=caddy|Group=http|g;" ../dist-"${PV}"/init/*service || die
+	sed -i -e "s|User=caddy|User=http|g;s|Group=caddy|Group=http|g;" ../dist-*/init/*service || die
 
 	if [[ "${PV}" != 9999* ]]; then
-		mv ../vendor ./ || die
+		ln -sv ../vendor ./ || die
 		eapply ../go-mod-sum.patch
 
 		for moo in ${MY_MODULES}; do
@@ -114,18 +116,18 @@ src_install() {
 
 	dobin "${PN}"
 	insinto /etc/"${PN}"
-	doins ../dist-"${PV}"/config/Caddyfile
-	systemd_dounit ../dist-"${PV}"/init/*.service
+	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-"${PV}"/welcome/index.html
+	doins ../dist-*/welcome/index.html
 
 	newbashcomp completion.bash "${PN}"
 	newfishcomp completion.fish "${PN}".fish
 	newzshcomp completion.zsh _"${PN}"
-	newdoc ../dist-"${PV}"/init/README.md systemd-services-README.md
+	newdoc ../dist-*/init/README.md systemd-services-README.md
 	doman manpages/*
 }

diff --git a/www-servers/caddy/caddy-9999.ebuild b/www-servers/caddy/caddy-9999.ebuild
index 86a00c5d6ef9..c66b0a78cfe2 100644
--- a/www-servers/caddy/caddy-9999.ebuild
+++ b/www-servers/caddy/caddy-9999.ebuild
@@ -13,13 +13,15 @@ if [[ "${PV}" == 9999* ]]; then
 	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/caddyserver/caddy/archive/v${PV/_beta/-beta.}.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
+		https://github.com/caddyserver/dist/archive/refs/tags/v${PV/_beta/-beta.}.tar.gz -> ${P}-docs.tar.gz
 "
-	KEYWORDS="~amd64 ~arm64 ~loong ~riscv"
+	[[ ${PV} != *beta* ]] && \
+		KEYWORDS="~amd64 ~arm64 ~loong ~riscv"
 fi
 
+S="${WORKDIR}/${PN}-${PV/_beta/-beta.}"
 # MAIN
 LICENSE="Apache-2.0"
 # deps
@@ -81,10 +83,10 @@ src_unpack() {
 
 src_prepare() {
 	default
-	sed -i -e "s|User=caddy|User=http|g;s|Group=caddy|Group=http|g;" ../dist-"${PV}"/init/*service || die
+	sed -i -e "s|User=caddy|User=http|g;s|Group=caddy|Group=http|g;" ../dist-*/init/*service || die
 
 	if [[ "${PV}" != 9999* ]]; then
-		mv ../vendor ./ || die
+		ln -sv ../vendor ./ || die
 		eapply ../go-mod-sum.patch
 
 		for moo in ${MY_MODULES}; do
@@ -114,18 +116,18 @@ src_install() {
 
 	dobin "${PN}"
 	insinto /etc/"${PN}"
-	doins ../dist-"${PV}"/config/Caddyfile
-	systemd_dounit ../dist-"${PV}"/init/*.service
+	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-"${PV}"/welcome/index.html
+	doins ../dist-*/welcome/index.html
 
 	newbashcomp completion.bash "${PN}"
 	newfishcomp completion.fish "${PN}".fish
 	newzshcomp completion.zsh _"${PN}"
-	newdoc ../dist-"${PV}"/init/README.md systemd-services-README.md
+	newdoc ../dist-*/init/README.md systemd-services-README.md
 	doman manpages/*
 }


             reply	other threads:[~2024-05-12 22:05 UTC|newest]

Thread overview: 77+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-12 22:05 Zac Medico [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-01-01  1:47 [gentoo-commits] repo/gentoo:master commit in: www-servers/caddy/ 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-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=1715551335.59689314fcd8fc268ccdf0100eddb283a02cc76b.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