Skip to content

Commit

Permalink
caddy: add version 2.7.6 to extra.omnios
Browse files Browse the repository at this point in the history
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
  • Loading branch information
gkoh committed Feb 19, 2024
1 parent e92fa6b commit 6b0f2bb
Show file tree
Hide file tree
Showing 6 changed files with 104 additions and 0 deletions.
52 changes: 52 additions & 0 deletions build/caddy/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
#!/usr/bin/bash
#
# {{{ CDDL HEADER
#
# This file and its contents are supplied under the terms of the
# Common Development and Distribution License ("CDDL"), version 1.0.
# You may only use this file in accordance with the terms of version
# 1.0 of the CDDL.
#
# A full copy of the text of the CDDL should have accompanied this
# source. A copy of the CDDL is also available via the Internet at
# http://www.illumos.org/license/CDDL.
# }}}

# Copyright 2024 Guo-Rong Koh

. ../../lib/build.sh

PROG=caddy
VER=2.7.6
PKG=ooce/server/caddy
SUMMARY="Caddy web server"
DESC="Fast and extensible multi-platform HTTP/1-2-3 web server with automatic \
HTTPS"

set_arch amd64
set_gover

build() {
pushd $TMPDIR/$BUILDDIR > /dev/null

logmsg "Building $PROG"
export CGO_ENABLED=0
export GOOS=illumos

logcmd go build -o caddy cmd/caddy/main.go || logerr "Unable to build $PROG"

popd >/dev/null
}

# create package functions
init
clone_go_source $PROG caddyserver v$VER
patch_source
prep_build
build
install_go $PROG
make_package
clean_up

# Vim hints
# vim:ts=4:sw=4:et:fdm=marker
13 changes: 13 additions & 0 deletions build/caddy/local.mog
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#
# This file and its contents are supplied under the terms of the
# Common Development and Distribution License ("CDDL"), version 1.0.
# You may only use this file in accordance with the terms of version
# 1.0 of the CDDL.
#
# A full copy of the text of the CDDL should have accompanied this
# source. A copy of the CDDL is also available via the Internet at
# http://www.illumos.org/license/CDDL.

# Copyright 2024 Guo-Rong Koh

license LICENSE license=Apache2
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
diff --git a/listen.go b/listen.go
index 0cd3fabb..34812b54 100644
--- a/listen.go
+++ b/listen.go
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

-//go:build !unix
+//go:build !unix || solaris

package caddy

diff --git a/listen_unix.go b/listen_unix.go
index 34cd76c5..9ec65c39 100644
--- a/listen_unix.go
+++ b/listen_unix.go
@@ -15,7 +15,7 @@
// Even though the filename ends in _unix.go, we still have to specify the
// build constraint here, because the filename convention only works for
// literal GOOS values, and "unix" is a shortcut unique to build tags.
-//go:build unix
+//go:build unix && !solaris

package caddy

diff --git a/listen_unix_setopt.go b/listen_unix_setopt.go
index c9675f92..13ee7b83 100644
--- a/listen_unix_setopt.go
+++ b/listen_unix_setopt.go
@@ -1,4 +1,4 @@
-//go:build unix && !freebsd
+//go:build unix && !freebsd && !solaris

package caddy

1 change: 1 addition & 0 deletions build/caddy/patches/series
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0001-Switch-Solaris-derivatives-away-from-listen_unix.patch
1 change: 1 addition & 0 deletions doc/baseline
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ extra.omnios ooce/server/apache-24
extra.omnios ooce/server/apache-24/modules/fcgid
extra.omnios ooce/server/apache-24/modules/subversion
extra.omnios ooce/server/apache-24/modules/wsgi
extra.omnios ooce/server/caddy
extra.omnios ooce/server/freeradius
extra.omnios ooce/server/haproxy
extra.omnios ooce/server/nginx
Expand Down
1 change: 1 addition & 0 deletions doc/packages.md
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@
| ooce/server/apache-24 | 2.4.58 | https://downloads.apache.org/httpd/ | [omniosorg](https://github.com/omniosorg)
| ooce/server/apache-24/modules/fcgid | 2.3.9 | https://downloads.apache.org/httpd/mod_fcgid/ | [omniosorg](https://github.com/omniosorg)
| ooce/server/apache-24/modules/wsgi | 5.0.0 | https://github.com/GrahamDumpleton/mod_wsgi/tags/ | [cgrzemba](https://github.com/cgrzemba)
| ooce/server/caddy | 2.7.6 | https://github.com/caddyserver/caddy/releases | [gkoh](https://github.com/gkoh)
| ooce/server/freeradius | 3.2.3 | https://github.com/FreeRADIUS/freeradius-server/releases https://freeradius.org/releases | [omniosorg](https://github.com/omniosorg)
| ooce/server/haproxy | 2.8.5 | https://www.haproxy.org/ | [omniosorg](https://github.com/omniosorg)
| ooce/server/nginx | 1.25.3 | https://nginx.org/en/download.html | [omniosorg](https://github.com/omniosorg)
Expand Down

0 comments on commit 6b0f2bb

Please sign in to comment.