From e9688289161d8079580c1d2b5e0119272394f4f6 Mon Sep 17 00:00:00 2001 From: kytv <kytv@mail.i2p> Date: Thu, 12 Jun 2014 00:41:14 +0000 Subject: [PATCH] i2prouter: add amdfx* as an x64 CPU / move ldd check --- debian/patches/0001-path-substitution.patch | 21 ++++++------------- installer/resources/i2prouter | 23 +++++++++++---------- 2 files changed, 18 insertions(+), 26 deletions(-) diff --git a/debian/patches/0001-path-substitution.patch b/debian/patches/0001-path-substitution.patch index 3096cfec24..d74954ae54 100644 --- a/debian/patches/0001-path-substitution.patch +++ b/debian/patches/0001-path-substitution.patch @@ -71,7 +71,7 @@ Debian wrapper.config to try to prevent confusion. # Priority at which to run the wrapper. See "man nice" for valid priorities. # nice is only used if a priority is specified. -@@ -172,84 +163,8 @@ +@@ -172,75 +163,8 @@ exit 1 fi @@ -144,19 +144,10 @@ Debian wrapper.config to try to prevent confusion. - exit 1 -} - --if $(which ldd > /dev/null 2>&1); then -- # This should cover every *NIX other than OSX since OSX doesn't have ldd. -- # OSX has otool. Is otool on every OSX installation? Is otool's output the same as ldd's? -- # The wrapper we ship for OSX are for PPC and Intel, so maybe we don't need to worry about OSX? -- if (ldd "$WRAPPER_CMD" |grep -q 'not found') > /dev/null 2>&1 || \ -- ! (ldd "$WRAPPER_CMD" > /dev/null 2>&1); then -- failed -- fi --fi - if [ -n "$FIXED_COMMAND" ] then -@@ -1022,7 +937,6 @@ + COMMAND="$FIXED_COMMAND" +@@ -1023,7 +947,6 @@ if [ "X$pid" = "X" ] then eval echo " `gettext 'WARNING: $APP_LONG_NAME may have failed to start.'`" @@ -164,7 +155,7 @@ Debian wrapper.config to try to prevent confusion. else eval echo ' running: PID:$pid' fi -@@ -1825,7 +1739,7 @@ +@@ -1826,7 +1749,7 @@ } showsetusermesg() { @@ -173,7 +164,7 @@ Debian wrapper.config to try to prevent confusion. } checkifstartingasroot() { -@@ -1833,7 +1747,7 @@ +@@ -1834,7 +1757,7 @@ echo "`gettext 'Running I2P as the root user is *not* recommended.'`" showsetusermesg echo @@ -182,7 +173,7 @@ Debian wrapper.config to try to prevent confusion. exit 1 fi } -@@ -1898,24 +1812,10 @@ +@@ -1899,24 +1822,10 @@ status ;; diff --git a/installer/resources/i2prouter b/installer/resources/i2prouter index c1e37e201a..a5c167f4eb 100644 --- a/installer/resources/i2prouter +++ b/installer/resources/i2prouter @@ -241,16 +241,6 @@ failed() { exit 1 } -if $(which ldd > /dev/null 2>&1); then - # This should cover every *NIX other than OSX since OSX doesn't have ldd. - # OSX has otool. Is otool on every OSX installation? Is otool's output the same as ldd's? - # The wrapper we ship for OSX are for PPC and Intel, so maybe we don't need to worry about OSX? - if (ldd "$WRAPPER_CMD" |grep -q 'not found') > /dev/null 2>&1 || \ - ! (ldd "$WRAPPER_CMD" > /dev/null 2>&1); then - failed - fi -fi - if [ -n "$FIXED_COMMAND" ] then COMMAND="$FIXED_COMMAND" @@ -433,7 +423,7 @@ else DIST_BITS="32" fi ;; - 'amd64' | 'x86_64') + amdfx* | 'amd64' | 'x86_64') DIST_ARCH="x86" DIST_BITS="64" ;; @@ -613,6 +603,17 @@ if [ ! -r "${WRAPPER_CMD}" ]; then exit 1 fi +if $(which ldd > /dev/null 2>&1); then + # This should cover every *NIX other than OSX since OSX doesn't have ldd. + # OSX has otool. Is otool on every OSX installation? Is otool's output the same as ldd's? + # The wrapper we ship for OSX are for PPC and Intel, so maybe we don't need to worry about OSX? + if (ldd "$WRAPPER_CMD" |grep -q 'not found') > /dev/null 2>&1 || \ + ! (ldd "$WRAPPER_CMD" > /dev/null 2>&1); then + failed + fi +fi + + # Build the nice clause if [ "X$PRIORITY" = "X" ] then -- GitLab