Created attachment 256908 [details] PATCH Gitea lacks the ability to host static pages from Git. The Codeberg Pages Server addresses this lack by implementing a standalone service that connects to Gitea via API. It is suitable to be deployed by other Gitea instances, too, to offer static pages hosting to their users. https://codeberg.org/Codeberg/pages-server
Created attachment 256956 [details] NEW PATCH for codeberg-pages-server (2025/01/25) This new PATCH mainly modifies the rc and log file names to match the package name (using - instead of _).
Created attachment 257008 [details] PATCH (2025/01/26) Sorry, I am still learning how to package software for FreeBSD ports. After completing another port (devel/woodpecker-[server,agent,cli]) today, I realized that some parts of this port could be improved, so I submitt a patch version again.
Created attachment 258052 [details] PATCH: codeberg-pages-server V6.2.1 Update to v6.2.1
Created attachment 258075 [details] PATCH: Codeberg Pages Server v6.2.1
Build error in poudriere 14.2 amd64: ===> Building for codeberg-pages-server-6.2.1 cd /wrkdirs/usr/ports/www/codeberg-pages-server/work/pages-server && PATH=/wrkdirs/usr/ports/www/codeberg-pages-server/work/bin:/wrkdirs/usr/ports/www/codeberg-pages-server/work/.bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/nonexistent/bin just build-tag v6.2.1 CGO_ENABLED=1 go build -tags 'sqlite sqlite_unlock_notify netgo' -trimpath -ldflags '-s -w -X "codeberg.org/codeberg/pages/server/version.Version=v6.2.1" -extldflags "-static" -linkmode external' -v -o build/codeberg-pages-server ./ go: go: could not create module cache: mkdir /nonexistent: permission denied error: Recipe `build-tag` failed on line 16 with exit code 1 *** Error code 1 Stop. make: stopped in /usr/ports/www/codeberg-pages-server
Ignore last message - it was from build not with last patch. But this error is with last patch: go: downloading go1.24.0 (freebsd/amd64) Port require go 1.24.
This is go 1.24-devel, but it installs go-devel and gofmt-devel instead go124 and gofmt124.
Another build error: /bin/sh: /usr/ports/www/codeberg-pages-server/files/config-generater.sh: Permission denied *** Error code 126 Stop. make: stopped in /usr/ports/www/codeberg-pages-server About go 1.24: go1.24.0 (released 2025-02-11) https://tip.golang.org/doc/devel/release#go1.24.0 This port require go 1.24 - you can create PR with request to create new port lang/go124 and better with patches: (1) copy from lang/go-devel to lang/go124, (2) update to release 1.24.0.
(In reply to Vladimir Druzenko from comment #6) Recenlty I created a PR for a port i want to maintain and it downloads go 1.24 during build in poudriere, isn't that allowed and should i use the go 1.24 port if it's become available?
(In reply to Vladimir Druzenko from comment #8) There is already a PR for go124. See bug #284764
(In reply to Yusuf Yaman from comment #9) If port exist - use from ports. (In reply to Yusuf Yaman from comment #10) Thanks.
Created attachment 258168 [details] PATCH: Codeberg Pages Server v6.2.1-r1 This patch fixed: - replace go version in go.mod from 1.24 to 1.23 - replace config-generator.sh with config-generator.go, remove bash from build dependent. - Better commit message. - Format Makefile with portclippy.
Is it your email: orville@anislet.dev? Use same email in bugzilla and in MAINTAINER field.
It still downloads go 1.24.0: [/usr/ports/www/codeberg-pages-server]$ make makesum ===> License EUPL12 accepted by the user ===> License EUPL12 accepted by the user ===> codeberg-pages-server-6.2.1 depends on file: /usr/local/sbin/pkg - found ===> codeberg-pages-server-6.2.1 depends on file: /usr/local/bin/go123 - found ===> codeberg-pages-server-6.2.1 depends on package: ca_root_nss>0 - found => v6.2.1.zip doesn't seem to exist in /usr/ports/distfiles/go/www_codeberg-pages-server/codeberg-pages-server-v6.2.1. => Attempting to fetch https://codeberg.org/Codeberg/pages-server/archive/v6.2.1.zip v6.2.1.zip 183 kB 871 kBps 00s => go.mod doesn't seem to exist in /usr/ports/distfiles/go/www_codeberg-pages-server/codeberg-pages-server-v6.2.1. => Attempting to fetch https://codeberg.org/Codeberg/pages-server/archive/go.mod fetch: https://codeberg.org/Codeberg/pages-server/archive/go.mod: Internal Server Error => Attempting to fetch https://codeberg.org/Codeberg/pages-server/raw/tag/v6.2.1/go.mod go.mod 12 kB 62 MBps 00s ===> Fetching all distfiles required by codeberg-pages-server-6.2.1 for building ===> Fetching codeberg.org/codeberg/pages dependencies go: downloading go1.24.0 (freebsd/amd64)
Created attachment 258355 [details] PATCH: Codeberg Pages Server v6.2.1-r2
Comment on attachment 258355 [details] PATCH: Codeberg Pages Server v6.2.1-r2 This patch fixed unwanted download of go 1.24.0 during fetch stage by add go-pre-post-fetch step to patch go.mod used by go-post-fetch step. replace "go 1.24.0" with "go 1.23.0"
(In reply to Vladimir Druzenko from comment #13) Yes that is my email. I haven't migrate my email server to FreeBSD yet, I'll change it soon as the server is migrated.
Once go124 is in ports, this port does not need extra patches "1.24=>1.23". Build errors in poudriere 14.2 amd64: codeberg.org/codeberg/pages/server/certificates codeberg.org/codeberg/pages/server/acme codeberg.org/codeberg/pages/server codeberg.org/codeberg/pages failed to initialize build cache at /nonexistent/.cache/go-build: mkdir /nonexistent: permission denied *** Error code 1
(In reply to Vladimir Druzenko from comment #18) Did not encounter the same error, poudriere with ccache enabled, 14.2 jail, arm64. codeberg.org/codeberg/pages/server/certificates codeberg.org/codeberg/pages/server/acme codeberg.org/codeberg/pages/server codeberg.org/codeberg/pages =========================================================================== =>> Checking for filesystem violations... done =======================<phase: run-depends >============================ ===== env: DEVELOPER_MODE=yes USE_PACKAGE_DEPENDS_ONLY=1 USER=root UID=0 GID=0 =========================================================================== =>> Recording filesystem state for prestage... done =======================<phase: stage >============================ ===== env: DEVELOPER_MODE=yes STRICT_DEPENDS=yes USER=root UID=0 GID=0 ===> Staging for codeberg-pages-server-6.2.1_2 ===> Generating temporary packing list This is really confusing...especially since I'm using the go.mk's build stage directly instead of building my own build stage.
(In reply to Orville Q. Song from comment #19) OK I see it now. I did not enable the build with non root option. Though it still confusing as I'm using the default build stage provided by go.mk...
Created attachment 258649 [details] PATCH: Codeberg Pages Server v6.2.1-r3 This PATCH fix: - using go 1.24 - fix permission issue during post-build stage with non-root user.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=0397053f21db7b5f249b4c837b1a8ee9159a32f0 commit 0397053f21db7b5f249b4c837b1a8ee9159a32f0 Author: Orville Q. Song <orville@anislet.dev> AuthorDate: 2025-03-15 18:27:43 +0000 Commit: Vladimir Druzenko <vvd@FreeBSD.org> CommitDate: 2025-03-15 18:29:58 +0000 www/codeberg-pages-server: New port: "Github Pages"-like pages server for Gitea/Forgejo Gitea lacks the ability to host static pages from Git. The Codeberg Pages Server addresses this lack by implementing a standalone service that connects to Gitea via API. It is suitable to be deployed by other Gitea instances, too, to offer static pages hosting to their users. https://codeberg.org/Codeberg/pages-server PR: 284267 www/Makefile | 1 + www/codeberg-pages-server/Makefile (new) | 47 ++++++++++++ www/codeberg-pages-server/distinfo (new) | 5 ++ .../files/codeberg-pages-server.in (new) | 46 ++++++++++++ .../files/config-generater.go (new) | 83 ++++++++++++++++++++++ www/codeberg-pages-server/pkg-descr (new) | 5 ++ www/codeberg-pages-server/pkg-plist (new) | 4 ++ 7 files changed, 191 insertions(+)
Thanks.
(In reply to Vladimir Druzenko from comment #23) Thank you.