Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] New package: forgejo-9.0.0
@ 2024-10-19 16:29 return42
  2024-10-19 16:32 ` ahesford
                   ` (21 more replies)
  0 siblings, 22 replies; 23+ messages in thread
From: return42 @ 2024-10-19 16:29 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 3061 bytes --]

There is a new pull request by return42 against master on the void-packages repository

https://github.com/return42/void-packages 41815-new-pkg-forgejo
https://github.com/void-linux/void-packages/pull/52694

New package: forgejo-9.0.0
Implemented with [4] and [5] under the pillow / but I have to note; this is my first PR to add a package --> be patient with me ;)

Initial settings are taken from [1] and [2], compilation options are taken from [3].

- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**

- I tested the changes in this PR: **YES**::

    $ xlint forgejo

      $ ./xbps-src update-check forgejo
      forgejo-8.0.3 -> forgejo-9.0.0.

- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds)::

      $ ./xbps-src clean
      $ ./xbps-src pkg forgejo
      $ ./xbps-src pkg -a armv7hf-musl forgejo  # cross build
      $ ./xbps-src pkg -a armv6l-musl forgejo   # cross build

      $ xi -f forgejo
      $ sudo ln -s /etc/sv/forgejo /var/service/

      $ xdg-open http://localhost:3000/

Create an git-admin account::

      name: git-admin
      e-mail: git-admin@localhost
      password: git-admin@localhost

The user `_forgejo` with `$HOME: /var/lib/forgejo/` was created, to which **all data & repositories** belong::

      $ sudo ls -la /var/lib/forgejo/

Configure PAM authentification in http://localhost:3000/admin/auths/new ::

      Authentication Type : PAM
      Name : PAM system-auth@<hostname>
      PAM Service Name :  system-auth
      PAM Email Domain : <hostname>

To work, give read-access to `/etc/shadow`::

      $ ls -l /etc/shadow
      -r-------- 1 root root 662  4. Okt 15:44 /etc/shadow
      $ chmod go+r /etc/shadow
      $ ls -l /etc/shadow
      -r--r--r-- 1 root root 662  4. Okt 15:44 /etc/shadow

Use an existing account to test PAM login:

- http://localhost:3000/user/login

If you don't have an existing account, create one `test-user`::

      $ useradd -U -p "$(openssl passwd welcome)" -G users,floppy,audio,video,cdrom,optical,kvm,xbuilder test-user

Fully deinstall::

      $ sudo rm /var/service/forgejo
      $ sudo xbps-remove -vfy forgejo
      $ sudo userdel -fr _forgejo   # WARN: deletes **all data & repositories**
      $ sudo userdel -fr test-user  # if you have created one, otherwise skip
      $ sudo chmod go-r /etc/shadow
      $ ./xbps-src clean

----

[1] https://forgejo.org/docs/latest/admin/config-cheat-sheet/
[2] https://forgejo.org/docs/latest/admin/installation-binary/
[3] https://forgejo.org/docs/next/contributor/from-source/#installation-from-source
[4] https://xbps-src-tutorials.github.io/packaging/j4-dmenu-desktop.html
[5] https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md



A patch file from https://github.com/void-linux/void-packages/pull/52694.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-41815-new-pkg-forgejo-52694.patch --]
[-- Type: text/x-diff, Size: 14969 bytes --]

From 527635b5bf68b73e0bed323a9528e2554d30f72b Mon Sep 17 00:00:00 2001
From: Markus Heiser <markus.heiser@darmarit.de>
Date: Thu, 10 Oct 2024 14:33:54 +0200
Subject: [PATCH] New package: forgejo-9.0.0

Implemented with [4] and [5] under the pillow / but I have to note; this is my
first PR to add a package --> be patient with me ;)

Initial settings are taken from [1] and [2], compilation options are taken from
[3].

- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**

- I tested the changes in this PR: **YES**::

    $ xlint forgejo

      $ ./xbps-src update-check forgejo
      forgejo-8.0.3 -> forgejo-9.0.0.

- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds)::

      $ ./xbps-src clean
      $ ./xbps-src pkg forgejo
      $ ./xbps-src pkg -a armv7hf-musl forgejo  # cross build
      $ ./xbps-src pkg -a armv6l-musl forgejo   # cross build

      $ xi -f forgejo
      $ sudo ln -s /etc/sv/forgejo /var/service/

      $ xdg-open http://localhost:3000/

Create an git-admin account::

      name: git-admin
      e-mail: git-admin@localhost
      password: git-admin@localhost

The user `_forgejo` with `$HOME: /var/lib/forgejo/` was created,
to which **all data & repositories** belong::

      $ sudo ls -la /var/lib/forgejo/

Configure PAM authentification in http://localhost:3000/admin/auths/new ::

      Authentication Type : PAM
      Name : PAM system-auth@<hostname>
      PAM Service Name :  system-auth
      PAM Email Domain : <hostname>

To work, give read-access to `/etc/shadow`::

      $ ls -l /etc/shadow
      -r-------- 1 root root 662  4. Okt 15:44 /etc/shadow
      $ chmod go+r /etc/shadow
      $ ls -l /etc/shadow
      -r--r--r-- 1 root root 662  4. Okt 15:44 /etc/shadow

Use an existing account to test PAM login:

- http://localhost:3000/user/login

If you don't have an existing account, create one `test-user`::

      $ useradd -U -p "$(openssl passwd welcome)" -G users,floppy,audio,video,cdrom,optical,kvm,xbuilder test-user

Fully deinstall::

      $ sudo rm /var/service/forgejo
      $ sudo xbps-remove -vfy forgejo
      $ sudo userdel -fr _forgejo   # WARN: deletes **all data & repositories**
      $ sudo userdel -fr test-user  # if you have created one, otherwise skip
      $ sudo chmod go-r /etc/shadow
      $ ./xbps-src clean

----

[1] https://forgejo.org/docs/latest/admin/config-cheat-sheet/
[2] https://forgejo.org/docs/latest/admin/installation-binary/
[3] https://forgejo.org/docs/next/contributor/from-source/#installation-from-source
[4] https://xbps-src-tutorials.github.io/packaging/j4-dmenu-desktop.html
[5] https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
---
 srcpkgs/forgejo/INSTALL              |   7 ++
 srcpkgs/forgejo/files/forgejo/run    |  13 ++
 srcpkgs/forgejo/patches/config.patch | 173 +++++++++++++++++++++++++++
 srcpkgs/forgejo/template             |  70 +++++++++++
 srcpkgs/forgejo/update               |   3 +
 5 files changed, 266 insertions(+)
 create mode 100644 srcpkgs/forgejo/INSTALL
 create mode 100644 srcpkgs/forgejo/files/forgejo/run
 create mode 100644 srcpkgs/forgejo/patches/config.patch
 create mode 100644 srcpkgs/forgejo/template
 create mode 100644 srcpkgs/forgejo/update

