[arch-commits] Commit in snapd/repos (10 files)

Timothy Redaelli tredaelli at archlinux.org
Fri Jul 1 14:29:57 UTC 2016


    Date: Friday, July 1, 2016 @ 14:29:57
  Author: tredaelli
Revision: 181677

archrelease: copy trunk to community-i686, community-x86_64

Added:
  snapd/repos/community-i686/
  snapd/repos/community-i686/PKGBUILD
    (from rev 181676, snapd/trunk/PKGBUILD)
  snapd/repos/community-i686/fix_test.patch
    (from rev 181676, snapd/trunk/fix_test.patch)
  snapd/repos/community-i686/snapd.install
    (from rev 181676, snapd/trunk/snapd.install)
  snapd/repos/community-i686/snapd.sh
    (from rev 181676, snapd/trunk/snapd.sh)
  snapd/repos/community-x86_64/
  snapd/repos/community-x86_64/PKGBUILD
    (from rev 181676, snapd/trunk/PKGBUILD)
  snapd/repos/community-x86_64/fix_test.patch
    (from rev 181676, snapd/trunk/fix_test.patch)
  snapd/repos/community-x86_64/snapd.install
    (from rev 181676, snapd/trunk/snapd.install)
  snapd/repos/community-x86_64/snapd.sh
    (from rev 181676, snapd/trunk/snapd.sh)

---------------------------------+
 community-i686/PKGBUILD         |   81 ++++++++++++++++++++++++++++++++++++++
 community-i686/fix_test.patch   |   33 +++++++++++++++
 community-i686/snapd.install    |   15 +++++++
 community-i686/snapd.sh         |   10 ++++
 community-x86_64/PKGBUILD       |   81 ++++++++++++++++++++++++++++++++++++++
 community-x86_64/fix_test.patch |   33 +++++++++++++++
 community-x86_64/snapd.install  |   15 +++++++
 community-x86_64/snapd.sh       |   10 ++++
 8 files changed, 278 insertions(+)

Copied: snapd/repos/community-i686/PKGBUILD (from rev 181676, snapd/trunk/PKGBUILD)
===================================================================
--- community-i686/PKGBUILD	                        (rev 0)
+++ community-i686/PKGBUILD	2016-07-01 14:29:57 UTC (rev 181677)
@@ -0,0 +1,81 @@
+# $Id$
+# Maintainer: Timothy Redaelli <timothy.redaelli at 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=("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"
+  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" "$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"
+}

Copied: snapd/repos/community-i686/fix_test.patch (from rev 181676, snapd/trunk/fix_test.patch)
===================================================================
--- community-i686/fix_test.patch	                        (rev 0)
+++ community-i686/fix_test.patch	2016-07-01 14:29:57 UTC (rev 181677)
@@ -0,0 +1,33 @@
+From b66d3ea328ee42d3d4f56ed9736c315833dee67d Mon Sep 17 00:00:00 2001
+From: Timothy Redaelli <timothy.redaelli at 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_"):

Copied: snapd/repos/community-i686/snapd.install (from rev 181676, snapd/trunk/snapd.install)
===================================================================
--- community-i686/snapd.install	                        (rev 0)
+++ community-i686/snapd.install	2016-07-01 14:29:57 UTC (rev 181677)
@@ -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:

Copied: snapd/repos/community-i686/snapd.sh (from rev 181676, snapd/trunk/snapd.sh)
===================================================================
--- community-i686/snapd.sh	                        (rev 0)
+++ community-i686/snapd.sh	2016-07-01 14:29:57 UTC (rev 181677)
@@ -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

Copied: snapd/repos/community-x86_64/PKGBUILD (from rev 181676, snapd/trunk/PKGBUILD)
===================================================================
--- community-x86_64/PKGBUILD	                        (rev 0)
+++ community-x86_64/PKGBUILD	2016-07-01 14:29:57 UTC (rev 181677)
@@ -0,0 +1,81 @@
+# $Id$
+# Maintainer: Timothy Redaelli <timothy.redaelli at 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=("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"
+  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" "$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"
+}

Copied: snapd/repos/community-x86_64/fix_test.patch (from rev 181676, snapd/trunk/fix_test.patch)
===================================================================
--- community-x86_64/fix_test.patch	                        (rev 0)
+++ community-x86_64/fix_test.patch	2016-07-01 14:29:57 UTC (rev 181677)
@@ -0,0 +1,33 @@
+From b66d3ea328ee42d3d4f56ed9736c315833dee67d Mon Sep 17 00:00:00 2001
+From: Timothy Redaelli <timothy.redaelli at 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_"):

Copied: snapd/repos/community-x86_64/snapd.install (from rev 181676, snapd/trunk/snapd.install)
===================================================================
--- community-x86_64/snapd.install	                        (rev 0)
+++ community-x86_64/snapd.install	2016-07-01 14:29:57 UTC (rev 181677)
@@ -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:

Copied: snapd/repos/community-x86_64/snapd.sh (from rev 181676, snapd/trunk/snapd.sh)
===================================================================
--- community-x86_64/snapd.sh	                        (rev 0)
+++ community-x86_64/snapd.sh	2016-07-01 14:29:57 UTC (rev 181677)
@@ -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



More information about the arch-commits mailing list