From nobody Sat Mar 9 13:44:46 2024 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TsPRb5xMSz5DC8t; Sat, 9 Mar 2024 13:44:59 +0000 (UTC) (envelope-from bofh@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TsPRb5BM6z4mPV; Sat, 9 Mar 2024 13:44:59 +0000 (UTC) (envelope-from bofh@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709991899; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=/PWomp45Cb5fw7DTM3jjyRJBq9eqdjMxkc0Y0Y6VP7Q=; b=oL3PqSRsYnnSLQ7gzTxnSVFUqiP3eF5E60MnWMPkEPerIq/Lsy5mCYmRwoE+5kTtD7uY6D dIdI7sMEQA45khtPs0udj0hHXNACospnKr0RM6zgTbeYWpaDX7QlZ43iwvOkOUcQCVdFsL pHzBlOx9K9kkrCvMI85OMZnuiLhlwuWvNaYRWOA3z3PmRuqB/3sN0NALe5xrq9fhFyghE0 fqEwTwHvqaSd0GSx2ac+2KzL8OKbdcO2RFG+OeTFhoHrE1LcWIhGetfcW8IRqZtApfKDvb YEskVhL+cM6gnqAIdgoMlHBb9hVpwH0CeVqV5L8ygDHmAhcucO9XomCjVqBzuw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709991899; a=rsa-sha256; cv=none; b=yOJpo9bc6EpubbnYudGgK/NuQqzbEP+3iWHpe5k0tCwCorA3VzUTuYRAGBe8Az1g8O9W2x BYKJu8fQNwjGmDKa+j40Z6BPCxS5thBy9Y7WZH/S2S8gTkcBrw8pCHs6HUVZELRvCRuiCK GItyoAQfwOr7mMSjfSqu3qti8ZgtLLZiTxLIcIfak+sMZMc2WpMH19uvKPTPTS1kWoyykq ds2Lz7KbeoMqbF7T3gg96oc83neY5driS9jnZ1VgquurbzzW1hqwMKIyGkcburb4R0y84/ NQF+CEELfY2GQ1CCUB+C16VF14sS7ClnUvXQNWOgwcrx/aDnVcKpgf7f/zL1Sw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709991899; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=/PWomp45Cb5fw7DTM3jjyRJBq9eqdjMxkc0Y0Y6VP7Q=; b=OKoiOzw8YHxEGMC3qZCZgS5lnh44df5PzbZdYw33F/2tF6b24Tv+E/9VjNVAmJJzOoFpAJ UYriq/JGi9impVIsnlat0RcKN0XmcVJucBt3TL5vBMJIhjSBct+QoXPkwfS3O0DQHASsjX srvte8IXvjsq4q77Vz2XorQIQtPT0xv01jkwVoHEPi3WjyGtW038GHrva4YTDIHTWjSLRv XZnG5eGcmlg5XPiK/eyv3CxP77UDlGMCEOE40+AHRaqITYwJcWkbmBodwJ/iVNXtG1ig5o R0Ad8dmGFwzhjJhyhE8f8PhO7wKn5JxDYbLtDmCVrYp/rtuIHT0LbmY4uxaMBg== Received: from mx.bofh.network (mx.bofh.network [5.9.249.227]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: bofh/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4TsPRb1k8dz14W8; Sat, 9 Mar 2024 13:44:59 +0000 (UTC) (envelope-from bofh@freebsd.org) Received: from smtpclient.apple ( [217.117.226.147]) by mx.bofh.network (OpenSMTPD) with ESMTPSA id 09f10695 (TLSv1.2:ECDHE-ECDSA-AES256-GCM-SHA384:256:NO); Sat, 9 Mar 2024 13:44:57 +0000 (UTC) From: Moin Rahman Content-Type: multipart/signed; boundary="Apple-Mail=_862F3565-4D44-4154-A18C-FE67B1C39B58"; protocol="application/pgp-signature"; micalg=pgp-sha512 List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.700.6.1.1\)) Subject: Re: git: 00770786d88e - main - www/forgejo: New port Date: Sat, 9 Mar 2024 14:44:46 +0100 References: <202403091343.429DhM8w053045@gitrepo.freebsd.org> To: "ports-committers@freebsd.org" , "dev-commits-ports-all@freebsd.org" , "dev-commits-ports-main@freebsd.org" In-Reply-To: <202403091343.429DhM8w053045@gitrepo.freebsd.org> Message-Id: X-Mailer: Apple Mail (2.3731.700.6.1.1) --Apple-Mail=_862F3565-4D44-4154-A18C-FE67B1C39B58 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii This is supposed to go with: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D269065 > On Mar 9, 2024, at 2:43 PM, Muhammad Moinur Rahman = wrote: >=20 > The branch main has been updated by bofh: >=20 > URL: = https://cgit.FreeBSD.org/ports/commit/?id=3D00770786d88e06602a7dd3ed9cf0b2= c96da4527f >=20 > commit 00770786d88e06602a7dd3ed9cf0b2c96da4527f > Author: Vladimir Timofeev > AuthorDate: 2024-02-18 02:11:55 +0000 > Commit: Muhammad Moinur Rahman > CommitDate: 2024-03-09 13:43:11 +0000 >=20 > www/forgejo: 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(+) >=20 > diff --git a/www/Makefile b/www/Makefile > index fb80cc0f6e75..a087e573b1fe 100644 > --- a/www/Makefile > +++ b/www/Makefile > @@ -186,6 +186,7 @@ > SUBDIR +=3D flexget > SUBDIR +=3D flickcurl > SUBDIR +=3D foreign-cdm > + SUBDIR +=3D forgejo > SUBDIR +=3D formication > SUBDIR +=3D foswiki > SUBDIR +=3D free-sa-devel > diff --git a/www/forgejo/Makefile b/www/forgejo/Makefile > new file mode 100644 > index 000000000000..90d360ab57d9 > --- /dev/null > +++ b/www/forgejo/Makefile > @@ -0,0 +1,82 @@ > +PORTNAME=3D forgejo > +DISTVERSIONPREFIX=3D v > +DISTVERSION=3D 1.21.7-0 > +CATEGORIES=3D www > +MASTER_SITES=3D = https://codeberg.org/forgejo/forgejo/releases/download/${DISTVERSIONPREFIX= }${DISTVERSION}/ > +DISTNAME=3D forgejo-src-${DISTVERSION} > + > +MAINTAINER=3D stb@lassitu.de > +COMMENT=3D Compact self-hosted Git service > +WWW=3D https://forgejo.org/ > + > +LICENSE=3D MIT > +LICENSE_FILE=3D ${WRKSRC}/LICENSE > + > +RUN_DEPENDS=3D git:devel/git > + > +USES=3D cpe gmake go:1.21,no_targets > +USE_RC_SUBR=3D forgejo > + > +EXTRACT_AFTER_ARGS=3D --strip-components 1 > +SUB_FILES+=3D app.ini.sample > +SUB_LIST+=3D GITUSER=3D${USERS} > + > +NO_WRKSUBDIR=3D yes > + > +USERS=3D git > +GROUPS=3D git > + > +PORTDATA=3D * > + > +OPTIONS_DEFINE=3D BINDATA GIT_LFS PAM SQLITE > +OPTIONS_DEFAULT=3D BINDATA GIT_LFS PAM SQLITE > +OPTIONS_SUB=3D yes > + > +BINDATA_DESC=3D Build a single monolithic binary, with all assets = included > +GIT_LFS_DESC=3D Support for Git Large File Storage (LFS) > +PAM_DESC=3D Enable support for PAM > + > +BINDATA_VARS=3D GO_TAGS+=3Dbindata > +GIT_LFS_RUN_DEPENDS=3D git-lfs:devel/git-lfs > +PAM_VARS=3D GO_TAGS+=3Dpam > +SQLITE_VARS=3D GO_TAGS+=3D"sqlite sqlite_unlock_notify" > + > +.include > + > +.if ${OPSYS} =3D=3D FreeBSD > +DAEMONARGS=3D -S -l \$${forgejo_facility} -s \$${forgejo_priority} -T = \ > + \$${name} > +.else > +DAEMONARGS=3D -f > +.endif > + > +SUB_LIST+=3D DAEMONARGS=3D"${DAEMONARGS}" > + > +SSP_UNSAFE=3D true > +# Default LDFLAGS are incompatible with build > +MAKE_ENV=3D LDFLAGS=3D"${LDFLAGS} ${EXTRA_LDFLAGS}" > +MAKE_ARGS=3D GOPATH=3D${WRKDIR} \ > + TAGS=3D"${GO_TAGS}" > +ALL_TARGET=3D backend > +MAKE_JOBS_UNSAFE=3D 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 > diff --git a/www/forgejo/distinfo b/www/forgejo/distinfo > new file mode 100644 > index 000000000000..29ac3152c0f2 > --- /dev/null > +++ b/www/forgejo/distinfo > @@ -0,0 +1,3 @@ > +TIMESTAMP =3D 1709747919 > +SHA256 (forgejo-src-1.21.7-0.tar.gz) =3D = 9c0148995288839f685d887f7d1c5f4c6f89511d60d6262ae500e2991803eb5c > +SIZE (forgejo-src-1.21.7-0.tar.gz) =3D 58802779 > diff --git a/www/forgejo/files/app.ini.sample.in = b/www/forgejo/files/app.ini.sample.in > new file mode 100644 > index 000000000000..d625a9ebabab > --- /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 =3D Forgejo: A self-hosted lightweight software forge > +RUN_MODE =3D prod > +RUN_USER =3D %%GITUSER%% > + > +[database] > +DB_TYPE =3D sqlite3 > +HOST =3D 127.0.0.1:3306 > +NAME =3D forgejo > +PASSWD =3D > +PATH =3D /var/db/forgejo/forgejo.db > +SSL_MODE =3D disable > +USER =3D root > + > +[indexer] > +ISSUE_INDEXER_PATH =3D /var/db/forgejo/indexers/issues.bleve > + > +[log] > +LEVEL =3D Info > +MODE =3D file > +ROOT_PATH =3D /var/log/forgejo > + > +[mailer] > +ENABLED =3D false > + > +[oauth2] > +JWT_SECRET =3D CHANGE_ME > + > +[picture] > +AVATAR_UPLOAD_PATH =3D /var/db/forgejo/data/avatars > +DISABLE_GRAVATAR =3D true > +ENABLE_FEDERATED_AVATAR =3D false > + > +[repository] > +ROOT =3D /var/db/forgejo/forgejo-repositories > +# Forgejo's default is 'bash', so if you have bash installed, you can = comment > +# this out. > +SCRIPT_TYPE =3D sh > + > +[repository.upload] > +TEMP_PATH =3D /var/db/forgejo/data/tmp/uploads > + > +[security] > +INSTALL_LOCK =3D true > +INTERNAL_TOKEN =3D CHANGE_ME > +SECRET_KEY =3D CHANGE_ME > + > +[session] > +PROVIDER =3D file > +PROVIDER_CONFIG =3D /var/db/forgejo/data/sessions > + > +[server] > +APP_DATA_PATH =3D /var/db/forgejo/data > +DISABLE_SSH =3D false > +DOMAIN =3D localhost > +HTTP_ADDR =3D 127.0.0.1 > +HTTP_PORT =3D 3000 > +OFFLINE_MODE =3D false > +ROOT_URL =3D http://localhost:3000/ > +SSH_DOMAIN =3D %(DOMAIN)s > +SSH_PORT =3D 22 > + > +[service] > +DISABLE_REGISTRATION =3D false > +ENABLE_CAPTCHA =3D true > +ENABLE_NOTIFY_MAIL =3D false > +REGISTER_EMAIL_CONFIRM =3D false > +REQUIRE_SIGNIN_VIEW =3D 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=3D"YES" > + > +. /etc/rc.subr > + > +name=3D"forgejo" > +rcvar=3D"forgejo_enable" > + > +load_rc_config $name > + > +: ${forgejo_user:=3D"%%GITUSER%%"} > +: ${forgejo_enable:=3D"NO"} > +: ${forgejo_facility:=3D"daemon"} > +: ${forgejo_priority:=3D"debug"} > +: ${forgejo_shared:=3D"%%PREFIX%%/share/${name}"} > +: ${forgejo_custom:=3D"%%PREFIX%%/etc/${name}"} > + > +command=3D"%%PREFIX%%/sbin/${name} web" > +procname=3D"%%PREFIX%%/sbin/${name}" > +githome=3D"$(eval echo ~${forgejo_user})" > + > +pidfile=3D"/var/run/${name}.pid" > + > +start_cmd=3D"${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=3D${forgejo_shared}" \ > + "GITEA_CUSTOM=3D${forgejo_custom}" \ > + "HOME=3D${githome}" \ > + "PATH=3D%%PREFIX%%/bin:${PATH}" \ > + "USER=3D${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: < +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 --Apple-Mail=_862F3565-4D44-4154-A18C-FE67B1C39B58 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- iQKTBAEBCgB9FiEETfdREoUGjQZKBS+fvbm1phfAvJEFAmXsZ85fFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDRE Rjc1MTEyODUwNjhEMDY0QTA1MkY5RkJEQjlCNUE2MTdDMEJDOTEACgkQvbm1phfA vJGfRg//SIUPY6r/NJeJF6QDIktHggBeFttLr242/O4tVMMKjCTNIPJ3/w/XVVo5 fs4NdNoT6zSUxfbrB1qeZpPzkZpuUIgYL6khsTxFGyqfyNrECb6mFpKHndAjoEow pvLq28dDEmm6TFhQpysjuRpB3C1vxVDXUNWSB85rtDo1uw7WKF9n4xaWeQexDFRF Y0pCDrg5aJZ6JtiuRiUudgC4lLTvxj4TtNibHQx3gNWrV/883qYmvlHj7MzCUCSU EejxwMpKKZ3o1P6fuqSlS28r80OSNF+qVfEX0FlodfdvG/Fm0ziRi6zRKERk7DCk MFQyfNiPkkKTpIbDe+1MQ82yObnIPAV23R7bxAeljPWubymQtoriwypHQRer+wUx TLbWJbnhZdhnAuUdsShH9qPHQ0dR4PLUtkjgMDX7EFVN5vc40NoJq/ZlBdmAHHdf gqu8WO4Nj/2/lLsf74mXbkRyS/Jx+J7RDR1PI+esc3fAJ7EfVV5Ude2mZFPfBLB0 Y5dhrNrA7T5KR9miIIgUui8rix9/rcJ5XMkVcL8XTJlRNySuEoLebDktx/7ghKAc hyjyubRWdDkRmK1OTzZgnpdjrKL9HDPEnfj1DP1qU0s53hTgrYb9ZMvGCnJG9ITx wnB7myCT/qUYHnj0oRPoyxKTXsnRd/LThZCc94pkeY6qERYpuDI= =ePHu -----END PGP SIGNATURE----- --Apple-Mail=_862F3565-4D44-4154-A18C-FE67B1C39B58--