diff --git a/srcpkgs/forgejo/INSTALL b/srcpkgs/forgejo/INSTALL
new file mode 100644
index 00000000000000..04098638c25f20
--- /dev/null
+++ b/srcpkgs/forgejo/INSTALL
@@ -0,0 +1,7 @@
+# SPDX-License-Identifier: AGPL-3.0-or-later
+
+case "${ACTION}" in
+post)
+	chown _forgejo:_forgejo etc/forgejo/app.ini
+	;;
+esac
diff --git a/srcpkgs/forgejo/files/forgejo/run b/srcpkgs/forgejo/files/forgejo/run
new file mode 100644
index 00000000000000..06f3617963bd20
--- /dev/null
+++ b/srcpkgs/forgejo/files/forgejo/run
@@ -0,0 +1,13 @@
+#!/bin/sh
+exec 2>&1
+
+# USER and HOME are needed because forgejo doesn't actually check the user it
+# runs as, but instead just grabs the variables from the variables.
+export USER=_forgejo
+export HOME=/var/lib/forgejo
+
+# forgejo needs to run from its home for SSH to work properly
+export FORGEJO_WORK_DIR="${HOME}"
+
+cd "${HOME}"
+exec chpst -u _forgejo:_forgejo forgejo web --config /etc/forgejo/app.ini 2>&1
diff --git a/srcpkgs/forgejo/patches/config.patch b/srcpkgs/forgejo/patches/config.patch
new file mode 100644
index 00000000000000..228b14187bf8b0
--- /dev/null
+++ b/srcpkgs/forgejo/patches/config.patch
@@ -0,0 +1,173 @@
+diff --git a/custom/conf/app.example.ini b/custom/conf/app.example.ini
+index cdb7629887..b2c65063c0 100644
+--- a/custom/conf/app.example.ini
++++ b/custom/conf/app.example.ini
+@@ -51,11 +51,11 @@ APP_NAME = ; Forgejo: Beyond coding. We Forge.
+ ;APP_DISPLAY_NAME_FORMAT = {APP_NAME}: {APP_SLOGAN}
+ ;;
+ ;; RUN_USER will automatically detect the current user - but you can set it here change it if you run locally
+-RUN_USER = ; git
++RUN_USER = _forgejo
+ ;;
+ ;; Application run mode, affects performance and debugging: "dev" or "prod", default is "prod"
+ ;; Mode "dev" makes Gitea easier to develop and debug, values other than "dev" are treated as "prod" which is for production use.
+-;RUN_MODE = prod
++RUN_MODE = prod
+ ;;
+ ;; The working directory, see the comment of AppWorkPath above
+ ;WORK_PATH =
+@@ -125,7 +125,7 @@ RUN_USER = ; git
+ ;PER_WRITE_PER_KB_TIMEOUT = 30s
+ ;;
+ ;; Permission for unix socket
+-;UNIX_SOCKET_PERMISSION = 666
++UNIX_SOCKET_PERMISSION = 660
+ ;;
+ ;; Local (DMZ) URL for Gitea workers (such as SSH update) accessing web service. In
+ ;; most cases you do not need to change the default value. Alter it only if
+@@ -167,7 +167,7 @@ RUN_USER = ; git
+ ;SSH_LISTEN_PORT = %(SSH_PORT)s
+ ;;
+ ;; Root path of SSH directory, default is '~/.ssh', but you have to use '/home/git/.ssh'.
+-;SSH_ROOT_PATH =
++SSH_ROOT_PATH = /var/lib/forgejo/.ssh
+ ;;
+ ;; Gitea will create a authorized_keys file by default when it is not using the internal ssh server
+ ;; If you intend to use the AuthorizedKeysCommand functionality then you should turn this off.
+@@ -289,7 +289,7 @@ RUN_USER = ; git
+ ;;
+ ;; Root directory containing templates and static files.
+ ;; default is the path where Gitea is executed
+-;STATIC_ROOT_PATH = ; Will default to the built-in value _`StaticRootPath`_
++STATIC_ROOT_PATH = /var/lib/forgejo
+ ;;
+ ;; Default path for App data
+ ;APP_DATA_PATH = data ; relative paths will be made absolute with _`AppWorkPath`_
+@@ -355,10 +355,10 @@ RUN_USER = ; git
+ ;;
+ ;; MySQL Configuration
+ ;;
+-DB_TYPE = mysql
+-HOST = 127.0.0.1:3306 ; can use socket e.g. /var/run/mysqld/mysqld.sock
+-NAME = gitea
+-USER = root
++;DB_TYPE = mysql
++;HOST = 127.0.0.1:3306 ; can use socket e.g. /var/run/mysqld/mysqld.sock
++;NAME = gitea
++;USER = root
+ ;PASSWD = ;Use PASSWD = `your password` for quoting if you use special characters in the password.
+ ;SSL_MODE = false ; either "false" (default), "true", or "skip-verify"
+ ;CHARSET_COLLATION = ; Empty as default, Gitea will try to find a case-sensitive collation. Don't change it unless you clearly know what you need.
+@@ -379,8 +379,8 @@ USER = root
+ ;;
+ ;; SQLite Configuration
+ ;;
+-;DB_TYPE = sqlite3
+-;PATH= ; defaults to data/forgejo.db
++DB_TYPE = sqlite3
++PATH=/var/lib/forgejo/data/forgejo.db
+ ;SQLITE_TIMEOUT = ; Query timeout defaults to: 500
+ ;SQLITE_JOURNAL_MODE = ; defaults to sqlite database default (often DELETE), can be used to enable WAL mode. https://www.sqlite.org/pragma.html#pragma_journal_mode
+ ;;
+@@ -579,7 +579,7 @@ ENABLED = true
+ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+ ;; Root path for the log files - defaults to %(GITEA_WORK_DIR)/log
+-;ROOT_PATH =
++ROOT_PATH = /var/log/forgejo
+ ;;
+ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+ ;; Main Logger
+@@ -942,11 +942,11 @@ LEVEL = Info
+ ;GENERATOR_URL_TEMPLATE = https://img.shields.io/badge/{{.label}}-{{.text}}-{{.color}}
+ 
+ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+-;[repository]
++[repository]
+ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+ ;; Root path for storing all repository data. By default, it is set to %(APP_DATA_PATH)s/gitea-repositories.
+ ;; A relative path is interpreted as _`AppWorkPath`_/%(ROOT)s
+-;ROOT =
++ROOT = /var/lib/forgejo/repositories
+ ;;
+ ;; The script type this server supports. Usually this is `bash`, but some users report that only `sh` is available.
+ ;SCRIPT_TYPE = bash
+@@ -1048,16 +1048,16 @@ LEVEL = Info
+ 
+ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+-;[repository.local]
++[repository.local]
+ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+ ;;
+ ;; Path for local repository copy. Defaults to `tmp/local-repo` (content gets deleted on gitea restart)
+-;LOCAL_COPY_PATH = tmp/local-repo
++LOCAL_COPY_PATH = /var/lib/forgejo/tmp/local-repo
+ 
+ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+-;[repository.upload]
++[repository.upload]
+ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+ ;;
+@@ -1065,7 +1065,7 @@ LEVEL = Info
+ ;ENABLED = true
+ ;;
+ ;; Path for uploads. Defaults to `data/tmp/uploads` (content gets deleted on gitea restart)
+-;TEMP_PATH = data/tmp/uploads
++TEMP_PATH = /var/lib/forgejo/uploads
+ ;;
+ ;; Comma-separated list of allowed file extensions (`.zip`), mime types (`text/plain`) or wildcard type (`image/*`, `audio/*`, `video/*`). Empty value or `*/*` allows all types.
+ ;ALLOWED_TYPES =
+@@ -1433,7 +1433,7 @@ LEVEL = Info
+ 
+ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+-;[indexer]
++[indexer]
+ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+ ;;
+@@ -1444,7 +1444,7 @@ LEVEL = Info
+ ;ISSUE_INDEXER_TYPE = bleve
+ ;;
+ ;; Issue indexer storage path, available when ISSUE_INDEXER_TYPE is bleve
+-;ISSUE_INDEXER_PATH = indexers/issues.bleve ; Relative paths will be made absolute against _`AppWorkPath`_.
++ISSUE_INDEXER_PATH = /var/lib/forgejo/indexers/issues.bleve
+ ;;
+ ;; Issue indexer connection string, available when ISSUE_INDEXER_TYPE is elasticsearch (e.g. http://elastic:password@localhost:9200) or meilisearch (e.g. http://:apikey@localhost:7700)
+ ;ISSUE_INDEXER_CONN_STR =
+@@ -1959,7 +1959,7 @@ LEVEL = Info
+ ;; Url lookup for the minio bucket only available when STORAGE_TYPE is `minio`
+ ;; Available values: auto, dns, path
+ ;; If empty, it behaves the same as "auto" was set
+-;MINIO_BUCKET_LOOKUP = 
++;MINIO_BUCKET_LOOKUP =
+ ;;
+ ;; Minio location to create bucket only available when STORAGE_TYPE is `minio`
+ ;MINIO_LOCATION = us-east-1
+@@ -2637,11 +2637,11 @@ LEVEL = Info
+ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+ ;; lfs storage will override storage
+ ;;
+-;[lfs]
++[lfs]
+ ;STORAGE_TYPE = local
+ ;;
+ ;; Where your lfs files reside, default is data/lfs.
+-;PATH = data/lfs
++PATH = /var/lib/forgejo/data/lfs
+ ;;
+ ;; override the minio base path if storage type is minio
+ ;MINIO_BASE_PATH = lfs/
+@@ -2680,7 +2680,7 @@ LEVEL = Info
+ ;; Url lookup for the minio bucket only available when STORAGE_TYPE is `minio`
+ ;; Available values: auto, dns, path
+ ;; If empty, it behaves the same as "auto" was set
+-;MINIO_BUCKET_LOOKUP = 
++;MINIO_BUCKET_LOOKUP =
+ ;;
+ ;; Minio location to create bucket only available when STORAGE_TYPE is `minio`
+ ;MINIO_LOCATION = us-east-1
diff --git a/srcpkgs/forgejo/template b/srcpkgs/forgejo/template
new file mode 100644
index 00000000000000..d49ae8fce874dd
--- /dev/null
+++ b/srcpkgs/forgejo/template
@@ -0,0 +1,70 @@
+# Template file for 'forgejo'
+# SPDX-License-Identifier: GPL-3.0-or-later
+#
+# - [Installation from source](https://forgejo.org/docs/next/contributor/from-source)
+# - [Forgejo v9.0 is GPLv3+](https://codeberg.org/forgejo/forgejo/commit/94631c)
+
+homepage="https://forgejo.org"
+
+# https://github.com/void-linux/void-packages/blob/master/Manual.md#available_vars
+
+# Forgejo accepts contributions compatible with the GPLv3-or-later license.
+license="GPL-3.0-or-later"
+
+maintainer="Markus Heiser <markus.heiser@darmarit.de>"
+pkgname=forgejo
+# https://forgejo.org/docs/next/contributor/release/#release-cycle
+version=9.0.0
+revision=1
+_version="$(echo "${version}" | tr '.' '_')"
+short_desc="Forgejo is a self-hosted lightweight software forge"
+
+# go-bindata is from commit (dated in Oct 23, 2015):
+# - https://github.com/jteeuwen/go-bindata/commit/a0ff2567cf
+# - https://github.com/void-linux/void-packages/blob/059fd3968/srcpkgs/go-bindata/template#L5
+# go-bindata/go-bindata is more updated compared to jteeuwen/go-bindata
+# - https://github.com/go-bindata/go-bindata/releases
+
+hostmakedepends="go-bindata"
+makedepends="sqlite-devel pam-devel"
+depends="git git-lfs bash"
+
+distfiles="https://codeberg.org/forgejo/forgejo/releases/download/v${version}/forgejo-src-${version}.tar.gz"
+checksum=21364d6c1635711189f25da5dc343b3b28e8ade20a5f00202301ccc364adc1d2
+changelog="https://codeberg.org/forgejo/forgejo/src/branch/forgejo/RELEASE-NOTES.md#${_version}"
+
+# - https://github.com/void-linux/void-packages/blob/master/Manual.md#build-style-scripts
+# - https://github.com/void-linux/void-packages/blob/master/Manual.md#go-packages
+build_style=go
+go_ldflags=" -X main.Version=${version}"
+
+# forgejo is still module code.gitea.io/gitea
+go_import_path="code.gitea.io/gitea"
+
+# Follow forgejo default release build and enable pam support additionally
+go_build_tags="bindata timetzdata sqlite sqlite_unlock_notify pam"
+
+# https://github.com/void-linux/void-packages/blob/master/Manual.md#system-accounts
+system_accounts="_forgejo"
+_forgejo_homedir="/var/lib/forgejo"
+_forgejo_shell="/bin/bash" # Proper shell needed for ssh support
+
+make_dirs="\
+	/var/lib/forgejo 0750 _forgejo _forgejo
+	/var/log/forgejo 0755 _forgejo root
+"
+
+conf_files="/etc/forgejo/app.ini"
+
+# export BUILDDIR="${XBPS_BUILDDIR}/${pkgname}-${version}"
+
+do_install() {
+	# install code.gitea.io/gitea in /usr/bin/forgejo
+	vbin "${GOPATH}/bin/gitea" forgejo
+}
+
+post_install() {
+	# https://github.com/void-linux/void-packages/blob/master/Manual.md#global-functions
+	vsv forgejo
+	vinstall custom/conf/app.example.ini 0640 /etc/forgejo app.ini
+}
diff --git a/srcpkgs/forgejo/update b/srcpkgs/forgejo/update
new file mode 100644
index 00000000000000..a98722a58af826
--- /dev/null
+++ b/srcpkgs/forgejo/update
@@ -0,0 +1,3 @@
+site="https://codeberg.org/forgejo/forgejo/tags"
+pattern='/forgejo/forgejo/archive/v\K[\d.]+(?=tar.gz)'
+ignore="*-dev"
\ No newline at end of file

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: New package: forgejo-9.0.0
  2024-10-19 16:29 [PR PATCH] New package: forgejo-9.0.0 return42
@ 2024-10-19 16:32 ` ahesford
  2024-10-19 16:35 ` return42
                   ` (20 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: ahesford @ 2024-10-19 16:32 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 281 bytes --]

New comment by ahesford on void-packages repository

https://github.com/void-linux/void-packages/pull/52694#issuecomment-2424053178

Comment:
Holy fuck! If forgejo really requires global read access to `/etc/shadow`, it is disqualified from inclusion in Void right from the start.

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: New package: forgejo-9.0.0
  2024-10-19 16:29 [PR PATCH] New package: forgejo-9.0.0 return42
  2024-10-19 16:32 ` ahesford
@ 2024-10-19 16:35 ` return42
  2024-10-19 16:40 ` ahesford
                   ` (19 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: return42 @ 2024-10-19 16:35 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 519 bytes --]

New comment by return42 on void-packages repository

https://github.com/void-linux/void-packages/pull/52694#issuecomment-2424058038

Comment:
> Holy fuck! If forgejo really requires global read access to `/etc/shadow`, it is disqualified from inclusion in Void right from the start.

Only PAM authentication needs this .. at least I haven't found a other solution for PAM.

But you don't need to install  PAM authentication ... its just an example I gave above / I can remove the example from the (commit) message.

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: New package: forgejo-9.0.0
  2024-10-19 16:29 [PR PATCH] New package: forgejo-9.0.0 return42
  2024-10-19 16:32 ` ahesford
  2024-10-19 16:35 ` return42
@ 2024-10-19 16:40 ` ahesford
  2024-10-20  5:18 ` [PR PATCH] [Updated] " return42
                   ` (18 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: ahesford @ 2024-10-19 16:40 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 308 bytes --]

New comment by ahesford on void-packages repository

https://github.com/void-linux/void-packages/pull/52694#issuecomment-2424061542

Comment:
Something is definitely wrong with that setup. Also, none of that stuff should be in the commit message; your commit message should consist of the subject line only.

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PR PATCH] [Updated] New package: forgejo-9.0.0
  2024-10-19 16:29 [PR PATCH] New package: forgejo-9.0.0 return42
                   ` (2 preceding siblings ...)
  2024-10-19 16:40 ` ahesford
