upgpkg: 2.11.2-1: Upstream release
https://github.com/caddyserver/caddy/releases/tag/v2.11.2 https://github.com/caddyserver/caddy/releases/tag/v2.11.1 Also: - Remove signature verification, upstream signed with SSH key, not supported - Handle version reporting with linker flags instead of patching - Deselect integration tests (with -short) to ensure they pass - Work from $srcdir in package(), most files are copied from there anyways
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
pkgbase = caddy
|
||||
pkgdesc = Fast web server with automatic HTTPS
|
||||
pkgver = 2.10.2
|
||||
pkgver = 2.11.2
|
||||
pkgrel = 1
|
||||
url = https://github.com/caddyserver/caddy
|
||||
arch = x86_64
|
||||
@@ -9,25 +9,24 @@ pkgbase = caddy
|
||||
makedepends = go
|
||||
depends = glibc
|
||||
depends = mailcap
|
||||
options = !lto
|
||||
backup = etc/caddy/Caddyfile
|
||||
source = git+https://github.com/caddyserver/caddy.git#tag=v2.10.2?signed
|
||||
source = caddy-dist::git+https://github.com/caddyserver/dist.git#tag=v2.10.2
|
||||
source = git+https://github.com/caddyserver/caddy.git#tag=v2.11.2
|
||||
source = caddy-dist::git+https://github.com/caddyserver/dist.git#tag=v2.11.2
|
||||
source = caddy.service
|
||||
source = caddy-api.service
|
||||
source = caddy.tmpfiles
|
||||
source = caddy.sysusers
|
||||
source = Caddyfile
|
||||
source = use-data-dir-for-autosave.patch
|
||||
source = override-main-module-version.patch
|
||||
validpgpkeys = 29D0817A67156E4F25DC24782A349DD577D586A5
|
||||
sha512sums = 400f6557f2677aa5e7a9d07a67707bf2fdb70599877715fbf75ce1d63fed0a2e887d08f66254bea9f7f6e3c76e313be2f4c32ea30b1a3ba99cb8f578a5a498b5
|
||||
sha512sums = 7efc04ac67c5c4829a97da54d1e647bb324d227a75aa5cefa0450aa12a28dc39eb91de8b65234f084666dcdc431a0ede9f0b04a8d6df8acc8eae02d53fbd00a9
|
||||
sha512sums = 78b01fa7156cab0df0d5923250a0e85f6e2dddb2b01b9ea66b49d3e17b228954491922fac6339fcc2caa8342168ca138061a9c4eff41a7a5b6a86e7f9ecb885e
|
||||
sha512sums = 164037ea69ef02e9fdc55af3760849500fd90aa6d23ca29d55cc29c758041bef7e7cf89b23c7e0870bfbd2ecbb576fa9adf33c7c45bcabe68d15be4d6fc49145
|
||||
sha512sums = 05965d0ac5ac3eb9e9de5b1c3c95ca30ee982cae806fffc099463b5634f2eb5f52f6ae020a28c53da6556fa3a2b599dce0d0da5b00ee49a685c432f9a2e57f6a
|
||||
sha512sums = fe9a2badd9d385aed0f5e625d99eaf4fa67862e076c4fd7b28a26984aaaae7310887759d3a4a97a128fffb7dc4b266717d902b234e19643b0c2d818849d165e3
|
||||
sha512sums = e6cdf5f81af01d0a6290ef9503d0bd90244684a6305e5638f079c234b2bc6454688daea3ea9d1b6a6f00eeba0375e9c4372e64c5cb49b5d1206384d2a7201273
|
||||
sha512sums = 6c9d5dce22f1f0f4e222d4adeccd93c486b3be2ac221a7f8a58933b22ce91fe3da8ad38e6db7212846e4ab6336ebc058df16215a43636b965dfed469b3aaa2f6
|
||||
sha512sums = 55ee8d3f8b14f9adddc7a1026addcea4f85b4bae4cd512fd4da2a5e8adaae4b6fd0f486d2e3847f75518f4710a897b4fca84e48ee15700b968bad762125c4742
|
||||
sha512sums = c893d88fec89e37da6596030c8dce7103e7e575371e8542a24d2a0741e877358d85219f2d8ade9d6aa0f515efe1156a4badd9fef5f65f553a5b0c72330c4728f
|
||||
sha512sums = 4be1ed23e6600d8072c7f4fabd2bd926708502a55d84ae4f62aff9885c7b8e45ad0554503d0fc796338577adfca9e467c468a82ba56ffd69e4ec2778d69bc198
|
||||
sha512sums = 563d6b45e91fc584fb5a27caaa382f59c140cb0a1b28b8d8faced4f7c7cad86d8671eb6ac10056f41518a842c8f606130d7e0c71df2b731d5eb0b4c868ea5d41
|
||||
sha512sums = 0fedec714604566fb0da995cdfb2dd2cb8f3995bfa1d6c2e9a38ddd1da11634c3e37f2da381f715df4fc9ebd9653c3aa4806de47ae5094ea1fc19b7f5b795a30
|
||||
|
||||
pkgname = caddy
|
||||
|
||||
@@ -8,11 +8,11 @@
|
||||
# Contributor: Akshay S Dinesh <asdofindia at gmail dot com>
|
||||
|
||||
pkgname=caddy
|
||||
pkgver=2.10.2
|
||||
pkgver=2.11.2
|
||||
pkgrel=1
|
||||
pkgdesc='Fast web server with automatic HTTPS'
|
||||
url='https://github.com/caddyserver/caddy'
|
||||
arch=(x86_64)
|
||||
url='https://github.com/caddyserver/caddy'
|
||||
license=(Apache-2.0)
|
||||
depends=(
|
||||
glibc
|
||||
@@ -22,12 +22,10 @@ makedepends=(
|
||||
git
|
||||
go
|
||||
)
|
||||
backup=(
|
||||
etc/caddy/Caddyfile
|
||||
)
|
||||
backup=(etc/caddy/Caddyfile)
|
||||
options=(!lto)
|
||||
source=(
|
||||
"git+https://github.com/caddyserver/caddy.git#tag=v${pkgver}?signed"
|
||||
"git+https://github.com/caddyserver/caddy.git#tag=v${pkgver}"
|
||||
"caddy-dist::git+https://github.com/caddyserver/dist.git#tag=v${pkgver}"
|
||||
caddy.service
|
||||
caddy-api.service
|
||||
@@ -35,52 +33,55 @@ source=(
|
||||
caddy.sysusers
|
||||
Caddyfile
|
||||
use-data-dir-for-autosave.patch
|
||||
override-main-module-version.patch
|
||||
)
|
||||
sha512sums=('400f6557f2677aa5e7a9d07a67707bf2fdb70599877715fbf75ce1d63fed0a2e887d08f66254bea9f7f6e3c76e313be2f4c32ea30b1a3ba99cb8f578a5a498b5'
|
||||
'7efc04ac67c5c4829a97da54d1e647bb324d227a75aa5cefa0450aa12a28dc39eb91de8b65234f084666dcdc431a0ede9f0b04a8d6df8acc8eae02d53fbd00a9'
|
||||
'78b01fa7156cab0df0d5923250a0e85f6e2dddb2b01b9ea66b49d3e17b228954491922fac6339fcc2caa8342168ca138061a9c4eff41a7a5b6a86e7f9ecb885e'
|
||||
'164037ea69ef02e9fdc55af3760849500fd90aa6d23ca29d55cc29c758041bef7e7cf89b23c7e0870bfbd2ecbb576fa9adf33c7c45bcabe68d15be4d6fc49145'
|
||||
sha512sums=('05965d0ac5ac3eb9e9de5b1c3c95ca30ee982cae806fffc099463b5634f2eb5f52f6ae020a28c53da6556fa3a2b599dce0d0da5b00ee49a685c432f9a2e57f6a'
|
||||
'fe9a2badd9d385aed0f5e625d99eaf4fa67862e076c4fd7b28a26984aaaae7310887759d3a4a97a128fffb7dc4b266717d902b234e19643b0c2d818849d165e3'
|
||||
'e6cdf5f81af01d0a6290ef9503d0bd90244684a6305e5638f079c234b2bc6454688daea3ea9d1b6a6f00eeba0375e9c4372e64c5cb49b5d1206384d2a7201273'
|
||||
'6c9d5dce22f1f0f4e222d4adeccd93c486b3be2ac221a7f8a58933b22ce91fe3da8ad38e6db7212846e4ab6336ebc058df16215a43636b965dfed469b3aaa2f6'
|
||||
'55ee8d3f8b14f9adddc7a1026addcea4f85b4bae4cd512fd4da2a5e8adaae4b6fd0f486d2e3847f75518f4710a897b4fca84e48ee15700b968bad762125c4742'
|
||||
'c893d88fec89e37da6596030c8dce7103e7e575371e8542a24d2a0741e877358d85219f2d8ade9d6aa0f515efe1156a4badd9fef5f65f553a5b0c72330c4728f'
|
||||
'4be1ed23e6600d8072c7f4fabd2bd926708502a55d84ae4f62aff9885c7b8e45ad0554503d0fc796338577adfca9e467c468a82ba56ffd69e4ec2778d69bc198'
|
||||
'563d6b45e91fc584fb5a27caaa382f59c140cb0a1b28b8d8faced4f7c7cad86d8671eb6ac10056f41518a842c8f606130d7e0c71df2b731d5eb0b4c868ea5d41'
|
||||
'0fedec714604566fb0da995cdfb2dd2cb8f3995bfa1d6c2e9a38ddd1da11634c3e37f2da381f715df4fc9ebd9653c3aa4806de47ae5094ea1fc19b7f5b795a30')
|
||||
'563d6b45e91fc584fb5a27caaa382f59c140cb0a1b28b8d8faced4f7c7cad86d8671eb6ac10056f41518a842c8f606130d7e0c71df2b731d5eb0b4c868ea5d41')
|
||||
validpgpkeys=(
|
||||
29D0817A67156E4F25DC24782A349DD577D586A5 # Matthew Holt <mholt@users.noreply.github.com>
|
||||
)
|
||||
|
||||
prepare() {
|
||||
cd "${pkgname}"
|
||||
# welcome page
|
||||
cp ../caddy-dist/welcome/index.html .
|
||||
sed 's|/var/www/html|/srv/http|g' -i index.html
|
||||
sed 's|/var/www/html|/srv/http|g' -i caddy-dist/welcome/index.html
|
||||
|
||||
cd ${pkgname}
|
||||
# do not write in /etc
|
||||
patch -Np1 < "${srcdir}/use-data-dir-for-autosave.patch"
|
||||
# fix version identifier if not built from a module
|
||||
patch -Np1 < "${srcdir}/override-main-module-version.patch"
|
||||
sed 's|"unknown"|"v'"${pkgver}"'"|g' -i caddy.go
|
||||
|
||||
GOFLAGS="-mod=readonly" go mod vendor -v
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "${pkgname}/cmd/caddy/"
|
||||
export CGO_LDFLAGS="${LDFLAGS}"
|
||||
export CGO_CPPFLAGS="${CPPFLAGS}"
|
||||
export CGO_CFLAGS="${CFLAGS}"
|
||||
export CGO_CXXFLAGS="${CXXFLAGS}"
|
||||
export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw"
|
||||
go build .
|
||||
cd ${pkgname}
|
||||
export CGO_LDFLAGS=${LDFLAGS}
|
||||
export CGO_CPPFLAGS=${CPPFLAGS}
|
||||
export CGO_CFLAGS=${CFLAGS}
|
||||
export CGO_CXXFLAGS=${CXXFLAGS}
|
||||
export GOFLAGS="-buildmode=pie -mod=vendor -modcacherw -buildvcs=false"
|
||||
export GOPATH="$srcdir"
|
||||
|
||||
local ld_flags=" \
|
||||
-X github.com/caddyserver/caddy/v2.CustomVersion=v${pkgver} \
|
||||
-compressdwarf=false \
|
||||
-linkmode=external \
|
||||
"
|
||||
go build -v -ldflags "$ld_flags" -o build/caddy ./cmd/caddy
|
||||
|
||||
for i in zsh bash fish; do
|
||||
./caddy completion $i >caddy.$i
|
||||
./build/caddy completion $i > caddy.$i
|
||||
done
|
||||
}
|
||||
|
||||
check() {
|
||||
# Disabled for now, because of failing tests
|
||||
cd "${pkgname}"
|
||||
go test ./...
|
||||
version=$(./cmd/caddy/caddy version)
|
||||
cd ${pkgname}
|
||||
go test -short ./...
|
||||
version=$(./build/caddy version)
|
||||
echo "Caddy version: ${version}"
|
||||
if [[ $version != v$pkgver ]]; then
|
||||
exit 1
|
||||
@@ -88,21 +89,20 @@ check() {
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "${pkgname}"
|
||||
install -Dm 755 cmd/caddy/caddy -t "${pkgdir}/usr/bin"
|
||||
install -vDm 644 -t "${pkgdir}/usr/share/caddy" caddy-dist/welcome/index.html
|
||||
|
||||
install -Dm 644 "${srcdir}/caddy.service" "${srcdir}/caddy-api.service" -t "${pkgdir}/usr/lib/systemd/system"
|
||||
install -Dm 644 "${srcdir}/caddy.tmpfiles" "${pkgdir}/usr/lib/tmpfiles.d/caddy.conf"
|
||||
install -Dm 644 "${srcdir}/caddy.sysusers" "${pkgdir}/usr/lib/sysusers.d/caddy.conf"
|
||||
install -vDm 644 -t "${pkgdir}/usr/lib/systemd/system" caddy.service caddy-api.service
|
||||
install -vDm 644 caddy.tmpfiles "${pkgdir}/usr/lib/tmpfiles.d/caddy.conf"
|
||||
install -vDm 644 caddy.sysusers "${pkgdir}/usr/lib/sysusers.d/caddy.conf"
|
||||
|
||||
install -Dm 644 "${srcdir}/Caddyfile" -t "${pkgdir}/etc/caddy"
|
||||
install -d "${pkgdir}/etc/caddy/conf.d"
|
||||
install -vDm 644 -t "${pkgdir}/etc/caddy" Caddyfile
|
||||
install -vd "${pkgdir}/etc/caddy/conf.d"
|
||||
|
||||
install -Dm 644 index.html "${pkgdir}/usr/share/caddy/index.html"
|
||||
install -vDm 644 caddy/caddy.zsh "${pkgdir}/usr/share/zsh/site-functions/_caddy"
|
||||
install -vDm 644 caddy/caddy.bash "${pkgdir}/usr/share/bash-completion/completions/caddy"
|
||||
install -vDm 644 caddy/caddy.fish "${pkgdir}/usr/share/fish/vendor_completions.d/caddy.fish"
|
||||
|
||||
install -Dm 644 "${srcdir}/caddy/cmd/caddy/caddy.zsh" "${pkgdir}/usr/share/zsh/site-functions/_caddy"
|
||||
install -Dm 644 "${srcdir}/caddy/cmd/caddy/caddy.bash" "${pkgdir}/usr/share/bash-completion/completions/caddy"
|
||||
install -Dm 644 "${srcdir}/caddy/cmd/caddy/caddy.fish" -t "${pkgdir}/usr/share/fish/vendor_completions.d"
|
||||
install -vDm 755 -t "${pkgdir}/usr/bin" ${pkgname}/build/caddy
|
||||
}
|
||||
|
||||
# vim: ts=2 sw=2 et:
|
||||
|
||||
@@ -18,7 +18,6 @@ path = [
|
||||
"*.desktop",
|
||||
"*.hook",
|
||||
"Caddyfile",
|
||||
"override-main-module-version.patch",
|
||||
"use-data-dir-for-autosave.patch",
|
||||
]
|
||||
SPDX-FileCopyrightText = "Arch Linux contributors"
|
||||
|
||||
@@ -1,43 +0,0 @@
|
||||
--- a/caddy.go~ 2022-10-02 18:58:35.059343203 +0200
|
||||
+++ b/caddy.go 2022-10-02 18:58:21.125992368 +0200
|
||||
@@ -875,39 +875,7 @@
|
||||
}
|
||||
|
||||
if full == "" {
|
||||
- var vcsRevision string
|
||||
- var vcsTime time.Time
|
||||
- var vcsModified bool
|
||||
- for _, setting := range bi.Settings {
|
||||
- switch setting.Key {
|
||||
- case "vcs.revision":
|
||||
- vcsRevision = setting.Value
|
||||
- case "vcs.time":
|
||||
- vcsTime, _ = time.Parse(time.RFC3339, setting.Value)
|
||||
- case "vcs.modified":
|
||||
- vcsModified, _ = strconv.ParseBool(setting.Value)
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- if vcsRevision != "" {
|
||||
- var modified string
|
||||
- if vcsModified {
|
||||
- modified = "+modified"
|
||||
- }
|
||||
- full = fmt.Sprintf("%s%s (%s)", vcsRevision, modified, vcsTime.Format(time.RFC822))
|
||||
- simple = vcsRevision
|
||||
-
|
||||
- // use short checksum for simple, if hex-only
|
||||
- if _, err := hex.DecodeString(simple); err == nil {
|
||||
- simple = simple[:8]
|
||||
- }
|
||||
-
|
||||
- // append date to simple since it can be convenient
|
||||
- // to know the commit date as part of the version
|
||||
- if !vcsTime.IsZero() {
|
||||
- simple += "-" + vcsTime.Format("20060102")
|
||||
- }
|
||||
- }
|
||||
+ full = "unknown"
|
||||
}
|
||||
|
||||
if simple == "" || simple == "(devel)" {
|
||||
Reference in New Issue
Block a user