Update to gitea 1.3.2.

Original diff from pvk@ updating it to 1.2.2 and adding a README,
updated then by Klemens Nanni.
ok robert@ (MAINTAINER) pvk@
This commit is contained in:
landry 2018-01-17 21:05:38 +00:00
parent 71dec4c1b5
commit bdf0f41c90
8 changed files with 1984 additions and 1557 deletions

View File

@ -1,11 +1,11 @@
# $OpenBSD: Makefile,v 1.7 2018/01/11 19:27:11 rpe Exp $
# $OpenBSD: Makefile,v 1.8 2018/01/17 21:05:38 landry Exp $
COMMENT = compact self-hosted Git service
VERSION = 1.3.2
GH_ACCOUNT = go-gitea
GH_PROJECT = gitea
GH_TAGNAME = v1.1.0
REVISION = 3
GH_TAGNAME = v${VERSION}
CATEGORIES = www devel
@ -16,21 +16,23 @@ MAINTAINER = Robert Nagy <robert@openbsd.org>
# MIT
PERMIT_PACKAGE_CDROM = Yes
RUN_DEPENDS = devel/git \
shells/bash
WANTLIB += c pthread
WANTLIB += c pthread
MODULES = lang/go
MODGO_ENV = PATH="${PORTPATH}" CFLAGS="${CFLAGS}"
MODGO_FLAGS += -tags "sqlite cert"
ALL_TARGET ?= code.gitea.io/${GH_PROJECT}
WRKSRC ?= ${MODGO_WORKSPACE}/src/${ALL_TARGET}
RUN_DEPENDS = devel/git \
shells/bash
ALL_TARGET = code.gitea.io/${GH_PROJECT}
WRKSRC = ${MODGO_WORKSPACE}/src/${ALL_TARGET}
SUBST_VARS += VERSION
pre-configure:
${SUBST_CMD} ${WRKDIST}/conf/app.ini
${SUBST_CMD} ${WRKDIST}/{conf/app.ini,main.go}
do-install:
${INSTALL_PROGRAM} ${MODGO_WORKSPACE}/bin/gitea ${PREFIX}/sbin

View File

@ -1,2 +1,2 @@
SHA256 (gitea-1.1.0.tar.gz) = uvNfW0kgSYyR5m1q+hP6QyCvmZfzMhsRdvrAsDhKTW8=
SIZE (gitea-1.1.0.tar.gz) = 13014916
SHA256 (gitea-1.3.2.tar.gz) = mjUeQaq8CHDUNcry8J0qdmUuZ8kBygFW4p5Lh+zMFf8=
SIZE (gitea-1.3.2.tar.gz) = 14784167

View File

