From nobody Mon May 13 07:37:10 2024 X-Original-To: dev-commits-ports-main@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 4VdBCB5D2wz5KRQ6; Mon, 13 May 2024 07:37:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VdBCB4kS2z4Vj0; Mon, 13 May 2024 07:37:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1715585830; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MNPKsFQHfg0+5lXET/sNDKVDAtAFtzgl8HwuoOVdMXE=; b=aCPsBKboAtsymd6PxsoDpo77ty34h5d/U3A52Trn3Wdb5dP8Gb8LLSLTZk0Rjr1AAxcRK6 lwJ+zeBRbFXuZMdZ4fyAKQ8juDLutfmLHnvbG0rxbXcOhuvgiFram5QcP3sWRZSjbXRIh+ oj0GVkHpb0QqSGEt8OBnEfU0/0Xzxd1ZqhV2XMT0+89ZnuEsYUUq2hCgQchfC6aSsLgfwQ aejZOu+/NqnsdDWjGQJfKsOfLfaeBk/CdXqFq/Y5zoNSkcQaTdMTAliB5fjzmMgQzeme3k dIuZ+WCot7TPUUM7bjCDFHJpIM2vc5qAswEIkl9VvfetEKZxbMy8EmrXOGkxhQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1715585830; a=rsa-sha256; cv=none; b=KdjxPLSosvBrhTZSaAbHABAB+tkK0kk6NOLXSojqhlRUDvPLhkeL9dJHCwKoccroUH3KSP GV8Cvnk5pOqoBsd1EPZ9JeGAzt8IEZ6v6tMWWGyi/5JHjo+G05pyxAVYU5arGgG3YD/IDe T9/5Yc5on/nH1kfcLXSLSXpNixeBgcw7p4gMYnZxqiLBM0TrufKogu0H7pJRXTTDOayB0x t+95AX1bC8eCO+5pfIjPR1kDrkRZKDtgjzJXUBD1DyrH130kxi39UbB7abSqp/PGyos9RN zkljUGC9NLIA4YMNRiOyXb3OapVjYzVm7AbuE9OtDw/VZiGf87eKRit89d1dmw== 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=1715585830; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MNPKsFQHfg0+5lXET/sNDKVDAtAFtzgl8HwuoOVdMXE=; b=mHkP6QFmV2QMQOlVw/VpYFwb4AN6qL+TSEhrucI02OlN2TUBKbvmjWddi44pgravsioQyN deWV2Sn4a0QmwtkDyl4weozHz7kyEEoT3WalNtYPCVWoIY9Oxpsv/UYRp4yQhlH+J7hXXQ UlEPX0AInM3suz4AkvJw0dogbeCt2VXdBmab5OUDUnjqPAcn7iMGgp+xkvaY6FW6qqIn7R +4r7zCLKxFVVX/3/Y9QgTza03M0c229xom824BwQzkI9/tl7RMT34PpdnKgSbF3pFSC7gF d7mKhkH4OcT08bCiy1adzhirNC7R4bdB94p3eraeCjnNE2vROjGzIERQOdmWpA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VdBCB4CCTzfY6; Mon, 13 May 2024 07:37:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44D7bATT004057; Mon, 13 May 2024 07:37:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44D7bAGx004054; Mon, 13 May 2024 07:37:10 GMT (envelope-from git) Date: Mon, 13 May 2024 07:37:10 GMT Message-Id: <202405130737.44D7bAGx004054@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Philippe Audeoud Subject: git: 3c0c98d883c2 - main - www/gitea: update to 1.21.11 List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-ports-main@freebsd.org Sender: owner-dev-commits-ports-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jadawin X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3c0c98d883c238f4c96640971df03933e08ec096 Auto-Submitted: auto-generated The branch main has been updated by jadawin: URL: https://cgit.FreeBSD.org/ports/commit/?id=3c0c98d883c238f4c96640971df03933e08ec096 commit 3c0c98d883c238f4c96640971df03933e08ec096 Author: Philippe Audeoud AuthorDate: 2024-05-13 06:35:52 +0000 Commit: Philippe Audeoud CommitDate: 2024-05-13 06:36:55 +0000 www/gitea: update to 1.21.11 changelog: https://blog.gitea.com/release-of-1.21.11/ PR: 278877 --- www/gitea/Makefile | 9 ++++---- www/gitea/distinfo | 6 ++--- www/gitea/files/app.ini.sample.in | 46 +++++++++++++++++++-------------------- www/gitea/files/gitea.in | 16 +++++++++++++- 4 files changed, 45 insertions(+), 32 deletions(-) diff --git a/www/gitea/Makefile b/www/gitea/Makefile index 3cf76ed025e7..48787fa0e541 100644 --- a/www/gitea/Makefile +++ b/www/gitea/Makefile @@ -1,7 +1,6 @@ PORTNAME= gitea DISTVERSIONPREFIX= v -DISTVERSION= 1.21.10 -PORTREVISION= 1 +DISTVERSION= 1.21.11 CATEGORIES= www MASTER_SITES= https://github.com/go-gitea/gitea/releases/download/${DISTVERSIONPREFIX}${DISTVERSION}/ \ https://dl.gitea.io/gitea/${DISTVERSION}/ @@ -54,9 +53,9 @@ DAEMONARGS= -f 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}" +LDFLAGS+= "'-X "code.gitea.io/gitea/modules/setting.CustomPath=${PREFIX}/etc/gitea"'" +LDFLAGS+= "'-X "code.gitea.io/gitea/modules/setting.AppWorkPath=${PREFIX}/share/gitea"'" +MAKE_ARGS= GOPATH=${WRKDIR} TAGS="${GO_TAGS}" GOFLAGS="-buildvcs=false" ALL_TARGET= backend MAKE_JOBS_UNSAFE= yes diff --git a/www/gitea/distinfo b/www/gitea/distinfo index dc9d1ba1ea14..def33049cfee 100644 --- a/www/gitea/distinfo +++ b/www/gitea/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1712013611 -SHA256 (gitea-src-1.21.10.tar.gz) = 83f68344800a68f8bc0165892f837c099b763781c11162bbc5206f8eb70f0c3f -SIZE (gitea-src-1.21.10.tar.gz) = 53972181 +TIMESTAMP = 1715269556 +SHA256 (gitea-src-1.21.11.tar.gz) = 4f1cac5f0de555d57f86520bced33e0fbc08a5ea977e0940cbb024d80c679443 +SIZE (gitea-src-1.21.11.tar.gz) = 54029294 diff --git a/www/gitea/files/app.ini.sample.in b/www/gitea/files/app.ini.sample.in index f0e6c811ee60..71cccbf31650 100644 --- a/www/gitea/files/app.ini.sample.in +++ b/www/gitea/files/app.ini.sample.in @@ -10,10 +10,10 @@ # 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 Gitea add these to the config for you; you need to make # app.ini writeable by the git user. # @@ -24,15 +24,15 @@ # If you'd rather use the web-based installer, remove this conf/app.ini file # and make %%PREFIX%%/etc/gitea/conf writeable to the git user. -APP_NAME = Gitea: Git with a cup of tea -RUN_USER = %%GITUSER%% +APP_NAME = Gitea: A self-hosted lightweight software forge RUN_MODE = prod +RUN_USER = %%GITUSER%% [database] DB_TYPE = sqlite3 HOST = 127.0.0.1:3306 NAME = gitea -PASSWD = +PASSWD = PATH = /var/db/gitea/gitea.db SSL_MODE = disable USER = root @@ -41,19 +41,19 @@ USER = root ISSUE_INDEXER_PATH = /var/db/gitea/indexers/issues.bleve [log] -ROOT_PATH = /var/log/gitea -MODE = file LEVEL = Info +MODE = file +ROOT_PATH = /var/log/gitea [mailer] ENABLED = false [oauth2] -JWT_SECRET = D56bmu6xCtEKs9vKKgMKnsa4X9FDwo64HVyaS4fQ4mY +JWT_SECRET = CHANGE_ME [picture] AVATAR_UPLOAD_PATH = /var/db/gitea/data/avatars -DISABLE_GRAVATAR = false +DISABLE_GRAVATAR = true ENABLE_FEDERATED_AVATAR = false [repository] @@ -66,28 +66,28 @@ SCRIPT_TYPE = sh TEMP_PATH = /var/db/gitea/data/tmp/uploads [security] -INSTALL_LOCK = true -INTERNAL_TOKEN = 1FFhAklka01JhgJTRUrFujWYiv4ijqcTIfXJ9o4n1fWxz+XVQdXhrqDTlsnD7fvz7gugdhgkx0FY2Lx6IBdPQw== -SECRET_KEY = ChangeMeBeforeRunning +INSTALL_LOCK = true +INTERNAL_TOKEN = CHANGE_ME +SECRET_KEY = CHANGE_ME [session] -PROVIDER = file +PROVIDER = file PROVIDER_CONFIG = /var/db/gitea/data/sessions [server] -DOMAIN = localhost -HTTP_ADDR = 127.0.0.1 -HTTP_PORT = 3000 -ROOT_URL = http://localhost:3000/ -DISABLE_SSH = false -SSH_DOMAIN = %(DOMAIN)s -SSH_PORT = 22 -OFFLINE_MODE = false APP_DATA_PATH = /var/db/gitea/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] -REGISTER_EMAIL_CONFIRM = false -ENABLE_NOTIFY_MAIL = false DISABLE_REGISTRATION = false ENABLE_CAPTCHA = true +ENABLE_NOTIFY_MAIL = false +REGISTER_EMAIL_CONFIRM = false REQUIRE_SIGNIN_VIEW = false diff --git a/www/gitea/files/gitea.in b/www/gitea/files/gitea.in index 5e75ad5d5143..566a4b46ef93 100644 --- a/www/gitea/files/gitea.in +++ b/www/gitea/files/gitea.in @@ -17,8 +17,9 @@ load_rc_config $name : ${gitea_user:="%%GITUSER%%"} : ${gitea_enable:="NO"} +: ${gitea_configcheck_enable:="YES"} : ${gitea_facility:="daemon"} -: ${gitea_priority:="debug"} +: ${gitea_priority:="info"} : ${gitea_shared:="%%PREFIX%%/share/${name}"} : ${gitea_custom:="%%PREFIX%%/etc/${name}"} @@ -29,6 +30,7 @@ githome="$(eval echo ~${gitea_user})" pidfile="/var/run/${name}.pid" start_cmd="${name}_start" +start_precmd="${name}_prestart" gitea_start() { for d in /var/db/gitea /var/log/gitea; do @@ -48,4 +50,16 @@ gitea_start() { $command } +gitea_prestart() { + if checkyesno gitea_configcheck_enable; then + if su -m ${gitea_user} -c "%%PREFIX%%/sbin/${name} doctor check >/dev/null"; then + else + echo "cannot start ${name} because of configuration errors. Run" >&2 + echo " su -m git -c '${name} doctor check'" >&2 + echo "for further details" + return 1 + fi + fi +} + run_rc_command "$1"