Procházet zdrojové kódy

new package version

Thomas Fanninger před 10 roky
rodič
revize
a34e593654
11 změnil soubory, kde provedl 123 přidání a 50 odebrání
  1. 7 7
      .SRCINFO
  2. 3 1
      .gitignore
  3. 9 8
      PKGBUILD
  4. 6 6
      app.ini.patch
  5. 17 1
      app_new.ini
  6. 20 2
      app_old.ini
  7. 0 14
      gogs.service
  8. 14 0
      gogs.service.patch
  9. 20 0
      gogs_new.service
  10. 20 0
      gogs_old.service
  11. 7 11
      helper.sh

+ 7 - 7
.SRCINFO

@@ -1,7 +1,7 @@
 pkgbase = gogs-git-dev
 	pkgdesc = Gogs(Go Git Service) is a Self Hosted Git Service in the Go Programming Language. This is the current git version from branch develop.
-	pkgver = 2959.379629d
-	pkgrel = 3
+	pkgver = 3135.6a6a751
+	pkgrel = 1
 	epoch = 1
 	url = http://gogs.io/
 	install = gogs.install
@@ -10,7 +10,7 @@ pkgbase = gogs-git-dev
 	arch = armv6h
 	arch = armv7h
 	license = MIT
-	makedepends = go>=1.2
+	makedepends = go>=1.3
 	makedepends = git>=1.7.1
 	makedepends = patch
 	depends = git>=1.7.1
@@ -27,13 +27,13 @@ pkgbase = gogs-git-dev
 	options = !strip
 	options = !emptydirs
 	backup = srv/gogs/conf/app.ini
-	source = gogs.service
+	source = gogs.service.patch
 	source = app.ini.patch
 	source = helper.sh
 	source = gogs::git+https://github.com/gogits/gogs.git#branch=develop
-	sha512sums = c7abbe4af438a8a1db44537a16dbd40b82d50c921d53002c083071c4cd16644769e9d5dabbccedc1bd4ba563324186da4b4378365e098cc45df76402a657be90
-	sha512sums = eb55c8cec68d81b0283a361188af5f54ed6bcd775ee57b63a910657f8365b7e7b200c382b9ce55570ca9021d803d6e9228400ece512963439a8e830e12418131
-	sha512sums = e746dbdafc4c8d0b15a224dba95ae3151611ba9ff468ee6f0b1789e489955e4d7eaac0dbdf28a22e5b8211559af5950726f4a37d699a2490fd349f034401028c
+	sha512sums = 834e95fe9bcfa291a573ad1fa43f41bbed844658a918ff4fcf53ab8a44a296206ee4003eab1d9a2785c9126be077022f4907846d2eb6c5d64050b5e81ce47f44
+	sha512sums = d4f6518c644b76e4d1688cd5756c9eea7a89d0abad68a14638ccc6f0d1006c164c1ae3b3f89efd903def7398a3dabce7299100303808ad7a1937407a9eb13a39
+	sha512sums = e45775adafeecad5deaf24a98cd85b25a8383cb0e89905b2927c13fe7f0ec9918a42071ce43eabc429d8a826db93bb75ffb1927dce9c431ed88b0b5c619fd60d
 	sha512sums = SKIP
 
 pkgname = gogs-git-dev

+ 3 - 1
.gitignore

@@ -4,7 +4,9 @@
 !app_old.ini
 !gogs.changelog
 !gogs.install
-!gogs.service
+!gogs.service.patch
+!gogs_new.service
+!gogs_old.service
 !helper.sh
 !PKGBUILD
 !README.md

+ 9 - 8
PKGBUILD

@@ -4,8 +4,8 @@
 pkgname=gogs-git-dev
 _pkgname=gogs
 _branch=develop
-pkgver=2959.379629d
-pkgrel=3
+pkgver=3135.6a6a751
+pkgrel=1
 epoch=1
 pkgdesc="Gogs(Go Git Service) is a Self Hosted Git Service in the Go Programming Language. This is the current git version from branch ${_branch}."
 arch=('i686' 'x86_64' 'armv6h' 'armv7h')
@@ -19,7 +19,7 @@ optdepends=('sqlite: SQLite support'
             'memcached: MemCached support'
             'openssh: GIT over SSH support'
             'tidb-git: TiDB support')
-makedepends=('go>=1.2' 'git>=1.7.1' 'patch')
+makedepends=('go>=1.3' 'git>=1.7.1' 'patch')
 conflicts=('gogs-bin' 'gogs' 'gogs-git')
 options=('!strip' '!emptydirs')
 backup=('srv/gogs/conf/app.ini')
@@ -27,14 +27,14 @@ backup=('srv/gogs/conf/app.ini')
 install=gogs.install
 
 _gourl=github.com/gogits/$_pkgname
