4759c7e
%global goipath         github.com/caddyserver/caddy
3f7fb4d
c25c9bb
Name:           caddy
838a382
Version:        2.6.4
a3decf2
Release:        2%{?dist}
2ab2950
Summary:        Web server with automatic HTTPS
838a382
# main source code is Apache-2.0
838a382
# see comments above provides tags for bundled license breakdown
838a382
License:        Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND MIT AND BSD-2-Clause-Views AND ISC AND CC0-1.0 AND MPL-2.0
c25c9bb
URL:            https://caddyserver.com
2ab2950
19e9b39
%if %{defined fedora}
19e9b39
ExclusiveArch:  %{golang_arches_future}
19e9b39
%else
19e9b39
ExclusiveArch:  %{golang_arches}
19e9b39
%endif
19e9b39
19e9b39
%if %{undefined el8}
19e9b39
BuildRequires:  go-rpm-macros
19e9b39
%endif
19e9b39
b7594a8
# see create-vendor-tarball.sh in this distgit repo
2ab2950
Source0:        caddy-%{version}-vendored.tar.gz
2ab2950
2ab2950
# based on reference files upstream
2ab2950
# https://github.com/caddyserver/dist
117732f
Source10:       Caddyfile
117732f
Source20:       caddy.service
117732f
Source21:       caddy-api.service
117732f
Source30:       poweredby-white.png
117732f
Source31:       poweredby-black.png
2ab2950
8a639d7
# downstream only patch to disable commands that can alter the binary
8a639d7
Patch:          0001-Disable-commands-that-can-alter-the-binary.patch
8a639d7
838a382
# https://github.com/caddyserver/caddy/commit/141872ed80d6323505e7543628c259fdae8506d3
838a382
BuildRequires:  golang >= 1.18
838a382
838a382
# BSD-3-Clause
838a382
Provides:       bundled(golang(filippo.io/edwards25519)) = 1.0.0
838a382
# MIT AND CC0-1.0
838a382
Provides:       bundled(golang(github.com/AndreasBriese/bbloom)) = 46b345b
838a382
# MIT
838a382
Provides:       bundled(golang(github.com/BurntSushi/toml)) = 1.2.1
838a382
# Apache-2.0
838a382
Provides:       bundled(golang(github.com/Masterminds/goutils)) = 1.1.1
838a382
# MIT
838a382
Provides:       bundled(golang(github.com/Masterminds/semver/v3)) = 3.2.0
838a382
# MIT
838a382
Provides:       bundled(golang(github.com/Masterminds/sprig/v3)) = 3.2.3
838a382
# MIT
838a382
Provides:       bundled(golang(github.com/Microsoft/go-winio)) = 0.6.0
838a382
# MIT
838a382
Provides:       bundled(golang(github.com/alecthomas/chroma/v2)) = 2.5.0
838a382
# BSD-3-Clause
838a382
Provides:       bundled(golang(github.com/antlr/antlr4/runtime/Go/antlr)) = 1.4.10
838a382
# MIT
838a382
Provides:       bundled(golang(github.com/aryann/difflib)) = ff5ff6d
838a382
# MIT
838a382
Provides:       bundled(golang(github.com/beorn7/perks)) = 1.0.1
838a382
# Apache-2.0
838a382
Provides:       bundled(golang(github.com/caddyserver/certmagic)) = 0.17.2
838a382
# MIT
838a382
Provides:       bundled(golang(github.com/cenkalti/backoff/v4)) = 4.1.2
838a382
# MIT
838a382
Provides:       bundled(golang(github.com/cespare/xxhash)) = 1.1.0
838a382
# MIT
838a382
Provides:       bundled(golang(github.com/cespare/xxhash/v2)) = 2.1.2
838a382
# MIT
838a382
Provides:       bundled(golang(github.com/chzyer/readline)) = 2972be2
838a382
# MIT
838a382
Provides:       bundled(golang(github.com/cpuguy83/go-md2man/v2)) = 2.0.2
838a382
# ISC
838a382
Provides:       bundled(golang(github.com/davecgh/go-spew)) = 1.1.1
838a382
# Apache-2.0
838a382
Provides:       bundled(golang(github.com/dgraph-io/badger)) = 1.6.2
838a382
# Apache-2.0
838a382
Provides:       bundled(golang(github.com/dgraph-io/badger/v2)) = 2.2007.4
838a382
# Apache-2.0 AND MIT
838a382
Provides:       bundled(golang(github.com/dgraph-io/ristretto)) = 0.1.0
838a382
# MIT
838a382
Provides:       bundled(golang(github.com/dgryski/go-farm)) = a6ae236
838a382
# MIT
838a382
Provides:       bundled(golang(github.com/dlclark/regexp2)) = 1.7.0
838a382
# MIT
838a382
Provides:       bundled(golang(github.com/dustin/go-humanize)) = 1.0.1
838a382
# MIT
838a382
Provides:       bundled(golang(github.com/felixge/httpsnoop)) = 1.0.3
838a382
# MIT
838a382
Provides:       bundled(golang(github.com/fxamacker/cbor/v2)) = 2.4.0
838a382
# MIT
838a382
Provides:       bundled(golang(github.com/go-chi/chi)) = 4.1.2+incompatible
838a382
# MIT
838a382
Provides:       bundled(golang(github.com/go-kit/kit)) = 0.10.0
838a382
# MIT
838a382
Provides:       bundled(golang(github.com/go-logfmt/logfmt)) = 0.5.1
838a382
# Apache-2.0
838a382
Provides:       bundled(golang(github.com/go-logr/logr)) = 1.2.3
838a382
# Apache-2.0
838a382
Provides:       bundled(golang(github.com/go-logr/stdr)) = 1.2.2
838a382
# MPL-2.0
838a382
Provides:       bundled(golang(github.com/go-sql-driver/mysql)) = 1.6.0
838a382
# MIT
838a382
Provides:       bundled(golang(github.com/go-task/slim-sprig)) = 348f09d
838a382
# Apache-2.0
838a382
Provides:       bundled(golang(github.com/golang/glog)) = 1.0.0
838a382
# Apache-2.0
838a382
Provides:       bundled(golang(github.com/golang/mock)) = 1.6.0
838a382
# BSD-3-Clause
838a382
Provides:       bundled(golang(github.com/golang/protobuf)) = 1.5.2
838a382
# BSD-3-Clause
838a382
Provides:       bundled(golang(github.com/golang/snappy)) = 0.0.4
838a382
# Apache-2.0
838a382
Provides:       bundled(golang(github.com/google/cel-go)) = 0.13.0
838a382
# Apache-2.0
838a382
Provides:       bundled(golang(github.com/google/pprof)) = 94a9f03
838a382
# BSD-3-Clause
b7594a8
Provides:       bundled(golang(github.com/google/uuid)) = 1.3.0
838a382
# BSD-3-Clause
838a382
Provides:       bundled(golang(github.com/grpc-ecosystem/grpc-gateway)) = 1.16.0
838a382
# MIT
838a382
Provides:       bundled(golang(github.com/huandu/xstrings)) = 1.3.3
838a382
# BSD-3-Clause
838a382
Provides:       bundled(golang(github.com/imdario/mergo)) = 0.3.12
838a382
# Apache-2.0
838a382
Provides:       bundled(golang(github.com/inconshreveable/mousetrap)) = 1.0.1
838a382
# MIT
838a382
Provides:       bundled(golang(github.com/jackc/chunkreader/v2)) = 2.0.1
838a382
# MIT
838a382
Provides:       bundled(golang(github.com/jackc/pgconn)) = 1.13.0
838a382
# MIT
838a382
Provides:       bundled(golang(github.com/jackc/pgio)) = 1.0.0
838a382
# MIT
838a382
Provides:       bundled(golang(github.com/jackc/pgpassfile)) = 1.0.0
838a382
# MIT
838a382
Provides:       bundled(golang(github.com/jackc/pgproto3/v2)) = 2.3.1
838a382
# MIT
838a382
Provides:       bundled(golang(github.com/jackc/pgservicefile)) = 2b9c447
838a382
# MIT
838a382
Provides:       bundled(golang(github.com/jackc/pgtype)) = 1.12.0
838a382
# MIT
838a382
Provides:       bundled(golang(github.com/jackc/pgx/v4)) = 4.17.2
838a382
# BSD-3-Clause AND Apache-2.0 AND MIT
838a382
Provides:       bundled(golang(github.com/klauspost/compress)) = 1.15.15
838a382
# MIT
838a382
Provides:       bundled(golang(github.com/klauspost/cpuid/v2)) = 2.2.3
838a382
# MIT
838a382
Provides:       bundled(golang(github.com/libdns/libdns)) = 0.2.1
838a382
# BSD-3-Clause
838a382
Provides:       bundled(golang(github.com/manifoldco/promptui)) = 0.9.0
838a382
# MIT
838a382
Provides:       bundled(golang(github.com/mattn/go-colorable)) = 0.1.8
838a382
# MIT
838a382
Provides:       bundled(golang(github.com/mattn/go-isatty)) = 0.0.13
838a382
# Apache-2.0
838a382
Provides:       bundled(golang(github.com/matttproud/golang_protobuf_extensions)) = 1.0.1
838a382
# MIT
838a382
Provides:       bundled(golang(github.com/mgutz/ansi)) = d51e80e
838a382
# Apache-2.0
838a382
Provides:       bundled(golang(github.com/mholt/acmez)) = 1.1.0
838a382
# MIT
838a382
Provides:       bundled(golang(github.com/micromdm/scep/v2)) = 2.1.0
838a382
# BSD-3-Clause
838a382
Provides:       bundled(golang(github.com/miekg/dns)) = 1.1.50
838a382
# MIT
838a382
Provides:       bundled(golang(github.com/mitchellh/copystructure)) = 1.2.0
838a382
# MIT
838a382
Provides:       bundled(golang(github.com/mitchellh/go-ps)) = 1.0.0
838a382
# MIT
838a382
Provides:       bundled(golang(github.com/mitchellh/reflectwalk)) = 1.0.2
838a382
# MIT
838a382
Provides:       bundled(golang(github.com/onsi/ginkgo/v2)) = 2.2.0
838a382
# BSD-2-Clause
838a382
Provides:       bundled(golang(github.com/pkg/errors)) = 0.9.1
838a382
# Apache-2.0
838a382
Provides:       bundled(golang(github.com/prometheus/client_golang)) = 1.14.0
838a382
# Apache-2.0
838a382
Provides:       bundled(golang(github.com/prometheus/client_model)) = 0.3.0
838a382
# Apache-2.0
838a382
Provides:       bundled(golang(github.com/prometheus/common)) = 0.37.0
838a382
# Apache-2.0
838a382
Provides:       bundled(golang(github.com/prometheus/procfs)) = 0.8.0
838a382
# MIT
838a382
Provides:       bundled(golang(github.com/quic-go/qpack)) = 0.4.0
838a382
# BSD-3-Clause
838a382
Provides:       bundled(golang(github.com/quic-go/qtls-go1-18)) = 0.2.0
838a382
# BSD-3-Clause
838a382
Provides:       bundled(golang(github.com/quic-go/qtls-go1-19)) = 0.2.0
838a382
# BSD-3-Clause
838a382
Provides:       bundled(golang(github.com/quic-go/qtls-go1-20)) = 0.1.0
838a382
# MIT
838a382
Provides:       bundled(golang(github.com/quic-go/quic-go)) = 0.32.0
838a382
# MIT
838a382
Provides:       bundled(golang(github.com/rs/xid)) = 1.4.0
838a382
# BSD-2-Clause
838a382
Provides:       bundled(golang(github.com/russross/blackfriday/v2)) = 2.1.0
838a382
# MIT
838a382
Provides:       bundled(golang(github.com/shopspring/decimal)) = 1.2.0
838a382
# MIT
838a382
Provides:       bundled(golang(github.com/shurcooL/sanitized_anchor_name)) = 1.0.0
838a382
# MIT
838a382
Provides:       bundled(golang(github.com/sirupsen/logrus)) = 1.9.0
838a382
# MIT
838a382
Provides:       bundled(golang(github.com/slackhq/nebula)) = 1.6.1
838a382
# Apache-2.0
838a382
Provides:       bundled(golang(github.com/smallstep/certificates)) = 0.23.2
838a382
# Apache-2.0
838a382
Provides:       bundled(golang(github.com/smallstep/nosql)) = 0.5.0
838a382
# Apache-2.0
838a382
Provides:       bundled(golang(github.com/smallstep/truststore)) = 0.12.1
838a382
# MIT
838a382
Provides:       bundled(golang(github.com/spf13/cast)) = 1.4.1
838a382
# Apache-2.0
838a382
Provides:       bundled(golang(github.com/spf13/cobra)) = 1.6.1
838a382
# BSD-3-Clause
838a382
Provides:       bundled(golang(github.com/spf13/pflag)) = 1.0.5
838a382
# MIT
838a382
Provides:       bundled(golang(github.com/stoewer/go-strcase)) = 1.2.0
838a382
# BSD-3-Clause
838a382
Provides:       bundled(golang(github.com/tailscale/tscert)) = c6dc1f4
838a382
# MIT
838a382
Provides:       bundled(golang(github.com/urfave/cli)) = 1.22.12
838a382
# MIT
838a382
Provides:       bundled(golang(github.com/x448/float16)) = 0.8.4
838a382
# MIT
838a382
Provides:       bundled(golang(github.com/yuin/goldmark)) = 1.5.4
838a382
# MIT
838a382
Provides:       bundled(golang(github.com/yuin/goldmark-highlighting/v2)) = 1513624
838a382
# MIT
838a382
Provides:       bundled(golang(go.etcd.io/bbolt)) = 1.3.6
838a382
# MIT
838a382
Provides:       bundled(golang(go.mozilla.org/pkcs7)) = 33d0574
838a382
# Apache-2.0
838a382
Provides:       bundled(golang(go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp)) = 0.39.0
838a382
# Apache-2.0
838a382
Provides:       bundled(golang(go.opentelemetry.io/otel)) = 1.13.0
838a382
# Apache-2.0
838a382
Provides:       bundled(golang(go.opentelemetry.io/otel/exporters/otlp/internal/retry)) = 1.4.0
838a382
# Apache-2.0
838a382
Provides:       bundled(golang(go.opentelemetry.io/otel/exporters/otlp/otlptrace)) = 1.4.0
838a382
# Apache-2.0
b7594a8
Provides:       bundled(golang(go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc)) = 1.4.0
838a382
# Apache-2.0
838a382
Provides:       bundled(golang(go.opentelemetry.io/otel/metric)) = 0.36.0
838a382
# Apache-2.0
838a382
Provides:       bundled(golang(go.opentelemetry.io/otel/sdk)) = 1.13.0
838a382
# Apache-2.0
838a382
Provides:       bundled(golang(go.opentelemetry.io/otel/trace)) = 1.13.0
838a382
# Apache-2.0
838a382
Provides:       bundled(golang(go.opentelemetry.io/proto/otlp)) = 0.12.0
838a382
# Apache-2.0 AND BSD-2-Clause
838a382
Provides:       bundled(golang(go.step.sm/cli-utils)) = 0.7.5
838a382
# Apache-2.0 AND BSD-2-Clause
838a382
Provides:       bundled(golang(go.step.sm/crypto)) = 0.23.2
838a382
# Apache-2.0
838a382
Provides:       bundled(golang(go.step.sm/linkedca)) = 0.19.0
838a382
# MIT
838a382
Provides:       bundled(golang(go.uber.org/atomic)) = 1.9.0
838a382
# MIT
838a382
Provides:       bundled(golang(go.uber.org/multierr)) = 1.6.0
838a382
# MIT
838a382
Provides:       bundled(golang(go.uber.org/zap)) = 1.24.0
838a382
# BSD-3-Clause
838a382
Provides:       bundled(golang(golang.org/x/crypto)) = 0.5.0
838a382
# BSD-3-Clause
838a382
Provides:       bundled(golang(golang.org/x/exp)) = 47842c8
838a382
# BSD-3-Clause
838a382
Provides:       bundled(golang(golang.org/x/mod)) = 0.6.0
838a382
# BSD-3-Clause
838a382
Provides:       bundled(golang(golang.org/x/net)) = 0.7.0
838a382
# BSD-3-Clause
838a382
Provides:       bundled(golang(golang.org/x/sync)) = 0.1.0
838a382
# BSD-3-Clause
838a382
Provides:       bundled(golang(golang.org/x/sys)) = 0.5.0
838a382
# BSD-3-Clause
838a382
Provides:       bundled(golang(golang.org/x/term)) = 0.5.0
838a382
# BSD-3-Clause
838a382
Provides:       bundled(golang(golang.org/x/text)) = 0.7.0
838a382
# BSD-3-Clause
838a382
Provides:       bundled(golang(golang.org/x/tools)) = 0.2.0
838a382
# Apache-2.0
838a382
Provides:       bundled(golang(google.golang.org/genproto)) = 008b390
838a382
# Apache-2.0
838a382
Provides:       bundled(golang(google.golang.org/grpc)) = 1.52.3
838a382
# BSD-3-Clause
838a382
Provides:       bundled(golang(google.golang.org/protobuf)) = 1.28.1
838a382
# MIT
838a382
Provides:       bundled(golang(gopkg.in/natefinch/lumberjack.v2)) = 2.2.1
838a382
# Apache-2.0 AND BSD-3-Clause
838a382
Provides:       bundled(golang(gopkg.in/square/go-jose.v2)) = 2.6.0
838a382
# Apache-2.0 AND MIT
b7594a8
Provides:       bundled(golang(gopkg.in/yaml.v3)) = 3.0.1
838a382
# BSD-2-Clause-Views AND BSD-3-Clause
838a382
Provides:       bundled(golang(howett.net/plist)) = 1.0.0
a8925e4
2ab2950
BuildRequires:  systemd-rpm-macros
c25c9bb
%{?systemd_requires}
2ab2950
Requires:       system-logos-httpd
c25c9bb
Provides:       webserver
6241751
6241751
19e9b39
%description
19e9b39
Caddy is the web server with automatic HTTPS.
3f7fb4d
6241751
6241751
%prep
19e9b39
%autosetup -p 1
19e9b39
mkdir -p src/$(dirname %{goipath})
19e9b39
ln -s $PWD src/%{goipath}
2ab2950
6241751
6241751
%build
19e9b39
export GO111MODULE=off
19e9b39
export GOPATH=$PWD
838a382
export LDFLAGS="-X %{goipath}.CustomVersion=v%{version}"
19e9b39
%gobuild -o bin/caddy %{goipath}/cmd/caddy
6241751
6241751
6241751
%install
2ab2950
# command
19e9b39
install -D -p -m 0755 bin/caddy %{buildroot}%{_bindir}/caddy
2ab2950
947aa45
# man pages
947aa45
./bin/caddy manpage --directory %{buildroot}%{_mandir}/man8
947aa45
2ab2950
# config
117732f
install -D -p -m 0644 %{S:10} %{buildroot}%{_sysconfdir}/caddy/Caddyfile
2ab2950
install -d -m 0755 %{buildroot}%{_sysconfdir}/caddy/Caddyfile.d
2ab2950
2ab2950
# systemd units
117732f
install -D -p -m 0644 %{S:20} %{buildroot}%{_unitdir}/caddy.service
117732f
install -D -p -m 0644 %{S:21} %{buildroot}%{_unitdir}/caddy-api.service
2ab2950
2ab2950
# data directory
6241751
install -d -m 0750 %{buildroot}%{_sharedstatedir}/caddy
6241751
2ab2950
# welcome page
148ccf6
%if %{defined fedora}
117732f
install -D -p -m 0644 %{S:30} %{buildroot}%{_datadir}/caddy/poweredby.png
a3decf2
ln -s ../fedora-testpage/index.html %{buildroot}%{_datadir}/caddy/index.html
148ccf6
%else
117732f
install -D -p -m 0644 %{S:31} %{buildroot}%{_datadir}/caddy/poweredby.png
148ccf6
ln -s ../testpage/index.html %{buildroot}%{_datadir}/caddy/index.html
a3decf2
%endif
2ab2950
install -d -m 0755 %{buildroot}%{_datadir}/caddy/icons
2ab2950
ln -s ../../pixmaps/poweredby.png %{buildroot}%{_datadir}/caddy/icons/poweredby.png
a3decf2
%if %{defined rhel} && 0%{?rhel} >= 9
a3decf2
ln -s ../pixmaps/system-noindex-logo.png %{buildroot}%{_datadir}/caddy/system_noindex_logo.png
a3decf2
%endif
2ab2950
4640531
# shell completions
4640531
install -d -m 0755 %{buildroot}%{_datadir}/bash-completion/completions
4640531
./bin/caddy completion bash > %{buildroot}%{_datadir}/bash-completion/completions/caddy
4640531
install -d -m 0755 %{buildroot}%{_datadir}/zsh/site-functions
4640531
./bin/caddy completion zsh > %{buildroot}%{_datadir}/zsh/site-functions/_caddy
e241718
install -d -m 0755 %{buildroot}%{_datadir}/fish/vendor_completions.d
e241718
./bin/caddy completion fish > %{buildroot}%{_datadir}/fish/vendor_completions.d/caddy.fish
9ce640e
6241751
a8925e4
%check
838a382
# ensure that the version was embedded correctly
838a382
[[ "$(./bin/caddy version)" == "v%{version}" ]] || exit 1
838a382
838a382
# run the upstream tests
19e9b39
export GO111MODULE=off
19e9b39
export GOPATH=$PWD
19e9b39
cd src/%{goipath}
19e9b39
%gotest ./...
a8925e4
a8925e4
6241751
%pre
6241751
getent group caddy &> /dev/null || \
6241751
groupadd -r caddy &> /dev/null
6241751
getent passwd caddy &> /dev/null || \
6241751
useradd -r -g caddy -d %{_sharedstatedir}/caddy -s /sbin/nologin -c 'Caddy web server' caddy &> /dev/null
6241751
exit 0
6241751
6241751
6241751
%post
6241751
%systemd_post caddy.service
e0cd9bf
e0cd9bf
if [ -x /usr/sbin/getsebool ]; then
e0cd9bf
    # connect to ACME endpoint to request certificates
