mirror of
https://github.com/void-linux/void-packages.git
synced 2025-06-07 23:53:51 +02:00
caddy: update to 2.6.1.
This commit is contained in:
parent
3117884e81
commit
4064a7433e
3 changed files with 44 additions and 19 deletions
|
@ -1,3 +0,0 @@
|
||||||
WARNING: The config syntax has changed from caddy 1.x to 2.x
|
|
||||||
|
|
||||||
Be sure to upgrade all your configuration files!
|
|
|
@ -1,17 +1,45 @@
|
||||||
|
diff --git a/caddy.go b/caddy.go
|
||||||
|
index 0fda9bc..42a3b79 100644
|
||||||
--- a/caddy.go
|
--- a/caddy.go
|
||||||
+++ b/caddy.go
|
+++ b/caddy.go
|
||||||
@@ -712,14 +711,0 @@ func goModule(mod *debug.Module) *debug.Module {
|
@@ -875,39 +875,7 @@ func Version() (simple, full string) {
|
||||||
- bi, ok := debug.ReadBuildInfo()
|
}
|
||||||
- if ok {
|
|
||||||
- mod.Path = bi.Main.Path
|
if full == "" {
|
||||||
- // The recommended way to build Caddy involves
|
- var vcsRevision string
|
||||||
- // creating a separate main module, which
|
- var vcsTime time.Time
|
||||||
- // TODO: track related Go issue: https://github.com/golang/go/issues/29228
|
- var vcsModified bool
|
||||||
- // once that issue is fixed, we should just be able to use bi.Main... hopefully.
|
- for _, setting := range bi.Settings {
|
||||||
- for _, dep := range bi.Deps {
|
- switch setting.Key {
|
||||||
- if dep.Path == ImportPath {
|
- case "vcs.revision":
|
||||||
- return dep
|
- vcsRevision = setting.Value
|
||||||
|
- case "vcs.time":
|
||||||
|
- vcsTime, _ = time.Parse(time.RFC3339, setting.Value)
|
||||||
|
- case "vcs.modified":
|
||||||
|
- vcsModified, _ = strconv.ParseBool(setting.Value)
|
||||||
- }
|
- }
|
||||||
- }
|
- }
|
||||||
- return &bi.Main
|
-
|
||||||
- }
|
- 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)" {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# Template file for 'caddy'
|
# Template file for 'caddy'
|
||||||
pkgname=caddy
|
pkgname=caddy
|
||||||
version=2.5.2
|
version=2.6.1
|
||||||
revision=1
|
revision=1
|
||||||
build_style=go
|
build_style=go
|
||||||
go_import_path=github.com/caddyserver/caddy/v2
|
go_import_path=github.com/caddyserver/caddy/v2
|
||||||
|
@ -11,7 +11,7 @@ maintainer="Dominic Monroe <monroef4@googlemail.com>"
|
||||||
license="Apache-2.0"
|
license="Apache-2.0"
|
||||||
homepage="https://caddyserver.com"
|
homepage="https://caddyserver.com"
|
||||||
distfiles="https://github.com/caddyserver/caddy/archive/v${version}.tar.gz"
|
distfiles="https://github.com/caddyserver/caddy/archive/v${version}.tar.gz"
|
||||||
checksum=6a3e03774658af8009c0ece287301d73c1ea961d01e6ef7c6f44962e4349f5e5
|
checksum=ae698b4618dc6ffe7370b0607d59ee78833cb4986ca5663c50a9ae0b90072ac1
|
||||||
|
|
||||||
system_accounts="caddy"
|
system_accounts="caddy"
|
||||||
caddy_homedir="/var/lib/caddy"
|
caddy_homedir="/var/lib/caddy"
|
||||||
|
@ -23,7 +23,7 @@ make_dirs="
|
||||||
/etc/caddy 0700 caddy caddy
|
/etc/caddy 0700 caddy caddy
|
||||||
/var/lib/caddy 0700 caddy caddy"
|
/var/lib/caddy 0700 caddy caddy"
|
||||||
|
|
||||||
post_extract() {
|
post_patch() {
|
||||||
vsed -e "s,unknown,${version},g" -i ${wrksrc}/caddy.go
|
vsed -e "s,unknown,${version},g" -i ${wrksrc}/caddy.go
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue