diff options
author | chunrong guo <b40290@freescale.com> | 2012-11-20 07:10:37 +0000 |
---|---|---|
committer | Joe MacDonald <joe.macdonald@windriver.com> | 2012-11-27 14:43:58 -0500 |
commit | 11a6ce97f710fe6578a92edc5409b0aa315da79f (patch) | |
tree | 6ad2b7bc3c56c13a5296ac617dfa9909f07d095c | |
parent | eb63724f431a0fb6b2fec1bd84ae7f04cb8744df (diff) | |
download | meta-openembedded-11a6ce97f710fe6578a92edc5409b0aa315da79f.tar.gz |
inetutils : Update to 1.9.1
* There are difference spaces between inetutils-1.8/COPYING
and inetutils-1.9.1/COPYING,so md5sum is changed.
* the following patches are accepted by inetutils 1.9.1 upstream
inetutils-1.8-1005-ftpd-add-daemon-D-nommu-support.patch
inetutils-1.8-1004-detect-fork-support.patch
inetutils-1.8-1003-use-daemon-from-the-C-library-when-possible.patch
inetutils-1.8-1002-rshd-detect-__rcmd_errstr-support-in-the-C-lib.patch
inetutils-1.8-1001-ftp-rename-ruserpass-to-avoid-C-library-collision.patch
inetutils-1.8-0002-argp-fix-program_invocation_name-detection.patch
Signed-off-by: Chunrong Guo <b40290@freescale.com>
13 files changed, 67 insertions, 380 deletions
diff --git a/meta-networking/recipes-connectivity/inetutils/inetutils-1.9.1/disable-pre-ANSI-compilers.patch b/meta-networking/recipes-connectivity/inetutils/inetutils-1.9.1/disable-pre-ANSI-compilers.patch new file mode 100644 index 000000000..a7fa61c79 --- /dev/null +++ b/meta-networking/recipes-connectivity/inetutils/inetutils-1.9.1/disable-pre-ANSI-compilers.patch | |||
@@ -0,0 +1,16 @@ | |||
1 | Upstream-Status: Pending | ||
2 | |||
3 | disable pre-ANSI compilers | ||
4 | |||
5 | Signed-off-by: Chunrong Guo <b40290@freescale.com> | ||
6 | --- inetutils-1.9.1/configure.ac 2012-01-06 22:05:05.000000000 +0800 | ||
7 | +++ inetutils-1.9.1/configure.ac 2012-11-12 14:05:30.756957063 +0800 | ||
8 | @@ -586,7 +586,7 @@ | ||
9 | #include <arpa/tftp.h>]) | ||
10 | |||
11 | ### Checks for compiler characteristics. | ||
12 | -AM_C_PROTOTYPES dnl FIXME: Does inetutils even compile on pre-ANSI compilers? | ||
13 | +#AM_C_PROTOTYPES dnl FIXME: Does inetutils even compile on pre-ANSI compilers? | ||
14 | AC_C_CONST | ||
15 | |||
16 | dnl See if `weak refs' are possible; these make it possible (with shared | ||
diff --git a/meta-oe/recipes-connectivity/inetutils/inetutils-1.8/fix-disable-ipv6.patch b/meta-networking/recipes-connectivity/inetutils/inetutils-1.9.1/fix-disable-ipv6.patch index 75d51a1b0..bd3ae476b 100644 --- a/meta-oe/recipes-connectivity/inetutils/inetutils-1.8/fix-disable-ipv6.patch +++ b/meta-networking/recipes-connectivity/inetutils/inetutils-1.9.1/fix-disable-ipv6.patch | |||
@@ -1,5 +1,7 @@ | |||
1 | Upstream: http://www.mail-archive.com/bug-inetutils@gnu.org/msg02103.html | 1 | Upstream: http://www.mail-archive.com/bug-inetutils@gnu.org/msg02103.html |
2 | 2 | ||
3 | Upstream-Status: Pending | ||
4 | |||
3 | diff -ur inetutils-1.8.orig/ping/ping_common.h inetutils-1.8/ping/ping_common.h | 5 | diff -ur inetutils-1.8.orig/ping/ping_common.h inetutils-1.8/ping/ping_common.h |
4 | --- inetutils-1.8.orig/ping/ping_common.h 2010-05-15 20:55:47.000000000 +0930 | 6 | --- inetutils-1.8.orig/ping/ping_common.h 2010-05-15 20:55:47.000000000 +0930 |
5 | +++ inetutils-1.8/ping/ping_common.h 2010-12-01 12:19:08.000000000 +1030 | 7 | +++ inetutils-1.8/ping/ping_common.h 2010-12-01 12:19:08.000000000 +1030 |
diff --git a/meta-oe/recipes-connectivity/inetutils/inetutils-1.8/inetutils-1.8-0001-printf-parse-pull-in-features.h-for-__GLIBC__.patch b/meta-networking/recipes-connectivity/inetutils/inetutils-1.9.1/inetutils-1.8-0001-printf-parse-pull-in-features.h-for-__GLIBC__.patch index d328f1336..3da4e9f55 100644 --- a/meta-oe/recipes-connectivity/inetutils/inetutils-1.8/inetutils-1.8-0001-printf-parse-pull-in-features.h-for-__GLIBC__.patch +++ b/meta-networking/recipes-connectivity/inetutils/inetutils-1.9.1/inetutils-1.8-0001-printf-parse-pull-in-features.h-for-__GLIBC__.patch | |||
@@ -3,6 +3,8 @@ From: Mike Frysinger <vapier at gentoo.org> | |||
3 | Date: Thu, 18 Nov 2010 16:59:14 -0500 | 3 | Date: Thu, 18 Nov 2010 16:59:14 -0500 |
4 | Subject: [PATCH gnulib] printf-parse: pull in features.h for __GLIBC__ | 4 | Subject: [PATCH gnulib] printf-parse: pull in features.h for __GLIBC__ |
5 | 5 | ||
6 | Upstream-Status: Pending | ||
7 | |||
6 | Signed-off-by: Mike Frysinger <vapier at gentoo.org> | 8 | Signed-off-by: Mike Frysinger <vapier at gentoo.org> |
7 | --- | 9 | --- |
8 | lib/printf-parse.h | 3 +++ | 10 | lib/printf-parse.h | 3 +++ |
diff --git a/meta-oe/recipes-connectivity/inetutils/inetutils-1.8/inetutils-1.8-0003-wchar.patch b/meta-networking/recipes-connectivity/inetutils/inetutils-1.9.1/inetutils-1.8-0003-wchar.patch index 21635a762..b13bb9229 100644 --- a/meta-oe/recipes-connectivity/inetutils/inetutils-1.8/inetutils-1.8-0003-wchar.patch +++ b/meta-networking/recipes-connectivity/inetutils/inetutils-1.9.1/inetutils-1.8-0003-wchar.patch | |||
@@ -1,3 +1,5 @@ | |||
1 | Upstream-Status: Pending | ||
2 | |||
1 | --- inetutils-1.8/lib/wchar.in.h | 3 | --- inetutils-1.8/lib/wchar.in.h |
2 | +++ inetutils-1.8/lib/wchar.in.h | 4 | +++ inetutils-1.8/lib/wchar.in.h |
3 | @@ -70,6 +70,9 @@ | 5 | @@ -70,6 +70,9 @@ |
diff --git a/meta-networking/recipes-connectivity/inetutils/inetutils-1.9.1/remove-gets.patch b/meta-networking/recipes-connectivity/inetutils/inetutils-1.9.1/remove-gets.patch new file mode 100644 index 000000000..61d16e3a7 --- /dev/null +++ b/meta-networking/recipes-connectivity/inetutils/inetutils-1.9.1/remove-gets.patch | |||
@@ -0,0 +1,21 @@ | |||
1 | Uptream-Status: Pending | ||
2 | |||
3 | remove gets function | ||
4 | |||
5 | Signed-off-by: Chunrong Guo <b40290@freescale.com> | ||
6 | --- inetutils-1.9.1.org/lib/stdio.in.h 2012-01-06 22:11:13.000000000 +0800 | ||
7 | +++ inetutils-1.9.1/lib/stdio.in.h 2012-11-12 14:30:49.044958001 +0800 | ||
8 | @@ -715,9 +715,13 @@ | ||
9 | /* It is very rare that the developer ever has full control of stdin, | ||
10 | so any use of gets warrants an unconditional warning. Assume it is | ||
11 | always declared, since it is required by C89. */ | ||
12 | +#if defined gets | ||
13 | +#undef gets | ||
14 | _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"); | ||
15 | #endif | ||
16 | |||
17 | +#endif | ||
18 | + | ||
19 | |||
20 | #if @GNULIB_OBSTACK_PRINTF@ || @GNULIB_OBSTACK_PRINTF_POSIX@ | ||
21 | struct obstack; | ||
diff --git a/meta-networking/recipes-connectivity/inetutils/inetutils-1.9.1/version.patch b/meta-networking/recipes-connectivity/inetutils/inetutils-1.9.1/version.patch new file mode 100644 index 000000000..ac3181ddb --- /dev/null +++ b/meta-networking/recipes-connectivity/inetutils/inetutils-1.9.1/version.patch | |||
@@ -0,0 +1,17 @@ | |||
1 | Upstream-Status: Pending | ||
2 | |||
3 | remove m4_esyscmd function | ||
4 | |||
5 | Signed-off-by: Chunrong Guo <b40290@freescale.com> | ||
6 | --- inetutils-1.9.1/configure.ac 2012-01-06 22:05:05.000000000 +0800 | ||
7 | +++ inetutils-1.9.1/configure.ac 2012-11-12 14:01:11.732957019 +0800 | ||
8 | @@ -20,8 +20,7 @@ | ||
9 | |||
10 | AC_PREREQ(2.59) | ||
11 | |||
12 | -AC_INIT([GNU inetutils], | ||
13 | - m4_esyscmd([build-aux/git-version-gen .tarball-version 's/inetutils-/v/;s/_/./g']), | ||
14 | +AC_INIT([GNU inetutils],[1.9.1], | ||
15 | [bug-inetutils@gnu.org]) | ||
16 | |||
17 | AC_CONFIG_SRCDIR([src/inetd.c]) | ||
diff --git a/meta-oe/recipes-connectivity/inetutils/inetutils_1.8.bb b/meta-networking/recipes-connectivity/inetutils/inetutils_1.9.1.bb index ce0df82db..81457d7d6 100644 --- a/meta-oe/recipes-connectivity/inetutils/inetutils_1.8.bb +++ b/meta-networking/recipes-connectivity/inetutils/inetutils_1.9.1.bb | |||
@@ -6,21 +6,19 @@ SECTION = "libs" | |||
6 | DEPENDS = "ncurses" | 6 | DEPENDS = "ncurses" |
7 | LICENSE = "GPLv3" | 7 | LICENSE = "GPLv3" |
8 | 8 | ||
9 | LIC_FILES_CHKSUM = "file://COPYING;md5=adefda309052235aa5d1e99ce7557010" | 9 | LIC_FILES_CHKSUM = "file://COPYING;md5=0c7051aef9219dc7237f206c5c4179a7" |
10 | |||
10 | 11 | ||
11 | SRC_URI = "${GNU_MIRROR}/inetutils/inetutils-${PV}.tar.gz \ | 12 | SRC_URI = "${GNU_MIRROR}/inetutils/inetutils-${PV}.tar.gz \ |
13 | file://disable-pre-ANSI-compilers.patch \ | ||
14 | file://version.patch \ | ||
15 | file://remove-gets.patch \ | ||
12 | file://inetutils-1.8-0001-printf-parse-pull-in-features.h-for-__GLIBC__.patch \ | 16 | file://inetutils-1.8-0001-printf-parse-pull-in-features.h-for-__GLIBC__.patch \ |
13 | file://inetutils-1.8-0002-argp-fix-program_invocation_name-detection.patch \ | ||
14 | file://inetutils-1.8-0003-wchar.patch \ | 17 | file://inetutils-1.8-0003-wchar.patch \ |
15 | file://inetutils-1.8-1001-ftp-rename-ruserpass-to-avoid-C-library-collision.patch \ | ||
16 | file://inetutils-1.8-1002-rshd-detect-__rcmd_errstr-support-in-the-C-lib.patch \ | ||
17 | file://inetutils-1.8-1003-use-daemon-from-the-C-library-when-possible.patch \ | ||
18 | file://inetutils-1.8-1004-detect-fork-support.patch \ | ||
19 | file://inetutils-1.8-1005-ftpd-add-daemon-D-nommu-support.patch \ | ||
20 | file://fix-disable-ipv6.patch \ | 18 | file://fix-disable-ipv6.patch \ |
21 | " | 19 | " |
22 | SRC_URI[md5sum] = "ad8fdcdf1797b9ca258264a6b04e48fd" | 20 | SRC_URI[md5sum] = "944f7196a2b3dba2d400e9088576000c" |
23 | SRC_URI[sha256sum] = "c8500baee04b9ea408c9e65e24ad7f5b41e7d96d42fb1d29abf25b52b68311c7" | 21 | SRC_URI[sha256sum] = "02a9ebde8a198cb85f87545b9d88fb103a183958139864a85fe9e027ad79ff2b" |
24 | 22 | ||
25 | inherit autotools gettext | 23 | inherit autotools gettext |
26 | 24 | ||
diff --git a/meta-oe/recipes-connectivity/inetutils/inetutils-1.8/inetutils-1.8-0002-argp-fix-program_invocation_name-detection.patch b/meta-oe/recipes-connectivity/inetutils/inetutils-1.8/inetutils-1.8-0002-argp-fix-program_invocation_name-detection.patch deleted file mode 100644 index 6861f2110..000000000 --- a/meta-oe/recipes-connectivity/inetutils/inetutils-1.8/inetutils-1.8-0002-argp-fix-program_invocation_name-detection.patch +++ /dev/null | |||
@@ -1,51 +0,0 @@ | |||
1 | From 93dbd3319232613ff8f5f3f08bf5f57b21980ef1 Mon Sep 17 00:00:00 2001 | ||
2 | From: Mike Frysinger <vapier at gentoo.org> | ||
3 | Date: Thu, 18 Nov 2010 17:14:21 -0500 | ||
4 | Subject: [PATCH gnulib] argp: fix program_invocation_name detection | ||
5 | |||
6 | The current program_invocation_name symbol detection fails if the argp.h | ||
7 | header is missing. So check for the header first before detecting if the | ||
8 | symbol exists. | ||
9 | |||
10 | Signed-off-by: Mike Frysinger <vapier at gentoo.org> | ||
11 | --- | ||
12 | m4/argp.m4 | 15 +++++++++++++-- | ||
13 | 1 files changed, 13 insertions(+), 2 deletions(-) | ||
14 | |||
15 | diff --git a/m4/argp.m4 b/m4/argp.m4 | ||
16 | index d3ca5ba..efa562c 100644 | ||
17 | --- a/m4/argp.m4 | ||
18 | +++ b/m4/argp.m4 | ||
19 | @@ -31,8 +31,14 @@ AC_DEFUN([gl_ARGP], | ||
20 | # are defined elsewhere. It is improbable that only one of them will | ||
21 | # be defined and other not, I prefer to stay on the safe side and to | ||
22 | # test each one separately. | ||
23 | + AC_CHECK_HEADERS_ONCE([argp.h]) | ||
24 | AC_MSG_CHECKING([whether program_invocation_name is defined]) | ||
25 | - AC_TRY_LINK([#include <argp.h>], | ||
26 | + AC_TRY_LINK([ | ||
27 | +#include <errno.h> | ||
28 | +#ifdef HAVE_ARGP_H | ||
29 | +# include <argp.h> | ||
30 | +#endif | ||
31 | +], | ||
32 | [ program_invocation_name = "test"; ], | ||
33 | [ AC_DEFINE([HAVE_PROGRAM_INVOCATION_NAME], [1], | ||
34 | [Define if program_invocation_name is defined]) | ||
35 | @@ -40,7 +46,12 @@ AC_DEFUN([gl_ARGP], | ||
36 | [ AC_MSG_RESULT([no])] ) | ||
37 | |||
38 | AC_MSG_CHECKING([whether program_invocation_short_name is defined]) | ||
39 | - AC_TRY_LINK([#include <argp.h>], | ||
40 | + AC_TRY_LINK([ | ||
41 | +#include <errno.h> | ||
42 | +#ifdef HAVE_ARGP_H | ||
43 | +# include <argp.h> | ||
44 | +#endif | ||
45 | +], | ||
46 | [ program_invocation_short_name = "test"; ], | ||
47 | [ AC_DEFINE([HAVE_PROGRAM_INVOCATION_SHORT_NAME], [1], | ||
48 | [Define if program_invocation_short_name is defined]) | ||
49 | -- | ||
50 | 1.7.3.2 | ||
51 | |||
diff --git a/meta-oe/recipes-connectivity/inetutils/inetutils-1.8/inetutils-1.8-1001-ftp-rename-ruserpass-to-avoid-C-library-collision.patch b/meta-oe/recipes-connectivity/inetutils/inetutils-1.8/inetutils-1.8-1001-ftp-rename-ruserpass-to-avoid-C-library-collision.patch deleted file mode 100644 index a6e366da7..000000000 --- a/meta-oe/recipes-connectivity/inetutils/inetutils-1.8/inetutils-1.8-1001-ftp-rename-ruserpass-to-avoid-C-library-collision.patch +++ /dev/null | |||
@@ -1,58 +0,0 @@ | |||
1 | From 4f890adb39b52bc43c578966071625004988e3b8 Mon Sep 17 00:00:00 2001 | ||
2 | From: Mike Frysinger <vapier at gentoo.org> | ||
3 | Date: Thu, 18 Nov 2010 22:11:48 -0500 | ||
4 | Subject: [PATCH] ftp: rename ruserpass to avoid C library collision | ||
5 | |||
6 | The C library itself defines a "ruserpass" function. When linking | ||
7 | statically, it is possible to hit a symbol collision linker error. | ||
8 | So rename the local ftp version to "remote_userpass". | ||
9 | |||
10 | Signed-off-by: Mike Frysinger <vapier at gentoo.org> | ||
11 | --- | ||
12 | ftp/extern.h | 2 +- | ||
13 | ftp/ftp.c | 2 +- | ||
14 | ftp/ruserpass.c | 2 +- | ||
15 | 3 files changed, 3 insertions(+), 3 deletions(-) | ||
16 | |||
17 | diff --git a/ftp/extern.h b/ftp/extern.h | ||
18 | index 8cdb8aa..037cb61 100644 | ||
19 | --- a/ftp/extern.h | ||
20 | +++ b/ftp/extern.h | ||
21 | @@ -119,7 +119,7 @@ void reset (int, char **); | ||
22 | void restart (int, char **); | ||
23 | void rmthelp (int, char **); | ||
24 | void rmtstatus (int, char **); | ||
25 | -int ruserpass (char *, char **, char **, char **); | ||
26 | +int remote_userpass (char *, char **, char **, char **); | ||
27 | void sendrequest (char *, char *, char *, int); | ||
28 | void setascii (int, char **); | ||
29 | void setbell (int, char **); | ||
30 | diff --git a/ftp/ftp.c b/ftp/ftp.c | ||
31 | index c20ba41..95675cc 100644 | ||
32 | --- a/ftp/ftp.c | ||
33 | +++ b/ftp/ftp.c | ||
34 | @@ -251,7 +251,7 @@ login (char *host) | ||
35 | int n, aflag = 0; | ||
36 | |||
37 | user = pass = acct = 0; | ||
38 | - if (ruserpass (host, &user, &pass, &acct) < 0) | ||
39 | + if (remote_userpass (host, &user, &pass, &acct) < 0) | ||
40 | { | ||
41 | code = -1; | ||
42 | return (0); | ||
43 | diff --git a/ftp/ruserpass.c b/ftp/ruserpass.c | ||
44 | index 8572b95..c08fbc0 100644 | ||
45 | --- a/ftp/ruserpass.c | ||
46 | +++ b/ftp/ruserpass.c | ||
47 | @@ -111,7 +111,7 @@ static struct toktab | ||
48 | }; | ||
49 | |||
50 | int | ||
51 | -ruserpass (char *host, char **aname, char **apass, char **aacct) | ||
52 | +remote_userpass (char *host, char **aname, char **apass, char **aacct) | ||
53 | { | ||
54 | char *hdir, buf[BUFSIZ], *tmp; | ||
55 | char *myname = 0, *mydomain; | ||
56 | -- | ||
57 | 1.7.3.2 | ||
58 | |||
diff --git a/meta-oe/recipes-connectivity/inetutils/inetutils-1.8/inetutils-1.8-1002-rshd-detect-__rcmd_errstr-support-in-the-C-lib.patch b/meta-oe/recipes-connectivity/inetutils/inetutils-1.8/inetutils-1.8-1002-rshd-detect-__rcmd_errstr-support-in-the-C-lib.patch deleted file mode 100644 index 7708c4045..000000000 --- a/meta-oe/recipes-connectivity/inetutils/inetutils-1.8/inetutils-1.8-1002-rshd-detect-__rcmd_errstr-support-in-the-C-lib.patch +++ /dev/null | |||
@@ -1,57 +0,0 @@ | |||
1 | From 730015f060fe76eee615f361a65eb719cdf22eef Mon Sep 17 00:00:00 2001 | ||
2 | From: Mike Frysinger <vapier at gentoo.org> | ||
3 | Date: Thu, 18 Nov 2010 22:20:39 -0500 | ||
4 | Subject: [PATCH] rshd: detect __rcmd_errstr support in the C lib | ||
5 | |||
6 | Not all C libraries support __rcmd_errstr, so add a configure test for it. | ||
7 | |||
8 | Signed-off-by: Mike Frysinger <vapier at gentoo.org> | ||
9 | --- | ||
10 | configure.ac | 2 +- | ||
11 | src/rshd.c | 4 ++++ | ||
12 | 2 files changed, 5 insertions(+), 1 deletions(-) | ||
13 | |||
14 | diff --git a/configure.ac b/configure.ac | ||
15 | index c1ac270..79d655c 100644 | ||
16 | --- a/configure.ac | ||
17 | +++ b/configure.ac | ||
18 | @@ -587,7 +587,7 @@ AC_CHECK_FUNCS(cfsetspeed cgetent dirfd fchdir flock \ | ||
19 | setsid setregid setreuid setresgid setresuid setutent_r \ | ||
20 | sigaction sigvec strchr setproctitle tcgetattr tzset utimes \ | ||
21 | utime uname \ | ||
22 | - updwtmp updwtmpx vhangup wait3 wait4 opendir2) | ||
23 | + updwtmp updwtmpx vhangup wait3 wait4 opendir2 __rcmd_errstr) | ||
24 | |||
25 | dnl Functions that we will define if necessary. | ||
26 | AC_REPLACE_FUNCS(getpass getusershell memcmp memcpy memmove memset \ | ||
27 | diff --git a/src/rshd.c b/src/rshd.c | ||
28 | index d49facd..9301ef2 100644 | ||
29 | --- a/src/rshd.c | ||
30 | +++ b/src/rshd.c | ||
31 | @@ -284,7 +284,9 @@ extern char **environ; | ||
32 | void | ||
33 | doit (int sockfd, struct sockaddr_in *fromp) | ||
34 | { | ||
35 | +#ifdef HAVE___RCMD_ERRSTR | ||
36 | extern char *__rcmd_errstr; /* syslog hook from libc/net/rcmd.c. */ | ||
37 | +#endif | ||
38 | struct hostent *hp; | ||
39 | struct passwd *pwd; | ||
40 | u_short port; | ||
41 | @@ -757,11 +759,13 @@ doit (int sockfd, struct sockaddr_in *fromp) | ||
42 | && (iruserok (fromp->sin_addr.s_addr, pwd->pw_uid == 0, | ||
43 | remuser, locuser)) < 0)) | ||
44 | { | ||
45 | +#ifdef HAVE___RCMD_ERRSTR | ||
46 | if (__rcmd_errstr) | ||
47 | syslog (LOG_INFO | LOG_AUTH, | ||
48 | "%s@%s as %s: permission denied (%s). cmd='%.80s'", | ||
49 | remuser, hostname, locuser, __rcmd_errstr, cmdbuf); | ||
50 | else | ||
51 | +#endif | ||
52 | syslog (LOG_INFO | LOG_AUTH, | ||
53 | "%s@%s as %s: permission denied. cmd='%.80s'", | ||
54 | remuser, hostname, locuser, cmdbuf); | ||
55 | -- | ||
56 | 1.7.3.2 | ||
57 | |||
diff --git a/meta-oe/recipes-connectivity/inetutils/inetutils-1.8/inetutils-1.8-1003-use-daemon-from-the-C-library-when-possible.patch b/meta-oe/recipes-connectivity/inetutils/inetutils-1.8/inetutils-1.8-1003-use-daemon-from-the-C-library-when-possible.patch deleted file mode 100644 index 8575c102e..000000000 --- a/meta-oe/recipes-connectivity/inetutils/inetutils-1.8/inetutils-1.8-1003-use-daemon-from-the-C-library-when-possible.patch +++ /dev/null | |||
@@ -1,42 +0,0 @@ | |||
1 | From 3b9f64c6a668849b37b884a7826885c70b95787b Mon Sep 17 00:00:00 2001 | ||
2 | From: Mike Frysinger <vapier at gentoo.org> | ||
3 | Date: Thu, 18 Nov 2010 22:24:06 -0500 | ||
4 | Subject: [PATCH] use daemon from the C library when possible | ||
5 | |||
6 | Signed-off-by: Mike Frysinger <vapier at gentoo.org> | ||
7 | --- | ||
8 | configure.ac | 2 +- | ||
9 | libinetutils/daemon.c | 2 ++ | ||
10 | 2 files changed, 3 insertions(+), 1 deletions(-) | ||
11 | |||
12 | diff --git a/configure.ac b/configure.ac | ||
13 | index 79d655c..25cc3db 100644 | ||
14 | --- a/configure.ac | ||
15 | +++ b/configure.ac | ||
16 | @@ -579,7 +579,7 @@ AC_FUNC_MMAP | ||
17 | AC_FUNC_MALLOC | ||
18 | AC_FUNC_REALLOC | ||
19 | |||
20 | -AC_CHECK_FUNCS(bcopy bcmp bzero cfsetspeed cgetent dirfd fchdir flock \ | ||
21 | +AC_CHECK_FUNCS(bcopy bcmp bzero cfsetspeed cgetent daemon dirfd fchdir flock \ | ||
22 | fpathconf ftruncate \ | ||
23 | getcwd getmsg getspnam initgroups initsetproctitle killpg \ | ||
24 | mkstemp ptsname \ | ||
25 | diff --git a/libinetutils/daemon.c b/libinetutils/daemon.c | ||
26 | index 2156af4..9beb255 100644 | ||
27 | --- a/libinetutils/daemon.c | ||
28 | +++ b/libinetutils/daemon.c | ||
29 | @@ -197,8 +197,10 @@ waitdaemon (int nochdir, int noclose, int maxwait) | ||
30 | return ppid; | ||
31 | } | ||
32 | |||
33 | +#ifndef HAVE_DAEMON | ||
34 | int | ||
35 | daemon (int nochdir, int noclose) | ||
36 | { | ||
37 | return (waitdaemon (nochdir, noclose, 0) == -1) ? -1 : 0; | ||
38 | } | ||
39 | +#endif | ||
40 | -- | ||
41 | 1.7.3.2 | ||
42 | |||
diff --git a/meta-oe/recipes-connectivity/inetutils/inetutils-1.8/inetutils-1.8-1004-detect-fork-support.patch b/meta-oe/recipes-connectivity/inetutils/inetutils-1.8/inetutils-1.8-1004-detect-fork-support.patch deleted file mode 100644 index fc9d72670..000000000 --- a/meta-oe/recipes-connectivity/inetutils/inetutils-1.8/inetutils-1.8-1004-detect-fork-support.patch +++ /dev/null | |||
@@ -1,54 +0,0 @@ | |||
1 | From 0acaed0d4b2bf9495e71ec4c898733bed2a86be0 Mon Sep 17 00:00:00 2001 | ||
2 | From: Mike Frysinger <vapier at gentoo.org> | ||
3 | Date: Thu, 18 Nov 2010 22:27:55 -0500 | ||
4 | Subject: [PATCH] detect fork() support | ||
5 | |||
6 | Linux/nommu systems cannot support a fork(), so add a configure test for | ||
7 | it so apps can pick that or vfork(). | ||
8 | |||
9 | Signed-off-by: Mike Frysinger <vapier at gentoo.org> | ||
10 | --- | ||
11 | configure.ac | 2 +- | ||
12 | libinetutils/libinetutils.h | 9 +++++++++ | ||
13 | 2 files changed, 10 insertions(+), 1 deletions(-) | ||
14 | |||
15 | diff --git a/configure.ac b/configure.ac | ||
16 | index 25cc3db..98196f4 100644 | ||
17 | --- a/configure.ac | ||
18 | +++ b/configure.ac | ||
19 | @@ -580,7 +580,7 @@ AC_FUNC_MALLOC | ||
20 | AC_FUNC_REALLOC | ||
21 | |||
22 | AC_CHECK_FUNCS(bcopy bcmp bzero cfsetspeed cgetent daemon dirfd fchdir flock \ | ||
23 | - fpathconf ftruncate \ | ||
24 | + fork fpathconf ftruncate \ | ||
25 | getcwd getmsg getspnam initgroups initsetproctitle killpg \ | ||
26 | mkstemp ptsname \ | ||
27 | setegid seteuid setpgid \ | ||
28 | diff --git a/libinetutils/libinetutils.h b/libinetutils/libinetutils.h | ||
29 | index 19bbde5..86365b0 100644 | ||
30 | --- a/libinetutils/libinetutils.h | ||
31 | +++ b/libinetutils/libinetutils.h | ||
32 | @@ -17,6 +17,8 @@ | ||
33 | You should have received a copy of the GNU General Public License | ||
34 | along with this program. If not, see `http://www.gnu.org/licenses/'. */ | ||
35 | |||
36 | +#include <config.h> | ||
37 | + | ||
38 | #include "argp-version-etc.h" | ||
39 | |||
40 | void utmp_init (char *line, char *user, char *id); | ||
41 | @@ -32,3 +34,10 @@ extern const char *default_program_authors[]; | ||
42 | #define iu_argp_init(name, authors) \ | ||
43 | argp_program_bug_address = "<" PACKAGE_BUGREPORT ">"; \ | ||
44 | argp_version_setup (name, authors); | ||
45 | + | ||
46 | +#ifdef HAVE_FORK | ||
47 | +# define fork_exit(s) exit(s) | ||
48 | +#else | ||
49 | +# define fork() vfork() | ||
50 | +# define fork_exit(s) _exit(s) | ||
51 | +#endif | ||
52 | -- | ||
53 | 1.7.3.2 | ||
54 | |||
diff --git a/meta-oe/recipes-connectivity/inetutils/inetutils-1.8/inetutils-1.8-1005-ftpd-add-daemon-D-nommu-support.patch b/meta-oe/recipes-connectivity/inetutils/inetutils-1.8/inetutils-1.8-1005-ftpd-add-daemon-D-nommu-support.patch deleted file mode 100644 index 844905b9a..000000000 --- a/meta-oe/recipes-connectivity/inetutils/inetutils-1.8/inetutils-1.8-1005-ftpd-add-daemon-D-nommu-support.patch +++ /dev/null | |||
@@ -1,109 +0,0 @@ | |||
1 | From 1dee55b90d2971859377156e6210efdfdf1bac84 Mon Sep 17 00:00:00 2001 | ||
2 | From: Mike Frysinger <vapier at gentoo.org> | ||
3 | Date: Fri, 19 Nov 2010 20:26:48 -0500 | ||
4 | Subject: [PATCH] ftpd: add daemon (-D) nommu support | ||
5 | |||
6 | The current daemon design of ftpd is to: | ||
7 | - loop in server_mode() waiting for a connection | ||
8 | - fork a child and return to main() to process like inetd | ||
9 | - have parent continue looping in server_mode() | ||
10 | |||
11 | On a nommu system where we can only vfork(), the child returning | ||
12 | from server_mode() corrupts the stack and messes up the the parent. | ||
13 | So rather than having the child return, exec a new ftpd process in | ||
14 | the normal inetd mode. This also fixes the problem in nommu where | ||
15 | a vfork-ed child pauses the parent until it either exits or execs | ||
16 | something. | ||
17 | |||
18 | Signed-off-by: Mike Frysinger <vapier at gentoo.org> | ||
19 | --- | ||
20 | ftpd/extern.h | 3 ++- | ||
21 | ftpd/ftpd.c | 17 ++++++++++++++--- | ||
22 | ftpd/server_mode.c | 9 ++++++++- | ||
23 | 3 files changed, 24 insertions(+), 5 deletions(-) | ||
24 | |||
25 | diff --git a/ftpd/extern.h b/ftpd/extern.h | ||
26 | index 2483fe6..81182e0 100644 | ||
27 | --- a/ftpd/extern.h | ||
28 | +++ b/ftpd/extern.h | ||
29 | @@ -110,7 +110,8 @@ extern char tmpline[]; | ||
30 | extern off_t restart_point; | ||
31 | |||
32 | /* Exported from server_mode.c. */ | ||
33 | -extern int server_mode (const char *pidfile, struct sockaddr_in *phis_addr); | ||
34 | +extern int server_mode (const char *pidfile, struct sockaddr_in *phis_addr, | ||
35 | + char *argv[]); | ||
36 | |||
37 | /* Credential for the request. */ | ||
38 | struct credentials | ||
39 | diff --git a/ftpd/ftpd.c b/ftpd/ftpd.c | ||
40 | index aed74e6..c5c4c90 100644 | ||
41 | --- a/ftpd/ftpd.c | ||
42 | +++ b/ftpd/ftpd.c | ||
43 | @@ -424,8 +424,7 @@ main (int argc, char *argv[], char **envp) | ||
44 | argp_parse (&argp, argc, argv, 0, &index, NULL); | ||
45 | |||
46 | /* Bail out, wrong usage */ | ||
47 | - argc -= index; | ||
48 | - if (argc != 0) | ||
49 | + if (argc - index != 0) | ||
50 | error (1, 0, "surplus arguments; try `%s --help' for more info", | ||
51 | program_name); | ||
52 | |||
53 | @@ -438,7 +437,19 @@ main (int argc, char *argv[], char **envp) | ||
54 | fd = accept(). tcpd is check if compile with the support */ | ||
55 | if (daemon_mode) | ||
56 | { | ||
57 | - if (server_mode (pid_file, &his_addr) < 0) | ||
58 | +#ifndef HAVE_FORK | ||
59 | + /* Shift out the daemon option in subforks */ | ||
60 | + int i; | ||
61 | + for (i = 0; i < argc; ++i) | ||
62 | + if (strcmp (argv[i], "-D") == 0) | ||
63 | + { | ||
64 | + int j; | ||
65 | + for (j = i; j < argc; ++j) | ||
66 | + argv[j] = argv[j + 1]; | ||
67 | + argv[--argc] = NULL; | ||
68 | + } | ||
69 | +#endif | ||
70 | + if (server_mode (pid_file, &his_addr, argv) < 0) | ||
71 | exit (1); | ||
72 | } | ||
73 | else | ||
74 | diff --git a/ftpd/server_mode.c b/ftpd/server_mode.c | ||
75 | index 3d3a498..605e13e 100644 | ||
76 | --- a/ftpd/server_mode.c | ||
77 | +++ b/ftpd/server_mode.c | ||
78 | @@ -37,6 +37,8 @@ | ||
79 | # include <tcpd.h> | ||
80 | #endif | ||
81 | |||
82 | +#include <libinetutils.h> | ||
83 | + | ||
84 | static void reapchild (int); | ||
85 | |||
86 | #define DEFPORT 21 | ||
87 | @@ -92,7 +94,7 @@ reapchild (int signo ARG_UNUSED) | ||
88 | } | ||
89 | |||
90 | int | ||
91 | -server_mode (const char *pidfile, struct sockaddr_in *phis_addr) | ||
92 | +server_mode (const char *pidfile, struct sockaddr_in *phis_addr, char *argv[]) | ||
93 | { | ||
94 | int ctl_sock, fd; | ||
95 | struct servent *sv; | ||
96 | @@ -176,5 +178,10 @@ server_mode (const char *pidfile, struct sockaddr_in *phis_addr) | ||
97 | if (!check_host ((struct sockaddr *) phis_addr)) | ||
98 | return -1; | ||
99 | #endif | ||
100 | + | ||
101 | +#ifndef HAVE_FORK | ||
102 | + _exit(execvp(argv[0], argv)); | ||
103 | +#endif | ||
104 | + | ||
105 | return fd; | ||
106 | } | ||
107 | -- | ||
108 | 1.7.3.2 | ||
109 | |||