@ 2024-10-20  5:18 ` return42
  2024-10-20  5:23 ` return42
                   ` (17 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: return42 @ 2024-10-20  5:18 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 3089 bytes --]

There is an updated pull request by return42 against master on the void-packages repository

https://github.com/return42/void-packages 41815-new-pkg-forgejo
https://github.com/void-linux/void-packages/pull/52694

New package: forgejo-9.0.0
Implemented with [4] and [5] under the pillow / but I have to note; this is my first PR to add a package --> be patient with me ;)

Initial settings are taken from [1] and [2], compilation options are taken from [3].

- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**

- I tested the changes in this PR: **YES**::

      $ xlint forgejo

      $ ./xbps-src update-check forgejo
      forgejo-8.0.3 -> forgejo-9.0.0.

- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds)::

      $ ./xbps-src clean
      $ ./xbps-src pkg forgejo
      $ ./xbps-src pkg -a armv7hf-musl forgejo  # cross build
      $ ./xbps-src pkg -a armv6l-musl forgejo   # cross build

      $ xi -f forgejo
      $ sudo ln -s /etc/sv/forgejo /var/service/

      $ xdg-open http://localhost:3000/

Create an git-admin account::

      name: git-admin
      e-mail: git-admin@localhost
      password: git-admin@localhost

The user `_forgejo` with `$HOME: /var/lib/forgejo/` was created, to which **all data & repositories** belong::

      $ sudo ls -la /var/lib/forgejo/


#### Example: Configure PAM authentification in http://localhost:3000/admin/auths/new ::

      Authentication Type : PAM
      Name : PAM system-auth@<hostname>
      PAM Service Name :  system-auth
      PAM Email Domain : <hostname>

To work, give read-access to `/etc/shadow`::

      $ ls -l /etc/shadow
      -r-------- 1 root root 662  4. Okt 15:44 /etc/shadow
      $ chmod go+r /etc/shadow
      $ ls -l /etc/shadow
      -r--r--r-- 1 root root 662  4. Okt 15:44 /etc/shadow

Use an existing account to test PAM login:

- http://localhost:3000/user/login

If you don't have an existing account, create one `test-user`::

      $ useradd -U -p "$(openssl passwd welcome)" -G users,floppy,audio,video,cdrom,optical,kvm,xbuilder test-user

#### Fully deinstall::

      $ sudo rm /var/service/forgejo
      $ sudo xbps-remove -vfy forgejo
      $ sudo userdel -fr _forgejo   # WARN: deletes **all data & repositories**
      $ sudo userdel -fr test-user  # if you have created one, otherwise skip
      $ sudo chmod go-r /etc/shadow
      $ ./xbps-src clean

----

[1] https://forgejo.org/docs/latest/admin/config-cheat-sheet/
[2] https://forgejo.org/docs/latest/admin/installation-binary/
[3] https://forgejo.org/docs/next/contributor/from-source/#installation-from-source
[4] https://xbps-src-tutorials.github.io/packaging/j4-dmenu-desktop.html
[5] https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md



A patch file from https://github.com/void-linux/void-packages/pull/52694.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-41815-new-pkg-forgejo-52694.patch --]
[-- Type: text/x-diff, Size: 13648 bytes --]

From 270a33cfece9db19d9b260c30be25e8d1a50e570 Mon Sep 17 00:00:00 2001
From: Markus Heiser <markus.heiser@darmarit.de>
Date: Thu, 10 Oct 2024 14:33:54 +0200
Subject: [PATCH] New package: forgejo-9.0.0

Implemented with [4] and [5] under the pillow / but I have to note; this is my
first PR to add a package --> be patient with me ;)

Initial settings are taken from [1] and [2], compilation options are taken from
[3].

- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**

- I tested the changes in this PR: **YES**::

    $ xlint forgejo

      $ ./xbps-src update-check forgejo
      forgejo-8.0.3 -> forgejo-9.0.0.

- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds)::

      $ ./xbps-src clean
      $ ./xbps-src pkg forgejo
      $ ./xbps-src pkg -a armv7hf-musl forgejo  # cross build
      $ ./xbps-src pkg -a armv6l-musl forgejo   # cross build

      $ xi -f forgejo
      $ sudo ln -s /etc/sv/forgejo /var/service/

      $ xdg-open http://localhost:3000/

----

[1] https://forgejo.org/docs/latest/admin/config-cheat-sheet/
[2] https://forgejo.org/docs/latest/admin/installation-binary/
[3] https://forgejo.org/docs/next/contributor/from-source/#installation-from-source
[4] https://xbps-src-tutorials.github.io/packaging/j4-dmenu-desktop.html
[5] https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
---
 srcpkgs/forgejo/INSTALL              |   7 ++
 srcpkgs/forgejo/files/forgejo/run    |  13 ++
 srcpkgs/forgejo/patches/config.patch | 173 +++++++++++++++++++++++++++
 srcpkgs/forgejo/template             |  70 +++++++++++
 srcpkgs/forgejo/update               |   3 +
 5 files changed, 266 insertions(+)
 create mode 100644 srcpkgs/forgejo/INSTALL
 create mode 100644 srcpkgs/forgejo/files/forgejo/run
 create mode 100644 srcpkgs/forgejo/patches/config.patch
 create mode 100644 srcpkgs/forgejo/template
 create mode 100644 srcpkgs/forgejo/update

diff --git a/srcpkgs/forgejo/INSTALL b/srcpkgs/forgejo/INSTALL
new file mode 100644
index 00000000000000..04098638c25f20
--- /dev/null
+++ b/srcpkgs/forgejo/INSTALL
@@ -0,0 +1,7 @@
+# SPDX-License-Identifier: AGPL-3.0-or-later
+
+case "${ACTION}" in
+post)
+	chown _forgejo:_forgejo etc/forgejo/app.ini
+	;;
+esac
diff --git a/srcpkgs/forgejo/files/forgejo/run b/srcpkgs/forgejo/files/forgejo/run
new file mode 100644
index 00000000000000..06f3617963bd20
--- /dev/null
+++ b/srcpkgs/forgejo/files/forgejo/run
@@ -0,0 +1,13 @@
+#!/bin/sh
+exec 2>&1
+
+# USER and HOME are needed because forgejo doesn't actually check the user it
+# runs as, but instead just grabs the variables from the variables.
+export USER=_forgejo
+export HOME=/var/lib/forgejo
+
+# forgejo needs to run from its home for SSH to work properly
+export FORGEJO_WORK_DIR="${HOME}"
+
+cd "${HOME}"
+exec chpst -u _forgejo:_forgejo forgejo web --config /etc/forgejo/app.ini 2>&1
diff --git a/srcpkgs/forgejo/patches/config.patch b/srcpkgs/forgejo/patches/config.patch
new file mode 100644
index 00000000000000..228b14187bf8b0
--- /dev/null
+++ b/srcpkgs/forgejo/patches/config.patch
@@ -0,0 +1,173 @@
+diff --git a/custom/conf/app.example.ini b/custom/conf/app.example.ini
+index cdb7629887..b2c65063c0 100644
+--- a/custom/conf/app.example.ini
++++ b/custom/conf/app.example.ini
+@@ -51,11 +51,11 @@ APP_NAME = ; Forgejo: Beyond coding. We Forge.
+ ;APP_DISPLAY_NAME_FORMAT = {APP_NAME}: {APP_SLOGAN}
+ ;;
+ ;; RUN_USER will automatically detect the current user - but you can set it here change it if you run locally
+-RUN_USER = ; git
++RUN_USER = _forgejo
+ ;;
+ ;; Application run mode, affects performance and debugging: "dev" or "prod", default is "prod"
+ ;; Mode "dev" makes Gitea easier to develop and debug, values other than "dev" are treated as "prod" which is for production use.
+-;RUN_MODE = prod
++RUN_MODE = prod
+ ;;
+ ;; The working directory, see the comment of AppWorkPath above
+ ;WORK_PATH =
+@@ -125,7 +125,7 @@ RUN_USER = ; git
+ ;PER_WRITE_PER_KB_TIMEOUT = 30s
+ ;;
+ ;; Permission for unix socket
+-;UNIX_SOCKET_PERMISSION = 666
++UNIX_SOCKET_PERMISSION = 660
+ ;;
+ ;; Local (DMZ) URL for Gitea workers (such as SSH update) accessing web service. In
+ ;; most cases you do not need to change the default value. Alter it only if
+@@ -167,7 +167,7 @@ RUN_USER = ; git
+ ;SSH_LISTEN_PORT = %(SSH_PORT)s
+ ;;
+ ;; Root path of SSH directory, default is '~/.ssh', but you have to use '/home/git/.ssh'.
+-;SSH_ROOT_PATH =
++SSH_ROOT_PATH = /var/lib/forgejo/.ssh
+ ;;
+ ;; Gitea will create a authorized_keys file by default when it is not using the internal ssh server
+ ;; If you intend to use the AuthorizedKeysCommand functionality then you should turn this off.
+@@ -289,7 +289,7 @@ RUN_USER = ; git
+ ;;
+ ;; Root directory containing templates and static files.
+ ;; default is the path where Gitea is executed
+-;STATIC_ROOT_PATH = ; Will default to the built-in value _`StaticRootPath`_
++STATIC_ROOT_PATH = /var/lib/forgejo
+ ;;
+ ;; Default path for App data
+ ;APP_DATA_PATH = data ; relative paths will be made absolute with _`AppWorkPath`_
+@@ -355,10 +355,10 @@ RUN_USER = ; git
+ ;;
+ ;; MySQL Configuration
+ ;;
+-DB_TYPE = mysql
+-HOST = 127.0.0.1:3306 ; can use socket e.g. /var/run/mysqld/mysqld.sock
+-NAME = gitea
+-USER = root
++;DB_TYPE = mysql
++;HOST = 127.0.0.1:3306 ; can use socket e.g. /var/run/mysqld/mysqld.sock
++;NAME = gitea
++;USER = root
+ ;PASSWD = ;Use PASSWD = `your password` for quoting if you use special characters in the password.
+ ;SSL_MODE = false ; either "false" (default), "true", or "skip-verify"
+ ;CHARSET_COLLATION = ; Empty as default, Gitea will try to find a case-sensitive collation. Don't change it unless you clearly know what you need.
+@@ -379,8 +379,8 @@ USER = root
+ ;;
+ ;; SQLite Configuration
+ ;;
+-;DB_TYPE = sqlite3
+-;PATH= ; defaults to data/forgejo.db
++DB_TYPE = sqlite3
++PATH=/var/lib/forgejo/data/forgejo.db
+ ;SQLITE_TIMEOUT = ; Query timeout defaults to: 500
+ ;SQLITE_JOURNAL_MODE = ; defaults to sqlite database default (often DELETE), can be used to enable WAL mode. https://www.sqlite.org/pragma.html#pragma_journal_mode
+ ;;
+@@ -579,7 +579,7 @@ ENABLED = true
+ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+ ;; Root path for the log files - defaults to %(GITEA_WORK_DIR)/log
+-;ROOT_PATH =
++ROOT_PATH = /var/log/forgejo
+ ;;
+ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+ ;; Main Logger
+@@ -942,11 +942,11 @@ LEVEL = Info
+ ;GENERATOR_URL_TEMPLATE = https://img.shields.io/badge/{{.label}}-{{.text}}-{{.color}}
+ 
+ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+-;[repository]
++[repository]
+ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+ ;; Root path for storing all repository data. By default, it is set to %(APP_DATA_PATH)s/gitea-repositories.
+ ;; A relative path is interpreted as _`AppWorkPath`_/%(ROOT)s
+-;ROOT =
++ROOT = /var/lib/forgejo/repositories
+ ;;
+ ;; The script type this server supports. Usually this is `bash`, but some users report that only `sh` is available.
+ ;SCRIPT_TYPE = bash
+@@ -1048,16 +1048,16 @@ LEVEL = Info
+ 
+ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+-;[repository.local]
++[repository.local]
+ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+ ;;
+ ;; Path for local repository copy. Defaults to `tmp/local-repo` (content gets deleted on gitea restart)
+-;LOCAL_COPY_PATH = tmp/local-repo
++LOCAL_COPY_PATH = /var/lib/forgejo/tmp/local-repo
+ 
+ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+-;[repository.upload]
++[repository.upload]
+ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+ ;;
+@@ -1065,7 +1065,7 @@ LEVEL = Info
+ ;ENABLED = true
+ ;;
+ ;; Path for uploads. Defaults to `data/tmp/uploads` (content gets deleted on gitea restart)
+-;TEMP_PATH = data/tmp/uploads
++TEMP_PATH = /var/lib/forgejo/uploads
+ ;;
+ ;; Comma-separated list of allowed file extensions (`.zip`), mime types (`text/plain`) or wildcard type (`image/*`, `audio/*`, `video/*`). Empty value or `*/*` allows all types.
+ ;ALLOWED_TYPES =
+@@ -1433,7 +1433,7 @@ LEVEL = Info
+ 
+ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+-;[indexer]
++[indexer]
+ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+ ;;
+@@ -1444,7 +1444,7 @@ LEVEL = Info
+ ;ISSUE_INDEXER_TYPE = bleve
+ ;;
+ ;; Issue indexer storage path, available when ISSUE_INDEXER_TYPE is bleve
+-;ISSUE_INDEXER_PATH = indexers/issues.bleve ; Relative paths will be made absolute against _`AppWorkPath`_.
++ISSUE_INDEXER_PATH = /var/lib/forgejo/indexers/issues.bleve
+ ;;
+ ;; Issue indexer connection string, available when ISSUE_INDEXER_TYPE is elasticsearch (e.g. http://elastic:password@localhost:9200) or meilisearch (e.g. http://:apikey@localhost:7700)
+ ;ISSUE_INDEXER_CONN_STR =
+@@ -1959,7 +1959,7 @@ LEVEL = Info
+ ;; Url lookup for the minio bucket only available when STORAGE_TYPE is `minio`
+ ;; Available values: auto, dns, path
+ ;; If empty, it behaves the same as "auto" was set
+-;MINIO_BUCKET_LOOKUP = 
++;MINIO_BUCKET_LOOKUP =
+ ;;
+ ;; Minio location to create bucket only available when STORAGE_TYPE is `minio`
+ ;MINIO_LOCATION = us-east-1
+@@ -2637,11 +2637,11 @@ LEVEL = Info
+ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+ ;; lfs storage will override storage
+ ;;
+-;[lfs]
++[lfs]
+ ;STORAGE_TYPE = local
+ ;;
+ ;; Where your lfs files reside, default is data/lfs.
+-;PATH = data/lfs
++PATH = /var/lib/forgejo/data/lfs
+ ;;
+ ;; override the minio base path if storage type is minio
+ ;MINIO_BASE_PATH = lfs/
+@@ -2680,7 +2680,7 @@ LEVEL = Info
+ ;; Url lookup for the minio bucket only available when STORAGE_TYPE is `minio`
+ ;; Available values: auto, dns, path
+ ;; If empty, it behaves the same as "auto" was set
+-;MINIO_BUCKET_LOOKUP = 
++;MINIO_BUCKET_LOOKUP =
+ ;;
+ ;; Minio location to create bucket only available when STORAGE_TYPE is `minio`
+ ;MINIO_LOCATION = us-east-1
diff --git a/srcpkgs/forgejo/template b/srcpkgs/forgejo/template
new file mode 100644
index 00000000000000..d49ae8fce874dd
--- /dev/null
+++ b/srcpkgs/forgejo/template
@@ -0,0 +1,70 @@
+# Template file for 'forgejo'
+# SPDX-License-Identifier: GPL-3.0-or-later
+#
+# - [Installation from source](https://forgejo.org/docs/next/contributor/from-source)
+# - [Forgejo v9.0 is GPLv3+](https://codeberg.org/forgejo/forgejo/commit/94631c)
+
+homepage="https://forgejo.org"
+
+# https://github.com/void-linux/void-packages/blob/master/Manual.md#available_vars
+
+# Forgejo accepts contributions compatible with the GPLv3-or-later license.
+license="GPL-3.0-or-later"
+
+maintainer="Markus Heiser <markus.heiser@darmarit.de>"
+pkgname=forgejo
+# https://forgejo.org/docs/next/contributor/release/#release-cycle
+version=9.0.0
+revision=1
+_version="$(echo "${version}" | tr '.' '_')"
+short_desc="Forgejo is a self-hosted lightweight software forge"
+
+# go-bindata is from commit (dated in Oct 23, 2015):
+# - https://github.com/jteeuwen/go-bindata/commit/a0ff2567cf
+# - https://github.com/void-linux/void-packages/blob/059fd3968/srcpkgs/go-bindata/template#L5
+# go-bindata/go-bindata is more updated compared to jteeuwen/go-bindata
+# - https://github.com/go-bindata/go-bindata/releases
+
+hostmakedepends="go-bindata"
+makedepends="sqlite-devel pam-devel"
+depends="git git-lfs bash"
+
+distfiles="https://codeberg.org/forgejo/forgejo/releases/download/v${version}/forgejo-src-${version}.tar.gz"
+checksum=21364d6c1635711189f25da5dc343b3b28e8ade20a5f00202301ccc364adc1d2
+changelog="https://codeberg.org/forgejo/forgejo/src/branch/forgejo/RELEASE-NOTES.md#${_version}"
+
+# - https://github.com/void-linux/void-packages/blob/master/Manual.md#build-style-scripts
+# - https://github.com/void-linux/void-packages/blob/master/Manual.md#go-packages
+build_style=go
+go_ldflags=" -X main.Version=${version}"
+
+# forgejo is still module code.gitea.io/gitea
+go_import_path="code.gitea.io/gitea"
+
+# Follow forgejo default release build and enable pam support additionally
+go_build_tags="bindata timetzdata sqlite sqlite_unlock_notify pam"
+
+# https://github.com/void-linux/void-packages/blob/master/Manual.md#system-accounts
+system_accounts="_forgejo"
+_forgejo_homedir="/var/lib/forgejo"
+_forgejo_shell="/bin/bash" # Proper shell needed for ssh support
+
+make_dirs="\
+	/var/lib/forgejo 0750 _forgejo _forgejo
+	/var/log/forgejo 0755 _forgejo root
+"
+
+conf_files="/etc/forgejo/app.ini"
+
+# export BUILDDIR="${XBPS_BUILDDIR}/${pkgname}-${version}"
+
+do_install() {
+	# install code.gitea.io/gitea in /usr/bin/forgejo
+	vbin "${GOPATH}/bin/gitea" forgejo
+}
+
+post_install() {
+	# https://github.com/void-linux/void-packages/blob/master/Manual.md#global-functions
+	vsv forgejo
+	vinstall custom/conf/app.example.ini 0640 /etc/forgejo app.ini
+}
diff --git a/srcpkgs/forgejo/update b/srcpkgs/forgejo/update
new file mode 100644
index 00000000000000..a98722a58af826
--- /dev/null
+++ b/srcpkgs/forgejo/update
@@ -0,0 +1,3 @@
+site="https://codeberg.org/forgejo/forgejo/tags"
+pattern='/forgejo/forgejo/archive/v\K[\d.]+(?=tar.gz)'
+ignore="*-dev"
\ No newline at end of file

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: New package: forgejo-9.0.0
  2024-10-19 16:29 [PR PATCH] New package: forgejo-9.0.0 return42
                   ` (3 preceding siblings ...)
  2024-10-20  5:18 ` [PR PATCH] [Updated] " return42
@ 2024-10-20  5:23 ` return42
  2024-12-07  8:52 ` return42
                   ` (16 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: return42 @ 2024-10-20  5:23 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 311 bytes --]

