[arch-commits] Commit in snapd/trunk (3 files)
Timothy Redaelli
tredaelli at archlinux.org
Tue Feb 21 15:32:39 UTC 2017
Date: Tuesday, February 21, 2017 @ 15:32:38
Author: tredaelli
Revision: 213340
upgpkg: snapd 2.21-1
Added:
snapd/trunk/0001-debian-ARCHLINUX-use-alternate-snap-mount-directory.patch
snapd/trunk/0001-dirs-FEDORA-use-alternate-snap-mount-directory.patch
Modified:
snapd/trunk/PKGBUILD
----------------------------------------------------------------+
0001-debian-ARCHLINUX-use-alternate-snap-mount-directory.patch | 26 ++++
0001-dirs-FEDORA-use-alternate-snap-mount-directory.patch | 26 ++++
PKGBUILD | 62 +++++++---
3 files changed, 101 insertions(+), 13 deletions(-)
Added: 0001-debian-ARCHLINUX-use-alternate-snap-mount-directory.patch
===================================================================
--- 0001-debian-ARCHLINUX-use-alternate-snap-mount-directory.patch (rev 0)
+++ 0001-debian-ARCHLINUX-use-alternate-snap-mount-directory.patch 2017-02-21 15:32:38 UTC (rev 213340)
@@ -0,0 +1,26 @@
+From 529c77918eab0742e645db3d97b62b55e9f6888a Mon Sep 17 00:00:00 2001
+From: Timothy Redaelli <tredaelli at archlinux.info>
+Date: Tue, 21 Feb 2017 11:38:00 +0000
+Subject: [PATCH] debian: ARCHLINUX: use alternate snap mount directory
+
+Signed-off-by: Timothy Redaelli <tredaelli at archlinux.info>
+---
+ debian/snapd.refresh.service | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/debian/snapd.refresh.service b/debian/snapd.refresh.service
+index 4c3375786..dda02de0e 100644
+--- a/debian/snapd.refresh.service
++++ b/debian/snapd.refresh.service
+@@ -2,7 +2,7 @@
+ Description=Automatically refresh installed snaps
+ After=network-online.target snapd.socket
+ Requires=snapd.socket
+-ConditionPathExistsGlob=/snap/*/current
++ConditionPathExistsGlob=/var/lib/snapd/snap/*/current
+ Documentation=man:snap(1)
+
+ [Service]
+--
+2.11.1
+
Added: 0001-dirs-FEDORA-use-alternate-snap-mount-directory.patch
===================================================================
--- 0001-dirs-FEDORA-use-alternate-snap-mount-directory.patch (rev 0)
+++ 0001-dirs-FEDORA-use-alternate-snap-mount-directory.patch 2017-02-21 15:32:38 UTC (rev 213340)
@@ -0,0 +1,26 @@
+From 6738583e77ca2f52760be8887c9aefebe8e89b3b Mon Sep 17 00:00:00 2001
+From: Zygmunt Krynicki <me at zygoon.pl>
+Date: Thu, 20 Oct 2016 10:14:21 +0200
+Subject: [PATCH] dirs: FEDORA: use alternate snap mount directory
+
+Signed-off-by: Zygmunt Krynicki <me at zygoon.pl>
+---
+ dirs/dirs.go | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/dirs/dirs.go b/dirs/dirs.go
+index 36e3b54..315df32 100644
+--- a/dirs/dirs.go
++++ b/dirs/dirs.go
+@@ -103,7 +103,7 @@ func SetRootDir(rootdir string) {
+ }
+ GlobalRootDir = rootdir
+
+- SnapMountDir = filepath.Join(rootdir, "/snap")
++ SnapMountDir = filepath.Join(rootdir, "/var/lib/snapd/snap")
+ SnapDataDir = filepath.Join(rootdir, "/var/snap")
+ SnapDataHomeGlob = filepath.Join(rootdir, "/home/*/snap/")
+ SnapAppArmorDir = filepath.Join(rootdir, snappyDir, "apparmor", "profiles")
+--
+2.7.4
+
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2017-02-21 14:42:49 UTC (rev 213339)
+++ PKGBUILD 2017-02-21 15:32:38 UTC (rev 213340)
@@ -2,21 +2,29 @@
# Maintainer: Timothy Redaelli <timothy.redaelli at gmail.com>
# Contributor: Zygmunt Krynicki <me at zygoon dot pl>
-pkgname=snapd
-pkgver=2.16
+pkgbase=snapd
+pkgname=(snapd snap-confine)
+pkgver=2.21
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')
+
+# snap-confine
+makedepends+=('python-docutils' 'systemd')
+checkdepends+=('indent' 'shellcheck')
+
options=('!strip' 'emptydirs')
install=snapd.install
source=("git+https://github.com/snapcore/$pkgname.git#tag=$pkgver"
+ '0001-dirs-FEDORA-use-alternate-snap-mount-directory.patch'
+ '0001-debian-ARCHLINUX-use-alternate-snap-mount-directory.patch'
'snapd.sh')
md5sums=('SKIP'
+ '01f4f8f0f201eb965164a6d129869868'
+ 'a793de7726448ecc279b3ac1705e1734'
'1d841a1d09ba86945551dfc5c5658b2e')
_gourl=github.com/snapcore/snapd
@@ -32,6 +40,13 @@
# above describes.
mkdir -p "$(dirname "$GOPATH/src/${_gourl}")"
ln --no-target-directory -fs "$srcdir/$pkgname" "$GOPATH/src/${_gourl}"
+
+ patch -Np1 -i "$srcdir/0001-dirs-FEDORA-use-alternate-snap-mount-directory.patch"
+ patch -Np1 -i "$srcdir/0001-debian-ARCHLINUX-use-alternate-snap-mount-directory.patch"
+
+ # https://github.com/niemeyer/gopkg/issues/50
+ mkdir -p "$srcdir/git/"
+ git config --file "$srcdir/git/config" http.https://gopkg.in.followRedirects true
}
build() {
@@ -39,22 +54,41 @@
# 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
+ XDG_CONFIG_HOME="$srcdir" ./get-deps.sh
# Build/install snap and snapd
go install "${_gourl}/cmd/snap"
go install "${_gourl}/cmd/snapd"
+
+ # Build snap-confine
+ ./mkversion.sh
+ cd cmd
+ autoreconf -i -f
+ ./configure \
+ --prefix=/usr \
+ --libexecdir=/usr/lib/snapd \
+ --with-snap-mount-dir=/var/lib/snapd/snap \
+ --disable-apparmor \
+ --enable-nvidia-arch \
+ --enable-merged-usr
+ make
}
+# FIXME
check() {
export GOPATH="$srcdir/go"
cd "$GOPATH/src/${_gourl}"
- # FIXME lp:1611706
- env -u SUDO_COMMAND -u SUDO_GID -u SUDO_UID -u SUDO_USER ./run-checks --unit
+#
+# ./run-checks --unit
+# ./run-checks --static
- ./run-checks --static
+ cd cmd
+ make -k check
}
-package() {
+package_snapd() {
+ pkgdesc="Service and tools for management of snap packages."
+ depends=('snap-confine' 'squashfs-tools')
+
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.
@@ -66,10 +100,6 @@
# 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/"
@@ -78,3 +108,9 @@
# Install script to export binaries paths of snaps
install -Dm 755 "$srcdir/snapd.sh" "$pkgdir/etc/profile.d/apps-bin-path.sh"
}
+
+package_snap-confine() {
+ pkgdesc="Confinement system for snap applications"
+ depends=('libseccomp' 'libsystemd')
+ make -C "$srcdir/$pkgbase/cmd" install DESTDIR="$pkgdir/"
+}
More information about the arch-commits
mailing list