Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] New package: forgejo-1.18.0
@ 2023-01-02 15:08 tranzystorek-io
  2023-01-02 15:59 ` [PR REVIEW] " paper42
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: tranzystorek-io @ 2023-01-02 15:08 UTC (permalink / raw)
  To: ml

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

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

https://github.com/tranzystorek-io/void-packages forgejo
https://github.com/void-linux/void-packages/pull/41410

New package: forgejo-1.18.0
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

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

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


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

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

From 4e451a25dca96505b16d5f561a685cc58ae28b6c Mon Sep 17 00:00:00 2001
From: Marcin Puc <tranzystorek.io@protonmail.com>
Date: Mon, 2 Jan 2023 14:18:23 +0100
Subject: [PATCH] New package: forgejo-1.18.0

---
 srcpkgs/forgejo/INSTALL               |   5 +
 srcpkgs/forgejo/files/forgejo/log/run |   1 +
 srcpkgs/forgejo/files/forgejo/run     |  10 ++
 srcpkgs/forgejo/patches/config.patch  | 129 ++++++++++++++++++++++++++
 srcpkgs/forgejo/template              |  36 +++++++
 5 files changed, 181 insertions(+)
 create mode 100644 srcpkgs/forgejo/INSTALL
 create mode 120000 srcpkgs/forgejo/files/forgejo/log/run
 create mode 100644 srcpkgs/forgejo/files/forgejo/run
 create mode 100644 srcpkgs/forgejo/patches/config.patch
 create mode 100644 srcpkgs/forgejo/template

diff --git a/srcpkgs/forgejo/INSTALL b/srcpkgs/forgejo/INSTALL
new file mode 100644
index 000000000000..e4e49e1acf0c
--- /dev/null
+++ b/srcpkgs/forgejo/INSTALL
@@ -0,0 +1,5 @@
+case "${ACTION}" in
+post)
+	chown _forgejo:_forgejo etc/forgejo.conf
+	;;
+esac
diff --git a/srcpkgs/forgejo/files/forgejo/log/run b/srcpkgs/forgejo/files/forgejo/log/run
new file mode 120000
index 000000000000..3a5b4a586051
--- /dev/null
+++ b/srcpkgs/forgejo/files/forgejo/log/run
@@ -0,0 +1 @@
+/usr/bin/vlogger
\ No newline at end of file
diff --git a/srcpkgs/forgejo/files/forgejo/run b/srcpkgs/forgejo/files/forgejo/run
new file mode 100644
index 000000000000..21de1b00fdd1
--- /dev/null
+++ b/srcpkgs/forgejo/files/forgejo/run
@@ -0,0 +1,10 @@
+#!/bin/sh
+set -e
+
+export USER=_forgejo
+export HOME=/var/lib/forgejo
+
+export GITEA_WORK_DIR="${HOME}"
+
+cd "${HOME}"
+exec chpst -u _forgejo:_forgejo forgejo web --config /etc/forgejo.conf 2>&1
diff --git a/srcpkgs/forgejo/patches/config.patch b/srcpkgs/forgejo/patches/config.patch
new file mode 100644
index 000000000000..dd1073c6e46c
--- /dev/null
+++ b/srcpkgs/forgejo/patches/config.patch
@@ -0,0 +1,129 @@
+diff --git a/custom/conf/app.example.ini b/custom/conf/app.example.ini
+index 3ca49cf..477c59b 100644
+--- a/custom/conf/app.example.ini
++++ b/custom/conf/app.example.ini
+@@ -15,7 +15,7 @@
+ APP_NAME = ; Gitea: Git with a cup of tea
+ ;;
+ ;; 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. Either "dev", "prod" or "test", default is "prod"
+ RUN_MODE = ; prod
+@@ -82,7 +82,7 @@ RUN_MODE = ; prod
+ ;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.
+@@ -121,7 +121,7 @@ RUN_MODE = ; prod
+ ;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
+ ;;
+ ;; 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.
+@@ -241,7 +241,7 @@ RUN_MODE = ; prod
+ ;;
+ ;; Root directory containing templates and static files.
+ ;; default is the path where Gitea is executed
+-;STATIC_ROOT_PATH =
++STATIC_ROOT_PATH = /var/lib/forgejo
+ ;;
+ ;; Default path for App data
+ ;APP_DATA_PATH = data
+@@ -304,10 +304,10 @@ LFS_JWT_SECRET =
+ ;;
+ ;; 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 = utf8mb4 ;either "utf8" or "utf8mb4", default is "utf8mb4".
+@@ -330,8 +330,8 @@ USER = root
+ ;;
+ ;; SQLite Configuration
+ ;;
+-;DB_TYPE = sqlite3
+-;PATH= ; defaults to data/gitea.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
+ ;;
+@@ -508,7 +508,7 @@ ENABLE = true
+ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+ ;; Root path for the log files - defaults to %(GITEA_WORK_DIR)/log
+-;ROOT_PATH =
++ROOT_PATH = /var/log/forgejo
+ ;;
+ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+ ;; Main Logger
+@@ -840,7 +840,7 @@ ROUTER = console
+ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+ ;; Root path for storing all repository data. By default, it is set to %(APP_DATA_PATH)/gitea-repositories.
+ ;; A relative path is interpreted as %(GITEA_WORK_DIR)/%(ROOT)
+-;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
+@@ -938,7 +938,7 @@ ROUTER = console
+ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+ ;;
+ ;; 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
+ 
+ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+@@ -950,7 +950,7 @@ ROUTER = console
+ ;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 =
+@@ -1299,7 +1299,7 @@ ROUTER = console
+ ;ISSUE_INDEXER_TYPE = bleve
+ ;;
+ ;; Issue indexer storage path, available when ISSUE_INDEXER_TYPE is bleve
+-;ISSUE_INDEXER_PATH = indexers/issues.bleve
++ISSUE_INDEXER_PATH = /var/lib/forgejo/indexers/issues.bleve
+ ;;
+ ;; Issue indexer connection string, available when ISSUE_INDEXER_TYPE is elasticsearch
+ ;ISSUE_INDEXER_CONN_STR = http://elastic:changeme@localhost:9200
+@@ -1698,7 +1698,7 @@ ROUTER = console
+ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+ ;;
+-;AVATAR_UPLOAD_PATH = data/avatars
++AVATAR_UPLOAD_PATH = /var/lib/forgejo/data/avatars
+ ;REPOSITORY_AVATAR_UPLOAD_PATH = data/repo-avatars
+ ;;
+ ;; How Gitea deals with missing repository avatars
+@@ -2366,7 +2366,7 @@ ROUTER = console
+ ;STORAGE_TYPE = local
+ ;;
+ ;; Where your lfs files reside, default is data/lfs.
+-;PATH = data/lfs
++PATH = /var/lib/forgejo/data/lfs
+ 
+ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
diff --git a/srcpkgs/forgejo/template b/srcpkgs/forgejo/template
new file mode 100644
index 000000000000..22dda943a7b7
--- /dev/null
+++ b/srcpkgs/forgejo/template
@@ -0,0 +1,36 @@
+# Template file for 'forgejo'
+pkgname=forgejo
+version=1.18.0
+revision=1
+_forgejo_revision=1
+_forgejo_asset="c829784c-3b85-4996-9dc6-09e12e40a93a"
+build_style=go
+go_import_path="code.gitea.io/gitea"
+go_ldflags="-X main.Version=${version}"
+go_build_tags="bindata pam sqlite tidb"
+hostmakedepends="go-bindata"
+makedepends="pam-devel sqlite-devel"
+depends="bash git"
+short_desc="Self-hosted lightweight software forge"
+maintainer="Marcin Puc <tranzystorek.io@protonmail.com>"
+license="MIT"
+homepage="https://forgejo.org/"
+changelog="https://codeberg.org/forgejo/forgejo/raw/branch/forgejo/RELEASE-NOTES.md"
+distfiles="https://codeberg.org/attachments/${_forgejo_asset}>forgejo-src-${version}-${_forgejo_revision}.tar.gz"
+checksum=e366d1d7c4f901357284f7a3787a4e4e478fe95c18bb91c57de8bca0c8d1272f
+
+system_accounts="_forgejo"
+_forgejo_homedir="/var/lib/forgejo"
+_forgejo_descr="Self-hosted lightweight software forge service"
+_forgejo_shell="/bin/bash"
+make_dirs="/var/lib/forgejo 0755 _forgejo _forgejo
+ /var/log/forgejo 0755 _forgejo root"
+conf_files="/etc/forgejo.conf"
+
+post_install() {
+	vinstall custom/conf/app.example.ini 640 etc forgejo.conf
+	vlicense LICENSE
+	vsv forgejo
+
+	mv "${DESTDIR}/usr/bin"/{gitea,forgejo}
+}

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

* Re: [PR REVIEW] New package: forgejo-1.18.0
  2023-01-02 15:08 [PR PATCH] New package: forgejo-1.18.0 tranzystorek-io
@ 2023-01-02 15:59 ` paper42
  2023-01-02 16:02 ` tranzystorek-io
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: paper42 @ 2023-01-02 15:59 UTC (permalink / raw)
  To: ml

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

New review comment by paper42 on void-packages repository

https://github.com/void-linux/void-packages/pull/41410#discussion_r1060108722

Comment:
is it really still called GITEA_WORK_DIR?

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

* Re: [PR REVIEW] New package: forgejo-1.18.0
  2023-01-02 15:08 [PR PATCH] New package: forgejo-1.18.0 tranzystorek-io
  2023-01-02 15:59 ` [PR REVIEW] " paper42