-source=('gogs.service'
+source=('gogs.service.patch'
         'app.ini.patch'
         'helper.sh'
         "$_pkgname::git+https://${_gourl}.git#branch=${_branch}")
 
-sha512sums=(c7abbe4af438a8a1db44537a16dbd40b82d50c921d53002c083071c4cd16644769e9d5dabbccedc1bd4ba563324186da4b4378365e098cc45df76402a657be90
-            eb55c8cec68d81b0283a361188af5f54ed6bcd775ee57b63a910657f8365b7e7b200c382b9ce55570ca9021d803d6e9228400ece512963439a8e830e12418131
-            e746dbdafc4c8d0b15a224dba95ae3151611ba9ff468ee6f0b1789e489955e4d7eaac0dbdf28a22e5b8211559af5950726f4a37d699a2490fd349f034401028c
+sha512sums=(834e95fe9bcfa291a573ad1fa43f41bbed844658a918ff4fcf53ab8a44a296206ee4003eab1d9a2785c9126be077022f4907846d2eb6c5d64050b5e81ce47f44
+            d4f6518c644b76e4d1688cd5756c9eea7a89d0abad68a14638ccc6f0d1006c164c1ae3b3f89efd903def7398a3dabce7299100303808ad7a1937407a9eb13a39
+            e45775adafeecad5deaf24a98cd85b25a8383cb0e89905b2927c13fe7f0ec9918a42071ce43eabc429d8a826db93bb75ffb1927dce9c431ed88b0b5c619fd60d
             'SKIP')
 
 _goroot="/usr/lib/go"
@@ -86,6 +86,7 @@ prepare() {
   # Execute patch
   msg2 "Execute patches"
   patch -Np1 -i "$srcdir/app.ini.patch" "$GOPATH/src/${_gourl}/conf/app.ini"
+  patch -Np1 -i "$srcdir/gogs.service.patch" "$GOPATH/src/${_gourl}/scripts/systemd/gogs.service"
 }
 
 build() {
@@ -105,6 +106,6 @@ package() {
   cp -r "$srcdir/build/src/${_gourl}/templates" "$pkgdir/usr/share/themes/gogs/default"
 
   install -Dm0644 "$pkgdir/usr/share/$_pkgname/conf/app.ini" "$pkgdir/srv/$_pkgname/conf/app.ini"
-  install -Dm0644 "$srcdir/gogs.service" "$pkgdir/usr/lib/systemd/system/gogs.service"
+  install -Dm0644 "$srcdir/build/src/${_gourl}/scripts/systemd/gogs.service" "$pkgdir/usr/lib/systemd/system/gogs.service"
   install -Dm0644 "$srcdir/build/src/${_gourl}/LICENSE" "$pkgdir/usr/share/licenses/$_pkgname"
 }

+ 6 - 6
app.ini.patch

@@ -6,27 +6,27 @@
 < ROOT =
 ---
 > ROOT = /srv/gogs/repo
-63c63
+69c69
 < STATIC_ROOT_PATH =
 ---
 > STATIC_ROOT_PATH = /usr/share/themes/gogs/default
-79c79
+85c85
 < PATH = data/gogs.db
 ---
 > PATH = /srv/gogs/sqlite/gogs.db
-170c170
+186c186
 < PROVIDER_CONFIG = data/sessions
 ---
 > PROVIDER_CONFIG = /srv/gogs/sessions
-185c185
+201c201
 < AVATAR_UPLOAD_PATH = data/avatars
 ---
 > AVATAR_UPLOAD_PATH = /srv/gogs/data/avatars
-195c195
+211c211
 < PATH = data/attachments
 ---
 > PATH = /srv/gogs/data/attachments
-210c210
+226c226
 < ROOT_PATH =
 ---
 > ROOT_PATH = /var/log/gogs

+ 17 - 1
app_new.ini

@@ -11,7 +11,11 @@ RUN_MODE = dev
 [repository]
 ROOT = /srv/gogs/repo
 SCRIPT_TYPE = bash
-; Patch test queue length, make it as large as possible.
+; Default ANSI charset
+ANSI_CHARSET = 
+; Force every new repository to be private
+FORCE_PRIVATE = false
+; Patch test queue length, make it as large as possible
 PULL_REQUEST_QUEUE_LENGTH = 10000
 
 [ui]
@@ -44,6 +48,8 @@ HTTP_ADDR =
 HTTP_PORT = 3000
 ; Disable SSH feature when not available
 DISABLE_SSH = false
+; Whether use builtin SSH server or not.
+START_SSH_SERVER = false
 SSH_PORT = 22
 ; Disable CDN even in "prod" mode
 OFFLINE_MODE = false
@@ -112,6 +118,16 @@ DISABLE_MINIMUM_KEY_SIZE_CHECK = false
 ; Enable captcha validation for registration
 ENABLE_CAPTCHA = true
 
+; used to filter keys which are too short
+[service.minimum_key_sizes]
+ED25519 = 256
+ECDSA   = 256
+NTRU    = 1087
+MCE     = 1702
+McE     = 1702
+RSA     = 1024
+DSA     = 1024
+
 [webhook]
 ; Hook task queue length
 QUEUE_LENGTH = 1000

+ 20 - 2
app_old.ini

@@ -11,7 +11,11 @@ RUN_MODE = dev
 [repository]
 ROOT =
 SCRIPT_TYPE = bash
-; Patch test queue length, make it as large as possible.
+; Default ANSI charset
+ANSI_CHARSET = 
+; Force every new repository to be private
+FORCE_PRIVATE = false
+; Patch test queue length, make it as large as possible
 PULL_REQUEST_QUEUE_LENGTH = 10000
 
 [ui]
@@ -44,6 +48,8 @@ HTTP_ADDR =
 HTTP_PORT = 3000
 ; Disable SSH feature when not available
 DISABLE_SSH = false
+; Whether use builtin SSH server or not.
+START_SSH_SERVER = false
 SSH_PORT = 22
 ; Disable CDN even in "prod" mode
 OFFLINE_MODE = false
@@ -112,6 +118,16 @@ DISABLE_MINIMUM_KEY_SIZE_CHECK = false
 ; Enable captcha validation for registration
 ENABLE_CAPTCHA = true
 
+; used to filter keys which are too short
+[service.minimum_key_sizes]
+ED25519 = 256
+ECDSA   = 256
+NTRU    = 1087
+MCE     = 1702
+McE     = 1702
+RSA     = 1024
+DSA     = 1024
+
 [webhook]
 ; Hook task queue length
 QUEUE_LENGTH = 1000
@@ -317,4 +333,6 @@ bg-BG = bg
 it-IT = it
 
 [other]
-SHOW_FOOTER_BRANDING = false
+SHOW_FOOTER_BRANDING = false
+; Show version information about gogs and go in the footer
+SHOW_FOOTER_VERSION = true

+ 0 - 14
gogs.service

@@ -1,14 +0,0 @@
-[Unit]
-Description=Gogs (Go Git Service) server
-After=syslog.target
-After=network.target
-
-[Service]
-Type=simple
-User=gogs
-Group=gogs
-ExecStart=/usr/share/gogs/gogs web --config /srv/gogs/conf/app.ini
-WorkingDirectory=/srv/gogs/
-
-[Install]
-WantedBy=multi-user.target

+ 14 - 0
gogs.service.patch

@@ -0,0 +1,14 @@
+12,15c12,15
+< User=git
+< Group=git
+< WorkingDirectory=/home/git/gogs
+< ExecStart=/home/git/gogs/gogs web
+---
+> User=gogs
+> Group=gogs
+> WorkingDirectory=/srv/gogs/
+> ExecStart=/usr/share/gogs/gogs web --config /srv/gogs/conf/app.ini
+17c17
+< Environment=USER=git HOME=/home/git
+---
+> Environment=USER=gogs HOME=/home/gogs

+ 20 - 0
gogs_new.service

@@ -0,0 +1,20 @@
+[Unit]
+Description=Gogs (Go Git Service)
+After=syslog.target
+After=network.target
+#After=mysqld.service
+#After=postgresql.service
+#After=memcached.service
+#After=redis.service
+
+[Service]
+Type=simple
+User=gogs
+Group=gogs
+WorkingDirectory=/srv/gogs/
+ExecStart=/usr/share/gogs/gogs web --config /srv/gogs/conf/app.ini
+Restart=always
+Environment=USER=gogs HOME=/home/gogs
+
+[Install]
+WantedBy=multi-user.target

+ 20 - 0
gogs_old.service

@@ -0,0 +1,20 @@
+[Unit]
+Description=Gogs (Go Git Service)
+After=syslog.target
+After=network.target
+#After=mysqld.service
+#After=postgresql.service
+#After=memcached.service
+#After=redis.service
+
+[Service]
+Type=simple
+User=git
+Group=git
+WorkingDirectory=/home/git/gogs
+ExecStart=/home/git/gogs/gogs web
+Restart=always
+Environment=USER=git HOME=/home/git
+
+[Install]
+WantedBy=multi-user.target

+ 7 - 11
helper.sh

@@ -50,18 +50,14 @@ function get_hg {
 }
 
 function get_golang {
-  if [[ $1 == "golang.org/x/net" ]]
-  then
-    echo $1 $2 $3
-    get_git "github.com/golang/net" $2
-  elif [[ $1 == "golang.org/x/text" ]]
-  then
-    echo $1 $2 $3
-    get_git "github.com/golang/text" $2
-  else
-    echo $1 $2 $3
-  fi
+  local package=$1
+  local match="golang.org/x"
+  local replace="github.com/golang"
+  local result=""
+
+  result=${package/$match/$replace}
 
+  get_git $result $2 $3
 }
 
 # Read the .gopmfile file and clone the branch/commits of the depends