@ -1,20 +0,0 @@
$OpenBSD: patch-cmd_web_go,v 1.1 2017/04/05 00:57:47 danj Exp $
Backported from upstream https://github.com/go-gitea/gitea/pull/1368
--- cmd/web.go.orig Thu Mar 9 22:25:12 2017
+++ cmd/web.go Tue Mar 21 22:27:47 2017
@@ -677,7 +677,12 @@ func runWeb(ctx *cli.Context) error {
case setting.HTTPS:
err = runHTTPS(listenAddr, setting.CertFile, setting.KeyFile, context2.ClearHandler(m))
case setting.FCGI:
- err = fcgi.Serve(nil, context2.ClearHandler(m))
+ listener, err := net.Listen("tcp", listenAddr)
+ if err != nil {
+ log.Fatal(4, "Failed to bind to %s", listenAddr, err)
+ }
+ defer listener.Close()
+ err = fcgi.Serve(listener, context2.ClearHandler(m))
case setting.UnixSocket:
if err := os.Remove(listenAddr); err != nil && !os.IsNotExist(err) {
log.Fatal(4, "Failed to remove unix socket directory %s: %v", listenAddr, err)

View File

@ -1,6 +1,7 @@
$OpenBSD: patch-conf_app_ini,v 1.2 2017/04/05 00:57:47 danj Exp $
--- conf/app.ini.orig Thu Mar 9 14:25:12 2017
+++ conf/app.ini Fri Mar 17 21:57:30 2017
$OpenBSD: patch-conf_app_ini,v 1.3 2018/01/17 21:05:38 landry Exp $
Index: conf/app.ini
--- conf/app.ini.orig
+++ conf/app.ini
@@ -1,12 +1,12 @@
; App name that shows on every page title
APP_NAME = Gitea: Git with a cup of tea
@ -17,7 +18,7 @@ $OpenBSD: patch-conf_app_ini,v 1.2 2017/04/05 00:57:47 danj Exp $
SCRIPT_TYPE = bash
; Default ANSI charset
ANSI_CHARSET =
@@ -36,7 +36,7 @@ PREVIEWABLE_FILE_MODES = markdown
@@ -42,7 +42,7 @@ LOCAL_COPY_PATH = tmp/local-repo
; Whether repository file uploads are enabled. Defaults to `true`
ENABLED = true
; Path for uploads. Defaults to `data/tmp/uploads` (tmp gets deleted on gitea restart)
@ -26,7 +27,7 @@ $OpenBSD: patch-conf_app_ini,v 1.2 2017/04/05 00:57:47 danj Exp $
; One or more allowed types, e.g. image/jpeg|image/png. Nothing means any file type
ALLOWED_TYPES =
; Max size of each file in MB. Defaults to 3MB
@@ -105,7 +105,7 @@ SSH_DOMAIN = %(DOMAIN)s
@@ -120,7 +120,7 @@ SSH_DOMAIN = %(DOMAIN)s
; Network interface builtin SSH server listens on
SSH_LISTEN_HOST =
; Port number to be exposed in clone URL
@ -35,7 +36,7 @@ $OpenBSD: patch-conf_app_ini,v 1.2 2017/04/05 00:57:47 danj Exp $
; Port number builtin SSH server listens on
SSH_LISTEN_PORT = %(SSH_PORT)s
; Root path of SSH directory, default is '~/.ssh', but you have to use '/home/git/.ssh'.
@@ -127,13 +127,13 @@ DISABLE_ROUTER_LOG = false
@@ -155,13 +155,13 @@ DISABLE_ROUTER_LOG = false
; not forget to export the private key):
; $ openssl pkcs12 -in cert.pfx -out cert.pem -nokeys
; $ openssl pkcs12 -in cert.pfx -out key.pem -nocerts -nodes
@ -52,29 +53,33 @@ $OpenBSD: patch-conf_app_ini,v 1.2 2017/04/05 00:57:47 danj Exp $
; Application level GZIP support
ENABLE_GZIP = false
; Landing page for non-logged users, can be "home" or "explore"
@@ -148,7 +148,7 @@ DSA = 1024
@@ -182,7 +182,7 @@ DSA = 1024
[database]
; Either "mysql", "postgres" or "sqlite3", it's your choice
; Either "mysql", "postgres", "mssql" or "sqlite3", it's your choice
-DB_TYPE = mysql
+DB_TYPE = sqlite3
HOST = 127.0.0.1:3306
NAME = gitea
USER = root
@@ -156,10 +156,10 @@ PASSWD =
@@ -190,14 +190,14 @@ PASSWD =
; For "postgres" only, either "disable", "require" or "verify-full"
SSL_MODE = disable
; For "sqlite3" and "tidb", use absolute path when you start as service
-PATH = data/gitea.db
+PATH = ${LOCALSTATEDIR}/gitea/data/gitea.db
; For "sqlite3" only. Query timeout
SQLITE_TIMEOUT = 500
; For iterate buffer, default is 50
ITERATE_BUFFER_SIZE = 50
[indexer]
-ISSUE_INDEXER_PATH = indexers/issues.bleve
+ISSUE_INDEXER_PATH = ${LOCALSTATEDIR}/gitea/indexers/issues.bleve
UPDATE_BUFFER_LEN = 20
[admin]
@@ -235,8 +235,8 @@ HELO_HOSTNAME =
; repo indexer by default disabled, since it uses a lot of disk space
REPO_INDEXER_ENABLED = false
REPO_INDEXER_PATH = indexers/repos.bleve
@@ -324,8 +324,8 @@ HELO_HOSTNAME =
SKIP_VERIFY =
; Use client certificate
USE_CERTIFICATE = false
@ -85,7 +90,7 @@ $OpenBSD: patch-conf_app_ini,v 1.2 2017/04/05 00:57:47 danj Exp $
; Mail from address, RFC 5322. This can be just an email address, or the `"Name" <email@example.com>` format
FROM =
; Mailer user name and password
@@ -261,13 +261,13 @@ HOST =
@@ -355,13 +355,13 @@ ITEM_TTL = 16h
[session]
; Either "memory", "file", or "redis", default is "memory"
@ -101,7 +106,7 @@ $OpenBSD: patch-conf_app_ini,v 1.2 2017/04/05 00:57:47 danj Exp $
; Session cookie name
COOKIE_NAME = i_like_gitea
; If you use session in https only, default is false
@@ -280,7 +280,7 @@ GC_INTERVAL_TIME = 86400
@@ -374,7 +374,7 @@ GC_INTERVAL_TIME = 86400
SESSION_LIFE_TIME = 86400
[picture]
@ -110,7 +115,7 @@ $OpenBSD: patch-conf_app_ini,v 1.2 2017/04/05 00:57:47 danj Exp $
; Chinese users can choose "duoshuo"
; or a custom avatar source, like: http://cn.gravatar.com/avatar/
GRAVATAR_SOURCE = gravatar
@@ -295,7 +295,7 @@ ENABLE_FEDERATED_AVATAR = false
@@ -389,7 +389,7 @@ ENABLE_FEDERATED_AVATAR = false
; Whether attachments are enabled. Defaults to `true`
ENABLE = true
; Path for attachments. Defaults to `data/attachments`
@ -119,7 +124,7 @@ $OpenBSD: patch-conf_app_ini,v 1.2 2017/04/05 00:57:47 danj Exp $
; One or more allowed types, e.g. image/jpeg|image/png
ALLOWED_TYPES = image/jpeg|image/png|application/zip|application/gzip
; Max size of each file. Defaults to 32MB
@@ -310,14 +310,14 @@ MAX_FILES = 5
@@ -404,14 +404,14 @@ MAX_FILES = 5
FORMAT =
[log]

View File

@ -0,0 +1,16 @@
$OpenBSD: patch-main_go,v 1.1 2018/01/17 21:05:38 landry Exp $
Gets shown in the footer.
Index: main.go
--- main.go.orig
+++ main.go
@@ -21,7 +21,7 @@ import (
)
// Version holds the current Gitea version
-var Version = "1.3.0-dev"
+var Version = "${VERSION}"
// Tags holds the build tags used
var Tags = ""

View File

@ -1,2 +1,2 @@
Gitea - Git with a cup of tea is a painless self-hosted Git service comparable
Gitea - Git with a cup of tea is a painless self-hosted Git service comparable
to Github, Bitbucket or Gitlab.

File diff suppressed because it is too large Load Diff

35
www/gitea/pkg/README Normal file
View File

@ -0,0 +1,35 @@
$OpenBSD: README,v 1.1 2018/01/17 21:05:38 landry Exp $
+-----------------------------------------------------------------------
| Running ${FULLPKGNAME} on OpenBSD
+-----------------------------------------------------------------------
Gitea can be setup to serve HTTP requests on its own, or can run behind
HTTP proxy like relayd(8) or nginx(8). Another option is to let OpenBSD
httpd(8) serve HTTP requests and pass it to Gitea via FastCGI protocol.
Example configuration for httpd(8) and Gitea communicating via FastCGI
======================================================================
Relevant configuration directives in ${SYSCONFDIR}/httpd.conf:
-----------------------------------------------------
# An HTTPS server using SSL/TLS
server "gitea.example.com" {
listen on $ext_addr tls port 443
tls certificate "/etc/ssl/gitea.example.com.pem"
tls key "/etc/ssl/private/gitea.example.com.key"
connection { max requests 500, timeout 3600 }
location "/*" { fastcgi socket ":10787" }
}
Relevant configuration directives in ${SYSCONFDIR}/gitea/conf/app.ini:
-------------------------------------------------------------
[server]
PROTOCOL = fcgi
DOMAIN = gitea.example.com
ROOT_URL = https://gitea.example.com
HTTP_ADDR = 127.0.0.1
HTTP_PORT = 10787
LOCAL_ROOT_URL = https://gitea.example.com/