[apparmor] [patch] fix two issues for older releases
John Johansen
john.johansen at canonical.com
Tue Mar 31 08:48:05 UTC 2015
On 03/31/2015 01:10 AM, Steve Beattie wrote:
> The following patch addresses two issues on older releases:
>
> 1) In trunk commit 2911, the line 'undefine VERBOSE' was added to
> parser/tst/Makefile so that the equality tests would not generate
> verbose output when $VERBOSE != 1. Unfortunately, the 'undefine'
> keyword was not introduced in GNU Make until version 3.82. On
> distro releases like Ubuntu 12.04 LTS that include versions of Make
> older than that, make check and make clean abort when VERBOSE is
> not set to 1. The patch fixes that by setting VERBOSE to a zero
> length string if does not already equal 1.
>
> 2) In trunk commit 2923, a workaround for systemd as init was added
> to the pivot_root regression test. The workaround included a
> call to ps(1) to determine if systemd is pid 1. Unfortunately,
> in older versions of the procps package (such as the version in
> Ubuntu 12.04 LTS), 'ps -hp1' emits the warning
>
> Warning: bad ps syntax, perhaps a bogus '-'? See http://procps.sf.net/faq.html
>
> The patch below converts the ps call to 'ps hp1' which does not
> generate the warning.
>
> Nominated for both trunk and 2.9 (since both commits were backported
> to 2.9).
>
> Signed-off-by: Steve Beattie <steve at nxnw.org>
Acked-by: John Johansen <john.johansen at canonical.com>
> ---
> parser/tst/Makefile | 2 +-
> tests/regression/apparmor/pivot_root.sh | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> Index: b/tests/regression/apparmor/pivot_root.sh
> ===================================================================
> --- a/tests/regression/apparmor/pivot_root.sh
> +++ b/tests/regression/apparmor/pivot_root.sh
> @@ -53,7 +53,7 @@ if [ -x "${FINDMNT}" ] && ${FINDMNT} -no
> if [ "$(${FINDMNT} -no PROPAGATION /)" == "shared" ] ; then
> root_was_shared="yes"
> fi
> -elif [ "$(ps -hp1 -ocomm)" = "systemd" ] ; then
> +elif [ "$(ps hp1 -ocomm)" = "systemd" ] ; then
> # no findmnt or findmnt doesn't know the PROPAGATION column,
> # but init is systemd so assume rootfs is shared
> root_was_shared="yes"
> Index: b/parser/tst/Makefile
> ===================================================================
> --- a/parser/tst/Makefile
> +++ b/parser/tst/Makefile
> @@ -10,7 +10,7 @@ ifeq ($(VERBOSE),1)
> PROVE_ARG+=-v
> PYTEST_ARG = -v
> else
> - undefine VERBOSE
> + VERBOSE=
> endif
>
> all: tests
>
>
>
More information about the AppArmor
mailing list