summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorEdvinas Valatka2017-04-15 10:36:08 +0300
committerEdvinas Valatka2017-04-15 10:41:21 +0300
commita8602f864215d18101c083930e52573c7f31d75b (patch)
tree590885f27f0af9084af01799f77829568f4c531b
parente868622302845aa24097ce340d851bc0c30e324d (diff)
downloadaur-a8602f864215d18101c083930e52573c7f31d75b.tar.gz
Pull from gogs
-rw-r--r--.SRCINFO17
-rw-r--r--.gitignore2
-rw-r--r--PKGBUILD74
-rw-r--r--gogs.install42
-rw-r--r--gogs.service2
5 files changed, 59 insertions, 78 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 1f359d767094..162df3991333 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,8 +1,8 @@
# Generated by mksrcinfo v8
-# Sun Feb 19 00:56:40 UTC 2017
+# Sat Apr 15 07:41:03 UTC 2017
pkgbase = gogs-dev-git
pkgdesc = Self Hosted Git Service in the Go Programming Language. This is the current git version from branch develop.
- pkgver = 0.9.158.0218+5+c6990032
+ pkgver = 0.11.9.0407+0+6500aafcb
pkgrel = 1
url = http://gogs.io/
install = gogs.install
@@ -11,29 +11,28 @@ pkgbase = gogs-dev-git
arch = armv6h
arch = armv7h
license = MIT
- makedepends = go
makedepends = git
+ makedepends = go
+ makedepends = go-bindata
makedepends = nodejs-less
+ makedepends = sqlite
depends = git
- depends = sqlite
- depends = bash
+ optdepends = sqlite: SQLite support
optdepends = mariadb: MariaDB support
optdepends = postgresql: PostgreSQL support
optdepends = redis: Redis support
optdepends = memcached: MemCached support
optdepends = openssh: GIT over SSH support
+ optdepends = bash: GIT over SSH support
provides = gogs
conflicts = gogs
- replaces = gogs-git-dev
options = !buildflags
options = !strip
source = git+https://github.com/gogits/gogs.git#branch=develop
- source = git+https://github.com/jteeuwen/go-bindata.git
source = gogs.service
source = gogs.tmpfiles
sha512sums = SKIP
- sha512sums = SKIP
- sha512sums = ae93c18970125e21e502d4833dbfb6867a55157ab8cc2dace120fb5ea5d86cea583f01b88dac2c56d9f059631c95e953df99f92e0def718946b348481ce2371f
+ sha512sums = c872a0c7e33c3385828af58633f194628098841adb32506fdb95d0554ecae2a472915d3fb4a964b44bf8f14e87516f50f77fbec9a3efd10bfb2f5246d294a186
sha512sums = 658935dc129d41b4bfc205ea8e9c225122862431f8b96932942ec345bc23cc7b55644247a8844c1f66bfd16ee35fc9da766f62f07603cbe6d573102edb4222f8
pkgname = gogs-dev-git
diff --git a/.gitignore b/.gitignore
index 6b2f8a43fcf0..d53d19106dd9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,3 @@
pkg/
src/
-gogs/
-go-bindata/
*.pkg.tar.*
diff --git a/PKGBUILD b/PKGBUILD
index e9bab77986ad..170b855b8550 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,6 +1,6 @@
# Contributor: Thomas Laroche <tho.laroche@gmail.com>
# Contributor: Thomas Fanninger <thomas@fanninger.at>
-# Contributor surefire@cryptomile.net
+# Contributor: surefire@cryptomile.net
# Maintainer: Edvinas Valatka <edacval@gmail.com>
_branch=develop
@@ -8,42 +8,35 @@ _pkgname=gogs
_team=github.com/gogits
_gogsdir="src/${_team}/${_pkgname}"
pkgname=${_pkgname}-dev-git
-pkgver=0.9.159.0218+0+0a2f87f9
+pkgver=0.11.9.0407+0+6500aafcb
pkgrel=1
pkgdesc="Self Hosted Git Service in the Go Programming Language. This is the current git version from branch ${_branch}."
arch=('i686' 'x86_64' 'armv6h' 'armv7h')
url="http://${_pkgname}.io/"
license=('MIT')
-depends=('git' 'sqlite' 'bash')
conflicts=("${_pkgname}")
provides=("${_pkgname}")
-replaces=("gogs-git-dev")
+depends=('git')
options=('!buildflags' '!strip')
-optdepends=(
-"mariadb: MariaDB support"
-"postgresql: PostgreSQL support"
-"redis: Redis support"
-"memcached: MemCached support"
-"openssh: GIT over SSH support"
+optdepends=("sqlite: SQLite support"
+ "mariadb: MariaDB support"
+ "postgresql: PostgreSQL support"
+ "redis: Redis support"
+ "memcached: MemCached support"
+ "openssh: GIT over SSH support"
+ "bash: GIT over SSH support"
)
-makedepends=('go' 'git' 'nodejs-less')
+makedepends=('git' 'go' 'go-bindata' 'nodejs-less' 'sqlite')
install=${_pkgname}.install
source=(
-"git+https://${_team}/${_pkgname}.git#branch=${_branch}"
-"git+https://github.com/jteeuwen/go-bindata.git" #Because сommunity package is very outdated
-"${_pkgname}.service"
-"${_pkgname}.tmpfiles"
+ "git+https://${_team}/${_pkgname}.git#branch=${_branch}"
+ "${_pkgname}.service"
+ "${_pkgname}.tmpfiles"
)
-
-pkgver() {
- cd "$_gogsdir"
- printf '%s+%s+%s' \
- $(<templates/.VERSION) \
- $(git rev-list --count HEAD...$(git log --pretty=format:%H -n 1 -- templates/.VERSION)) \
- $(git rev-parse --short HEAD) \
- ;
-}
+sha512sums=('SKIP'
+ 'c872a0c7e33c3385828af58633f194628098841adb32506fdb95d0554ecae2a472915d3fb4a964b44bf8f14e87516f50f77fbec9a3efd10bfb2f5246d294a186'
+ '658935dc129d41b4bfc205ea8e9c225122862431f8b96932942ec345bc23cc7b55644247a8844c1f66bfd16ee35fc9da766f62f07603cbe6d573102edb4222f8')
prepare() {
export GOPATH="$srcdir"
@@ -51,52 +44,43 @@ prepare() {
mkdir -p ./src/${_team}
mv -t ./src/${_team} ./${_pkgname}
- mkdir -p ./src/github.com/jteeuwen
- mv -t ./src/github.com/jteeuwen ./go-bindata
-
- cd "$_gogsdir"
+ cd "$srcdir/$_gogsdir"
sed -E -i conf/app.ini \
-e '0, /^\[/ s/^(RUN_USER)\W.*$/\1 = gogs/' \
-e '/^\[server\]/, /^\[/ s/^(STATIC_ROOT_PATH)\W.*$/\1 = \/usr\/share\/gogs/' \
-e '/^\[log\]/, /^\[/ s/^(ROOT_PATH)\W.*$/\1 = \/var\/log\/gogs/' \
;
-
- ## Dirty hack
- #sed -i vendor/github.com/go-xorm/xorm/logger.go \
- # -e '/DEFAULT_LOG_LEVEL/ s/core\.LOG_DEBUG/core.LOG_WARNING/' vendor/github.com/go-xorm/xorm/logger.go \
- # ;
}
+pkgver() {
+ cd "$_gogsdir"
+ printf '%s+%s+%s' \
+ $(sed -e 's,/,+,g; s, ,,g' templates/.VERSION) \
+ $(git rev-list --count HEAD...$(git log --pretty=format:%H -n 1 -- templates/.VERSION)) \
+ $(git rev-parse --short HEAD) \
+ ;
+}
build() {
export GOPATH="$srcdir"
- cd "$srcdir/src/github.com/jteeuwen/go-bindata/go-bindata"
- go install -v
-
cd "$srcdir/$_gogsdir"
LDFLAGS='-s -w' make PATH="$GOPATH/bin:$PATH" TAGS='libsqlite3 sqlite pam cert' build
}
package() {
- cd "$_gogsdir"
+ cd "$srcdir/$_gogsdir"
rm -rf ./public/{less,config.codekit}
- install -d "$pkgdir/usr/share/${_pkgname}"
+ install -Dm0644 ./conf/app.ini "$pkgdir/usr/share/${_pkgname}/conf/app.ini.default"
cp -rt "$pkgdir/usr/share/${_pkgname}" ./{templates,public}
install -Dm0755 -t "$pkgdir/usr/bin" ./${_pkgname}
-
+ install -Dm0644 -t "$pkgdir/usr/share/licenses/gogs" ./LICENSE
install -Dm0644 -t "$pkgdir/usr/lib/systemd/system" "$srcdir/${_pkgname}.service"
install -Dm0644 "$srcdir/${_pkgname}.tmpfiles" "$pkgdir/usr/lib/tmpfiles.d/${_pkgname}.conf"
-
}
-
-sha512sums=('SKIP'
- 'SKIP'
- 'ae93c18970125e21e502d4833dbfb6867a55157ab8cc2dace120fb5ea5d86cea583f01b88dac2c56d9f059631c95e953df99f92e0def718946b348481ce2371f'
- '658935dc129d41b4bfc205ea8e9c225122862431f8b96932942ec345bc23cc7b55644247a8844c1f66bfd16ee35fc9da766f62f07603cbe6d573102edb4222f8')
diff --git a/gogs.install b/gogs.install
index 1d8fb4b61e0b..86c2f108f24e 100644
--- a/gogs.install
+++ b/gogs.install
@@ -1,20 +1,20 @@
_start_if_enabled() {
if systemctl -q is-enabled gogs.service ;then
- echo "Starting gogs service"
+ echo " Starting gogs service"
systemctl start gogs.service
fi
}
_stop_if_active() {
if systemctl -q is-active gogs.service ;then
- echo "Stoping gogs service"
+ echo " Stoping gogs service"
systemctl stop gogs.service
fi
}
_disable_if_enabled() {
if systemctl -q is-enabled gogs.service 2>/dev/null ;then
- echo "Disabling gogs service"
+ echo " Disabling gogs service"
systemctl disable gogs.service
fi
}
@@ -25,17 +25,14 @@ pre_install() {
fi
if ! getent passwd gogs >/dev/null; then
useradd -r -c 'Gogs service user' -g gogs -d /srv/gogs -s /bin/bash gogs
- passwd -l gogs
+ passwd -q -l gogs
else
local _OldHome="$( getent passwd gogs | cut -d: -f6 )"
if [[ ${_OldHome} != "/srv/gogs" ]]; then
- echo
- echo "Setting gogs home directory to /srv/gogs"
+ echo " Setting gogs home directory to /srv/gogs"
+ echo " You must migrate from ${_OldHome}"
+ echo " before starting or re-enabling service"
usermod -c 'Gogs service user' -g gogs -d /srv/gogs -L -s /bin/bash gogs
- echo
- echo "You must migrate from ${_OldHome}"
- echo "before starting or re-enabling service"
- echo
_disable_if_enabled
fi
fi
@@ -43,6 +40,13 @@ pre_install() {
post_install(){
systemctl daemon-reload
+ echo " If you do not have a custom configuration files finish the setup:"
+ echo " 1) systemctl start gogs.service"
+ echo " 2) open the installation page http://$(uname -n):3000/"
+ echo " Otherwise:"
+ echo " Place your custom configuration files in /srv/gogs/custom/conf"
+ echo " The default configuration file is located at"
+ echo " /usr/share/gogs/conf/app.ini.default"
}
pre_upgrade() {
@@ -50,9 +54,8 @@ pre_upgrade() {
pre_install
}
-
post_upgrade() {
- post_install
+ systemctl daemon-reload
local _CustConf=/srv/gogs/custom/conf/app.ini
local _OldConf=/etc/gogs/app.ini
@@ -62,12 +65,11 @@ post_upgrade() {
install -Dm0750 -d -o gogs -g gogs /srv/gogs/custom
install -Dm0750 -d -o gogs -g gogs /srv/gogs/custom/conf
install -Dm0640 -T -o gogs -g gogs ${_OldConf}.pacsave ${_CustConf}
- echo
- echo "${_OldConf} moved to"
- echo "${_CustConf}."
- echo "You may need to manually delete"
- echo "an old config dir /etc/gogs"
- echo
+ echo " ${_OldConf} copied to"
+ echo " ${_CustConf}."
+ echo " You may need to manually delete"
+ echo " an old config file:"
+ echo " ${_OldConf}"
fi
_start_if_enabled
}
@@ -85,7 +87,5 @@ post_remove() {
groupdel gogs
fi
systemctl daemon-reload
- echo
- echo "You may need to manually delete an old workdir /srv/gogs"
- echo
+ echo " You may need to manually delete an old workdir /srv/gogs"
}
diff --git a/gogs.service b/gogs.service
index 06c96155af00..0aa04189978e 100644
--- a/gogs.service
+++ b/gogs.service
@@ -13,4 +13,4 @@ WorkingDirectory=/srv/gogs
Restart=always
[Install]
-WantedBy=default.target
+WantedBy=multi-user.target