New comment by return42 on void-packages repository

https://github.com/void-linux/void-packages/pull/52694#issuecomment-2424603594

Comment:
> none of that stuff should be in the commit message; your commit message should consist of the subject line only.

Removed not related notes from the commit message.

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: New package: forgejo-9.0.0
  2024-10-19 16:29 [PR PATCH] New package: forgejo-9.0.0 return42
                   ` (4 preceding siblings ...)
  2024-10-20  5:23 ` return42
@ 2024-12-07  8:52 ` return42
  2024-12-07 21:07 ` [PR REVIEW] " ahesford
                   ` (15 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: return42 @ 2024-12-07  8:52 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 357 bytes --]

New comment by return42 on void-packages repository

https://github.com/void-linux/void-packages/pull/52694#issuecomment-2424603594

Comment:
> none of that stuff should be in the commit message; your commit message should consist of the subject line only.

Removed not related notes from the commit message.

@ahesford is there anything else I can do?

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PR REVIEW] New package: forgejo-9.0.0
  2024-10-19 16:29 [PR PATCH] New package: forgejo-9.0.0 return42
                   ` (9 preceding siblings ...)
  2024-12-07 21:07 ` ahesford
@ 2024-12-07 21:07 ` ahesford
  2024-12-07 21:07 ` ahesford
                   ` (10 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: ahesford @ 2024-12-07 21:07 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 248 bytes --]