e0cd9bf
    setsebool -P httpd_can_network_connect on
e0cd9bf
fi
b85070c
if [ -x /usr/sbin/semanage -a -x /usr/sbin/restorecon ]; then
e0cd9bf
    # file contexts
b85070c
    semanage fcontext --add --type httpd_exec_t        '%{_bindir}/caddy'               2> /dev/null || :
b85070c
    semanage fcontext --add --type httpd_sys_content_t '%{_datadir}/caddy(/.*)?'        2> /dev/null || :
b85070c
    semanage fcontext --add --type httpd_config_t      '%{_sysconfdir}/caddy(/.*)?'     2> /dev/null || :
b85070c
    semanage fcontext --add --type httpd_var_lib_t     '%{_sharedstatedir}/caddy(/.*)?' 2> /dev/null || :
b85070c
    restorecon -r %{_bindir}/caddy %{_datadir}/caddy %{_sysconfdir}/caddy %{_sharedstatedir}/caddy || :
b85070c
fi
1060be5
if [ -x /usr/sbin/semanage ]; then
1060be5
    # QUIC
1060be5
    semanage port --add --type http_port_t --proto udp 80   2> /dev/null || :
1060be5
    semanage port --add --type http_port_t --proto udp 443  2> /dev/null || :
2ab2950
    # admin endpoint
