summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorkageru2021-05-29 18:43:42 +0200
committerkageru2021-05-29 18:52:17 +0200
commit2d6ef69d24e47beb06465f1affbd8d4ea3f4d424 (patch)
tree394761bbf9a3b5196e6ac7c83f1df9fcdabb2c20
parent6a9abaff13e9d8bec0c2a66d82f6fcb000783b1d (diff)
downloadaur-2d6ef69d24e47beb06465f1affbd8d4ea3f4d424.tar.gz
Provide config changes as standalone config
...because upstream gitea no longer provides a working default config and instead expects the user to define only the relevant options. Also set the upstream branch because they switched from master to main
-rw-r--r--.SRCINFO9
-rw-r--r--PKGBUILD47
-rw-r--r--app.ini20
-rw-r--r--gitea-arch-defaults.patch51
-rw-r--r--gitea.install12
5 files changed, 49 insertions, 90 deletions
diff --git a/.SRCINFO b/.SRCINFO
index a2cb0cb0b831..53e29802d46f 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,9 +1,8 @@
pkgbase = gitea-git
pkgdesc = Painless self-hosted Git service. Community managed fork of Gogs.
- pkgver = v1.15.0_dev_211_g0590176a23
+ pkgver = v1.15.0_dev_359_g2a998048ef
pkgrel = 1
url = https://gitea.io/
- install = gitea.install
arch = x86_64
arch = i686
arch = arm
@@ -24,16 +23,16 @@ pkgbase = gitea-git
provides = gitea
conflicts = gitea
backup = etc/gitea/app.ini
- source = git+https://github.com/go-gitea/gitea.git
+ source = git+https://github.com/go-gitea/gitea.git#branch=main
source = gitea.tmpfiles
source = gitea.service
source = gitea.sysusers
- source = gitea-arch-defaults.patch
+ source = app.ini
sha512sums = SKIP
sha512sums = 89bf119a91fd48ed35c06131c67de1b4300bd2e79522c47aee9a73d7f1ebb08d9bceadc37408bd2425475d92c8bf59d87a799f2ce0a46bee860bf9fc7a904103
sha512sums = d65e053a98976423c6c1f3a4b6b0fd40f51e50a32d7afc651fc02414bb9f3bf574a58cc6a8c96760b85ab9f4f2bfcd0884bd7e9edcc2d71f07e7c1a548783c4c
sha512sums = 77f672ed82bc8f78ca04b1e2b7c7d026cb897da6e4f057817adbe1242bf8a67875061553806e6b027cdb3266cdf217ee3993efd9242a66c5802ed34344b5ded1
- sha512sums = 6b5b1e2da05f8b2dc7015608c86db0095402f2139f41d5ac6d4de8b27b0bea387b6f7032985aced0c46603f0fdcb0201767f8b153aa31e62798eb93d90c49129
+ sha512sums = 704930578fe4231c45bcfdcc65df5d4f523b96909e670cc6e4f098770043b0f47fe5d90621788bc6ba300b0f19909a203068d2a1c142e7c5d29dc03a0dc5fc1d
pkgname = gitea-git
diff --git a/PKGBUILD b/PKGBUILD
index d1f44f138973..8ef2da745d06 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -9,7 +9,7 @@
_pkgname='gitea'
pkgname=gitea-git
-pkgver=v1.15.0_dev_211_g0590176a23
+pkgver=v1.15.0_dev_359_g2a998048ef
pkgrel=1
pkgdesc='Painless self-hosted Git service. Community managed fork of Gogs.'
arch=('x86_64' 'i686' 'arm' 'armv6h' 'armv7h' 'aarch64')
@@ -17,27 +17,32 @@ url='https://gitea.io/'
license=('MIT')
depends=('git')
makedepends=('go' 'npm')
-optdepends=('mariadb: MariaDB support'
- 'memcached: MemCached support'
- 'openssh: GIT over SSH support'
- 'pam: Authentication via PAM support'
- 'postgresql: PostgreSQL support'
- 'redis: Redis support'
- 'sqlite: SQLite support')
+optdepends=(
+ 'mariadb: MariaDB support'
+ 'memcached: MemCached support'
+ 'openssh: GIT over SSH support'
+ 'pam: Authentication via PAM support'
+ 'postgresql: PostgreSQL support'
+ 'redis: Redis support'
+ 'sqlite: SQLite support'
+)
backup=('etc/gitea/app.ini')
conflicts=('gitea')
provides=('gitea')
-source=(git+https://github.com/go-gitea/gitea.git
- gitea.tmpfiles
- gitea.service
- gitea.sysusers
- gitea-arch-defaults.patch)
-sha512sums=('SKIP'
- '89bf119a91fd48ed35c06131c67de1b4300bd2e79522c47aee9a73d7f1ebb08d9bceadc37408bd2425475d92c8bf59d87a799f2ce0a46bee860bf9fc7a904103'
- 'd65e053a98976423c6c1f3a4b6b0fd40f51e50a32d7afc651fc02414bb9f3bf574a58cc6a8c96760b85ab9f4f2bfcd0884bd7e9edcc2d71f07e7c1a548783c4c'
- '77f672ed82bc8f78ca04b1e2b7c7d026cb897da6e4f057817adbe1242bf8a67875061553806e6b027cdb3266cdf217ee3993efd9242a66c5802ed34344b5ded1'
- '6b5b1e2da05f8b2dc7015608c86db0095402f2139f41d5ac6d4de8b27b0bea387b6f7032985aced0c46603f0fdcb0201767f8b153aa31e62798eb93d90c49129')
-install=gitea.install
+source=(
+ git+https://github.com/go-gitea/gitea.git#branch=main
+ gitea.tmpfiles
+ gitea.service
+ gitea.sysusers
+ app.ini
+)
+sha512sums=(
+ 'SKIP'
+ '89bf119a91fd48ed35c06131c67de1b4300bd2e79522c47aee9a73d7f1ebb08d9bceadc37408bd2425475d92c8bf59d87a799f2ce0a46bee860bf9fc7a904103'
+ 'd65e053a98976423c6c1f3a4b6b0fd40f51e50a32d7afc651fc02414bb9f3bf574a58cc6a8c96760b85ab9f4f2bfcd0884bd7e9edcc2d71f07e7c1a548783c4c'
+ '77f672ed82bc8f78ca04b1e2b7c7d026cb897da6e4f057817adbe1242bf8a67875061553806e6b027cdb3266cdf217ee3993efd9242a66c5802ed34344b5ded1'
+ '704930578fe4231c45bcfdcc65df5d4f523b96909e670cc6e4f098770043b0f47fe5d90621788bc6ba300b0f19909a203068d2a1c142e7c5d29dc03a0dc5fc1d'
+)
pkgver() {
cd "${srcdir}/${_pkgname}"
@@ -46,8 +51,6 @@ pkgver() {
prepare() {
cd ${srcdir}/${_pkgname}
- # Change default repos path for ArchLinux and some additional settings
- patch -Np1 -i ../gitea-arch-defaults.patch
# Be nice to people with read-only home
GOCACHE="${srcdir}/cache" make vendor
}
@@ -72,7 +75,7 @@ package() {
install -Dm644 ${_pkgname}.service -t "${pkgdir}"/usr/lib/systemd/system/
install -Dm644 ${_pkgname}.tmpfiles "${pkgdir}"/usr/lib/tmpfiles.d/${_pkgname}.conf
install -Dm644 ${_pkgname}.sysusers "${pkgdir}"/usr/lib/sysusers.d/${_pkgname}.conf
- install -D ${_pkgname}/custom/conf/app.example.ini "${pkgdir}"/etc/gitea/app.ini
+ install -Dm644 app.ini "${pkgdir}"/etc/gitea/app.ini
}
# vim: ts=2 sw=2 et:
diff --git a/app.ini b/app.ini
new file mode 100644
index 000000000000..ec4ff4ac5ae2
--- /dev/null
+++ b/app.ini
@@ -0,0 +1,20 @@
+; Gitea no longer contains a default config file
+; and instead expects the user to only define
+; the settings they want to change.
+; This file contains the settings that
+; used to be in gitea-arch-defaults.patch
+
+RUN_USER = gitea
+
+[repository]
+ROOT = /var/lib/gitea/repos
+; set this here so the default isn’t sneakily changed upstream
+DEFAULT_BRANCH = master
+
+[database]
+LOG_SQL = false
+
+[log]
+ROOT_PATH = /var/log/gitea/
+MODE = console, file
+LEVEL = Info
diff --git a/gitea-arch-defaults.patch b/gitea-arch-defaults.patch
deleted file mode 100644
index 24846871f421..000000000000
--- a/gitea-arch-defaults.patch
+++ /dev/null
@@ -1,51 +0,0 @@
---- a/custom/conf/app.example.ini
-+++ b/custom/conf/app.example.ini
-@@ -9,7 +9,7 @@
- ; App name that shows in every page title
- APP_NAME = Gitea: Git with a cup of tea
- ; Change it if you run locally
--RUN_USER = git
-+RUN_USER = gitea
- ; Application run mode, affects performance and debugging. Either "dev", "prod" or "test", default is "prod"
- RUN_MODE = prod
-
-@@ -20,7 +20,7 @@
-
- [repository]
- ; Root path for storing all repository data. It must be an absolute path. By default, it is stored in a sub-directory of `APP_DATA_PATH`.
--ROOT =
-+ROOT = /var/lib/gitea/repos
- ; The script type this server supports. Usually this is `bash`, but some users report that only `sh` is available.
- SCRIPT_TYPE = bash
- ; DETECTED_CHARSETS_ORDER tie-break order for detected charsets.
-@@ -444,7 +444,7 @@
- ; For iterate buffer, default is 50
- ITERATE_BUFFER_SIZE = 50
- ; Show the database generated SQL
--LOG_SQL = true
-+LOG_SQL = false
- ; Maximum number of DB Connect retries
- DB_RETRIES = 10
- ; Backoff time per DB retry (time.Duration)
-@@ -903,10 +903,10 @@
- DEFAULT_UI_LOCATION =
-
- [log]
--ROOT_PATH =
-+ROOT_PATH = /var/log/gitea/
- ; Either "console", "file", "conn", "smtp" or "database", default is "console"
- ; Use comma to separate multiple modes, e.g. "console, file"
--MODE = console
-+MODE = console, file
- ; Buffer length of the channel, keep it as it is if you don't know what it is.
- BUFFER_LEN = 10000
- ; Either "Trace", "Debug", "Info", "Warn", "Error", "Critical", default is "Info"
-@@ -929,7 +929,7 @@
-
- ; For "console" mode only
- [log.console]
--LEVEL =
-+LEVEL = Info
- STDERR = false
-
- ; For "file" mode only
diff --git a/gitea.install b/gitea.install
deleted file mode 100644
index 6df0e4e41fe6..000000000000
--- a/gitea.install
+++ /dev/null
@@ -1,12 +0,0 @@
-post_upgrade() {
- if [ $(vercmp $2 1.12) -eq -1 ] ; then
- cat << EOF
-It seems that in 1.12, gitea has changed the data load behavior.
-If you’re using the default paths (/var/lib/gitea),
-no changes are necessary.
-If you’re using custom paths, you might have to set then with
--w for working directory and/or -C for gitea/custom directory.
-Refer to gitea --help if you’re experiencing any issues.
-EOF
- fi
-}