New review comment by ahesford on void-packages repository

https://github.com/void-linux/void-packages/pull/52694#discussion_r1874562264

Comment:
Drop the anchor here, it isn't necessary and allows you to drop the `_version` variable altogether.

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PR REVIEW] New package: forgejo-9.0.0
  2024-10-19 16:29 [PR PATCH] New package: forgejo-9.0.0 return42
                   ` (7 preceding siblings ...)
  2024-12-07 21:07 ` ahesford
@ 2024-12-07 21:07 ` ahesford
  2024-12-07 21:07 ` ahesford
                   ` (12 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: ahesford @ 2024-12-07 21:07 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 187 bytes --]

New review comment by ahesford on void-packages repository

https://github.com/void-linux/void-packages/pull/52694#discussion_r1874563164

Comment:
Why is this not a regular tag archive?

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PR REVIEW] New package: forgejo-9.0.0
  2024-10-19 16:29 [PR PATCH] New package: forgejo-9.0.0 return42
                   ` (13 preceding siblings ...)
  2024-12-07 21:07 ` ahesford
@ 2024-12-07 21:07 ` ahesford
  2024-12-07 21:11 ` ahesford
                   ` (6 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: ahesford @ 2024-12-07 21:07 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 202 bytes --]

New review comment by ahesford on void-packages repository

