Update Gitea to 1.4.2
This commit is contained in:
parent
ad3c45664a
commit
0701059000
|
@ -1,17 +1,17 @@
|
||||||
From 76b1b0b0933eb352f90b4d841f328acc8f632eff Mon Sep 17 00:00:00 2001
|
From 645901c3414447a928006f3e873bd7bdbc2c8f52 Mon Sep 17 00:00:00 2001
|
||||||
From: Martchus <martchus@gmx.net>
|
From: Martchus <martchus@gmx.net>
|
||||||
Date: Sun, 19 Mar 2017 18:03:36 +0100
|
Date: Sun, 19 Mar 2017 18:03:36 +0100
|
||||||
Subject: [PATCH 1/2] Adjust config for Arch Linux package
|
Subject: [PATCH 1/2] Adjust config for Arch Linux package
|
||||||
|
|
||||||
---
|
---
|
||||||
conf/app.ini | 14 +++++++-------
|
custom/conf/app.ini.sample | 16 ++++++++--------
|
||||||
1 file changed, 7 insertions(+), 7 deletions(-)
|
1 file changed, 8 insertions(+), 8 deletions(-)
|
||||||
|
|
||||||
diff --git a/conf/app.ini b/conf/app.ini
|
diff --git a/custom/conf/app.ini.sample b/custom/conf/app.ini.sample
|
||||||
index 1390d453..1ff5acef 100644
|
index 7dddd5525..2f74bab0d 100644
|
||||||
--- a/conf/app.ini
|
--- a/custom/conf/app.ini.sample
|
||||||
+++ b/conf/app.ini
|
+++ b/custom/conf/app.ini.sample
|
||||||
@@ -1,12 +1,12 @@
|
@@ -5,12 +5,12 @@
|
||||||
; App name that shows on every page title
|
; App name that shows on every page title
|
||||||
APP_NAME = Gitea: Git with a cup of tea
|
APP_NAME = Gitea: Git with a cup of tea
|
||||||
; Change it if you run locally
|
; Change it if you run locally
|
||||||
|
@ -26,7 +26,7 @@ index 1390d453..1ff5acef 100644
|
||||||
SCRIPT_TYPE = bash
|
SCRIPT_TYPE = bash
|
||||||
; Default ANSI charset
|
; Default ANSI charset
|
||||||
ANSI_CHARSET =
|
ANSI_CHARSET =
|
||||||
@@ -127,13 +127,13 @@ DISABLE_ROUTER_LOG = false
|
@@ -169,13 +169,13 @@ DISABLE_ROUTER_LOG = false
|
||||||
; not forget to export the private key):
|
; not forget to export the private key):
|
||||||
; $ openssl pkcs12 -in cert.pfx -out cert.pem -nokeys
|
; $ openssl pkcs12 -in cert.pfx -out cert.pem -nokeys
|
||||||
; $ openssl pkcs12 -in cert.pfx -out key.pem -nocerts -nodes
|
; $ openssl pkcs12 -in cert.pfx -out key.pem -nocerts -nodes
|
||||||
|
@ -36,23 +36,24 @@ index 1390d453..1ff5acef 100644
|
||||||
+KEY_FILE = /var/lib/gitea/cert/key.pem
|
+KEY_FILE = /var/lib/gitea/cert/key.pem
|
||||||
; Upper level of template and static file path
|
; Upper level of template and static file path
|
||||||
; default is the path where Gitea is executed
|
; default is the path where Gitea is executed
|
||||||
STATIC_ROOT_PATH =
|
-STATIC_ROOT_PATH =
|
||||||
|
+STATIC_ROOT_PATH = /usr/share/gitea
|
||||||
; Default path for App data
|
; Default path for App data
|
||||||
-APP_DATA_PATH = data
|
-APP_DATA_PATH = data
|
||||||
+APP_DATA_PATH = /var/lib/gitea/data
|
+APP_DATA_PATH = /var/lib/gitea/data
|
||||||
; Application level GZIP support
|
; Application level GZIP support
|
||||||
ENABLE_GZIP = false
|
ENABLE_GZIP = false
|
||||||
; Landing page for non-logged users, can be "home" or "explore"
|
; Landing page, can be "home", "explore", or "organizations"
|
||||||
@@ -156,7 +156,7 @@ PASSWD =
|
@@ -205,7 +205,7 @@ PASSWD =
|
||||||
; For "postgres" only, either "disable", "require" or "verify-full"
|
; For "postgres" only, either "disable", "require" or "verify-full"
|
||||||
SSL_MODE = disable
|
SSL_MODE = disable
|
||||||
; For "sqlite3" and "tidb", use absolute path when you start as service
|
; For "sqlite3" and "tidb", use absolute path when you start as service
|
||||||
-PATH = data/gitea.db
|
-PATH = data/gitea.db
|
||||||
+PATH = /var/lib/gitea/gitea.db
|
+PATH = /var/lib/gitea/gitea.db
|
||||||
|
; For "sqlite3" only. Query timeout
|
||||||
[indexer]
|
SQLITE_TIMEOUT = 500
|
||||||
ISSUE_INDEXER_PATH = indexers/issues.bleve
|
; For iterate buffer, default is 50
|
||||||
@@ -310,7 +310,7 @@ MAX_FILES = 5
|
@@ -420,7 +420,7 @@ MAX_FILES = 5
|
||||||
FORMAT =
|
FORMAT =
|
||||||
|
|
||||||
[log]
|
[log]
|
||||||
|
@ -62,5 +63,5 @@ index 1390d453..1ff5acef 100644
|
||||||
; Use comma to separate multiple modes, e.g. "console, file"
|
; Use comma to separate multiple modes, e.g. "console, file"
|
||||||
MODE = console
|
MODE = console
|
||||||
--
|
--
|
||||||
2.13.1
|
2.17.1
|
||||||
|
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
From e0502aec7784f655db71380f375e959debacaa35 Mon Sep 17 00:00:00 2001
|
From 69c3aa5739288c15f69f7f42d7df06db77e5b498 Mon Sep 17 00:00:00 2001
|
||||||
From: Martchus <martchus@gmx.net>
|
From: Martchus <martchus@gmx.net>
|
||||||
Date: Sun, 19 Mar 2017 18:04:48 +0100
|
Date: Sun, 19 Mar 2017 18:04:48 +0100
|
||||||
Subject: [PATCH 2/2] Adjust service file for Arch Linux package
|
Subject: [PATCH 2/2] Adjust service file for Arch Linux package
|
||||||
|
|
||||||
---
|
---
|
||||||
scripts/systemd/gitea.service | 10 +++++-----
|
contrib/systemd/gitea.service | 10 +++++-----
|
||||||
1 file changed, 5 insertions(+), 5 deletions(-)
|
1 file changed, 5 insertions(+), 5 deletions(-)
|
||||||
|
|
||||||
diff --git a/scripts/systemd/gitea.service b/scripts/systemd/gitea.service
|
diff --git a/contrib/systemd/gitea.service b/contrib/systemd/gitea.service
|
||||||
index 758f1590..302e7a9e 100644
|
index 7c09fa321..c2ee2380d 100644
|
||||||
--- a/scripts/systemd/gitea.service
|
--- a/contrib/systemd/gitea.service
|
||||||
+++ b/scripts/systemd/gitea.service
|
+++ b/contrib/systemd/gitea.service
|
||||||
@@ -15,12 +15,12 @@ After=network.target
|
@@ -16,12 +16,12 @@ After=network.target
|
||||||
#LimitMEMLOCK=infinity
|
|
||||||
#LimitNOFILE=65535
|
#LimitNOFILE=65535
|
||||||
|
RestartSec=2s
|
||||||
Type=simple
|
Type=simple
|
||||||
-User=git
|
-User=git
|
||||||
-Group=git
|
-Group=git
|
||||||
|
@ -25,10 +25,10 @@ index 758f1590..302e7a9e 100644
|
||||||
+ExecStart=/usr/bin/gitea web --config /etc/gitea/app.ini
|
+ExecStart=/usr/bin/gitea web --config /etc/gitea/app.ini
|
||||||
Restart=always
|
Restart=always
|
||||||
-Environment=USER=git HOME=/home/git
|
-Environment=USER=git HOME=/home/git
|
||||||
+Environment=USER=gitea HOME=/var/lib/gitea
|
+Environment=USER=gitea HOME=/var/lib/gitea GITEA_WORK_DIR=/var/lib/gitea
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
--
|
--
|
||||||
2.13.1
|
2.17.1
|
||||||
|
|
||||||
|
|
|
@ -6,9 +6,11 @@ _pkgname=gitea
|
||||||
_orga=go-${_pkgname}
|
_orga=go-${_pkgname}
|
||||||
_gourl=code.$_pkgname.io/$_pkgname
|
_gourl=code.$_pkgname.io/$_pkgname
|
||||||
_userid=521
|
_userid=521
|
||||||
|
_confdir=custom/conf
|
||||||
|
_scriptsdir=contrib
|
||||||
|
|
||||||
pkgname=${_pkgname}
|
pkgname=${_pkgname}
|
||||||
pkgver=1.1.4
|
pkgver=1.4.2
|
||||||
pkgrel=2
|
pkgrel=2
|
||||||
#epoch=
|
#epoch=
|
||||||
pkgdesc='Self Hosted Git Service written in Go'
|
pkgdesc='Self Hosted Git Service written in Go'
|
||||||
|
@ -29,9 +31,9 @@ backup=("etc/$_pkgname/app.ini")
|
||||||
source=("$_pkgname-$pkgver::https://github.com/$_orga/$_pkgname/archive/v${pkgver}.tar.gz"
|
source=("$_pkgname-$pkgver::https://github.com/$_orga/$_pkgname/archive/v${pkgver}.tar.gz"
|
||||||
'0001-Adjust-config-for-Arch-Linux-package.patch'
|
'0001-Adjust-config-for-Arch-Linux-package.patch'
|
||||||
'0002-Adjust-service-file-for-Arch-Linux-package.patch')
|
'0002-Adjust-service-file-for-Arch-Linux-package.patch')
|
||||||
sha512sums=('4427c4c1a588dcf201f707c3e2827fd702a0f8c0add63c6a5eff0d6ef8d21fdaaaf275f8e790017751f161431d563df22f71a6ea046085f9fb1d57da99f20524'
|
sha512sums=('ab4cd43753afffec53a46c093bf92a9c31a633f9c8b5d730e8782eceee1e581cce673945005aaa6a94428d8acfcf2e6618f3abcc49f2ac5439aa8a4fb910b550'
|
||||||
'2885691d8f35ecb72e3a1d5a52708209715b537a0afef1147f32d10c188b1bbb067fd3db7c034273a5499a46f9fbb3310004fcf67eda1797dd193eef5a81460b'
|
'909021bf765f5c40ffab5e2d460b265fa4cd658f85728953cbe9a02694721ece9622a09438302a4b4c02d5ee5eca8cf27b99a874bf4e00a92cdd9f90f4cda47e'
|
||||||
'5ea1d89809427fe395214c5dde88bdb4c4a62e2d19f9da7fa480a0a3cfaaaf2e97c906bd3dceb11676c9720896d72a73f48638411389fa1f07fcbc17e94e0545')
|
'cad4f0ecf55cbee745c2b8da743206f639bf7f3384dd123c2746b7671213e322c55a4c51bb9b9af5f80b0e0a5b6128ec5f55f89788aa664b43cab5f6fe86ab19')
|
||||||
_goroot='/usr/lib/go'
|
_goroot='/usr/lib/go'
|
||||||
|
|
||||||
prepare() {
|
prepare() {
|
||||||
|
@ -73,26 +75,32 @@ build() {
|
||||||
go build -x -ldflags="-s -w" -tags='sqlite pam cert'
|
go build -x -ldflags="-s -w" -tags='sqlite pam cert'
|
||||||
|
|
||||||
echo "u $_pkgname $_userid \"$_pkgname user\" /var/lib/$_pkgname" > "$srcdir/$_pkgname.sysusers"
|
echo "u $_pkgname $_userid \"$_pkgname user\" /var/lib/$_pkgname" > "$srcdir/$_pkgname.sysusers"
|
||||||
echo "#!/usr/bin/bash
|
|
||||||
|
# build wrapper script for Gogs' backup command
|
||||||
|
if [[ $pkgname == 'gogs' ]]; then
|
||||||
|
echo "#!/usr/bin/bash
|
||||||
if [[ \$USER != $_pkgname ]]; then
|
if [[ \$USER != $_pkgname ]]; then
|
||||||
echo \"Must run as user $_pkgname!\"
|
echo \"Must run as user $_pkgname!\"
|
||||||
exit -1
|
exit -1
|
||||||
fi
|
fi
|
||||||
export GOGS_CUSTOM=/var/lib/$_pkgname/custom
|
export GOGS_CUSTOM=/var/lib/$_pkgname/custom
|
||||||
/usr/bin/$_pkgname backup --config /etc/$_pkgname/app.ini \$@" > "$srcdir/$_pkgname-backup.sh"
|
/usr/bin/$_pkgname backup --config /etc/$_pkgname/app.ini \$@" > "$srcdir/$_pkgname-backup.sh"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
package() {
|
package() {
|
||||||
install -Dm0755 "$srcdir/build/src/${_gourl}/$_pkgname" "$pkgdir/usr/bin/$_pkgname"
|
install -Dm0755 "$srcdir/build/src/${_gourl}/$_pkgname" "$pkgdir/usr/bin/$_pkgname"
|
||||||
install -Dm0755 "$srcdir/$_pkgname-backup.sh" "$pkgdir/usr/bin/$_pkgname-backup"
|
if [[ $pkgname == 'gogs' ]]; then
|
||||||
|
install -Dm0755 "$srcdir/$_pkgname-backup.sh" "$pkgdir/usr/bin/$_pkgname-backup"
|
||||||
|
fi
|
||||||
|
|
||||||
mkdir -p "$pkgdir/usr/share/${_pkgname}"
|
mkdir -p "$pkgdir/usr/share/${_pkgname}"
|
||||||
cp -r "$srcdir/build/src/${_gourl}/conf" "$pkgdir/usr/share/${_pkgname}"
|
cp -r "$srcdir/build/src/${_gourl}/${_confdir}" "$pkgdir/usr/share/${_pkgname}"
|
||||||
cp -r "$srcdir/build/src/${_gourl}/public" "$pkgdir/usr/share/${_pkgname}"
|
cp -r "$srcdir/build/src/${_gourl}/public" "$pkgdir/usr/share/${_pkgname}"
|
||||||
cp -r "$srcdir/build/src/${_gourl}/templates" "$pkgdir/usr/share/${_pkgname}"
|
cp -r "$srcdir/build/src/${_gourl}/templates" "$pkgdir/usr/share/${_pkgname}"
|
||||||
|
|
||||||
install -Dm0664 -g "$_userid" "$pkgdir/usr/share/$_pkgname/conf/app.ini" "$pkgdir/etc/$_pkgname/app.ini"
|
install -Dm0664 -g "$_userid" "$pkgdir/usr/share/$_pkgname/conf/app.ini"* "$pkgdir/etc/$_pkgname/app.ini"
|
||||||
install -Dm0644 "$srcdir/build/src/${_gourl}/scripts/systemd/$_pkgname.service" "$pkgdir/usr/lib/systemd/system/$_pkgname.service"
|
install -Dm0644 "$srcdir/build/src/${_gourl}/${_scriptsdir}/systemd/$_pkgname.service" "$pkgdir/usr/lib/systemd/system/$_pkgname.service"
|
||||||
install -Dm0644 "$srcdir/build/src/${_gourl}/LICENSE" "$pkgdir/usr/share/licenses/$_pkgname"
|
install -Dm0644 "$srcdir/build/src/${_gourl}/LICENSE" "$pkgdir/usr/share/licenses/$_pkgname"
|
||||||
install -Dm0644 "${srcdir}/$_pkgname.sysusers" "${pkgdir}/usr/lib/sysusers.d/$_pkgname.conf"
|
install -Dm0644 "${srcdir}/$_pkgname.sysusers" "${pkgdir}/usr/lib/sysusers.d/$_pkgname.conf"
|
||||||
install -dm0700 -o "$_userid" -g "$_userid" "$pkgdir/var/lib/$_pkgname"
|
install -dm0700 -o "$_userid" -g "$_userid" "$pkgdir/var/lib/$_pkgname"
|
||||||
|
@ -100,4 +108,8 @@ package() {
|
||||||
for subdir in avatars repos certs data/sessions data/tmp; do
|
for subdir in avatars repos certs data/sessions data/tmp; do
|
||||||
install -dm0700 -o "$_userid" -g "$_userid" "$pkgdir/var/lib/$_pkgname/$subdir"
|
install -dm0700 -o "$_userid" -g "$_userid" "$pkgdir/var/lib/$_pkgname/$subdir"
|
||||||
done
|
done
|
||||||
|
if [[ $pkgname == 'gitea' ]]; then
|
||||||
|
install -dm0700 -o "$_userid" -g "$_userid" "$pkgdir/var/lib/$_pkgname/conf"
|
||||||
|
cp -r "$srcdir/build/src/${_gourl}/options/locale" "$pkgdir/var/lib/$_pkgname/conf"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,6 +6,8 @@ _pkgname=gogs
|
||||||
_orga=gogs
|
_orga=gogs
|
||||||
_gourl=github.com/$_orga/$_pkgname
|
_gourl=github.com/$_orga/$_pkgname
|
||||||
_userid=511
|
_userid=511
|
||||||
|
_confdir=conf
|
||||||
|
_scriptsdir=scripts
|
||||||
|
|
||||||
pkgname=$_pkgname
|
pkgname=$_pkgname
|
||||||
pkgver=0.11.53
|
pkgver=0.11.53
|
||||||
|
@ -73,13 +75,17 @@ build() {
|
||||||
go build -x -ldflags="-s -w" -tags='sqlite pam cert'
|
go build -x -ldflags="-s -w" -tags='sqlite pam cert'
|
||||||
|
|
||||||
echo "u $_pkgname $_userid \"$_pkgname user\" /var/lib/$_pkgname" > "$srcdir/$_pkgname.sysusers"
|
echo "u $_pkgname $_userid \"$_pkgname user\" /var/lib/$_pkgname" > "$srcdir/$_pkgname.sysusers"
|
||||||
echo "#!/usr/bin/bash
|
|
||||||
|
# build wrapper script for Gogs' backup command
|
||||||
|
if [[ $pkgname == 'gogs' ]]; then
|
||||||
|
echo "#!/usr/bin/bash
|
||||||
if [[ \$USER != $_pkgname ]]; then
|
if [[ \$USER != $_pkgname ]]; then
|
||||||
echo \"Must run as user $_pkgname!\"
|
echo \"Must run as user $_pkgname!\"
|
||||||
exit -1
|
exit -1
|
||||||
fi
|
fi
|
||||||
export GOGS_CUSTOM=/var/lib/$_pkgname/custom
|
export GOGS_CUSTOM=/var/lib/$_pkgname/custom
|
||||||
/usr/bin/$_pkgname backup --config /etc/$_pkgname/app.ini \$@" > "$srcdir/$_pkgname-backup.sh"
|
/usr/bin/$_pkgname backup --config /etc/$_pkgname/app.ini \$@" > "$srcdir/$_pkgname-backup.sh"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
package() {
|
package() {
|
||||||
|
@ -87,12 +93,12 @@ package() {
|
||||||
install -Dm0755 "$srcdir/$_pkgname-backup.sh" "$pkgdir/usr/bin/$_pkgname-backup"
|
install -Dm0755 "$srcdir/$_pkgname-backup.sh" "$pkgdir/usr/bin/$_pkgname-backup"
|
||||||
|
|
||||||
mkdir -p "$pkgdir/usr/share/${_pkgname}"
|
mkdir -p "$pkgdir/usr/share/${_pkgname}"
|
||||||
cp -r "$srcdir/build/src/${_gourl}/conf" "$pkgdir/usr/share/${_pkgname}"
|
cp -r "$srcdir/build/src/${_gourl}/${_confdir}" "$pkgdir/usr/share/${_pkgname}"
|
||||||
cp -r "$srcdir/build/src/${_gourl}/public" "$pkgdir/usr/share/${_pkgname}"
|
cp -r "$srcdir/build/src/${_gourl}/public" "$pkgdir/usr/share/${_pkgname}"
|
||||||
cp -r "$srcdir/build/src/${_gourl}/templates" "$pkgdir/usr/share/${_pkgname}"
|
cp -r "$srcdir/build/src/${_gourl}/templates" "$pkgdir/usr/share/${_pkgname}"
|
||||||
|
|
||||||
install -Dm0664 -g "$_userid" "$pkgdir/usr/share/$_pkgname/conf/app.ini" "$pkgdir/etc/$_pkgname/app.ini"
|
install -Dm0664 -g "$_userid" "$pkgdir/usr/share/$_pkgname/conf/app.ini"* "$pkgdir/etc/$_pkgname/app.ini"
|
||||||
install -Dm0644 "$srcdir/build/src/${_gourl}/scripts/systemd/$_pkgname.service" "$pkgdir/usr/lib/systemd/system/$_pkgname.service"
|
install -Dm0644 "$srcdir/build/src/${_gourl}/${_scriptsdir}/systemd/$_pkgname.service" "$pkgdir/usr/lib/systemd/system/$_pkgname.service"
|
||||||
install -Dm0644 "$srcdir/build/src/${_gourl}/LICENSE" "$pkgdir/usr/share/licenses/$_pkgname"
|
install -Dm0644 "$srcdir/build/src/${_gourl}/LICENSE" "$pkgdir/usr/share/licenses/$_pkgname"
|
||||||
install -Dm0644 "${srcdir}/$_pkgname.sysusers" "${pkgdir}/usr/lib/sysusers.d/$_pkgname.conf"
|
install -Dm0644 "${srcdir}/$_pkgname.sysusers" "${pkgdir}/usr/lib/sysusers.d/$_pkgname.conf"
|
||||||
install -dm0700 -o "$_userid" -g "$_userid" "$pkgdir/var/lib/$_pkgname"
|
install -dm0700 -o "$_userid" -g "$_userid" "$pkgdir/var/lib/$_pkgname"
|
||||||
|
@ -100,4 +106,8 @@ package() {
|
||||||
for subdir in avatars repos certs data/sessions data/tmp; do
|
for subdir in avatars repos certs data/sessions data/tmp; do
|
||||||
install -dm0700 -o "$_userid" -g "$_userid" "$pkgdir/var/lib/$_pkgname/$subdir"
|
install -dm0700 -o "$_userid" -g "$_userid" "$pkgdir/var/lib/$_pkgname/$subdir"
|
||||||
done
|
done
|
||||||
|
if [[ $pkgname == 'gitea' ]]; then
|
||||||
|
install -dm0700 -o "$_userid" -g "$_userid" "$pkgdir/var/lib/$_pkgname/conf"
|
||||||
|
cp -r "$srcdir/build/src/${_gourl}/options/locale" "$pkgdir/var/lib/$_pkgname/conf"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue