Date: Friday, July 1, 2016 @ 14:14:29 Author: tredaelli Revision: 181675
New package: snapd Added: snapd/ snapd/repos/ snapd/trunk/ snapd/trunk/PKGBUILD snapd/trunk/fix_test.patch snapd/trunk/snapd.install snapd/trunk/snapd.sh ----------------+ PKGBUILD | 81 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ fix_test.patch | 33 ++++++++++++++++++++++ snapd.install | 15 ++++++++++ snapd.sh | 10 ++++++ 4 files changed, 139 insertions(+) Added: snapd/trunk/PKGBUILD =================================================================== --- snapd/trunk/PKGBUILD (rev 0) +++ snapd/trunk/PKGBUILD 2016-07-01 14:14:29 UTC (rev 181675) @@ -0,0 +1,81 @@ +# $Id$ +# Maintainer: Timothy Redaelli <timothy.redae...@gmail.com> +# Contributor: Zygmunt Krynicki <me at zygoon dot pl> + +pkgname=snapd +pkgver=2.0.10 +pkgrel=1 +pkgdesc="Service and tools for management of snap packages." +arch=('i686' 'x86_64') +url="https://github.com/snapcore/snapd" +license=('GPL3') +depends=('snap-confine' 'squashfs-tools') +makedepends=('git' 'go' 'go-tools' 'bzr') +checkdepends=('python') +options=('!strip' 'emptydirs') +install=snapd.install +source=("$pkgname-$pkgver::git+https://github.com/snapcore/$pkgname.git#tag=$pkgver" + 'snapd.sh' + 'fix_test.patch') +md5sums=('SKIP' + '1d841a1d09ba86945551dfc5c5658b2e' + '7fd19e053051825b189914cedb95c3e7') + +_gourl=github.com/snapcore/snapd + +prepare() { + cd "$pkgname-$pkgver" + patch -Np1 -i "$srcdir/fix_test.patch" + + # Use $srcdir/go as our GOPATH + export GOPATH="$srcdir/go" + mkdir -p "$GOPATH" + # Have snapd checkout appear in a place suitable for subsequent GOPATH This + # way we don't have to go get it again and it is exactly what the tag/hash + # above describes. + mkdir -p "$(dirname "$GOPATH/src/${_gourl}")" + ln --no-target-directory -fs "$srcdir/$pkgname-$pkgver" "$GOPATH/src/${_gourl}" +} + +build() { + export GOPATH="$srcdir/go" + # Use get-deps.sh provided by upstream to fetch go dependencies using the + # godeps tool and dependencies.tsv (maintained upstream). + cd "$GOPATH/src/${_gourl}" + ./get-deps.sh + # Build/install snap and snapd + go install "${_gourl}/cmd/snap" + go install "${_gourl}/cmd/snapd" +} + +check() { + export GOPATH="$srcdir/go" + cd "$GOPATH/src/${_gourl}" + ./run-checks --unit + ./run-checks --static +} + +package() { + export GOPATH="$srcdir/go" + # Ensure that we have /var/lib/snapd/{hostfs,lib/gl}/ as they are required by snap-confine + # for constructing some bind mounts around. + install -d -m 755 "$pkgdir/var/lib/snapd/hostfs/" "$pkgdir/var/lib/snapd/lib/gl/" + # Install the refresh timer and service for updating snaps + install -d -m 755 "$pkgdir/usr/lib/systemd/system/" + install -m 644 "$GOPATH/src/${_gourl}/debian/snapd.refresh.service" "$pkgdir/usr/lib/systemd/system" + install -m 644 "$GOPATH/src/${_gourl}/debian/snapd.refresh.timer" "$pkgdir/usr/lib/systemd/system" + # Install the snapd socket and service for the main daemon + install -m 644 "$GOPATH/src/${_gourl}/debian/snapd.service" "$pkgdir/usr/lib/systemd/system" + install -m 644 "$GOPATH/src/${_gourl}/debian/snapd.socket" "$pkgdir/usr/lib/systemd/system" + # Install legacy "frameworks" units + # TODO: drop those when they go away upstream + install -m 644 "$GOPATH/src/${_gourl}/debian/snapd.frameworks-pre.target" "$pkgdir/usr/lib/systemd/system" + install -m 644 "$GOPATH/src/${_gourl}/debian/snapd.frameworks.target" "$pkgdir/usr/lib/systemd/system" + # Install snap and snapd executables + install -d -m 755 "$pkgdir/usr/bin/" + install -m 755 "$GOPATH/bin/snap" "$pkgdir/usr/bin/" + install -d -m 755 "$pkgdir/usr/lib/snapd" + install -m 755 "$GOPATH/bin/snapd" "$pkgdir/usr/lib/snapd/" + # Install script to export binaries paths of snaps + install -Dm 755 "$srcdir/snapd.sh" "$pkgdir/etc/profile.d/apps-bin-path.sh" +} Property changes on: snapd/trunk/PKGBUILD ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Added: snapd/trunk/fix_test.patch =================================================================== --- snapd/trunk/fix_test.patch (rev 0) +++ snapd/trunk/fix_test.patch 2016-07-01 14:14:29 UTC (rev 181675) @@ -0,0 +1,33 @@ +From b66d3ea328ee42d3d4f56ed9736c315833dee67d Mon Sep 17 00:00:00 2001 +From: Timothy Redaelli <timothy.redae...@gmail.com> +Date: Fri, 1 Jul 2016 15:28:46 +0200 +Subject: [PATCH] Fix ./run-checks --static + +Python doesn't like LANG=C.UTF-8 so just open the files +using UTF-8 directly +--- + mdlint.py | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/mdlint.py b/mdlint.py +index 533c812..a1bd4ac 100755 +--- a/mdlint.py ++++ b/mdlint.py +@@ -7,7 +7,7 @@ + # http://pythonhosted.org/Markdown/ + + import sys +- ++import codecs + + def lint_li(fname, text): + """Ensure that the list-items are multiplies of 4""" +@@ -23,7 +23,7 @@ def lint(md_files): + """lint all md files""" + all_clean = True + for md in md_files: +- with open(md) as f: ++ with codecs.open(md, "r", "utf-8") as f: + buf = f.read() + for fname, func in globals().items(): + if fname.startswith("lint_"): Added: snapd/trunk/snapd.install =================================================================== --- snapd/trunk/snapd.install (rev 0) +++ snapd/trunk/snapd.install 2016-07-01 14:14:29 UTC (rev 181675) @@ -0,0 +1,15 @@ +## arg 1: the new package version +post_install() { + echo + echo 'To use snapd start/enable the snapd.socket' + echo + echo 'If you want your apps to be automatically updated' + echo 'from the store start/enable the snapd.refresh.timer' + echo + echo 'NOTE: Desktop entries show up after logging in again' + echo ' or rebooting after snapd installation' + echo + echo 'For more informations, see https://wiki.archlinux.org/index.php/Snapd' +} + +# vim:set ts=2 sw=2 et: Added: snapd/trunk/snapd.sh =================================================================== --- snapd/trunk/snapd.sh (rev 0) +++ snapd/trunk/snapd.sh 2016-07-01 14:14:29 UTC (rev 181675) @@ -0,0 +1,10 @@ +# Expand the $PATH to include /snaps/bin which is what snappy applications +# use +PATH=$PATH:/snap/bin + +if [ -z "$XDG_DATA_DIRS" ]; then + XDG_DATA_DIRS=/usr/local/share/:/usr/share/:/var/lib/snapd/desktop +else + XDG_DATA_DIRS="$XDG_DATA_DIRS":/var/lib/snapd/desktop +fi +export XDG_DATA_DIRS