https://github.com/void-linux/void-packages/pull/52694#discussion_r1874563876

Comment:
What does this mean? It will not work with `/bin/sh`?

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PR REVIEW] New package: forgejo-9.0.0
  2024-10-19 16:29 [PR PATCH] New package: forgejo-9.0.0 return42
                   ` (6 preceding siblings ...)
  2024-12-07 21:07 ` [PR REVIEW] " ahesford
@ 2024-12-07 21:07 ` ahesford
  2024-12-07 21:07 ` ahesford
                   ` (13 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: ahesford @ 2024-12-07 21:07 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 206 bytes --]

New review comment by ahesford on void-packages repository

https://github.com/void-linux/void-packages/pull/52694#discussion_r1874563284

Comment:
Does the update checker not function without these lines?

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PR REVIEW] New package: forgejo-9.0.0
  2024-10-19 16:29 [PR PATCH] New package: forgejo-9.0.0 return42
                   ` (12 preceding siblings ...)
  2024-12-07 21:07 ` ahesford
@ 2024-12-07 21:07 ` ahesford
  2024-12-07 21:07 ` ahesford
                   ` (7 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: ahesford @ 2024-12-07 21:07 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 238 bytes --]

New review comment by ahesford on void-packages repository

https://github.com/void-linux/void-packages/pull/52694#discussion_r1874563715

