Skip to content

Commit 6b0f2bb

Browse files
committed
caddy: add version 2.7.6 to extra.omnios
Add v2.7.6 of the Caddy web server. Add patch to fix Solaris-derivative build. Comes from caddy master:76611fa15079b755ddf3c859ae2ea0ad2123223f and this PR 6021: caddyserver/caddy#6021
1 parent e92fa6b commit 6b0f2bb

File tree

6 files changed

+104
-0
lines changed

6 files changed

+104
-0
lines changed

build/caddy/build.sh

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
#!/usr/bin/bash
2+
#
3+
# {{{ CDDL HEADER
4+
#
5+
# This file and its contents are supplied under the terms of the
6+
# Common Development and Distribution License ("CDDL"), version 1.0.
7+
# You may only use this file in accordance with the terms of version
8+
# 1.0 of the CDDL.
9+
#
10+
# A full copy of the text of the CDDL should have accompanied this
11+
# source. A copy of the CDDL is also available via the Internet at
12+
# http://www.illumos.org/license/CDDL.
13+
# }}}
14+
15+
# Copyright 2024 Guo-Rong Koh
16+
17+
. ../../lib/build.sh
18+
19+
PROG=caddy
20+
VER=2.7.6
21+
PKG=ooce/server/caddy
22+
SUMMARY="Caddy web server"
23+
DESC="Fast and extensible multi-platform HTTP/1-2-3 web server with automatic \
24+
HTTPS"
25+
26+
set_arch amd64
27+
set_gover
28+
29+
build() {
30+
pushd $TMPDIR/$BUILDDIR > /dev/null
31+
32+
logmsg "Building $PROG"
33+
export CGO_ENABLED=0
34+
export GOOS=illumos
35+
36+
logcmd go build -o caddy cmd/caddy/main.go || logerr "Unable to build $PROG"
37+
38+
popd >/dev/null
39+
}
40+
41+
# create package functions
42+
init
43+
clone_go_source $PROG caddyserver v$VER
44+
patch_source
45+
prep_build
46+
build
47+
install_go $PROG
48+
make_package
49+
clean_up
50+
51+
# Vim hints
52+
# vim:ts=4:sw=4:et:fdm=marker

build/caddy/local.mog

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#
2+
# This file and its contents are supplied under the terms of the
3+
# Common Development and Distribution License ("CDDL"), version 1.0.
4+
# You may only use this file in accordance with the terms of version
5+
# 1.0 of the CDDL.
6+
#
7+
# A full copy of the text of the CDDL should have accompanied this
8+
# source. A copy of the CDDL is also available via the Internet at
9+
# http://www.illumos.org/license/CDDL.
10+
11+
# Copyright 2024 Guo-Rong Koh
12+
13+
license LICENSE license=Apache2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
diff --git a/listen.go b/listen.go
2+
index 0cd3fabb..34812b54 100644
3+
--- a/listen.go
4+
+++ b/listen.go
5+
@@ -12,7 +12,7 @@
6+
// See the License for the specific language governing permissions and
7+
// limitations under the License.
8+
9+
-//go:build !unix
10+
+//go:build !unix || solaris
11+
12+
package caddy
13+
14+
diff --git a/listen_unix.go b/listen_unix.go
15+
index 34cd76c5..9ec65c39 100644
16+
--- a/listen_unix.go
17+
+++ b/listen_unix.go
18+
@@ -15,7 +15,7 @@
19+
// Even though the filename ends in _unix.go, we still have to specify the
20+
// build constraint here, because the filename convention only works for
21+
// literal GOOS values, and "unix" is a shortcut unique to build tags.
22+
-//go:build unix
23+
+//go:build unix && !solaris
24+
25+
package caddy
26+
27+
diff --git a/listen_unix_setopt.go b/listen_unix_setopt.go
28+
index c9675f92..13ee7b83 100644
29+
--- a/listen_unix_setopt.go
30+
+++ b/listen_unix_setopt.go
31+
@@ -1,4 +1,4 @@
32+
-//go:build unix && !freebsd
33+
+//go:build unix && !freebsd && !solaris
34+
35+
package caddy
36+

build/caddy/patches/series

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
0001-Switch-Solaris-derivatives-away-from-listen_unix.patch

doc/baseline

+1
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,7 @@ extra.omnios ooce/server/apache-24
230230
extra.omnios ooce/server/apache-24/modules/fcgid
231231
extra.omnios ooce/server/apache-24/modules/subversion
232232
extra.omnios ooce/server/apache-24/modules/wsgi
233+
extra.omnios ooce/server/caddy
233234
extra.omnios ooce/server/freeradius
234235
extra.omnios ooce/server/haproxy
235236
extra.omnios ooce/server/nginx

doc/packages.md

+1
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,7 @@
189189
| ooce/server/apache-24 | 2.4.58 | https://downloads.apache.org/httpd/ | [omniosorg](https://github.com/omniosorg)
190190
| ooce/server/apache-24/modules/fcgid | 2.3.9 | https://downloads.apache.org/httpd/mod_fcgid/ | [omniosorg](https://github.com/omniosorg)
191191
| ooce/server/apache-24/modules/wsgi | 5.0.0 | https://github.com/GrahamDumpleton/mod_wsgi/tags/ | [cgrzemba](https://github.com/cgrzemba)
192+
| ooce/server/caddy | 2.7.6 | https://github.com/caddyserver/caddy/releases | [gkoh](https://github.com/gkoh)
192193
| ooce/server/freeradius | 3.2.3 | https://github.com/FreeRADIUS/freeradius-server/releases https://freeradius.org/releases | [omniosorg](https://github.com/omniosorg)
193194
| ooce/server/haproxy | 2.8.5 | https://www.haproxy.org/ | [omniosorg](https://github.com/omniosorg)
194195
| ooce/server/nginx | 1.25.3 | https://nginx.org/en/download.html | [omniosorg](https://github.com/omniosorg)

0 commit comments

Comments
 (0)