Request 490989 (accepted)
Update to 2.24 release and fix rpmlint warnings
Submit package home:mrmorph:branches:system:snappy / snapd to package system:snappy / snapd
| [-] [+] | Changed | snapd.changes |
| [-] [+] | Changed | snapd.spec ^ |
| [-] [+] | Deleted | 0001-cmd-link-libcap-dynamically.patch ^ |
| @@ -1,99 +0,0 @@ -From 4a40ac059c1bf0d73a70a1679fd0315dab1da402 Mon Sep 17 00:00:00 2001 -From: Zygmunt Krynicki <me@zygoon.pl> -Date: Mon, 6 Mar 2017 19:59:20 +0100 -Subject: [PATCH 1/8] cmd: link libcap dynamically - -This patch undoes an earlier hack that linked to libcap statically. This -is no longer required as the core snap ships libcap. - -Signed-off-by: Zygmunt Krynicki <me@zygoon.pl> ---- - cmd/Makefile.am | 44 +++++--------------------------------------- - 1 file changed, 5 insertions(+), 39 deletions(-) - -diff --git a/cmd/Makefile.am b/cmd/Makefile.am -index ec240d5..4352451 100644 ---- a/cmd/Makefile.am -+++ b/cmd/Makefile.am -@@ -107,17 +107,7 @@ libsnap_confine_private_unit_tests_SOURCES = \ - libsnap_confine_private_unit_tests_CFLAGS = $(GLIB_CFLAGS) - libsnap_confine_private_unit_tests_LDADD = $(GLIB_LIBS) - libsnap_confine_private_unit_tests_CFLAGS += -D_ENABLE_FAULT_INJECTION -- --# XXX: This injects a dependency on libcap in a way that makes automake happy --# and allows us to link libcap statically. We need to link in libcap statically --# as at this time adding runtime dependencies to snap-confine is tricky. -- --libsnap-confine-private/unit-tests$(EXEEXT): $(libsnap_confine_private_unit_tests_OBJECTS) $(libsnap_confine_private_unit_tests_DEPENDENCIES) $(EXTRA_libsnap_confine_private_unit_tests_DEPENDENCIES) libsnap-confine-private/$(am__dirstamp) -- @rm -f libsnap-confine-private/unit-tests$(EXEEXT) -- $(AM_V_CCLD)$(libsnap_confine_private_unit_tests_LINK) $(libsnap_confine_private_unit_tests_OBJECTS) $(libsnap_confine_private_unit_tests_LDADD) $(LIBS) -- --libsnap-confine-private/unit-tests$(EXEEXT): LIBS += -Wl,-Bstatic -lcap -Wl,-Bdynamic -- -+libsnap_confine_private_unit_tests_LDADD += -lcap - endif - - ## -@@ -129,15 +119,7 @@ noinst_PROGRAMS += decode-mount-opts/decode-mount-opts - decode_mount_opts_decode_mount_opts_SOURCES = \ - decode-mount-opts/decode-mount-opts.c - decode_mount_opts_decode_mount_opts_LDADD = libsnap-confine-private.a --# XXX: this makes automake generate decode_mount_opts_decode_mount_opts_LINK --decode_mount_opts_decode_mount_opts_CFLAGS = -D_fake -- --decode-mount-opts/decode-mount-opts$(EXEEXT): $(decode_mount_opts_decode_mount_opts_OBJECTS) $(decode_mount_opts_decode_mount_opts_DEPENDENCIES) $(EXTRA_decode_mount_opts_decode_mount_opts_DEPENDENCIES) libsnap-confine-private/$(am__dirstamp) -- @rm -f decode-mount-opts/decode-mount-opts$(EXEEXT) -- $(AM_V_CCLD)$(decode_mount_opts_decode_mount_opts_LINK) $(decode_mount_opts_decode_mount_opts_OBJECTS) $(decode_mount_opts_decode_mount_opts_LDADD) $(LIBS) -- --decode-mount-opts/decode-mount-opts$(EXEEXT): LIBS += -Wl,-Bstatic -lcap -Wl,-Bdynamic -- -+decode_mount_opts_decode_mount_opts_LDADD += -lcap - ## - ## snap-confine - ## -@@ -205,12 +187,7 @@ snap_confine_snap_confine_LDFLAGS = $(AM_LDFLAGS) - snap_confine_snap_confine_LDADD = libsnap-confine-private.a - snap_confine_snap_confine_CFLAGS += $(LIBUDEV_CFLAGS) - snap_confine_snap_confine_LDADD += $(LIBUDEV_LIBS) -- --snap-confine/snap-confine$(EXEEXT): $(snap_confine_snap_confine_OBJECTS) $(snap_confine_snap_confine_DEPENDENCIES) $(EXTRA_snap_confine_snap_confine_DEPENDENCIES) libsnap-confine-private/$(am__dirstamp) -- @rm -f snap-confine/snap-confine$(EXEEXT) -- $(AM_V_CCLD)$(snap_confine_snap_confine_LINK) $(snap_confine_snap_confine_OBJECTS) $(snap_confine_snap_confine_LDADD) $(LIBS) -- --snap-confine/snap-confine$(EXEEXT): LIBS += -Wl,-Bstatic -lcap -Wl,-Bdynamic -+snap_confine_snap_confine_LDADD += -lcap - - # This is here to help fix rpmlint hardening issue. - # https://en.opensuse.org/openSUSE:Packaging_checks#non-position-independent-executable -@@ -238,12 +215,7 @@ snap_confine_snap_confine_debug_CFLAGS = $(snap_confine_snap_confine_CFLAGS) - snap_confine_snap_confine_debug_LDFLAGS = $(snap_confine_snap_confine_LDFLAGS) - snap_confine_snap_confine_debug_LDADD = $(snap_confine_snap_confine_LDADD) - snap_confine_snap_confine_debug_CFLAGS += -DSNAP_CONFINE_DEBUG_BUILD=1 -- --snap-confine/snap-confine-debug$(EXEEXT): $(snap_confine_snap_confine_debug_OBJECTS) $(snap_confine_snap_confine_debug_DEPENDENCIES) $(EXTRA_snap_confine_snap_confine_debug_DEPENDENCIES) libsnap-confine-private/$(am__dirstamp) -- @rm -f snap-confine/snap-confine-debug$(EXEEXT) -- $(AM_V_CCLD)$(snap_confine_snap_confine_debug_LINK) $(snap_confine_snap_confine_debug_OBJECTS) $(snap_confine_snap_confine_debug_LDADD) $(LIBS) -- --snap-confine/snap-confine-debug$(EXEEXT): LIBS += -Wl,-Bstatic -lcap -Wl,-Bdynamic -+snap_confine_snap_confine_debug_LDADD += -lcap - - if WITH_UNIT_TESTS - noinst_PROGRAMS += snap-confine/snap-confine-unit-tests -@@ -261,13 +233,7 @@ snap_confine_snap_confine_unit_tests_SOURCES = \ - snap_confine_snap_confine_unit_tests_CFLAGS = $(snap_confine_snap_confine_CFLAGS) $(GLIB_CFLAGS) - snap_confine_snap_confine_unit_tests_LDADD = $(snap_confine_snap_confine_LDADD) $(GLIB_LIBS) - snap_confine_snap_confine_unit_tests_LDFLAGS = $(snap_confine_snap_confine_LDFLAGS) -- -- --snap-confine/snap-confine-unit-tests$(EXEEXT): $(snap_confine_snap_confine_unit_tests_OBJECTS) $(snap_confine_snap_confine_unit_tests_DEPENDENCIES) $(EXTRA_snap_confine_snap_confine_unit_tests_DEPENDENCIES) libsnap-confine-private/$(am__dirstamp) -- @rm -f snap-confine/snap-confine-unit-tests$(EXEEXT) -- $(AM_V_CCLD)$(snap_confine_snap_confine_unit_tests_LINK) $(snap_confine_snap_confine_unit_tests_OBJECTS) $(snap_confine_snap_confine_unit_tests_LDADD) $(LIBS) -- --snap-confine/snap-confine-unit-tests$(EXEEXT): LIBS += -Wl,-Bstatic -lcap -Wl,-Bdynamic -+snap_confine_snap_confine_unit_tests_LDADD += -lcap - - endif - --- -2.10.2 - | ||
| [-] [+] | Added | 0001-cmd-use-libtool-for-the-internal-library.patch ^ |
| @@ -0,0 +1,94 @@ +From 687b6de661e00db74e562ab575bfd1319f750816 Mon Sep 17 00:00:00 2001 +From: Zygmunt Krynicki <me@zygoon.pl> +Date: Mon, 6 Mar 2017 20:26:26 +0100 +Subject: [PATCH] cmd: use libtool for the internal library + +This just cuts some hassle integration with how the helper library is +built. I could never get to pass the right -fPIC/-fpie combination +otherwise. + +Signed-off-by: Zygmunt Krynicki <me@zygoon.pl> +--- + cmd/Makefile.am | 16 ++++++++-------- + cmd/configure.ac | 3 ++- + 2 files changed, 10 insertions(+), 9 deletions(-) + +diff --git a/cmd/Makefile.am b/cmd/Makefile.am +index 695b07e..767bf35 100644 +--- a/cmd/Makefile.am ++++ b/cmd/Makefile.am +@@ -58,12 +58,12 @@ hack: snap-confine/snap-confine snap-confine/snap-confine.apparmor + sudo apparmor_parser -r snap-confine/snap-confine.apparmor + + ## +-## libsnap-confine-private.a ++## libsnap-confine-private.la + ## + +-noinst_LIBRARIES += libsnap-confine-private.a ++noinst_LTLIBRARIES = libsnap-confine-private.la + +-libsnap_confine_private_a_SOURCES = \ ++libsnap_confine_private_la_SOURCES = \ + libsnap-confine-private/classic.c \ + libsnap-confine-private/classic.h \ + libsnap-confine-private/cleanup-funcs.c \ +@@ -131,7 +131,7 @@ noinst_PROGRAMS += decode-mount-opts/decode-mount-opts + + decode_mount_opts_decode_mount_opts_SOURCES = \ + decode-mount-opts/decode-mount-opts.c +-decode_mount_opts_decode_mount_opts_LDADD = libsnap-confine-private.a ++decode_mount_opts_decode_mount_opts_LDADD = libsnap-confine-private.la + decode_mount_opts_decode_mount_opts_STATIC = + + if STATIC_LIBCAP +@@ -214,7 +214,7 @@ snap_confine_snap_confine_SOURCES = \ + + snap_confine_snap_confine_CFLAGS = -Wall -Werror $(AM_CFLAGS) + snap_confine_snap_confine_LDFLAGS = $(AM_LDFLAGS) +-snap_confine_snap_confine_LDADD = libsnap-confine-private.a ++snap_confine_snap_confine_LDADD = libsnap-confine-private.la + snap_confine_snap_confine_CFLAGS += $(LIBUDEV_CFLAGS) + snap_confine_snap_confine_LDADD += $(LIBUDEV_LIBS) + # _STATIC is where we collect statically linked in libraries +@@ -379,7 +379,7 @@ snap_discard_ns_snap_discard_ns_SOURCES = \ + snap-discard-ns/snap-discard-ns.c + snap_discard_ns_snap_discard_ns_CFLAGS = -Wall -Werror $(AM_CFLAGS) + snap_discard_ns_snap_discard_ns_LDFLAGS = $(AM_LDFLAGS) +-snap_discard_ns_snap_discard_ns_LDADD = libsnap-confine-private.a ++snap_discard_ns_snap_discard_ns_LDADD = libsnap-confine-private.la + snap_discard_ns_snap_discard_ns_STATIC = + + if APPARMOR +@@ -418,7 +418,7 @@ system_shutdown_system_shutdown_SOURCES = \ + system-shutdown/system-shutdown-utils.c \ + system-shutdown/system-shutdown-utils.h \ + system-shutdown/system-shutdown.c +-system_shutdown_system_shutdown_LDADD = libsnap-confine-private.a ++system_shutdown_system_shutdown_LDADD = libsnap-confine-private.la + system_shutdown_system_shutdown_CFLAGS = $(filter-out -fPIE -pie,$(CFLAGS)) -static + system_shutdown_system_shutdown_LDFLAGS = $(filter-out -fPIE -pie,$(LDFLAGS)) -static + +@@ -428,7 +428,7 @@ system_shutdown_unit_tests_SOURCES = \ + libsnap-confine-private/unit-tests-main.c \ + libsnap-confine-private/unit-tests.c \ + system-shutdown/system-shutdown-utils-test.c +-system_shutdown_unit_tests_LDADD = libsnap-confine-private.a ++system_shutdown_unit_tests_LDADD = libsnap-confine-private.la + system_shutdown_unit_tests_CFLAGS = $(GLIB_CFLAGS) + system_shutdown_unit_tests_LDADD += $(GLIB_LIBS) + endif +diff --git a/cmd/configure.ac b/cmd/configure.ac +index 39a6800..2ebf827 100644 +--- a/cmd/configure.ac ++++ b/cmd/configure.ac +@@ -11,7 +11,8 @@ AC_PROG_CC_C99 + AC_PROG_CPP + AC_PROG_INSTALL + AC_PROG_MAKE_SET +-AC_PROG_RANLIB ++AC_PROG_LIBTOOL ++AC_CONFIG_MACRO_DIR([m4]) + + AC_LANG([C]) + # Checks for libraries. | ||
| [-] [+] | Added | 0002-cmd-disable-c-style-checks-as-intent-works-different.patch ^ |
| @@ -0,0 +1,25 @@ +From 3a61ee2720c158608f68ce218c0d6af728869043 Mon Sep 17 00:00:00 2001 +From: Simon Fels <simon.fels@canonical.com> +Date: Thu, 13 Apr 2017 12:02:14 +0200 +Subject: [PATCH] cmd: disable c style checks as intent works different on suse + +--- + cmd/Makefile.am | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/cmd/Makefile.am b/cmd/Makefile.am +index 767bf35..b5a2d56 100644 +--- a/cmd/Makefile.am ++++ b/cmd/Makefile.am +@@ -11,7 +11,7 @@ subdirs = snap-confine snap-discard-ns system-shutdown libsnap-confine-private + + # Run check-syntax when checking + # TODO: conver those to autotools-style tests later +-check: check-syntax-c check-syntax-sh check-unit-tests ++check: check-syntax-sh check-unit-tests + + # Force particular coding style on all source and header files. + .PHONY: check-syntax-c +-- +2.10.2 + | ||
| [-] [+] | Deleted | 0002-cmd-remove-unused-variable.patch ^ |
| @@ -1,25 +0,0 @@ -From 3f864722e334670c1c220380a25491433c70c6f3 Mon Sep 17 00:00:00 2001 -From: Zygmunt Krynicki <me@zygoon.pl> -Date: Mon, 6 Mar 2017 20:00:09 +0100 -Subject: [PATCH 2/8] cmd: remove unused variable - -Signed-off-by: Zygmunt Krynicki <me@zygoon.pl> ---- - cmd/libsnap-confine-private/mountinfo.c | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/cmd/libsnap-confine-private/mountinfo.c b/cmd/libsnap-confine-private/mountinfo.c -index 9668dd7..2c8311d 100644 ---- a/cmd/libsnap-confine-private/mountinfo.c -+++ b/cmd/libsnap-confine-private/mountinfo.c -@@ -284,7 +284,6 @@ static struct sc_mountinfo_entry *sc_parse_mountinfo_entry(const char *line) - entry->optional_fields = &entry->line_buf[0] + offset; - // NOTE: This ensures that optional_fields is never NULL. If this changes, - // must adjust all callers of parse_mountinfo_entry() accordingly. -- char *to = entry->optional_fields; - for (int field_num = 0;; ++field_num) { - char *opt_field = parse_next_string_field(); - if (opt_field == NULL) --- -2.10.2 - | ||
| [-] [+] | Deleted | 0003-cmd-add-directive-for-shellcheck-and-follow-source.patch ^ |
| @@ -1,355 +0,0 @@ -From 969b40b8a385f1ec3f142bc09a29718c3d7dd73c Mon Sep 17 00:00:00 2001 -From: Zygmunt Krynicki <me@zygoon.pl> -Date: Mon, 6 Mar 2017 20:02:02 +0100 -Subject: [PATCH 3/8] cmd: add directive for shellcheck and follow source: - -shellcheck 0.4.4 needs a directive to find the common.sh script that is -sourced by all the seccomp unit tests. We also need to use the '-x' -command line option to have shellcheck follow such declarations. - -Signed-off-by: Zygmunt Krynicki <me@zygoon.pl> ---- - cmd/Makefile.am | 2 +- - cmd/snap-confine/tests/test_bad_seccomp_filter_args | 1 + - cmd/snap-confine/tests/test_bad_seccomp_filter_args_clone | 1 + - cmd/snap-confine/tests/test_bad_seccomp_filter_args_null | 1 + - cmd/snap-confine/tests/test_bad_seccomp_filter_args_prctl | 1 + - cmd/snap-confine/tests/test_bad_seccomp_filter_args_prio | 1 + - cmd/snap-confine/tests/test_bad_seccomp_filter_args_quotactl | 1 + - cmd/snap-confine/tests/test_bad_seccomp_filter_args_socket | 1 + - cmd/snap-confine/tests/test_bad_seccomp_filter_args_termios | 1 + - cmd/snap-confine/tests/test_bad_seccomp_filter_length | 1 + - cmd/snap-confine/tests/test_bad_seccomp_filter_missing_trailing_newline | 1 + - cmd/snap-confine/tests/test_complain | 1 + - cmd/snap-confine/tests/test_complain_missed | 1 + - cmd/snap-confine/tests/test_noprofile | 1 + - cmd/snap-confine/tests/test_restrictions | 1 + - cmd/snap-confine/tests/test_restrictions_working | 1 + - cmd/snap-confine/tests/test_restrictions_working_args | 1 + - cmd/snap-confine/tests/test_restrictions_working_args_clone | 1 + - cmd/snap-confine/tests/test_restrictions_working_args_prctl | 1 + - cmd/snap-confine/tests/test_restrictions_working_args_prio | 1 + - cmd/snap-confine/tests/test_restrictions_working_args_quotactl | 1 + - cmd/snap-confine/tests/test_restrictions_working_args_socket | 1 + - cmd/snap-confine/tests/test_restrictions_working_args_termios | 1 + - cmd/snap-confine/tests/test_unrestricted | 1 + - cmd/snap-confine/tests/test_unrestricted_missed | 1 + - cmd/snap-confine/tests/test_whitelist | 1 + - 26 files changed, 26 insertions(+), 1 deletion(-) - -diff --git a/cmd/Makefile.am b/cmd/Makefile.am -index 4352451..574886c 100644 ---- a/cmd/Makefile.am -+++ b/cmd/Makefile.am -@@ -28,7 +28,7 @@ check-syntax-c: - .PHONY: check-syntax-sh - check-syntax-sh: $(filter-out %.log %.trs,$(wildcard $(srcdir)/snap-confine/tests/test_*)) snap-confine/tests/common.sh - if HAVE_SHELLCHECK -- $(HAVE_SHELLCHECK) --format=gcc $^ -+ $(HAVE_SHELLCHECK) -x --format=gcc $^ - else - echo "shellcheck is not installed, skipping (non-critical) syntax test" - endif -diff --git a/cmd/snap-confine/tests/test_bad_seccomp_filter_args b/cmd/snap-confine/tests/test_bad_seccomp_filter_args -index 900dcb7..f3f4104 100755 ---- a/cmd/snap-confine/tests/test_bad_seccomp_filter_args -+++ b/cmd/snap-confine/tests/test_bad_seccomp_filter_args -@@ -2,6 +2,7 @@ - - set -e - -+# shellcheck source=snap-confine/tests/common.sh - . "${srcdir:-.}/snap-confine/tests/common.sh" - - get_common_syscalls >"$TMP"/tmpl -diff --git a/cmd/snap-confine/tests/test_bad_seccomp_filter_args_clone b/cmd/snap-confine/tests/test_bad_seccomp_filter_args_clone -index 7ac29ec..0eae33f 100755 ---- a/cmd/snap-confine/tests/test_bad_seccomp_filter_args_clone -+++ b/cmd/snap-confine/tests/test_bad_seccomp_filter_args_clone -@@ -2,6 +2,7 @@ - - set -e - -+# shellcheck source=snap-confine/tests/common.sh - . "${srcdir:-.}/snap-confine/tests/common.sh" - - get_common_syscalls >"$TMP"/tmpl -diff --git a/cmd/snap-confine/tests/test_bad_seccomp_filter_args_null b/cmd/snap-confine/tests/test_bad_seccomp_filter_args_null -index 259127e..17e9c04 100755 ---- a/cmd/snap-confine/tests/test_bad_seccomp_filter_args_null -+++ b/cmd/snap-confine/tests/test_bad_seccomp_filter_args_null -@@ -2,6 +2,7 @@ - - set -e - -+# shellcheck source=snap-confine/tests/common.sh - . "${srcdir:-.}/snap-confine/tests/common.sh" - - get_common_syscalls >"$TMP"/tmpl -diff --git a/cmd/snap-confine/tests/test_bad_seccomp_filter_args_prctl b/cmd/snap-confine/tests/test_bad_seccomp_filter_args_prctl -index e05bdde..d364ce7 100755 ---- a/cmd/snap-confine/tests/test_bad_seccomp_filter_args_prctl -+++ b/cmd/snap-confine/tests/test_bad_seccomp_filter_args_prctl -@@ -2,6 +2,7 @@ - - set -e - -+# shellcheck source=snap-confine/tests/common.sh - . "${srcdir:-.}/snap-confine/tests/common.sh" - - get_common_syscalls >"$TMP"/tmpl -diff --git a/cmd/snap-confine/tests/test_bad_seccomp_filter_args_prio b/cmd/snap-confine/tests/test_bad_seccomp_filter_args_prio -index 6872b02..5ae6b48 100755 ---- a/cmd/snap-confine/tests/test_bad_seccomp_filter_args_prio -+++ b/cmd/snap-confine/tests/test_bad_seccomp_filter_args_prio -@@ -2,6 +2,7 @@ - - set -e - -+# shellcheck source=snap-confine/tests/common.sh - . "${srcdir:-.}/snap-confine/tests/common.sh" - - get_common_syscalls >"$TMP"/tmpl -diff --git a/cmd/snap-confine/tests/test_bad_seccomp_filter_args_quotactl b/cmd/snap-confine/tests/test_bad_seccomp_filter_args_quotactl -index 07b7329..91499f5 100755 ---- a/cmd/snap-confine/tests/test_bad_seccomp_filter_args_quotactl -+++ b/cmd/snap-confine/tests/test_bad_seccomp_filter_args_quotactl -@@ -2,6 +2,7 @@ - - set -e - -+# shellcheck source=snap-confine/tests/common.sh - . "${srcdir:-.}/snap-confine/tests/common.sh" - - get_common_syscalls >"$TMP"/tmpl -diff --git a/cmd/snap-confine/tests/test_bad_seccomp_filter_args_socket b/cmd/snap-confine/tests/test_bad_seccomp_filter_args_socket -index 2cf477a..58675bc 100755 ---- a/cmd/snap-confine/tests/test_bad_seccomp_filter_args_socket -+++ b/cmd/snap-confine/tests/test_bad_seccomp_filter_args_socket -@@ -2,6 +2,7 @@ - - set -e - -+# shellcheck source=snap-confine/tests/common.sh - . "${srcdir:-.}/snap-confine/tests/common.sh" - - get_common_syscalls >"$TMP"/tmpl -diff --git a/cmd/snap-confine/tests/test_bad_seccomp_filter_args_termios b/cmd/snap-confine/tests/test_bad_seccomp_filter_args_termios -index d6d7d91..4493e16 100755 ---- a/cmd/snap-confine/tests/test_bad_seccomp_filter_args_termios -+++ b/cmd/snap-confine/tests/test_bad_seccomp_filter_args_termios -@@ -2,6 +2,7 @@ - - set -e - -+# shellcheck source=snap-confine/tests/common.sh - . "${srcdir:-.}/snap-confine/tests/common.sh" - - get_common_syscalls >"$TMP"/tmpl -diff --git a/cmd/snap-confine/tests/test_bad_seccomp_filter_length b/cmd/snap-confine/tests/test_bad_seccomp_filter_length -index d2a1548..0d06005 100755 ---- a/cmd/snap-confine/tests/test_bad_seccomp_filter_length -+++ b/cmd/snap-confine/tests/test_bad_seccomp_filter_length -@@ -2,6 +2,7 @@ - - set -e - -+# shellcheck source=snap-confine/tests/common.sh - . "${srcdir:-.}/snap-confine/tests/common.sh" - - printf "Test seccomp filter (bad - too long)" -diff --git a/cmd/snap-confine/tests/test_bad_seccomp_filter_missing_trailing_newline b/cmd/snap-confine/tests/test_bad_seccomp_filter_missing_trailing_newline -index ea6bcf2..9c77844 100755 ---- a/cmd/snap-confine/tests/test_bad_seccomp_filter_missing_trailing_newline -+++ b/cmd/snap-confine/tests/test_bad_seccomp_filter_missing_trailing_newline -@@ -2,6 +2,7 @@ - - set -e - -+# shellcheck source=snap-confine/tests/common.sh - . "${srcdir:-.}/snap-confine/tests/common.sh" - - printf "Test seccomp filter (bad - no trailing newline)" -diff --git a/cmd/snap-confine/tests/test_complain b/cmd/snap-confine/tests/test_complain -index 4b7878a..b58de26 100755 ---- a/cmd/snap-confine/tests/test_complain -+++ b/cmd/snap-confine/tests/test_complain -@@ -2,6 +2,7 @@ - - set -e - -+# shellcheck source=snap-confine/tests/common.sh - . "${srcdir:-.}/snap-confine/tests/common.sh" - - cat >"$TMP/snap.name.app" <<EOF -diff --git a/cmd/snap-confine/tests/test_complain_missed b/cmd/snap-confine/tests/test_complain_missed -index 9267f57..d6b0e19 100755 ---- a/cmd/snap-confine/tests/test_complain_missed -+++ b/cmd/snap-confine/tests/test_complain_missed -@@ -2,6 +2,7 @@ - - set -e - -+# shellcheck source=snap-confine/tests/common.sh - . "${srcdir:-.}/snap-confine/tests/common.sh" - - cat >"$TMP/snap.name.app" <<EOF -diff --git a/cmd/snap-confine/tests/test_noprofile b/cmd/snap-confine/tests/test_noprofile -index 5ac2dcb..ef98e9e 100755 ---- a/cmd/snap-confine/tests/test_noprofile | ||
| [-] [+] | Deleted | 0004-cmd-use-libtool-for-the-internal-library.patch ^ |
| @@ -1,124 +0,0 @@ -From a739b6d647c2dbf98c07e53a86483fcd3b6439a1 Mon Sep 17 00:00:00 2001 -From: Zygmunt Krynicki <me@zygoon.pl> -Date: Mon, 6 Mar 2017 20:26:26 +0100 -Subject: [PATCH 4/8] cmd: use libtool for the internal library - -This just cuts some hassle integration with how the helper library is -built. I could never get to pass the right -fPIC/-fpie combination -otherwise. - -Signed-off-by: Zygmunt Krynicki <me@zygoon.pl> ---- - cmd/Makefile.am | 22 +++++++++++----------- - cmd/configure.ac | 3 ++- - 2 files changed, 13 insertions(+), 12 deletions(-) - -diff --git a/cmd/Makefile.am b/cmd/Makefile.am -index 574886c..0733d85 100644 ---- a/cmd/Makefile.am -+++ b/cmd/Makefile.am -@@ -4,7 +4,7 @@ TESTS = - libexec_PROGRAMS = - dist_man_MANS = - noinst_PROGRAMS = --noinst_LIBRARIES = -+noinst_LTLIBRARIES = - - subdirs = snap-confine snap-discard-ns system-shutdown libsnap-confine-private snap-update-ns - -@@ -58,12 +58,12 @@ hack: snap-confine/snap-confine snap-confine/snap-confine.apparmor - sudo apparmor_parser -r snap-confine/snap-confine.apparmor - - ## --## libsnap-confine-private.a -+## libsnap-confine-private.la - ## - --noinst_LIBRARIES += libsnap-confine-private.a -+noinst_LTLIBRARIES += libsnap-confine-private.la - --libsnap_confine_private_a_SOURCES = \ -+libsnap_confine_private_la_SOURCES = \ - libsnap-confine-private/classic.c \ - libsnap-confine-private/classic.h \ - libsnap-confine-private/cleanup-funcs.c \ -@@ -118,7 +118,7 @@ noinst_PROGRAMS += decode-mount-opts/decode-mount-opts - - decode_mount_opts_decode_mount_opts_SOURCES = \ - decode-mount-opts/decode-mount-opts.c --decode_mount_opts_decode_mount_opts_LDADD = libsnap-confine-private.a -+decode_mount_opts_decode_mount_opts_LDADD = libsnap-confine-private.la - decode_mount_opts_decode_mount_opts_LDADD += -lcap - ## - ## snap-confine -@@ -184,7 +184,7 @@ snap_confine_snap_confine_SOURCES = \ - - snap_confine_snap_confine_CFLAGS = -Wall -Werror $(AM_CFLAGS) - snap_confine_snap_confine_LDFLAGS = $(AM_LDFLAGS) --snap_confine_snap_confine_LDADD = libsnap-confine-private.a -+snap_confine_snap_confine_LDADD = libsnap-confine-private.la - snap_confine_snap_confine_CFLAGS += $(LIBUDEV_CFLAGS) - snap_confine_snap_confine_LDADD += $(LIBUDEV_LIBS) - snap_confine_snap_confine_LDADD += -lcap -@@ -314,7 +314,7 @@ snap_discard_ns_snap_discard_ns_SOURCES = \ - snap-discard-ns/snap-discard-ns.c - snap_discard_ns_snap_discard_ns_CFLAGS = -Wall -Werror $(AM_CFLAGS) - snap_discard_ns_snap_discard_ns_LDFLAGS = $(AM_LDFLAGS) --snap_discard_ns_snap_discard_ns_LDADD = libsnap-confine-private.a -+snap_discard_ns_snap_discard_ns_LDADD = libsnap-confine-private.la - - if APPARMOR - snap_discard_ns_snap_discard_ns_CFLAGS += $(APPARMOR_CFLAGS) -@@ -335,7 +335,7 @@ system_shutdown_system_shutdown_SOURCES = \ - system-shutdown/system-shutdown-utils.c \ - system-shutdown/system-shutdown-utils.h \ - system-shutdown/system-shutdown.c --system_shutdown_system_shutdown_LDADD = libsnap-confine-private.a -+system_shutdown_system_shutdown_LDADD = libsnap-confine-private.la - system_shutdown_system_shutdown_CFLAGS = $(filter-out -fPIE -pie,$(CFLAGS)) -static - system_shutdown_system_shutdown_LDFLAGS = $(filter-out -fPIE -pie,$(LDFLAGS)) -static - -@@ -345,7 +345,7 @@ system_shutdown_system_shutdown_unit_tests_SOURCES = \ - libsnap-confine-private/unit-tests-main.c \ - libsnap-confine-private/unit-tests.c \ - system-shutdown/system-shutdown-utils-test.c --system_shutdown_system_shutdown_unit_tests_LDADD = libsnap-confine-private.a -+system_shutdown_system_shutdown_unit_tests_LDADD = libsnap-confine-private.la - system_shutdown_system_shutdown_unit_tests_CFLAGS = $(GLIB_CFLAGS) - system_shutdown_system_shutdown_unit_tests_LDADD += $(GLIB_LIBS) - endif -@@ -359,7 +359,7 @@ dist_man_MANS += snap-update-ns/snap-update-ns.5 - CLEANFILES += snap-update-ns/snap-update-ns.5 - EXTRA_DIST += snap-update-ns/snap-update-ns.rst - --snap_update_ns_snap_update_ns_LDADD = libsnap-confine-private.a -+snap_update_ns_snap_update_ns_LDADD = libsnap-confine-private.la - - snap_update_ns_snap_update_ns_SOURCES = \ - snap-update-ns/snap-update-ns.c \ -@@ -380,7 +380,7 @@ snap_update_ns_unit_tests_SOURCES = \ - snap-update-ns/test-data.h \ - snap-update-ns/test-utils.c \ - snap-update-ns/test-utils.h --snap_update_ns_unit_tests_LDADD = libsnap-confine-private.a -+snap_update_ns_unit_tests_LDADD = libsnap-confine-private.la - snap_update_ns_unit_tests_CFLAGS = $(GLIB_CFLAGS) - snap_update_ns_unit_tests_LDADD += $(GLIB_LIBS) - endif -diff --git a/cmd/configure.ac b/cmd/configure.ac -index 3c921ac..4fb6175 100644 ---- a/cmd/configure.ac -+++ b/cmd/configure.ac -@@ -11,7 +11,8 @@ AC_PROG_CC_C99 - AC_PROG_CPP - AC_PROG_INSTALL - AC_PROG_MAKE_SET --AC_PROG_RANLIB -+AC_PROG_LIBTOOL -+AC_CONFIG_MACRO_DIR([m4]) - - AC_LANG([C]) - # Checks for libraries. --- -2.10.2 - | ||
| [-] [+] | Deleted | 0005-packaging-add-opensuse-permissions-files.patch ^ |
| @@ -1,62 +0,0 @@ -From bc9699b9b5bcfef6fb4f9914512ad0953578804a Mon Sep 17 00:00:00 2001 -From: Zygmunt Krynicki <me@zygoon.pl> -Date: Mon, 6 Mar 2017 21:46:18 +0100 -Subject: [PATCH 5/8] packaging: add opensuse permissions files - -This patch adds opensuse permissions files. Those files are required to -build snapd in the system:snappy repository. They are further described -here: https://en.opensuse.org/openSUSE:Package_security_guidelines#Setuid_Binaries - -Signed-off-by: Zygmunt Krynicki <me@zygoon.pl> ---- - packaging/opensuse-42.1 | 1 + - packaging/opensuse-42.2/permissions | 1 + - packaging/opensuse-42.2/permissions.easy | 1 + - packaging/opensuse-42.2/permissions.paranoid | 1 + - packaging/opensuse-42.2/permissions.secure | 1 + - 5 files changed, 5 insertions(+) - create mode 120000 packaging/opensuse-42.1 - create mode 100644 packaging/opensuse-42.2/permissions - create mode 100644 packaging/opensuse-42.2/permissions.easy - create mode 100644 packaging/opensuse-42.2/permissions.paranoid - create mode 100644 packaging/opensuse-42.2/permissions.secure - -diff --git a/packaging/opensuse-42.1 b/packaging/opensuse-42.1 -new file mode 120000 -index 0000000..134a1c6 ---- /dev/null -+++ b/packaging/opensuse-42.1 -@@ -0,0 +1 @@ -+opensuse-42.2 -\ No newline at end of file -diff --git a/packaging/opensuse-42.2/permissions b/packaging/opensuse-42.2/permissions -new file mode 100644 -index 0000000..3634c76 ---- /dev/null -+++ b/packaging/opensuse-42.2/permissions -@@ -0,0 +1 @@ -+/usr/lib/snapd/snap-confine root:root 4755 -diff --git a/packaging/opensuse-42.2/permissions.easy b/packaging/opensuse-42.2/permissions.easy -new file mode 100644 -index 0000000..3634c76 ---- /dev/null -+++ b/packaging/opensuse-42.2/permissions.easy -@@ -0,0 +1 @@ -+/usr/lib/snapd/snap-confine root:root 4755 -diff --git a/packaging/opensuse-42.2/permissions.paranoid b/packaging/opensuse-42.2/permissions.paranoid -new file mode 100644 -index 0000000..4b2a2f6 ---- /dev/null -+++ b/packaging/opensuse-42.2/permissions.paranoid -@@ -0,0 +1 @@ -+/usr/lib/snapd/snap-confine root:root 755 -diff --git a/packaging/opensuse-42.2/permissions.secure b/packaging/opensuse-42.2/permissions.secure -new file mode 100644 -index 0000000..3634c76 ---- /dev/null -+++ b/packaging/opensuse-42.2/permissions.secure -@@ -0,0 +1 @@ -+/usr/lib/snapd/snap-confine root:root 4755 --- -2.10.2 - | ||
| [-] [+] | Deleted | 0006-errtracker-fix-testing-outside-of-ubuntu.patch ^ |
| @@ -1,39 +0,0 @@ -From 951aa863689f8d2e89958438f94ee86221b44d9a Mon Sep 17 00:00:00 2001 -From: Zygmunt Krynicki <me@zygoon.pl> -Date: Mon, 6 Mar 2017 23:04:09 +0100 -Subject: [PATCH 6/8] errtracker: fix testing outside of ubuntu - -Unfortunately the distribution "ubuntu" is special cased so that it -shows up as "Ubuntu". Tests are not taking this into account and were -always expecting the upper-cased distribution name. This patch fixes -this. - -Signed-off-by: Zygmunt Krynicki <me@zygoon.pl> ---- - errtracker/errtracker_test.go | 8 +++++++- - 1 file changed, 7 insertions(+), 1 deletion(-) - -diff --git a/errtracker/errtracker_test.go b/errtracker/errtracker_test.go -index cd69d30..3a433dc 100644 ---- a/errtracker/errtracker_test.go -+++ b/errtracker/errtracker_test.go -@@ -84,9 +84,15 @@ func (s *ErrtrackerTestSuite) TestReport(c *C) { - var data map[string]string - err = bson.Unmarshal(b, &data) - c.Assert(err, IsNil) -+ var distroRelease string -+ if release.ReleaseInfo.ID == "ubuntu" { -+ distroRelease = fmt.Sprintf("%s %s", strings.Title(release.ReleaseInfo.ID), release.ReleaseInfo.VersionID) -+ } else { -+ distroRelease = fmt.Sprintf("%s %s", release.ReleaseInfo.ID, release.ReleaseInfo.VersionID) -+ } - c.Check(data, DeepEquals, map[string]string{ - "ProblemType": "Snap", -- "DistroRelease": fmt.Sprintf("%s %s", strings.Title(release.ReleaseInfo.ID), release.ReleaseInfo.VersionID), -+ "DistroRelease": distroRelease, - "HostSnapdBuildID": hostBuildID, - "CoreSnapdBuildID": coreBuildID, - "SnapdVersion": "some-snapd-version", --- -2.10.2 - | ||
| [-] [+] | Deleted | 0007-osutil-HACK-use-usr-bin-true-false.patch ^ |
| @@ -1,30 +0,0 @@ -From fd926679c9163643ca5a337de76c39a90e629ad4 Mon Sep 17 00:00:00 2001 -From: Zygmunt Krynicki <me@zygoon.pl> -Date: Mon, 6 Mar 2017 23:07:24 +0100 -Subject: [PATCH 7/8] osutil: HACK: use /usr/bin/{true,false} - -This patch should not be applied upstream. This is a Debian vs OpenSUSE -delta. Ideally we'd do the golang equvalent of $(realpath /bin/false) -but I was in a hurry. - -Signed-off-by: Zygmunt Krynicki <me@zygoon.pl> ---- - osutil/buildid_test.go | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/osutil/buildid_test.go b/osutil/buildid_test.go -index b11a2e7..9ef574b 100644 ---- a/osutil/buildid_test.go -+++ b/osutil/buildid_test.go -@@ -46,7 +46,7 @@ func buildID(c *C, fname string) string { - } - - func (s *buildIDSuite) TestReadBuildID(c *C) { -- for _, fname := range []string{"/bin/true", "/bin/false"} { -+ for _, fname := range []string{"/usr/bin/true", "/usr/bin/false"} { - - id, err := osutil.ReadBuildID(fname) - c.Assert(err, IsNil) --- -2.10.2 - | ||
| [-] [+] | Deleted | 0008-partition-skip-some-tests-if-grub-editenv-is-not-ava.patch ^ |
| @@ -1,44 +0,0 @@ -From 1eeb1ef8b71ca843570c2bbdf2e23ed9ab381b3f Mon Sep 17 00:00:00 2001 -From: Zygmunt Krynicki <zygmunt.krynicki@canonical.com> -Date: Mon, 6 Mar 2017 23:30:19 +0100 -Subject: [PATCH 8/8] partition: skip some tests if grub-editenv is not - available - -Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com> ---- - partition/grub_test.go | 7 +++++++ - 1 file changed, 7 insertions(+) - -diff --git a/partition/grub_test.go b/partition/grub_test.go -index b64d0b8..5fc5fd4 100644 ---- a/partition/grub_test.go -+++ b/partition/grub_test.go -@@ -28,6 +28,7 @@ import ( - . "gopkg.in/check.v1" - - "github.com/snapcore/snapd/dirs" -+ "github.com/snapcore/snapd/osutil" - ) - - func grubEnvPath() string { -@@ -35,11 +36,17 @@ func grubEnvPath() string { - } - - func grubEditenvSet(c *C, key, value string) { -+ if !osutil.FileExists("/usr/bin/grub-editenv") { -+ c.Skip("/usr/bin/grub-editenv is not available") -+ } - _, err := runCommand("/usr/bin/grub-editenv", grubEnvPath(), "set", fmt.Sprintf("%s=%s", key, value)) - c.Assert(err, IsNil) - } - - func grubEditenvGet(c *C, key string) string { -+ if !osutil.FileExists("/usr/bin/grub-editenv") { -+ c.Skip("/usr/bin/grub-editenv is not available") -+ } - output, err := runCommand("/usr/bin/grub-editenv", grubEnvPath(), "list") - c.Assert(err, IsNil) - cfg := goconfigparser.New() --- -2.10.2 - | ||
| Deleted | snapd_2.23.6.tar.xz ^ | |
| Added | snapd_2.24.vendor.orig.tar.xz ^ | |
Comments for request 490989 (0)
There's nothing to be done right now
Request History
|
|
created request | 1493120977 9 months ago |
Update to 2.24 release and fix rpmlint warnings |
||
|
|
Review got accepted | 1493121235 9 months ago |
+1, looks good. Thank you |
||
|
|
Request got reviewed | 1493121236 9 months ago |
+1, looks good. Thank you |
||
|
|
Request got accepted | 1493288438 9 months ago |