Comment:
```suggestion
# runs as, but instead just grabs the variables from the environment.
```

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PR REVIEW] New package: forgejo-9.0.0
  2024-10-19 16:29 [PR PATCH] New package: forgejo-9.0.0 return42
                   ` (8 preceding siblings ...)
  2024-12-07 21:07 ` ahesford
@ 2024-12-07 21:07 ` ahesford
  2024-12-07 21:07 ` ahesford
                   ` (11 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: ahesford @ 2024-12-07 21:07 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 269 bytes --]

New review comment by ahesford on void-packages repository

https://github.com/void-linux/void-packages/pull/52694#discussion_r1874563525

Comment:
Don't refer to the package in the description.
```suggestion
short_desc="Self-hosted, lightweight software forge"
```

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PR REVIEW] New package: forgejo-9.0.0
  2024-10-19 16:29 [PR PATCH] New package: forgejo-9.0.0 return42
                   ` (5 preceding siblings ...)
  2024-12-07  8:52 ` return42
@ 2024-12-07 21:07 ` ahesford
  2024-12-07 21:07 ` ahesford
                   ` (14 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: ahesford @ 2024-12-07 21:07 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 215 bytes --]

New review comment by ahesford on void-packages repository

https://github.com/void-linux/void-packages/pull/52694#discussion_r1874563983

Comment:
Does this really depend on `bash`? Is `git-lfs` strictly required?

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PR REVIEW] New package: forgejo-9.0.0
  2024-10-19 16:29 [PR PATCH] New package: forgejo-9.0.0 return42
                   ` (10 preceding siblings ...)
  2024-12-07 21:07 ` ahesford
@ 2024-12-07 21:07 ` ahesford
  2024-12-07 21:07 ` ahesford
                   ` (9 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: ahesford @ 2024-12-07 21:07 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 477 bytes --]

New review comment by ahesford on void-packages repository

https://github.com/void-linux/void-packages/pull/52694#discussion_r1874562973

Comment:
We should not be installing their example configuration as a default configuration, and we also shouldn't be editing their example configuration to impose contrary assumptions. Drop the patch and the unnecessary `INSTALL` script, leave this as an example installed with `vsconf`, and let users configure their own installations.

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PR REVIEW] New package: forgejo-9.0.0
  2024-10-19 16:29 [PR PATCH] New package: forgejo-9.0.0 return42
                   ` (11 preceding siblings ...)
  2024-12-07 21:07 ` ahesford
@ 2024-12-07 21:07 ` ahesford
  2024-12-07 21:07 ` ahesford
                   ` (8 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: ahesford @ 2024-12-07 21:07 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 596 bytes --]

New review comment by ahesford on void-packages repository

https://github.com/void-linux/void-packages/pull/52694#discussion_r1874562549

Comment:
Upstream continues to call this `gitea` for a reason---I think it has something to do with module compatibility. We shouldn't be overriding their suggestions on executable names. It creates unnecessary differences with other installations and deviation from upstream documentation and expectations.

This will need a conflict with `gitea`. Also, without a rename, you can just drop `do_install` and let the default implementation work its magic.

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PR REVIEW] New package: forgejo-9.0.0
  2024-10-19 16:29 [PR PATCH] New package: forgejo-9.0.0 return42
                   ` (14 preceding siblings ...)
  2024-12-07 21:07 ` ahesford
