diff --git a/gogs/default/0001-Adjust-config-for-Arch-Linux-package.patch b/gogs/default/0001-Adjust-config-for-Arch-Linux-package.patch index 8f9e7fe7..9d97b76c 100644 --- a/gogs/default/0001-Adjust-config-for-Arch-Linux-package.patch +++ b/gogs/default/0001-Adjust-config-for-Arch-Linux-package.patch @@ -1,17 +1,31 @@ -From 70596ab48d0e1f0f1474bbc60a41b0e3cb5931d6 Mon Sep 17 00:00:00 2001 +From 25d1ec73cde6321e90bb6088fd6409dd95b310fa Mon Sep 17 00:00:00 2001 From: Martchus Date: Sun, 19 Mar 2017 18:03:36 +0100 Subject: [PATCH 1/2] Adjust config for Arch Linux package --- - conf/app.ini | 24 ++++++++++++------------ - 1 file changed, 12 insertions(+), 12 deletions(-) + conf/app.ini | 31 +++++++++++++++++++------------ + 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/conf/app.ini b/conf/app.ini -index 8049ce3d..a64cd2ff 100644 +index 0c6512b17..42723cfd5 100644 --- a/conf/app.ini +++ b/conf/app.ini -@@ -5,7 +5,7 @@ +@@ -1,11 +1,18 @@ +-# !!! NEVER EVER MODIFY THIS FILE !!! +-# !!! PLEASE MAKE CHANGES ON CORRESPONDING CUSTOM CONFIG FILE !!! +-# !!! IF YOU ARE PACKAGING PROVIDER, PLEASE MAKE OWN COPY OF IT !!! ++# Feel free to modify this file! ++# In case a new version of this file is availabe, pacman will notify automatically when ++# updating and creates the new version as app.ini.pacnew. You can use diff or a similar ++# tool to see the changes between your configuration and the new default configuration. ++ ++# There is also a copy of this file under /usr/share/gogs/conf/app.ini in case ++# you need to go back. ++ ++# It is also possible to remove all default values and just specify what you want ++# to change because /usr/share/gogs/conf/app.ini also serves as fallback. + ; App name that shows on every page title APP_NAME = Gogs ; The name of the system user that runs Gogs @@ -20,7 +34,7 @@ index 8049ce3d..a64cd2ff 100644 ; Either "dev", "prod" or "test" RUN_MODE = dev -@@ -54,16 +54,16 @@ DISABLE_ROUTER_LOG = false +@@ -56,16 +63,16 @@ 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 @@ -41,7 +55,7 @@ index 8049ce3d..a64cd2ff 100644 ; Application level GZIP support ENABLE_GZIP = false ; Landing page for non-logged users, can be "home" or "explore" -@@ -71,7 +71,7 @@ LANDING_PAGE = home +@@ -73,7 +80,7 @@ LANDING_PAGE = home [repository] ; Root path for storing repositories's data, default is "~//gogs-repositories" @@ -50,7 +64,7 @@ index 8049ce3d..a64cd2ff 100644 ; The script type server supports, sometimes could be "sh" SCRIPT_TYPE = bash ; Default ANSI charset for an unrecognized charset -@@ -111,7 +111,7 @@ PREVIEWABLE_FILE_MODES = markdown +@@ -113,7 +120,7 @@ PREVIEWABLE_FILE_MODES = markdown ; Enable repository file uploads. ENABLED = true ; Path to temporarily store uploads (default path gets cleaned by Gogs in every start) @@ -59,16 +73,7 @@ index 8049ce3d..a64cd2ff 100644 ; File types that are allowed to be uploaded, e.g. image/jpeg|image/png. Leave empty means allow any file type ALLOWED_TYPES = ; Maximum size of each file in MB -@@ -124,7 +124,7 @@ MAX_FILES = 5 - ; Whether attachments are enabled. Defaults to `true` - ENABLED = true - ; Path for attachments. Defaults to `data/attachments` --PATH = data/attachments -+PATH = /var/lib/gogs/attachments - ; One or more allowed types, e.g. image/jpeg|image/png - ALLOWED_TYPES = */* - ; Max size of each file. Defaults to 32MB -@@ -170,7 +170,7 @@ PASSWD = +@@ -172,7 +179,7 @@ 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 @@ -77,25 +82,7 @@ index 8049ce3d..a64cd2ff 100644 [admin] ; Disable regular (non-admin) users to create organizations -@@ -283,7 +283,7 @@ CSRF_COOKIE_NAME = _csrf - - [picture] - ; Path to store user uploaded avatars --AVATAR_UPLOAD_PATH = data/avatars -+AVATAR_UPLOAD_PATH = /var/lib/gogs/avatars - ; Chinese users can choose "duoshuo" - ; or a custom avatar source, like: http://cn.gravatar.com/avatar/ - GRAVATAR_SOURCE = gravatar -@@ -299,7 +299,7 @@ ENABLE_FEDERATED_AVATAR = true - ; Whether attachments are enabled. Defaults to `true` - ENABLED = true - ; Path for attachments. Defaults to `data/attachments` --PATH = data/attachments -+PATH = /var/lib/gogs/attachments - ; One or more allowed types, e.g. image/jpeg|image/png - ALLOWED_TYPES = image/jpeg|image/png - ; Max size of each file. Defaults to 4MB -@@ -315,7 +315,7 @@ FORMAT = +@@ -319,7 +326,7 @@ FORMAT = ; General settings of loggers [log] @@ -105,5 +92,5 @@ index 8049ce3d..a64cd2ff 100644 ; Use comma to separate multiple modes, e.g. "console, file" MODE = console -- -2.15.0 +2.19.0 diff --git a/gogs/default/0002-Adjust-service-file-for-Arch-Linux-package.patch b/gogs/default/0002-Adjust-service-file-for-Arch-Linux-package.patch index 3d3bd575..8335d9be 100644 --- a/gogs/default/0002-Adjust-service-file-for-Arch-Linux-package.patch +++ b/gogs/default/0002-Adjust-service-file-for-Arch-Linux-package.patch @@ -1,4 +1,4 @@ -From 3d8abcd653f46d72c47687e8b4186157f0526401 Mon Sep 17 00:00:00 2001 +From 4ba92ebea6847998ef6c9183062004ba98b6d945 Mon Sep 17 00:00:00 2001 From: Martchus Date: Sun, 19 Mar 2017 18:04:48 +0100 Subject: [PATCH 2/2] Adjust service file for Arch Linux package @@ -8,7 +8,7 @@ Subject: [PATCH 2/2] Adjust service file for Arch Linux package 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/systemd/gogs.service b/scripts/systemd/gogs.service -index 9f105bf8..99ca11e0 100644 +index 3a89662a8..790a94e80 100644 --- a/scripts/systemd/gogs.service +++ b/scripts/systemd/gogs.service @@ -12,12 +12,12 @@ After=mariadb.service mysqld.service postgresql.service memcached.service redis. @@ -25,10 +25,10 @@ index 9f105bf8..99ca11e0 100644 +ExecStart=/usr/bin/gogs web --config /etc/gogs/app.ini Restart=always -Environment=USER=git HOME=/home/git -+Environment=USER=gogs HOME=/var/lib/gogs ++Environment=USER=gogs HOME=/var/lib/gogs GOGS_CUSTOM=/var/lib/gogs/custom - [Install] - WantedBy=multi-user.target + # Some distributions may not support these hardening directives. If you cannot start the service due + # to an unknown option, comment out the ones not supported by your version of systemd. -- -2.15.0 +2.19.0 diff --git a/gogs/default/PKGBUILD b/gogs/default/PKGBUILD index d1638904..e3004331 100644 --- a/gogs/default/PKGBUILD +++ b/gogs/default/PKGBUILD @@ -10,8 +10,8 @@ _confdir=conf _scriptsdir=scripts pkgname=$_pkgname -pkgver=0.11.53 -pkgrel=2 +pkgver=0.11.66 +pkgrel=1 epoch=1 pkgdesc='Self Hosted Git Service written in Go' arch=('i686' 'x86_64' 'armv6h' 'armv7h' 'aarch64') @@ -31,9 +31,9 @@ backup=("etc/$_pkgname/app.ini") source=("$_pkgname-$pkgver::https://github.com/$_orga/$_pkgname/archive/v${pkgver}.tar.gz" '0001-Adjust-config-for-Arch-Linux-package.patch' '0002-Adjust-service-file-for-Arch-Linux-package.patch') -sha512sums=('4d34b904a933945faf36f31bb192910cb7ee19cca9a102b4717aafea6d59b8cb7a1a9bc9cac5ff34b371a66056313e6263ac171a46482d65d6216d4b8d4a2b54' - '2763e4a2a5c98f3e75a1ddcb7c58012ce1e0fc2ad6b85110d9f28dd6c98d9e84a98529a282ffee8a1a21ef02a92b0538f2c790f62e6159b1f1f478340ddcf68a' - '361d318ac3c846eaa6b0260baed8fe21ba5d6b079b0618962e8b67ae91928c61b1296eba2311d6bd032c8bca4a09e51d8fb73e6ff67039b35a5179701a0cd868') +sha512sums=('51dc88e15e92d4f93e95efe22f57151b9bcede78abf5fab529953f104739f682ac0c6d84939c33a3ae160648cdaa361ac88678697b40c4bb7832ed99338daf76' + 'b1ae473eba5bfb693e507ce82f2a81beb066ab5869d8d089963f8d4740cc77e203b8653cbeeb196a86e65d04e2a288056fb3196364e247dd11906b77fd7ace8b' + '71c38f86b3e351f8f69504835082618cf5f63897246ee0691f1b7d518e164bd68681e14134e97fcfb369c960c6a81da92c86bc40b5c9ee6f171af1f1a1a7e8a4') _goroot='/usr/lib/go' prepare() { @@ -106,7 +106,7 @@ package() { cp -r "$srcdir/build/src/${_gourl}/templates" "$pkgdir/usr/share/${_pkgname}" mkdir -p "$pkgdir/etc/$_pkgname" - install -Dm0664 -g "$_userid" "$pkgdir/usr/share/$_pkgname/conf/app.ini"* "$pkgdir/etc/$_pkgname" + install -Dm0664 -g "$_userid" "$pkgdir/usr/share/$_pkgname/conf/app.ini"* "$pkgdir/etc/$_pkgname/app.ini" 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}/$_pkgname.sysusers" "${pkgdir}/usr/lib/sysusers.d/$_pkgname.conf"