2ab2950
    semanage port --add --type http_port_t --proto tcp 2019 2> /dev/null || :
1060be5
fi
6241751
6241751
6241751
%preun
6241751
%systemd_preun caddy.service
6241751
6241751
6241751
%postun
6241751
%systemd_postun_with_restart caddy.service
e0cd9bf
b85070c
if [ $1 -eq 0 ]; then
e0cd9bf
    if [ -x /usr/sbin/getsebool ]; then
e0cd9bf
        # connect to ACME endpoint to request certificates
e0cd9bf
        setsebool -P httpd_can_network_connect off
e0cd9bf
    fi
b85070c
    if [ -x /usr/sbin/semanage ]; then
e0cd9bf
        # file contexts
b85070c
        semanage fcontext --delete --type httpd_exec_t        '%{_bindir}/caddy'               2> /dev/null || :
b85070c
        semanage fcontext --delete --type httpd_sys_content_t '%{_datadir}/caddy(/.*)?'        2> /dev/null || :
b85070c
        semanage fcontext --delete --type httpd_config_t      '%{_sysconfdir}/caddy(/.*)?'     2> /dev/null || :
b85070c
        semanage fcontext --delete --type httpd_var_lib_t     '%{_sharedstatedir}/caddy(/.*)?' 2> /dev/null || :