@ 2024-12-07 21:11 ` ahesford
  2024-12-09 13:32 ` return42
                   ` (5 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: ahesford @ 2024-12-07 21:11 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 503 bytes --]

New review comment by ahesford on void-packages repository

https://github.com/void-linux/void-packages/pull/52694#discussion_r1874562973

Comment:
We should not be installing their example configuration as a default configuration, and we also shouldn't be editing their example configuration to impose contrary assumptions. Drop the patch, the unnecessary `INSTALL` script, the `conf_files` definition, leave this as an example installed with `vsconf`, and let users configure their own installations.

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PR REVIEW] New package: forgejo-9.0.0
  2024-10-19 16:29 [PR PATCH] New package: forgejo-9.0.0 return42
                   ` (15 preceding siblings ...)
  2024-12-07 21:11 ` ahesford
@ 2024-12-09 13:32 ` return42
  2024-12-09 13:33 ` return42
                   ` (4 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: return42 @ 2024-12-09 13:32 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 673 bytes --]

New review comment by return42 on void-packages repository

https://github.com/void-linux/void-packages/pull/52694#discussion_r1875988312

Comment:
From the installation description of forgejo [ref](https://forgejo.org/docs/latest/admin/installation-binary/):

> Make sure `git` and `git-lfs` are installed on your system.

And for the user creation they use: `useradd --system --shell /bin/bash` further I read:

> Forgejo will run as that user, and when accessing git through SSH (which is the default)

*.. this shell is used.* .. Not sure these SSH tasks do need a bash, but a shell is needed .. and I want to stay with the official installation instruction.


^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PR REVIEW] New package: forgejo-9.0.0
  2024-10-19 16:29 [PR PATCH] New package: forgejo-9.0.0 return42
                   ` (16 preceding siblings ...)
  2024-12-09 13:32 ` return42
@ 2024-12-09 13:33 ` return42
  2024-12-09 13:43 ` ahesford
                   ` (3 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: return42 @ 2024-12-09 13:33 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 239 bytes --]

New review comment by return42 on void-packages repository

https://github.com/void-linux/void-packages/pull/52694#discussion_r1875989456

Comment:
See below in https://github.com/void-linux/void-packages/pull/52694#discussion_r1875988312

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PR REVIEW] New package: forgejo-9.0.0
  2024-10-19 16:29 [PR PATCH] New package: forgejo-9.0.0 return42
                   ` (17 preceding siblings ...)
  2024-12-09 13:33 ` return42
@ 2024-12-09 13:43 ` ahesford
  2025-03-10  1:51 ` github-actions
                   ` (2 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: ahesford @ 2024-12-09 13:43 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 282 bytes --]

New review comment by ahesford on void-packages repository

https://github.com/void-linux/void-packages/pull/52694#discussion_r1876003321

Comment:
We should not prefer or require bash when it isn't strictly required, because some people may wish to run installations without bash.

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: New package: forgejo-9.0.0
  2024-10-19 16:29 [PR PATCH] New package: forgejo-9.0.0 return42
                   ` (18 preceding siblings ...)
  2024-12-09 13:43 ` ahesford
@ 2025-03-10  1:51 ` github-actions
  2025-03-10  7:08 ` [PR PATCH] [Closed]: " return42
  2025-03-10  7:08 ` return42
  21 siblings, 0 replies; 23+ messages in thread
From: github-actions @ 2025-03-10  1:51 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 305 bytes --]

New comment by github-actions[bot] on void-packages repository

https://github.com/void-linux/void-packages/pull/52694#issuecomment-2709239890

Comment:
Pull Requests become stale 90 days after last activity and are closed 14 days after that.  If this pull request is still relevant bump it or assign it.

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PR PATCH] [Closed]: New package: forgejo-9.0.0
  2024-10-19 16:29 [PR PATCH] New package: forgejo-9.0.0 return42
                   ` (19 preceding siblings ...)
  2025-03-10  1:51 ` github-actions
@ 2025-03-10  7:08 ` return42
  2025-03-10  7:08 ` return42
  21 siblings, 0 replies; 23+ messages in thread
From: return42 @ 2025-03-10  7:08 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1914 bytes --]

There's a closed pull request on the void-packages repository

New package: forgejo-9.0.0
https://github.com/void-linux/void-packages/pull/52694

Description:
Implemented with [4] and [5] under the pillow / but I have to note; this is my first PR to add a package --> be patient with me ;)

Initial settings are taken from [1] and [2], compilation options are taken from [3].

- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**

- I tested the changes in this PR: **YES**::

      $ xlint forgejo

      $ ./xbps-src update-check forgejo
      forgejo-9.0.0 -> forgejo-9.0.1.
      forgejo-9.0.0 -> forgejo-9.0.2.

- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds)::

      $ ./xbps-src clean
      $ ./xbps-src pkg forgejo
      $ ./xbps-src pkg -a armv7hf-musl forgejo  # cross build
      $ ./xbps-src pkg -a armv6l-musl forgejo   # cross build

      $ xi -f forgejo
      $ sudo ln -s /etc/sv/forgejo /var/service/

      $ xdg-open http://localhost:3000/
      ...
      $ xbps-remove -vfy forgejo


----

[1] https://forgejo.org/docs/latest/admin/config-cheat-sheet/
[2] https://forgejo.org/docs/latest/admin/installation-binary/
[3] https://forgejo.org/docs/next/contributor/from-source/#installation-from-source
[4] https://xbps-src-tutorials.github.io/packaging/j4-dmenu-desktop.html
[5] https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md

----

`version`:
- https://forgejo.org/docs/next/contributor/release/#release-cycle

`build_style` and `go_ldflags`:
- https://github.com/void-linux/void-packages/blob/master/Manual.md#build-style-scripts
- https://github.com/void-linux/void-packages/blob/master/Manual.md#go-packages



^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: New package: forgejo-9.0.0
  2024-10-19 16:29 [PR PATCH] New package: forgejo-9.0.0 return42
                   ` (20 preceding siblings ...)
  2025-03-10  7:08 ` [PR PATCH] [Closed]: " return42
@ 2025-03-10  7:08 ` return42
  21 siblings, 0 replies; 23+ messages in thread
From: return42 @ 2025-03-10  7:08 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 251 bytes --]

New comment by return42 on void-packages repository

https://github.com/void-linux/void-packages/pull/52694#issuecomment-2709623612

Comment:
This PR needs more work, unfortunately I don't have the time at the moment ... I'm closing the PR / sorry ..

^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2025-03-10  7:08 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-10-19 16:29 [PR PATCH] New package: forgejo-9.0.0 return42
2024-10-19 16:32 ` ahesford
2024-10-19 16:35 ` return42
2024-10-19 16:40 ` ahesford
2024-10-20  5:18 ` [PR PATCH] [Updated] " return42
2024-10-20  5:23 ` return42
2024-12-07  8:52 ` return42
2024-12-07 21:07 ` [PR REVIEW] " ahesford
2024-12-07 21:07 ` ahesford
2024-12-07 21:07 ` ahesford
2024-12-07 21:07 ` ahesford
2024-12-07 21:07 ` ahesford
2024-12-07 21:07 ` ahesford
2024-12-07 21:07 ` ahesford
2024-12-07 21:07 ` ahesford
2024-12-07 21:07 ` ahesford
2024-12-07 21:11 ` ahesford
2024-12-09 13:32 ` return42
2024-12-09 13:33 ` return42
2024-12-09 13:43 ` ahesford
2025-03-10  1:51 ` github-actions
2025-03-10  7:08 ` [PR PATCH] [Closed]: " return42
2025-03-10  7:08 ` return42

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).