FreeBSD Bugzilla – Attachment 247700 Details for
Bug 269065
[new port] www/forgejo: Compact self-hosted Git service
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch to create a new www/forgejo port.
0001-www-forgejo-add-new-port.patch (text/plain), 9.07 KB, created by
Jens Grassel
on 2024-01-16 13:08:35 UTC
(
hide
)
Description:
Patch to create a new www/forgejo port.
Filename:
MIME Type:
Creator:
Jens Grassel
Created:
2024-01-16 13:08:35 UTC
Size:
9.07 KB
patch
obsolete
>From f4bb5d5d4a0444f9f52c0c69a2526024f3138b0e Mon Sep 17 00:00:00 2001 >From: Jens Grassel <jens@wegtam.com> >Date: Tue, 18 Apr 2023 21:02:16 +0200 >Subject: [PATCH] www/forgejo add new port > >--- > www/Makefile | 1 + > www/forgejo/Makefile | 82 +++++++++++++++++++++++++ > www/forgejo/distinfo | 3 + > www/forgejo/files/app.ini.sample.in | 93 +++++++++++++++++++++++++++++ > www/forgejo/files/forgejo.in | 51 ++++++++++++++++ > www/forgejo/pkg-descr | 5 ++ > www/forgejo/pkg-message | 13 ++++ > www/forgejo/pkg-plist | 3 + > 8 files changed, 251 insertions(+) > create mode 100644 www/forgejo/Makefile > create mode 100644 www/forgejo/distinfo > create mode 100644 www/forgejo/files/app.ini.sample.in > create mode 100644 www/forgejo/files/forgejo.in > create mode 100644 www/forgejo/pkg-descr > create mode 100644 www/forgejo/pkg-message > create mode 100644 www/forgejo/pkg-plist > >diff --git a/www/Makefile b/www/Makefile >index 5b8458dbb45a..f3f4f7e899c9 100644 >--- a/www/Makefile >+++ b/www/Makefile >@@ -183,6 +183,7 @@ > SUBDIR += flexget > SUBDIR += flickcurl > SUBDIR += foreign-cdm >+ SUBDIR += forgejo > SUBDIR += formication > SUBDIR += foswiki > SUBDIR += free-sa-devel >diff --git a/www/forgejo/Makefile b/www/forgejo/Makefile >new file mode 100644 >index 000000000000..5b4c326b727d >--- /dev/null >+++ b/www/forgejo/Makefile >@@ -0,0 +1,82 @@ >+PORTNAME= forgejo >+DISTVERSIONPREFIX= v >+DISTVERSION= 1.21.3-0 >+CATEGORIES= www >+MASTER_SITES= https://codeberg.org/forgejo/forgejo/releases/download/${DISTVERSIONPREFIX}${DISTVERSION}/ >+DISTNAME= forgejo-src-${DISTVERSION} >+ >+MAINTAINER= stb@lassitu.de >+COMMENT= Compact self-hosted Git service >+WWW= https://forgejo.org/ >+ >+LICENSE= MIT >+LICENSE_FILE= ${WRKSRC}/LICENSE >+ >+RUN_DEPENDS= git:devel/git >+ >+USES= cpe gmake go:1.21,no_targets >+USE_RC_SUBR= forgejo >+ >+EXTRACT_AFTER_ARGS= --strip-components 1 >+SUB_FILES+= app.ini.sample >+SUB_LIST+= GITUSER=${USERS} >+ >+NO_WRKSUBDIR= yes >+ >+USERS= git >+GROUPS= git >+ >+PORTDATA= * >+ >+OPTIONS_DEFINE= BINDATA GIT_LFS PAM SQLITE >+OPTIONS_DEFAULT= BINDATA GIT_LFS PAM SQLITE >+OPTIONS_SUB= yes >+ >+BINDATA_DESC= Build a single monolithic binary, with all assets included >+GIT_LFS_DESC= Support for Git Large File Storage (LFS) >+PAM_DESC= Enable support for PAM >+ >+BINDATA_VARS= GO_TAGS+=bindata >+GIT_LFS_RUN_DEPENDS= git-lfs:devel/git-lfs >+PAM_VARS= GO_TAGS+=pam >+SQLITE_VARS= GO_TAGS+="sqlite sqlite_unlock_notify" >+ >+.include <bsd.port.options.mk> >+ >+.if ${OPSYS} == FreeBSD >+DAEMONARGS= -S -l \$${forgejo_facility} -s \$${forgejo_priority} -T \ >+ \$${name} >+.else >+DAEMONARGS= -f >+.endif >+ >+SUB_LIST+= DAEMONARGS="${DAEMONARGS}" >+ >+SSP_UNSAFE= true >+# Default LDFLAGS are incompatible with build >+MAKE_ENV= LDFLAGS="${LDFLAGS} ${EXTRA_LDFLAGS}" >+MAKE_ARGS= GOPATH=${WRKDIR} \ >+ TAGS="${GO_TAGS}" >+ALL_TARGET= backend >+MAKE_JOBS_UNSAFE= yes >+ >+post-patch: >+ ${ECHO_CMD} ${DISTVERSION} >${WRKSRC}/VERSION >+ >+# Too lazy to figure out why go install won't work. >+do-install: >+# Go binary is statically linked and cannot be stripped, so use >+# INSTALL_SCRIPT. >+ ${INSTALL_SCRIPT} ${WRKSRC}/gitea \ >+ ${STAGEDIR}${PREFIX}/sbin/forgejo >+ @${MKDIR} ${STAGEDIR}${ETCDIR}/conf >+ ${INSTALL_DATA} ${WRKDIR}/app.ini.sample \ >+ ${STAGEDIR}${ETCDIR}/conf/app.ini.sample >+ ${INSTALL_DATA} ${WRKSRC}/custom/conf/app.example.ini \ >+ ${STAGEDIR}${ETCDIR}/conf/app.ini.defaults >+ >+do-install-BINDATA-off: >+ cd ${WRKSRC} && \ >+ ${COPYTREE_SHARE} "options public templates" ${STAGEDIR}${DATADIR} >+ >+.include <bsd.port.mk> >diff --git a/www/forgejo/distinfo b/www/forgejo/distinfo >new file mode 100644 >index 000000000000..44a8b6e54147 >--- /dev/null >+++ b/www/forgejo/distinfo >@@ -0,0 +1,3 @@ >+TIMESTAMP = 1705409655 >+SHA256 (forgejo-src-1.21.3-0.tar.gz) = 61fd398a16baf5d7d4b3ef49b1759a739fe6c4dbe4967a3c195d4b2f8cefc639 >+SIZE (forgejo-src-1.21.3-0.tar.gz) = 58773724 >diff --git a/www/forgejo/files/app.ini.sample.in b/www/forgejo/files/app.ini.sample.in >new file mode 100644 >index 000000000000..a48404fa2ed6 >--- /dev/null >+++ b/www/forgejo/files/app.ini.sample.in >@@ -0,0 +1,93 @@ >+# >+# Sample Configuration for Forgejo using SQLite >+# >+# For information on the available settings, consult the online >+# documentation, or see the accompanying file app.ini.defaults, which >+# contains the settings incorporated into the forgejo binary. >+# >+# This sample configuration runs Forgejo with a local database. Before >+# running this configuration, make sure to change the INTERNAL_TOKEN, >+# JWT_SECRET, and SECRET_KEY variables. SECRET_KEY is a password of your >+# choosing, INTERNAL_TOKEN is a 64-byte random number in BASE64 encoding, >+# JWT_SECRET is a 32-byte random number in BASE64 encoding. >+# >+# You can generate the token using for example: >+# openssl rand -base64 64 >+# >+# You can let Forgejo add these to the config for you; you need to make >+# app.ini writeable by the git user. >+# >+# There are no pre-configured users; the first user to register becomes an >+# admin. In this sample configuration, the HTTP server only listens on >+# localhost. >+# >+# If you'd rather use the web-based installer, remove this conf/app.ini file >+# and make %%PREFIX%%/etc/forgejo/conf writeable to the git user. >+ >+APP_NAME = Forgejo: A self-hosted lightweight software forge >+RUN_MODE = prod >+RUN_USER = %%GITUSER%% >+ >+[database] >+DB_TYPE = sqlite3 >+HOST = 127.0.0.1:3306 >+NAME = forgejo >+PASSWD = >+PATH = /var/db/forgejo/forgejo.db >+SSL_MODE = disable >+USER = root >+ >+[indexer] >+ISSUE_INDEXER_PATH = /var/db/forgejo/indexers/issues.bleve >+ >+[log] >+LEVEL = Info >+MODE = file >+ROOT_PATH = /var/log/forgejo >+ >+[mailer] >+ENABLED = false >+ >+[oauth2] >+JWT_SECRET = CHANGE_ME >+ >+[picture] >+AVATAR_UPLOAD_PATH = /var/db/forgejo/data/avatars >+DISABLE_GRAVATAR = true >+ENABLE_FEDERATED_AVATAR = false >+ >+[repository] >+ROOT = /var/db/forgejo/forgejo-repositories >+# Forgejo's default is 'bash', so if you have bash installed, you can comment >+# this out. >+SCRIPT_TYPE = sh >+ >+[repository.upload] >+TEMP_PATH = /var/db/forgejo/data/tmp/uploads >+ >+[security] >+INSTALL_LOCK = true >+INTERNAL_TOKEN = CHANGE_ME >+SECRET_KEY = CHANGE_ME >+ >+[session] >+PROVIDER = file >+PROVIDER_CONFIG = /var/db/forgejo/data/sessions >+ >+[server] >+APP_DATA_PATH = /var/db/forgejo/data >+DISABLE_SSH = false >+DOMAIN = localhost >+HTTP_ADDR = 127.0.0.1 >+HTTP_PORT = 3000 >+OFFLINE_MODE = false >+ROOT_URL = http://localhost:3000/ >+SSH_DOMAIN = %(DOMAIN)s >+SSH_PORT = 22 >+ >+[service] >+DISABLE_REGISTRATION = false >+ENABLE_CAPTCHA = true >+ENABLE_NOTIFY_MAIL = false >+REGISTER_EMAIL_CONFIRM = false >+REQUIRE_SIGNIN_VIEW = false >diff --git a/www/forgejo/files/forgejo.in b/www/forgejo/files/forgejo.in >new file mode 100644 >index 000000000000..ad5aee48f95d >--- /dev/null >+++ b/www/forgejo/files/forgejo.in >@@ -0,0 +1,51 @@ >+#!/bin/sh >+ >+# PROVIDE: forgejo >+# REQUIRE: NETWORKING SYSLOG >+# KEYWORD: shutdown >+# >+# Add the following lines to /etc/rc.conf to enable forgejo: >+# >+#forgejo_enable="YES" >+ >+. /etc/rc.subr >+ >+name="forgejo" >+rcvar="forgejo_enable" >+ >+load_rc_config $name >+ >+: ${forgejo_user:="%%GITUSER%%"} >+: ${forgejo_enable:="NO"} >+: ${forgejo_facility:="daemon"} >+: ${forgejo_priority:="debug"} >+: ${forgejo_shared:="%%PREFIX%%/share/${name}"} >+: ${forgejo_custom:="%%PREFIX%%/etc/${name}"} >+ >+command="%%PREFIX%%/sbin/${name} web" >+procname="%%PREFIX%%/sbin/${name}" >+githome="$(eval echo ~${forgejo_user})" >+ >+pidfile="/var/run/${name}.pid" >+ >+start_cmd="${name}_start" >+ >+forgejo_start() { >+ for d in /var/db/forgejo /var/log/forgejo; do >+ if [ ! -e "$d" ]; then >+ mkdir "$d" >+ chown ${forgejo_user} "$d" >+ fi >+ done >+ /usr/sbin/daemon %%DAEMONARGS%% \ >+ -u ${forgejo_user} -p ${pidfile} \ >+ /usr/bin/env -i \ >+ "GITEA_WORK_DIR=${forgejo_shared}" \ >+ "GITEA_CUSTOM=${forgejo_custom}" \ >+ "HOME=${githome}" \ >+ "PATH=%%PREFIX%%/bin:${PATH}" \ >+ "USER=${forgejo_user}" \ >+ $command >+} >+ >+run_rc_command "$1" >diff --git a/www/forgejo/pkg-descr b/www/forgejo/pkg-descr >new file mode 100644 >index 000000000000..f7e721e96eea >--- /dev/null >+++ b/www/forgejo/pkg-descr >@@ -0,0 +1,5 @@ >+A self-hosted Git service. >+ >+Forgejo is a community managed soft-fork of Gitea, which is a fork of Gogs, >+lightweight code hosting solution written in Go and published under the MIT >+license. >diff --git a/www/forgejo/pkg-message b/www/forgejo/pkg-message >new file mode 100644 >index 000000000000..5c8f0b5d39b4 >--- /dev/null >+++ b/www/forgejo/pkg-message >@@ -0,0 +1,13 @@ >+[ >+{ type: install >+ message: <<EOM >+Before starting forgejo you must create the main configuration file. >+ >+ cp /usr/local/etc/forgejo/conf/app.ini.sample /usr/local/etc/forgejo/conf/app.ini >+ ${EDITOR} /usr/local/etc/forgejo/conf/app.ini >+ >+You need to replace every occurence of CHANGE_ME in the file with sensitive >+values. Please refer to the official documentation for details. >+EOM >+} >+] >diff --git a/www/forgejo/pkg-plist b/www/forgejo/pkg-plist >new file mode 100644 >index 000000000000..2a0da44d59ac >--- /dev/null >+++ b/www/forgejo/pkg-plist >@@ -0,0 +1,3 @@ >+@sample %%ETCDIR%%/conf/app.ini.sample >+%%ETCDIR%%/conf/app.ini.defaults >+sbin/forgejo >-- >2.43.0 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 269065
:
239608
|
239617
|
240654
|
241569
|
241844
|
247700
|
248606
|
248982