Re-merge from AUR, bugfix release 2.35.5

parent b684e22a
From 043ea8a4831975373e1cb5c63dc09ee5609f5d36 Mon Sep 17 00:00:00 2001
Message-Id: <043ea8a4831975373e1cb5c63dc09ee5609f5d36.1529666554.git.maciej.zenon.borzecki@canonical.com>
From: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
Date: Fri, 22 Jun 2018 12:34:30 +0200
Subject: [PATCH] dirs: improve identification of Arch Linux like systems
Arch Linux derivatives correctly set ID_LIKE=archlinux but we use 'arch' in our
detection (which is only set by Arch as ID=arch).
Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
---
dirs/dirs.go | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dirs/dirs.go b/dirs/dirs.go
index df4c028083c16c6abfa7438a5b11459e9dcc9b07..2e84ae962665f97e1bc2312993a89b1a8bc58bbf 100644
--- a/dirs/dirs.go
+++ b/dirs/dirs.go
@@ -178,7 +178,7 @@ func SetRootDir(rootdir string) {
}
GlobalRootDir = rootdir
- if release.DistroLike("fedora", "arch", "manjaro") {
+ if release.DistroLike("fedora", "archlinux", "manjaro") {
SnapMountDir = filepath.Join(rootdir, "/var/lib/snapd/snap")
} else {
SnapMountDir = filepath.Join(rootdir, defaultSnapMountDir)
--
2.17.1
......@@ -8,8 +8,8 @@ pkgname=snapd
pkgdesc="Service and tools for management of snap packages."
depends=('squashfs-tools' 'libseccomp' 'libsystemd')
optdepends=('bash-completion: bash completion support')
pkgver=2.34.3
pkgrel=1
pkgver=2.35.4
pkgrel=2
arch=('x86_64')
url="https://github.com/snapcore/snapd"
license=('GPL3')
......@@ -18,7 +18,7 @@ conflicts=('snap-confine')
options=('!strip' 'emptydirs')
install=snapd.install
source=("$pkgname-$pkgver.tar.xz::https://github.com/snapcore/${pkgname}/releases/download/${pkgver}/${pkgname}_${pkgver}.vendor.tar.xz")
sha256sums=('aa01db921503cdcdf30d34dd42b0fb6083f9374b1bf3b6a54401ac192a38118e')
sha256sums=('bd6caaa446f8bc22ebdc80d524704b74bec4f3976034742eaa2f73a6fd8c4713')
_gourl=github.com/snapcore/snapd
......@@ -47,16 +47,20 @@ build() {
./mkversion.sh $pkgver-$pkgrel
gobuild="go build -buildmode=pie"
gobuild_static="go build -buildmode=pie -ldflags=-extldflags=-static"
# because argument expansion with quoting in bash is hard, and -ldflags=-extldflags='-foo'
# is not exactly the same as -ldflags "-extldflags '-foo'" use the array trick
# to pass exactly what we want
flags=(-buildmode=pie -ldflags "-extldflags '$LDFLAGS'")
staticflags=(-buildmode=pie -ldflags "-extldflags '$LDFLAGS -static'")
# Build/install snap and snapd
$gobuild -o $GOPATH/bin/snap "${_gourl}/cmd/snap"
$gobuild -o $GOPATH/bin/snapctl "${_gourl}/cmd/snapctl"
$gobuild -o $GOPATH/bin/snapd "${_gourl}/cmd/snapd"
$gobuild -o $GOPATH/bin/snap-seccomp "${_gourl}/cmd/snap-seccomp"
go build "${flags[@]}" -o "$GOPATH/bin/snap" "${_gourl}/cmd/snap"
go build "${flags[@]}" -o "$GOPATH/bin/snapctl" "${_gourl}/cmd/snapctl"
go build "${flags[@]}" -o "$GOPATH/bin/snapd" "${_gourl}/cmd/snapd"
go build "${flags[@]}" -o "$GOPATH/bin/snap-seccomp" "${_gourl}/cmd/snap-seccomp"
go build "${flags[@]}" -o "$GOPATH/bin/snap-failure" "${_gourl}/cmd/snap-failure"
# build snap-exec and snap-update-ns completely static for base snaps
$gobuild_static -o $GOPATH/bin/snap-update-ns "${_gourl}/cmd/snap-update-ns"
$gobuild_static -o $GOPATH/bin/snap-exec "${_gourl}/cmd/snap-exec"
go build "${staticflags[@]}" -o "$GOPATH/bin/snap-update-ns" "${_gourl}/cmd/snap-update-ns"
go build "${staticflags[@]}" -o "$GOPATH/bin/snap-exec" "${_gourl}/cmd/snap-exec"
# Generate data files such as real systemd units, dbus service, environment
# setup helpers out of the available templates
......@@ -109,6 +113,7 @@ package() {
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-failure" "$pkgdir/usr/lib/snapd/snap-failure"
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"
......@@ -156,4 +161,4 @@ package() {
rm -fv "$pkgdir/usr/lib/snapd/system-shutdown"
# apparmor bits
rm -rfv "$pkgdir"/var/lib/snapd/apparmor
}
\ No newline at end of file
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment