summaryrefslogtreecommitdiff
path: root/package/pam/patches/patch-modules_pam_timestamp_hmacfile
blob: 6826e3493ebf49f5ee7e91af3b923fa8bed213e5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
--- Linux-PAM-1.1.4.orig/modules/pam_timestamp/hmacfile	2011-06-21 11:37:55.000000000 +0200
+++ Linux-PAM-1.1.4/modules/pam_timestamp/hmacfile	2011-10-12 14:45:28.323559001 +0200
@@ -1,4 +1,4 @@
-#! /bin/sh
+#! /bin/bash
 
 # hmacfile - temporary wrapper script for .libs/hmacfile
 # Generated by ltmain.sh (GNU libtool) 2.2.6
@@ -11,7 +11,7 @@
 
 # Sed substitution that helps us do robust quoting.  It backslashifies
 # metacharacters that are still active within double-quoted strings.
-Xsed='/bin/sed -e 1s/^X//'
+Xsed='/home/wbx/adk/perf/scripts/sed -e 1s/^X//'
 sed_quote_subst='s/\([`"$\\]\)/\\\1/g'
 
 # Be Bourne compatible
@@ -32,13 +32,13 @@ DUALCASE=1; export DUALCASE # for MKS sh
 # if CDPATH is set.
 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
 
-relink_command=""
+relink_command="(cd /home/wbx/adk/perf/build_pcengines-alix1c_i586_uclibc/w-pam-1.1.4-1/Linux-PAM-1.1.4/modules/pam_timestamp; { test -z \"\${LIBRARY_PATH+set}\" || unset LIBRARY_PATH || { LIBRARY_PATH=; export LIBRARY_PATH; }; }; { test -z \"\${COMPILER_PATH+set}\" || unset COMPILER_PATH || { COMPILER_PATH=; export COMPILER_PATH; }; }; { test -z \"\${GCC_EXEC_PREFIX+set}\" || unset GCC_EXEC_PREFIX || { GCC_EXEC_PREFIX=; export GCC_EXEC_PREFIX; }; }; { test -z \"\${LD_RUN_PATH+set}\" || unset LD_RUN_PATH || { LD_RUN_PATH=; export LD_RUN_PATH; }; }; { test -z \"\${LD_LIBRARY_PATH+set}\" || unset LD_LIBRARY_PATH || { LD_LIBRARY_PATH=; export LD_LIBRARY_PATH; }; }; PATH=/home/wbx/adk/perf/scripts:/home/wbx/adk/perf/bin/tools:/home/wbx/adk/perf/host_i586_uclibc/bin:/home/wbx/adk/perf/host_i586_uclibc/usr/bin:/home/wbx/adk/perf/target_i586_uclibc/scripts:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games; export PATH; /home/wbx/adk/perf/host_i586_uclibc/bin/i586-openadk-linux-uclibc-gcc -I../../libpam/include -I../../libpamc/include -march=geode -fwrapv -fno-ident -fhonour-copts -fomit-frame-pointer -Os -pipe -Wl,-O2 -Wl,-rpath -Wl,/usr/lib -Wl,-rpath-link -Wl,/home/wbx/adk/perf/target_i586_uclibc/usr/lib -Wl,--as-needed -Wl,--no-undefined -Wl,-O1 -o \$progdir/\$file hmacfile.o hmacsha1.o sha1.o  -L/home/wbx/adk/perf/target_i586_uclibc/lib -L/home/wbx/adk/perf/target_i586_uclibc/usr/lib -L/home/wbx/adk/perf/build_pcengines-alix1c_i586_uclibc/w-pam-1.1.4-1/Linux-PAM-1.1.4/libpam /home/wbx/adk/perf/build_pcengines-alix1c_i586_uclibc/w-pam-1.1.4-1/Linux-PAM-1.1.4/libpam/.libs/libpam.so -ldl -Wl,-rpath -Wl,/home/wbx/adk/perf/build_pcengines-alix1c_i586_uclibc/w-pam-1.1.4-1/Linux-PAM-1.1.4/libpam/.libs -Wl,-rpath -Wl,/lib64)"
 
 # This environment variable determines our operation mode.
 if test "$libtool_install_magic" = "%%%MAGIC variable%%%"; then
   # install mode needs the following variables:
   generated_by_libtool_version='2.2.6'
-  notinst_deplibs=' /data/git/Linux-PAM/libpam/libpam.la'
+  notinst_deplibs=' /home/wbx/adk/perf/build_pcengines-alix1c_i586_uclibc/w-pam-1.1.4-1/Linux-PAM-1.1.4/libpam/libpam.la'
 else
   # When we are sourced in execute mode, $file and $ECHO are already set.
   if test "$libtool_execute_magic" != "%%%MAGIC variable%%%"; then
@@ -53,7 +53,7 @@ else
       :
     else
       # Restart under the correct shell, and then maybe $ECHO will work.
-      exec /bin/sh "$0" --no-reexec ${1+"$@"}
+      exec /bin/bash "$0" --no-reexec ${1+"$@"}
     fi
   fi
 
@@ -62,7 +62,7 @@ else
   test "x$thisdir" = "x$file" && thisdir=.
 
   # Follow symbolic links until we get to the real thisdir.
-  file=`ls -ld "$file" | /bin/sed -n 's/.*-> //p'`
+  file=`ls -ld "$file" | /home/wbx/adk/perf/scripts/sed -n 's/.*-> //p'`
   while test -n "$file"; do
     destdir=`$ECHO "X$file" | $Xsed -e 's%/[^/]*$%%'`
 
@@ -75,7 +75,7 @@ else
     fi
 
     file=`$ECHO "X$file" | $Xsed -e 's%^.*/%%'`
-    file=`ls -ld "$thisdir/$file" | /bin/sed -n 's/.*-> //p'`
+    file=`ls -ld "$thisdir/$file" | /home/wbx/adk/perf/scripts/sed -n 's/.*-> //p'`
   done
 
 
@@ -98,20 +98,38 @@ else
   absdir=`cd "$thisdir" && pwd`
   test -n "$absdir" && thisdir="$absdir"
 
-  program='hmacfile'
+  program=lt-'hmacfile'
   progdir="$thisdir/.libs"
 
+  if test ! -f "$progdir/$program" ||
+     { file=`ls -1dt "$progdir/$program" "$progdir/../$program" 2>/dev/null | /home/wbx/adk/perf/scripts/sed 1q`; \
+       test "X$file" != "X$progdir/$program"; }; then
 
-  if test -f "$progdir/$program"; then
-    # Add our own library path to LD_LIBRARY_PATH
-    LD_LIBRARY_PATH="/data/git/Linux-PAM/libpam/.libs:$LD_LIBRARY_PATH"
+    file="$$-$program"
 
-    # Some systems cannot cope with colon-terminated LD_LIBRARY_PATH
-    # The second colon is a workaround for a bug in BeOS R4 sed
-    LD_LIBRARY_PATH=`$ECHO "X$LD_LIBRARY_PATH" | $Xsed -e 's/::*$//'`
+    if test ! -d "$progdir"; then
+      mkdir "$progdir"
+    else
+      rm -f "$progdir/$file"
+    fi
 
-    export LD_LIBRARY_PATH
+    # relink executable if necessary
+    if test -n "$relink_command"; then
+      if relink_command_output=`eval $relink_command 2>&1`; then :
+      else
+	echo "$relink_command_output" >&2
+	rm -f "$progdir/$file"
+	exit 1
+      fi
+    fi
+
+    mv -f "$progdir/$file" "$progdir/$program" 2>/dev/null ||
+    { rm -f "$progdir/$program";
+      mv -f "$progdir/$file" "$progdir/$program"; }
+    rm -f "$progdir/$file"
+  fi
 
+  if test -f "$progdir/$program"; then
     if test "$libtool_execute_magic" != "%%%MAGIC variable%%%"; then
       # Run the actual program with our arguments.