Github messages for voidlinux
 help / color / mirror / Atom feed
From: pfpulux <pfpulux@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] New package: forgejo-1.20.5
Date: Sun, 15 Oct 2023 14:54:43 +0200	[thread overview]
Message-ID: <20231015125443.d0EWd5r2tnFLG63K8FmBrhrnaOPeZa68buoMJGWvK10@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-46691@inbox.vuxu.org>

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

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

https://github.com/pfpulux/void-packages forgejo
https://github.com/void-linux/void-packages/pull/46691

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

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

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

<!-- 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/46691.patch is attached

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

From 6145cd6ad5e092c42878ced03f0de351a7a86562 Mon Sep 17 00:00:00 2001
From: Pulux <pulux@pf4sh.eu>
Date: Sun, 15 Oct 2023 11:45:41 +0200
Subject: [PATCH] New package: forgejo-1.20.5

---
 srcpkgs/forgejo/INSTALL              |  5 +++
 srcpkgs/forgejo/files/forgejo/run    | 13 ++++++++
 srcpkgs/forgejo/patches/config.patch | 36 ++++++++++++++++++++
 srcpkgs/forgejo/template             | 50 ++++++++++++++++++++++++++++
 4 files changed, 104 insertions(+)
 create mode 100644 srcpkgs/forgejo/INSTALL
 create mode 100755 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 0000000000000..e4e49e1acf0c6
--- /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/run b/srcpkgs/forgejo/files/forgejo/run
new file mode 100755
index 0000000000000..1be6bd4a8c199
--- /dev/null
+++ b/srcpkgs/forgejo/files/forgejo/run
@@ -0,0 +1,13 @@
+#!/bin/sh
+exec 2>&1
+
+# USER and HOME are needed because gitea 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 gitea 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 0000000000000..5269a555978df
--- /dev/null
+++ b/srcpkgs/forgejo/patches/config.patch
@@ -0,0 +1,36 @@
+--- gitea-1.20.0/custom/conf/app.example.ini.orig	2023-07-16 21:24:12.000000000 +0200
++++ gitea-1.20.0/custom/conf/app.example.ini	2023-10-15 08:51:01.186945949 +0200
+@@ -47,7 +47,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: "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.
+@@ -339,9 +339,9 @@
+ ;; 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".
+@@ -364,8 +364,8 @@
+ ;;
+ ;; 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
+ ;;
diff --git a/srcpkgs/forgejo/template b/srcpkgs/forgejo/template
new file mode 100644
index 0000000000000..539f05394bca3
--- /dev/null
+++ b/srcpkgs/forgejo/template
@@ -0,0 +1,50 @@
+# Template file for 'forgejo'
+pkgname=forgejo
+version=1.20.5
+revision=1
+_forgejo_tag="1-20-5-0"
+build_style=go
+go_import_path=code.gitea.io/gitea
+go_ldflags=" -X main.Version=${version}"
+# This could be done with build options, but these are built in with the
+# following justification.
+#   * bindata: running with things not all in the binary is not a
+#     supported distribution format by the forgejo upstream developers.
+#     That mode is only supported for development of forgejo within the
+#     source tree
+#   * sqlite: this is likely the database that everyone will use.  Only
+#     particularly large installations will want to go through the
+#     effort of setting up a real database server.
+#   * pam: PAM allows for authentication to varied external sources.
+#     Internal authentication supports the local database, OpenID, and
+#     LDAP, but basic other auth sources such as Kerberos and more
+#     exotic authenticators require PAM support to be useable.
+#   * tidb: This is an alternate database engine for users who would
+#     rather not use SQLite3 for some reason.  It is also potentially
+#     more resiliant to corrupted writes.
+go_build_tags="bindata sqlite pam tidb"
+hostmakedepends="go-bindata"
+makedepends="sqlite-devel pam-devel"
+depends="git bash"
+short_desc="Self-hosted lightweight software forge"
+maintainer="Pulux <pulux@pf4sh.eu>"
+license="MIT"
+homepage="https://forgejo.org"
+changelog="https://codeberg.org/forgejo/forgejo/src/branch/forgejo/RELEASE-NOTES.md#${_forgejo_tag}"
+distfiles="https://codeberg.org/forgejo/forgejo/releases/download/v${version}-0/forgejo-src-${version}-0.tar.gz"
+checksum=e709c0e6403100fdef96eec8ac146c065375228b104125b9bf5ea844ea48633e
+conflicts="gitea"
+
+system_accounts="_forgejo"
+_forgejo_homedir="/var/lib/forgejo"
+_forgejo_shell="/bin/bash" # Proper shell needed for ssh support
+make_dirs="/var/lib/forgejo 0755 _forgejo _forgejo
+ /var/log/forgejo 0755 _forgejo root"
+conf_files="/etc/forgejo.conf"
+
+
+post_install() {
+	vlicense LICENSE
+	vsv forgejo
+	vinstall custom/conf/app.example.ini 0640 /etc forgejo.conf
+}

  parent reply	other threads:[~2023-10-15 12:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-46691@inbox.vuxu.org>
2023-10-15 11:32 ` paper42
2023-10-15 12:46 ` [PR PATCH] [Updated] " pfpulux
2023-10-15 12:54 ` pfpulux [this message]
2024-01-14  1:50 ` github-actions
2024-01-29  1:45 ` [PR PATCH] [Closed]: " github-actions

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231015125443.d0EWd5r2tnFLG63K8FmBrhrnaOPeZa68buoMJGWvK10@z \
    --to=pfpulux@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).