aboutsummaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authorAnthony G. Basile <blueness@gentoo.org>2014-02-07 13:09:22 -0500
committerAnthony G. Basile <blueness@gentoo.org>2014-02-07 13:09:22 -0500
commitc5f0b9442b37726f6f12e4f9464f81a1693d5411 (patch)
tree4d43a27364d35d40a7bf444777b9bb7c080345b6 /misc
parentinstall.wrapper.c: correctly deal with args taking arguments (diff)
downloadelfix-c5f0b9442b37726f6f12e4f9464f81a1693d5411.tar.gz
elfix-c5f0b9442b37726f6f12e4f9464f81a1693d5411.tar.bz2
elfix-c5f0b9442b37726f6f12e4f9464f81a1693d5411.zip
misc/install.wrapper.c/checkcopyattrs.sh: test install cmd line flags
Diffstat (limited to 'misc')
-rw-r--r--misc/install.wrapper.c/Makefile.am4
-rwxr-xr-xmisc/install.wrapper.c/checkcopyattrs.sh37
2 files changed, 39 insertions, 2 deletions
diff --git a/misc/install.wrapper.c/Makefile.am b/misc/install.wrapper.c/Makefile.am
index 0792121..f730ea1 100644
--- a/misc/install.wrapper.c/Makefile.am
+++ b/misc/install.wrapper.c/Makefile.am
@@ -10,7 +10,7 @@ checkcopyattrs:
$(srcdir)/checkcopyattrs.sh
EXTRA_DIST = checkcopyattrs.sh
-CLEANFILES = a b c x y z d/* e/* f/*
+CLEANFILES = a b c x y z d/* e/* f/*
clean-local:
- -rm -rf d e f
+ -rm -rf d e f g backup* mode* target*
diff --git a/misc/install.wrapper.c/checkcopyattrs.sh b/misc/install.wrapper.c/checkcopyattrs.sh
index 86a6a33..210a21c 100755
--- a/misc/install.wrapper.c/checkcopyattrs.sh
+++ b/misc/install.wrapper.c/checkcopyattrs.sh
@@ -39,3 +39,40 @@ setfattr -n user.pax.flags -v "r" c
[ "$(getfattr --only-values -n user.foo f/a)" == "bar" ]
[ "$(getfattr --only-values -n user.bas f/a)" == "x" ]
[ "$(getfattr --only-values -n user.pax.flags f/a)" == "mr" ]
+
+
+# The following are just tests to make sure the raw install
+# options don't get lost in our optargs parsing.
+# See: https://bugs.gentoo.org/show_bug.cgi?id=465000#c57
+# These should all silently succeed.
+
+./install-xattr --backup=off a backup-a
+./install-xattr --backup=numbered a backup-a
+./install-xattr --backup=existing a backup-a
+./install-xattr --backup=simple a backup-a
+./install-xattr --backup a backup-a
+./install-xattr -b a backup-a
+./install-xattr -C a backup-a
+./install-xattr -p a backup-a
+./install-xattr -d g/g/g
+
+./install-xattr -o $(id -u) a mode-a
+./install-xattr -g $(id -g) a mode-a
+./install-xattr -m 666 a mode-a
+
+# Let's abuse ourselves
+./install-xattr -s install-xattr target-install-xattr
+[[ -x /usr/bin/sstrip ]] && ./install-xattr -s --strip-program=/usr/bin/sstrip install-xattr target-install-xattr
+
+./install-xattr -T a target-a
+./install-xattr --help >/dev/null
+./install-xattr --version >/dev/null
+
+# -S, --suffix=SUFFIX
+# override the usual backup suffix
+#
+# --preserve-context
+# preserve SELinux security context
+#
+# -Z, --context=CONTEXT
+# set SELinux security context of files and directories