1060be5
        # QUIC
1060be5
        semanage port     --delete --type http_port_t --proto udp 80   2> /dev/null || :
1060be5
        semanage port     --delete --type http_port_t --proto udp 443  2> /dev/null || :
2ab2950
        # admin endpoint
2ab2950
        semanage port     --delete --type http_port_t --proto tcp 2019 2> /dev/null || :
b85070c
    fi
b85070c
fi
6241751
6241751
6241751
%files
8a639d7
%license LICENSE
8a639d7
%doc README.md AUTHORS
6241751
%{_bindir}/caddy
947aa45
%{_mandir}/man8/caddy*.8*
6241751
%{_datadir}/caddy
6241751
%{_unitdir}/caddy.service
2ab2950
%{_unitdir}/caddy-api.service
6241751
%dir %{_sysconfdir}/caddy
2ab2950
%config(noreplace) %{_sysconfdir}/caddy/Caddyfile
2ab2950
%dir %{_sysconfdir}/caddy/Caddyfile.d
6241751
%attr(0750,caddy,caddy) %dir %{_sharedstatedir}/caddy
9ce640e
# filesystem owns all the parent directories here
9ce640e
%{_datadir}/bash-completion/completions/caddy
9ce640e
# own parent directories in case zsh is not installed
9ce640e
%dir %{_datadir}/zsh
9ce640e
%dir %{_datadir}/zsh/site-functions
9ce640e
%{_datadir}/zsh/site-functions/_caddy
e241718
# own parent directories in case fish is not installed
e241718
%dir %{_datadir}/fish
e241718
%dir %{_datadir}/fish/vendor_completions.d
e241718
%{_datadir}/fish/vendor_completions.d/caddy.fish
6241751
6241751
6241751
%changelog
a3decf2
* Mon Oct 30 2023 Carl George <carlwgeorge@fedoraproject.org> - 2.6.4-2
a3decf2
- Update poweredby logos
a3decf2
- Add symlink for system_noindex_logo.png on EL9
a3decf2
- Symlink directly to fedora-testpage directory on Fedora
a3decf2
838a382
* Tue Aug 15 2023 Carl George <carlwgeorge@fedoraproject.org> - 2.6.4-1
838a382
- Update to version 2.6.4
947aa45
- Add man pages
4640531
- Use generated shell completion files instead of static ones
e241718
- Add fish shell completions
838a382
c3d3c58
* Wed Jul 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.5.2-4
c3d3c58
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
c3d3c58
3283509
* Tue Jan 24 2023 Carl George <carl@george.computer> - 2.5.2-3
3283509
- Rebuild for CVE-2022-41717 in golang
3283509
88f2865
* Wed Jan 18 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.5.2-2
88f2865
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
88f2865
b7594a8
* Tue Aug 09 2022 Carl George <carl@george.computer> - 2.5.2-1
b7594a8
- Latest upstream, resolves rhbz#2062499 rhbz#2113136
b7594a8
ae311ba
* Wed Jul 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.6-5
ae311ba
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
ae311ba
2805178
* Tue Jul 19 2022 Maxwell G <gotmax@e.email> - 2.4.6-4
2805178
- Rebuild for CVE-2022-{1705,32148,30631,30633,28131,30635,30632,30630,1962} in
2805178
  golang
