changeset 2949:f6a0a42bf443

Add pax-mark-vm.in script template missing in earlier commit. 2013-01-25 Andrew John Hughes <gnu.andrew@redhat.com> * pax-mark-vm.in: Add template for pax mark script.
author Andrew John Hughes <gnu.andrew@redhat.com>
date Fri, 25 Jan 2013 21:33:29 +0000
parents 6af17f5442ff
children 5a1e1b396644
files ChangeLog pax-mark-vm.in
diffstat 2 files changed, 18 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Fri Jan 25 21:28:47 2013 +0000
+++ b/ChangeLog	Fri Jan 25 21:33:29 2013 +0000
@@ -1,3 +1,8 @@
+2013-01-25  Andrew John Hughes  <gnu.andrew@redhat.com>
+
+	* pax-mark-vm.in: Add template for pax mark
+	script.
+
 2013-01-25  Andrew John Hughes  <gnu.andrew@redhat.com>
 
 	* Makefile.am:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pax-mark-vm.in	Fri Jan 25 21:33:29 2013 +0000
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+# Taken from Gentoo's pax-utils.eclass
+list_paxables() {
+       file "$@" 2> /dev/null | grep -E 'ELF.*(executable|shared object)' | sed -e 's/: .*$//'
+}
+
+if test "@PAX_COMMAND@" != "not specified"; then
+       for paxable in `list_paxables "${1}"/bin/* "${1}"/jre/bin/*`; do
+               echo "PaX mark @PAX_COMMAND_ARGS@ ${paxable}"
+               @PAX_COMMAND@ @PAX_COMMAND_ARGS@ "${paxable}"
+       done
+fi