diff options
author | 7heo <7heo@mail.com> | 2016-08-29 16:09:55 +0200 |
---|---|---|
committer | Carlo Landmeter <clandmeter@gmail.com> | 2016-08-29 16:59:30 +0200 |
commit | 428fa757b07bb28c5a9d633d91354221579ffa31 (patch) | |
tree | c31a0e6162f0e732e7b31510b5451e31cada3869 /community/gogs | |
parent | d28f27dbd511685428d8b7af191ac1e9de7c861a (diff) | |
download | aports-428fa757b07bb28c5a9d633d91354221579ffa31.tar.bz2 aports-428fa757b07bb28c5a9d633d91354221579ffa31.tar.xz |
testing/gogs: move to community
Diffstat (limited to 'community/gogs')
-rw-r--r-- | community/gogs/APKBUILD | 84 | ||||
-rw-r--r-- | community/gogs/glide.lock.patch | 135 | ||||
-rw-r--r-- | community/gogs/glide.yaml.patch | 38 | ||||
-rw-r--r-- | community/gogs/gogs.confd | 2 | ||||
-rw-r--r-- | community/gogs/gogs.ini | 29 | ||||
-rw-r--r-- | community/gogs/gogs.initd | 15 | ||||
-rw-r--r-- | community/gogs/gogs.pre-install | 7 |
7 files changed, 310 insertions, 0 deletions
diff --git a/community/gogs/APKBUILD b/community/gogs/APKBUILD new file mode 100644 index 0000000000..47405c3a8a --- /dev/null +++ b/community/gogs/APKBUILD @@ -0,0 +1,84 @@ +# Contributor: Carlo Landmeter <clandmeter@gmail.com> +# Maintainer: 7heo <7heo@mail.com> +pkgname=gogs +pkgver=0.9.48 +pkgrel=2 +pkgdesc="A self-hosted Git service written in Go" +url="http://gogs.io/" +arch="all" +license="MIT" +depends="git" +makedepends="glide go-tools perl libcap" +install="$pkgname.pre-install" +pkgusers="gogs" +pkggroups="www-data" +options="!strip" +source="${pkgname}-${pkgver}.tar.gz::https://github.com/gogits/$pkgname/archive/v$pkgver.tar.gz + $pkgname.initd + $pkgname.confd + $pkgname.ini + glide.yaml.patch + glide.lock.patch" +builddir="$srcdir/${pkgname}-${pkgver}" + +build() { + export GOPATH="$startdir" + cd "$builddir" || return 1 + glide install || return 1 + go fix || return 1 + # Note: sqlite causes problems without the pie buildmode + go build -buildmode=pie -v -tags "sqlite redis memcache cert" ||return 1 +} + +package() { + cd "$builddir" + + install -d -m 0755 \ + "$pkgdir"/usr/share/webapps/$pkgname || return 1 + + # TODO: Is it really necessary to be world-readable?! + install -d -m 0755 -o gogs -g www-data \ + "$pkgdir"/var/lib/$pkgname \ + "$pkgdir"/var/lib/$pkgname/git \ + "$pkgdir"/var/lib/$pkgname/db \ + "$pkgdir"/var/lib/$pkgname/avatars \ + "$pkgdir"/var/lib/$pkgname/attachements \ + "$pkgdir"/var/cache/$pkgname/sessions \ + "$pkgdir"/var/log/$pkgname \ + "$pkgdir"/etc/$pkgname/conf || return 1 + + install -D -m 0755 ${pkgname}-${pkgver} \ + "$pkgdir"/usr/bin/$pkgname || return 1 + # Allow to bind to port 80. + setcap cap_net_bind_service=+ep \ + "$pkgdir"/usr/bin/$pkgname || return 1 + + install -D -m 0664 -o gogs -g www-data "$srcdir"/${pkgname}.ini \ + "$pkgdir"/etc/$pkgname/conf/app.ini || return 1 + + mv public templates "$pkgdir"/usr/share/webapps/$pkgname/ || return 1 + + install -D -m755 "$srcdir"/$pkgname.initd \ + "$pkgdir"/etc/init.d/$pkgname || return 1 + install -D -m644 "$srcdir"/$pkgname.confd \ + "$pkgdir"/etc/conf.d/$pkgname || return 1 +} + +md5sums="466d4b1a6a0575875b48f331bb87864f gogs-0.9.48.tar.gz +91cd8b6b27509beecb53594463315f43 gogs.initd +6b3f501f9c37b5032cab8b49b5621fc4 gogs.confd +82edfdabfdf0ac64dc545036ca499465 gogs.ini +7cb56b6f8821874d9b277ed94e76f517 glide.yaml.patch +abf7ac0fe09e73d4dbe455b242426b65 glide.lock.patch" +sha256sums="b612b8994838ead81cd0d99da80ac32ed77b71d22af753c8c47a48db61b8eff7 gogs-0.9.48.tar.gz +23a9bfcf7d1fd7cb5b7bf13ab0b0f412c29c1ebdd62fc02c78dd885cbe5d703d gogs.initd +a1c584dbc2d44694ffcf87ecafdf6a43ae81370175ca9cc6e6ff7623b8b05254 gogs.confd +ead0082c56e8e8f9e9ba7f4c206c2a18bb732726137b71e05d83347638562530 gogs.ini +492d5ef3ddff44f5444d8ea09978924b4e0ea3a1f3bed958c0ff6c142183c4f1 glide.yaml.patch +aae76bbdfd93806beca5b8bcc5cb9c829ca934b6d640e318587535911dfff72d glide.lock.patch" +sha512sums="615e35b68b29d306a11874beae11e93973522970131516f67aabc90834db4297b4c2d386f1546a6d9c0e874cc77a5b3341732d701843456a47960c1e05a53ec7 gogs-0.9.48.tar.gz +be5a9ef2cae1ee2e8106feb6a997ae06519af91fe57f746d20996e79c332c93bb43fc53f79ff4e8ce13222afc6f3dc7bc5cbb758ef201b03e49d809c87c8c4c7 gogs.initd +52ce41c05c263b790221a04d13d2eb9bba689e4bd72daf5b6af31416e80a485a46bae19e18581d7bde879307283847e6486686a2fe4140fe38ebb6f315e11a86 gogs.confd +4c2b398cf93ebb8b743b9e7ec1b075706427081036effb53fa90729e70fbc3eb92f2f853278b887ca79dc35cd55a64e1bff4d18e1ad246beab2a723aa9cd71ba gogs.ini +8fef053fc55cd170339eea1e9acbfb2c0e5eda67526ac357dbc6fe3af22af29cbcca156db3cc02d2bc505661f5410755ad7dc98b615e58271cf4bb2c79bbbfbf glide.yaml.patch +54968bbbf6180e124b3881be65fcd2be64b03cdf99e3d3d7451bf6974934682c5205c39dc0be5f096670a81005e3ff271435b00b62b681e9a790bd54112b51c5 glide.lock.patch" diff --git a/community/gogs/glide.lock.patch b/community/gogs/glide.lock.patch new file mode 100644 index 0000000000..772fec6845 --- /dev/null +++ b/community/gogs/glide.lock.patch @@ -0,0 +1,135 @@ +diff --git gogs-0.9.48/glide.lock gogs-0.9.48/glide.lock +index 598f831..8a7488f 100644 +--- gogs-0.9.48/glide.lock ++++ gogs-0.9.48/glide.lock +@@ -1,4 +1,4 @@ +-hash: 1d5fcf2a90f7621ecbc0b1abed548e11d13bda3fea49b4326c829a523268e5cf ++hash: 11379d55907792391fdbccc1ff522ee42667e2cf6511fb3f3c814d344ae111f9 + updated: 2016-06-12T17:35:14.27036884+08:00 + imports: + - name: github.com/bradfitz/gomemcache +@@ -34,6 +34,8 @@ imports: + version: 3654d25ec346ee8ce71a68431025458d52a38ac0 + - name: github.com/go-xorm/core + version: bc1b7f81f0e369289078424064634a5ee7d21051 ++- name: github.com/go-xorm/tidb ++ version: 79b229268e4e0bb287819c1e9ee9e5a75a7d473d + - name: github.com/go-xorm/xorm + version: b8b1711cde4d9c68da95cd0ff8de0de0cb491df3 + - name: github.com/gogits/chardet +@@ -44,10 +46,22 @@ imports: + version: 53bcb7352ff838610c537c9b589ca79bca92c661 + - name: github.com/gogits/go-gogs-client + version: ee68cd9eefff11615f336e9965762f6736eeecc8 ++- name: github.com/gogits/gogs ++ version: 599716bb1b78e6be903db92fde6d9bf65d79bf3e ++ subpackages: ++ - cmd ++- name: github.com/golang/protobuf ++ version: c3cefd437628a0b7d31b34fe44b3a7a540e98527 ++ subpackages: ++ - proto ++- name: github.com/golang/snappy ++ version: d9eb7a3d35ec988b8585d4a0068e462c27d28380 + - name: github.com/issue9/identicon + version: d36b54562f4cf70c83653e13dc95c220c79ef521 + - name: github.com/jaytaylor/html2text + version: 52d9b785554a1918cb09909b89a1509a98b853fd ++- name: github.com/juju/errors ++ version: b2c7a7da5b2995941048f60146e67702a292e468 + - name: github.com/kardianos/minwinsvc + version: cad6b2b879b0970e4245a20ebf1a81a756e2bb70 + - name: github.com/klauspost/compress +@@ -73,6 +120,83 @@ imports: + version: 02ccfbfaf0cc627aa3aec8ef7ed5cfeec5b43f63 + - name: github.com/nfnt/resize + version: 4d93a29130b1b6aba503e2aa8b50f516213ea80e ++- name: github.com/ngaut/log ++ version: 37d3e0f43b4fe05429e1adb75e835bf31fc1bba6 ++- name: github.com/petar/GoLLRB ++ version: 53be0d36a84c2a886ca057d34b6aa4468df9ccb4 ++ subpackages: ++ - llrb ++- name: github.com/pingcap/goleveldb ++ version: c131135d59a38f4212f627cde570dddfe5261c43 ++ subpackages: ++ - leveldb ++ - leveldb/comparer ++ - leveldb/iterator ++ - leveldb/memdb ++ - leveldb/util ++ - leveldb/opt ++ - leveldb/storage ++ - leveldb/cache ++ - leveldb/errors ++ - leveldb/filter ++ - leveldb/journal ++ - leveldb/table ++- name: github.com/pingcap/tidb ++ version: 60d0c97721987d7c5acece0d34791559acb26f9a ++ subpackages: ++ - ast ++ - context ++ - domain ++ - executor ++ - infoschema ++ - kv ++ - meta ++ - metric ++ - model ++ - mysql ++ - parser ++ - perfschema ++ - privilege ++ - privilege/privileges ++ - sessionctx ++ - sessionctx/autocommit ++ - sessionctx/db ++ - sessionctx/forupdate ++ - sessionctx/variable ++ - store/localstore ++ - store/localstore/engine ++ - store/localstore/goleveldb ++ - terror ++ - util ++ - util/types ++ - parser/opcode ++ - util/distinct ++ - ddl ++ - evaluator ++ - expression ++ - inspectkv ++ - plan ++ - plan/statistics ++ - table ++ - util/charset ++ - util/codec ++ - util/sqlexec ++ - xapi ++ - meta/autoid ++ - table/tables ++ - structure ++ - tablecodec ++ - util/bytes ++ - util/segmentmap ++ - xapi/xeval ++ - util/hack ++ - util/stringutil ++- name: github.com/pingcap/tipb ++ version: dd28a39ad25a0fb293ffdfc8548bf926a90fe70e ++ subpackages: ++ - go-tipb ++- name: github.com/rcrowley/go-metrics ++ version: bdb33529eca3e55eac7328e07c57012a797af602 + - name: github.com/russross/blackfriday + version: 4e6f303e8d936855981ddcdbfc092b03d2b2b68e + - name: github.com/satori/go.uuid +@@ -83,6 +207,8 @@ imports: + - diffmatchpatch + - name: github.com/shurcooL/sanitized_anchor_name + version: 10ef21a441db47d8b13ebcc5fd2310f636973c77 ++- name: github.com/twinj/uuid ++ version: b505f2cca343b7b21416b27b1f2ad88469800892 + - name: github.com/Unknwon/cae + version: 7f5e046bc8a6c3cde743c233b96ee4fd84ee6ecd + subpackages: diff --git a/community/gogs/glide.yaml.patch b/community/gogs/glide.yaml.patch new file mode 100644 index 0000000000..a9715be56d --- /dev/null +++ b/community/gogs/glide.yaml.patch @@ -0,0 +1,38 @@ +diff --git gogs-0.9.48/glide.yaml gogs-0.9.48/glide.yaml +index 56c53aa..a61d105 100644 +--- gogs-0.9.48/glide.yaml ++++ gogs-0.9.48/glide.yaml +@@ -1,4 +1,4 @@ +-package: github.com/gogits/gogs ++package: gogs-0.9.48 + import: + - package: github.com/Unknwon/cae + subpackages: +@@ -55,3 +55,27 @@ + - package: gopkg.in/ini.v1 + - package: gopkg.in/ldap.v2 + - package: gopkg.in/macaron.v1 ++- package: github.com/bradfitz/gomemcache ++- package: github.com/go-macaron/inject ++- package: github.com/go-xorm/tidb ++- package: github.com/gogits/gogs ++- package: github.com/golang/protobuf ++- package: github.com/golang/snappy ++- package: github.com/jaytaylor/html2text ++- package: github.com/juju/errors ++- package: github.com/klauspost/compress ++- package: github.com/klauspost/cpuid ++- package: github.com/klauspost/crc32 ++- package: github.com/ngaut/log ++- package: github.com/petar/GoLLRB ++- package: github.com/pingcap/goleveldb ++- package: github.com/pingcap/tidb ++- package: github.com/pingcap/tipb ++- package: github.com/rcrowley/go-metrics ++- package: github.com/shurcooL/sanitized_anchor_name ++- package: github.com/twinj/uuid ++- package: golang.org/x/sys ++- package: gopkg.in/alexcesaro/quotedprintable.v3 ++- package: gopkg.in/asn1-ber.v1 ++- package: gopkg.in/bufio.v1 ++- package: gopkg.in/redis.v2 diff --git a/community/gogs/gogs.confd b/community/gogs/gogs.confd new file mode 100644 index 0000000000..a81e46a6c4 --- /dev/null +++ b/community/gogs/gogs.confd @@ -0,0 +1,2 @@ +GOGS_CUSTOM="/etc/gogs" +GOGS_USER="gogs" diff --git a/community/gogs/gogs.ini b/community/gogs/gogs.ini new file mode 100644 index 0000000000..6d344f2152 --- /dev/null +++ b/community/gogs/gogs.ini @@ -0,0 +1,29 @@ +RUN_USER = gogs +RUN_MODE = prod + +[repository] +ROOT = /var/lib/gogs/git +SCRIPT_TYPE = sh + +[server] +STATIC_ROOT_PATH = /usr/share/webapps/gogs + +[database] +DB_TYPE = sqlite3 +PATH = /var/lib/gogs/db/gogs.db +SSL_MODE = disable + +[session] +PROVIDER_CONFIG = /var/cache/gogs/sessions +PROVIDER = file + +[picture] +AVATAR_UPLOAD_PATH = /var/lib/gogs/avatars + +[attachment] +PATH = /var/lib/gogs/attachements + +[log] +ROOT_PATH = /var/log/gogs +MODE = file +LEVEL = Info diff --git a/community/gogs/gogs.initd b/community/gogs/gogs.initd new file mode 100644 index 0000000000..b4ac34b3c8 --- /dev/null +++ b/community/gogs/gogs.initd @@ -0,0 +1,15 @@ +#!/sbin/openrc-run + +name=gogs +conffile="$GOGS_CUSTOM/conf/app.ini" +command="/usr/bin/gogs" +command_args="web -c $conffile" +start_stop_daemon_args="${GOGS_USER:+--user} $GOGS_USER --env GOGS_CUSTOM=$GOGS_CUSTOM" +pidfile="/var/run/gogs.pid" +command_background="yes" + +depend() { + use logger dns + need net + after firewall +} diff --git a/community/gogs/gogs.pre-install b/community/gogs/gogs.pre-install new file mode 100644 index 0000000000..acf2093962 --- /dev/null +++ b/community/gogs/gogs.pre-install @@ -0,0 +1,7 @@ +#!/bin/sh + +addgroup -S www-data 2>/dev/null +adduser -S -D -h /var/lib/gogs -s /bin/ash -G www-data -g gogs gogs 2>/dev/null +passwd -u gogs 2>/dev/null + +exit 0 |