diff --git a/0001-cmd-snap-confine-hardcode-constants-from-xfs-xqm.h-f.patch b/0001-cmd-snap-confine-hardcode-constants-from-xfs-xqm.h-f.patch new file mode 100644 index 0000000..445b797 --- /dev/null +++ b/0001-cmd-snap-confine-hardcode-constants-from-xfs-xqm.h-f.patch @@ -0,0 +1,34 @@ +From ebc1b5c3a1adc6d7e5287fa76811968e7faa7621 Mon Sep 17 00:00:00 2001 +From: Simon Fels +Date: Thu, 30 Mar 2017 17:39:44 +0200 +Subject: [PATCH] cmd/snap-confine: hardcode constants from xfs/xqm.h for now + +--- + cmd/snap-confine/seccomp-support.c | 11 +++++++++++ + 1 file changed, 11 insertions(+) + +diff --git a/cmd/snap-confine/seccomp-support.c b/cmd/snap-confine/seccomp-support.c +index a08b23a..18e0459 100644 +--- a/cmd/snap-confine/seccomp-support.c ++++ b/cmd/snap-confine/seccomp-support.c +@@ -34,7 +34,18 @@ + #include + #include + #include ++#if 0 + #include ++#else ++#define XQM_CMD(x) (('X'<<8)+(x)) /* note: forms first QCMD argument */ ++#define Q_XQUOTAON XQM_CMD(1) /* enable accounting/enforcement */ ++#define Q_XQUOTAOFF XQM_CMD(2) /* disable accounting/enforcement */ ++#define Q_XGETQUOTA XQM_CMD(3) /* get disk limits and usage */ ++#define Q_XSETQLIM XQM_CMD(4) /* set disk limits */ ++#define Q_XGETQSTAT XQM_CMD(5) /* get quota subsystem status */ ++#define Q_XQUOTARM XQM_CMD(6) /* free disk space used by dquots */ ++#define Q_XQUOTASYNC XQM_CMD(7) /* delalloc flush, updates dquots */ ++#endif + #include + + #include +-- +2.7.4 \ No newline at end of file diff --git a/snapd.spec b/snapd.spec index efe898a..bd0110c 100644 --- a/snapd.spec +++ b/snapd.spec @@ -11,6 +11,9 @@ %global with_check 0 %global with_unit_test 0 +# For the moment, we don't support all golang arches... +%global with_goarches 0 + %if ! %{with vendorized} %global with_bundled 0 %else @@ -64,17 +67,26 @@ Patch0008: 0008-partition-skip-some-tests-if-grub-editenv-is-not-ava.patch Patch0009: 0001-data-selinux-Add-context-definition-for-snapctl.patch # Upstream merged: https://github.com/snapcore/snapd/pull/3094 Patch0010: 0001-cmd-rework-header-check-for-xfs-xqm.patch +# No upstream status yet +Patch0011: 0001-cmd-snap-confine-hardcode-constants-from-xfs-xqm.h-f.patch # Upstream proposed PR: https://github.com/snapcore/snapd/pull/3084 Patch1001: PR3084-packaging-use-templates-for-systemd-units.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} # BuildRequires: systemd-units BuildRequires: systemd %{?systemd_requires} + Requires: snap-confine%{?_isa} = %{version}-%{release} Requires: squashfs-tools # we need squashfs.ko loaded @@ -553,6 +565,7 @@ fi - Rediff patches - Re-enable seccomp - Fix building snap-confine on 32-bit arches +- Set ExclusiveArch based on upstream supported arch list * Wed Mar 29 2017 Neal Gompa - 2.23.5-1 - Rebase to snapd 2.23.5