2805178
cc311e6
* Fri Jun 17 2022 Robert-André Mauchin <zebob.m@gmail.com> - 2.4.6-3
cc311e6
- Rebuilt for CVE-2022-1996, CVE-2022-24675, CVE-2022-28327, CVE-2022-27191,
cc311e6
  CVE-2022-29526, CVE-2022-30629
cc311e6
148ccf6
* Fri Feb 25 2022 Carl George <carl@george.computer> - 2.4.6-2
148ccf6
- Update welcome page symlink and image to work on both Fedora and EPEL
148ccf6
8a639d7
* Wed Feb 16 2022 Carl George <carl@george.computer> - 2.4.6-1
8a639d7
- Latest upstream rhbz#1984163
8a639d7
67269d8
* Wed Jan 19 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.0-3
67269d8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
67269d8
25f1116
* Wed Jul 21 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.0-2
25f1116
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
25f1116
e1ac1b8
* Wed Mar 03 2021 Carl George <carl@george.computer> - 2.3.0-1
e1ac1b8
- Latest upstream
e1ac1b8
- Fix vendored license handling
b870f26
- Switch to white logo rhbz#1934864
e1ac1b8
0cffe89
* Tue Mar 02 2021 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 2.2.1-3
0cffe89
- Rebuilt for updated systemd-rpm-macros
0cffe89
  See https://pagure.io/fesco/issue/2583.
