Gentoo Archives: gentoo-commits

From: "Anthony G. Basile" <blueness@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/elfix:master commit in: misc/install.wrapper.c/
Date: Fri, 07 Feb 2014 18:10:05
Message-Id: 1391796562.c5f0b9442b37726f6f12e4f9464f81a1693d5411.blueness@gentoo
1 commit: c5f0b9442b37726f6f12e4f9464f81a1693d5411
2 Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
3 AuthorDate: Fri Feb 7 18:09:22 2014 +0000
4 Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
5 CommitDate: Fri Feb 7 18:09:22 2014 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/elfix.git;a=commit;h=c5f0b944
7
8 misc/install.wrapper.c/checkcopyattrs.sh: test install cmd line flags
9
10 ---
11 misc/install.wrapper.c/Makefile.am | 4 ++--
12 misc/install.wrapper.c/checkcopyattrs.sh | 37 ++++++++++++++++++++++++++++++++
13 2 files changed, 39 insertions(+), 2 deletions(-)
14
15 diff --git a/misc/install.wrapper.c/Makefile.am b/misc/install.wrapper.c/Makefile.am
16 index 0792121..f730ea1 100644
17 --- a/misc/install.wrapper.c/Makefile.am
18 +++ b/misc/install.wrapper.c/Makefile.am
19 @@ -10,7 +10,7 @@ checkcopyattrs:
20 $(srcdir)/checkcopyattrs.sh
21
22 EXTRA_DIST = checkcopyattrs.sh
23 -CLEANFILES = a b c x y z d/* e/* f/*
24 +CLEANFILES = a b c x y z d/* e/* f/*
25
26 clean-local:
27 - -rm -rf d e f
28 + -rm -rf d e f g backup* mode* target*
29
30 diff --git a/misc/install.wrapper.c/checkcopyattrs.sh b/misc/install.wrapper.c/checkcopyattrs.sh
31 index 86a6a33..210a21c 100755
32 --- a/misc/install.wrapper.c/checkcopyattrs.sh
33 +++ b/misc/install.wrapper.c/checkcopyattrs.sh
34 @@ -39,3 +39,40 @@ setfattr -n user.pax.flags -v "r" c
35 [ "$(getfattr --only-values -n user.foo f/a)" == "bar" ]
36 [ "$(getfattr --only-values -n user.bas f/a)" == "x" ]
37 [ "$(getfattr --only-values -n user.pax.flags f/a)" == "mr" ]
38 +
39 +
40 +# The following are just tests to make sure the raw install
41 +# options don't get lost in our optargs parsing.
42 +# See: https://bugs.gentoo.org/show_bug.cgi?id=465000#c57
43 +# These should all silently succeed.
44 +
45 +./install-xattr --backup=off a backup-a
46 +./install-xattr --backup=numbered a backup-a
47 +./install-xattr --backup=existing a backup-a
48 +./install-xattr --backup=simple a backup-a
49 +./install-xattr --backup a backup-a
50 +./install-xattr -b a backup-a
51 +./install-xattr -C a backup-a
52 +./install-xattr -p a backup-a
53 +./install-xattr -d g/g/g
54 +
55 +./install-xattr -o $(id -u) a mode-a
56 +./install-xattr -g $(id -g) a mode-a
57 +./install-xattr -m 666 a mode-a
58 +
59 +# Let's abuse ourselves
60 +./install-xattr -s install-xattr target-install-xattr
61 +[[ -x /usr/bin/sstrip ]] && ./install-xattr -s --strip-program=/usr/bin/sstrip install-xattr target-install-xattr
62 +
63 +./install-xattr -T a target-a
64 +./install-xattr --help >/dev/null
65 +./install-xattr --version >/dev/null
66 +
67 +# -S, --suffix=SUFFIX
68 +# override the usual backup suffix
69 +#
70 +# --preserve-context
71 +# preserve SELinux security context
72 +#
73 +# -Z, --context=CONTEXT
74 +# set SELinux security context of files and directories