@ 2023-01-02 16:02 ` tranzystorek-io
  2023-01-13 14:42 ` tranzystorek-io
  2023-01-13 14:42 ` [PR PATCH] [Closed]: " tranzystorek-io
  3 siblings, 0 replies; 5+ messages in thread
From: tranzystorek-io @ 2023-01-02 16:02 UTC (permalink / raw)
  To: ml

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

New review comment by tranzystorek-io on void-packages repository

https://github.com/void-linux/void-packages/pull/41410#discussion_r1060109703

Comment:
afaik yes, many things were left unchanged to enable easier migration from gitea

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

* Re: New package: forgejo-1.18.0
  2023-01-02 15:08 [PR PATCH] New package: forgejo-1.18.0 tranzystorek-io
  2023-01-02 15:59 ` [PR REVIEW] " paper42
  2023-01-02 16:02 ` tranzystorek-io
@ 2023-01-13 14:42 ` tranzystorek-io
  2023-01-13 14:42 ` [PR PATCH] [Closed]: " tranzystorek-io
  3 siblings, 0 replies; 5+ messages in thread
From: tranzystorek-io @ 2023-01-13 14:42 UTC (permalink / raw)
  To: ml

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

New comment by tranzystorek-io on void-packages repository

https://github.com/void-linux/void-packages/pull/41410#issuecomment-1381953735

Comment:
Closing as forgejo is too close to be a gitea clone to warrant packaging

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

* Re: [PR PATCH] [Closed]: New package: forgejo-1.18.0
  2023-01-02 15:08 [PR PATCH] New package: forgejo-1.18.0 tranzystorek-io
                   ` (2 preceding siblings ...)
  2023-01-13 14:42 ` tranzystorek-io
@ 2023-01-13 14:42 ` tranzystorek-io
  3 siblings, 0 replies; 5+ messages in thread
From: tranzystorek-io @ 2023-01-13 14:42 UTC (permalink / raw)
  To: ml

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

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

New package: forgejo-1.18.0
https://github.com/void-linux/void-packages/pull/41410

Description:
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

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

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


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

end of thread, other threads:[~2023-01-13 14:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-02 15:08 [PR PATCH] New package: forgejo-1.18.0 tranzystorek-io
2023-01-02 15:59 ` [PR REVIEW] " paper42
2023-01-02 16:02 ` tranzystorek-io
2023-01-13 14:42 ` tranzystorek-io
2023-01-13 14:42 ` [PR PATCH] [Closed]: " tranzystorek-io

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).