0cffe89
38c0f0e
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.1-2
38c0f0e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
38c0f0e
9531424
* Fri Oct 30 2020 Carl George <carl@george.computer> - 2.2.1-1
9531424
- Latest upstream
9531424
ea0c016
* Sat Sep 26 2020 Carl George <carl@george.computer> - 2.2.0-1
ea0c016
- Latest upstream
ea0c016
44ed85c
* Sat Sep 19 2020 Carl George <carl@george.computer> - 2.2.0~rc3-1
44ed85c
- Latest upstream
44ed85c
9ce640e
* Fri Aug 14 2020 Carl George <carl@george.computer> - 2.1.1-2
9ce640e
- Add bash and zsh completion support
9ce640e
2ab2950
* Sun Aug 09 2020 Carl George <carl@george.computer> - 2.1.1-1
2ab2950
- Update to Caddy v2
2ab2950
- Remove all v1 plugins
2ab2950
- Use vendored dependencies
2ab2950
- Remove devel subpackage
2ab2950
- Rename config file per upstream request
2ab2950
- Use webserver test page from system-logos-httpd
2ab2950
367391c
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.4-3
367391c
- Second attempt - Rebuilt for
367391c
  https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
367391c
5cac5c7
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.4-2
5cac5c7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
5cac5c7
2b8e082
* Tue Jul 07 20:56:10 CEST 2020 Robert-André Mauchin <zebob.m@gmail.com> - 1.0.4-1
2b8e082
- Update to 1.0.4 (#1803691)
2b8e082
3b7bf3f
* Mon Feb 17 2020 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 1.0.3-3
3b7bf3f
- Rebuilt for GHSA-jf24-p9p9-4rjh
3b7bf3f
a2c16df
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.3-2
a2c16df
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
a2c16df
c25c9bb
* Sat Sep 07 2019 Carl George <carl@george.computer> - 1.0.3-1
c25c9bb
- Latest upstream
e1d736c
- Remove bundled lego and plugins
74c6a0d
- Remove dyn, gandi, namecheap, and rfc2136 dns providers
ba5896a
- Add patch0 to fix `-version` flag
d6fa51f
- Add patch1 to adjust blackfriday import path
3f7fb4d
- Add devel subpackages
a8925e4
- Run test suite
c25c9bb
68685a1
* Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.11.4-3
68685a1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
68685a1
a90fe1c
* Thu May 09 2019 Carl George <carl@george.computer> - 0.11.4-2
a90fe1c
- Switch unit file from ProtectSystem strict to full rhbz#1706651
a90fe1c
1c3feaa
* Wed Mar 06 2019 Carl George <carl@george.computer> - 0.11.4-1
1c3feaa
- Latest upstream
1c3feaa
- Update bundled dnsproviders to 0.1.3
1c3feaa
- Update bundled lego to 2.2.0
c8df7cc
- Enable googlecloud, route53, and azure dns providers on epel7
6f08d57
- Allow custom http port with default config file rhbz#1685446
1c3feaa
b7851ec
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.11.1-3
b7851ec
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
b7851ec
8e47130
* Wed Nov 14 2018 Carl George <carl@george.computer> - 0.11.1-2
8e47130
- Buildrequires at least golang 1.10
8e47130
93f66aa
* Tue Nov 13 2018 Carl George <carl@george.computer> - 0.11.1-1
93f66aa
- Latest upstream
93f66aa
- Update bundled geoip
93f66aa
e0cd9bf
* Fri Oct 19 2018 Carl George <carl@george.computer> - 0.11.0-3
e0cd9bf
- Enable httpd_can_network_connect selinux boolean to connect to ACME endpoint rhbz#1641158
1060be5
- Define UDP 80/443 as selinux http_port_t for QUIC rhbz#1608548
05e0e39
- Define TCP 5033 as selinux http_port_t for HTTP challenge rhbz#1641160
e0cd9bf
c17ada9
* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.11.0-2
c17ada9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
c17ada9
cbe4291
* Sat May 12 2018 Carl George <carl@george.computer> - 0.11.0-1
cbe4291
- Latest upstream
cbe4291
dae6144
* Sat Apr 21 2018 Carl George <carl@george.computer> - 0.10.14-1
dae6144
- Latest upstream
fbea827
- Overhaul %%prep to extract everything with %%setup
7881b64
- Edit lego providers to require acmev2 instead of acme
fd81dcf
- Add provides for specific providers from %%import_path_dnsproviders and %%import_path_lego
77c97fc
- Add azure dns provider on f28+
dae6144
e937b99
* Fri Apr 20 2018 Carl George <carl@george.computer> - 0.10.11-6
e937b99
- Enable geoip plugin on EL7
5e0b8b7
- Only provide bundled geoip/realip/dnsproviders/lego when the respective plugin is enabled
e937b99
3e7f667
* Wed Apr 18 2018 Carl George <carl@george.computer> - 0.10.11-5
3e7f667
- Add geoip plugin
3e7f667
4610a56
* Tue Apr 17 2018 Carl George <carl@george.computer> - 0.10.11-4
4610a56
- Correct ExclusiveArch fallback
4610a56
c9e0c5d
* Mon Apr 16 2018 Carl George <carl@george.computer> - 0.10.11-3
c9e0c5d
- Enable s390x
0e791f4
- Disable googlecloud and route53 dns providers on EL7 due to dependency issues
c9e0c5d
8fa712d
* Fri Mar 30 2018 Carl George <carl@george.computer> - 0.10.11-2
8fa712d
- Add googlecloud dns provider
e4bffa3
- Add route53 dns provider
92091e9
- Set minimum golang version to 1.9
b85070c
- Set selinux labels in scriptlets
8fa712d
aa458af
* Sat Feb 24 2018 Carl George <carl@george.computer> - 0.10.11-1
aa458af
- Latest upstream
aa458af
26ab4f9
* Sat Feb 24 2018 Carl George <carl@george.computer> - 0.10.10-4
d2904dd
- Change ProtectSystem from strict to full in unit file on RHEL
d2904dd
338767c
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.10.10-3
338767c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
338767c
fcd5d49
* Thu Jan 11 2018 Carl George <carl@george.computer> - 0.10.10-2
fcd5d49
- Add powerdns provider
fcd5d49
19101b5
* Mon Oct 09 2017 Carl George <carl@george.computer> - 0.10.10-1
19101b5
- Latest upstream
19101b5
6241751
* Mon Oct 02 2017 Carl George <carl@george.computer> - 0.10.9-6
6241751
- Add provides for bundled libraries
6241751
6241751
* Mon Oct 02 2017 Carl George <carl@george.computer> - 0.10.9-5
6241751
- Enable rfc2136 dns provider
6241751
- List plugins in description
6241751
6241751
* Mon Sep 18 2017 Carl George <carl@george.computer> - 0.10.9-4
6241751
- Exclude s390x
6241751
6241751
* Sun Sep 17 2017 Carl George <carl@george.computer> - 0.10.9-3
6241751
- Add realip plugin
6241751
- Add conditionals for plugins
6241751
6241751
* Sat Sep 16 2017 Carl George <carl@george.computer> - 0.10.9-2
6241751
- Add sources for caddyserver/dnsproviders and xenolf/lego
6241751
- Disable all dns providers that require additional libraries (dnsimple, dnspod, googlecloud, linode, ovh, route53, vultr)
6241751
- Rewrite default index.html
6241751
6241751
* Tue Sep 12 2017 Carl George <carl@george.computer> - 0.10.9-1
6241751
- Latest upstream
6241751
- Add config validation to unit file
6241751
- Disable exoscale dns provider https://github.com/xenolf/lego/issues/429
6241751
6241751
* Fri Sep 08 2017 Carl George <carl@george.computer> - 0.10.8-1
6241751
- Latest upstream
6241751
- Build with %%gobuild macro
6241751
- Move config subdirectory from /etc/caddy/caddy.conf.d to /etc/caddy/conf.d
6241751
6241751
* Tue Aug 29 2017 Carl George <carl@george.computer> - 0.10.7-1
6241751
- Latest upstream
6241751
6241751
* Fri Aug 25 2017 Carl George <carl@george.computer> - 0.10.6-2
6241751
- Use SIQQUIT to stop service
6241751
- Increase the process limit from 64 to 512
6241751
- Only `go get` in caddy/caddymain
6241751
6241751
* Fri Aug 11 2017 Carl George <carl@george.computer> - 0.10.6-1
6241751
- Latest upstream
6241751
- Add webserver virtual provides
6241751
- Drop tmpfiles and just own /var/lib/caddy directly
6241751
- Remove PrivateDevices setting from unit file, it prevents selinux process transitions
6241751
- Disable rfc2136 dns provider https://github.com/caddyserver/dnsproviders/issues/11
6241751
6241751
* Sat Jun 03 2017 Carl George <carl.george@rackspace.com> - 0.10.3-2
6241751
- Rename Envfile to envfile
6241751
- Rename Caddyfile to caddy.conf
6241751
- Include additional configs from caddy.conf.d directory
6241751
6241751
* Fri May 19 2017 Carl George <carl.george@rackspace.com> - 0.10.3-1
6241751
- Latest upstream
6241751
6241751
* Mon May 15 2017 Carl George <carl.george@rackspace.com> - 0.10.2-1
6241751
- Initial package