Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package caddy for openSUSE:Factory checked in at 2024-06-14 19:02:56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/caddy (Old) and /work/SRC/openSUSE:Factory/.caddy.new.19518 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "caddy" Fri Jun 14 19:02:56 2024 rev:26 rq:1180883 version:2.8.4 Changes: -------- --- /work/SRC/openSUSE:Factory/caddy/caddy.changes 2024-06-03 17:41:46.259278466 +0200 +++ /work/SRC/openSUSE:Factory/.caddy.new.19518/caddy.changes 2024-06-14 19:07:38.699616957 +0200 @@ -1,0 +2,19 @@ +Fri Jun 14 10:21:50 UTC 2024 - Enrico Belleri <kilgore.tr...@idesmi.eu> + +- Add OBS manual service download_files + +------------------------------------------------------------------- +Tue Jun 11 14:55:47 UTC 2024 - Enrico Belleri <kilgore.tr...@idesmi.eu> + +- Source Caddyfile and index.html from upstream +- Remove part of inaccurate description +- Package shell completion separately +- Generate shell completion during build +- Include manpages +- Remove compatibility with SLE-12 +- Source buildable-artifact tar from github to embed version + information (https://github.com/golang/go/issues/29228) +- Check binary with version subcommand +- Raise golang(API) required version + +------------------------------------------------------------------- Old: ---- bash-completion zsh-completion ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ caddy.spec ++++++ --- /var/tmp/diff_new_pack.xF9b5f/_old 2024-06-14 19:07:39.575648098 +0200 +++ /var/tmp/diff_new_pack.xF9b5f/_new 2024-06-14 19:07:39.575648098 +0200 @@ -16,14 +16,6 @@ # -# SLE-12 _sharedstatedir was /usr/com, _localstatedir is /var as expected -# SLE-15+ _sharedstatedir is /var/lib, _localstatedir is /var -# _sharedstatedir used here as home directory for newly created user caddy -# If not redefined build fails with empty /usr/com not owned by any package -%if 0%{?suse_version} < 1500 -%define _sharedstatedir /var/lib -%endif - Name: caddy Version: 2.8.4 Release: 0 @@ -31,17 +23,16 @@ License: Apache-2.0 Group: Productivity/Networking/Web/Proxy URL: https://caddyserver.com/ -Source0: %{name}-%{version}.tar.gz +# bug https://github.com/golang/go/issues/29228 +Source0: https://github.com/caddyserver/%{name}/releases/download/v%{version}/%{name}_%{version}_buildable-artifact.tar.gz#/%{name}-%{version}.tar.gz Source1: vendor.tar.gz -Source2: Caddyfile +Source2: https://github.com/caddyserver/dist/raw/v%{version}/config/Caddyfile Source3: caddy.service -Source4: index.html -Source5: bash-completion -Source6: zsh-completion -Source7: caddy.sysusers +Source4: https://github.com/caddyserver/dist/raw/v%{version}/welcome/index.html +Source5: caddy.sysusers BuildRequires: systemd-rpm-macros BuildRequires: sysuser-tools -BuildRequires: golang(API) >= 1.21 +BuildRequires: golang(API) >= 1.22 %{?systemd_requires} %{sysusers_requires} @@ -49,22 +40,47 @@ Caddy is a powerful, extensible platform to serve your sites, services, and apps, written in Go. -It operates primarily at L4 (transport layer) and L7 (application layer) of -the OSI model, though it has the ability to work with other layers. +%package bash-completion +Summary: Bash Completion for %{name} +Group: System/Shells +Requires: bash-completion +Supplements: (%{name} and bash) +BuildArch: noarch + +%description bash-completion +Bash completion script for %{name}, generated during the build. + +%package zsh-completion +Summary: ZSH Completion for %{name} +Group: System/Shells +Supplements: (%{name} and zsh) +BuildArch: noarch + +%description zsh-completion +ZSH completion script for %{name}, generated during the build. + +%package fish-completion +Summary: Fish Completion for %{name} +Group: System/Shells +Supplements: (%{name} and fish) +BuildArch: noarch + +%description fish-completion +Fish shell completion script for %{name}, generated during the build. %prep -%autosetup -a 1 +%autosetup -a 1 -c %build # Build the binary. %ifnarch ppc64 export GOFLAGS="-buildmode=pie" %endif -go build ./cmd/%{name} +go build -v -x %check -# execute the binary as a basic check -./%{name} --help +# Execute binary and check version +[[ "$(./%{name} version)" == "v%{version}" ]] || exit 1 %install install -d %{buildroot}/%{_sbindir} @@ -76,7 +92,7 @@ # service install -D -p -m 0644 %{SOURCE3} %{buildroot}%{_unitdir}/%{name}.service ln -sf %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name} -install -Dpm0644 %{SOURCE7} %{buildroot}%{_sysusersdir}/%{name}.conf +install -Dpm0644 %{SOURCE5} %{buildroot}%{_sysusersdir}/%{name}.conf # data directory install -d -m 0750 %{buildroot}%{_sharedstatedir}/%{name} @@ -85,10 +101,21 @@ install -D -p -m 0644 %{SOURCE4} %{buildroot}%{_datadir}/%{name}/index.html # bash completion -install -D -p -m 0644 %{SOURCE5} %{buildroot}%{_datadir}/bash-completion/completions/%{name} -install -D -p -m 0644 %{SOURCE6} %{buildroot}%{_datadir}/zsh/site-functions/_%{name} +install -d -p -m 0755 %{buildroot}%{_datadir}/bash-completion/completions +./%{name} completion bash > %{buildroot}%{_datadir}/bash-completion/completions/%{name} + +# zsh completion +install -d -p -m 0755 %{buildroot}%{_datadir}/zsh/site-functions +./%{name} completion zsh > %{buildroot}%{_datadir}/zsh/site-functions/_%{name} + +# fish completion +install -d -p -m 0755 %{buildroot}%{_datadir}/fish/vendor_completions.d +./%{name} completion fish > %{buildroot}%{_datadir}/fish/vendor_completions.d/%{name}.fish -%sysusers_generate_pre %{SOURCE7} %{name} %{name}.conf +# man pages +./%{name} manpage --directory %{buildroot}%{_mandir}/man8 + +%sysusers_generate_pre %{SOURCE5} %{name} %{name}.conf %pre -f %{name}.pre %service_add_pre %{name}.service @@ -106,6 +133,7 @@ %files %license LICENSE %doc AUTHORS README.md +%{_mandir}/man8/caddy*.8%{?ext_man} %{_bindir}/%{name} %{_datadir}/%{name} %{_unitdir}/%{name}.service @@ -114,10 +142,13 @@ %dir %{_sysconfdir}/%{name} %config(noreplace) %{_sysconfdir}/%{name}/Caddyfile %dir %attr(0750, %{name}, %{name}) %{_sharedstatedir}/%{name} -# filesystem owns all the parent directories here -%{_datadir}/bash-completion/completions/%{name} -# own parent directories in case zsh is not installed -%dir %{_datadir}/zsh -%dir %{_datadir}/zsh/site-functions -%{_datadir}/zsh/site-functions/_%{name} + +%files bash-completion +%{_datadir}/bash-completion + +%files fish-completion +%{_datadir}/fish + +%files zsh-completion +%{_datadir}/zsh ++++++ Caddyfile ++++++ --- /var/tmp/diff_new_pack.xF9b5f/_old 2024-06-14 19:07:39.619649662 +0200 +++ /var/tmp/diff_new_pack.xF9b5f/_new 2024-06-14 19:07:39.623649805 +0200 @@ -5,21 +5,22 @@ # # To use your own domain name (with automatic HTTPS), first make # sure your domain's A/AAAA DNS records are properly pointed to -# this machine's public IP, then replace the line below with your +# this machine's public IP, then replace ":80" below with your # domain name. -:80 -# Set this path to your site's directory. -root * /usr/share/caddy +:80 { + # Set this path to your site's directory. + root * /usr/share/caddy -# Enable the static file server. -file_server + # Enable the static file server. + file_server -# Another common task is to set up a reverse proxy: -# reverse_proxy localhost:8080 + # Another common task is to set up a reverse proxy: + # reverse_proxy localhost:8080 -# Or serve a PHP site through php-fpm: -# php_fastcgi localhost:9000 + # Or serve a PHP site through php-fpm: + # php_fastcgi localhost:9000 +} # Refer to the Caddy docs for more information: # https://caddyserver.com/docs/caddyfile ++++++ _service ++++++ --- /var/tmp/diff_new_pack.xF9b5f/_old 2024-06-14 19:07:39.659651084 +0200 +++ /var/tmp/diff_new_pack.xF9b5f/_new 2024-06-14 19:07:39.663651226 +0200 @@ -1,20 +1,8 @@ <services> -<service name="tar_scm" mode="manual"> - <param name="url">https://github.com/caddyserver/caddy.git</param> - <param name="scm">git</param> - <param name="filename">caddy</param> - <param name="versionformat">@PARENT_TAG@</param> - <param name="versionrewrite-pattern">v(.*)</param> - <param name="revision">v2.8.4</param> - <param name="changesgenerate">enable</param> -</service> - <service mode="manual" name="set_version"> - </service> - <service name="recompress" mode="manual"> - <param name="file">*.tar</param> - <param name="compression">gz</param> - </service> + <service name="download_files" mode="manual"/> <service name="go_modules" mode="manual"> + <param name="basename">./</param> + <param name="subdir">./</param> </service> </services> ++++++ caddy-2.8.4.tar.gz ++++++ /work/SRC/openSUSE:Factory/caddy/caddy-2.8.4.tar.gz /work/SRC/openSUSE:Factory/.caddy.new.19518/caddy-2.8.4.tar.gz differ: char 9, line 1 ++++++ index.html ++++++ ++++ 644 lines (skipped) ++++ between /work/SRC/openSUSE:Factory/caddy/index.html ++++ and /work/SRC/openSUSE:Factory/.caddy.new.19518/index.html ++++++ vendor.tar.gz ++++++ /work/SRC/openSUSE:Factory/caddy/vendor.tar.gz /work/SRC/openSUSE:Factory/.caddy.new.19518/vendor.tar.gz differ: char 5, line 1