summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2009-05-27 11:10:06 +0100
committerRichard Purdie <rpurdie@linux.intel.com>2009-05-27 11:10:06 +0100
commit5c96414966b7b92bc1877b463c082bd13e8f6d57 (patch)
tree439a2d53e8abafd17ae7d09e11f850d255390d79
parent14f39f31a9d13c2a610a176a05865e57a164401a (diff)
downloadpoky-5c96414966b7b92bc1877b463c082bd13e8f6d57.tar.gz
sudo: Add from OE.dev with tweaks to SRC_URI
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
-rw-r--r--meta/packages/sudo/files/autofoo.patch222
-rw-r--r--meta/packages/sudo/files/autofoo1.patch222
-rw-r--r--meta/packages/sudo/files/noexec-link.patch13
-rw-r--r--meta/packages/sudo/files/nonrootinstall.patch56
-rw-r--r--meta/packages/sudo/files/nostrip.patch20
-rw-r--r--meta/packages/sudo/site/bit-322
-rw-r--r--meta/packages/sudo/site/bit-642
-rw-r--r--meta/packages/sudo/sudo.inc28
-rw-r--r--meta/packages/sudo/sudo_1.6.8p12.bb12
9 files changed, 577 insertions, 0 deletions
diff --git a/meta/packages/sudo/files/autofoo.patch b/meta/packages/sudo/files/autofoo.patch
new file mode 100644
index 0000000000..995f026a83
--- /dev/null
+++ b/meta/packages/sudo/files/autofoo.patch
@@ -0,0 +1,222 @@
1Index: sudo-1.6.8p12/configure.in
2===================================================================
3--- sudo-1.6.8p12.orig/configure.in 2004-11-26 04:31:20.000000000 +1100
4+++ sudo-1.6.8p12/configure.in 2007-05-16 16:45:20.000000000 +1000
5@@ -1609,7 +1609,7 @@
6 AC_CHECK_FUNCS(getspnam, [CHECKSHADOW="false"], [AC_CHECK_LIB(gen, getspnam, AC_DEFINE(HAVE_GETSPNAM) [SUDO_LIBS="${SUDO_LIBS} -lgen"; LIBS="${LIBS} -lgen"])])
7 fi
8 if test "$CHECKSHADOW" = "true"; then
9- AC_CHECK_FUNC(getprpwnam, [AC_DEFINE(HAVE_GETPRPWNAM) [CHECKSHADOW="false"; SECUREWARE=1], AC_CHECK_LIB(sec, getprpwnam, AC_DEFINE(HAVE_GETPRPWNAM) [CHECKSHADOW="false"; SECUREWARE=1; SUDO_LIBS="${SUDO_LIBS} -lsec"; LIBS="${LIBS} -lsec"], AC_CHECK_LIB(security, getprpwnam, AC_DEFINE(HAVE_GETPRPWNAM) [CHECKSHADOW="false"; SECUREWARE=1; SUDO_LIBS="${SUDO_LIBS} -lsecurity"; LIBS="${LIBS} -lsecurity"], AC_CHECK_LIB(prot, getprpwnam, AC_DEFINE(HAVE_GETPRPWNAM) [CHECKSHADOW="false"; SECUREWARE=1; SUDO_LIBS="${SUDO_LIBS} -lprot"; LIBS="${LIBS} -lprot"])))])
10+ AC_CHECK_FUNC(getprpwnam, [AC_DEFINE(HAVE_GETPRPWNAM) CHECKSHADOW="false"; SECUREWARE=1], [AC_CHECK_LIB(sec, getprpwnam, [AC_DEFINE(HAVE_GETPRPWNAM) CHECKSHADOW="false"; SECUREWARE=1; SUDO_LIBS="${SUDO_LIBS} -lsec"; LIBS="${LIBS} -lsec"], [AC_CHECK_LIB(security, getprpwnam, [AC_DEFINE(HAVE_GETPRPWNAM) CHECKSHADOW="false"; SECUREWARE=1; SUDO_LIBS="${SUDO_LIBS} -lsecurity"; LIBS="${LIBS} -lsecurity"], [AC_CHECK_LIB(prot, getprpwnam, [AC_DEFINE(HAVE_GETPRPWNAM) CHECKSHADOW="false"; SECUREWARE=1; SUDO_LIBS="${SUDO_LIBS} -lprot"; LIBS="${LIBS} -lprot"])])])])
11 fi
12
13 dnl
14@@ -1670,7 +1670,7 @@
15 SUDO_TYPE_INO_T
16 SUDO_FULL_VOID
17 SUDO_UID_T_LEN
18-SUDO_LONG_LONG
19+SUDO_TYPE_LONG_LONG
20 SUDO_SOCK_SA_LEN
21 dnl
22 dnl only set RETSIGTYPE if it is not set already
23@@ -1700,12 +1700,14 @@
24 if test -z "$BROKEN_GETCWD"; then
25 AC_REPLACE_FUNCS(getcwd)
26 fi
27-AC_CHECK_FUNCS(lockf flock, [break])
28-AC_CHECK_FUNCS(waitpid wait3, [break])
29-AC_CHECK_FUNCS(innetgr _innetgr, [AC_CHECK_FUNCS(getdomainname) [break]])
30-AC_CHECK_FUNCS(lsearch, , [AC_CHECK_LIB(compat, lsearch, AC_CHECK_HEADER(search.h, AC_DEFINE(HAVE_LSEARCH) [LIBS="${LIBS} -lcompat"], AC_LIBOBJ(lsearch), -), AC_LIBOBJ(lsearch))])
31-AC_CHECK_FUNCS(utimes, [AC_CHECK_FUNCS(futimes futimesat, [break])], [AC_CHECK_FUNCS(futime) AC_LIBOBJ(utimes)])
32-SUDO_FUNC_FNMATCH(AC_DEFINE(HAVE_FNMATCH), AC_LIBOBJ(fnmatch))
33+AC_CHECK_FUNCS(lockf flock)
34+AC_CHECK_FUNCS(waitpid wait3)
35+AC_CHECK_FUNCS(innetgr _innetgr, [AC_CHECK_FUNCS(getdomainname)])
36+
37+AC_CHECK_FUNCS(lsearch, , [AC_CHECK_LIB(compat, lsearch, [AC_CHECK_HEADER(search.h, [AC_DEFINE(HAVE_LSEARCH) LIBS="$LIBS -lcompat"], [AC_LIBOBJ([lsearch])])], [AC_LIBOBJ([lsearch])])])
38+
39+AC_CHECK_FUNCS(utimes)
40+SUDO_FUNC_FNMATCH([AC_DEFINE([HAVE_FNMATCH], [1], [Define if you have the 'fnmatch' function.])], [AC_LIBOBJ([fnmatch])])
41 SUDO_FUNC_ISBLANK
42 AC_REPLACE_FUNCS(strerror strcasecmp sigaction strlcpy strlcat closefrom)
43 AC_CHECK_FUNCS(snprintf vsnprintf asprintf vasprintf, , [NEED_SNPRINTF=1])
44Index: sudo-1.6.8p12/aclocal.m4
45===================================================================
46--- sudo-1.6.8p12.orig/aclocal.m4 2004-09-08 03:14:51.000000000 +1000
47+++ sudo-1.6.8p12/aclocal.m4 2007-05-16 16:45:08.000000000 +1000
48@@ -9,7 +9,7 @@
49 dnl
50 dnl check for sendmail
51 dnl
52-AC_DEFUN(SUDO_PROG_SENDMAIL, [AC_MSG_CHECKING(for sendmail)
53+AC_DEFUN([SUDO_PROG_SENDMAIL], [AC_MSG_CHECKING(for sendmail)
54 if test -f "/usr/sbin/sendmail"; then
55 AC_MSG_RESULT(/usr/sbin/sendmail)
56 SUDO_DEFINE(_PATH_SUDO_SENDMAIL, "/usr/sbin/sendmail")
57@@ -36,7 +36,7 @@
58 dnl
59 dnl check for vi
60 dnl
61-AC_DEFUN(SUDO_PROG_VI, [AC_MSG_CHECKING(for vi)
62+AC_DEFUN([SUDO_PROG_VI], [AC_MSG_CHECKING(for vi)
63 if test -f "/usr/bin/vi"; then
64 AC_MSG_RESULT(/usr/bin/vi)
65 SUDO_DEFINE(_PATH_VI, "/usr/bin/vi")
66@@ -60,7 +60,7 @@
67 dnl
68 dnl check for mv
69 dnl
70-AC_DEFUN(SUDO_PROG_MV, [AC_MSG_CHECKING(for mv)
71+AC_DEFUN([SUDO_PROG_MV], [AC_MSG_CHECKING(for mv)
72 if test -f "/usr/bin/mv"; then
73 AC_MSG_RESULT(/usr/bin/mv)
74 SUDO_DEFINE(_PATH_MV, "/usr/bin/mv")
75@@ -81,7 +81,7 @@
76 dnl
77 dnl check for bourne shell
78 dnl
79-AC_DEFUN(SUDO_PROG_BSHELL, [AC_MSG_CHECKING(for bourne shell)
80+AC_DEFUN([SUDO_PROG_BSHELL], [AC_MSG_CHECKING(for bourne shell)
81 if test -f "/bin/sh"; then
82 AC_MSG_RESULT(/bin/sh)
83 SUDO_DEFINE(_PATH_BSHELL, "/bin/sh")
84@@ -114,7 +114,7 @@
85 dnl
86 dnl Where the log file goes, use /var/log if it exists, else /{var,usr}/adm
87 dnl
88-AC_DEFUN(SUDO_LOGFILE, [AC_MSG_CHECKING(for log file location)
89+AC_DEFUN([SUDO_LOGFILE], [AC_MSG_CHECKING(for log file location)
90 if test -n "$with_logpath"; then
91 AC_MSG_RESULT($with_logpath)
92 SUDO_DEFINE_UNQUOTED(_PATH_SUDO_LOGFILE, "$with_logpath")
93@@ -135,7 +135,7 @@
94 dnl
95 dnl Where the log file goes, use /var/log if it exists, else /{var,usr}/adm
96 dnl
97-AC_DEFUN(SUDO_TIMEDIR, [AC_MSG_CHECKING(for timestamp file location)
98+AC_DEFUN([SUDO_TIMEDIR], [AC_MSG_CHECKING(for timestamp file location)
99 if test -n "$with_timedir"; then
100 AC_MSG_RESULT($with_timedir)
101 SUDO_DEFINE_UNQUOTED(_PATH_SUDO_TIMEDIR, "$with_timedir")
102@@ -158,7 +158,7 @@
103 dnl
104 dnl check for fullly working void
105 dnl
106-AC_DEFUN(SUDO_FULL_VOID, [AC_MSG_CHECKING(for full void implementation)
107+AC_DEFUN([SUDO_FULL_VOID], [AC_MSG_CHECKING(for full void implementation)
108 AC_TRY_COMPILE(, [void *foo;
109 foo = (void *)0; (void *)"test";], AC_DEFINE(VOID, void, [Define to "void" if your compiler supports void pointers, else use "char"].)
110 AC_MSG_RESULT(yes), AC_DEFINE(VOID, char)
111@@ -168,7 +168,7 @@
112 dnl SUDO_CHECK_TYPE(TYPE, DEFAULT)
113 dnl XXX - should require the check for unistd.h...
114 dnl
115-AC_DEFUN(SUDO_CHECK_TYPE,
116+AC_DEFUN([SUDO_CHECK_TYPE],
117 [AC_REQUIRE([AC_HEADER_STDC])dnl
118 AC_MSG_CHECKING(for $1)
119 AC_CACHE_VAL(sudo_cv_type_$1,
120@@ -189,31 +189,31 @@
121 dnl
122 dnl Check for size_t declation
123 dnl
124-AC_DEFUN(SUDO_TYPE_SIZE_T,
125+AC_DEFUN([SUDO_TYPE_SIZE_T],
126 [SUDO_CHECK_TYPE(size_t, int)])
127
128 dnl
129 dnl Check for ssize_t declation
130 dnl
131-AC_DEFUN(SUDO_TYPE_SSIZE_T,
132+AC_DEFUN([SUDO_TYPE_SSIZE_T],
133 [SUDO_CHECK_TYPE(ssize_t, int)])
134
135 dnl
136 dnl Check for dev_t declation
137 dnl
138-AC_DEFUN(SUDO_TYPE_DEV_T,
139+AC_DEFUN([SUDO_TYPE_DEV_T],
140 [SUDO_CHECK_TYPE(dev_t, int)])
141
142 dnl
143 dnl Check for ino_t declation
144 dnl
145-AC_DEFUN(SUDO_TYPE_INO_T,
146+AC_DEFUN([SUDO_TYPE_INO_T],
147 [SUDO_CHECK_TYPE(ino_t, unsigned int)])
148
149 dnl
150 dnl check for working fnmatch(3)
151 dnl
152-AC_DEFUN(SUDO_FUNC_FNMATCH,
153+AC_DEFUN([SUDO_FUNC_FNMATCH],
154 [AC_MSG_CHECKING(for working fnmatch with FNM_CASEFOLD)
155 AC_CACHE_VAL(sudo_cv_func_fnmatch,
156 [rm -f conftestdata; > conftestdata
157@@ -224,9 +224,9 @@
158 rm -f core core.* *.core])dnl
159 AC_MSG_RESULT($sudo_cv_func_fnmatch)
160 if test $sudo_cv_func_fnmatch = yes; then
161- [$1]
162+ $1
163 else
164- [$2]
165+ $2
166 fi
167 ])
168
169@@ -246,7 +246,7 @@
170 dnl
171 dnl check for sa_len field in struct sockaddr
172 dnl
173-AC_DEFUN(SUDO_SOCK_SA_LEN,
174+AC_DEFUN([SUDO_SOCK_SA_LEN],
175 [AC_MSG_CHECKING(for sa_len field in struct sockaddr)
176 AC_CACHE_VAL(sudo_cv_sock_sa_len,
177 [AC_TRY_RUN([#include <sys/types.h>
178@@ -269,7 +269,7 @@
179 dnl we can't really trust UID_MAX or MAXUID since they may exist
180 dnl only for backwards compatibility.
181 dnl
182-AC_DEFUN(SUDO_UID_T_LEN,
183+AC_DEFUN([SUDO_UID_T_LEN],
184 [AC_REQUIRE([AC_TYPE_UID_T])
185 AC_MSG_CHECKING(max length of uid_t)
186 AC_CACHE_VAL(sudo_cv_uid_t_len,
187@@ -301,17 +301,29 @@
188
189 dnl
190 dnl check for "long long"
191-dnl XXX hard to cache since it includes 2 tests
192 dnl
193-AC_DEFUN(SUDO_LONG_LONG, [AC_MSG_CHECKING(for long long support)
194-AC_TRY_LINK(, [long long foo = 1000; foo /= 10;], AC_DEFINE(HAVE_LONG_LONG, 1, [Define if your compiler supports the "long long" type.])
195-[AC_TRY_RUN([main() {if (sizeof(long long) == sizeof(long)) exit(0); else exit(1);}], AC_DEFINE(LONG_IS_QUAD, 1, [Define if sizeof(long) == sizeof(long long).]))]
196-AC_MSG_RESULT(yes), AC_MSG_RESULT(no))])
197+AC_DEFUN([SUDO_TYPE_LONG_LONG],
198+[AC_CHECK_TYPES(long long, [AC_DEFINE(HAVE_LONG_LONG, 1, [Define if your
199+compiler supports the "long long" type.])]
200+[AC_MSG_CHECKING(for long and long long equivalence)
201+AC_CACHE_VAL(sudo_cv_type_long_is_quad,
202+[AC_TRY_RUN([
203+main() {
204+if (sizeof(long long) == sizeof(long)) exit(0);
205+else exit(1);
206+}], [sudo_cv_type_long_is_quad=yes],
207+[sudo_cv_type_long_is_quad=no], [sudo_cv_type_long_is_quad=no])
208+rm -f core core.* *.core])dnl
209+AC_MSG_RESULT($sudo_cv_type_long_is_quad)
210+if test $sudo_cv_type_long_is_quad = yes; then
211+ AC_DEFINE(LONG_IS_QUAD, 1, [Define if sizeof(long) == sizeof(long long).])
212+fi
213+])])
214
215 dnl
216 dnl append a libpath to an LDFLAGS style variable
217 dnl
218-AC_DEFUN(SUDO_APPEND_LIBPATH, [
219+AC_DEFUN([SUDO_APPEND_LIBPATH], [
220 if test X"$with_rpath" = X"yes"; then
221 $1="${$1} -L$2 -R$2"
222 else
diff --git a/meta/packages/sudo/files/autofoo1.patch b/meta/packages/sudo/files/autofoo1.patch
new file mode 100644
index 0000000000..995f026a83
--- /dev/null
+++ b/meta/packages/sudo/files/autofoo1.patch
@@ -0,0 +1,222 @@
1Index: sudo-1.6.8p12/configure.in
2===================================================================
3--- sudo-1.6.8p12.orig/configure.in 2004-11-26 04:31:20.000000000 +1100
4+++ sudo-1.6.8p12/configure.in 2007-05-16 16:45:20.000000000 +1000
5@@ -1609,7 +1609,7 @@
6 AC_CHECK_FUNCS(getspnam, [CHECKSHADOW="false"], [AC_CHECK_LIB(gen, getspnam, AC_DEFINE(HAVE_GETSPNAM) [SUDO_LIBS="${SUDO_LIBS} -lgen"; LIBS="${LIBS} -lgen"])])
7 fi
8 if test "$CHECKSHADOW" = "true"; then
9- AC_CHECK_FUNC(getprpwnam, [AC_DEFINE(HAVE_GETPRPWNAM) [CHECKSHADOW="false"; SECUREWARE=1], AC_CHECK_LIB(sec, getprpwnam, AC_DEFINE(HAVE_GETPRPWNAM) [CHECKSHADOW="false"; SECUREWARE=1; SUDO_LIBS="${SUDO_LIBS} -lsec"; LIBS="${LIBS} -lsec"], AC_CHECK_LIB(security, getprpwnam, AC_DEFINE(HAVE_GETPRPWNAM) [CHECKSHADOW="false"; SECUREWARE=1; SUDO_LIBS="${SUDO_LIBS} -lsecurity"; LIBS="${LIBS} -lsecurity"], AC_CHECK_LIB(prot, getprpwnam, AC_DEFINE(HAVE_GETPRPWNAM) [CHECKSHADOW="false"; SECUREWARE=1; SUDO_LIBS="${SUDO_LIBS} -lprot"; LIBS="${LIBS} -lprot"])))])
10+ AC_CHECK_FUNC(getprpwnam, [AC_DEFINE(HAVE_GETPRPWNAM) CHECKSHADOW="false"; SECUREWARE=1], [AC_CHECK_LIB(sec, getprpwnam, [AC_DEFINE(HAVE_GETPRPWNAM) CHECKSHADOW="false"; SECUREWARE=1; SUDO_LIBS="${SUDO_LIBS} -lsec"; LIBS="${LIBS} -lsec"], [AC_CHECK_LIB(security, getprpwnam, [AC_DEFINE(HAVE_GETPRPWNAM) CHECKSHADOW="false"; SECUREWARE=1; SUDO_LIBS="${SUDO_LIBS} -lsecurity"; LIBS="${LIBS} -lsecurity"], [AC_CHECK_LIB(prot, getprpwnam, [AC_DEFINE(HAVE_GETPRPWNAM) CHECKSHADOW="false"; SECUREWARE=1; SUDO_LIBS="${SUDO_LIBS} -lprot"; LIBS="${LIBS} -lprot"])])])])
11 fi
12
13 dnl
14@@ -1670,7 +1670,7 @@
15 SUDO_TYPE_INO_T
16 SUDO_FULL_VOID
17 SUDO_UID_T_LEN
18-SUDO_LONG_LONG
19+SUDO_TYPE_LONG_LONG
20 SUDO_SOCK_SA_LEN
21 dnl
22 dnl only set RETSIGTYPE if it is not set already
23@@ -1700,12 +1700,14 @@
24 if test -z "$BROKEN_GETCWD"; then
25 AC_REPLACE_FUNCS(getcwd)
26 fi
27-AC_CHECK_FUNCS(lockf flock, [break])
28-AC_CHECK_FUNCS(waitpid wait3, [break])
29-AC_CHECK_FUNCS(innetgr _innetgr, [AC_CHECK_FUNCS(getdomainname) [break]])
30-AC_CHECK_FUNCS(lsearch, , [AC_CHECK_LIB(compat, lsearch, AC_CHECK_HEADER(search.h, AC_DEFINE(HAVE_LSEARCH) [LIBS="${LIBS} -lcompat"], AC_LIBOBJ(lsearch), -), AC_LIBOBJ(lsearch))])
31-AC_CHECK_FUNCS(utimes, [AC_CHECK_FUNCS(futimes futimesat, [break])], [AC_CHECK_FUNCS(futime) AC_LIBOBJ(utimes)])
32-SUDO_FUNC_FNMATCH(AC_DEFINE(HAVE_FNMATCH), AC_LIBOBJ(fnmatch))
33+AC_CHECK_FUNCS(lockf flock)
34+AC_CHECK_FUNCS(waitpid wait3)
35+AC_CHECK_FUNCS(innetgr _innetgr, [AC_CHECK_FUNCS(getdomainname)])
36+
37+AC_CHECK_FUNCS(lsearch, , [AC_CHECK_LIB(compat, lsearch, [AC_CHECK_HEADER(search.h, [AC_DEFINE(HAVE_LSEARCH) LIBS="$LIBS -lcompat"], [AC_LIBOBJ([lsearch])])], [AC_LIBOBJ([lsearch])])])
38+
39+AC_CHECK_FUNCS(utimes)
40+SUDO_FUNC_FNMATCH([AC_DEFINE([HAVE_FNMATCH], [1], [Define if you have the 'fnmatch' function.])], [AC_LIBOBJ([fnmatch])])
41 SUDO_FUNC_ISBLANK
42 AC_REPLACE_FUNCS(strerror strcasecmp sigaction strlcpy strlcat closefrom)
43 AC_CHECK_FUNCS(snprintf vsnprintf asprintf vasprintf, , [NEED_SNPRINTF=1])
44Index: sudo-1.6.8p12/aclocal.m4
45===================================================================
46--- sudo-1.6.8p12.orig/aclocal.m4 2004-09-08 03:14:51.000000000 +1000
47+++ sudo-1.6.8p12/aclocal.m4 2007-05-16 16:45:08.000000000 +1000
48@@ -9,7 +9,7 @@
49 dnl
50 dnl check for sendmail
51 dnl
52-AC_DEFUN(SUDO_PROG_SENDMAIL, [AC_MSG_CHECKING(for sendmail)
53+AC_DEFUN([SUDO_PROG_SENDMAIL], [AC_MSG_CHECKING(for sendmail)
54 if test -f "/usr/sbin/sendmail"; then
55 AC_MSG_RESULT(/usr/sbin/sendmail)
56 SUDO_DEFINE(_PATH_SUDO_SENDMAIL, "/usr/sbin/sendmail")
57@@ -36,7 +36,7 @@
58 dnl
59 dnl check for vi
60 dnl
61-AC_DEFUN(SUDO_PROG_VI, [AC_MSG_CHECKING(for vi)
62+AC_DEFUN([SUDO_PROG_VI], [AC_MSG_CHECKING(for vi)
63 if test -f "/usr/bin/vi"; then
64 AC_MSG_RESULT(/usr/bin/vi)
65 SUDO_DEFINE(_PATH_VI, "/usr/bin/vi")
66@@ -60,7 +60,7 @@
67 dnl
68 dnl check for mv
69 dnl
70-AC_DEFUN(SUDO_PROG_MV, [AC_MSG_CHECKING(for mv)
71+AC_DEFUN([SUDO_PROG_MV], [AC_MSG_CHECKING(for mv)
72 if test -f "/usr/bin/mv"; then
73 AC_MSG_RESULT(/usr/bin/mv)
74 SUDO_DEFINE(_PATH_MV, "/usr/bin/mv")
75@@ -81,7 +81,7 @@
76 dnl
77 dnl check for bourne shell
78 dnl
79-AC_DEFUN(SUDO_PROG_BSHELL, [AC_MSG_CHECKING(for bourne shell)
80+AC_DEFUN([SUDO_PROG_BSHELL], [AC_MSG_CHECKING(for bourne shell)
81 if test -f "/bin/sh"; then
82 AC_MSG_RESULT(/bin/sh)
83 SUDO_DEFINE(_PATH_BSHELL, "/bin/sh")
84@@ -114,7 +114,7 @@
85 dnl
86 dnl Where the log file goes, use /var/log if it exists, else /{var,usr}/adm
87 dnl
88-AC_DEFUN(SUDO_LOGFILE, [AC_MSG_CHECKING(for log file location)
89+AC_DEFUN([SUDO_LOGFILE], [AC_MSG_CHECKING(for log file location)
90 if test -n "$with_logpath"; then
91 AC_MSG_RESULT($with_logpath)
92 SUDO_DEFINE_UNQUOTED(_PATH_SUDO_LOGFILE, "$with_logpath")
93@@ -135,7 +135,7 @@
94 dnl
95 dnl Where the log file goes, use /var/log if it exists, else /{var,usr}/adm
96 dnl
97-AC_DEFUN(SUDO_TIMEDIR, [AC_MSG_CHECKING(for timestamp file location)
98+AC_DEFUN([SUDO_TIMEDIR], [AC_MSG_CHECKING(for timestamp file location)
99 if test -n "$with_timedir"; then
100 AC_MSG_RESULT($with_timedir)
101 SUDO_DEFINE_UNQUOTED(_PATH_SUDO_TIMEDIR, "$with_timedir")
102@@ -158,7 +158,7 @@
103 dnl
104 dnl check for fullly working void
105 dnl
106-AC_DEFUN(SUDO_FULL_VOID, [AC_MSG_CHECKING(for full void implementation)
107+AC_DEFUN([SUDO_FULL_VOID], [AC_MSG_CHECKING(for full void implementation)
108 AC_TRY_COMPILE(, [void *foo;
109 foo = (void *)0; (void *)"test";], AC_DEFINE(VOID, void, [Define to "void" if your compiler supports void pointers, else use "char"].)
110 AC_MSG_RESULT(yes), AC_DEFINE(VOID, char)
111@@ -168,7 +168,7 @@
112 dnl SUDO_CHECK_TYPE(TYPE, DEFAULT)
113 dnl XXX - should require the check for unistd.h...
114 dnl
115-AC_DEFUN(SUDO_CHECK_TYPE,
116+AC_DEFUN([SUDO_CHECK_TYPE],
117 [AC_REQUIRE([AC_HEADER_STDC])dnl
118 AC_MSG_CHECKING(for $1)
119 AC_CACHE_VAL(sudo_cv_type_$1,
120@@ -189,31 +189,31 @@
121 dnl
122 dnl Check for size_t declation
123 dnl
124-AC_DEFUN(SUDO_TYPE_SIZE_T,
125+AC_DEFUN([SUDO_TYPE_SIZE_T],
126 [SUDO_CHECK_TYPE(size_t, int)])
127
128 dnl
129 dnl Check for ssize_t declation
130 dnl
131-AC_DEFUN(SUDO_TYPE_SSIZE_T,
132+AC_DEFUN([SUDO_TYPE_SSIZE_T],
133 [SUDO_CHECK_TYPE(ssize_t, int)])
134
135 dnl
136 dnl Check for dev_t declation
137 dnl
138-AC_DEFUN(SUDO_TYPE_DEV_T,
139+AC_DEFUN([SUDO_TYPE_DEV_T],
140 [SUDO_CHECK_TYPE(dev_t, int)])
141
142 dnl
143 dnl Check for ino_t declation
144 dnl
145-AC_DEFUN(SUDO_TYPE_INO_T,
146+AC_DEFUN([SUDO_TYPE_INO_T],
147 [SUDO_CHECK_TYPE(ino_t, unsigned int)])
148
149 dnl
150 dnl check for working fnmatch(3)
151 dnl
152-AC_DEFUN(SUDO_FUNC_FNMATCH,
153+AC_DEFUN([SUDO_FUNC_FNMATCH],
154 [AC_MSG_CHECKING(for working fnmatch with FNM_CASEFOLD)
155 AC_CACHE_VAL(sudo_cv_func_fnmatch,
156 [rm -f conftestdata; > conftestdata
157@@ -224,9 +224,9 @@
158 rm -f core core.* *.core])dnl
159 AC_MSG_RESULT($sudo_cv_func_fnmatch)
160 if test $sudo_cv_func_fnmatch = yes; then
161- [$1]
162+ $1
163 else
164- [$2]
165+ $2
166 fi
167 ])
168
169@@ -246,7 +246,7 @@
170 dnl
171 dnl check for sa_len field in struct sockaddr
172 dnl
173-AC_DEFUN(SUDO_SOCK_SA_LEN,
174+AC_DEFUN([SUDO_SOCK_SA_LEN],
175 [AC_MSG_CHECKING(for sa_len field in struct sockaddr)
176 AC_CACHE_VAL(sudo_cv_sock_sa_len,
177 [AC_TRY_RUN([#include <sys/types.h>
178@@ -269,7 +269,7 @@
179 dnl we can't really trust UID_MAX or MAXUID since they may exist
180 dnl only for backwards compatibility.
181 dnl
182-AC_DEFUN(SUDO_UID_T_LEN,
183+AC_DEFUN([SUDO_UID_T_LEN],
184 [AC_REQUIRE([AC_TYPE_UID_T])
185 AC_MSG_CHECKING(max length of uid_t)
186 AC_CACHE_VAL(sudo_cv_uid_t_len,
187@@ -301,17 +301,29 @@
188
189 dnl
190 dnl check for "long long"
191-dnl XXX hard to cache since it includes 2 tests
192 dnl
193-AC_DEFUN(SUDO_LONG_LONG, [AC_MSG_CHECKING(for long long support)
194-AC_TRY_LINK(, [long long foo = 1000; foo /= 10;], AC_DEFINE(HAVE_LONG_LONG, 1, [Define if your compiler supports the "long long" type.])
195-[AC_TRY_RUN([main() {if (sizeof(long long) == sizeof(long)) exit(0); else exit(1);}], AC_DEFINE(LONG_IS_QUAD, 1, [Define if sizeof(long) == sizeof(long long).]))]
196-AC_MSG_RESULT(yes), AC_MSG_RESULT(no))])
197+AC_DEFUN([SUDO_TYPE_LONG_LONG],
198+[AC_CHECK_TYPES(long long, [AC_DEFINE(HAVE_LONG_LONG, 1, [Define if your
199+compiler supports the "long long" type.])]
200+[AC_MSG_CHECKING(for long and long long equivalence)
201+AC_CACHE_VAL(sudo_cv_type_long_is_quad,
202+[AC_TRY_RUN([
203+main() {
204+if (sizeof(long long) == sizeof(long)) exit(0);
205+else exit(1);
206+}], [sudo_cv_type_long_is_quad=yes],
207+[sudo_cv_type_long_is_quad=no], [sudo_cv_type_long_is_quad=no])
208+rm -f core core.* *.core])dnl
209+AC_MSG_RESULT($sudo_cv_type_long_is_quad)
210+if test $sudo_cv_type_long_is_quad = yes; then
211+ AC_DEFINE(LONG_IS_QUAD, 1, [Define if sizeof(long) == sizeof(long long).])
212+fi
213+])])
214
215 dnl
216 dnl append a libpath to an LDFLAGS style variable
217 dnl
218-AC_DEFUN(SUDO_APPEND_LIBPATH, [
219+AC_DEFUN([SUDO_APPEND_LIBPATH], [
220 if test X"$with_rpath" = X"yes"; then
221 $1="${$1} -L$2 -R$2"
222 else
diff --git a/meta/packages/sudo/files/noexec-link.patch b/meta/packages/sudo/files/noexec-link.patch
new file mode 100644
index 0000000000..98b35c657b
--- /dev/null
+++ b/meta/packages/sudo/files/noexec-link.patch
@@ -0,0 +1,13 @@
1Index: sudo-1.6.8p6/Makefile.in
2===================================================================
3--- sudo-1.6.8p6.orig/Makefile.in 2005-01-21 19:09:26.963276656 -0500
4+++ sudo-1.6.8p6/Makefile.in 2005-01-21 19:16:11.918714072 -0500
5@@ -187,7 +187,7 @@
6 $(CC) -o $@ $(TESTOBJS) $(LIBOBJS) $(LDFLAGS) $(LIBS) $(NET_LIBS)
7
8 sudo_noexec.la: sudo_noexec.lo
9- $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $@ sudo_noexec.lo -avoid-version -rpath $(noexecdir)
10+ $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $@ sudo_noexec.lo -avoid-version -module -rpath $(noexecdir)
11
12 # Uncomment the following if you want "make distclean" to clean the parser
13 @DEV@PARSESRCS = sudo.tab.h sudo.tab.c lex.yy.c def_data.c def_data.h
diff --git a/meta/packages/sudo/files/nonrootinstall.patch b/meta/packages/sudo/files/nonrootinstall.patch
new file mode 100644
index 0000000000..db174b373f
--- /dev/null
+++ b/meta/packages/sudo/files/nonrootinstall.patch
@@ -0,0 +1,56 @@
1
2#
3# Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher
4#
5
6Index: sudo-1.6.8p5/Makefile.in
7===================================================================
8--- sudo-1.6.8p5.orig/Makefile.in 2004-11-25 12:27:00.000000000 -0500
9+++ sudo-1.6.8p5/Makefile.in 2005-01-21 18:02:00.447440568 -0500
10@@ -81,10 +81,16 @@
11 mandirform = $(mandir)/$(mantype)$(mansectform)
12
13 # User and group ids the installed files should be "owned" by
14+ifeq ($(DESTDIR),)
15+install_owncmd = -o $(install_uid) -g $(install_gid)
16+endif
17 install_uid = 0
18 install_gid = 0
19
20 # User, group, and mode the sudoers file should be "owned" by (configure)
21+ifeq ($(DESTDIR),)
22+sudoers_owncmd = -o $(sudoers_uid) -g $(sudoers_gid)
23+endif
24 sudoers_uid = @SUDOERS_UID@
25 sudoers_gid = @SUDOERS_GID@
26 sudoers_mode = @SUDOERS_MODE@
27@@ -301,12 +307,11 @@
28 $(DESTDIR)$(noexecdir)
29
30 install-binaries: $(PROGS)
31- $(INSTALL) -O $(install_uid) -G $(install_gid) -M 4111 -s sudo $(DESTDIR)$(sudodir)/sudo
32+ $(INSTALL) $(install_owncmd) -m 4555 -s sudo $(DESTDIR)$(sudodir)/sudo
33+ $(INSTALL) $(install_owncmd) -m 0555 -s visudo $(DESTDIR)$(visudodir)/visudo
34 rm -f $(DESTDIR)$(sudodir)/sudoedit
35 ln $(DESTDIR)$(sudodir)/sudo $(DESTDIR)$(sudodir)/sudoedit
36
37- $(INSTALL) -O $(install_uid) -G $(install_gid) -M 0111 -s visudo $(DESTDIR)$(visudodir)/visudo
38-
39 install-noexec: sudo_noexec.la
40 $(LIBTOOL) --mode=install $(INSTALL) sudo_noexec.la $(DESTDIR)$(noexecdir)
41
42@@ -319,11 +324,11 @@
43 $(srcdir)/sudoers $(DESTDIR)$(sudoersdir)/sudoers
44
45 install-man:
46- $(INSTALL) -O $(install_uid) -G $(install_gid) -M 0444 @mansrcdir@/sudo.$(mantype) $(DESTDIR)$(mandirsu)/sudo.$(mansectsu)
47+ $(INSTALL) $(install_owncmd) -m 0444 @mansrcdir@/sudo.$(mantype) $(DESTDIR)$(mandirsu)/sudo.$(mansectsu)
48 @rm -f $(DESTDIR)$(mandirsu)/sudoedit.$(mansectsu)
49 ln $(DESTDIR)$(mandirsu)/sudo.$(mansectsu) $(DESTDIR)$(mandirsu)/sudoedit.$(mansectsu)
50- $(INSTALL) -O $(install_uid) -G $(install_gid) -M 0444 @mansrcdir@/visudo.$(mantype) $(DESTDIR)$(mandirsu)/visudo.$(mansectsu)
51- $(INSTALL) -O $(install_uid) -G $(install_gid) -M 0444 @mansrcdir@/sudoers.$(mantype) $(DESTDIR)$(mandirform)/sudoers.$(mansectform)
52+ $(INSTALL) $(install_owncmd) -m 0444 @mansrcdir@/visudo.$(mantype) $(DESTDIR)$(mandirsu)/visudo.$(mansectsu)
53+ $(INSTALL) $(install_owncmd) -m 0444 @mansrcdir@/sudoers.$(mantype) $(DESTDIR)$(mandirform)/sudoers.$(mansectform)
54 @MAN_POSTINSTALL@
55
56 check:
diff --git a/meta/packages/sudo/files/nostrip.patch b/meta/packages/sudo/files/nostrip.patch
new file mode 100644
index 0000000000..287d43a8e7
--- /dev/null
+++ b/meta/packages/sudo/files/nostrip.patch
@@ -0,0 +1,20 @@
1
2#
3# Patch managed by http://www.holgerschurig.de/patcher.html
4#
5
6Index: sudo-1.6.8p5/Makefile.in
7===================================================================
8--- sudo-1.6.8p5.orig/Makefile.in 2005-01-21 18:19:05.762568976 -0500
9+++ sudo-1.6.8p5/Makefile.in 2005-01-21 18:19:34.701169640 -0500
10@@ -307,8 +307,8 @@
11 $(DESTDIR)$(noexecdir)
12
13 install-binaries: $(PROGS)
14- $(INSTALL) $(install_owncmd) -m 4555 -s sudo $(DESTDIR)$(sudodir)/sudo
15- $(INSTALL) $(install_owncmd) -m 0555 -s visudo $(DESTDIR)$(visudodir)/visudo
16+ $(INSTALL) $(install_owncmd) -m 4555 sudo $(DESTDIR)$(sudodir)/sudo
17+ $(INSTALL) $(install_owncmd) -m 0555 visudo $(DESTDIR)$(visudodir)/visudo
18 rm -f $(DESTDIR)$(sudodir)/sudoedit
19 ln $(DESTDIR)$(sudodir)/sudo $(DESTDIR)$(sudodir)/sudoedit
20
diff --git a/meta/packages/sudo/site/bit-32 b/meta/packages/sudo/site/bit-32
new file mode 100644
index 0000000000..9b7ca5c81b
--- /dev/null
+++ b/meta/packages/sudo/site/bit-32
@@ -0,0 +1,2 @@
1# is sizeof(long long) == sizeof(long)
2sudo_cv_type_long_is_quad=${sudo_cv_type_long_is_quad=no}
diff --git a/meta/packages/sudo/site/bit-64 b/meta/packages/sudo/site/bit-64
new file mode 100644
index 0000000000..05846ff0aa
--- /dev/null
+++ b/meta/packages/sudo/site/bit-64
@@ -0,0 +1,2 @@
1# is sizeof(long long) == sizeof(long)
2sudo_cv_type_long_is_quad=${sudo_cv_type_long_is_quad=yes}
diff --git a/meta/packages/sudo/sudo.inc b/meta/packages/sudo/sudo.inc
new file mode 100644
index 0000000000..0dfb22ba8a
--- /dev/null
+++ b/meta/packages/sudo/sudo.inc
@@ -0,0 +1,28 @@
1DESCRIPTION = "Sudo (superuser do) allows a system \
2administrator to give certain users (or groups of \
3users) the ability to run some (or all) commands \
4as root while logging all commands and arguments."
5LICENSE = "sudo"
6HOMEPAGE = "http://www.courtesan.com/sudo/"
7PRIORITY = "optional"
8SECTION = "admin"
9
10inherit autotools
11
12EXTRA_OECONF = "--with-editor=/bin/vi --with-env-editor"
13
14do_configure_prepend () {
15 rm -f acsite.m4
16 if [ ! -e acinclude.m4 ]; then
17 cat aclocal.m4 > acinclude.m4
18 fi
19}
20
21pkg_postinst() {
22 if [ "x$D" != "x" ]; then
23 exit 1
24 fi
25
26 chmod 4111 /usr/bin/sudo
27 chmod 0440 /etc/sudoers
28}
diff --git a/meta/packages/sudo/sudo_1.6.8p12.bb b/meta/packages/sudo/sudo_1.6.8p12.bb
new file mode 100644
index 0000000000..1764df5039
--- /dev/null
+++ b/meta/packages/sudo/sudo_1.6.8p12.bb
@@ -0,0 +1,12 @@
1PR = "r3"
2
3SRC_URI = "http://ftp.sudo.ws/sudo/dist/OLD/sudo-1.6.8.tar.gz \
4 http://ftp.sudo.ws/sudo/dist/OLD/sudo-1.6.8p12.patch.gz;patch=1 \
5 file://nonrootinstall.patch;patch=1 \
6 file://nostrip.patch;patch=1 \
7 file://autofoo.patch;patch=1 \
8 file://noexec-link.patch;patch=1"
9
10require sudo.inc
11
12S = "${WORKDIR}/sudo-1.6.8"