diff options
author | aimileus | 2018-01-07 20:53:51 +0100 |
---|---|---|
committer | aimileus | 2018-01-07 20:53:51 +0100 |
commit | 53385e4838a91c232ab9ef9bf309823494dc00fa (patch) | |
tree | dde3865ed22b17785c60bc94bb893d28fcc25462 | |
parent | d3f737f6bd6c8c51522222af6f0e57035b9702d4 (diff) | |
download | aur-53385e4838a91c232ab9ef9bf309823494dc00fa.tar.gz |
updpkg: snapd 2.30-1
-rw-r--r-- | .SRCINFO | 21 | ||||
-rw-r--r-- | .gitignore | 4 | ||||
-rw-r--r-- | PKGBUILD | 148 | ||||
-rw-r--r-- | README.md | 10 | ||||
-rw-r--r-- | snapd.install | 15 | ||||
-rw-r--r-- | snapd.sh | 10 |
6 files changed, 96 insertions, 112 deletions
@@ -1,8 +1,8 @@ pkgbase = snapd - pkgver = 2.26.1 - pkgrel = 3 + pkgdesc = Service and tools for management of snap packages. + pkgver = 2.30 + pkgrel = 1 url = https://github.com/snapcore/snapd - install = snapd.install arch = x86_64 license = GPL3 checkdepends = python @@ -17,20 +17,13 @@ pkgbase = snapd makedepends = python-docutils makedepends = systemd makedepends = xfsprogs + depends = squashfs-tools + depends = libseccomp + depends = libsystemd options = !strip options = emptydirs - source = git+https://github.com/snapcore/snapd.git#commit=3853be982c99267133d132901df7da0bf850d949 - source = snapd.sh + source = git+https://github.com/snapcore/snapd.git#tag=2.30 md5sums = SKIP - md5sums = 8e9b8108165d5b2ae911de9caefb37ce pkgname = snapd - pkgdesc = Service and tools for management of snap packages. - depends = snap-confine - depends = squashfs-tools - -pkgname = snap-confine - pkgdesc = Confinement system for snap applications - depends = libseccomp - depends = libsystemd diff --git a/.gitignore b/.gitignore index dbf3fdd9285b..1b66557c6330 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ src pkg -*.pkg.tar.xz -*.tar.gz +snapd +*.pkg.* @@ -1,59 +1,67 @@ -# $Id: PKGBUILD 267493 2017-11-19 19:43:28Z bpiotrowski $ -# Maintainer: Timothy Redaelli <timothy.redaelli@gmail.com> +# Maintainer: aimileus < $(echo YWltaWxpdXNAcHJvdG9ubWFpbC5jb20K | base64 -d) > + +# Contributor: Timothy Redaelli <timothy.redaelli@gmail.com> # Contributor: Zygmunt Krynicki <me at zygoon dot pl> -pkgbase=snapd -pkgname=(snapd snap-confine) -pkgver=2.26.1 -pkgrel=3 -_gitcommit=3853be982c99267133d132901df7da0bf850d949 +pkgname=snapd +pkgdesc="Service and tools for management of snap packages." +depends=('squashfs-tools' 'libseccomp' 'libsystemd') +pkgver=2.30 +pkgrel=1 arch=('x86_64') url="https://github.com/snapcore/snapd" license=('GPL3') -makedepends=('git' 'go-pie' 'go-tools' 'bzr') -checkdepends=('python' 'squashfs-tools') - -# snap-confine -makedepends+=('libcap' 'python-docutils' 'systemd' 'xfsprogs') -checkdepends+=('indent' 'shellcheck') - +makedepends=('git' 'go-pie' 'go-tools' 'bzr' 'libcap' 'python-docutils' 'systemd' 'xfsprogs') +checkdepends=('python' 'squashfs-tools' 'indent' 'shellcheck') options=('!strip' 'emptydirs') -install=snapd.install -source=("git+https://github.com/snapcore/$pkgname.git#commit=$_gitcommit" - 'snapd.sh') -md5sums=('SKIP' - '8e9b8108165d5b2ae911de9caefb37ce') +source=("git+https://github.com/snapcore/${pkgname}.git#tag=${pkgver}") +md5sums=('SKIP') _gourl=github.com/snapcore/snapd prepare() { - cd "$pkgname" - - # 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 + + # 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}" + + # Patch snap-seccomp build flags not to link libseccomp statically. + sed -i -e 's/-Wl,-Bstatic -lseccomp -Wl,-Bdynamic/-lseccomp/' "$srcdir/$pkgname/cmd/snap-seccomp/main.go" } build() { export GOPATH="$srcdir/go" + + export CGO_ENABLED="1" + export CGO_CFLAGS="${CFLAGS}" + export CGO_CPPFLAGS="${CPPFLAGS}" + export CGO_CXXFLAGS="${CXXFLAGS}" + export CGO_LDFLAGS="${LDFLAGS}" + + cd $pkgname + ./mkversion.sh $pkgver + # Use get-deps.sh provided by upstream to fetch go dependencies using the # godeps tool and dependencies.tsv (maintained upstream). cd "$GOPATH/src/${_gourl}" XDG_CONFIG_HOME="$srcdir" ./get-deps.sh - # Build/install snap and snapd + + # Build go binaries go install "${_gourl}/cmd/snap" + go install "${_gourl}/cmd/snapctl" go install "${_gourl}/cmd/snapd" + go install "${_gourl}/cmd/snap-seccomp" + go install "${_gourl}/cmd/snap-update-ns" + go install "${_gourl}/cmd/snap-exec" # Generate the real systemd units out of the available templates - make -C data/systemd all + make -C data/systemd + SNAP_MOUNT_DIR=/var/lib/snapd/snap - # Build snap-confine - ./mkversion.sh cd cmd autoreconf -i -f ./configure \ @@ -66,45 +74,63 @@ build() { make } -# FIXME -check() { - return + +package() { export GOPATH="$srcdir/go" - cd "$GOPATH/src/${_gourl}" + # Ensure that we have /var/lib/snapd/{hostfs,lib/gl}/ as they are required + # by snap-confine for constructing some bind mounts around. + install -dm755 "$pkgdir/var/lib/snapd/hostfs/" "$pkgdir/var/lib/snapd/lib/gl/" - ./run-checks --unit - ./run-checks --static + # Install bash completion + install -Dm644 "$srcdir/$pkgname/data/completion/snap" \ + "$pkgdir/usr/share/bash-completion/completion/snap" + install -Dm644 "$srcdir/$pkgname/data/completion/complete.sh" \ + "$pkgdir/usr/lib/snapd/complete.sh" + install -Dm644 "$srcdir/$pkgname/data/completion/etelpmoc.sh" \ + "$pkgdir/usr/lib/snapd/etelpmoc.sh" - cd cmd - make -k check -} + # Install systemd units, dbus services and a script for environment variables + make -C "$srcdir/$pkgname/data/" install \ + SYSTEMDSYSTEMUNITDIR=/usr/lib/systemd/system \ + DESTDIR="$pkgdir" -package_snapd() { - pkgdesc="Service and tools for management of snap packages." - depends=('snap-confine' 'squashfs-tools') + # Install polkit policy + install -Dm644 "$srcdir/$pkgname/data/polkit/io.snapcraft.snapd.policy" \ + "$pkgdir/usr/share/polkit-1/actions/io.snapcraft.snapd.policy" - 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}/data/systemd/snapd.refresh.service" "$pkgdir/usr/lib/systemd/system" - install -m 644 "$GOPATH/src/${_gourl}/data/systemd/snapd.refresh.timer" "$pkgdir/usr/lib/systemd/system" - # Install the snapd socket and service for the main daemon - install -m 644 "$GOPATH/src/${_gourl}/data/systemd/snapd.service" "$pkgdir/usr/lib/systemd/system" - install -m 644 "$GOPATH/src/${_gourl}/data/systemd/snapd.socket" "$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" -} + # Install executables + install -Dm755 "$GOPATH/bin/snap" "$pkgdir/usr/bin/snap" + install -Dm755 "$GOPATH/bin/snapctl" "$pkgdir/usr/bin/snapctl" + install -Dm755 "$GOPATH/bin/snapd" "$pkgdir/usr/lib/snapd/snapd" + install -Dm755 "$GOPATH/bin/snap-seccomp" "$pkgdir/usr/lib/snapd/snap-seccomp" + install -Dm755 "$GOPATH/bin/snap-update-ns" "$pkgdir/usr/lib/snapd/snap-update-ns" + install -Dm755 "$GOPATH/bin/snap-exec" "$pkgdir/usr/lib/snapd/snap-exec" + + # Symlink /var/lib/snapd/snap to /snap so that --classic snaps work + ln -s var/lib/snapd/snap "$pkgdir/snap" + + # pre-create directories + install -dm755 "$pkgdir/var/lib/snapd/snap" + install -dm755 "$pkgdir/var/cache/snapd" + install -dm755 "$pkgdir/var/lib/snapd/assertions" + install -dm755 "$pkgdir/var/lib/snapd/desktop/applications" + install -dm755 "$pkgdir/var/lib/snapd/device" + install -dm755 "$pkgdir/var/lib/snapd/hostfs" + install -dm755 "$pkgdir/var/lib/snapd/mount" + install -dm755 "$pkgdir/var/lib/snapd/seccomp/bpf" + install -dm755 "$pkgdir/var/lib/snapd/snap/bin" + install -dm755 "$pkgdir/var/lib/snapd/snaps" + install -dm755 "$pkgdir/var/lib/snapd/lib/gl" + install -dm000 "$pkgdir/var/lib/snapd/void" + install -dm700 "$pkgdir/var/lib/snapd/cookie" + install -dm700 "$pkgdir/var/lib/snapd/cache" -package_snap-confine() { - pkgdesc="Confinement system for snap applications" - depends=('libseccomp' 'libsystemd') make -C "$srcdir/$pkgbase/cmd" install DESTDIR="$pkgdir/" + + # Install man file + snap help --man > "$pkgdir/usr/share/man/man1/snap.1" + + # Install the "info" data file with snapd version + install -m 644 -D "$GOPATH/src/${_gourl}/data/info" \ + "$pkgdir/usr/lib/snapd/info" } diff --git a/README.md b/README.md deleted file mode 100644 index f8904ea277fe..000000000000 --- a/README.md +++ /dev/null @@ -1,10 +0,0 @@ -This is the stable release package for snapd. - -It is maintained in conjunction with snap-confine at -https://github.com/zyga/snap-confine-arch. - -Improvements are welcome! Please report issues, fork the code, send pull -requests or comments. - -Issues related to snapd upstream should be reported here instead: -https://bugs.launchpad.net/snappy/+filebug diff --git a/snapd.install b/snapd.install deleted file mode 100644 index cd80f1da7dc6..000000000000 --- a/snapd.install +++ /dev/null @@ -1,15 +0,0 @@ -## 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: diff --git a/snapd.sh b/snapd.sh deleted file mode 100644 index 5516b69156a1..000000000000 --- a/snapd.sh +++ /dev/null @@ -1,10 +0,0 @@ -# Expand the $PATH to include /snaps/bin which is what snappy applications -# use -PATH=$PATH:/var/lib/snapd/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 |