# With Fedora, nothing is bundled. For everything else, bundling is used. # To use bundled stuff, use "--with vendorized" on rpmbuild %if 0%{?fedora} %bcond_with vendorized %else %bcond_without vendorized %endif # A switch to allow building the package with support for testkeys which # are used for the spread test suite of snapd. %bcond_with testkeys %global with_devel 1 %global with_debug 1 %global with_check 0 %global with_unit_test 0 %global with_test_keys 0 # For the moment, we don't support all golang arches... %global with_goarches 0 # Set if multilib is enabled for supported arches %ifarch x86_64 aarch64 %{power64} s390x %global with_multilib 1 %endif %if ! %{with vendorized} %global with_bundled 0 %else %global with_bundled 1 %endif %if ! %{with testkeys} %global with_test_keys 0 %else %global with_test_keys 1 %endif %if 0%{?with_debug} %global _dwz_low_mem_die_limit 0 %else %global debug_package %{nil} %endif %global provider github %global provider_tld com %global project snapcore %global repo snapd # https://github.com/snapcore/snapd %global provider_prefix %{provider}.%{provider_tld}/%{project}/%{repo} %global import_path %{provider_prefix} %global snappy_svcs snapd.service snapd.socket snapd.autoimport.service snapd.seeded.service # Until we have a way to add more extldflags to gobuild macro... %if 0%{?fedora} %define gobuild_static(o:) go build -buildmode pie -compiler gc -tags=rpm_crashtraceback -ldflags "${LDFLAGS:-} -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n') -extldflags '%__global_ldflags -static'" -a -v -x %{?**}; %endif %if 0%{?rhel} == 7 %define gobuild_static(o:) go build -compiler gc -tags=rpm_crashtraceback -ldflags "${LDFLAGS:-} -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n') -extldflags '%__global_ldflags -static'" -a -v -x %{?**}; %endif # These macros are not defined in RHEL 7 %if 0%{?rhel} == 7 %define gobuild(o:) go build -compiler gc -tags=rpm_crashtraceback -ldflags "${LDFLAGS:-} -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n') -extldflags '%__global_ldflags'" -a -v -x %{?**}; %define gotest() go test -compiler gc -ldflags "${LDFLAGS:-}" %{?**}; %endif # Avoid causing incompatibilities among base snaps %global __brp_mangle_shebangs_exclude ^/bin/(bash|sh)$ # Compat path macros %{!?_environmentdir: %global _environmentdir %{_prefix}/lib/environment.d} %{!?_systemdgeneratordir: %global _systemdgeneratordir %{_prefix}/lib/systemd/system-generators} %{!?_systemd_system_env_generator_dir: %global _systemd_system_env_generator_dir %{_prefix}/lib/systemd/system-environment-generators} Name: snapd Version: 2.39.1 Release: 1%{?dist} Summary: A transactional software package manager License: GPLv3 URL: https://%{provider_prefix} Source0: https://%{provider_prefix}/releases/download/%{version}/%{name}_%{version}.no-vendor.tar.xz Source1: https://%{provider_prefix}/releases/download/%{version}/%{name}_%{version}.only-vendor.tar.xz # Upstream proposed PR: https://github.com/snapcore/snapd/pull/3162 Patch0001: 0001-cmd-use-libtool-for-the-internal-library.patch # Backports from upstream ## Fix issues with domain transitions for mount namespaces (RH#1708991) ## From: https://github.com/snapcore/snapd/commit/c123a2c5e5c943577641d23a73425690a5c6dc1a Patch0101: 0001-data-selinux-permit-init_t-to-remount-snappy_snap_t-.patch %if 0%{?with_goarches} # e.g. el6 has ppc64 arch without gcc-go, so EA tag is required ExclusiveArch: %{?go_arches:%{go_arches}}%{!?go_arches:%{ix86} x86_64 %{arm}} %else # Verified arches from snapd upstream ExclusiveArch: %{ix86} x86_64 %{arm} aarch64 ppc64le s390x %endif # If go_compiler is not set to 1, there is no virtual provide. Use golang instead. BuildRequires: %{?go_compiler:compiler(go-compiler)}%{!?go_compiler:golang >= 1.9} BuildRequires: systemd %{?systemd_requires} Requires: snap-confine%{?_isa} = %{version}-%{release} Requires: squashfs-tools %if 0%{?rhel} && 0%{?rhel} < 8 # Rich dependencies not available, always pull in squashfuse # snapd will use squashfs.ko instead of squashfuse if it's on the system Requires: squashfuse Requires: fuse %else # snapd will use squashfuse in the event that squashfs.ko isn't available (cloud instances, containers, etc.) Requires: ((squashfuse and fuse) or kmod(squashfs.ko)) %endif # bash-completion owns /usr/share/bash-completion/completions Requires: bash-completion # Force the SELinux module to be installed Requires: %{name}-selinux = %{version}-%{release} %if 0%{?fedora} && 0%{?fedora} < 30 # snapd-login-service is no more # Note: Remove when F29 is EOL Obsoletes: %{name}-login-service < 1.33 Provides: %{name}-login-service = 1.33 Provides: %{name}-login-service%{?_isa} = 1.33 %endif %if ! 0%{?with_bundled} BuildRequires: golang(github.com/boltdb/bolt) BuildRequires: golang(github.com/cheggaaa/pb) BuildRequires: golang(github.com/coreos/go-systemd/activation) BuildRequires: golang(github.com/godbus/dbus) BuildRequires: golang(github.com/godbus/dbus/introspect) BuildRequires: golang(github.com/gorilla/mux) BuildRequires: golang(github.com/jessevdk/go-flags) BuildRequires: golang(github.com/juju/ratelimit) BuildRequires: golang(github.com/kr/pretty) BuildRequires: golang(github.com/kr/text) BuildRequires: golang(github.com/mvo5/goconfigparser) BuildRequires: golang(github.com/ojii/gettext.go) BuildRequires: golang(github.com/seccomp/libseccomp-golang) BuildRequires: golang(golang.org/x/crypto/openpgp/armor) BuildRequires: golang(golang.org/x/crypto/openpgp/packet) BuildRequires: golang(golang.org/x/crypto/sha3) BuildRequires: golang(golang.org/x/crypto/ssh/terminal) BuildRequires: golang(gopkg.in/check.v1) BuildRequires: golang(gopkg.in/macaroon.v1) BuildRequires: golang(gopkg.in/mgo.v2/bson) BuildRequires: golang(gopkg.in/retry.v1) BuildRequires: golang(gopkg.in/tomb.v2) BuildRequires: golang(gopkg.in/yaml.v2) %endif %description Snappy is a modern, cross-distribution, transactional package manager designed for working with self-contained, immutable packages. %package -n snap-confine Summary: Confinement system for snap applications License: GPLv3 BuildRequires: autoconf BuildRequires: automake BuildRequires: libtool BuildRequires: gcc BuildRequires: gettext BuildRequires: gnupg BuildRequires: indent BuildRequires: pkgconfig(glib-2.0) BuildRequires: pkgconfig(libcap) BuildRequires: pkgconfig(libseccomp) BuildRequires: pkgconfig(libselinux) BuildRequires: pkgconfig(libudev) BuildRequires: pkgconfig(systemd) BuildRequires: pkgconfig(udev) BuildRequires: xfsprogs-devel BuildRequires: glibc-static %if ! 0%{?rhel} BuildRequires: libseccomp-static %endif BuildRequires: valgrind BuildRequires: %{_bindir}/rst2man %if 0%{?fedora} # ShellCheck in EPEL is too old... BuildRequires: %{_bindir}/shellcheck %endif # Ensures older version from split packaging is replaced Obsoletes: snap-confine < 2.19 %description -n snap-confine This package is used internally by snapd to apply confinement to the started snap applications. %package selinux Summary: SELinux module for snapd License: GPLv2+ BuildArch: noarch BuildRequires: selinux-policy, selinux-policy-devel Requires(post): selinux-policy-base >= %{_selinux_policy_version} Requires(post): policycoreutils %if 0%{?rhel} == 7 Requires(post): policycoreutils-python %else Requires(post): policycoreutils-python-utils %endif Requires(pre): libselinux-utils Requires(post): libselinux-utils %description selinux This package provides the SELinux policy module to ensure snapd runs properly under an environment with SELinux enabled. %if 0%{?with_devel} %package devel Summary: Development files for %{name} BuildArch: noarch %if 0%{?with_check} && ! 0%{?with_bundled} %endif %if ! 0%{?with_bundled} Requires: golang(github.com/boltdb/bolt) Requires: golang(github.com/cheggaaa/pb) Requires: golang(github.com/coreos/go-systemd/activation) Requires: golang(github.com/godbus/dbus) Requires: golang(github.com/godbus/dbus/introspect) Requires: golang(github.com/gorilla/mux) Requires: golang(github.com/jessevdk/go-flags) Requires: golang(github.com/juju/ratelimit) Requires: golang(github.com/kr/pretty) Requires: golang(github.com/kr/text) Requires: golang(github.com/mvo5/goconfigparser) Requires: golang(github.com/ojii/gettext.go) Requires: golang(github.com/seccomp/libseccomp-golang) Requires: golang(golang.org/x/crypto/openpgp/armor) Requires: golang(golang.org/x/crypto/openpgp/packet) Requires: golang(golang.org/x/crypto/sha3) Requires: golang(golang.org/x/crypto/ssh/terminal) Requires: golang(gopkg.in/check.v1) Requires: golang(gopkg.in/macaroon.v1) Requires: golang(gopkg.in/mgo.v2/bson) Requires: golang(gopkg.in/retry.v1) Requires: golang(gopkg.in/tomb.v2) Requires: golang(gopkg.in/yaml.v2) %else # These Provides are unversioned because the sources in # the bundled tarball are unversioned (they go by git commit) # *sigh*... I hate golang... Provides: bundled(golang(github.com/snapcore/bolt)) Provides: bundled(golang(github.com/cheggaaa/pb)) Provides: bundled(golang(github.com/coreos/go-systemd/activation)) Provides: bundled(golang(github.com/godbus/dbus)) Provides: bundled(golang(github.com/godbus/dbus/introspect)) Provides: bundled(golang(github.com/gorilla/mux)) Provides: bundled(golang(github.com/jessevdk/go-flags)) Provides: bundled(golang(github.com/juju/ratelimit)) Provides: bundled(golang(github.com/kr/pretty)) Provides: bundled(golang(github.com/kr/text)) Provides: bundled(golang(github.com/mvo5/goconfigparser)) Provides: bundled(golang(github.com/mvo5/libseccomp-golang)) Provides: bundled(golang(github.com/ojii/gettext.go)) Provides: bundled(golang(golang.org/x/crypto/openpgp/armor)) Provides: bundled(golang(golang.org/x/crypto/openpgp/packet)) Provides: bundled(golang(golang.org/x/crypto/sha3)) Provides: bundled(golang(golang.org/x/crypto/ssh/terminal)) Provides: bundled(golang(gopkg.in/check.v1)) Provides: bundled(golang(gopkg.in/macaroon.v1)) Provides: bundled(golang(gopkg.in/mgo.v2/bson)) Provides: bundled(golang(gopkg.in/retry.v1)) Provides: bundled(golang(gopkg.in/tomb.v2)) Provides: bundled(golang(gopkg.in/yaml.v2)) %endif # Generated by gofed Provides: golang(%{import_path}/advisor) = %{version}-%{release} Provides: golang(%{import_path}/arch) = %{version}-%{release} Provides: golang(%{import_path}/asserts) = %{version}-%{release} Provides: golang(%{import_path}/asserts/assertstest) = %{version}-%{release} Provides: golang(%{import_path}/asserts/signtool) = %{version}-%{release} Provides: golang(%{import_path}/asserts/snapasserts) = %{version}-%{release} Provides: golang(%{import_path}/asserts/sysdb) = %{version}-%{release} Provides: golang(%{import_path}/asserts/systestkeys) = %{version}-%{release} Provides: golang(%{import_path}/boot) = %{version}-%{release} Provides: golang(%{import_path}/boot/boottest) = %{version}-%{release} Provides: golang(%{import_path}/bootloader) = %{version}-%{release} Provides: golang(%{import_path}/bootloader/androidbootenv) = %{version}-%{release} Provides: golang(%{import_path}/bootloader/grubenv) = %{version}-%{release} Provides: golang(%{import_path}/bootloader/ubootenv) = %{version}-%{release} Provides: golang(%{import_path}/client) = %{version}-%{release} Provides: golang(%{import_path}/cmd) = %{version}-%{release} Provides: golang(%{import_path}/cmd/cmdutil) = %{version}-%{release} Provides: golang(%{import_path}/cmd/snap-seccomp/syscalls) = %{version}-%{release} Provides: golang(%{import_path}/cmd/snaplock) = %{version}-%{release} Provides: golang(%{import_path}/daemon) = %{version}-%{release} Provides: golang(%{import_path}/dirs) = %{version}-%{release} Provides: golang(%{import_path}/errtracker) = %{version}-%{release} Provides: golang(%{import_path}/features) = %{version}-%{release} Provides: golang(%{import_path}/gadget) = %{version}-%{release} Provides: golang(%{import_path}/httputil) = %{version}-%{release} Provides: golang(%{import_path}/i18n) = %{version}-%{release} Provides: golang(%{import_path}/image) = %{version}-%{release} Provides: golang(%{import_path}/interfaces) = %{version}-%{release} Provides: golang(%{import_path}/interfaces/apparmor) = %{version}-%{release} Provides: golang(%{import_path}/interfaces/backends) = %{version}-%{release} Provides: golang(%{import_path}/interfaces/builtin) = %{version}-%{release} Provides: golang(%{import_path}/interfaces/dbus) = %{version}-%{release} Provides: golang(%{import_path}/interfaces/hotplug) = %{version}-%{release} Provides: golang(%{import_path}/interfaces/ifacetest) = %{version}-%{release} Provides: golang(%{import_path}/interfaces/kmod) = %{version}-%{release} Provides: golang(%{import_path}/interfaces/mount) = %{version}-%{release} Provides: golang(%{import_path}/interfaces/policy) = %{version}-%{release} Provides: golang(%{import_path}/interfaces/seccomp) = %{version}-%{release} Provides: golang(%{import_path}/interfaces/systemd) = %{version}-%{release} Provides: golang(%{import_path}/interfaces/udev) = %{version}-%{release} Provides: golang(%{import_path}/interfaces/utils) = %{version}-%{release} Provides: golang(%{import_path}/jsonutil) = %{version}-%{release} Provides: golang(%{import_path}/jsonutil/safejson) = %{version}-%{release} Provides: golang(%{import_path}/logger) = %{version}-%{release} Provides: golang(%{import_path}/metautil) = %{version}-%{release} Provides: golang(%{import_path}/netutil) = %{version}-%{release} Provides: golang(%{import_path}/osutil) = %{version}-%{release} Provides: golang(%{import_path}/osutil/squashfs) = %{version}-%{release} Provides: golang(%{import_path}/osutil/strace) = %{version}-%{release} Provides: golang(%{import_path}/osutil/sys) = %{version}-%{release} Provides: golang(%{import_path}/osutil/udev/crawler) = %{version}-%{release} Provides: golang(%{import_path}/osutil/udev/netlink) = %{version}-%{release} Provides: golang(%{import_path}/overlord) = %{version}-%{release} Provides: golang(%{import_path}/overlord/assertstate) = %{version}-%{release} Provides: golang(%{import_path}/overlord/auth) = %{version}-%{release} Provides: golang(%{import_path}/overlord/cmdstate) = %{version}-%{release} Provides: golang(%{import_path}/overlord/configstate) = %{version}-%{release} Provides: golang(%{import_path}/overlord/configstate/config) = %{version}-%{release} Provides: golang(%{import_path}/overlord/configstate/configcore) = %{version}-%{release} Provides: golang(%{import_path}/overlord/configstate/proxyconf) = %{version}-%{release} Provides: golang(%{import_path}/overlord/configstate/settings) = %{version}-%{release} Provides: golang(%{import_path}/overlord/devicestate) = %{version}-%{release} Provides: golang(%{import_path}/overlord/devicestate/devicestatetest) = %{version}-%{release} Provides: golang(%{import_path}/overlord/hookstate) = %{version}-%{release} Provides: golang(%{import_path}/overlord/hookstate/ctlcmd) = %{version}-%{release} Provides: golang(%{import_path}/overlord/hookstate/hooktest) = %{version}-%{release} Provides: golang(%{import_path}/overlord/ifacestate) = %{version}-%{release} Provides: golang(%{import_path}/overlord/ifacestate/ifacerepo) = %{version}-%{release} Provides: golang(%{import_path}/overlord/ifacestate/udevmonitor) = %{version}-%{release} Provides: golang(%{import_path}/overlord/patch) = %{version}-%{release} Provides: golang(%{import_path}/overlord/servicestate) = %{version}-%{release} Provides: golang(%{import_path}/overlord/snapshotstate) = %{version}-%{release} Provides: golang(%{import_path}/overlord/snapshotstate/backend) = %{version}-%{release} Provides: golang(%{import_path}/overlord/snapstate) = %{version}-%{release} Provides: golang(%{import_path}/overlord/snapstate/backend) = %{version}-%{release} Provides: golang(%{import_path}/overlord/standby) = %{version}-%{release} Provides: golang(%{import_path}/overlord/state) = %{version}-%{release} Provides: golang(%{import_path}/overlord/storecontext) = %{version}-%{release} Provides: golang(%{import_path}/polkit) = %{version}-%{release} Provides: golang(%{import_path}/progress) = %{version}-%{release} Provides: golang(%{import_path}/progress/progresstest) = %{version}-%{release} Provides: golang(%{import_path}/release) = %{version}-%{release} Provides: golang(%{import_path}/sandbox/seccomp) = %{version}-%{release} Provides: golang(%{import_path}/sanity) = %{version}-%{release} Provides: golang(%{import_path}/selinux) = %{version}-%{release} Provides: golang(%{import_path}/snap) = %{version}-%{release} Provides: golang(%{import_path}/snap/naming) = %{version}-%{release} Provides: golang(%{import_path}/snap/pack) = %{version}-%{release} Provides: golang(%{import_path}/snap/snapdir) = %{version}-%{release} Provides: golang(%{import_path}/snap/snapenv) = %{version}-%{release} Provides: golang(%{import_path}/snap/snaptest) = %{version}-%{release} Provides: golang(%{import_path}/snap/squashfs) = %{version}-%{release} Provides: golang(%{import_path}/spdx) = %{version}-%{release} Provides: golang(%{import_path}/store) = %{version}-%{release} Provides: golang(%{import_path}/store/storetest) = %{version}-%{release} Provides: golang(%{import_path}/strutil) = %{version}-%{release} Provides: golang(%{import_path}/strutil/quantity) = %{version}-%{release} Provides: golang(%{import_path}/strutil/shlex) = %{version}-%{release} Provides: golang(%{import_path}/systemd) = %{version}-%{release} Provides: golang(%{import_path}/tests/lib/fakestore/refresh) = %{version}-%{release} Provides: golang(%{import_path}/tests/lib/fakestore/store) = %{version}-%{release} Provides: golang(%{import_path}/testutil) = %{version}-%{release} Provides: golang(%{import_path}/timeout) = %{version}-%{release} Provides: golang(%{import_path}/timeutil) = %{version}-%{release} Provides: golang(%{import_path}/timings) = %{version}-%{release} Provides: golang(%{import_path}/userd) = %{version}-%{release} Provides: golang(%{import_path}/userd/ui) = %{version}-%{release} Provides: golang(%{import_path}/wrappers) = %{version}-%{release} Provides: golang(%{import_path}/x11) = %{version}-%{release} Provides: golang(%{import_path}/xdgopenproxy) = %{version}-%{release} %description devel This package contains library source intended for building other packages which use import path with %{import_path} prefix. %endif %if 0%{?with_unit_test} && 0%{?with_devel} %package unit-test-devel Summary: Unit tests for %{name} package %if 0%{?with_check} #Here comes all BuildRequires: PACKAGE the unit tests #in %%check section need for running %endif # test subpackage tests code from devel subpackage Requires: %{name}-devel = %{version}-%{release} %description unit-test-devel This package contains unit tests for project providing packages with %{import_path} prefix. %endif %prep %if ! 0%{?with_bundled} %setup -q %else # Extract each tarball properly %setup -q -D -b 1 %endif # Apply patches %autopatch -p1 %build # Generate version files ./mkversion.sh "%{version}-%{release}" # We don't want/need squashfuse in the rpm, as it's available in Fedora and EPEL sed -e 's:_ "github.com/snapcore/squashfuse"::g' -i systemd/systemd.go # Build snapd mkdir -p src/github.com/snapcore ln -s ../../../ src/github.com/snapcore/snapd %if ! 0%{?with_bundled} export GOPATH=$(pwd):%{gopath} %else export GOPATH=$(pwd):$(pwd)/Godeps/_workspace:%{gopath} %endif GOFLAGS= %if 0%{?with_test_keys} GOFLAGS="$GOFLAGS -tags withtestkeys" %endif %if ! 0%{?with_bundled} # We don't need mvo5 fork for seccomp, as we have seccomp 2.3.x sed -e "s:github.com/mvo5/libseccomp-golang:github.com/seccomp/libseccomp-golang:g" -i cmd/snap-seccomp/*.go # We don't need the snapcore fork for bolt - it is just a fix on ppc sed -e "s:github.com/snapcore/bolt:github.com/boltdb/bolt:g" -i advisor/*.go errtracker/*.go %endif # We have to build snapd first to prevent the build from # building various things from the tree without additional # set tags. %gobuild -o bin/snapd $GOFLAGS %{import_path}/cmd/snapd %gobuild -o bin/snap $GOFLAGS %{import_path}/cmd/snap %gobuild -o bin/snap-failure $GOFLAGS %{import_path}/cmd/snap-failure # To ensure things work correctly with base snaps, # snap-exec, snap-update-ns, and snapctl need to be built statically %gobuild_static -o bin/snap-exec $GOFLAGS %{import_path}/cmd/snap-exec %gobuild_static -o bin/snap-update-ns $GOFLAGS %{import_path}/cmd/snap-update-ns %gobuild_static -o bin/snapctl $GOFLAGS %{import_path}/cmd/snapctl %if 0%{?rhel} # There's no static link library for libseccomp in RHEL/CentOS... sed -e "s/-Bstatic -lseccomp/-Bstatic/g" -i cmd/snap-seccomp/*.go %endif %gobuild -o bin/snap-seccomp $GOFLAGS %{import_path}/cmd/snap-seccomp # Build SELinux module pushd ./data/selinux make SHARE="%{_datadir}" TARGETS="snappy" popd # Build snap-confine pushd ./cmd autoreconf --force --install --verbose # FIXME: add --enable-caps-over-setuid as soon as possible (setuid discouraged!) %configure \ --disable-apparmor \ --enable-selinux \ --libexecdir=%{_libexecdir}/snapd/ \ --enable-nvidia-biarch \ %{?with_multilib:--with-32bit-libdir=%{_prefix}/lib} \ --with-snap-mount-dir=%{_sharedstatedir}/snapd/snap \ --enable-merged-usr %make_build popd # Build systemd units, dbus services, and env files pushd ./data make BINDIR="%{_bindir}" LIBEXECDIR="%{_libexecdir}" \ SYSTEMDSYSTEMUNITDIR="%{_unitdir}" \ SNAP_MOUNT_DIR="%{_sharedstatedir}/snapd/snap" \ SNAPD_ENVIRONMENT_FILE="%{_sysconfdir}/sysconfig/snapd" popd %install install -d -p %{buildroot}%{_bindir} install -d -p %{buildroot}%{_libexecdir}/snapd install -d -p %{buildroot}%{_mandir}/man8 install -d -p %{buildroot}%{_environmentdir} install -d -p %{buildroot}%{_systemdgeneratordir} install -d -p %{buildroot}%{_systemd_system_env_generator_dir} install -d -p %{buildroot}%{_unitdir} install -d -p %{buildroot}%{_sysconfdir}/profile.d install -d -p %{buildroot}%{_sysconfdir}/sysconfig install -d -p %{buildroot}%{_sharedstatedir}/snapd/assertions install -d -p %{buildroot}%{_sharedstatedir}/snapd/cookie install -d -p %{buildroot}%{_sharedstatedir}/snapd/desktop/applications install -d -p %{buildroot}%{_sharedstatedir}/snapd/device install -d -p %{buildroot}%{_sharedstatedir}/snapd/hostfs install -d -p %{buildroot}%{_sharedstatedir}/snapd/lib/gl install -d -p %{buildroot}%{_sharedstatedir}/snapd/lib/gl32 install -d -p %{buildroot}%{_sharedstatedir}/snapd/lib/glvnd install -d -p %{buildroot}%{_sharedstatedir}/snapd/lib/vulkan install -d -p %{buildroot}%{_sharedstatedir}/snapd/mount install -d -p %{buildroot}%{_sharedstatedir}/snapd/seccomp/bpf install -d -p %{buildroot}%{_sharedstatedir}/snapd/snaps install -d -p %{buildroot}%{_sharedstatedir}/snapd/snap/bin install -d -p %{buildroot}%{_localstatedir}/snap install -d -p %{buildroot}%{_localstatedir}/cache/snapd install -d -p %{buildroot}%{_datadir}/polkit-1/actions install -d -p %{buildroot}%{_datadir}/selinux/devel/include/contrib install -d -p %{buildroot}%{_datadir}/selinux/packages # Install snap and snapd install -p -m 0755 bin/snap %{buildroot}%{_bindir} install -p -m 0755 bin/snap-exec %{buildroot}%{_libexecdir}/snapd install -p -m 0755 bin/snap-failure %{buildroot}%{_libexecdir}/snapd install -p -m 0755 bin/snapd %{buildroot}%{_libexecdir}/snapd install -p -m 0755 bin/snap-update-ns %{buildroot}%{_libexecdir}/snapd install -p -m 0755 bin/snap-seccomp %{buildroot}%{_libexecdir}/snapd # Ensure /usr/bin/snapctl is a symlink to /usr/libexec/snapd/snapctl install -p -m 0755 bin/snapctl %{buildroot}%{_libexecdir}/snapd/snapctl ln -sf %{_libexecdir}/snapd/snapctl %{buildroot}%{_bindir}/snapctl # Install SELinux module install -p -m 0644 data/selinux/snappy.if %{buildroot}%{_datadir}/selinux/devel/include/contrib install -p -m 0644 data/selinux/snappy.pp.bz2 %{buildroot}%{_datadir}/selinux/packages # Install snap(8) man page bin/snap help --man > %{buildroot}%{_mandir}/man8/snap.8 # Install the "info" data file with snapd version install -m 644 -D data/info %{buildroot}%{_libexecdir}/snapd/info # Install bash completion for "snap" install -m 644 -D data/completion/snap %{buildroot}%{_datadir}/bash-completion/completions/snap install -m 644 -D data/completion/complete.sh %{buildroot}%{_libexecdir}/snapd install -m 644 -D data/completion/etelpmoc.sh %{buildroot}%{_libexecdir}/snapd # Install snap-confine pushd ./cmd %make_install # Undo the 0111 permissions, they are restored in the files section chmod 0755 %{buildroot}%{_sharedstatedir}/snapd/void # We don't use AppArmor rm -rfv %{buildroot}%{_sysconfdir}/apparmor.d # ubuntu-core-launcher is dead rm -fv %{buildroot}%{_bindir}/ubuntu-core-launcher popd # Install all systemd and dbus units, and env files pushd ./data %make_install BINDIR="%{_bindir}" LIBEXECDIR="%{_libexecdir}" \ SYSTEMDSYSTEMUNITDIR="%{_unitdir}" \ SNAP_MOUNT_DIR="%{_sharedstatedir}/snapd/snap" \ SNAPD_ENVIRONMENT_FILE="%{_sysconfdir}/sysconfig/snapd" popd %if 0%{?rhel} == 7 # Install kernel tweaks # See: https://access.redhat.com/articles/3128691 install -m 644 -D data/sysctl/rhel7-snap.conf %{buildroot}%{_sysctldir}/99-snap.conf %endif # Remove snappy core specific units rm -fv %{buildroot}%{_unitdir}/snapd.system-shutdown.service rm -fv %{buildroot}%{_unitdir}/snapd.snap-repair.* rm -fv %{buildroot}%{_unitdir}/snapd.core-fixup.* # Remove snappy core specific scripts rm %{buildroot}%{_libexecdir}/snapd/snapd.core-fixup.sh # Remove snapd apparmor service rm -f %{buildroot}%{_unitdir}/snapd.apparmor.service rm -f %{buildroot}%{_libexecdir}/snapd/snapd-apparmor # Install Polkit configuration install -m 644 -D data/polkit/io.snapcraft.snapd.policy %{buildroot}%{_datadir}/polkit-1/actions # Disable re-exec by default echo 'SNAP_REEXEC=0' > %{buildroot}%{_sysconfdir}/sysconfig/snapd # Create state.json and the README file to be ghosted touch %{buildroot}%{_sharedstatedir}/snapd/state.json touch %{buildroot}%{_sharedstatedir}/snapd/snap/README # source codes for building projects %if 0%{?with_devel} install -d -p %{buildroot}/%{gopath}/src/%{import_path}/ echo "%%dir %%{gopath}/src/%%{import_path}/." >> devel.file-list # find all *.go but no *_test.go files and generate devel.file-list for file in $(find . -iname "*.go" -o -iname "*.s" \! -iname "*_test.go") ; do echo "%%dir %%{gopath}/src/%%{import_path}/$(dirname $file)" >> devel.file-list install -d -p %{buildroot}/%{gopath}/src/%{import_path}/$(dirname $file) cp -pav $file %{buildroot}/%{gopath}/src/%{import_path}/$file echo "%%{gopath}/src/%%{import_path}/$file" >> devel.file-list done %endif # testing files for this project %if 0%{?with_unit_test} && 0%{?with_devel} install -d -p %{buildroot}/%{gopath}/src/%{import_path}/ # find all *_test.go files and generate unit-test.file-list for file in $(find . -iname "*_test.go"); do echo "%%dir %%{gopath}/src/%%{import_path}/$(dirname $file)" >> devel.file-list install -d -p %{buildroot}/%{gopath}/src/%{import_path}/$(dirname $file) cp -pav $file %{buildroot}/%{gopath}/src/%{import_path}/$file echo "%%{gopath}/src/%%{import_path}/$file" >> unit-test-devel.file-list done # Install additional testdata install -d %{buildroot}/%{gopath}/src/%{import_path}/cmd/snap/test-data/ cp -pav cmd/snap/test-data/* %{buildroot}/%{gopath}/src/%{import_path}/cmd/snap/test-data/ echo "%%{gopath}/src/%%{import_path}/cmd/snap/test-data" >> unit-test-devel.file-list %endif %if 0%{?with_devel} sort -u -o devel.file-list devel.file-list %endif %check # snapd tests %if 0%{?with_check} && 0%{?with_unit_test} && 0%{?with_devel} %if ! 0%{?with_bundled} export GOPATH=%{buildroot}/%{gopath}:%{gopath} %else export GOPATH=%{buildroot}/%{gopath}:$(pwd)/Godeps/_workspace:%{gopath} %endif %gotest %{import_path}/... %endif # snap-confine tests (these always run!) pushd ./cmd make check popd %files #define license tag if not already defined %{!?_licensedir:%global license %doc} %license COPYING %doc README.md docs/* %{_bindir}/snap %{_bindir}/snapctl %{_environmentdir}/990-snapd.conf %if 0%{?rhel} == 7 %{_sysctldir}/99-snap.conf %endif %dir %{_libexecdir}/snapd %{_libexecdir}/snapd/snapctl %{_libexecdir}/snapd/snapd %{_libexecdir}/snapd/snap-exec %{_libexecdir}/snapd/snap-failure %{_libexecdir}/snapd/info %{_libexecdir}/snapd/snap-mgmt %{_libexecdir}/snapd/snap-mgmt-selinux %{_mandir}/man8/snap.8* %{_datadir}/applications/snap-handle-link.desktop %{_datadir}/bash-completion/completions/snap %{_libexecdir}/snapd/complete.sh %{_libexecdir}/snapd/etelpmoc.sh %{_libexecdir}/snapd/snapd.run-from-snap %{_sysconfdir}/profile.d/snapd.sh %{_mandir}/man8/snapd-env-generator.8* %{_systemd_system_env_generator_dir}/snapd-env-generator %{_unitdir}/snapd.socket %{_unitdir}/snapd.service %{_unitdir}/snapd.autoimport.service %{_unitdir}/snapd.failure.service %{_unitdir}/snapd.seeded.service %{_datadir}/dbus-1/services/io.snapcraft.Launcher.service %{_datadir}/dbus-1/services/io.snapcraft.Settings.service %{_datadir}/polkit-1/actions/io.snapcraft.snapd.policy %{_sysconfdir}/xdg/autostart/snap-userd-autostart.desktop %config(noreplace) %{_sysconfdir}/sysconfig/snapd %dir %{_sharedstatedir}/snapd %dir %{_sharedstatedir}/snapd/assertions %dir %{_sharedstatedir}/snapd/cookie %dir %{_sharedstatedir}/snapd/desktop %dir %{_sharedstatedir}/snapd/desktop/applications %dir %{_sharedstatedir}/snapd/device %dir %{_sharedstatedir}/snapd/hostfs %dir %{_sharedstatedir}/snapd/lib %dir %{_sharedstatedir}/snapd/lib/gl %dir %{_sharedstatedir}/snapd/lib/gl32 %dir %{_sharedstatedir}/snapd/lib/glvnd %dir %{_sharedstatedir}/snapd/lib/vulkan %dir %{_sharedstatedir}/snapd/mount %dir %{_sharedstatedir}/snapd/seccomp %dir %{_sharedstatedir}/snapd/seccomp/bpf %dir %{_sharedstatedir}/snapd/snaps %dir %{_sharedstatedir}/snapd/snap %ghost %dir %{_sharedstatedir}/snapd/snap/bin %dir %{_localstatedir}/cache/snapd %dir %{_localstatedir}/snap %ghost %{_sharedstatedir}/snapd/state.json %ghost %{_sharedstatedir}/snapd/snap/README %files -n snap-confine %doc cmd/snap-confine/PORTING %license COPYING %dir %{_libexecdir}/snapd # For now, we can't use caps # FIXME: Switch to "%%attr(0755,root,root) %%caps(cap_sys_admin=pe)" asap! %attr(6755,root,root) %{_libexecdir}/snapd/snap-confine %{_libexecdir}/snapd/snap-device-helper %{_libexecdir}/snapd/snap-discard-ns %{_libexecdir}/snapd/snap-gdb-shim %{_libexecdir}/snapd/snap-seccomp %{_libexecdir}/snapd/snap-update-ns %{_libexecdir}/snapd/system-shutdown %{_mandir}/man8/snap-confine.8* %{_mandir}/man8/snap-discard-ns.8* %{_systemdgeneratordir}/snapd-generator %attr(0111,root,root) %{_sharedstatedir}/snapd/void %files selinux %license data/selinux/COPYING %doc data/selinux/README.md %{_datadir}/selinux/packages/snappy.pp.bz2 %{_datadir}/selinux/devel/include/contrib/snappy.if %if 0%{?with_devel} %files devel -f devel.file-list %license COPYING %doc README.md %dir %{gopath}/src/%{provider}.%{provider_tld}/%{project} %endif %if 0%{?with_unit_test} && 0%{?with_devel} %files unit-test-devel -f unit-test-devel.file-list %license COPYING %doc README.md %endif %post %if 0%{?rhel} == 7 %sysctl_apply 99-snap.conf %endif %systemd_post %{snappy_svcs} # If install, test if snapd socket and timer are enabled. # If enabled, then attempt to start them. This will silently fail # in chroots or other environments where services aren't expected # to be started. if [ $1 -eq 1 ] ; then if systemctl -q is-enabled snapd.socket > /dev/null 2>&1 ; then systemctl start snapd.socket > /dev/null 2>&1 || : fi fi %preun %systemd_preun %{snappy_svcs} # Remove all Snappy content if snapd is being fully uninstalled if [ $1 -eq 0 ]; then %{_libexecdir}/snapd/snap-mgmt --purge || : fi %postun %systemd_postun_with_restart %{snappy_svcs} %triggerun -- snapd < 2.39 # TODO: the trigger relies on a very specific snapd version that introduced SELinux # mount context, figure out how to update the trigger condition to run when needed # Trigger on uninstall, with one version of the package being pre 2.38 see # https://rpm-packaging-guide.github.io/#triggers-and-scriptlets for details # when triggers are run if [ "$1" -eq 2 -a "$2" -eq 1 ]; then # Upgrade from pre 2.38 version %{_libexecdir}/snapd/snap-mgmt-selinux --patch-selinux-mount-context=system_u:object_r:snappy_snap_t:s0 || : # snapd might have created fontconfig cache directory earlier, but with # incorrect context due to bugs in the policy, make sure it gets the right one # on upgrade when the new policy was introduced if [ -d "%{_localstatedir}/cache/fontconfig" ]; then restorecon -R %{_localstatedir}/cache/fontconfig || : fi elif [ "$1" -eq 1 -a "$2" -eq 2 ]; then # Downgrade to a pre 2.38 version %{_libexecdir}/snapd/snap-mgmt-selinux --remove-selinux-mount-context=system_u:object_r:snappy_snap_t:s0 || : fi %pre selinux %selinux_relabel_pre %post selinux %selinux_modules_install %{_datadir}/selinux/packages/snappy.pp.bz2 %selinux_relabel_post %posttrans selinux %selinux_relabel_post %postun selinux %selinux_modules_uninstall snappy if [ $1 -eq 0 ]; then %selinux_relabel_post fi %changelog * Tue Jun 04 2019 Neal Gompa - 2.39.1-1 - Release 2.39.1 to Fedora (RH#1715505) - Backport SELinux policy fixes for systemd unit mount namespacing (RH#1708991) * Wed May 29 2019 Michael Vogt - New upstream release 2.39.1 - spread: enable Fedora 30 - cmd/snap-confine, data/selinux: cherry pick Fedora 30 fixes - tests/unit/spread-shellcheck: temporary workaround for SC2251 - packaging: build empty package on powerpc - interfaces: special-case "snapd" in sanitizeSlotReservedForOS* helper - cmd/snap: mangle descriptions that have indent > terminal width - cmd/snap-confine: unshare per-user mount ns once - tests: avoid adding spaces to the base snaps names - systemd: workaround systemctl show quirks on older systemd versions * Mon May 06 2019 Neal Gompa - 2.39-1 - Release 2.39 to Fedora (RH#1699087) - Enable basic SELinux integration - Fix changelog entry to fix build for EPEL 7 - Exclude bash and POSIX sh shebangs from mangling (LP:1824158) - Drop some old pre Fedora 28 logic * Fri May 03 2019 Michael Vogt - New upstream release 2.39 - overlord/ifacestate: update static attributes of "content" interface - data/selinux: tweak the policy for runuser and s-c, interpret audit entries - snapshotstate: disable automatic snapshots on core for now - overlord/corecfg: make expiration of automatic snapshots configurable - snapstate: auto-install snapd when needed - interfaces: add support for the snapd snap in the dbus backend - overlord/snapstate: tweak autorefresh logic if network is not available - interfaces/apparmor: allow running /usr/bin/od - osutil,cmdutil: move CommandFromCore and make it use the snapd snap (if available) - daemon: also verify snap instructions for multi-snap requests - data/selinux: allow snap-confine to mount on top of bin - data/selinux: auto transition /var/snap to snappy_var_t - cmd: add `snap debug validate-seed ` cmd - interfaces/builtin/desktop: fonconfig v6/v7 cache handling on Fedora - interfaces/builtin/intel_mei: fix /dev/mei* AppArmor pattern - tests: make snap-connections test work on boards with snaps pre- installed - tests: check for /snap/core16/current in core16-provided-by-core - tests: run livepatch test on 18.04 as well - devicestate: deal correctly with the "required" flag on Remodel - snapstate,state: add TaskSet.AddAllWithEdges() and use in doUpdate - snapstate: add new NoReRefresh flag and use in Remodel() - many: allow core as a fallback for core16 - snapcraft: build static fontconfig in the snapd snap - cmd/snap-confine: remove unused sc_open_snap_{update,discard}_ns - data/selinux: allow snapd to execute runuser under snappy_t - spread, tests: do not leave mislabeled files in restorecon test, attempt to catch similar files - interfaces: cleanup internal tool lookup in system-key - many: move auth.AuthContext to store.DeviceAndAuthContext, the implemention to a separate storecontext packageThis: - overlord/devicestate: measurements around ensure and related tasks - cmd: tweak internal tool lookup to accept more possible locations - overlord/snapstate,snapshotstate: create snapshot on snap removal - tests: run smoke tests on (almost) pristine systems - tests: system disable ssh for config defaults in gadget - cmd/debug: integrate new task timings with "snap debug timings" - tests/upgrade/basic, packaging/fedoar: restore SELinux context of /var/cache/fontconfig, patch pre-2.39 mount units - image: simplify prefer local logic and fixes - tests/main/selinux-lxd: make sure LXD from snaps works cleanly with enforcing SELinux - tests: deny ioctl - TIOCSTI with garbage in high bits - overlord: factor out mocking of device service and gadget w. prepare-device for registration tests - data/selinux, tests/main/selinux-clean: fine tune the policy, make sure that no denials are raised - cmd/libsnap,osutil: fix parsing of mountinfo - ubuntu: disable -buildmode=pie on armhf to fix memory issue - overlord/snapstate: inhibit refresh for up to a week - cmd/snap-confine: prevent cwd restore permission bypass - overlord/ifacestate: introduce HotplugKey type use short key in change summaries - many: make Remodel() download everything first before installing - tests: fixes discovered debugging refresh-app-awareness - overlord/snapstate: track time of postponed refreshes - snap-confine: set rootfs_dir in sc_invocation struct - tests: run create-user on core devices - boot: add flag file "meta/force-kernel-extraction" - tests: add regression test for systemctl race fix - overlord/snapshotstate: helpers for snapshot expirations - overlord,tests: perform soft refresh check in doInstall - tests: enable tests that write /etc/{hostname,timezone} on core18 - overlord/ifacestate: implement String() method of HotplugDeviceInfo for better logs/messages - cmd/snap-confine: move ubuntu-core fallback checks - testutil: fix MockCmd for shellcheck 0.5 - snap, gadget: move gadget read/validation into separate package, tweak naming - tests: split travis spread execution in 2 jobs for ubuntu and non ubuntu systems - testutil: make mocked command work with shellcheck from snaps - packaging/fedora, tests/upgrade/basic: patch existing mount units with SELinux context on upgrade - metautil, snap: extract yaml value normalization to a helper package - tests: use apt via eatmydata - dirs,overlord/snapstate: add Soft and Hard refresh checks - cmd/snap-confine: allow using tools from snapd snap - cmd,interfaces: replace local helpers with cmd.InternalToolPath - tweak: fix "make hack" on Fedora - snap: add validation of gadget.yaml - cmd/snap-update-ns: refactor of profile application - cmd/snap,client,daemon,store: layout and sanity tweaks for find/search options - tests: add workaround for missing cache reset on older snapd - interfaces: deal with the snapd snap correctly for apparmor 2.13 - release-tools: add debian-package-builder - tests: enable opensuse 15 and add force-resolution installing packages - timings: AddTag helper - testutil: run mocked commands through shellcheck - overlord/snapshotstate: support auto flag - client, daemon, store: search by common-id - tests: all the systems for google backend with 6 workers - interfaces: hotplug nested vm test, updated serial-port interface for hotplug. - sanity: use proper SELinux context when mounting squashfs - cmd/libsnap: neuter variables in cleanup functions - interfaces/adb-support: account for hubs on sysfs path - interfaces/seccomp: regenerate changed profiles only - snap: reject layouts to /lib/{firmware,modules} - cmd/snap-confine, packaging: support SELinux - selinux, systemd: support mount contexts for snap images - interfaces/builtin/opengl: allow access to Tegra X1 - cmd/snap: make 'snap warnings' output yamlish - tests: add check to detect a broken snap on reset - interfaces: add one-plus devices to adb-support - cmd: prevent umask from breaking snap-run chain - tests/lib/pkgdb: allow downgrade when installing packages in openSUSE - cmd/snap-confine: use fixed private tmp directory - snap: tweak parsing errors of gadget updates - overlord/ifacemgr: basic measurements - spread: refresh metadata on openSUSE - cmd/snap-confine: pass sc_invocation instead of numerous args around - snap/gadget: introduce volume update info - partition,bootloader: rename 'partition' package to 'bootloader' - interfaces/builtin: add dev/pts/ptmx access to docker_support - tests: restore sbuild test - strutil: make SplitUnit public, allow negative numbers - overlord/snapstate,: retry less for auto-stuff - interfaces/builtin: add add exec "/" to docker-support - cmd/snap: fix regression of snap saved command - cmd/libsnap: rename C enum for feature flag - cmd: typedef mountinfo structures - tests/main/remodel: clean up before reverting the state - cmd/snap-confine: umount scratch dir using UMOUNT_NOFOLLOW - timings: add new helpers, Measurer interface and DurationThreshold - cmd/snap-seccomp: version-info subcommand - errortracker: fix panic in Report if db cannot be opened - sandbox/seccomp: a helper package wrapping calls to snap-seccomp - many: add /v2/model API, `snap remodel` CLI and spread test - tests: enable opensuse tumbleweed back - overlord/snapstate, store: set a header when auto-refreshing - data/selinux, tests: refactor SELinux policy, add minimal tests - spread: restore SELinux context when we mess with system files - daemon/api: filter connections with hotplug-gone=true - daemon: support returning assertion information as JSON with the "json" query parameter - cmd/snap: hide 'interfaces' command, show deprecation notice - timings: base API for recording timings in state - cmd/snap-confine: drop unused dependency on libseccomp - interfaces/apparmor: factor out test boilerplate - daemon: extract assertions api endpoint implementation into api_asserts.go - spread.yaml: bump delta reference - cmd/snap-confine: track per-app and per-hook processes - cmd/snap-confine: make sc_args helpers const-correct - daemon: move a function that was between an other struct and its methods - overlord/snapstate: fix restoring of "old-current" revision config in undoLinkSnap - cmd/snap, client, daemon, ifacestate: show a leading attribute of a connection - cmd/snap-confine: call sc_should_use_normal_mode once - cmd/snap-confine: populate enter_non_classic_execution_environment - daemon: allow downloading snaps blobs via .../file - cmd/snap-confine: introduce sc_invocation - devicestate: add initial Remodel support - snap: remove obsolete license-* fields in the yaml - cmd/libsnap: add cgroup-pids-support module - overlord/snapstate/backend: make LinkSnap clean up more - snapstate: only keep 2 snaps on classic - ctlcmd/tests: tests tweaks (followup to #6322) * Tue Apr 23 2019 Robert-André Mauchin - 2.38-3 - Rebuilt for fix in golang-github-seccomp-libseccomp-golang * Fri Apr 05 2019 Neal Gompa - 2.38-2 - Readd snapd-login-service Provides for gnome-software for F29 and older * Thu Mar 21 2019 Neal Gompa - 2.38-1 - Release 2.38 to Fedora (RH#1691296) - Switch to officially released main source tarball - Drop obsolete snapd-login-service Provides * Thu Mar 21 2019 Michael Vogt - New upstream release 2.38 - overlord/snapstate,: retry less for auto-stuff - cmd/snap: fix regression of snap saved command - interfaces/builtin: add dev/pts/ptmx access to docker_support - overlord/snapstate, store: set a header when auto-refreshing - interfaces/builtin: add add exec "/" to docker-support - cmd/snap, client, daemon, ifacestate: show a leading attribute of a connection - interface: avahi-observe: Fixing socket permissions on 4.15 kernels - tests: check that apt works before using it - apparmor: support AppArmor 2.13 - snapstate: restart into the snapd snap on classic - overlord/snapstate: during refresh, re-refresh on epoch bump - cmd, daemon: split out the common bits of mapLocal and mapRemote - cmd/snap-confine: chown private /tmp to root.root - cmd/snap-confine: drop uid from random /tmp name - overlord/hookstate: apply pending transaction changes onto temporary configuration for snapctl get - cmd/snap: `snap connections` command - interfaces/greengrass_support: update accesses for GGC 1.8 - cmd/snap, daemon: make the connectivity check use GET - interfaces/builtin,/udev: add spec support to disable udev + device cgroup and use it for greengrass - interfaces/intel-mei: small follow up tweaks - ifacestate/tests: fix/improve udev mon test - interfaces: add multipass-support interface - tests/main/high-user-handling: fix the test for Go 1.12 - interfaces: add new intel-mei interface - systemd: decrease the checker counter before unlocking otherwise we can get spurious panics - daemon/tests: fix race in the disconnect conflict test - cmd/snap-confine: allow moving tasks to pids cgroup - tests: enable opensuse tumbleweed on spread - cmd/snap: fix `snap services` completion - ifacestate/hotplug: integration with udev monitor - packaging: build snapctl as a static binary - packaging/opensuse: move most logic to snapd.mk - overlord: fix ensure before slowness on Retry - overlord/ifacestate: fix migration of connections on upgrade from ubuntu-core - daemon, client, cmd/snap: debug GETs ask aspects, not actions - tests/main/desktop-portal-*: fix handling of python dependencies - interfaces/wayland: allow wayland server snaps function on classic too - daemon, client, cmd/snap: snap debug base-declaration - tests: run tests on opensuse leap 15.0 instead of 42.3 - cmd/snap: fix error messages for snapshots commands if ID is not uint - interfaces/seccomp: increase filter precision - interfaces/network-manager: no peer label check for hostname1 - tests: add a tests for xdg-desktop-portal integration - tests: not checking 'tracking channel' after refresh core on nested execution - tests: remove snapweb from tests - snap, wrappers: support StartTimeout - wrappers: Add an X-SnapInstanceName field to desktop files - cmd/snap: produce better output for help on subcommands - tests/main/nfs-support: use archive mode for creating fstab backup - many: collect time each task runs and display it with `snap debug timings ` - tests: add attribution to helper script - daemon: make ucrednetGet not loop - squashfs: unset SOURCE_DATE_EPOCH in the TestBuildDate test - features,cmd/libsnap: add new feature "refresh-app-awareness" - overlord: fix random typos - interfaces/seccomp: generate global seccomp profile - daemon/api: fix error case for disconnect conflict - overlord/snapstate: add some randomness to the catalog refresh - tests: disable trusty-proposed for now - tests: fix upgrade-from-2.15 with kernel 4.15 - interfaces/apparmor: allow sending and receiving signals from ourselves - tests: split the test interfaces-many in 2 and remove snaps on restore - tests: use snap which takes 15 seconds to install on retryable- error test - packaging: avoid race in snapd.postinst - overlord/snapstate: discard mount namespace when undoing 1st link snap - cmd/snap-confine: allow writes to /var/lib/** - tests: stop catalog-update test for now - tests/main/auto-refresh-private: make sure to actually download with the expired macaroon - many: save media info when installing, show it when listing - userd: handle help urls which requires prepending XDG_DATA_DIRS - tests: fix NFS home mocking - tests: improve snaps-system-env test - tests: pre-cache core on core18 systems - interfaces/hotplug: renamed RequestedSlotSpec to ProposedSlot, removed Specification - debian: ensure leftover usr.lib.snapd.snap-confine is gone - image,cmd/snap,tests: introduce support for modern prepare-image --snap [=] - overlord/ifacestate: tweak logic for generating unique slot names - packaging: import debian salsa packaging work, add sbuild test and use in spead - overlord/ifacestate: hotplug-add-slot handler - image,cmd/snap: simplify --classic-arch to --arch, expose prepare-image - tests: run test snap as user in the smoke test - cmd/snap: tweak man output to have no doubled up .TP lines - cmd/snap, overlord/snapstate: silently ignore classic flag when a snap is strictly confined - snap-confine: remove special handling of /var/lib/jenkins - cmd/snap-confine: handle death of helper process - packaging: disable systemd environment generator on 18.04 - snap-confine: fix classic snaps for users with /var/lib/* homedirs - tests/prepare: prevent console-conf from running - image: bootstrapToRootDir => setupSeed - image,cmd/snap,tests: introduce prepare-image --classic - tests: update smoke/sandbox test for armhf - client, daemon: introduce helper for querying snapd API for the list of slot/plug connections - cmd/snap-confine: refactor and cleanup of seccomp loading - snapstate, snap: allow update/switch requests with risk only channel to DTRT - interfaces: add network-manager-observe interface - snap-confine: increase locking timeout to 30s - snap-confine: fix incorrect "sanity timeout 3s" message - snap-confine: provide proper error message on sc_sanity_timeout - snapd,state: improve error message on state reading failure - interfaces/apparmor: deny inet/inet6 in snap-update-ns profile - snap: fix reexec from the snapd snap for classic snaps - snap: fix hook autodiscovery for parallel installed snaps - overlord/snapstate: format the refresh time for the log - cmd/snap-confine: add special case for Jenkins - snapcraft.yaml: fix XBuildDeb PATH for go-1.10 - overlord/snapstate: validate instance names early - overlord/ifacestate: handler for hotplug-update-slot tasks - polkit: cast pid to uint32 to keep polkit happy for now - snap/naming: move various name validation helpers to separate package - tests: iterate getting journal logs to support delay on boards on daemon-notify test - cmd/snap: fix typo in cmd_wait.go - snap/channel: improve channel parsing - daemon, polkit: pid_t is signed - daemon: introduce /v2/connections snapd API endpoint - cmd/snap: small refactor of cmd_info's channel handling - overlord/snapstate: use an ad-hoc error when no results - cmd/snap: wrap "summary" better - tests: workaround missing go dependencies in debian-9 - daemon: try to tidy up the icon stuff a little - interfaces: add display-control interface - snapcraft.yaml: fix snap building in launchpad - tests: update fedora 29 workers to speed up the whole testing time - interfaces: add u2f-devices interface and allow reading udev +power_supply:* in hardware-observe - cmd/snap-update-ns: save errno from strtoul - tests: interfaces tests normalization - many: cleanup golang.org/x/net/context - tests: add spread test for system dbus interface - tests: remove -o pipefail - interfaces: add block-devices interface - spread: enable upgrade suite on fedora - tests/main/searching: video section got renamed to photo-and-video - interfaces/home: use dac_read_search instead of dac_override with 'read: all' - snap: really run the RunSuite - interfaces/camera: allow reading vendor/etc info from /run/udev/data/+usb:* - interfaces/dbus: be less strict about alternations for well-known names - interfaces/home: allow dac_override with 'read: all' - interfaces/pulseaudio: allow reading subdirectories of /etc/pulse - interfaces/system-observe: allow read on /proc/locks - run-checks: ensure we use go-1.10 if available - tests: get test-snapd-dbus-{provider,consumer} from the beta channel - interfaces/apparmor: mock presence of overlayfs root - spread: increase default kill-timeout to 30min - tests: simplify interfaces-contacts-service test - packaging/ubuntu: build with golang 1.10 - ifacestate/tests: extra test for hotplug-connect handler - packaging: make sure that /var/lib/snapd/lib/glvnd is accounted for - overlord/snapstate/backend: call fontconfig helpers from the new 'current' - kvm: load required kernel modules if necessary - cmd/snap: use a fake user for 'run' tests - tests: update systems for google sru backend - tests: fix install-snaps test by changing the snap info regex - interfaces: helpers for sorting plug/slot/connection refs - tests: moving core-snap-refresh-on-core test from main to nested suite - tests: fix daemon-notify test checking denials considering all the log lines - tests: skip lp-1802591 on "official" images - tests: fix listing tests to match "snap list --unicode=never" - debian: fix silly typo in the spread test invocation - interface: raw-usb: Adding ttyACM ttyACA permissions - tests: fix enable-disable-unit-gpio test on external boards - overlord/ifacestate: helper API to obtain the state of connections - tests: define new "tests/smoke" suite and use that for autopkgtests - cmd/snap-update-ns: explicitly check for return value from parse_arg_u - interfaces/builtin/opengl: allow access to NVIDIA VDPAU library - tests: auto-clean the test directory - cmd/snap: further tweak messaging; add a test - overlord/ifacestate: handler for hotplug-connect task - cmd/snap-confine: join freezer only after setting up user mount - cmd/snap-confine: don't preemptively create .mnt files - cmd/snap-update-ns: manually implement isspace - cmd/snap-update-ns: let the go parser know we are parsing -u - cmd/snap-discard-ns: fix name of user fstab files - snapshotstate: don't task.Log without the lock - tests: exclude some more slow tests from runs in autopkgtest - many: remove .user-fstab files from /run/snapd/ns - cmd/libsnap: pass --from-snap-confine when calling snap-update-ns as user - cmd/snap-update-ns: make freezer mockable - cmd/snap-update-ns: move XDG code to dedicated file - osutil: add helper for loading fstab from string - cmd/snap-update-ns: move existing code around, renaming some functions - overlord/configstate/configcore: support - and _ in cloud init field names - * cmd/snap-confine: use makedev instead of MKDEV - tests: review/fix the autopkgtest failures in disco - overlord: drop old v1 store api support from managers test - tests: new test for snapshots with more than 1 user * Thu Feb 28 2019 Neal Gompa - 2.37.4-2 - Fix accidentally corrupted changelog merge * Thu Feb 28 2019 Zygmunt Bazyli Krynicki - 2.37.4-1 - Release 2.37.4 to Fedora (RH#1683795) - Fix RPM macro in changelog (rpmlint) - Fix non-break space in changelog (rpmlint) * Wed Feb 27 2019 Michael Vogt - New upstream release 2.37.4 - squashfs: unset SOURCE_DATE_EPOCH in the TestBuildDate test - overlord/ifacestate: fix migration of connections on upgrade from ubuntu-core - tests: fix upgrade-from-2.15 with kernel 4.15 - interfaces/seccomp: increase filter precision - tests: remove snapweb from tests * Tue Feb 19 2019 Zygmunt Bazyli Krynicki - 2.37.3-1 - Release 2.37.3 to Fedora (RH#1678603) * Mon Feb 18 2019 Michael Vogt - New upstream release 2.37.3 - interfaces/seccomp: generate global seccomp profile - overlord/snapstate: add some randomness to the catalog refresh - tests: add upgrade test from 2.15.2ubuntu1 -> current snapd - snap-confine: fix fallback to ubuntu-core - packaging: avoid race in snapd.postinst - overlord/snapstate: discard mount namespace when undoing 1st link snap - cmd/snap-confine: allow writes to /var/lib/** again - tests: stop catalog-update/apt-hooks test until the catlog refresh is randomized - debian: ensure leftover usr.lib.snapd.snap-confine is gone * Wed Feb 06 2019 Neal Gompa - 2.37.2-1 - Release 2.37.2 to Fedora (RH#1667460) * Wed Feb 06 2019 Michael Vogt - New upstream release 2.37.2 - cmd/snap, overlord/snapstate: silently ignore classic flag when a snap is strictly confined - snap-confine: remove special handling of /var/lib/jenkins - cmd/snap-confine: handle death of helper process gracefully - snap-confine: fix classic snaps for users with /var/lib/* homedirs like jenkins/postgres - packaging: disable systemd environment generator on 18.04 - tests: update smoke/sandbox test for armhf - cmd/snap-confine: refactor and cleanup of seccomp loading - snap-confine: increase locking timeout to 30s - snap-confine: fix incorrect "sanity timeout 3s" message - snap: fix hook autodiscovery for parallel installed snaps - tests: iterate getting journal logs to support delay on boards on daemon-notify test - interfaces/apparmor: deny inet/inet6 in snap-update-ns profile - interfaces: add u2f-devices interface * Sun Feb 03 2019 Fedora Release Engineering - 2.36.3-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild * Tue Jan 29 2019 Michael Vogt - New upstream release 2.37.1 - cmd/snap-confine: add special case for Jenkins - tests: workaround missing go dependencies in debian-9 - daemon, polkit: pid_t is signed - interfaces: add display-control interface - interfaces: add block-devices interface - tests/main/searching: video section got renamed to photo-and-video - interfaces/camera: allow reading vendor/etc info from /run/udev/data/+usb - interfaces/dbus: be less strict about alternations for well-known names - interfaces/home: allow dac_read_search with 'read: all' - interfaces/pulseaudio: allow reading subdirectories of /etc/pulse - interfaces/system-observe: allow read on /proc/locks - tests: get test-snapd-dbus-{provider,consumer} from the beta channel - interfaces/apparmor: mock presence of overlayfs root - packaging/{fedora,opensuse,ubuntu}: add /var/lib/snapd/lib/glvnd * Wed Jan 16 2019 Michael Vogt - New upstream release 2.37 - snapd: fix race in TestSanityFailGoesIntoDegradedMode test - cmd: fix snap-device-helper to deal correctly with hooks - tests: various fixes for external backend - interface: raw-usb: Adding ttyACM[0-9]* as many serial devices have device node /dev/ttyACM[0-9] - tests: fix enable-disable-unit-gpio test on external boards - tests: define new "tests/smoke" suite and use that for autopkgtests - interfaces/builtin/opengl: allow access to NVIDIA VDPAU library - snapshotstate: don't task.Log without the lock - overlord/configstate/configcore: support - and _ in cloud init field names - cmd/snap-confine: use makedev instead of MKDEV - tests: review/fix the autopkgtest failures in disco - systemd: allow only a single daemon-reload at the same time - cmd/snap: only auto-enable unicode to a tty - cmd/snap: right-align revision and size in info's channel map - dirs, interfaces/builtin/desktop: system fontconfig cache path is different on Fedora - tests: fix "No space left on device" issue on amazon-linux - store: undo workaround for timezone-less released-at - store, snap, cmd/snap: channels have released-at - snap-confine: fix incorrect use "src" var in mount-support.c - release: support probing SELinux state - release-tools: display self-help - interface: add new `{personal,system}-files` interface - snap: give Epoch an Equal method - many: remove unused interface code - interfaces/many: use 'unsafe' with docker-support change_profile rules - run-checks: stop running HEAD of staticcheck - release: use sync.Once around lazy intialized state - overlord/ifacestate: include interface name in the hotplug- disconnect task summary - spread: show free space in debug output - cmd/snap: attempt to restore SELinux context of snap user directories - image: do not write empty etc/cloud - tests: skip snapd snap on reset for core systems - cmd/snap-discard-ns: fix umount(2) typo - overlord/ifacestate: hotplug-remove-slot task handler - overlord/ifacestate: handler for hotplug-disconnect task - ifacestate/hotplug: updateDevice helper - tests: reset snapd state on tests restore - interfaces: return security setup errors - overlord: make InstallMany work like UpdateMany, issuing a single request to get candidates - systemd/systemd.go: add missing tests for systemd.IsActive - overlord/ifacestate: addHotplugSeqWaitTask helper - cmd/snap-confine: refactor call to snap-update-ns --user-mounts - tests: new backend used to run upgrade test suite - travis: short circuit failures in static and unit tests travis job - cmd: automatically fix localized