summaryrefslogtreecommitdiffstats
path: root/meta/recipes-connectivity
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2010-09-01 19:09:11 +0100
committerRichard Purdie <rpurdie@linux.intel.com>2010-09-01 19:09:57 +0100
commitd62ee7eaf2ba025c3f64b2d4e10dc7cec4637612 (patch)
treef36fe3008f36ff75cbdd31b630f8f13f1f205ebb /meta/recipes-connectivity
parentcaab7fc509bf27706ff3248689f6afd04225cfda (diff)
downloadpoky-d62ee7eaf2ba025c3f64b2d4e10dc7cec4637612.tar.gz
packages: Separate out most of the remaining packages into recipes
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'meta/recipes-connectivity')
-rw-r--r--meta/recipes-connectivity/dhcp/dhcp-4.1.1-P1/dhcp-3.0.3-dhclient-dbus.patch84
-rw-r--r--meta/recipes-connectivity/dhcp/dhcp-4.1.1-P1/fix-client-path.patch21
-rw-r--r--meta/recipes-connectivity/dhcp/dhcp-4.1.1-P1/fixincludes.patch10
-rw-r--r--meta/recipes-connectivity/dhcp/dhcp-4.1.1-P1/noattrmode.patch20
-rw-r--r--meta/recipes-connectivity/dhcp/dhcp-4.1.1-P1/site.h21
-rw-r--r--meta/recipes-connectivity/dhcp/dhcp3.inc53
-rw-r--r--meta/recipes-connectivity/dhcp/dhcp4.inc57
-rw-r--r--meta/recipes-connectivity/dhcp/dhcp_4.1.1-P1.bb7
-rw-r--r--meta/recipes-connectivity/dhcp/files/default-relay12
-rw-r--r--meta/recipes-connectivity/dhcp/files/default-server7
-rw-r--r--meta/recipes-connectivity/dhcp/files/dhclient.conf50
-rw-r--r--meta/recipes-connectivity/dhcp/files/dhcpd.conf108
-rw-r--r--meta/recipes-connectivity/dhcp/files/init-relay44
-rw-r--r--meta/recipes-connectivity/dhcp/files/init-server44
-rw-r--r--meta/recipes-connectivity/farsight/farsight2_0.0.9.bb24
-rw-r--r--meta/recipes-connectivity/farsight/libnice_0.0.6.bb23
-rw-r--r--meta/recipes-connectivity/gsm/files/0001-Introduce-ports.patch710
-rw-r--r--meta/recipes-connectivity/gsm/files/0002-Flush-all-pending-commands-before-restarting-the-mod.patch74
-rw-r--r--meta/recipes-connectivity/gsm/files/0003-Correctly-segment-incoming-usock-data-into-packets.patch77
-rw-r--r--meta/recipes-connectivity/gsm/files/0004-Handle-read-and-write-return-values.patch176
-rw-r--r--meta/recipes-connectivity/gsm/files/0005-Add-ask-ds-option-forSMS.patch130
-rw-r--r--meta/recipes-connectivity/gsm/files/024_sms-text-in-bracket.patch70
-rw-r--r--meta/recipes-connectivity/gsm/files/025_sms-status-report.patch133
-rw-r--r--meta/recipes-connectivity/gsm/files/027_phonebook-find-and-read-range-support.patch423
-rw-r--r--meta/recipes-connectivity/gsm/files/028_shell-phonebook-find-and-read-range-support.patch264
-rw-r--r--meta/recipes-connectivity/gsm/files/default59
-rw-r--r--meta/recipes-connectivity/gsm/files/fix_machine_init.patch23
-rw-r--r--meta/recipes-connectivity/gsm/files/gsmd47
-rw-r--r--meta/recipes-connectivity/gsm/files/install-ts-headers.patch11
-rw-r--r--meta/recipes-connectivity/gsm/files/lgsm_send_fix_return_value.patch11
-rw-r--r--meta/recipes-connectivity/gsm/gsmd.inc93
-rw-r--r--meta/recipes-connectivity/gsm/libgsmd_svn.bb5
-rw-r--r--meta/recipes-connectivity/iproute2/iproute2-2.6.34/configure-cross.patch61
-rw-r--r--meta/recipes-connectivity/iproute2/iproute2.inc27
-rw-r--r--meta/recipes-connectivity/iproute2/iproute2_2.6.34.bb6
-rw-r--r--meta/recipes-connectivity/libetpan/files/cxx-is-here.patch18
-rw-r--r--meta/recipes-connectivity/libetpan/libetpan_0.54.bb19
-rw-r--r--meta/recipes-connectivity/libnss-mdns/files/alignment-fix.patch11
-rw-r--r--meta/recipes-connectivity/libnss-mdns/libnss-mdns_0.10.bb36
-rw-r--r--meta/recipes-connectivity/libpcap/libpcap-1.1.1/aclocal.patch165
-rw-r--r--meta/recipes-connectivity/libpcap/libpcap-1.1.1/ieee80215-arphrd.patch22
-rw-r--r--meta/recipes-connectivity/libpcap/libpcap.inc24
-rw-r--r--meta/recipes-connectivity/libpcap/libpcap_1.1.1.bb17
-rw-r--r--meta/recipes-connectivity/network-suspend-scripts/network-suspend-scripts.bb22
-rw-r--r--meta/recipes-connectivity/network-suspend-scripts/network-suspend-scripts/ifupdown26
-rw-r--r--meta/recipes-connectivity/network-suspend-scripts/network-suspend-scripts/usbnet16
-rw-r--r--meta/recipes-connectivity/nfs-utils/libnfsidmap_0.23.bb13
-rw-r--r--meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-1.0.6-uclibc.patch18
-rw-r--r--meta/recipes-connectivity/nfs-utils/nfs-utils/nfsserver161
-rw-r--r--meta/recipes-connectivity/nfs-utils/nfs-utils_1.2.2.bb51
-rw-r--r--meta/recipes-connectivity/openssl/openssl-0.9.8o/configure-targets.patch24
-rw-r--r--meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/ca.patch20
-rw-r--r--meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/config-hurd.patch15
-rw-r--r--meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/debian-targets.patch54
-rw-r--r--meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/engines-path.patch47
-rw-r--r--meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/kfreebsd-pipe.patch13
-rw-r--r--meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/make-targets.patch13
-rw-r--r--meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/man-dir.patch13
-rw-r--r--meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/man-section.patch32
-rw-r--r--meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/no-rpath.patch13
-rw-r--r--meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/no-symbolic.patch13
-rw-r--r--meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/perl-path.diff760
-rw-r--r--meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/pic.patch301
-rw-r--r--meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/pkg-config.patch34
-rw-r--r--meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/rc4-amd64.patch14
-rw-r--r--meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/rehash-crt.patch33
-rw-r--r--meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/rehash_pod.patch60
-rw-r--r--meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/series20
-rw-r--r--meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/shared-lib-ext.patch14
-rw-r--r--meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/stddef.patch12
-rw-r--r--meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/valgrind.patch15
-rw-r--r--meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/version-script.patch33
-rw-r--r--meta/recipes-connectivity/openssl/openssl-0.9.8o/shared-libs.patch48
-rw-r--r--meta/recipes-connectivity/openssl/openssl.inc100
-rw-r--r--meta/recipes-connectivity/openssl/openssl_0.9.8o.bb28
-rw-r--r--meta/recipes-connectivity/openswan/openswan-2.4.7/installflags.patch13
-rw-r--r--meta/recipes-connectivity/openswan/openswan-2.4.7/ld-library-path-breakage.patch26
-rw-r--r--meta/recipes-connectivity/openswan/openswan-2.4.7/openswan-2.4.7-gentoo.patch377
-rw-r--r--meta/recipes-connectivity/openswan/openswan_2.4.7.bb36
-rw-r--r--meta/recipes-connectivity/opensync/libopensync-0.37/build-in-src.patch18
-rw-r--r--meta/recipes-connectivity/opensync/libopensync-0.37/cmake.patch17
-rw-r--r--meta/recipes-connectivity/opensync/libopensync-0.37/no-python-check.patch16
-rw-r--r--meta/recipes-connectivity/opensync/libopensync-plugin-evolution2/0.37-fixes.patch23
-rw-r--r--meta/recipes-connectivity/opensync/libopensync-plugin-evolution2_0.36.bb7
-rw-r--r--meta/recipes-connectivity/opensync/libopensync-plugin-file_0.37.bb1
-rw-r--r--meta/recipes-connectivity/opensync/libopensync-plugin-google-calendar_0.36.bb1
-rw-r--r--meta/recipes-connectivity/opensync/libopensync-plugin-irmc_0.36.bb3
-rw-r--r--meta/recipes-connectivity/opensync/libopensync-plugin-syncml/fixerror.patch13
-rw-r--r--meta/recipes-connectivity/opensync/libopensync-plugin-syncml_0.38.bb7
-rw-r--r--meta/recipes-connectivity/opensync/libopensync-plugin-vformat_0.37.bb3
-rw-r--r--meta/recipes-connectivity/opensync/libopensync-plugin_0.36.inc9
-rw-r--r--meta/recipes-connectivity/opensync/libopensync_0.37.bb25
-rw-r--r--meta/recipes-connectivity/opensync/libsync_svn.bb19
-rw-r--r--meta/recipes-connectivity/opensync/libsyncml/build-in-src.patch19
-rw-r--r--meta/recipes-connectivity/opensync/libsyncml_0.5.4.bb17
-rw-r--r--meta/recipes-connectivity/opensync/msynctool_0.37.bb7
-rw-r--r--meta/recipes-connectivity/portmap/portmap-6.0/destdir-no-strip.patch44
-rw-r--r--meta/recipes-connectivity/portmap/portmap-6.0/tcpd-config.patch28
-rw-r--r--meta/recipes-connectivity/portmap/portmap.inc31
-rwxr-xr-xmeta/recipes-connectivity/portmap/portmap/portmap.init59
-rw-r--r--meta/recipes-connectivity/portmap/portmap_6.0.bb20
-rw-r--r--meta/recipes-connectivity/ppp-dialin/files/host-peer11
-rw-r--r--meta/recipes-connectivity/ppp-dialin/files/ppp-dialin3
-rw-r--r--meta/recipes-connectivity/ppp-dialin/ppp-dialin_0.1.bb35
-rw-r--r--meta/recipes-connectivity/ppp/ppp-2.4.5/08setupdns12
-rw-r--r--meta/recipes-connectivity/ppp/ppp-2.4.5/92removedns5
-rw-r--r--meta/recipes-connectivity/ppp/ppp-2.4.5/cifdefroute.patch290
-rw-r--r--meta/recipes-connectivity/ppp/ppp-2.4.5/enable-ipv6.patch13
-rwxr-xr-xmeta/recipes-connectivity/ppp/ppp-2.4.5/init50
-rwxr-xr-xmeta/recipes-connectivity/ppp/ppp-2.4.5/ip-down43
-rwxr-xr-xmeta/recipes-connectivity/ppp/ppp-2.4.5/ip-up44
-rw-r--r--meta/recipes-connectivity/ppp/ppp-2.4.5/makefile-remove-hard-usr-reference.patch19
-rw-r--r--meta/recipes-connectivity/ppp/ppp-2.4.5/makefile.patch93
-rw-r--r--meta/recipes-connectivity/ppp/ppp-2.4.5/poff26
-rw-r--r--meta/recipes-connectivity/ppp/ppp-2.4.5/pon9
-rw-r--r--meta/recipes-connectivity/ppp/ppp-2.4.5/pppd-resolv-varrun.patch43
-rw-r--r--meta/recipes-connectivity/ppp/ppp_2.4.5.bb77
-rw-r--r--meta/recipes-connectivity/resolvconf/resolvconf_1.43.bb30
-rw-r--r--meta/recipes-connectivity/wbxml/files/no-doc-install.patch15
-rw-r--r--meta/recipes-connectivity/wbxml/wbxml2_0.9.2.bb20
120 files changed, 7010 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/dhcp/dhcp-4.1.1-P1/dhcp-3.0.3-dhclient-dbus.patch b/meta/recipes-connectivity/dhcp/dhcp-4.1.1-P1/dhcp-3.0.3-dhclient-dbus.patch
new file mode 100644
index 0000000000..579d72f484
--- /dev/null
+++ b/meta/recipes-connectivity/dhcp/dhcp-4.1.1-P1/dhcp-3.0.3-dhclient-dbus.patch
@@ -0,0 +1,84 @@
1--- client/scripts/bsdos
2+++ client/scripts/bsdos
3@@ -47,6 +47,11 @@
4 . /etc/dhcp/dhclient-exit-hooks
5 fi
6 # probably should do something with exit status of the local script
7+ if [ x$dhc_dbus != x -a $exit_status -eq 0 ]; then
8+ dbus-send --system --dest=com.redhat.dhcp \
9+ --type=method_call /com/redhat/dhcp/$interface com.redhat.dhcp.set \
10+ 'string:'"`env | grep -Ev '^(PATH|SHLVL|_|PWD|dhc_dbus)\='`"
11+ fi
12 exit $exit_status
13 }
14
15--- client/scripts/freebsd
16+++ client/scripts/freebsd
17@@ -57,6 +57,11 @@
18 . /etc/dhcp/dhclient-exit-hooks
19 fi
20 # probably should do something with exit status of the local script
21+ if [ x$dhc_dbus != x -a $exit_status -eq 0 ]; then
22+ dbus-send --system --dest=com.redhat.dhcp \
23+ --type=method_call /com/redhat/dhcp/$interface com.redhat.dhcp.set \
24+ 'string:'"`env | grep -Ev '^(PATH|SHLVL|_|PWD|dhc_dbus)\='`"
25+ fi
26 exit $exit_status
27 }
28
29--- client/scripts/linux
30+++ client/scripts/linux
31@@ -69,6 +69,11 @@
32 . /etc/dhcp/dhclient-exit-hooks
33 fi
34 # probably should do something with exit status of the local script
35+ if [ x$dhc_dbus != x -a $exit_status -eq 0 ]; then
36+ dbus-send --system --dest=com.redhat.dhcp \
37+ --type=method_call /com/redhat/dhcp/$interface com.redhat.dhcp.set \
38+ 'string:'"`env | grep -Ev '^(PATH|SHLVL|_|PWD|dhc_dbus)\='`"
39+ fi
40 exit $exit_status
41 }
42
43--- client/scripts/netbsd
44+++ client/scripts/netbsd
45@@ -47,6 +47,11 @@
46 . /etc/dhcp/dhclient-exit-hooks
47 fi
48 # probably should do something with exit status of the local script
49+ if [ x$dhc_dbus != x -a $exit_status -eq 0 ]; then
50+ dbus-send --system --dest=com.redhat.dhcp \
51+ --type=method_call /com/redhat/dhcp/$interface com.redhat.dhcp.set \
52+ 'string:'"`env | grep -Ev '^(PATH|SHLVL|_|PWD|dhc_dbus)\='`"
53+ fi
54 exit $exit_status
55 }
56
57--- client/scripts/openbsd
58+++ client/scripts/openbsd
59@@ -47,6 +47,11 @@
60 . /etc/dhcp/dhclient-exit-hooks
61 fi
62 # probably should do something with exit status of the local script
63+ if [ x$dhc_dbus != x -a $exit_status -eq 0 ]; then
64+ dbus-send --system --dest=com.redhat.dhcp \
65+ --type=method_call /com/redhat/dhcp/$interface com.redhat.dhcp.set \
66+ 'string:'"`env | grep -Ev '^(PATH|SHLVL|_|PWD|dhc_dbus)\='`"
67+ fi
68 exit $exit_status
69 }
70
71--- client/scripts/solaris
72+++ client/scripts/solaris
73@@ -47,6 +47,11 @@
74 . /etc/dhcp/dhclient-exit-hooks
75 fi
76 # probably should do something with exit status of the local script
77+ if [ x$dhc_dbus != x -a $exit_status -eq 0 ]; then
78+ dbus-send --system --dest=com.redhat.dhcp \
79+ --type=method_call /com/redhat/dhcp/$interface com.redhat.dhcp.set \
80+ 'string:'"`env | grep -Ev '^(PATH|SHLVL|_|PWD|dhc_dbus)\='`"
81+ fi
82 exit $exit_status
83 }
84
diff --git a/meta/recipes-connectivity/dhcp/dhcp-4.1.1-P1/fix-client-path.patch b/meta/recipes-connectivity/dhcp/dhcp-4.1.1-P1/fix-client-path.patch
new file mode 100644
index 0000000000..f6a7be1d81
--- /dev/null
+++ b/meta/recipes-connectivity/dhcp/dhcp-4.1.1-P1/fix-client-path.patch
@@ -0,0 +1,21 @@
1CLIENT_PATH is the only environment when executing dhclient-script,
2without this patch, dhclient-script won't run properly because it
3invokes ifconfig and route
4
57/28/2010 - qhe
6
7diff -ru dhcp-4.1.1-P1.orig//client/Makefile.am dhcp-4.1.1-P1/client/Makefile.am
8--- dhcp-4.1.1-P1.orig//client/Makefile.am 2010-07-29 13:20:05.000000000 +0800
9+++ dhcp-4.1.1-P1/client/Makefile.am 2010-07-29 13:28:14.000000000 +0800
10@@ -10,9 +10,9 @@
11 EXTRA_DIST = $(man_MANS)
12
13 dhclient.o: dhclient.c
14- $(COMPILE) -DCLIENT_PATH='"$(sbindir)"' \
15+ $(COMPILE) -DCLIENT_PATH='"PATH=$(sbindir):$(base_sbindir):$(bindir):$(base_bindir)"' \
16 -DLOCALSTATEDIR='"$(localstatedir)"' -c dhclient.c
17
18 dhc6.o: dhc6.c
19- $(COMPILE) -DCLIENT_PATH='"$(sbindir)"' \
20+ $(COMPILE) -DCLIENT_PATH='"PATH=$(sbindir):$(base_sbindir):$(bindir):$(base_bindir)"' \
21 -DLOCALSTATEDIR='"$(localstatedir)"' -c dhc6.c
diff --git a/meta/recipes-connectivity/dhcp/dhcp-4.1.1-P1/fixincludes.patch b/meta/recipes-connectivity/dhcp/dhcp-4.1.1-P1/fixincludes.patch
new file mode 100644
index 0000000000..91d99cce22
--- /dev/null
+++ b/meta/recipes-connectivity/dhcp/dhcp-4.1.1-P1/fixincludes.patch
@@ -0,0 +1,10 @@
1--- dhcp-3.0.2/common/tr.c~compile 2005-10-13 14:23:37.000000000 +0200
2+++ dhcp-3.0.2/common/tr.c 2005-10-13 14:23:45.000000000 +0200
3@@ -39,6 +39,7 @@
4 #include "includes/netinet/udp.h"
5 #include "includes/netinet/if_ether.h"
6 #include "netinet/if_tr.h"
7+#include <asm/types.h>
8 #include <sys/time.h>
9
10 /*
diff --git a/meta/recipes-connectivity/dhcp/dhcp-4.1.1-P1/noattrmode.patch b/meta/recipes-connectivity/dhcp/dhcp-4.1.1-P1/noattrmode.patch
new file mode 100644
index 0000000000..5c766d6c06
--- /dev/null
+++ b/meta/recipes-connectivity/dhcp/dhcp-4.1.1-P1/noattrmode.patch
@@ -0,0 +1,20 @@
1
2#
3# Patch managed by http://www.holgerschurig.de/patcher.html
4#
5
6--- dhcp-3.0.1/includes/dhcpd.h~compile
7+++ dhcp-3.0.1/includes/dhcpd.h
8@@ -306,9 +306,9 @@
9 # define EPHEMERAL_FLAGS (MS_NULL_TERMINATION | \
10 UNICAST_BROADCAST_HACK)
11
12- binding_state_t __attribute__ ((mode (__byte__))) binding_state;
13- binding_state_t __attribute__ ((mode (__byte__))) next_binding_state;
14- binding_state_t __attribute__ ((mode (__byte__))) desired_binding_state;
15+ binding_state_t binding_state;
16+ binding_state_t next_binding_state;
17+ binding_state_t desired_binding_state;
18
19 struct lease_state *state;
20
diff --git a/meta/recipes-connectivity/dhcp/dhcp-4.1.1-P1/site.h b/meta/recipes-connectivity/dhcp/dhcp-4.1.1-P1/site.h
new file mode 100644
index 0000000000..2289554ef3
--- /dev/null
+++ b/meta/recipes-connectivity/dhcp/dhcp-4.1.1-P1/site.h
@@ -0,0 +1,21 @@
1/*
2 * define config file location in ${S}/includes/site.h
3 * still need to take care of installation path (${sysconfdir}/dhcpd.conf)
4 *
5 * 7/22/2010 - qhe
6 */
7
8/* Define this if you want DNS update functionality to be available. */
9
10#define NSUPDATE
11
12/* Define this if you aren't debugging and you want to save memory
13 (potentially a _lot_ of memory) by allocating leases in chunks rather
14 than one at a time. */
15
16#define COMPACT_LEASES
17
18
19/* local */
20#define _PATH_DHCPD_CONF "/etc/dhcp/dhcpd.conf"
21#define _PATH_DHCLIENT_CONF "/etc/dhcp/dhclient.conf"
diff --git a/meta/recipes-connectivity/dhcp/dhcp3.inc b/meta/recipes-connectivity/dhcp/dhcp3.inc
new file mode 100644
index 0000000000..3f68f452d2
--- /dev/null
+++ b/meta/recipes-connectivity/dhcp/dhcp3.inc
@@ -0,0 +1,53 @@
1SECTION = "console/network"
2DESCRIPTION = "Internet Software Consortium DHCP package"
3HOMEPAGE = "http://www.isc.org/"
4
5LICENSE = "ISC"
6LIC_FILES_CHKSUM = "file://LICENSE;beginline=4;md5=bb6fd41f5895b67088ebea61ad365e74"
7
8SRC_URI = "ftp://ftp.isc.org/isc/dhcp/dhcp-${PV}.tar.gz \
9 file://init-relay file://default-relay \
10 file://init-server file://default-server \
11 file://dhclient.conf file://dhcpd.conf"
12
13inherit autotools
14
15TARGET_CFLAGS += "-D_GNU_SOURCE"
16
17do_compile() {
18 make RANLIB=${RANLIB} PREDEFINES='-D_PATH_DHCPD_DB=\"/var/lib/dhcp/dhcpd.leases\" \
19 -D_PATH_DHCLIENT_DB=\"/var/lib/dhcp/dhclient.leases\" \
20 -D_PATH_DHCLIENT_SCRIPT=\"/sbin/dhclient-script\" \
21 -D_PATH_DHCPD_CONF=\"/etc/dhcp/dhcpd.conf\" \
22 -D_PATH_DHCLIENT_CONF=\"/etc/dhcp/dhclient.conf\"'
23}
24
25do_install() {
26 make -e DESTDIR=${D} USRMANDIR=${mandir}/man1 ADMMANDIR=${mandir}/man8 FFMANDIR=${mandir}/man5 LIBMANDIR=${mandir}/man3 LIBDIR=${libdir} INCDIR=${includedir} install
27 install -d ${D}${sysconfdir}/init.d
28 install -d ${D}${sysconfdir}/default
29 install -d ${D}${sysconfdir}/dhcp
30 install -m 0755 ${WORKDIR}/init-relay ${D}${sysconfdir}/init.d/dhcp-relay
31 install -m 0644 ${WORKDIR}/default-relay ${D}${sysconfdir}/default/dhcp-relay
32 install -m 0755 ${WORKDIR}/init-server ${D}${sysconfdir}/init.d/dhcp-server
33 install -m 0644 ${WORKDIR}/default-server ${D}${sysconfdir}/default/dhcp-server
34 install -m 0644 ${WORKDIR}/dhclient.conf ${D}${sysconfdir}/dhcp/dhclient.conf
35 install -m 0644 ${WORKDIR}/dhcpd.conf ${D}${sysconfdir}/dhcp/dhcpd.conf
36 install -d ${D}${base_sbindir}/
37 mv ${D}${sbindir}/dhclient ${D}${base_sbindir}/
38 install -m 0755 ${S}/client/scripts/linux ${D}${base_sbindir}/dhclient-script
39}
40
41PACKAGES += "dhcp-server dhcp-client dhcp-relay dhcp-omshell"
42FILES_${PN} = ""
43FILES_dhcp-server = "${sbindir}/dhcpd ${sysconfdir}/init.d/dhcp-server ${sysconfdir}/default/dhcp-server ${sysconfdir}/dhcp/dhcpd.conf"
44FILES_dhcp-relay = "${sbindir}/dhcrelay ${sysconfdir}/init.d/dhcp-relay ${sysconfdir}/default/dhcp-relay"
45
46FILES_dhcp-client = "${base_sbindir}/dhclient ${base_sbindir}/dhclient-script ${sysconfdir}/dhcp/dhclient.conf"
47RDEPENDS_dhcp-client = "bash"
48
49FILES_dhcp-omshell = "${bindir}/omshell"
50
51CONFFILES_dhcp-server_nylon = "/etc/dhcp/dhcpd.conf"
52CONFFILES_dhcp-relay_nylon = "/etc/default/dhcp-relay"
53CONFFILES_dhcp-client_nylon = "/etc/dhcp/dhclient.conf"
diff --git a/meta/recipes-connectivity/dhcp/dhcp4.inc b/meta/recipes-connectivity/dhcp/dhcp4.inc
new file mode 100644
index 0000000000..7652b948f0
--- /dev/null
+++ b/meta/recipes-connectivity/dhcp/dhcp4.inc
@@ -0,0 +1,57 @@
1SECTION = "console/network"
2DESCRIPTION = "Internet Software Consortium DHCP package"
3HOMEPAGE = "http://www.isc.org/"
4
5LICENSE = "ISC"
6LIC_FILES_CHKSUM = "file://LICENSE;beginline=4;md5=bb6fd41f5895b67088ebea61ad365e74"
7
8SRC_URI = "ftp://ftp.isc.org/isc/dhcp/dhcp-${PV}.tar.gz \
9 file://site.h \
10 file://init-relay file://default-relay \
11 file://init-server file://default-server \
12 file://dhclient.conf file://dhcpd.conf"
13
14inherit autotools
15
16TARGET_CFLAGS += "-D_GNU_SOURCE"
17EXTRA_OECONF = "--with-srv-lease-file=${localstatedir}/lib/dhcp/dhcpd.leases \
18 --with-srv6-lease-file=${localstatedir}/lib/dhcp/dhcpd6.leases \
19 --with-cli-lease-file=${localstatedir}/lib/dhcp/dhclient.leases \
20 --with-cli6-lease-file=${localstatedir}/lib/dhcp/dhclient6.leases"
21
22do_compile_prepend () {
23 cp -f ${WORKDIR}/site.h ${S}/includes
24}
25
26do_install_append () {
27 install -d ${D}${sysconfdir}/init.d
28 install -d ${D}${sysconfdir}/default
29 install -d ${D}${sysconfdir}/dhcp
30 install -m 0755 ${WORKDIR}/init-relay ${D}${sysconfdir}/init.d/dhcp-relay
31 install -m 0644 ${WORKDIR}/default-relay ${D}${sysconfdir}/default/dhcp-relay
32 install -m 0755 ${WORKDIR}/init-server ${D}${sysconfdir}/init.d/dhcp-server
33 install -m 0644 ${WORKDIR}/default-server ${D}${sysconfdir}/default/dhcp-server
34
35 rm -f ${D}${sysconfdir}/dhclient.conf
36 rm -f ${D}${sysconfdir}/dhcpd.conf
37 install -m 0644 ${WORKDIR}/dhclient.conf ${D}${sysconfdir}/dhcp/dhclient.conf
38 install -m 0644 ${WORKDIR}/dhcpd.conf ${D}${sysconfdir}/dhcp/dhcpd.conf
39
40 install -d ${D}${base_sbindir}/
41 mv ${D}${sbindir}/dhclient ${D}${base_sbindir}/
42 install -m 0755 ${S}/client/scripts/linux ${D}${base_sbindir}/dhclient-script
43}
44
45PACKAGES += "dhcp-server dhcp-client dhcp-relay dhcp-omshell"
46FILES_${PN} = ""
47FILES_dhcp-server = "${sbindir}/dhcpd ${sysconfdir}/init.d/dhcp-server ${sysconfdir}/default/dhcp-server ${sysconfdir}/dhcp/dhcpd.conf"
48FILES_dhcp-relay = "${sbindir}/dhcrelay ${sysconfdir}/init.d/dhcp-relay ${sysconfdir}/default/dhcp-relay"
49
50FILES_dhcp-client = "${base_sbindir}/dhclient ${base_sbindir}/dhclient-script ${sysconfdir}/dhcp/dhclient.conf"
51RDEPENDS_dhcp-client = "bash"
52
53FILES_dhcp-omshell = "${bindir}/omshell"
54
55CONFFILES_dhcp-server_nylon = "/etc/dhcp/dhcpd.conf"
56CONFFILES_dhcp-relay_nylon = "/etc/default/dhcp-relay"
57CONFFILES_dhcp-client_nylon = "/etc/dhcp/dhclient.conf"
diff --git a/meta/recipes-connectivity/dhcp/dhcp_4.1.1-P1.bb b/meta/recipes-connectivity/dhcp/dhcp_4.1.1-P1.bb
new file mode 100644
index 0000000000..e9759de56f
--- /dev/null
+++ b/meta/recipes-connectivity/dhcp/dhcp_4.1.1-P1.bb
@@ -0,0 +1,7 @@
1require dhcp4.inc
2
3PR = "r1"
4
5SRC_URI += "file://fixincludes.patch \
6 file://dhcp-3.0.3-dhclient-dbus.patch;striplevel=0 \
7 file://fix-client-path.patch"
diff --git a/meta/recipes-connectivity/dhcp/files/default-relay b/meta/recipes-connectivity/dhcp/files/default-relay
new file mode 100644
index 0000000000..59249db283
--- /dev/null
+++ b/meta/recipes-connectivity/dhcp/files/default-relay
@@ -0,0 +1,12 @@
1# Defaults for dhcp-relay initscript
2# sourced by /etc/init.d/dhcp-relay
3
4# What servers should the DHCP relay forward requests to?
5# e.g: SERVERS="192.168.0.1"
6SERVERS=""
7
8# On what interfaces should the DHCP relay (dhrelay) serve DHCP requests?
9INTERFACES=""
10
11# Additional options that are passed to the DHCP relay daemon?
12OPTIONS="" \ No newline at end of file
diff --git a/meta/recipes-connectivity/dhcp/files/default-server b/meta/recipes-connectivity/dhcp/files/default-server
new file mode 100644
index 0000000000..0385d16992
--- /dev/null
+++ b/meta/recipes-connectivity/dhcp/files/default-server
@@ -0,0 +1,7 @@
1# Defaults for dhcp initscript
2# sourced by /etc/init.d/dhcp-server
3# installed at /etc/default/dhcp-server by the maintainer scripts
4
5# On what interfaces should the DHCP server (dhcpd) serve DHCP requests?
6# Separate multiple interfaces with spaces, e.g. "eth0 eth1".
7INTERFACES=""
diff --git a/meta/recipes-connectivity/dhcp/files/dhclient.conf b/meta/recipes-connectivity/dhcp/files/dhclient.conf
new file mode 100644
index 0000000000..0e6dcf96c2
--- /dev/null
+++ b/meta/recipes-connectivity/dhcp/files/dhclient.conf
@@ -0,0 +1,50 @@
1# Configuration file for /sbin/dhclient, which is included in Debian's
2# dhcp3-client package.
3#
4# This is a sample configuration file for dhclient. See dhclient.conf's
5# man page for more information about the syntax of this file
6# and a more comprehensive list of the parameters understood by
7# dhclient.
8#
9# Normally, if the DHCP server provides reasonable information and does
10# not leave anything out (like the domain name, for example), then
11# few changes must be made to this file, if any.
12#
13
14#send host-name "andare.fugue.com";
15#send dhcp-client-identifier 1:0:a0:24:ab:fb:9c;
16#send dhcp-lease-time 3600;
17#supersede domain-name "fugue.com home.vix.com";
18#prepend domain-name-servers 127.0.0.1;
19request subnet-mask, broadcast-address, time-offset, routers,
20 domain-name, domain-name-servers, host-name,
21 netbios-name-servers, netbios-scope;
22#require subnet-mask, domain-name-servers;
23#timeout 60;
24#retry 60;
25#reboot 10;
26#select-timeout 5;
27#initial-interval 2;
28#script "/etc/dhcp3/dhclient-script";
29#media "-link0 -link1 -link2", "link0 link1";
30#reject 192.33.137.209;
31
32#alias {
33# interface "eth0";
34# fixed-address 192.5.5.213;
35# option subnet-mask 255.255.255.255;
36#}
37
38#lease {
39# interface "eth0";
40# fixed-address 192.33.137.200;
41# medium "link0 link1";
42# option host-name "andare.swiftmedia.com";
43# option subnet-mask 255.255.255.0;
44# option broadcast-address 192.33.137.255;
45# option routers 192.33.137.250;
46# option domain-name-servers 127.0.0.1;
47# renew 2 2000/1/12 00:00:01;
48# rebind 2 2000/1/12 00:00:01;
49# expire 2 2000/1/12 00:00:01;
50#}
diff --git a/meta/recipes-connectivity/dhcp/files/dhcpd.conf b/meta/recipes-connectivity/dhcp/files/dhcpd.conf
new file mode 100644
index 0000000000..0001c0f00e
--- /dev/null
+++ b/meta/recipes-connectivity/dhcp/files/dhcpd.conf
@@ -0,0 +1,108 @@
1#
2# Sample configuration file for ISC dhcpd for Debian
3#
4# $Id: dhcpd.conf,v 1.1.1.1 2002/05/21 00:07:44 peloy Exp $
5#
6
7# The ddns-updates-style parameter controls whether or not the server will
8# attempt to do a DNS update when a lease is confirmed. We default to the
9# behavior of the version 2 packages ('none', since DHCP v2 didn't
10# have support for DDNS.)
11ddns-update-style none;
12
13# option definitions common to all supported networks...
14option domain-name "example.org";
15option domain-name-servers ns1.example.org, ns2.example.org;
16
17default-lease-time 600;
18max-lease-time 7200;
19
20# If this DHCP server is the official DHCP server for the local
21# network, the authoritative directive should be uncommented.
22#authoritative;
23
24# Use this to send dhcp log messages to a different log file (you also
25# have to hack syslog.conf to complete the redirection).
26log-facility local7;
27
28# No service will be given on this subnet, but declaring it helps the
29# DHCP server to understand the network topology.
30
31#subnet 10.152.187.0 netmask 255.255.255.0 {
32#}
33
34# This is a very basic subnet declaration.
35
36#subnet 10.254.239.0 netmask 255.255.255.224 {
37# range 10.254.239.10 10.254.239.20;
38# option routers rtr-239-0-1.example.org, rtr-239-0-2.example.org;
39#}
40
41# This declaration allows BOOTP clients to get dynamic addresses,
42# which we don't really recommend.
43
44#subnet 10.254.239.32 netmask 255.255.255.224 {
45# range dynamic-bootp 10.254.239.40 10.254.239.60;
46# option broadcast-address 10.254.239.31;
47# option routers rtr-239-32-1.example.org;
48#}
49
50# A slightly different configuration for an internal subnet.
51#subnet 10.5.5.0 netmask 255.255.255.224 {
52# range 10.5.5.26 10.5.5.30;
53# option domain-name-servers ns1.internal.example.org;
54# option domain-name "internal.example.org";
55# option routers 10.5.5.1;
56# option broadcast-address 10.5.5.31;
57# default-lease-time 600;
58# max-lease-time 7200;
59#}
60
61# Hosts which require special configuration options can be listed in
62# host statements. If no address is specified, the address will be
63# allocated dynamically (if possible), but the host-specific information
64# will still come from the host declaration.
65
66#host passacaglia {
67# hardware ethernet 0:0:c0:5d:bd:95;
68# filename "vmunix.passacaglia";
69# server-name "toccata.fugue.com";
70#}
71
72# Fixed IP addresses can also be specified for hosts. These addresses
73# should not also be listed as being available for dynamic assignment.
74# Hosts for which fixed IP addresses have been specified can boot using
75# BOOTP or DHCP. Hosts for which no fixed address is specified can only
76# be booted with DHCP, unless there is an address range on the subnet
77# to which a BOOTP client is connected which has the dynamic-bootp flag
78# set.
79#host fantasia {
80# hardware ethernet 08:00:07:26:c0:a5;
81# fixed-address fantasia.fugue.com;
82#}
83
84# You can declare a class of clients and then do address allocation
85# based on that. The example below shows a case where all clients
86# in a certain class get addresses on the 10.17.224/24 subnet, and all
87# other clients get addresses on the 10.0.29/24 subnet.
88
89#class "foo" {
90# match if substring (option vendor-class-identifier, 0, 4) = "SUNW";
91#}
92
93#shared-network 224-29 {
94# subnet 10.17.224.0 netmask 255.255.255.0 {
95# option routers rtr-224.example.org;
96# }
97# subnet 10.0.29.0 netmask 255.255.255.0 {
98# option routers rtr-29.example.org;
99# }
100# pool {
101# allow members of "foo";
102# range 10.17.224.10 10.17.224.250;
103# }
104# pool {
105# deny members of "foo";
106# range 10.0.29.10 10.0.29.230;
107# }
108#}
diff --git a/meta/recipes-connectivity/dhcp/files/init-relay b/meta/recipes-connectivity/dhcp/files/init-relay
new file mode 100644
index 0000000000..019a7e84cf
--- /dev/null
+++ b/meta/recipes-connectivity/dhcp/files/init-relay
@@ -0,0 +1,44 @@
1#!/bin/sh
2#
3# $Id: dhcp3-relay,v 1.1 2004/04/16 15:41:08 ml Exp $
4#
5
6# It is not safe to start if we don't have a default configuration...
7if [ ! -f /etc/default/dhcp-relay ]; then
8 echo "/etc/default/dhcp-relay does not exist! - Aborting..."
9 echo "create this file to fix the problem."
10 exit 1
11fi
12
13# Read init script configuration (interfaces the daemon should listen on
14# and the DHCP server we should forward requests to.)
15. /etc/default/dhcp-relay
16
17# Build command line for interfaces (will be passed to dhrelay below.)
18IFCMD=""
19if test "$INTERFACES" != ""; then
20 for I in $INTERFACES; do
21 IFCMD=${IFCMD}"-i "${I}" "
22 done
23fi
24
25DHCRELAYPID=/var/run/dhcrelay.pid
26
27case "$1" in
28 start)
29 start-stop-daemon -S -x /usr/sbin/dhcrelay -- -q $OPTIONS $IFCMD $SERVERS
30 ;;
31 stop)
32 start-stop-daemon -K -x /usr/sbin/dhcrelay
33 ;;
34 restart | force-reload)
35 $0 stop
36 sleep 2
37 $0 start
38 ;;
39 *)
40 echo "Usage: /etc/init.d/dhcp-relay {start|stop|restart|force-reload}"
41 exit 1
42esac
43
44exit 0
diff --git a/meta/recipes-connectivity/dhcp/files/init-server b/meta/recipes-connectivity/dhcp/files/init-server
new file mode 100644
index 0000000000..34c20852b9
--- /dev/null
+++ b/meta/recipes-connectivity/dhcp/files/init-server
@@ -0,0 +1,44 @@
1#!/bin/sh
2#
3# $Id: dhcp3-server.init.d,v 1.4 2003/07/13 19:12:41 mdz Exp $
4#
5
6test -f /usr/sbin/dhcpd || exit 0
7
8# It is not safe to start if we don't have a default configuration...
9if [ ! -f /etc/default/dhcp-server ]; then
10 echo "/etc/default/dhcp-server does not exist! - Aborting..."
11 exit 0
12fi
13
14# Read init script configuration (so far only interfaces the daemon
15# should listen on.)
16. /etc/default/dhcp-server
17
18case "$1" in
19 start)
20 echo -n "Starting DHCP server: "
21 test -d /var/lib/dhcp/ || mkdir -p /var/lib/dhcp/
22 test -f /var/lib/dhcp/dhcpd.leases || touch /var/lib/dhcp/dhcpd.leases
23 start-stop-daemon -S -x /usr/sbin/dhcpd -- -q $INTERFACES
24 echo "."
25 ;;
26 stop)
27 echo -n "Stopping DHCP server: dhcpd3"
28 start-stop-daemon -K -x /usr/sbin/dhcpd
29 echo "."
30 ;;
31 restart | force-reload)
32 $0 stop
33 sleep 2
34 $0 start
35 if [ "$?" != "0" ]; then
36 exit 1
37 fi
38 ;;
39 *)
40 echo "Usage: /etc/init.d/dhcp-server {start|stop|restart|force-reload}"
41 exit 1
42esac
43
44exit 0
diff --git a/meta/recipes-connectivity/farsight/farsight2_0.0.9.bb b/meta/recipes-connectivity/farsight/farsight2_0.0.9.bb
new file mode 100644
index 0000000000..06c85f1cf0
--- /dev/null
+++ b/meta/recipes-connectivity/farsight/farsight2_0.0.9.bb
@@ -0,0 +1,24 @@
1DESCRIPTION = "FarSight is an audio/video conferencing framework specifically designed for Instant Messengers."
2HOMEPAGE = "http://farsight.sf.net"
3SRC_URI = "http://farsight.freedesktop.org/releases/farsight2/${P}.tar.gz"
4
5DEPENDS = "libnice glib-2.0 libxml2 zlib dbus gstreamer gst-plugins-base"
6
7inherit autotools
8AUTOTOOLS_STAGE_PKGCONFIG = "1"
9
10PR = "r1"
11
12EXTRA_OECONF = " \
13 --disable-debug \
14 --disable-gtk-doc \
15 --disable-python \
16"
17
18FILES_${PN} += "${libdir}/*/*.so"
19FILES_${PN}-dev += "${libdir}/f*/*a ${libdir}/g*/*a"
20FILES_${PN}-dbg += "${libdir}/*/.debug"
21
22
23
24
diff --git a/meta/recipes-connectivity/farsight/libnice_0.0.6.bb b/meta/recipes-connectivity/farsight/libnice_0.0.6.bb
new file mode 100644
index 0000000000..809b691af7
--- /dev/null
+++ b/meta/recipes-connectivity/farsight/libnice_0.0.6.bb
@@ -0,0 +1,23 @@
1DESCRIPTION = "Libnice is an implementation of the IETF's draft Interactice Connectivity Establishment standard (ICE)."
2HOMEPAGE = "http://nice.freedesktop.org/wiki/"
3SRC_URI = "http://nice.freedesktop.org/releases/libnice-${PV}.tar.gz"
4
5LICENSE = "LGPL/MPL"
6DEPENDS = "glib-2.0 gstreamer"
7
8inherit autotools
9AUTOTOOLS_STAGE_PKGCONFIG = "1"
10
11FILES_${PN} += "${libdir}/gstreamer-0.10/*.so"
12FILES_${PN}-dev += "${libdir}/gstreamer-0.10/*a"
13FILES_${PN}-dbg += "${libdir}/gstreamer-0.10/.debug"
14
15do_compile_append() {
16 for i in $(find ${S} -name "*.pc") ; do
17 sed -i -e s:${STAGING_DIR_TARGET}::g \
18 -e s:/${TARGET_SYS}::g \
19 $i
20 done
21}
22
23
diff --git a/meta/recipes-connectivity/gsm/files/0001-Introduce-ports.patch b/meta/recipes-connectivity/gsm/files/0001-Introduce-ports.patch
new file mode 100644
index 0000000000..b3ba3cb957
--- /dev/null
+++ b/meta/recipes-connectivity/gsm/files/0001-Introduce-ports.patch
@@ -0,0 +1,710 @@
1From 516d67c679101d1503dbd4c0613bcd6ff1b604e4 Mon Sep 17 00:00:00 2001
2From: Andrzej Zaborowski <balrog@zabor.org>
3Date: Wed, 19 Sep 2007 14:03:28 +0200
4Subject: [PATCH] Introduce ports.
5
6---
7 include/gsmd/atcmd.h | 2 +-
8 include/gsmd/gsmd.h | 7 +-
9 include/gsmd/uart.h | 28 ++++++
10 include/gsmd/vendorplugin.h | 4 +-
11 src/gsmd/Makefile.am | 2 +-
12 src/gsmd/atcmd.c | 177 +++++++++++++++++---------------------
13 src/gsmd/gsmd.c | 64 ++------------
14 src/gsmd/uart.c | 202 +++++++++++++++++++++++++++++++++++++++++++
15 8 files changed, 328 insertions(+), 158 deletions(-)
16 create mode 100644 include/gsmd/uart.h
17 create mode 100644 src/gsmd/uart.c
18
19diff --git a/include/gsmd/atcmd.h b/include/gsmd/atcmd.h
20index 0d6c62a..a1af6a0 100644
21--- a/include/gsmd/atcmd.h
22+++ b/include/gsmd/atcmd.h
23@@ -9,7 +9,7 @@ typedef int atcmd_cb_t(struct gsmd_atcmd *cmd, void *ctx, char *resp);
24
25 extern struct gsmd_atcmd *atcmd_fill(const char *cmd, int rlen, atcmd_cb_t *cb, void *ctx, u_int16_t id);
26 extern int atcmd_submit(struct gsmd *g, struct gsmd_atcmd *cmd);
27-extern int atcmd_init(struct gsmd *g, int sockfd);
28+extern int atcmd_init(struct gsmd *g, struct gsmd_port *port);
29 extern void atcmd_drain(int fd);
30
31 #endif /* __GSMD__ */
32diff --git a/include/gsmd/gsmd.h b/include/gsmd/gsmd.h
33index ed334f1..4afdf66 100644
34--- a/include/gsmd/gsmd.h
35+++ b/include/gsmd/gsmd.h
36@@ -10,6 +10,7 @@
37 #include <gsmd/machineplugin.h>
38 #include <gsmd/vendorplugin.h>
39 #include <gsmd/select.h>
40+#include <gsmd/uart.h>
41 #include <gsmd/state.h>
42
43 void *gsmd_tallocs;
44@@ -52,6 +53,7 @@ enum llparse_state {
45 #define MLPARSE_BUF_SIZE 65535
46
47 struct llparser {
48+ struct gsmd_port *port;
49 enum llparse_state state;
50 unsigned int len;
51 unsigned int flags;
52@@ -70,7 +72,7 @@ struct gsmd;
53 struct gsmd {
54 unsigned int flags;
55 int interpreter_ready;
56- struct gsmd_fd gfd_uart;
57+ struct gsmd_uart uart;
58 struct gsmd_fd gfd_sock;
59 struct llparser llp;
60 struct llist_head users;
61@@ -81,9 +83,10 @@ struct gsmd {
62 struct gsmd_device_state dev_state;
63
64 struct llist_head operators; /* cached list of operator names */
65- unsigned char *mlbuf; /* ml_parse buffer */
66+ char *mlbuf; /* ml_parse buffer */
67 unsigned int mlbuf_len;
68 int mlunsolicited;
69+ int clear_to_send;
70 };
71
72 struct gsmd_user {
73diff --git a/include/gsmd/uart.h b/include/gsmd/uart.h
74new file mode 100644
75index 0000000..a006fa7
76--- /dev/null
77+++ b/include/gsmd/uart.h
78@@ -0,0 +1,28 @@
79+#ifndef __GSMD_UART_H
80+#define __GSMD_UART_H
81+
82+#ifdef __GSMD__
83+
84+struct gsmd_port {
85+ int (*write)(struct gsmd_port *port, const char data[], int len);
86+ int (*set_break)(struct gsmd_port *port, int state);
87+ /* more parameters here */
88+ int (*newdata_cb)(void *opaque, const char data[], int len);
89+ void *newdata_opaque;
90+};
91+
92+struct gsmd_uart {
93+ struct gsmd_port port;
94+ struct gsmd_fd gfd;
95+ char txfifo[2048];
96+ int tx_start;
97+ int tx_len;
98+};
99+
100+extern int set_baudrate(int fd, int baudrate, int hwflow);
101+extern void uart_drain(int fd);
102+extern int uart_init(struct gsmd_uart *uart, int sockfd);
103+
104+#endif /* __GSMD__ */
105+
106+#endif
107diff --git a/include/gsmd/vendorplugin.h b/include/gsmd/vendorplugin.h
108index 1911fef..1c82790 100644
109--- a/include/gsmd/vendorplugin.h
110+++ b/include/gsmd/vendorplugin.h
111@@ -11,8 +11,8 @@ struct gsmd_unsolicit;
112
113 struct gsmd_vendor_plugin {
114 struct llist_head list;
115- unsigned char *name;
116- unsigned char *ext_chars;
117+ char *name;
118+ char *ext_chars;
119 unsigned int num_unsolicit;
120 const struct gsmd_unsolicit *unsolicit;
121 int (*detect)(struct gsmd *g);
122diff --git a/src/gsmd/Makefile.am b/src/gsmd/Makefile.am
123index 9ac45ee..110b757 100644
124--- a/src/gsmd/Makefile.am
125+++ b/src/gsmd/Makefile.am
126@@ -13,7 +13,7 @@ sbin_PROGRAMS = gsmd
127 gsmd_CFLAGS = -D PLUGINDIR=\"$(plugindir)\"
128 gsmd_SOURCES = gsmd.c atcmd.c select.c machine.c vendor.c unsolicited.c log.c \
129 usock.c talloc.c timer.c operator_cache.c ext_response.c \
130- sms_cb.c sms_pdu.c
131+ sms_cb.c sms_pdu.c uart.c
132 gsmd_LDADD = -ldl
133 gsmd_LDFLAGS = -Wl,--export-dynamic
134
135diff --git a/src/gsmd/atcmd.c b/src/gsmd/atcmd.c
136index 2ef6a10..27dfa41 100644
137--- a/src/gsmd/atcmd.c
138+++ b/src/gsmd/atcmd.c
139@@ -159,7 +159,8 @@ static int llparse_byte(struct llparser *llp, char byte)
140 return ret;
141 }
142
143-static int llparse_string(struct llparser *llp, char *buf, unsigned int len)
144+static int llparse_string(struct llparser *llp, const char *buf,
145+ unsigned int len)
146 {
147 while (len--) {
148 int rc = llparse_byte(llp, *(buf++));
149@@ -187,6 +188,55 @@ static int llparse_init(struct llparser *llp)
150 return 0;
151 }
152
153+/* See if we can now send more commands to the port */
154+static void atcmd_wake_queue(struct gsmd *g)
155+{
156+ int len, rc;
157+ char *cr;
158+
159+ /* write pending commands to UART */
160+ while (g->interpreter_ready && g->clear_to_send) {
161+ struct gsmd_atcmd *pos, *pos2;
162+ llist_for_each_entry_safe(pos, pos2, &g->pending_atcmds, list) {
163+ cr = strchr(pos->cur, '\n');
164+ if (cr)
165+ len = cr - pos->cur;
166+ else
167+ len = pos->buflen;
168+ rc = g->llp.port->write(g->llp.port, pos->cur, len);
169+ if (rc == 0) {
170+ gsmd_log(GSMD_ERROR,
171+ "write returns 0, aborting\n");
172+ break;
173+ }
174+ if (cr && rc == len)
175+ rc ++; /* Skip the \n */
176+ pos->buflen -= rc;
177+ pos->cur += rc;
178+ g->llp.port->write(g->llp.port, "\r", 1);
179+
180+ if (!pos->buflen) {
181+ /* success: remove from global list of
182+ * to-be-sent atcmds */
183+ llist_del(&pos->list);
184+ /* append to global list of executing atcmds */
185+ llist_add_tail(&pos->list, &g->busy_atcmds);
186+
187+ /* we only send one cmd at the moment */
188+ g->clear_to_send = 0;
189+ break;
190+ } else {
191+ /* The write was short or the atcmd has more
192+ * lines to send after a "> ". */
193+ if (rc < len)
194+ break;
195+ g->clear_to_send = 0;
196+ break;
197+ }
198+ }
199+ }
200+}
201+
202 /* mid-level parser */
203
204 static int parse_final_result(const char *res)
205@@ -216,6 +266,7 @@ static int ml_parse(const char *buf, int len, void *ctx)
206 g->interpreter_ready = 1;
207 gsmd_initsettings(g);
208 gmsd_alive_start(g);
209+ atcmd_wake_queue(g);
210 return 0;
211 }
212
213@@ -316,6 +367,7 @@ static int ml_parse(const char *buf, int len, void *ctx)
214 } else {
215 DEBUGP("Calling cmd->cb()\n");
216 cmd->resp = g->mlbuf;
217+ g->mlbuf[g->mlbuf_len] = 0;
218 rc = cmd->cb(cmd, cmd->ctx, cmd->resp);
219 DEBUGP("Clearing mlbuf\n");
220 }
221@@ -370,12 +422,15 @@ static int ml_parse(const char *buf, int len, void *ctx)
222 if (g->mlbuf_len)
223 g->mlbuf[g->mlbuf_len ++] = '\n';
224 DEBUGP("Appending buf to mlbuf\n");
225- if (len > MLPARSE_BUF_SIZE - g->mlbuf_len)
226+ if (len > MLPARSE_BUF_SIZE - g->mlbuf_len) {
227 len = MLPARSE_BUF_SIZE - g->mlbuf_len;
228+ gsmd_log(GSMD_NOTICE, "g->mlbuf overrun\n");
229+ }
230 memcpy(g->mlbuf + g->mlbuf_len, buf, len);
231 g->mlbuf_len += len;
232
233 if (g->mlunsolicited) {
234+ g->mlbuf[g->mlbuf_len] = 0;
235 rc = unsolicited_parse(g, g->mlbuf, g->mlbuf_len,
236 strchr(g->mlbuf, ':') + 1);
237 if (rc == -EAGAIN) {
238@@ -422,8 +477,11 @@ final_cb:
239
240 /* if we're finished with current commands, but still have pending
241 * commands: we want to WRITE again */
242- if (llist_empty(&g->busy_atcmds) && !llist_empty(&g->pending_atcmds))
243- g->gfd_uart.when |= GSMD_FD_WRITE;
244+ if (llist_empty(&g->busy_atcmds)) {
245+ g->clear_to_send = 1;
246+ if (!llist_empty(&g->pending_atcmds))
247+ atcmd_wake_queue(g);
248+ }
249
250 return rc;
251 }
252@@ -433,85 +491,23 @@ static int atcmd_prompt(void *data)
253 {
254 struct gsmd *g = data;
255
256- g->gfd_uart.when |= GSMD_FD_WRITE;
257+ g->clear_to_send = 1;
258+ atcmd_wake_queue(g);
259 }
260
261 /* callback to be called if [virtual] UART has some data for us */
262-static int atcmd_select_cb(int fd, unsigned int what, void *data)
263+static int atcmd_newdata_cb(void *opaque, const char data[], int len)
264 {
265- int len, rc;
266- static char rxbuf[1024];
267- struct gsmd *g = data;
268- char *cr;
269-
270- if (what & GSMD_FD_READ) {
271- memset(rxbuf, 0, sizeof(rxbuf));
272- while ((len = read(fd, rxbuf, sizeof(rxbuf)))) {
273- if (len < 0) {
274- if (errno == EAGAIN)
275- return 0;
276- gsmd_log(GSMD_NOTICE, "ERROR reading from fd %u: %d (%s)\n", fd, len,
277- strerror(errno));
278- return len;
279- }
280- rc = llparse_string(&g->llp, rxbuf, len);
281- if (rc < 0) {
282- gsmd_log(GSMD_ERROR, "ERROR during llparse_string: %d\n", rc);
283- return rc;
284- }
285- }
286- }
287-
288- /* write pending commands to UART */
289- if ((what & GSMD_FD_WRITE) && g->interpreter_ready) {
290- struct gsmd_atcmd *pos, *pos2;
291- llist_for_each_entry_safe(pos, pos2, &g->pending_atcmds, list) {
292- cr = strchr(pos->cur, '\n');
293- if (cr)
294- len = cr - pos->cur;
295- else
296- len = pos->buflen - 1; /* assuming zero-terminated strings */
297- rc = write(fd, pos->cur, len);
298- if (rc == 0) {
299- gsmd_log(GSMD_ERROR, "write returns 0, aborting\n");
300- break;
301- } else if (rc < 0) {
302- gsmd_log(GSMD_ERROR, "error during write to fd %d: %d\n",
303- fd, rc);
304- return rc;
305- }
306- if (!cr || rc == len)
307- rc ++; /* Skip the \n or \0 */
308- pos->buflen -= rc;
309- pos->cur += rc;
310- write(fd, "\r", 1);
311-
312- if (!pos->buflen) {
313- /* success: remove from global list of
314- * to-be-sent atcmds */
315- llist_del(&pos->list);
316- /* append to global list of executing atcmds */
317- llist_add_tail(&pos->list, &g->busy_atcmds);
318-
319- /* we only send one cmd at the moment */
320- break;
321- } else {
322- /* The write was short or the atcmd has more
323- * lines to send after a "> ". */
324- if (rc < len)
325- return 0;
326- break;
327- }
328- }
329+ struct gsmd *g = opaque;
330+ int rc;
331
332- /* Either pending_atcmds is empty or a command has to wait */
333- g->gfd_uart.when &= ~GSMD_FD_WRITE;
334- }
335+ rc = llparse_string(&g->llp, data, len);
336+ if (rc < 0)
337+ gsmd_log(GSMD_ERROR, "ERROR during llparse_string: %d\n", rc);
338
339- return 0;
340+ return rc;
341 }
342
343-
344 struct gsmd_atcmd *atcmd_fill(const char *cmd, int rlen,
345 atcmd_cb_t cb, void *ctx, u_int16_t id)
346 {
347@@ -544,36 +540,18 @@ int atcmd_submit(struct gsmd *g, struct gsmd_atcmd *cmd)
348 {
349 DEBUGP("submitting command `%s'\n", cmd->buf);
350
351- if (llist_empty(&g->pending_atcmds))
352- g->gfd_uart.when |= GSMD_FD_WRITE;
353+ llist_empty(&g->pending_atcmds);
354 llist_add_tail(&cmd->list, &g->pending_atcmds);
355+ atcmd_wake_queue(g);
356
357 return 0;
358 }
359
360-void atcmd_drain(int fd)
361-{
362- int rc;
363- struct termios t;
364- rc = tcflush(fd, TCIOFLUSH);
365- rc = tcgetattr(fd, &t);
366- DEBUGP("c_iflag = 0x%08x, c_oflag = 0x%08x, c_cflag = 0x%08x, c_lflag = 0x%08x\n",
367- t.c_iflag, t.c_oflag, t.c_cflag, t.c_lflag);
368- t.c_iflag = t.c_oflag = 0;
369- cfmakeraw(&t);
370- rc = tcsetattr(fd, TCSANOW, &t);
371-}
372-
373 /* init atcmd parser */
374-int atcmd_init(struct gsmd *g, int sockfd)
375+int atcmd_init(struct gsmd *g, struct gsmd_port *port)
376 {
377 __atcmd_ctx = talloc_named_const(gsmd_tallocs, 1, "atcmds");
378
379- g->gfd_uart.fd = sockfd;
380- g->gfd_uart.when = GSMD_FD_READ;
381- g->gfd_uart.data = g;
382- g->gfd_uart.cb = &atcmd_select_cb;
383-
384 INIT_LLIST_HEAD(&g->pending_atcmds);
385 INIT_LLIST_HEAD(&g->busy_atcmds);
386
387@@ -581,7 +559,9 @@ int atcmd_init(struct gsmd *g, int sockfd)
388
389 g->mlbuf_len = 0;
390 g->mlunsolicited = 0;
391+ g->clear_to_send = 1;
392
393+ g->llp.port = port;
394 g->llp.cur = g->llp.buf;
395 g->llp.len = sizeof(g->llp.buf);
396 g->llp.cb = &ml_parse;
397@@ -589,5 +569,8 @@ int atcmd_init(struct gsmd *g, int sockfd)
398 g->llp.ctx = g;
399 g->llp.flags = LGSM_ATCMD_F_EXTENDED;
400
401- return gsmd_register_fd(&g->gfd_uart);
402+ port->newdata_opaque = g;
403+ port->newdata_cb = atcmd_newdata_cb;
404+
405+ return 0;
406 }
407diff --git a/src/gsmd/gsmd.c b/src/gsmd/gsmd.c
408index 51b4f2c..846bd17 100644
409--- a/src/gsmd/gsmd.c
410+++ b/src/gsmd/gsmd.c
411@@ -26,7 +26,6 @@
412 #include <string.h>
413 #include <errno.h>
414 #include <fcntl.h>
415-#include <termios.h>
416 #include <signal.h>
417
418 #define _GNU_SOURCE
419@@ -247,56 +246,6 @@ int gsmd_initsettings(struct gsmd *gsmd)
420 return atcmd_submit(gsmd, cmd);
421 }
422
423-struct bdrt {
424- int bps;
425- u_int32_t b;
426-};
427-
428-static struct bdrt bdrts[] = {
429- { 0, B0 },
430- { 9600, B9600 },
431- { 19200, B19200 },
432- { 38400, B38400 },
433- { 57600, B57600 },
434- { 115200, B115200 },
435- { 230400, B230400 },
436- { 460800, B460800 },
437- { 921600, B921600 },
438-};
439-
440-static int set_baudrate(int fd, int baudrate, int hwflow)
441-{
442- int i;
443- u_int32_t bd = 0;
444- struct termios ti;
445-
446- for (i = 0; i < ARRAY_SIZE(bdrts); i++) {
447- if (bdrts[i].bps == baudrate)
448- bd = bdrts[i].b;
449- }
450- if (bd == 0)
451- return -EINVAL;
452-
453- i = tcgetattr(fd, &ti);
454- if (i < 0)
455- return i;
456-
457- i = cfsetispeed(&ti, B0);
458- if (i < 0)
459- return i;
460-
461- i = cfsetospeed(&ti, bd);
462- if (i < 0)
463- return i;
464-
465- if (hwflow)
466- ti.c_cflag |= CRTSCTS;
467- else
468- ti.c_cflag &= ~CRTSCTS;
469-
470- return tcsetattr(fd, 0, &ti);
471-}
472-
473 static int gsmd_initialize(struct gsmd *g)
474 {
475 INIT_LLIST_HEAD(&g->users);
476@@ -478,14 +427,19 @@ int main(int argc, char **argv)
477 if (wait >= 0)
478 g.interpreter_ready = !wait;
479
480- if (atcmd_init(&g, fd) < 0) {
481+ if (uart_init(&g.uart, fd) < 0) {
482 fprintf(stderr, "can't initialize UART device\n");
483 exit(1);
484 }
485
486- write(fd, "\r", 1);
487- sleep(1);
488- atcmd_drain(fd);
489+ if (atcmd_init(&g, &g.uart.port) < 0) {
490+ fprintf(stderr, "can't initialize AT parser\n");
491+ exit(1);
492+ }
493+ write(fd, "\r", 1);
494+ sleep(1);
495+
496+ uart_drain(fd);
497
498 if (usock_init(&g) < 0) {
499 fprintf(stderr, "can't open unix socket\n");
500diff --git a/src/gsmd/uart.c b/src/gsmd/uart.c
501new file mode 100644
502index 0000000..22a4a5c
503--- /dev/null
504+++ b/src/gsmd/uart.c
505@@ -0,0 +1,202 @@
506+/* Wrapper for the physical UART in a struct gsmd_port abstraction.
507+ *
508+ * Copyright (C) 2007 OpenMoko, Inc.
509+ * Written by Andrzej Zaborowski <andrew@openedhand.com>
510+ *
511+ * This program is free software; you can redistribute it and/or
512+ * modify it under the terms of the GNU General Public License as
513+ * published by the Free Software Foundation; either version 2 of
514+ * the License, or (at your option) any later version.
515+ *
516+ * This program is distributed in the hope that it will be useful,
517+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
518+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
519+ * GNU General Public License for more details.
520+ *
521+ * You should have received a copy of the GNU General Public License
522+ * along with this program; if not, write to the Free Software
523+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
524+ * MA 02111-1307 USA
525+ */
526+
527+#include <string.h>
528+#include <fcntl.h>
529+#include <termios.h>
530+#include <unistd.h>
531+#include <errno.h>
532+
533+#include "gsmd.h"
534+
535+#include <gsmd/gsmd.h>
536+
537+void uart_drain(int fd)
538+{
539+ int rc;
540+ struct termios t;
541+ rc = tcflush(fd, TCIOFLUSH);
542+ rc = tcgetattr(fd, &t);
543+ DEBUGP(
544+ "c_iflag = 0x%08x, c_oflag = 0x%08x, "
545+ "c_cflag = 0x%08x, c_lflag = 0x%08x\n",
546+ t.c_iflag, t.c_oflag, t.c_cflag, t.c_lflag);
547+ t.c_iflag = t.c_oflag = 0;
548+ cfmakeraw(&t);
549+ rc = tcsetattr(fd, TCSANOW, &t);
550+}
551+
552+struct bdrt {
553+ int bps;
554+ u_int32_t b;
555+};
556+
557+static struct bdrt bdrts[] = {
558+ { 0, B0 },
559+ { 9600, B9600 },
560+ { 19200, B19200 },
561+ { 38400, B38400 },
562+ { 57600, B57600 },
563+ { 115200, B115200 },
564+ { 230400, B230400 },
565+ { 460800, B460800 },
566+ { 921600, B921600 },
567+};
568+
569+int set_baudrate(int fd, int baudrate, int hwflow)
570+{
571+ int i;
572+ u_int32_t bd = 0;
573+ struct termios ti;
574+
575+ for (i = 0; i < ARRAY_SIZE(bdrts); i++) {
576+ if (bdrts[i].bps == baudrate)
577+ bd = bdrts[i].b;
578+ }
579+ if (bd == 0)
580+ return -EINVAL;
581+
582+ i = tcgetattr(fd, &ti);
583+ if (i < 0)
584+ return i;
585+
586+ i = cfsetispeed(&ti, B0);
587+ if (i < 0)
588+ return i;
589+
590+ i = cfsetospeed(&ti, bd);
591+ if (i < 0)
592+ return i;
593+
594+ if (hwflow)
595+ ti.c_cflag |= CRTSCTS;
596+ else
597+ ti.c_cflag &= ~CRTSCTS;
598+
599+ return tcsetattr(fd, 0, &ti);
600+}
601+
602+static int uart_select_cb(int fd, unsigned int what, void *data)
603+{
604+ struct gsmd_uart *uart = (struct gsmd_uart *) data;
605+ static char rxbuf[2048];
606+ int rc, len;
607+
608+ if ((what & GSMD_FD_READ) && uart->port.newdata_cb) {
609+ while ((len = read(fd, rxbuf, sizeof(rxbuf)))) {
610+ if (len < 0) {
611+ if (errno == EAGAIN || errno == EINTR)
612+ return 0;
613+ gsmd_log(GSMD_NOTICE, "ERROR reading from "
614+ "fd %u: %d (%s)\n", fd, errno,
615+ strerror(errno));
616+ return -errno;
617+ }
618+
619+ rc = uart->port.newdata_cb(
620+ uart->port.newdata_opaque,
621+ rxbuf,
622+ len);
623+ if (rc < 0)
624+ return rc;
625+ }
626+ }
627+
628+ /* Write pending data to UART. */
629+ if ((what & GSMD_FD_WRITE) && uart->tx_len) {
630+ while (uart->tx_start + uart->tx_len >= sizeof(uart->txfifo)) {
631+ len = sizeof(uart->txfifo) - uart->tx_start;
632+ rc = write(fd, &uart->txfifo[uart->tx_start], len);
633+ if (rc < 0 && errno != EINTR) {
634+ if (errno == EAGAIN)
635+ return 0;
636+ gsmd_log(GSMD_NOTICE, "ERROR writing "
637+ "fd %u: %d (%s)\n", fd, errno,
638+ strerror(errno));
639+ return -errno;
640+ }
641+
642+ if (rc > 0) {
643+ uart->tx_start += rc;
644+ uart->tx_len -= rc;
645+ }
646+ }
647+ uart->tx_start &= sizeof(uart->txfifo) - 1;
648+
649+ while (uart->tx_len) {
650+ rc = write(fd, &uart->txfifo[uart->tx_start],
651+ uart->tx_len);
652+ if (rc < 0 && errno != EINTR) {
653+ if (errno == EAGAIN)
654+ return 0;
655+ gsmd_log(GSMD_NOTICE, "ERROR writing "
656+ "fd %u: %d (%s)\n", fd, errno,
657+ strerror(errno));
658+ return -errno;
659+ }
660+
661+ if (rc > 0) {
662+ uart->tx_start += rc;
663+ uart->tx_len -= rc;
664+ }
665+ }
666+
667+ /* If we reached here, there's no more data for the moment. */
668+ uart->gfd.when &= ~GSMD_FD_WRITE;
669+ }
670+
671+ return 0;
672+}
673+
674+static int uart_write(struct gsmd_port *port, const char data[], int len)
675+{
676+ struct gsmd_uart *uart = (struct gsmd_uart *) port;
677+ int start = (uart->tx_start + uart->tx_len) &
678+ (sizeof(uart->txfifo) - 1);
679+ int space = sizeof(uart->txfifo) - start;
680+
681+ if (uart->tx_len + len > sizeof(uart->txfifo))
682+ len = sizeof(uart->txfifo) - uart->tx_len;
683+
684+ if (len)
685+ uart->gfd.when |= GSMD_FD_WRITE;
686+
687+ if (len > space) {
688+ memcpy(uart->txfifo + start, data, space);
689+ memcpy(uart->txfifo, data + space, len - space);
690+ } else
691+ memcpy(uart->txfifo + start, data, len);
692+
693+ uart->tx_len += len;
694+ return len;
695+}
696+
697+int uart_init(struct gsmd_uart *uart, int sockfd)
698+{
699+ uart->gfd.fd = sockfd;
700+ uart->gfd.when = GSMD_FD_READ;
701+ uart->gfd.data = uart;
702+ uart->gfd.cb = &uart_select_cb;
703+
704+ uart->port.write = uart_write;
705+
706+ return gsmd_register_fd(&uart->gfd);
707+}
708--
7091.5.2.1
710
diff --git a/meta/recipes-connectivity/gsm/files/0002-Flush-all-pending-commands-before-restarting-the-mod.patch b/meta/recipes-connectivity/gsm/files/0002-Flush-all-pending-commands-before-restarting-the-mod.patch
new file mode 100644
index 0000000000..3683596389
--- /dev/null
+++ b/meta/recipes-connectivity/gsm/files/0002-Flush-all-pending-commands-before-restarting-the-mod.patch
@@ -0,0 +1,74 @@
1From 1078f7aced63c6216bffe649930b97c9ccf9a16e Mon Sep 17 00:00:00 2001
2From: Andrzej Zaborowski <balrog@zabor.org>
3Date: Wed, 19 Sep 2007 14:04:50 +0200
4Subject: [PATCH] Flush all pending commands before restarting the modem initialisation.
5
6---
7 include/gsmd/gsmd.h | 1 +
8 src/gsmd/atcmd.c | 21 +++++++++++++++++++++
9 src/gsmd/timer.c | 8 ++++++++
10 3 files changed, 30 insertions(+), 0 deletions(-)
11
12diff --git a/include/gsmd/gsmd.h b/include/gsmd/gsmd.h
13index 4afdf66..6ac9d8e 100644
14--- a/include/gsmd/gsmd.h
15+++ b/include/gsmd/gsmd.h
16@@ -131,6 +131,7 @@ struct gsmd_timer {
17
18 int gsmd_timer_init(void);
19 void gmsd_timer_check_n_run(void);
20+void gsmd_timer_reset(void);
21
22 struct gsmd_timer *gsmd_timer_alloc(void);
23 int gsmd_timer_register(struct gsmd_timer *timer);
24diff --git a/src/gsmd/atcmd.c b/src/gsmd/atcmd.c
25index 27dfa41..2f6cee2 100644
26--- a/src/gsmd/atcmd.c
27+++ b/src/gsmd/atcmd.c
28@@ -264,6 +264,27 @@ static int ml_parse(const char *buf, int len, void *ctx)
29 if (strlen(buf) == 0 ||
30 !strcmp(buf, "AT-Command Interpreter ready")) {
31 g->interpreter_ready = 1;
32+ g->clear_to_send = 1;
33+
34+ /* Flush current queue and reinitialise */
35+ while (!llist_empty(&g->busy_atcmds)) {
36+ cmd = llist_entry(g->busy_atcmds.next,
37+ struct gsmd_atcmd, list);
38+ gsmd_log(GSMD_NOTICE, "discarding busy cmd %s\n",
39+ cmd->buf);
40+ llist_del(&cmd->list);
41+ talloc_free(cmd);
42+ }
43+ while (!llist_empty(&g->pending_atcmds)) {
44+ cmd = llist_entry(g->pending_atcmds.next,
45+ struct gsmd_atcmd, list);
46+ gsmd_log(GSMD_NOTICE, "discarding pending cmd %s\n",
47+ cmd->buf);
48+ llist_del(&cmd->list);
49+ talloc_free(cmd);
50+ }
51+
52+ gsmd_timer_reset();
53 gsmd_initsettings(g);
54 gmsd_alive_start(g);
55 atcmd_wake_queue(g);
56diff --git a/src/gsmd/timer.c b/src/gsmd/timer.c
57index 5200690..8877275 100644
58--- a/src/gsmd/timer.c
59+++ b/src/gsmd/timer.c
60@@ -215,3 +215,11 @@ void gsmd_timer_unregister(struct gsmd_timer *timer)
61 /* re-calculate next expiration */
62 calc_next_expiration();
63 }
64+
65+void gsmd_timer_reset(void)
66+{
67+ while (!llist_empty(&gsmd_timers))
68+ /* TODO: free associated resources (e.g timer->cancel_cb()) */
69+ llist_del(&llist_entry(gsmd_timers.next,
70+ struct gsmd_timer, list)->list);
71+}
72--
731.5.2.1
74
diff --git a/meta/recipes-connectivity/gsm/files/0003-Correctly-segment-incoming-usock-data-into-packets.patch b/meta/recipes-connectivity/gsm/files/0003-Correctly-segment-incoming-usock-data-into-packets.patch
new file mode 100644
index 0000000000..984acc9369
--- /dev/null
+++ b/meta/recipes-connectivity/gsm/files/0003-Correctly-segment-incoming-usock-data-into-packets.patch
@@ -0,0 +1,77 @@
1From 8af1bb4a0d0df9baa80859c5f7f56cbd7634aded Mon Sep 17 00:00:00 2001
2From: Andrzej Zaborowski <balrog@zabor.org>
3Date: Wed, 19 Sep 2007 14:06:19 +0200
4Subject: [PATCH] Correctly segment incoming usock data into packets, handler short reads.
5
6---
7 include/gsmd/gsmd.h | 2 ++
8 src/gsmd/usock.c | 20 ++++++++++++++++----
9 2 files changed, 18 insertions(+), 4 deletions(-)
10
11diff --git a/include/gsmd/gsmd.h b/include/gsmd/gsmd.h
12index 6ac9d8e..acec02a 100644
13--- a/include/gsmd/gsmd.h
14+++ b/include/gsmd/gsmd.h
15@@ -95,6 +95,8 @@ struct gsmd_user {
16 struct gsmd *gsmd;
17 struct gsmd_fd gfd; /* the socket */
18 u_int32_t subscriptions; /* bitmaks of subscribed event groups */
19+ char usock_fifo[1024];
20+ int usock_len;
21
22 struct llist_head pb_readrg_list; /* our READRG phonebook list */
23 struct llist_head pb_find_list; /* our FIND phonebook list */
24diff --git a/src/gsmd/usock.c b/src/gsmd/usock.c
25index 32e98d0..bac5f0c 100644
26--- a/src/gsmd/usock.c
27+++ b/src/gsmd/usock.c
28@@ -1529,14 +1529,15 @@ static int usock_rcv_pcmd(struct gsmd_user *gu, char *buf, int len)
29 static int gsmd_usock_user_cb(int fd, unsigned int what, void *data)
30 {
31 struct gsmd_user *gu = data;
32+ struct gsmd_msg_hdr *gph;
33
34 /* FIXME: check some kind of backlog and limit it */
35
36 if (what & GSMD_FD_READ) {
37- char buf[1024];
38 int rcvlen;
39 /* read data from socket, determine what he wants */
40- rcvlen = read(fd, buf, sizeof(buf));
41+ rcvlen = read(fd, gu->usock_fifo + gu->usock_len,
42+ sizeof(gu->usock_fifo) - gu->usock_len);
43 if (rcvlen == 0) {
44 DEBUGP("EOF, this client has just vanished\n");
45 /* EOF, this client has just vanished */
46@@ -1549,8 +1550,18 @@ static int gsmd_usock_user_cb(int fd, unsigned int what, void *data)
47 return 0;
48 } else if (rcvlen < 0)
49 return rcvlen;
50- else
51- return usock_rcv_pcmd(gu, buf, rcvlen);
52+
53+ gu->usock_len += rcvlen;
54+ gph = (struct gsmd_msg_hdr *) gu->usock_fifo;
55+ while (gu->usock_len >= sizeof(*gph) &&
56+ gu->usock_len >= sizeof(*gph) + gph->len) {
57+ usock_rcv_pcmd(gu, gu->usock_fifo, gu->usock_len);
58+ gu->usock_len -= sizeof(*gph) + gph->len;
59+ memmove(gu->usock_fifo,
60+ gu->usock_fifo + sizeof(*gph) +
61+ gph->len,
62+ gu->usock_len);
63+ }
64 }
65
66 if (what & GSMD_FD_WRITE) {
67@@ -1609,6 +1620,7 @@ static int gsmd_usock_cb(int fd, unsigned int what, void *data)
68 newuser->gfd.cb = &gsmd_usock_user_cb;
69 newuser->gsmd = g;
70 newuser->subscriptions = 0xffffffff;
71+ newuser->usock_len = 0;
72 INIT_LLIST_HEAD(&newuser->finished_ucmds);
73 INIT_LLIST_HEAD(&newuser->pb_readrg_list);
74 INIT_LLIST_HEAD(&newuser->pb_find_list);
75--
761.5.2.1
77
diff --git a/meta/recipes-connectivity/gsm/files/0004-Handle-read-and-write-return-values.patch b/meta/recipes-connectivity/gsm/files/0004-Handle-read-and-write-return-values.patch
new file mode 100644
index 0000000000..f5e7a7902d
--- /dev/null
+++ b/meta/recipes-connectivity/gsm/files/0004-Handle-read-and-write-return-values.patch
@@ -0,0 +1,176 @@
1From 421b0fa14fefbd13a455c20380fecddda616b41a Mon Sep 17 00:00:00 2001
2From: Andrzej Zaborowski <balrog@zabor.org>
3Date: Wed, 19 Sep 2007 18:30:36 +0200
4Subject: [PATCH] Handle read() and write() return values.
5
6---
7 include/libgsmd/libgsmd.h | 3 +-
8 src/gsmd/usock.c | 38 ++++++++++++++++-----------
9 src/libgsmd/lgsm_internals.h | 2 +
10 src/libgsmd/libgsmd.c | 58 ++++++++++++++++++++++++++---------------
11 4 files changed, 63 insertions(+), 38 deletions(-)
12
13diff --git a/include/libgsmd/libgsmd.h b/include/libgsmd/libgsmd.h
14index fc56890..db15aa9 100644
15--- a/include/libgsmd/libgsmd.h
16+++ b/include/libgsmd/libgsmd.h
17@@ -65,6 +65,7 @@ extern int lgsm_subscriptions(struct lgsm_handle *lh, u_int32_t subscriptions);
18
19 extern struct gsmd_msg_hdr *lgsm_gmh_fill(int type, int subtype, int payload_len);
20 extern int lgsm_send(struct lgsm_handle *lh, struct gsmd_msg_hdr *gmh);
21-extern int lgsm_handle_packet(struct lgsm_handle *lh, char *buf, int len);
22+extern int lgsm_handle_packet(struct lgsm_handle *lh,
23+ const char *buf, int len);
24
25 #endif
26diff --git a/src/gsmd/usock.c b/src/gsmd/usock.c
27index bac5f0c..2283600 100644
28--- a/src/gsmd/usock.c
29+++ b/src/gsmd/usock.c
30@@ -1569,23 +1569,29 @@ static int gsmd_usock_user_cb(int fd, unsigned int what, void *data)
31 struct gsmd_ucmd *ucmd, *uctmp;
32 llist_for_each_entry_safe(ucmd, uctmp, &gu->finished_ucmds,
33 list) {
34- int rc;
35-
36- rc = write(fd, &ucmd->hdr, sizeof(ucmd->hdr) + ucmd->hdr.len);
37- if (rc < 0) {
38- DEBUGP("write return %d\n", rc);
39- return rc;
40- }
41- if (rc == 0) {
42- DEBUGP("write returns zero!!\n");
43- break;
44+ const void *pos = &ucmd->hdr;
45+ size_t len = sizeof(ucmd->hdr) + ucmd->hdr.len;
46+
47+ while (len) {
48+ ssize_t rc;
49+
50+ rc = write(fd, pos, len);
51+ if (rc < 0 && errno != EINTR) {
52+ DEBUGP("write returned %s\n",
53+ strerror(errno));
54+ return rc;
55+ }
56+ if (rc == 0 && pos == &ucmd->hdr) {
57+ DEBUGP("write returns zero!!\n");
58+ return 0;
59+ }
60+ if (rc > 0) {
61+ len -= rc;
62+ pos += rc;
63+ }
64 }
65- if (rc != sizeof(ucmd->hdr) + ucmd->hdr.len) {
66- DEBUGP("short write\n");
67- break;
68- }
69-
70- DEBUGP("successfully sent cmd %p to user %p, freeing\n", ucmd, gu);
71+ DEBUGP("successfully sent cmd %p to user %p, "
72+ "freeing\n", ucmd, gu);
73 llist_del(&ucmd->list);
74 talloc_free(ucmd);
75 }
76diff --git a/src/libgsmd/lgsm_internals.h b/src/libgsmd/lgsm_internals.h
77index c826723..f1b1a23 100644
78--- a/src/libgsmd/lgsm_internals.h
79+++ b/src/libgsmd/lgsm_internals.h
80@@ -8,6 +8,8 @@ struct lgsm_handle {
81 int fd;
82 lgsm_msg_handler *handler[__NUM_GSMD_MSGS];
83 enum lgsm_netreg_state netreg_state;
84+ char usock_fifo[1024];
85+ int usock_len;
86 };
87
88 int lgsm_send(struct lgsm_handle *lh, struct gsmd_msg_hdr *gmh);
89diff --git a/src/libgsmd/libgsmd.c b/src/libgsmd/libgsmd.c
90index 9906ea8..cc804ed 100644
91--- a/src/libgsmd/libgsmd.c
92+++ b/src/libgsmd/libgsmd.c
93@@ -86,34 +86,37 @@ static int lgsm_open_backend(struct lgsm_handle *lh, const char *device)
94 }
95
96 /* handle a packet that was received on the gsmd socket */
97-int lgsm_handle_packet(struct lgsm_handle *lh, char *buf, int len)
98+int lgsm_handle_packet(struct lgsm_handle *lh, const char *buf, int len)
99 {
100 struct gsmd_msg_hdr *gmh;
101 lgsm_msg_handler *handler;
102 int rc = 0;
103
104- while (len) {
105- if (len < sizeof(*gmh))
106- return -EINVAL;
107- gmh = (struct gsmd_msg_hdr *) buf;
108-
109- if (len - sizeof(*gmh) < gmh->len)
110- return -EINVAL;
111- len -= sizeof(*gmh) + gmh->len;
112- buf += sizeof(*gmh) + gmh->len;
113-
114- if (gmh->msg_type >= __NUM_GSMD_MSGS)
115- return -EINVAL;
116-
117- handler = lh->handler[gmh->msg_type];
118+ if (lh->usock_len + len > sizeof(lh->usock_fifo))
119+ return -ENOMEM;
120
121- if (handler)
122+ memcpy(lh->usock_fifo + lh->usock_len, buf, len);
123+ lh->usock_len += len;
124+ gmh = (struct gsmd_msg_hdr *) lh->usock_fifo;
125+ while (lh->usock_len >= sizeof(*gmh) &&
126+ lh->usock_len >= sizeof(*gmh) + gmh->len) {
127+ if (gmh->msg_type < __NUM_GSMD_MSGS &&
128+ (handler = lh->handler[gmh->msg_type]))
129 rc |= handler(lh, gmh);
130- else
131- fprintf(stderr, "unable to handle packet type=%u\n",
132- gmh->msg_type);
133+ else {
134+ fprintf(stderr, "unable to handle packet "
135+ "type=%u id=%u\n",
136+ gmh->msg_type, gmh->id);
137+ rc |= EINVAL;
138+ }
139+
140+ lh->usock_len -= gmh->len + sizeof(*gmh);
141+ memmove(lh->usock_fifo,
142+ lh->usock_fifo + gmh->len + sizeof(*gmh),
143+ lh->usock_len);
144 }
145- return rc;
146+
147+ return -rc;
148 }
149
150 int lgsm_register_handler(struct lgsm_handle *lh, int type, lgsm_msg_handler *handler)
151@@ -193,8 +196,21 @@ static u_int16_t next_msg_id;
152
153 int lgsm_send(struct lgsm_handle *lh, struct gsmd_msg_hdr *gmh)
154 {
155+ ssize_t rc;
156+ size_t len = sizeof(*gmh) + gmh->len;
157+ const void *pos = gmh;
158+
159 gmh->id = next_msg_id++;
160- return send(lh->fd, (char *) gmh, sizeof(*gmh) + gmh->len, 0);
161+ while (len) {
162+ rc = send(lh->fd, pos, len, 0);
163+ if (rc < 0 && errno != EINTR)
164+ return -errno;
165+ if (rc > 0) {
166+ len -= rc;
167+ pos += rc;
168+ }
169+ }
170+ return 0;
171 }
172
173 struct gsmd_msg_hdr *lgsm_gmh_fill(int type, int subtype, int payload_len)
174--
1751.5.2.1
176
diff --git a/meta/recipes-connectivity/gsm/files/0005-Add-ask-ds-option-forSMS.patch b/meta/recipes-connectivity/gsm/files/0005-Add-ask-ds-option-forSMS.patch
new file mode 100644
index 0000000000..e9f49bd7d2
--- /dev/null
+++ b/meta/recipes-connectivity/gsm/files/0005-Add-ask-ds-option-forSMS.patch
@@ -0,0 +1,130 @@
1diff --git a/include/gsmd/usock.h b/include/gsmd/usock.h
2index 236ad78..66cdf48 100644
3--- a/include/gsmd/usock.h
4+++ b/include/gsmd/usock.h
5@@ -332,6 +332,7 @@ struct gsmd_sms {
6 struct gsmd_sms_submit {
7 struct gsmd_addr addr;
8 struct gsmd_sms payload;
9+ int ask_ds;
10 };
11
12 /* Refer to GSM 07.05 subclause 4.4 */
13diff --git a/include/libgsmd/sms.h b/include/libgsmd/sms.h
14index 3ada62d..9808442 100644
15--- a/include/libgsmd/sms.h
16+++ b/include/libgsmd/sms.h
17@@ -46,6 +46,7 @@ struct lgsm_sms {
18 enum gsmd_sms_alphabet alpha;
19 u_int8_t data[LGSM_SMS_DATA_MAXLEN+1];
20 int length;
21+ int ask_ds;
22 };
23
24 /* GSM 03.40 subclause 9.2.2.2 and GSM 07.05 subclause 4.4 and subclause 3.1 */
25diff --git a/src/gsmd/sms_pdu.c b/src/gsmd/sms_pdu.c
26index d1235dd..d461999 100644
27--- a/src/gsmd/sms_pdu.c
28+++ b/src/gsmd/sms_pdu.c
29@@ -247,7 +247,8 @@ int sms_pdu_make_smssubmit(char *dest, const struct gsmd_sms_submit *src)
30 GSMD_SMS_TP_MTI_SUBMIT |
31 (0 << 2) | /* Reject Duplicates: 0 */
32 GSMD_SMS_TP_VPF_NOT_PRESENT |
33- GSMD_SMS_TP_SRR_STATUS_REQUEST |
34+ (src->ask_ds ? GSMD_SMS_TP_SRR_STATUS_REQUEST :
35+ GSMD_SMS_TP_SRR_NOT_REQUEST) |
36 (src->payload.has_header ? GSMD_SMS_TP_UDHI_WITH_HEADER :
37 GSMD_SMS_TP_UDHI_NO_HEADER) |
38 GSMD_SMS_TP_RP_NOT_SET;
39diff --git a/src/libgsmd/libgsmd_sms.c b/src/libgsmd/libgsmd_sms.c
40index 22d7dbf..bbc8689 100644
41--- a/src/libgsmd/libgsmd_sms.c
42+++ b/src/libgsmd/libgsmd_sms.c
43@@ -126,6 +126,7 @@ int lgsm_sms_send(struct lgsm_handle *lh,
44 if (lgsm_number2addr(&gss->addr, sms->addr, 1))
45 return -EINVAL;
46
47+ gss->ask_ds = sms->ask_ds;
48 gss->payload.has_header = 0;
49 gss->payload.length = sms->length;
50 gss->payload.coding_scheme = sms->alpha;
51@@ -161,6 +162,7 @@ int lgsm_sms_write(struct lgsm_handle *lh,
52 if (lgsm_number2addr(&gsw->sms.addr, sms_write->sms.addr, 1))
53 return -EINVAL;
54
55+ gsw->sms.ask_ds = sms_write->sms.ask_ds;
56 gsw->sms.payload.has_header = 0;
57 gsw->sms.payload.length = sms_write->sms.length;
58 gsw->sms.payload.coding_scheme = sms_write->sms.alpha;
59diff --git a/src/util/shell.c b/src/util/shell.c
60index f902126..f26e17e 100644
61--- a/src/util/shell.c
62+++ b/src/util/shell.c
63@@ -355,7 +355,7 @@ static int shell_help(void)
64 "\tsd\tSMS Delete (sd=index,delflg)\n"
65 "\tsl\tSMS List (sl=stat)\n"
66 "\tsr\tSMS Read (sr=index)\n"
67- "\tss\tSMS Send (ss=number,text|[\"text\"])\n"
68+ "\tss\tSMS Send (ss=ask_ds,number,text|[\"text\"])\n"
69 "\tsw\tSMS Write (sw=stat,number,text)\n"
70 "\tsm\tSMS Storage stats\n"
71 "\tsM\tSMS Set preferred storage (sM=mem1,mem2,mem3)\n"
72@@ -563,33 +563,29 @@ int shell_main(struct lgsm_handle *lgsmh)
73 struct lgsm_sms sms;
74
75 ptr = strchr(buf, '=');
76+ sms.ask_ds = atoi(ptr+1);
77 fcomma = strchr(buf, ',');
78- if (!ptr || !fcomma) {
79- printf("Wrong command format\n");
80- } else {
81- strncpy(sms.addr, ptr+1, fcomma-ptr-1);
82- sms.addr[fcomma-ptr-1] = '\0';
83-
84- /* todo define \" to allow " in text */
85- if (fcomma[1] == '"' &&
86- !strchr(fcomma+2, '"')) {
87+ lcomma = strchr(fcomma+1, ',');
88+ strncpy(sms.addr, fcomma+1, lcomma-fcomma-1);
89+ sms.addr[lcomma-fcomma-1] = '\0';
90+ /* todo define \" to allow " in text */
91+ if (lcomma[1]=='"' &&
92+ !strchr(lcomma+2, '"')) {
93 /* read until closing '"' */
94 rc = fscanf(stdin, "%[^\"]\"",
95- fcomma+strlen(fcomma));
96+ lcomma+strlen(lcomma));
97 if (rc == EOF) {
98 printf("EOF\n");
99 return -1;
100 }
101 /* remove brackets */
102- fcomma++;
103- fcomma[strlen(fcomma)] = '\0';
104- }
105-
106- printf("Send SMS\n");
107- packing_7bit_character(fcomma+1, &sms);
108+ lcomma++;
109+ lcomma[strlen(lcomma)] = '\0';
110+ }
111+ printf("Send SMS\n");
112+ packing_7bit_character(lcomma+1, &sms);
113
114- lgsm_sms_send(lgsmh, &sms);
115- }
116+ lgsm_sms_send(lgsmh, &sms);
117 } else if ( !strncmp(buf, "sw", 2)) {
118 printf("Write SMS\n");
119 struct lgsm_sms_write sms_write;
120@@ -603,6 +599,7 @@ int shell_main(struct lgsm_handle *lgsmh)
121 sms_write.sms.addr[lcomma-fcomma-1] = '\0';
122 packing_7bit_character(
123 lcomma+1, &sms_write.sms);
124+ sms_write.sms.ask_ds = 0;
125
126 lgsm_sms_write(lgsmh, &sms_write);
127 } else if (!strncmp(buf, "sm", 2)) {
128--
1291.5.2.1
130
diff --git a/meta/recipes-connectivity/gsm/files/024_sms-text-in-bracket.patch b/meta/recipes-connectivity/gsm/files/024_sms-text-in-bracket.patch
new file mode 100644
index 0000000000..32a1ca33ff
--- /dev/null
+++ b/meta/recipes-connectivity/gsm/files/024_sms-text-in-bracket.patch
@@ -0,0 +1,70 @@
1http://bugzilla.openmoko.org/cgi-bin/bugzilla/show_bug.cgi?id=834
2
3From: Kristian Mueller <kristian@mput.de>
4Subject: [PATCH] libgsmd-tool does not allow sms with more than one word
5
6libgsmd-tool only allows for command strings without spaces.
7SMS messages with more than one word will be parsed as multible commands.
8The patch introduces SMS message text in bracket and fixes a NULL pointer
9reference on mailformed "ss" commands.
10
11Signed-off-by: Jim Huang <jserv@openmoko.org>
12---
13 src/util/shell.c | 32 ++++++++++++++++++++++++++------
14 1 file changed, 26 insertions(+), 6 deletions(-)
15
16Index: gsm/src/util/shell.c
17===================================================================
18--- gsm.orig/src/util/shell.c 2007-08-31 16:15:30.000000000 +0800
19+++ gsm/src/util/shell.c 2007-09-17 23:35:31.000000000 +0800
20@@ -389,7 +389,7 @@
21 "\tsd\tSMS Delete (sd=index,delflg)\n"
22 "\tsl\tSMS List (sl=stat)\n"
23 "\tsr\tSMS Read (sr=index)\n"
24- "\tss\tSMS Send (ss=number,text)\n"
25+ "\tss\tSMS Send (ss=number,text|[\"text\"])\n"
26 "\tsw\tSMS Write (sw=stat,number,text)\n"
27 "\tsm\tSMS Storage stats\n"
28 "\tsM\tSMS Set preferred storage (sM=mem1,mem2,mem3)\n"
29@@ -612,16 +612,36 @@
30
31 lgsm_sms_read(lgsmh, atoi(ptr+1));
32 } else if ( !strncmp(buf, "ss", 2)) {
33- printf("Send SMS\n");
34 struct lgsm_sms sms;
35
36 ptr = strchr(buf, '=');
37 fcomma = strchr(buf, ',');
38- strncpy(sms.addr, ptr+1, fcomma-ptr-1);
39- sms.addr[fcomma-ptr-1] = '\0';
40- packing_7bit_character(fcomma+1, &sms);
41+ if (!ptr || !fcomma) {
42+ printf("Wrong command format\n");
43+ } else {
44+ strncpy(sms.addr, ptr+1, fcomma-ptr-1);
45+ sms.addr[fcomma-ptr-1] = '\0';
46+
47+ /* todo define \" to allow " in text */
48+ if (fcomma[1] == '"' &&
49+ !strchr(fcomma+2, '"')) {
50+ /* read until closing '"' */
51+ rc = fscanf(stdin, "%[^\"]\"",
52+ fcomma+strlen(fcomma));
53+ if (rc == EOF) {
54+ printf("EOF\n");
55+ return -1;
56+ }
57+ /* remove brackets */
58+ fcomma++;
59+ fcomma[strlen(fcomma)] = '\0';
60+ }
61+
62+ printf("Send SMS\n");
63+ packing_7bit_character(fcomma+1, &sms);
64
65- lgsm_sms_send(lgsmh, &sms);
66+ lgsm_sms_send(lgsmh, &sms);
67+ }
68 } else if ( !strncmp(buf, "sw", 2)) {
69 printf("Write SMS\n");
70 struct lgsm_sms_write sms_write;
diff --git a/meta/recipes-connectivity/gsm/files/025_sms-status-report.patch b/meta/recipes-connectivity/gsm/files/025_sms-status-report.patch
new file mode 100644
index 0000000000..560e72e380
--- /dev/null
+++ b/meta/recipes-connectivity/gsm/files/025_sms-status-report.patch
@@ -0,0 +1,133 @@
1From: Erin Yueh <erin_yueh@openmoko.com>
2Subject: [PATCH] SMS status report
3
4I made a patch for SMS status report. It can change SMS-Submit messages
5and ask for a status report. When the destination address receives our
6message, the service center will send a SMS-STATUS-REPORT to us. We can
7tell what messages we sent by TP-MR (message reference number) value and
8can know the sending result by TP-ST (Status) value from status report
9messages.
10
11PS. if you don't want to ask a status report, you can change this value
12back. Replace "GSMD_SMS_TP_SRR_STATUS_REQUEST" with
13"GSMD_SMS_TP_SRR_NOT_REQUEST".
14header[pos ++] =
15 GSMD_SMS_TP_MTI_SUBMIT |
16 (0 << 2) | /* Reject Duplicates: 0 */
17 GSMD_SMS_TP_VPF_NOT_PRESENT |
18- GSMD_SMS_TP_SRR_NOT_REQUEST |
19+ GSMD_SMS_TP_SRR_STATUS_REQUEST |
20 (src->payload.has_header ? GSMD_SMS_TP_UDHI_WITH_HEADER :
21 GSMD_SMS_TP_UDHI_NO_HEADER) |
22 GSMD_SMS_TP_RP_NOT_SET;
23
24Signed-off-by: Jim Huang <jserv@openmoko.org>
25---
26 src/gsmd/sms_pdu.c | 54 +++++++++++++++++++++++++++++++++++++++++++-----------
27 src/util/event.c | 6 +++++-
28 2 files changed, 48 insertions(+), 12 deletions(-)
29
30Index: gsm/src/gsmd/sms_pdu.c
31===================================================================
32--- gsm.orig/src/gsmd/sms_pdu.c 2007-09-06 11:14:34.000000000 +0800
33+++ gsm/src/gsmd/sms_pdu.c 2007-09-17 23:39:20.000000000 +0800
34@@ -139,6 +139,17 @@
35 /* Skip TP-PID */
36 len -= 9;
37 src += 9;
38+
39+ /* TP-UDL */
40+ dst->payload.length = src[0];
41+ i = sms_data_bytelen(dst->payload.coding_scheme, src[0]);
42+
43+ /* TP-UD */
44+ if (len < 1 + i || i > GSMD_SMS_DATA_MAXLEN)
45+ return 1;
46+ memcpy(dst->payload.data, src + 1, i);
47+ dst->payload.data[i] = 0;
48+
49 break;
50 case GSMD_SMS_TP_MTI_SUBMIT:
51 if (len < 4)
52@@ -179,23 +190,44 @@
53 src += vpf ? 3 : 2;
54
55 memset(dst->time_stamp, 0, 7);
56+
57+ /* TP-UDL */
58+ dst->payload.length = src[0];
59+ i = sms_data_bytelen(dst->payload.coding_scheme, src[0]);
60+
61+ /* TP-UD */
62+ if (len < 1 + i || i > GSMD_SMS_DATA_MAXLEN)
63+ return 1;
64+ memcpy(dst->payload.data, src + 1, i);
65+ dst->payload.data[i] = 0;
66 break;
67 case GSMD_SMS_TP_MTI_STATUS_REPORT:
68- /* TODO */
69+ if (len < 3)
70+ return 1;
71+
72+ /* TP-MR set it gsmd_sms_list.index*/
73+ dst->index = (int) src[1];
74+ /* TP-STATUS set it to coding_scheme */
75+ dst->payload.coding_scheme = (int) src[len-1];
76+ /* TP-RA */
77+ i = sms_number_bytelen(src[3], src[2]);
78+ if (len < 13 + i)
79+ return 1;
80+ if (sms_address2ascii(&dst->addr, src + 2))
81+ return 1;
82+ len -= 4 + i;
83+ src += 4 + i;
84+ /* TP-SCTS */
85+ memcpy(dst->time_stamp, src, 7);
86+ /* TP-UD */
87+ dst->payload.length = 0;
88+ dst->payload.data[0] = 0;
89+ break;
90 default:
91 /* Unknown PDU type */
92 return 1;
93 }
94
95- /* TP-UDL */
96- dst->payload.length = src[0];
97- i = sms_data_bytelen(dst->payload.coding_scheme, src[0]);
98-
99- /* TP-UD */
100- if (len < 1 + i || i > GSMD_SMS_DATA_MAXLEN)
101- return 1;
102- memcpy(dst->payload.data, src + 1, i);
103- dst->payload.data[i] = 0;
104
105 return 0;
106 }
107@@ -215,7 +247,7 @@
108 GSMD_SMS_TP_MTI_SUBMIT |
109 (0 << 2) | /* Reject Duplicates: 0 */
110 GSMD_SMS_TP_VPF_NOT_PRESENT |
111- GSMD_SMS_TP_SRR_NOT_REQUEST |
112+ GSMD_SMS_TP_SRR_STATUS_REQUEST |
113 (src->payload.has_header ? GSMD_SMS_TP_UDHI_WITH_HEADER :
114 GSMD_SMS_TP_UDHI_NO_HEADER) |
115 GSMD_SMS_TP_RP_NOT_SET;
116Index: gsm/src/util/event.c
117===================================================================
118--- gsm.orig/src/util/event.c 2007-09-06 11:14:34.000000000 +0800
119+++ gsm/src/util/event.c 2007-09-17 23:39:47.000000000 +0800
120@@ -128,8 +128,12 @@
121 static int inds_handler(struct lgsm_handle *lh, int evt,
122 struct gsmd_evt_auxdata *aux)
123 {
124- if (aux->u.ds.inlined)
125+ if (aux->u.ds.inlined) {
126+ struct gsmd_sms_list *sms;
127+ sms = (struct gsmd_sms_list *) aux->data;
128 printf("EVENT: Incoming Status Report\n");
129+ printf("message ref = %d, status = %d\n", sms->index,sms->payload.coding_scheme);
130+ }
131 else
132 printf("EVENT: Incoming Status Report stored at location %i\n",
133 aux->u.ds.index);
diff --git a/meta/recipes-connectivity/gsm/files/027_phonebook-find-and-read-range-support.patch b/meta/recipes-connectivity/gsm/files/027_phonebook-find-and-read-range-support.patch
new file mode 100644
index 0000000000..ea0f12daac
--- /dev/null
+++ b/meta/recipes-connectivity/gsm/files/027_phonebook-find-and-read-range-support.patch
@@ -0,0 +1,423 @@
1From: Sean Chiang <sean_chiang@openmoko.com>
2Subject: [PATCH] Improvement for find and read phonebooks in gsmd
3
4This patch is an improvement for find and read phonebooks.
5After clients make a request to find / read phonebooks, then clients
6should make a request to retrieve all the records.
7
8Signed-off-by: Jim Huang <jserv@openmoko.org>
9---
10 include/gsmd/gsmd.h | 3
11 include/gsmd/usock.h | 20 +++-
12 include/libgsmd/phonebook.h | 6 +
13 src/gsmd/usock.c | 184 +++++++++++++++++++++++++++++++++++-----
14 src/libgsmd/libgsmd_phonebook.c | 48 ++++++++++
15 5 files changed, 238 insertions(+), 23 deletions(-)
16
17Index: gsm/include/libgsmd/phonebook.h
18===================================================================
19--- gsm.orig/include/libgsmd/phonebook.h 2007-08-31 16:15:29.000000000 +0800
20+++ gsm/include/libgsmd/phonebook.h 2007-09-17 23:48:41.000000000 +0800
21@@ -106,4 +106,10 @@
22 /* Get the location range/nlength/tlength supported */
23 extern int lgsm_pb_get_support(struct lgsm_handle *lh);
24
25+/* Retrieve the records of READRG request */
26+extern int lgsm_pb_retrieve_readrg(struct lgsm_handle *lh, int num);
27+
28+/* Retrieve the records of FIND request */
29+extern int lgsm_pb_retrieve_find(struct lgsm_handle *lh, int num);
30+
31 #endif
32Index: gsm/include/gsmd/gsmd.h
33===================================================================
34--- gsm.orig/include/gsmd/gsmd.h 2007-08-31 16:15:29.000000000 +0800
35+++ gsm/include/gsmd/gsmd.h 2007-09-17 23:48:41.000000000 +0800
36@@ -92,6 +92,9 @@
37 struct gsmd *gsmd;
38 struct gsmd_fd gfd; /* the socket */
39 u_int32_t subscriptions; /* bitmaks of subscribed event groups */
40+
41+ struct llist_head pb_readrg_list; /* our READRG phonebook list */
42+ struct llist_head pb_find_list; /* our FIND phonebook list */
43 };
44
45 #define GSMD_DEBUG 1 /* debugging information */
46Index: gsm/include/gsmd/usock.h
47===================================================================
48--- gsm.orig/include/gsmd/usock.h 2007-08-31 16:15:29.000000000 +0800
49+++ gsm/include/gsmd/usock.h 2007-09-17 23:48:56.000000000 +0800
50@@ -194,6 +194,8 @@
51 GSMD_PHONEBOOK_GET_SUPPORT = 6,
52 GSMD_PHONEBOOK_LIST_STORAGE = 7,
53 GSMD_PHONEBOOK_SET_STORAGE = 8,
54+ GSMD_PHONEBOOK_RETRIEVE_READRG = 9,
55+ GSMD_PHONEBOOK_RETRIEVE_FIND = 10,
56 };
57
58 /* Type-of-Address, Numbering-Plan-Identification field, GSM 03.40, 9.1.2.5 */
59@@ -431,7 +433,6 @@
60 char text[GSMD_PB_TEXT_MAXLEN+1];
61 } __attribute__ ((packed));
62
63-
64 /* Refer to GSM 07.07 subclause 8.13 */
65 /* FIXME: the tlength depends on SIM, use +CPBR=? to get */
66 struct gsmd_phonebook_find {
67@@ -471,8 +472,18 @@
68 char opname_longalpha[16];
69 };
70
71+/* Refer to GSM 07.07 subclause 8.11 */
72+struct gsmd_phonebook_mem {
73+ u_int8_t type[3];
74+ u_int8_t pad;
75+ u_int16_t used;
76+ u_int16_t total;
77+} __attribute__ ((packed));
78+
79 struct gsmd_phonebook_storage {
80- char storage[3];
81+ /* FIXME the amount of phonebook storage should be dynamic */
82+ u_int8_t num;
83+ struct gsmd_phonebook_mem mem[20];
84 } __attribute__ ((packed));
85
86 /* Subscriber number information from 3GPP TS 07.07, Clause 7.1 */
87@@ -517,6 +528,11 @@
88 char buf[];
89 } __attribute__ ((packed));
90
91+struct gsmd_phonebooks {
92+ struct llist_head list;
93+ struct gsmd_phonebook pb;
94+} __attribute__ ((packed));
95+
96 extern struct gsmd_ucmd *ucmd_alloc(int extra_size);
97 extern int usock_init(struct gsmd *g);
98 extern void usock_cmd_enqueue(struct gsmd_ucmd *ucmd, struct gsmd_user *gu);
99Index: gsm/src/libgsmd/libgsmd_phonebook.c
100===================================================================
101--- gsm.orig/src/libgsmd/libgsmd_phonebook.c 2007-08-31 16:15:29.000000000 +0800
102+++ gsm/src/libgsmd/libgsmd_phonebook.c 2007-09-17 23:48:41.000000000 +0800
103@@ -33,7 +33,7 @@
104 gmh->data[2] = '\0';
105
106 rc = lgsm_send(lh, gmh);
107- if (rc < gmh->len + 3) {
108+ if (rc < gmh->len + sizeof(*gmh)) {
109 lgsm_gmh_free(gmh);
110 return -EIO;
111 }
112@@ -177,3 +177,49 @@
113 {
114 return lgsm_send_simple(lh, GSMD_MSG_PHONEBOOK, GSMD_PHONEBOOK_GET_SUPPORT);
115 }
116+
117+int lgsm_pb_retrieve_readrg(struct lgsm_handle *lh, int num)
118+{
119+ struct gsmd_msg_hdr *gmh;
120+ int rc;
121+
122+ gmh = lgsm_gmh_fill(GSMD_MSG_PHONEBOOK,
123+ GSMD_PHONEBOOK_RETRIEVE_READRG, sizeof(int));
124+ if (!gmh)
125+ return -ENOMEM;
126+
127+ *(int *)(gmh->data) = num;
128+
129+ rc = lgsm_send(lh, gmh);
130+ if (rc < gmh->len + sizeof(*gmh)) {
131+ lgsm_gmh_free(gmh);
132+ return -EIO;
133+ }
134+
135+ lgsm_gmh_free(gmh);
136+
137+ return 0;
138+}
139+
140+int lgsm_pb_retrieve_find(struct lgsm_handle *lh, int num)
141+{
142+ struct gsmd_msg_hdr *gmh;
143+ int rc;
144+
145+ gmh = lgsm_gmh_fill(GSMD_MSG_PHONEBOOK,
146+ GSMD_PHONEBOOK_RETRIEVE_FIND, sizeof(int));
147+ if (!gmh)
148+ return -ENOMEM;
149+
150+ *(int *)(gmh->data) = num;
151+
152+ rc = lgsm_send(lh, gmh);
153+ if (rc < gmh->len + sizeof(*gmh)) {
154+ lgsm_gmh_free(gmh);
155+ return -EIO;
156+ }
157+
158+ lgsm_gmh_free(gmh);
159+
160+ return 0;
161+}
162Index: gsm/src/gsmd/usock.c
163===================================================================
164--- gsm.orig/src/gsmd/usock.c 2007-08-31 16:15:30.000000000 +0800
165+++ gsm/src/gsmd/usock.c 2007-09-17 23:53:34.000000000 +0800
166@@ -1035,21 +1035,56 @@
167
168 static int phonebook_find_cb(struct gsmd_atcmd *cmd, void *ctx, char *resp)
169 {
170- struct gsmd_user *gu = ctx;
171- struct gsmd_ucmd *ucmd;
172-
173+ struct gsmd_user *gu = ctx;
174+ struct gsmd_ucmd *ucmd;
175+ struct gsmd_phonebooks *gps;
176+ char *fcomma, *lcomma, *ptr1, *ptr2 = NULL;
177+ int *num;
178+
179 DEBUGP("resp: %s\n", resp);
180
181- /* FIXME: using link list, also we need to handle the case of
182- * no query result */
183- ucmd = gsmd_ucmd_fill(strlen(resp) + 1, GSMD_MSG_PHONEBOOK,
184+ /*
185+ * [+CPBF: <index1>,<number>,<type>,<text>[[...]
186+ * <CR><LF>+CPBF: <index2>,<unmber>,<type>,<text>]]
187+ */
188+ ucmd = gsmd_ucmd_fill(sizeof(int), GSMD_MSG_PHONEBOOK,
189 GSMD_PHONEBOOK_FIND, 0);
190 if (!ucmd)
191 return -ENOMEM;
192
193- strcpy(ucmd->buf, resp);
194+ num = (int*) ucmd->buf;
195+
196+ *num = 0;
197+
198+ ptr1 = strtok(resp, "\n");
199+
200+ while (ptr1) {
201+ gps = (struct gsmd_phonebooks *) malloc(sizeof(struct gsmd_phonebooks));
202+ ptr2 = strchr(ptr1, ' ');
203+ gps->pb.index = atoi(ptr2+1);
204+
205+ fcomma = strchr(ptr1, '"');
206+ lcomma = strchr(fcomma+1, '"');
207+ strncpy(gps->pb.numb, fcomma + 1, (lcomma-fcomma-1));
208+ gps->pb.numb[(lcomma - fcomma) - 1] = '\0';
209+
210+ gps->pb.type = atoi(lcomma + 2);
211+
212+ ptr2 = strrchr(ptr1, ',');
213+ fcomma = ptr2 + 1;
214+ lcomma = strchr(fcomma + 1, '"');
215+ strncpy(gps->pb.text, fcomma + 1, (lcomma - fcomma - 1));
216+ gps->pb.text[(lcomma - fcomma) - 1] = '\0';
217+
218+ llist_add_tail(&gps->list, &gu->pb_find_list);
219+
220+ (*num)++;
221+
222+ ptr1 = strtok(NULL, "\n");
223+ }
224
225 usock_cmd_enqueue(ucmd, gu);
226+
227 return 0;
228 }
229
230@@ -1102,22 +1137,51 @@
231 {
232 struct gsmd_user *gu = ctx;
233 struct gsmd_ucmd *ucmd;
234+ struct gsmd_phonebooks *gps;
235+ char *fcomma, *lcomma, *ptr1, *ptr2 = NULL;
236+ int *num;
237
238 DEBUGP("resp: %s\n", resp);
239
240 /*
241- * +CPBR: 4,"1234",129,"6C5F745E7965"
242- * +CPBR: 5,"5678",129,"800062115BB6"
243- * +CPBR: 6,"7890",129,"810280AA591A"
244- * +CPBR: 8,"36874",129,"005300650061006E"
245- *
246+ * [+CPBR: <index1>,<number>,<type>,<text>[[...]
247+ * <CR><LF>+CPBR: <index2>,<unmber>,<type>,<text>]]
248 */
249- ucmd = gsmd_ucmd_fill(strlen(resp)+1, GSMD_MSG_PHONEBOOK,
250+ ucmd = gsmd_ucmd_fill(sizeof(int), GSMD_MSG_PHONEBOOK,
251 GSMD_PHONEBOOK_READRG, 0);
252 if (!ucmd)
253 return -ENOMEM;
254
255- strcpy(ucmd->buf, resp);
256+ num = (int*) ucmd->buf;
257+
258+ *num = 0;
259+
260+ ptr1 = strtok(resp, "\n");
261+
262+ while(ptr1) {
263+ gps = (struct gsmd_phonebooks *) malloc(sizeof(struct gsmd_phonebooks));
264+ ptr2 = strchr(ptr1, ' ');
265+ gps->pb.index = atoi(ptr2+1);
266+
267+ fcomma = strchr(ptr1, '"');
268+ lcomma = strchr(fcomma+1, '"');
269+ strncpy(gps->pb.numb, fcomma + 1, (lcomma-fcomma-1));
270+ gps->pb.numb[(lcomma - fcomma) - 1] = '\0';
271+
272+ gps->pb.type = atoi(lcomma + 2);
273+
274+ ptr2 = strrchr(ptr1, ',');
275+ fcomma = ptr2 + 1;
276+ lcomma = strchr(fcomma + 1, '"');
277+ strncpy(gps->pb.text, fcomma + 1, (lcomma - fcomma - 1));
278+ gps->pb.text[(lcomma - fcomma) - 1] = '\0';
279+
280+ llist_add_tail(&gps->list, &gu->pb_readrg_list);
281+
282+ (*num)++;
283+
284+ ptr1 = strtok(NULL, "\n");
285+ }
286
287 usock_cmd_enqueue(ucmd, gu);
288
289@@ -1209,22 +1273,38 @@
290 static int phonebook_list_storage_cb(struct gsmd_atcmd *cmd,
291 void *ctx, char *resp)
292 {
293- /* +CPBS: ("EN","BD","FD","DC","LD","RC","LR","MT","AD",
294- * "SM","SD","MC","LM","AF","ON","UD") */
295 /* TODO; using link list ; need to handle command error */
296 struct gsmd_user *gu = ctx;
297 struct gsmd_ucmd *ucmd;
298+ struct gsmd_phonebook_storage *gps;
299+ char *ptr;
300
301 DEBUGP("resp: %s\n", resp);
302
303- ucmd = gsmd_ucmd_fill(strlen(resp) + 1,
304+ /*
305+ * +CPBS: (<storage>s)
306+ */
307+
308+ ucmd = gsmd_ucmd_fill(sizeof(*gps),
309 GSMD_MSG_PHONEBOOK,
310 GSMD_PHONEBOOK_LIST_STORAGE, 0);
311
312 if (!ucmd)
313 return -ENOMEM;
314
315- strcpy(ucmd->buf, resp);
316+ gps = (struct gsmd_phonebook_storage *) ucmd->buf;
317+ gps->num = 0;
318+
319+ if (!strncmp(resp, "+CPBS", 5)) {
320+ char* delim = "(,";
321+ ptr = strpbrk(resp, delim);
322+ while ( ptr ) {
323+ strncpy(gps->mem[gps->num].type, ptr+2, 2);
324+ gps->mem[gps->num].type[2] = '\0';
325+ ptr = strpbrk(ptr+2, delim);
326+ gps->num++;
327+ }
328+ }
329
330 usock_cmd_enqueue(ucmd, gu);
331
332@@ -1235,11 +1315,13 @@
333 struct gsmd_msg_hdr *gph,int len)
334 {
335 struct gsmd_atcmd *cmd = NULL;
336+ struct gsmd_ucmd *ucmd = NULL;
337 struct gsmd_phonebook_readrg *gpr;
338 struct gsmd_phonebook *gp;
339 struct gsmd_phonebook_find *gpf;
340- int *index;
341- int atcmd_len;
342+ struct gsmd_phonebooks *cur, *cur2;
343+ int *index, *num;
344+ int atcmd_len, i;
345 char *storage;
346 char buf[1024];
347
348@@ -1343,6 +1425,66 @@
349 cmd = atcmd_fill("AT+CPBR=?", 9+1,
350 &phonebook_get_support_cb, gu, gph->id);
351 break;
352+ case GSMD_PHONEBOOK_RETRIEVE_READRG:
353+ if (len < sizeof(*gph) + sizeof(int))
354+ return -EINVAL;
355+
356+ num = (int *) ((void *)gph + sizeof(*gph));
357+
358+ ucmd = gsmd_ucmd_fill(sizeof(struct gsmd_phonebook)*(*num),
359+ GSMD_MSG_PHONEBOOK,
360+ GSMD_PHONEBOOK_RETRIEVE_READRG, 0);
361+ if (!ucmd)
362+ return -ENOMEM;
363+
364+ gp = (struct gsmd_phonebook*) ucmd->buf;
365+
366+ if (!llist_empty(&gu->pb_readrg_list)) {
367+
368+ llist_for_each_entry_safe(cur, cur2,
369+ &gu->pb_readrg_list, list) {
370+ gp->index = cur->pb.index;
371+ strcpy(gp->numb, cur->pb.numb);
372+ gp->type = cur->pb.type;
373+ strcpy(gp->text, cur->pb.text);
374+ gp++;
375+
376+ llist_del(&cur->list);
377+ free(cur);
378+ }
379+ }
380+
381+ usock_cmd_enqueue(ucmd, gu);
382+
383+ break;
384+ case GSMD_PHONEBOOK_RETRIEVE_FIND:
385+ if (len < sizeof(*gph) + sizeof(int))
386+ return -EINVAL;
387+
388+ num = (int *) ((void *)gph + sizeof(*gph));
389+
390+ ucmd = gsmd_ucmd_fill(sizeof(struct gsmd_phonebook)*(*num), GSMD_MSG_PHONEBOOK,
391+ GSMD_PHONEBOOK_RETRIEVE_FIND, 0);
392+ if (!ucmd)
393+ return -ENOMEM;
394+
395+ gp = (struct gsmd_phonebook*) ucmd->buf;
396+
397+ if (!llist_empty(&gu->pb_find_list)) {
398+ llist_for_each_entry_safe(cur, cur2, &gu->pb_find_list, list) {
399+ gp->index = cur->pb.index;
400+ strcpy(gp->numb, cur->pb.numb);
401+ gp->type = cur->pb.type;
402+ strcpy(gp->text, cur->pb.text);
403+ gp++;
404+
405+ llist_del(&cur->list);
406+ free(cur);
407+ }
408+ }
409+
410+ usock_cmd_enqueue(ucmd, gu);
411+ break;
412 default:
413 return -EINVAL;
414 }
415@@ -1468,6 +1610,8 @@
416 newuser->gsmd = g;
417 newuser->subscriptions = 0xffffffff;
418 INIT_LLIST_HEAD(&newuser->finished_ucmds);
419+ INIT_LLIST_HEAD(&newuser->pb_readrg_list);
420+ INIT_LLIST_HEAD(&newuser->pb_find_list);
421
422 llist_add(&newuser->list, &g->users);
423 gsmd_register_fd(&newuser->gfd);
diff --git a/meta/recipes-connectivity/gsm/files/028_shell-phonebook-find-and-read-range-support.patch b/meta/recipes-connectivity/gsm/files/028_shell-phonebook-find-and-read-range-support.patch
new file mode 100644
index 0000000000..db07a5df35
--- /dev/null
+++ b/meta/recipes-connectivity/gsm/files/028_shell-phonebook-find-and-read-range-support.patch
@@ -0,0 +1,264 @@
1From: Sean Chiang <sean_chiang@openmoko.com>
2Subject: [PATCH] improvement for find and read phonebooks in shell
3
4This patch improves the functions to find and read phonebooks in shell.
5
6Besides prr and pf, I add two new commands pRr and pRf to retrieve the
7phonebook.
8
9Signed-off-by: Jim Huang <jserv@openmoko.org>
10
11Index: gsm/src/util/shell.c
12===================================================================
13--- gsm.orig/src/util/shell.c 2007-09-17 23:57:51.000000000 +0800
14+++ gsm/src/util/shell.c 2007-09-17 23:59:04.000000000 +0800
15@@ -34,8 +34,6 @@
16 #include <gsmd/usock.h>
17 #include <gsmd/ts0705.h>
18
19-#include <common/linux_list.h>
20-
21 #ifndef __GSMD__
22 #define __GSMD__
23 #include <gsmd/talloc.h>
24@@ -43,9 +41,8 @@
25 #endif
26
27 #define STDIN_BUF_SIZE 1024
28-
29-static LLIST_HEAD(storage_list);
30-static LLIST_HEAD(phonebook_list);
31+static int nFIND = 0;
32+static int nREADRG = 0;
33
34 /* this is the handler for receiving passthrough responses */
35 static int pt_msghandler(struct lgsm_handle *lh, struct gsmd_msg_hdr *gmh)
36@@ -62,46 +59,23 @@
37 struct gsmd_phonebook_storage *gpst;
38 char *payload;
39 char *fcomma, *lcomma, *ptr = NULL;
40+ int *num;
41 char buf[128];
42+ int i;
43
44 switch (gmh->msg_subtype) {
45-#if 0
46 case GSMD_PHONEBOOK_FIND:
47+ num = (int *) ((char *)gmh + sizeof(*gmh));
48+ printf("Records:%d\n", *num);
49+
50+ nFIND = *num;
51+ break;
52 case GSMD_PHONEBOOK_READRG:
53- payload = (char *)gmh + sizeof(*gmh);
54+ num = (int *) ((char *)gmh + sizeof(*gmh));
55+ printf("Records:%d\n", *num);
56
57- if (!strncmp(payload, "+CPBR", 5) ||
58- !strncmp(payload, "+CPBF", 5)) {
59- gp = (struct gsmd_phonebook *) malloc(sizeof(struct gsmd_phonebook));
60- ptr = strchr(payload, ' ');
61- gp->index = atoi(ptr+1);
62-
63- fcomma = strchr(payload, '"');
64- lcomma = strchr(fcomma+1, '"');
65- strncpy(gp->numb, fcomma + 1, (lcomma-fcomma-1));
66- gp->numb[(lcomma - fcomma) - 1] = '\0';
67-
68- gp->type = atoi(lcomma + 2);
69-
70- ptr = strrchr(payload, ',');
71- fcomma = ptr + 1;
72- lcomma = strchr(fcomma + 1, '"');
73- strncpy(gp->text, fcomma + 1, (lcomma - fcomma - 1));
74- gp->text[(lcomma - fcomma) - 1] = '\0';
75-
76- llist_add_tail(&gp->list, &phonebook_list);
77-
78-#if 0
79- llist_for_each_entry(gp, &phonebook_list, list) {
80- printf("%d, %s, %d, %s\n", gp->index, gp->numb, gp->type, gp->text);
81- }
82-#endif
83- printf("%d, %s, %d, %s\n", gp->index, gp->numb, gp->type, gp->text);
84- }
85- else
86- printf("%s\n", payload);
87+ nREADRG = *num;
88 break;
89-#endif
90 case GSMD_PHONEBOOK_READ:
91 gp = (struct gsmd_phonebook *) ((char *)gmh + sizeof(*gmh));
92 if (gp->index)
93@@ -115,48 +89,18 @@
94 gps = (struct gsmd_phonebook_support *) ((char *)gmh + sizeof(*gmh));
95 printf("(1-%d), %d, %d\n", gps->index, gps->nlength, gps->tlength);
96 break;
97-#if 0
98- case GSMD_PHONEBOOK_LIST_STORAGE:
99- payload = (char *)gmh + sizeof(*gmh);
100
101- if (!strncmp(payload, "+CPBS", 5)) {
102- char* delim = "(,";
103- struct gsmd_phonebook_storage *cur, *cur2;
104-
105- /* Remove previous record */
106- if (!llist_empty(&storage_list)) {
107- llist_for_each_entry_safe(cur, cur2,
108- &storage_list, list) {
109- llist_del(&cur->list);
110- talloc_free(cur);
111- }
112- }
113-
114- ptr = strpbrk(payload, delim);
115-
116- while ( ptr ) {
117- gpst = (struct gsmd_phonebook_storage *) malloc(sizeof(struct gsmd_phonebook_storage));
118- strncpy(gpst->storage, ptr+2, 2);
119- gpst->storage[2] = '\0';
120-
121- ptr = strpbrk(ptr+2, delim);
122-
123- llist_add_tail(&gpst->list, &storage_list);
124- }
125+ case GSMD_PHONEBOOK_LIST_STORAGE:
126+ gpst = (struct gsmd_phonebook_storage *)((char *)gmh + sizeof(*gmh));
127
128- if (llist_empty(&storage_list))
129- return 0;
130+ for (i = 0; i < gpst->num; i++) {
131+ printf("%s, ", gpst->mem[i].type);
132+ }
133
134- llist_for_each_entry(cur, &storage_list, list) {
135- printf("\n%s",cur->storage);
136- }
137+ printf("\n");
138
139- printf("\n");
140- }
141- else
142- printf("%s\n", payload);
143 break;
144-#endif
145+
146 case GSMD_PHONEBOOK_WRITE:
147 case GSMD_PHONEBOOK_DELETE:
148 case GSMD_PHONEBOOK_SET_STORAGE:
149@@ -164,6 +108,26 @@
150 payload = (char *)gmh + sizeof(*gmh);
151 printf("%s\n", payload);
152 break;
153+ case GSMD_PHONEBOOK_RETRIEVE_READRG:
154+ gp = (struct gsmd_phonebook *) ((char *)gmh + sizeof(*gmh));
155+
156+ for (i=0; i<nREADRG; i++) {
157+ printf("%d,%s,%d,%s\n", gp->index, gp->numb, gp->type, gp->text);
158+ gp++;
159+ }
160+
161+ nREADRG = 0;
162+ break;
163+ case GSMD_PHONEBOOK_RETRIEVE_FIND:
164+ gp = (struct gsmd_phonebook *) ((char *)gmh + sizeof(*gmh));
165+
166+ for (i = 0; i < nFIND; i++) {
167+ printf("%d,%s,%d,%s\n", gp->index, gp->numb, gp->type, gp->text);
168+ gp++;
169+ }
170+
171+ nFIND = 0;
172+ break;
173 default:
174 return -EINVAL;
175 }
176@@ -381,11 +345,13 @@
177 "\tpd\tPB Delete (pb=index)\n"
178 "\tpr\tPB Read (pr=index)\n"
179 "\tprr\tPB Read Range (prr=index1,index2)\n"
180- "\tpf\tPB Find (pff=indtext)\n"
181+ "\tpf\tPB Find (pf=indtext)\n"
182 "\tpw\tPB Write (pw=index,number,text)\n"
183 "\tps\tPB Support\n"
184 "\tpm\tPB Memory\n"
185 "\tpp\tPB Set Memory (pp=storage)\n"
186+ "\tpRr\tRetrieve Readrg Records\n"
187+ "\tpRf\tRetrieve Find Records\n"
188 "\tsd\tSMS Delete (sd=index,delflg)\n"
189 "\tsl\tSMS List (sl=stat)\n"
190 "\tsr\tSMS Read (sr=index)\n"
191@@ -509,48 +475,21 @@
192 printf("Delete Phonebook Entry\n");
193 ptr = strchr(buf, '=');
194 lgsm_pb_del_entry(lgsmh, atoi(ptr+1));
195-#if 0
196 } else if ( !strncmp(buf, "prr", 3)) {
197 printf("Read Phonebook Entries\n");
198 struct lgsm_phonebook_readrg pb_readrg;
199- struct gsmd_phonebook *gp_cur, *gp_cur2;
200-
201- /* Remove records */
202- if (!llist_empty(&phonebook_list)) {
203- llist_for_each_entry_safe(gp_cur,
204- gp_cur2,
205- &phonebook_list,
206- list) {
207- llist_del(&gp_cur->list);
208- talloc_free(gp_cur);
209- }
210- }
211
212 ptr = strchr(buf, '=');
213 pb_readrg.index1 = atoi(ptr+1);
214 ptr = strchr(buf, ',');
215 pb_readrg.index2 = atoi(ptr+1);
216 lgsm_pb_read_entries(lgsmh, &pb_readrg);
217-#endif
218 } else if ( !strncmp(buf, "pr", 2)) {
219 ptr = strchr(buf, '=');
220 lgsm_pb_read_entry(lgsmh, atoi(ptr+1));
221-#if 0
222 } else if ( !strncmp(buf, "pf", 2)) {
223 printf("Find Phonebook Entry\n");
224 struct lgsm_phonebook_find pb_find;
225- struct gsmd_phonebook *gp_cur, *gp_cur2;
226-
227- /* Remove records */
228- if (!llist_empty(&phonebook_list)) {
229- llist_for_each_entry_safe(gp_cur,
230- gp_cur2,
231- &phonebook_list,
232- list) {
233- llist_del(&gp_cur->list);
234- talloc_free(gp_cur);
235- }
236- }
237
238 ptr = strchr(buf, '=');
239 strncpy(pb_find.findtext,
240@@ -559,7 +498,6 @@
241 pb_find.findtext[strlen(ptr+1)] = '\0';
242
243 lgsm_pb_find_entry(lgsmh, &pb_find);
244-#endif
245 } else if ( !strncmp(buf, "pw", 2)) {
246 printf("Write Phonebook Entry\n");
247 struct lgsm_phonebook pb;
248@@ -591,6 +529,16 @@
249 } else if ( !strncmp(buf, "ps", 2)) {
250 printf("Get Phonebook Support\n");
251 lgsm_pb_get_support(lgsmh);
252+ } else if( !strncmp(buf, "pRr", 3) ) {
253+ printf("Retrieve Readrg Records\n");
254+
255+ if ( nREADRG )
256+ lgsm_pb_retrieve_readrg(lgsmh, nREADRG);
257+ } else if( !strncmp(buf, "pRf", 3) ) {
258+ printf("Retrieve Find Records\n");
259+
260+ if ( nFIND )
261+ lgsm_pb_retrieve_find(lgsmh, nFIND);
262 } else if ( !strncmp(buf, "sd", 2)) {
263 printf("Delete SMS\n");
264 struct lgsm_sms_delete sms_del;
diff --git a/meta/recipes-connectivity/gsm/files/default b/meta/recipes-connectivity/gsm/files/default
new file mode 100644
index 0000000000..6ef4f6db57
--- /dev/null
+++ b/meta/recipes-connectivity/gsm/files/default
@@ -0,0 +1,59 @@
1# gsmd This shell script configures for the gsmd init script.
2
3. /etc/init.d/functions
4
5case `machine_id` in
6 "gta01"|"gta02")
7 GSMD_OPTS="-s 115200 -F"
8 if [ -d '/sys/bus/platform/devices/gta01-pm-gsm.0' ] ; then
9 GSM_POW="/sys/bus/platform/devices/gta01-pm-gsm.0/power_on"
10 GSM_RES="/sys/bus/platform/devices/gta01-pm-gsm.0/reset"
11 else
12 GSM_POW="/sys/bus/platform/devices/neo1973-pm-gsm.0/power_on"
13 GSM_RES="/sys/bus/platform/devices/neo1973-pm-gsm.0/reset"
14 fi
15 GSM_DEV="/dev/ttySAC0"
16 GSM_DL="/sys/devices/platform/neo1973-pm-gsm.0/download"
17 ;;
18 "htc_apache"|"htc_blueangel"|"htc_universal")
19 GSMD_OPTS="-s 115200 -F"
20 GSM_DEV="/dev/ttyS0"
21 ;;
22 "htc_himalaya")
23 GSMD_OPTS="-s 115200 -F"
24 GSM_DEV="/dev/ttyS2"
25 ;;
26 "htc_magician")
27 GSMD_OPTS="-s 115200 -F"
28 GSM_DEV="/dev/ttyS1"
29 ;;
30 "palm_treo_650")
31 GSMD_OPTS="-s 460800 -F -w 1"
32 GSM_DEV="/dev/ttyS0"
33 ;;
34 "motorola_ezx_platform")
35 GSMD_OPTS="-s 115200 -F -v ti"
36 GSM_DEV="/dev/mux0"
37 ;;
38 "omap3430_ldp_board")
39 # Need a machine for the Zoom modem, but this will do
40 GSMD_OPTS="-s 460800 -F -v ti -m gta01"
41 GSM_DEV="/dev/ttyS0"
42 ;;
43 *)
44 # Unknown board
45
46 # If you must specify special options, uncomment and modify the next line
47 #GSMD_OPTS="-s 115200 -F"
48
49 # If your GSM device needs to be powered up, uncomment and modify the next line
50 #GSM_POW="/sys/bus/platform/devices/gta01-pm-gsm.0/power_on"
51
52 # If your GSM device then needs to be reset, uncomment and modify the next line
53 #GSM_RES="/sys/bus/platform/devices/gta01-pm-gsm.0/reset"
54
55 # This should be in a common /etc/default/serial, together with
56 # BT_DEV and IR_DEV for devices that have those on a serial port
57 #GSM_DEV="/dev/ttyS1"
58 ;;
59esac
diff --git a/meta/recipes-connectivity/gsm/files/fix_machine_init.patch b/meta/recipes-connectivity/gsm/files/fix_machine_init.patch
new file mode 100644
index 0000000000..808bb17b42
--- /dev/null
+++ b/meta/recipes-connectivity/gsm/files/fix_machine_init.patch
@@ -0,0 +1,23 @@
1Index: src/gsmd/gsmd.c
2===================================================================
3--- a/src/gsmd/gsmd.c (revision 4304)
4+++ b/src/gsmd/gsmd.c (working copy)
5@@ -196,13 +196,13 @@
6
7 sms_cb_init(gsmd);
8
9- if (gsmd->vendorpl && gsmd->vendorpl->initsettings){
10+ if (gsmd->vendorpl && gsmd->vendorpl->initsettings)
11 rc |= gsmd->vendorpl->initsettings(gsmd);
12+
13+ if (gsmd->machinepl && gsmd->machinepl->initsettings)
14 rc |= gsmd->machinepl->initsettings(gsmd);
15- return rc;
16- }
17- else
18- return rc;
19+
20+ return rc;
21 }
22
23 static int firstcmd_response = 0;
diff --git a/meta/recipes-connectivity/gsm/files/gsmd b/meta/recipes-connectivity/gsm/files/gsmd
new file mode 100644
index 0000000000..dc10e63098
--- /dev/null
+++ b/meta/recipes-connectivity/gsm/files/gsmd
@@ -0,0 +1,47 @@
1#! /bin/sh
2#
3# gsmd This shell script starts and stops gsmd.
4#
5# chkconfig: 345 90 40
6# description: Gsmd manages access to a serial- or USB-connected GSM
7# processname: gsmd
8
9PATH=/bin:/usr/bin:/sbin:/usr/sbin
10
11[ -f /etc/default/rcS ] && . /etc/default/rcS
12[ -f /etc/default/gsmd ] && . /etc/default/gsmd
13
14case "$1" in
15 start)
16 [ -n "$GSM_POW" ] && ( echo "0" >$GSM_POW; sleep 1 )
17 [ -n "$GSM_POW" ] && ( echo "1" >$GSM_POW; sleep 1 )
18 [ -n "$GSM_RES" ] && ( echo "1" >$GSM_RES; sleep 1 )
19 [ -n "$GSM_RES" ] && ( echo "0" >$GSM_RES; sleep 2 )
20
21 echo -n "Starting GSM daemon: "
22 start-stop-daemon -S -x /usr/sbin/gsmd -- gsmd -p $GSM_DEV $GSMD_OPTS -d -l syslog
23
24 if [ $? = 0 ]; then
25 echo "gsmd."
26 else
27 echo "(failed.)"
28 fi
29 ;;
30 stop)
31 [ -n "$GSM_POW" ] && echo "0" >$GSM_POW
32
33 echo -n "Stopping GSM daemon: "
34 start-stop-daemon -K -x /usr/sbin/gsmd
35 echo "gsmd."
36 ;;
37 restart|force-reload)
38 $0 stop
39 $0 start
40 ;;
41 *)
42 echo "Usage: /etc/init.d/gsmd {start|stop|restart|force-reload}"
43 exit 1
44 ;;
45esac
46
47exit 0
diff --git a/meta/recipes-connectivity/gsm/files/install-ts-headers.patch b/meta/recipes-connectivity/gsm/files/install-ts-headers.patch
new file mode 100644
index 0000000000..88e3b6dd1f
--- /dev/null
+++ b/meta/recipes-connectivity/gsm/files/install-ts-headers.patch
@@ -0,0 +1,11 @@
1Index: gsm/include/gsmd/Makefile.am
2===================================================================
3--- gsm.orig/include/gsmd/Makefile.am 2007-10-29 21:05:57.000000000 +0100
4+++ gsm/include/gsmd/Makefile.am 2007-10-29 21:06:03.000000000 +0100
5@@ -1,4 +1,4 @@
6
7-pkginclude_HEADERS = event.h usock.h
8+pkginclude_HEADERS = event.h ts0705.h ts0707.h usock.h
9
10-noinst_HEADERS = atcmd.h gsmd.h select.h ts0705.h ts0707.h unsolicited.h usock.h vendorplugin.h
11+noinst_HEADERS = atcmd.h gsmd.h select.h unsolicited.h usock.h vendorplugin.h
diff --git a/meta/recipes-connectivity/gsm/files/lgsm_send_fix_return_value.patch b/meta/recipes-connectivity/gsm/files/lgsm_send_fix_return_value.patch
new file mode 100644
index 0000000000..00ba3a4549
--- /dev/null
+++ b/meta/recipes-connectivity/gsm/files/lgsm_send_fix_return_value.patch
@@ -0,0 +1,11 @@
1--- gsm/src/libgsmd/libgsmd.c.orig 2007-09-25 00:41:56.000000000 -0500
2+++ gsm/src/libgsmd/libgsmd.c 2007-09-25 00:43:44.000000000 -0500
3@@ -210,7 +210,7 @@
4 pos += rc;
5 }
6 }
7- return 0;
8+ return (sizeof(*gmh) + gmh->len);
9 }
10
11 struct gsmd_msg_hdr *lgsm_gmh_fill(int type, int subtype, int payload_len)
diff --git a/meta/recipes-connectivity/gsm/gsmd.inc b/meta/recipes-connectivity/gsm/gsmd.inc
new file mode 100644
index 0000000000..a69fdd90f1
--- /dev/null
+++ b/meta/recipes-connectivity/gsm/gsmd.inc
@@ -0,0 +1,93 @@
1DESCRIPTION = "GSM libraries and daemons implementing the 07.10 specification"
2HOMEPAGE = "http://www.openmoko.org"
3LICENSE = "GPL LGPL"
4SECTION = "libs/gsm"
5PROVIDES += "gsmd"
6RPROVIDES_${PN} = "libgsmd0 libgsmd gsmd gsmd-devel"
7PV = "0.1+svnr${SRCREV}"
8PR = "r47"
9
10SRC_URI = "svn://svn.openmoko.org/trunk/src/target;module=gsm;proto=http \
11 file://fix_machine_init.patch;patch=1 \
12 file://gsmd \
13 file://default"
14S = "${WORKDIR}/gsm"
15
16inherit autotools pkgconfig update-rc.d
17# handle update-rc.d RDEPENDS manually, we don't need it on
18# anything but gsmd
19RDEPENDS_append = ""
20
21INITSCRIPT_NAME = "gsmd"
22INITSCRIPT_PARAMS = "defaults 35"
23
24do_install_append() {
25 install -d ${D}/${sysconfdir}/init.d
26 install -m 0755 ${WORKDIR}/gsmd ${D}/${sysconfdir}/init.d/
27 install -d ${D}/${sysconfdir}/default
28 install ${WORKDIR}/default ${D}/${sysconfdir}/default/gsmd
29}
30
31PACKAGES =+ "\
32 ${PN}-tools \
33 ${BASEPN}-plugins \
34 ${BASEPN}-plugin-machine-generic \
35 ${BASEPN}-plugin-machine-tihtc \
36 ${BASEPN}-plugin-machine-gta01 \
37 ${BASEPN}-plugin-vendor-bcm \
38 ${BASEPN}-plugin-vendor-qc \
39 ${BASEPN}-plugin-vendor-ti \
40 ${BASEPN}-plugin-vendor-tihtc \
41"
42
43ALLOW_EMPTY_${BASEPN}-plugin-machine-gta01 = "1"
44
45RDEPENDS_${BASEPN}-plugins = "\
46 ${BASEPN}-plugin-machine-generic \
47 ${BASEPN}-plugin-machine-tihtc \
48 ${BASEPN}-plugin-machine-gta01 \
49 ${BASEPN}-plugin-vendor-bcm \
50 ${BASEPN}-plugin-vendor-qc \
51 ${BASEPN}-plugin-vendor-ti \
52 ${BASEPN}-plugin-vendor-tihtc \
53"
54
55RDEPENDS_${PN} += "update-rc.d initscripts"
56RRECOMMENDS_${PN} += "${BASEPN}-plugins"
57
58FILES_${PN}-dbg += "${libdir}/gsmd/.debug/*"
59FILES_${PN}-tools = "${bindir}/*"
60FILES_${BASEPN}-plugins = ""
61FILES_${BASEPN}-plugin-machine-generic = "${libdir}/gsmd/libgsmd-machine_generic.so*"
62FILES_${BASEPN}-plugin-machine-tihtc = "${libdir}/gsmd/libgsmd-machine_tihtc.so*"
63FILES_${BASEPN}-plugin-machine-gta01 = "${libdir}/gsmd/libgsmd-machine_gta01.so*"
64FILES_${BASEPN}-plugin-vendor-qc = "${libdir}/gsmd/libgsmd-vendor_qc.so*"
65FILES_${BASEPN}-plugin-vendor-bcm = "${libdir}/gsmd/libgsmd-vendor_bcm.so*"
66FILES_${BASEPN}-plugin-vendor-ti = "${libdir}/gsmd/libgsmd-vendor_ti.so*"
67FILES_${BASEPN}-plugin-vendor-tihtc = "${libdir}/gsmd/libgsmd-vendor_tihtc.so*"
68
69PACKAGES_DYNAMIC = "lib${BASEPN}* ${BASEPN}"
70
71ALLOW_EMPTY_${BASEPN}-plugins = "1"
72
73RCONFLICTS_lib${BASEPN} = "lib${CONFLICTNAME}"
74RCONFLICTS_${BASEPN} = "${CONFLICTNAME}"
75RCONFLICTS_${BASEPN}-plugins = "${CONFLICTNAME}-plugins"
76RCONFLICTS_${BASEPN}-plugin-machine-generic = "${CONFLICTNAME}-plugin-machine-generic"
77RCONFLICTS_${BASEPN}-plugin-machine-tihtc = "${CONFLICTNAME}-plugin-machine-tihtc"
78RCONFLICTS_${BASEPN}-plugin-machine-gta01 = "${CONFLICTNAME}-plugin-machine-gta01"
79RCONFLICTS_${BASEPN}-plugin-vendor-qc = "${CONFLICTNAME}-plugin-vendor-qc"
80RCONFLICTS_${BASEPN}-plugin-vendor-bcm = "${CONFLICTNAME}-plugin-vendor-bcm"
81RCONFLICTS_${BASEPN}-plugin-vendor-ti = "${CONFLICTNAME}-plugin-vendor-ti"
82RCONFLICTS_${BASEPN}-plugin-vendor-tihtc = "${CONFLICTNAME}-plugin-vendor-tihtc"
83
84RPROVIDES_lib${BASEPN} += "lib${CONFLICTNAME}"
85RPROVIDES_${BASEPN} = "${CONFLICTNAME}"
86RPROVIDES_${BASEPN}-plugins = "${CONFLICTNAME}-plugins"
87RPROVIDES_${BASEPN}-plugin-machine-generic = "${CONFLICTNAME}-plugin-machine-generic"
88RPROVIDES_${BASEPN}-plugin-machine-tihtc = "${CONFLICTNAME}-plugin-machine-tihtc"
89RPROVIDES_${BASEPN}-plugin-machine-gta01 = "${CONFLICTNAME}-plugin-machine-gta01"
90RPROVIDES_${BASEPN}-plugin-vendor-qc = "${CONFLICTNAME}-plugin-vendor-qc"
91RPROVIDES_${BASEPN}-plugin-vendor-bcm = "${CONFLICTNAME}-plugin-vendor-bcm"
92RPROVIDES_${BASEPN}-plugin-vendor-ti = "${CONFLICTNAME}-plugin-vendor-ti"
93RPROVIDES_${BASEPN}-plugin-vendor-tihtc = "${CONFLICTNAME}-plugin-vendor-tihtc"
diff --git a/meta/recipes-connectivity/gsm/libgsmd_svn.bb b/meta/recipes-connectivity/gsm/libgsmd_svn.bb
new file mode 100644
index 0000000000..9d3ca19c04
--- /dev/null
+++ b/meta/recipes-connectivity/gsm/libgsmd_svn.bb
@@ -0,0 +1,5 @@
1BASEPN = "gsmd"
2CONFLICTNAME = "gsmd-devel"
3
4require gsmd.inc
5
diff --git a/meta/recipes-connectivity/iproute2/iproute2-2.6.34/configure-cross.patch b/meta/recipes-connectivity/iproute2/iproute2-2.6.34/configure-cross.patch
new file mode 100644
index 0000000000..67dc6f5a30
--- /dev/null
+++ b/meta/recipes-connectivity/iproute2/iproute2-2.6.34/configure-cross.patch
@@ -0,0 +1,61 @@
1# borrow from OE, to handle cross compile mess
2#
3# ktian1, 06/28/2010
4Index: iproute2-2.6.34/configure
5===================================================================
6--- iproute2-2.6.34.orig/configure
7+++ iproute2-2.6.34/configure
8@@ -4,7 +4,7 @@
9 INCLUDE=${1:-"$PWD/include"}
10
11 TABLES=
12-
13+SYSROOT=$1
14 check_atm()
15 {
16 cat >/tmp/atmtest.c <<EOF
17@@ -15,7 +15,7 @@ int main(int argc, char **argv) {
18 return 0;
19 }
20 EOF
21-gcc -I$INCLUDE -o /tmp/atmtest /tmp/atmtest.c -latm >/dev/null 2>&1
22+$CC -I$INCLUDE -o /tmp/atmtest /tmp/atmtest.c -latm >/dev/null 2>&1
23 if [ $? -eq 0 ]
24 then
25 echo "TC_CONFIG_ATM:=y" >>Config
26@@ -49,7 +49,7 @@ int main(int argc, char **argv)
27
28 EOF
29
30-if gcc -I$INCLUDE $IPTC -o /tmp/ipttest /tmp/ipttest.c $IPTL -ldl -lxtables >/dev/null 2>&1
31+if $CC -I$INCLUDE $IPTC -o /tmp/ipttest /tmp/ipttest.c $IPTL -ldl -lxtables >/dev/null 2>&1
32 then
33 echo "TC_CONFIG_XT:=y" >>Config
34 echo "using xtables"
35@@ -86,7 +86,7 @@ int main(int argc, char **argv) {
36 }
37
38 EOF
39-gcc -I$INCLUDE $IPTC -o /tmp/ipttest /tmp/ipttest.c $IPTL -ldl >/dev/null 2>&1
40+$CC -I$INCLUDE $IPTC -o /tmp/ipttest /tmp/ipttest.c $IPTL -ldl >/dev/null 2>&1
41
42 if [ $? -eq 0 ]
43 then
44@@ -126,7 +126,7 @@ int main(int argc, char **argv) {
45 }
46
47 EOF
48-gcc -I$INCLUDE $IPTC -o /tmp/ipttest /tmp/ipttest.c $IPTL -ldl >/dev/null 2>&1
49+$CC -I$INCLUDE $IPTC -o /tmp/ipttest /tmp/ipttest.c $IPTL -ldl >/dev/null 2>&1
50
51 if [ $? -eq 0 ]
52 then
53@@ -150,7 +150,7 @@ check_ipt()
54 check_ipt_lib_dir()
55 {
56 IPT_LIB_DIR=""
57- for dir in /lib /usr/lib /usr/local/lib
58+ for dir in $SYSROOT/lib $SYSROOT/usr/lib $SYSROOT/usr/local/lib
59 do
60 for file in $dir/$TABLES/lib*t_*so ; do
61 if [ -f $file ]; then
diff --git a/meta/recipes-connectivity/iproute2/iproute2.inc b/meta/recipes-connectivity/iproute2/iproute2.inc
new file mode 100644
index 0000000000..7246b87e9b
--- /dev/null
+++ b/meta/recipes-connectivity/iproute2/iproute2.inc
@@ -0,0 +1,27 @@
1DESCRIPTION = "kernel routing and traffic control utilities"
2HOMEPAGE = "http://www.linuxfoundation.org/collaborate/workgroups/networking/iproute2"
3SECTION = "base"
4LICENSE = "GPLv2+"
5LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a \
6 file://ip/ip.c;md5=186731afa4b42e30b9b37efa4ec90b93"
7DEPENDS = "flex-native bison-native"
8
9inherit update-alternatives
10
11EXTRA_OEMAKE = "CC='${CC}' KERNEL_INCLUDE=${STAGING_KERNEL_DIR}/include DOCDIR=${docdir}/iproute2 SUBDIRS='lib tc ip' SBINDIR=/sbin"
12
13do_install () {
14 oe_runmake DESTDIR=${D} install
15 mv ${D}${base_sbindir}/ip ${D}${base_sbindir}/ip.iproute2
16 install -d ${D}${datadir}
17 mv ${D}/share/* ${D}${datadir}/ || true
18 rm ${D}/share -rf || true
19}
20
21FILES_${PN} += "/usr/lib/tc/*"
22FILES_${PN}-dbg += "/usr/lib/tc/.debug"
23
24ALTERNATIVE_NAME = "ip"
25ALTERNATIVE_PATH = "${base_sbindir}/ip.iproute2"
26ALTERNATIVE_LINK = "${base_bindir}/ip"
27ALTERNATIVE_PRIORITY = "100"
diff --git a/meta/recipes-connectivity/iproute2/iproute2_2.6.34.bb b/meta/recipes-connectivity/iproute2/iproute2_2.6.34.bb
new file mode 100644
index 0000000000..c5e0ef6e56
--- /dev/null
+++ b/meta/recipes-connectivity/iproute2/iproute2_2.6.34.bb
@@ -0,0 +1,6 @@
1require iproute2.inc
2
3PR = "r0"
4
5SRC_URI = "http://developer.osdl.org/dev/iproute2/download/${P}.tar.bz2 \
6 file://configure-cross.patch"
diff --git a/meta/recipes-connectivity/libetpan/files/cxx-is-here.patch b/meta/recipes-connectivity/libetpan/files/cxx-is-here.patch
new file mode 100644
index 0000000000..d910daab17
--- /dev/null
+++ b/meta/recipes-connectivity/libetpan/files/cxx-is-here.patch
@@ -0,0 +1,18 @@
1---
2 configure.ac | 1 +
3 1 file changed, 1 insertion(+)
4
5--- libetpan-0.54.orig/configure.ac
6+++ libetpan-0.54/configure.ac
7@@ -104,10 +104,11 @@ if test "$have_w32_system" = yes; then
8 fi
9 AM_CONDITIONAL(HAVE_MINGW32_SYSTEM, test "$have_w32_system" = yes)
10
11 # Check the C compiler.
12 AC_PROG_CC
13+AC_PROG_CXX
14
15 # Compiler flags.
16 AC_ARG_ENABLE(debug, [ --enable-debug setup flags (gcc) for debugging (default=no)],
17 if test "x$GCC" = xyes; then
18 CFLAGS="$CFLAGS -O2 -g"
diff --git a/meta/recipes-connectivity/libetpan/libetpan_0.54.bb b/meta/recipes-connectivity/libetpan/libetpan_0.54.bb
new file mode 100644
index 0000000000..5666ea0ded
--- /dev/null
+++ b/meta/recipes-connectivity/libetpan/libetpan_0.54.bb
@@ -0,0 +1,19 @@
1DESCRIPTION = "libetpan is a library for communicating with mail and news servers. \
2It supports the protocols SMTP, POP3, IMAP and NNTP."
3HOMEPAGE = "http://www.etpan.org"
4SECTION = "libs"
5DEPENDS = "curl expat gnutls"
6LICENSE = "BSD"
7PR = "r1"
8
9SRC_URI = "${SOURCEFORGE_MIRROR}/libetpan/libetpan-${PV}.tar.gz \
10 file://cxx-is-here.patch;patch=1"
11
12inherit autotools pkgconfig gettext binconfig
13
14EXTRA_OECONF = "--without-openssl --with-gnutls --disable-db"
15
16PARALLEL_MAKE = ""
17
18FILES_${PN} = "${libdir}/lib*.so.*"
19FILES_${PN}-dev = "${bindir} ${includedir} ${libdir}/lib*.so ${libdir}/*.la ${libdir}/*.a ${libdir}/pkgconfig"
diff --git a/meta/recipes-connectivity/libnss-mdns/files/alignment-fix.patch b/meta/recipes-connectivity/libnss-mdns/files/alignment-fix.patch
new file mode 100644
index 0000000000..11d4655e1f
--- /dev/null
+++ b/meta/recipes-connectivity/libnss-mdns/files/alignment-fix.patch
@@ -0,0 +1,11 @@
1--- nss-mdns-0.6/src/nss.c.orig 2005-09-25 17:27:51 +0200
2+++ nss-mdns-0.6/src/nss.c 2005-09-25 17:28:55 +0200
3@@ -456,6 +456,8 @@
4 result->h_addrtype = af;
5 result->h_length = address_length;
6
7+ idx+=(sizeof(char*)-idx%sizeof(char*)); /* Align on 32 bit boundary */
8+
9 /* Check if there's enough space for the addresses */
10 if (buflen < idx+u.data_len+sizeof(char*)*(u.count+1)) {
11 *errnop = ERANGE;
diff --git a/meta/recipes-connectivity/libnss-mdns/libnss-mdns_0.10.bb b/meta/recipes-connectivity/libnss-mdns/libnss-mdns_0.10.bb
new file mode 100644
index 0000000000..69eaa33d60
--- /dev/null
+++ b/meta/recipes-connectivity/libnss-mdns/libnss-mdns_0.10.bb
@@ -0,0 +1,36 @@
1DESCRIPTION = "NSS module for Multicast DNS name resolution"
2HOMEPAGE = "http://0pointer.de/lennart/projects/nss-mdns/"
3SECTION = "libs"
4PRIORITY = "optional"
5
6LICENSE = "LGPLv2.1+"
7LIC_FILES_CHKSUM = "file://LICENSE;md5=2d5025d4aa3495befef8f17206a5b0a1"
8
9DEPENDS = "avahi"
10RDEPENDS = "avahi-daemon"
11PR = "r0"
12
13SRC_URI = "http://0pointer.de/lennart/projects/nss-mdns/nss-mdns-${PV}.tar.gz"
14S = "${WORKDIR}/nss-mdns-${PV}"
15
16inherit autotools
17
18# suppress warning, but don't bother with autonamer
19LEAD_SONAME = "libnss_mdns.so"
20DEBIANNAME_${PN} = "libnss-mdns"
21
22EXTRA_OECONF = "--libdir=/lib --disable-lynx --enable-avahi"
23
24pkg_postinst () {
25 cat /etc/nsswitch.conf | grep "hosts:\s*files dns$" > /dev/null && {
26 cat /etc/nsswitch.conf | sed 's/hosts:\s*files dns/& mdns4/' > /tmp/nsswitch.conf
27 mv /tmp/nsswitch.conf /etc/nsswitch.conf
28 }
29}
30
31pkg_prerm () {
32 cat /etc/nsswitch.conf | grep "hosts:\s*files dns mdns$" > /dev/null && {
33 cat /etc/nsswitch.conf | sed 's/\(hosts:\s*files dns\) mdns4*/\1/' > /tmp/nsswitch.conf
34 mv /tmp/nsswitch.conf /etc/nsswitch.conf
35 }
36}
diff --git a/meta/recipes-connectivity/libpcap/libpcap-1.1.1/aclocal.patch b/meta/recipes-connectivity/libpcap/libpcap-1.1.1/aclocal.patch
new file mode 100644
index 0000000000..71fd8b989b
--- /dev/null
+++ b/meta/recipes-connectivity/libpcap/libpcap-1.1.1/aclocal.patch
@@ -0,0 +1,165 @@
1diff -ruN libpcap-1.1.1-orig/aclocal.m4 libpcap-1.1.1/aclocal.m4
2--- libpcap-1.1.1-orig/aclocal.m4 2010-06-29 10:46:32.815117569 +0800
3+++ libpcap-1.1.1/aclocal.m4 2010-06-29 10:49:17.150149949 +0800
4@@ -37,7 +37,7 @@
5 dnl AC_LBL_C_INIT. Now, we run AC_LBL_C_INIT_BEFORE_CC, AC_PROG_CC,
6 dnl and AC_LBL_C_INIT at the top level.
7 dnl
8-AC_DEFUN(AC_LBL_C_INIT_BEFORE_CC,
9+AC_DEFUN([AC_LBL_C_INIT_BEFORE_CC],
10 [AC_PREREQ(2.50)
11 AC_BEFORE([$0], [AC_LBL_C_INIT])
12 AC_BEFORE([$0], [AC_PROG_CC])
13@@ -90,7 +90,7 @@
14 dnl ac_cv_lbl_gcc_vers
15 dnl LBL_CFLAGS
16 dnl
17-AC_DEFUN(AC_LBL_C_INIT,
18+AC_DEFUN([AC_LBL_C_INIT],
19 [AC_PREREQ(2.50)
20 AC_BEFORE([$0], [AC_LBL_FIXINCLUDES])
21 AC_BEFORE([$0], [AC_LBL_DEVEL])
22@@ -217,7 +217,7 @@
23 dnl V_SONAME_OPT
24 dnl V_RPATH_OPT
25 dnl
26-AC_DEFUN(AC_LBL_SHLIBS_INIT,
27+AC_DEFUN([AC_LBL_SHLIBS_INIT],
28 [AC_PREREQ(2.50)
29 if test "$GCC" = yes ; then
30 #
31@@ -361,7 +361,7 @@
32 # Make sure we use the V_CCOPT flags, because some of those might
33 # disable inlining.
34 #
35-AC_DEFUN(AC_LBL_C_INLINE,
36+AC_DEFUN([AC_LBL_C_INLINE],
37 [AC_MSG_CHECKING(for inline)
38 save_CFLAGS="$CFLAGS"
39 CFLAGS="$V_CCOPT"
40@@ -407,7 +407,7 @@
41 dnl
42 dnl AC_LBL_FIXINCLUDES
43 dnl
44-AC_DEFUN(AC_LBL_FIXINCLUDES,
45+AC_DEFUN([AC_LBL_FIXINCLUDES],
46 [if test "$GCC" = yes ; then
47 AC_MSG_CHECKING(for ANSI ioctl definitions)
48 AC_CACHE_VAL(ac_cv_lbl_gcc_fixincludes,
49@@ -453,7 +453,7 @@
50 dnl $2 (yacc appended)
51 dnl $3 (optional flex and bison -P prefix)
52 dnl
53-AC_DEFUN(AC_LBL_LEX_AND_YACC,
54+AC_DEFUN([AC_LBL_LEX_AND_YACC],
55 [AC_ARG_WITH(flex, [ --without-flex don't use flex])
56 AC_ARG_WITH(bison, [ --without-bison don't use bison])
57 if test "$with_flex" = no ; then
58@@ -506,7 +506,7 @@
59 dnl
60 dnl DECLWAITSTATUS (defined)
61 dnl
62-AC_DEFUN(AC_LBL_UNION_WAIT,
63+AC_DEFUN([AC_LBL_UNION_WAIT],
64 [AC_MSG_CHECKING(if union wait is used)
65 AC_CACHE_VAL(ac_cv_lbl_union_wait,
66 AC_TRY_COMPILE([
67@@ -535,7 +535,7 @@
68 dnl
69 dnl HAVE_SOCKADDR_SA_LEN (defined)
70 dnl
71-AC_DEFUN(AC_LBL_SOCKADDR_SA_LEN,
72+AC_DEFUN([AC_LBL_SOCKADDR_SA_LEN],
73 [AC_MSG_CHECKING(if sockaddr struct has the sa_len member)
74 AC_CACHE_VAL(ac_cv_lbl_sockaddr_has_sa_len,
75 AC_TRY_COMPILE([
76@@ -560,7 +560,7 @@
77 dnl
78 dnl HAVE_SOCKADDR_STORAGE (defined)
79 dnl
80-AC_DEFUN(AC_LBL_SOCKADDR_STORAGE,
81+AC_DEFUN([AC_LBL_SOCKADDR_STORAGE],
82 [AC_MSG_CHECKING(if sockaddr_storage struct exists)
83 AC_CACHE_VAL(ac_cv_lbl_has_sockaddr_storage,
84 AC_TRY_COMPILE([
85@@ -593,7 +593,7 @@
86 dnl won't be using code that would use that member, or we wouldn't
87 dnl compile in any case).
88 dnl
89-AC_DEFUN(AC_LBL_HP_PPA_INFO_T_DL_MODULE_ID_1,
90+AC_DEFUN([AC_LBL_HP_PPA_INFO_T_DL_MODULE_ID_1],
91 [AC_MSG_CHECKING(if dl_hp_ppa_info_t struct has dl_module_id_1 member)
92 AC_CACHE_VAL(ac_cv_lbl_dl_hp_ppa_info_t_has_dl_module_id_1,
93 AC_TRY_COMPILE([
94@@ -619,7 +619,7 @@
95 dnl
96 dnl ac_cv_lbl_have_run_path (yes or no)
97 dnl
98-AC_DEFUN(AC_LBL_HAVE_RUN_PATH,
99+AC_DEFUN([AC_LBL_HAVE_RUN_PATH],
100 [AC_MSG_CHECKING(for ${CC-cc} -R)
101 AC_CACHE_VAL(ac_cv_lbl_have_run_path,
102 [echo 'main(){}' > conftest.c
103@@ -644,7 +644,7 @@
104 dnl
105 dnl LBL_ALIGN (DEFINED)
106 dnl
107-AC_DEFUN(AC_LBL_UNALIGNED_ACCESS,
108+AC_DEFUN([AC_LBL_UNALIGNED_ACCESS],
109 [AC_MSG_CHECKING(if unaligned accesses fail)
110 AC_CACHE_VAL(ac_cv_lbl_unaligned_fail,
111 [case "$host_cpu" in
112@@ -749,7 +749,7 @@
113 dnl HAVE_OS_PROTO_H (defined)
114 dnl os-proto.h (symlinked)
115 dnl
116-AC_DEFUN(AC_LBL_DEVEL,
117+AC_DEFUN([AC_LBL_DEVEL],
118 [rm -f os-proto.h
119 if test "${LBL_CFLAGS+set}" = set; then
120 $1="$$1 ${LBL_CFLAGS}"
121@@ -886,7 +886,7 @@
122 dnl statically and happen to have a libresolv.a lying around (and no
123 dnl libnsl.a).
124 dnl
125-AC_DEFUN(AC_LBL_LIBRARY_NET, [
126+AC_DEFUN([AC_LBL_LIBRARY_NET], [
127 # Most operating systems have gethostbyname() in the default searched
128 # libraries (i.e. libc):
129 # Some OSes (eg. Solaris) place it in libnsl
130@@ -909,7 +909,7 @@
131 dnl Test for __attribute__
132 dnl
133
134-AC_DEFUN(AC_C___ATTRIBUTE__, [
135+AC_DEFUN([AC_C___ATTRIBUTE__], [
136 AC_MSG_CHECKING(for __attribute__)
137 AC_CACHE_VAL(ac_cv___attribute__, [
138 AC_COMPILE_IFELSE(
139@@ -947,7 +947,7 @@
140 dnl
141 dnl -Scott Barron
142 dnl
143-AC_DEFUN(AC_LBL_TPACKET_STATS,
144+AC_DEFUN([AC_LBL_TPACKET_STATS],
145 [AC_MSG_CHECKING(if if_packet.h has tpacket_stats defined)
146 AC_CACHE_VAL(ac_cv_lbl_tpacket_stats,
147 AC_TRY_COMPILE([
148@@ -976,7 +976,7 @@
149 dnl doesn't have that member (which is OK, as either we won't be using
150 dnl code that would use that member, or we wouldn't compile in any case).
151 dnl
152-AC_DEFUN(AC_LBL_LINUX_TPACKET_AUXDATA_TP_VLAN_TCI,
153+AC_DEFUN([AC_LBL_LINUX_TPACKET_AUXDATA_TP_VLAN_TCI],
154 [AC_MSG_CHECKING(if tpacket_auxdata struct has tp_vlan_tci member)
155 AC_CACHE_VAL(ac_cv_lbl_dl_hp_ppa_info_t_has_dl_module_id_1,
156 AC_TRY_COMPILE([
157@@ -1003,7 +1003,7 @@
158 dnl
159 dnl HAVE_DLPI_PASSIVE (defined)
160 dnl
161-AC_DEFUN(AC_LBL_DL_PASSIVE_REQ_T,
162+AC_DEFUN([AC_LBL_DL_PASSIVE_REQ_T],
163 [AC_MSG_CHECKING(if dl_passive_req_t struct exists)
164 AC_CACHE_VAL(ac_cv_lbl_has_dl_passive_req_t,
165 AC_TRY_COMPILE([
diff --git a/meta/recipes-connectivity/libpcap/libpcap-1.1.1/ieee80215-arphrd.patch b/meta/recipes-connectivity/libpcap/libpcap-1.1.1/ieee80215-arphrd.patch
new file mode 100644
index 0000000000..f29c7cb54c
--- /dev/null
+++ b/meta/recipes-connectivity/libpcap/libpcap-1.1.1/ieee80215-arphrd.patch
@@ -0,0 +1,22 @@
1Index: libpcap-1.0.0/pcap-linux.c
2===================================================================
3--- libpcap-1.0.0.orig/pcap-linux.c 2009-01-28 11:58:54.000000000 +0300
4+++ libpcap-1.0.0/pcap-linux.c 2009-01-28 11:59:04.000000000 +0300
5@@ -1616,6 +1616,17 @@
6 * so let's use "Linux-cooked" mode. Jean II */
7 //handle->md.cooked = 1;
8 break;
9+#ifndef ARPHRD_IEEE80215
10+#define ARPHRD_IEEE80215 804
11+#endif
12+#ifndef ARPHRD_IEEE80215_PHY
13+#define ARPHRD_IEEE80215_PHY 805
14+#endif
15+
16+ case ARPHRD_IEEE80215:
17+ case ARPHRD_IEEE80215_PHY:
18+ handle->linktype = DLT_IEEE802_15_4;
19+ break;
20
21 /* ARPHRD_LAPD is unofficial and randomly allocated, if reallocation
22 * is needed, please report it to <daniele@orlandi.com> */
diff --git a/meta/recipes-connectivity/libpcap/libpcap.inc b/meta/recipes-connectivity/libpcap/libpcap.inc
new file mode 100644
index 0000000000..2025d84c0d
--- /dev/null
+++ b/meta/recipes-connectivity/libpcap/libpcap.inc
@@ -0,0 +1,24 @@
1DESCRIPTION = "Libpcap is a tool to capture network packages on Unix/Linux platform"
2HOMEPAGE = "http://www.tcpdump.org/"
3BUGTRACKER = "http://sourceforge.net/tracker/?group_id=53067&atid=469577"
4SECTION = "libs/network"
5LICENSE = "BSD"
6LIC_FILES_CHKSUM = "file://LICENSE;md5=1d4b0366557951c84a94fabe3529f867 \
7 file://pcap.h;beginline=1;endline=34;md5=8d6cf7e17d5745010d633e30bc529ea9"
8DEPENDS = "flex-native bison-native"
9
10SRC_URI = "http://www.tcpdump.org/release/libpcap-${PV}.tar.gz"
11
12inherit autotools
13
14EXTRA_OECONF = "--with-pcap=linux"
15
16CPPFLAGS_prepend = "-I${S} "
17CFLAGS_prepend = "-I${S} "
18CXXFLAGS_prepend = "-I${S} "
19
20do_configure_prepend () {
21 if [ ! -e acinclude.m4 ]; then
22 cat aclocal.m4 > acinclude.m4
23 fi
24}
diff --git a/meta/recipes-connectivity/libpcap/libpcap_1.1.1.bb b/meta/recipes-connectivity/libpcap/libpcap_1.1.1.bb
new file mode 100644
index 0000000000..58ab5e6c95
--- /dev/null
+++ b/meta/recipes-connectivity/libpcap/libpcap_1.1.1.bb
@@ -0,0 +1,17 @@
1require libpcap.inc
2
3PR = "r0"
4
5SRC_URI += "file://aclocal.patch \
6 file://ieee80215-arphrd.patch"
7
8#
9# make install doesn't cover the shared lib
10# make install-shared is just broken (no symlinks)
11#
12do_install_prepend () {
13 install -d ${D}${libdir}
14 install -d ${D}${bindir}
15 oe_runmake install-shared DESTDIR=${D}
16 oe_libinstall -a -so libpcap ${D}${libdir}
17}
diff --git a/meta/recipes-connectivity/network-suspend-scripts/network-suspend-scripts.bb b/meta/recipes-connectivity/network-suspend-scripts/network-suspend-scripts.bb
new file mode 100644
index 0000000000..dc22ed85f6
--- /dev/null
+++ b/meta/recipes-connectivity/network-suspend-scripts/network-suspend-scripts.bb
@@ -0,0 +1,22 @@
1DESCRIPTION = "Network suspend/resume scripts"
2SECTION = "base"
3LICENSE = "GPLv2"
4PV = "1.1"
5PR = "r2"
6
7SRC_URI = "file://ifupdown \
8 file://usbnet"
9
10do_install() {
11 install -d ${D}${sysconfdir}/apm/scripts.d
12 install -m 0755 ${WORKDIR}/ifupdown ${D}${sysconfdir}/apm/scripts.d
13 install -m 0755 ${WORKDIR}/usbnet ${D}${sysconfdir}/apm/scripts.d
14 install -d ${D}${sysconfdir}/apm/suspend.d
15 ln -s ../scripts.d/ifupdown ${D}${sysconfdir}/apm/suspend.d/05ifupdown
16 ln -s ../scripts.d/usbnet ${D}${sysconfdir}/apm/suspend.d/10usbnet
17 install -d ${D}${sysconfdir}/apm/resume.d
18 ln -sf ../scripts.d/ifupdown ${D}${sysconfdir}/apm/resume.d/30ifupdown
19 ln -sf ../scripts.d/usbnet ${D}${sysconfdir}/apm/resume.d/20usbnet
20}
21
22FILES = "${sysconfdir}/apm"
diff --git a/meta/recipes-connectivity/network-suspend-scripts/network-suspend-scripts/ifupdown b/meta/recipes-connectivity/network-suspend-scripts/network-suspend-scripts/ifupdown
new file mode 100644
index 0000000000..d458da6866
--- /dev/null
+++ b/meta/recipes-connectivity/network-suspend-scripts/network-suspend-scripts/ifupdown
@@ -0,0 +1,26 @@
1#!/bin/sh
2# Unloads/loads all interface that are up at time of suspend
3
4if [ "$1" = suspend ]; then
5 rm -f /var/run/ifstate-suspend
6 rm -f /var/run/ifstate-old
7 cp /var/run/ifstate /var/run/ifstate-old
8 cat /var/run/ifstate-old | (
9 IFS="="
10 while read IFACE LOGICAL; do
11 ifdown $IFACE
12 echo "$IFACE=$LOGICAL" >>/var/run/ifstate-suspend
13 done
14 rm -f /var/run/ifstate-old
15 )
16elif [ "$1" = resume ] && [ "$2" != standby ] && [ -f /var/run/ifstate-suspend ]; then
17 cat /var/run/ifstate-suspend | (
18 while read LINE; do
19 ifup $LINE
20 done
21 )
22 rm -f /var/run/ifstate-suspend
23fi
24
25: exit 0
26
diff --git a/meta/recipes-connectivity/network-suspend-scripts/network-suspend-scripts/usbnet b/meta/recipes-connectivity/network-suspend-scripts/network-suspend-scripts/usbnet
new file mode 100644
index 0000000000..3731f6339f
--- /dev/null
+++ b/meta/recipes-connectivity/network-suspend-scripts/network-suspend-scripts/usbnet
@@ -0,0 +1,16 @@
1#!/bin/sh
2# Unloads/loads usb-eth so it always works
3
4. /etc/default/usbd
5
6if [ "$1" = suspend ]; then
7 rmmod usb-eth
8 rmmod sa1100usb_core
9elif [ "$1" = resume ] && [ "$2" != standby ]; then
10 modprobe usb-eth
11 modprobe -r $usbdmodule
12 modprobe $usbdmodule
13fi
14
15: exit 0
16
diff --git a/meta/recipes-connectivity/nfs-utils/libnfsidmap_0.23.bb b/meta/recipes-connectivity/nfs-utils/libnfsidmap_0.23.bb
new file mode 100644
index 0000000000..c6b02fe19a
--- /dev/null
+++ b/meta/recipes-connectivity/nfs-utils/libnfsidmap_0.23.bb
@@ -0,0 +1,13 @@
1DESCRIPTION = "nfs idmapping library"
2HOMEPAGE = "http://www.citi.umich.edu/projects/nfsv4/linux/"
3SECTION = "libs"
4
5LICENSE = "BSD"
6LIC_FILES_CHKSUM = "file://COPYING;md5=d9c6a2a0ca6017fda7cd905ed2739b37"
7PR = "r0"
8
9SRC_URI = "http://www.citi.umich.edu/projects/nfsv4/linux/libnfsidmap/${BPN}-${PV}.tar.gz"
10
11inherit autotools
12
13EXTRA_OECONF = "--disable-ldap"
diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-1.0.6-uclibc.patch b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-1.0.6-uclibc.patch
new file mode 100644
index 0000000000..336dc0e267
--- /dev/null
+++ b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-1.0.6-uclibc.patch
@@ -0,0 +1,18 @@
1--- ./support/nfs/svc_socket.c.orig 2004-12-12 06:43:52.000000000 +0000
2+++ ./support/nfs/svc_socket.c 2004-12-12 06:50:04.000000000 +0000
3@@ -66,6 +66,7 @@
4 memset ((char *) &addr, sizeof (addr));
5 addr.sin_family = AF_INET;
6
7+#ifndef __UCLIBC__ /* neither getrpcbynumber() nor getrpcbynumber_r() is SuSv3 */
8 ret = getrpcbynumber_r (number, &rpcbuf, rpcdata, sizeof rpcdata,
9 &rpcp);
10 if (ret == 0 && rpcp != NULL)
11@@ -99,6 +100,7 @@
12 }
13 }
14 else
15+#endif
16 {
17 if (bindresvport (sock, &addr))
18 {
diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils/nfsserver b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfsserver
new file mode 100644
index 0000000000..9d02e85848
--- /dev/null
+++ b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfsserver
@@ -0,0 +1,161 @@
1#!/bin/sh
2### BEGIN INIT INFO
3# Provides: nfs-kernel-server
4# Required-Start: $remote_fs $portmap hwclock
5# Required-Stop: $remote_fs $portmap hwclock
6# Default-Start: 2 3 4 5
7# Default-Stop: 0 1 6
8# Short-Description: Kernel NFS server support
9# Description: NFS is a popular protocol for file sharing across
10# TCP/IP networks. This service provides NFS server
11# functionality, which is configured via the
12# /etc/exports file.
13### END INIT INFO
14#
15# Startup script for nfs-utils
16#
17#
18# The environment variable NFS_SERVERS may be set in /etc/default/nfsd
19# Other control variables may be overridden here too
20test -r /etc/default/nfsd && . /etc/default/nfsd
21#
22# Location of executables:
23test -x "$NFS_MOUNTD" || NFS_MOUNTD=/usr/sbin/mountd
24test -x "$NFS_NFSD" || NFS_NFSD=/usr/sbin/nfsd
25test -x "$NFS_STATD" || NFS_STATD=/usr/sbin/statd
26#
27# The user mode program must also exist (it just starts the kernel
28# threads using the kernel module code).
29test -x "$NFS_MOUNTD" || exit 0
30test -x "$NFS_NFSD" || exit 0
31#
32# Default is 8 threads, value is settable between 1 and the truely
33# ridiculous 99
34test "$NFS_SERVERS" -gt 0 && test "$NFS_SERVERS" -lt 100 || NFS_SERVERS=8
35#
36# The default state directory is /var/lib/nfs
37test -n "$NFS_STATEDIR" || NFS_STATEDIR=/var/lib/nfs
38#
39#----------------------------------------------------------------------
40# Startup and shutdown functions.
41# Actual startup/shutdown is at the end of this file.
42#directories
43create_directories(){
44 echo -n 'creating NFS state directory: '
45 mkdir -p "$NFS_STATEDIR"
46 ( cd "$NFS_STATEDIR"
47 umask 077
48 mkdir -p sm sm.bak
49 test -w sm/state || {
50 rm -f sm/state
51 :>sm/state
52 }
53 umask 022
54 for file in xtab etab smtab rmtab
55 do
56 test -w "$file" || {
57 rm -f "$file"
58 :>"$file"
59 }
60 done
61 )
62 echo done
63}
64#mountd
65start_mountd(){
66 echo -n 'starting mountd: '
67 start-stop-daemon --start --exec "$NFS_MOUNTD" -- "-f /etc/exports $@"
68 echo done
69}
70stop_mountd(){
71 echo -n 'stopping mountd: '
72 start-stop-daemon --stop --quiet --exec "$NFS_MOUNTD"
73 echo done
74}
75#
76#nfsd
77start_nfsd(){
78 echo -n "starting $1 nfsd kernel threads: "
79 start-stop-daemon --start --exec "$NFS_NFSD" -- "$@"
80 echo done
81}
82delay_nfsd(){
83 for delay in 0 1 2 3 4 5 6 7 8 9
84 do
85 if pidof nfsd >/dev/null
86 then
87 echo -n .
88 sleep 1
89 else
90 return 0
91 fi
92 done
93 return 1
94}
95stop_nfsd(){
96 # WARNING: this kills any process with the executable
97 # name 'nfsd'.
98 echo -n 'stopping nfsd: '
99 start-stop-daemon --stop --quiet --signal 1 --name nfsd
100 if delay_nfsd || {
101 echo failed
102 echo ' using signal 9: '
103 start-stop-daemon --stop --quiet --signal 9 --name nfsd
104 delay_nfsd
105 }
106 then
107 echo done
108 # This will remove, recursively, dependencies
109 echo -n 'removing nfsd kernel module: '
110 if modprobe -r nfsd
111 then
112 echo done
113 else
114 echo failed
115 fi
116 else
117 echo failed
118 fi
119}
120
121#statd
122start_statd(){
123 echo -n "starting statd: "
124 start-stop-daemon --start --exec "$NFS_STATD"
125 echo done
126}
127stop_statd(){
128 # WARNING: this kills any process with the executable
129 # name 'statd'.
130 echo -n 'stopping statd: '
131 start-stop-daemon --stop --quiet --signal 1 --name statd
132 echo done
133}
134#----------------------------------------------------------------------
135#
136# supported options:
137# start
138# stop
139# reload: reloads the exports file
140# restart: stops and starts mountd
141#FIXME: need to create the /var/lib/nfs/... directories
142case "$1" in
143start) create_directories
144 start_nfsd "$NFS_SERVERS"
145 start_mountd
146 start_statd
147 test -r /etc/exports && exportfs -a;;
148stop) exportfs -ua
149 stop_statd
150 stop_mountd
151 stop_nfsd;;
152reload) test -r /etc/exports && exportfs -r;;
153restart)exportfs -ua
154 stop_mountd
155 stop_statd
156 # restart does not restart the kernel threads,
157 # only the user mode processes
158 start_mountd
159 start_statd
160 test -r /etc/exports && exportfs -a;;
161esac
diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils_1.2.2.bb b/meta/recipes-connectivity/nfs-utils/nfs-utils_1.2.2.bb
new file mode 100644
index 0000000000..fafedd17b5
--- /dev/null
+++ b/meta/recipes-connectivity/nfs-utils/nfs-utils_1.2.2.bb
@@ -0,0 +1,51 @@
1DESCRIPTION = "userspace utilities for kernel nfs"
2HOMEPAGE = "http://nfs.sourceforge.net/"
3SECTION = "console/network"
4PRIORITY = "optional"
5
6LICENSE = "GPLv2+"
7LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3"
8
9# util-linux for libblkid
10DEPENDS = "libcap libnfsidmap libevent util-linux tcp-wrappers"
11RDEPENDS = "portmap"
12RRECOMMENDS = "kernel-module-nfsd"
13
14PR = "r1"
15
16SRC_URI = "${SOURCEFORGE_MIRROR}/nfs/nfs-utils-${PV}.tar.bz2 \
17 file://nfs-utils-1.0.6-uclibc.patch \
18 file://nfsserver"
19
20PARALLEL_MAKE = ""
21
22# Only kernel-module-nfsd is required here (but can be built-in) - the nfsd module will
23# pull in the remainder of the dependencies.
24
25INITSCRIPT_NAME = "nfsserver"
26# The server has no dependencies at the user run levels, so just put
27# it in at the default levels. It must be terminated before the network
28# in the shutdown levels, but that works fine.
29INITSCRIPT_PARAMS = "defaults"
30
31inherit autotools update-rc.d
32
33# --enable-uuid is need for cross-compiling
34EXTRA_OECONF = "--with-statduser=nobody \
35 --enable-nfsv41 \
36 --enable-uuid \
37 --disable-gss \
38 --disable-tirpc \
39 --with-statedir=/var/lib/nfs"
40
41INHIBIT_AUTO_STAGE = "1"
42
43do_install_append () {
44 install -d ${D}${sysconfdir}/init.d
45 install -m 0755 ${WORKDIR}/nfsserver ${D}${sysconfdir}/init.d/nfsserver
46
47 # the following are built by CC_FOR_BUILD
48 rm -f ${D}${sbindir}/rpcdebug
49 rm -f ${D}${sbindir}/rpcgen
50 rm -f ${D}${sbindir}/locktest
51}
diff --git a/meta/recipes-connectivity/openssl/openssl-0.9.8o/configure-targets.patch b/meta/recipes-connectivity/openssl/openssl-0.9.8o/configure-targets.patch
new file mode 100644
index 0000000000..b68123a233
--- /dev/null
+++ b/meta/recipes-connectivity/openssl/openssl-0.9.8o/configure-targets.patch
@@ -0,0 +1,24 @@
1
2The number of colons are important :)
3
4Index: openssl-0.9.8g/Configure
5===================================================================
6--- openssl-0.9.8g.orig/Configure 2008-04-12 04:27:22.000000000 +0200
7+++ openssl-0.9.8g/Configure 2008-04-12 04:38:56.000000000 +0200
8@@ -395,6 +395,16 @@
9 "linux-alpha-ccc","ccc:-fast -readonly_strings -DL_ENDIAN -DTERMIO::-D_REENTRANT:::SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL:${no_asm}",
10 "linux-alpha+bwx-ccc","ccc:-fast -readonly_strings -DL_ENDIAN -DTERMIO::-D_REENTRANT:::SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL:${no_asm}",
11
12+ # Linux on ARM
13+"linux-elf-arm","$ENV{'CC'}:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG DES_RISC1::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
14+"linux-elf-armeb","$ENV{'CC'}:-DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG DES_RISC1::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
15+"linux-gnueabi-arm","$ENV{'CC'}:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG DES_RISC1::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
16+"linux-gnueabi-armeb","$ENV{'CC'}:-DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG DES_RISC1::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
17+"linux-uclibcgnueabi-arm","$ENV{'CC'}:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG DES_RISC1::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
18+"linux-uclibcgnueabi-armeb","$ENV{'CC'}:-DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG DES_RISC1::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
19+
20+"linux-avr32","$ENV{'CC'}:-DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG DES_RISC1::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).",
21+
22 #### *BSD [do see comment about ${BSDthreads} above!]
23 "BSD-generic32","gcc:-DTERMIOS -O3 -fomit-frame-pointer -Wall::${BSDthreads}:::BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL:${no_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
24 "BSD-x86", "gcc:-DL_ENDIAN -DTERMIOS -O3 -fomit-frame-pointer -Wall::${BSDthreads}:::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_out_asm}:dlfcn:bsd-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
diff --git a/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/ca.patch b/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/ca.patch
new file mode 100644
index 0000000000..761eebe510
--- /dev/null
+++ b/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/ca.patch
@@ -0,0 +1,20 @@
1Index: openssl-0.9.8m/apps/CA.pl.in
2===================================================================
3--- openssl-0.9.8m.orig/apps/CA.pl.in 2006-04-28 00:28:51.000000000 +0000
4+++ openssl-0.9.8m/apps/CA.pl.in 2010-02-27 00:36:51.000000000 +0000
5@@ -65,6 +65,7 @@
6 foreach (@ARGV) {
7 if ( /^(-\?|-h|-help)$/ ) {
8 print STDERR "usage: CA -newcert|-newreq|-newreq-nodes|-newca|-sign|-verify\n";
9+ print STDERR "usage: CA -signcert certfile keyfile|-newcert|-newreq|-newca|-sign|-verify\n";
10 exit 0;
11 } elsif (/^-newcert$/) {
12 # create a certificate
13@@ -165,6 +166,7 @@
14 } else {
15 print STDERR "Unknown arg $_\n";
16 print STDERR "usage: CA -newcert|-newreq|-newreq-nodes|-newca|-sign|-verify\n";
17+ print STDERR "usage: CA -signcert certfile keyfile|-newcert|-newreq|-newca|-sign|-verify\n";
18 exit 1;
19 }
20 }
diff --git a/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/config-hurd.patch b/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/config-hurd.patch
new file mode 100644
index 0000000000..21b7935dde
--- /dev/null
+++ b/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/config-hurd.patch
@@ -0,0 +1,15 @@
1Index: openssl-0.9.8k/config
2===================================================================
3--- openssl-0.9.8k.orig/config 2009-02-16 09:43:41.000000000 +0100
4+++ openssl-0.9.8k/config 2009-07-19 11:32:41.000000000 +0200
5@@ -162,8 +162,8 @@
6 echo "${MACHINE}-whatever-linux1"; exit 0
7 ;;
8
9- GNU*)
10- echo "hurd-x86"; exit 0;
11+ GNU:*|GNU/*:*)
12+ echo "${MACHINE}-gnuish"; exit 0;
13 ;;
14
15 LynxOS:*)
diff --git a/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/debian-targets.patch b/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/debian-targets.patch
new file mode 100644
index 0000000000..fed47341ea
--- /dev/null
+++ b/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/debian-targets.patch
@@ -0,0 +1,54 @@
1Index: openssl-0.9.8k/Configure
2===================================================================
3--- openssl-0.9.8k.orig/Configure 2009-12-09 16:09:41.000000000 +0000
4+++ openssl-0.9.8k/Configure 2009-12-09 16:09:55.000000000 +0000
5@@ -320,6 +320,49 @@
6 "osf1-alpha-cc", "cc:-std1 -tune host -O4 -readonly_strings::(unknown):::SIXTY_FOUR_BIT_LONG RC4_CHUNK:${no_asm}:dlfcn:alpha-osf1-shared:::.so",
7 "tru64-alpha-cc", "cc:-std1 -tune host -fast -readonly_strings::-pthread:::SIXTY_FOUR_BIT_LONG RC4_CHUNK:${no_asm}:dlfcn:alpha-osf1-shared::-msym:.so",
8
9+# Debian GNU/* (various architectures)
10+"debian-alpha","gcc:-DTERMIO -O3 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_RISC1 DES_UNROLL:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
11+"debian-alpha-ev4","gcc:-DTERMIO -O3 -Wa,--noexecstack -mcpu=ev4 -g -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_RISC1 DES_UNROLL:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
12+"debian-alpha-ev5","gcc:-DTERMIO -O3 -Wa,--noexecstack -mcpu=ev5 -g -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_RISC1 DES_UNROLL:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
13+"debian-arm","gcc:-DL_ENDIAN -DTERMIO -O2 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:BN_LLONG DES_RISC1::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
14+"debian-armeb","gcc:-DB_ENDIAN -DTERMIO -O2 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:BN_LLONG DES_RISC1::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
15+"debian-armel","gcc:-DL_ENDIAN -DTERMIO -O2 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:BN_LLONG DES_RISC1::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
16+#"debian-amd64","gcc:-DL_ENDIAN -DTERMIO -O3 -Wa,--noexecstack -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
17+"debian-amd64", "gcc:-m64 -DL_ENDIAN -DTERMIO -O3 -Wa,--noexecstack -g -Wall -DMD32_REG_T=int::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK RC4_CHAR BF_PTR2 DES_INT DES_UNROLL:${x86_64_asm_linux}:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
18+"debian-avr32", "gcc:-DB_ENDIAN -DTERMIO -O3 -Wa,--noexecstack -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG_BF_PTR::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
19+"debian-kfreebsd-amd64","gcc:-m64 -DL_ENDIAN -DTERMIOS -O3 -Wa,--noexecstack -Wall -DMD32_REG_T=int::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK BF_PTR2 DES_INT DES_UNROLL:${x86_64_asm}:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
20+#"debian-freebsd-alpha","gcc:-DTERMIOS -O -Wa,--noexecstack -fomit-frame-pointer::(unknown):::SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_PTR DES_RISC2::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
21+"debian-kfreebsd-i386","gcc:-DL_ENDIAN -DTERMIOS -O3 -Wa,--noexecstack -g -march=i486 -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
22+"debian-hppa","gcc:-DB_ENDIAN -DTERMIO -O2 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:BN_LLONG MD2_CHAR RC4_INDEX::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
23+"debian-hurd-i386","gcc:-DL_ENDIAN -DTERMIOS -O3 -Wa,--noexecstack -g -mtune=i486 -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
24+"debian-ia64","gcc:-DTERMIO -O3 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK RC4_CHAR:${ia64_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
25+#"debian-i386","gcc:-DL_ENDIAN -DTERMIO -O3 -Wa,--noexecstack -fomit-frame-pointer -m486 -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::dlfcn:linux-shared:-fPIC",
26+"debian-i386","gcc:-DL_ENDIAN -DTERMIO -O3 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
27+"debian-i386-i486","gcc:-DL_ENDIAN -DTERMIO -O3 -march=i486 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
28+"debian-i386-i586","gcc:-DL_ENDIAN -DTERMIO -O3 -march=i586 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
29+"debian-i386-i686/cmov","gcc:-DL_ENDIAN -DTERMIO -O3 -march=i686 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
30+"debian-m68k","gcc:-DB_ENDIAN -DTERMIO -O2 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:BN_LLONG MD2_CHAR RC4_INDEX::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
31+"debian-mips", "gcc:-DB_ENDIAN -DTERMIO -O3 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL DES_RISC2::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
32+"debian-mipsel", "gcc:-DL_ENDIAN -DTERMIO -O3 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL DES_RISC2::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
33+"debian-netbsd-i386", "gcc:-DL_ENDIAN -DTERMIOS -O3 -Wa,--noexecstack -g -m486 -Wall::(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
34+"debian-netbsd-m68k", "gcc:-DB_ENDIAN -DTERMIOS -O3 -Wa,--noexecstack -g -Wall::(unknown):::BN_LLONG MD2_CHAR RC4_INDEX DES_UNROLL::::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
35+"debian-netbsd-sparc", "gcc:-DB_ENDIAN -DTERMIOS -O3 -Wa,--noexecstack -g -mv8 -Wall::(unknown):::BN_LLONG MD2_CHAR RC4_INDEX DES_UNROLL::::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
36+"debian-openbsd-alpha","gcc:-DTERMIOS -O3 -Wa,--noexecstack -g::(unknown):::SIXTY_FOUR_BIT_LONG DES_INT DES_PTR DES_RISC2::::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
37+"debian-openbsd-i386", "gcc:-DL_ENDIAN -DTERMIOS -O3 -Wa,--noexecstack -g -m486::(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_out_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
38+"debian-openbsd-mips","gcc:-O2 -Wa,--noexecstack -g -DL_ENDIAN::(unknown)::BN_LLONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC2 DES_PTR BF_PTR:::::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
39+"debian-powerpc","gcc:-DB_ENDIAN -DTERMIO -O3 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:BN_LLONG DES_UNROLL DES_RISC2 DES_PTR MD2_CHAR RC4_INDEX::linux_ppc32.o::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
40+"debian-ppc64","gcc:-m64 -DB_ENDIAN -DTERMIO -O3 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_RISC1 DES_UNROLL::linux_ppc64.o::::::::::dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
41+"debian-s390","gcc:-DB_ENDIAN -DTERMIO -O3 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:BN_LLONG::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
42+"debian-sh3", "gcc:-DL_ENDIAN -DTERMIO -O3 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:BN_LLONG::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
43+"debian-sh4", "gcc:-DL_ENDIAN -DTERMIO -O3 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:BN_LLONG::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
44+"debian-sh3eb", "gcc:-DB_ENDIAN -DTERMIO -O3 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:BN_LLONG::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
45+"debian-sh4eb", "gcc:-DB_ENDIAN -DTERMIO -O3 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:BN_LLONG::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
46+"debian-m32r","gcc:-DB_ENDIAN -DTERMIO -O3 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:BN_LLONG::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
47+"debian-sparc","gcc:-DB_ENDIAN -DTERMIO -O3 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
48+"debian-sparc-v8","gcc:-DB_ENDIAN -DTERMIO -O3 -Wa,--noexecstack -mcpu=v8 -g -Wall -DBN_DIV2W::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR::sparcv8.o:des_enc-sparc.o fcrypt_b.o:::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
49+"debian-sparc-v9","gcc:-DB_ENDIAN -DTERMIO -O3 -mcpu=v9 -Wa,--noexecstack -Wa,-Av8plus -g -Wall -DULTRASPARC -DBN_DIV2W::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR::sparcv8plus.o:des_enc-sparc.o fcrypt_b.o:::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
50+"debian-sparc64","gcc:-m64 -DB_ENDIAN -DTERMIO -O3 -Wa,--noexecstack -g -Wall -DULTRASPARC -DBN_DIV2W::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL BF_PTR:::des_enc-sparc.o fcrypt_b.o:::::::::dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
51+
52 ####
53 #### Variety of LINUX:-)
54 ####
diff --git a/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/engines-path.patch b/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/engines-path.patch
new file mode 100644
index 0000000000..49400ff6e1
--- /dev/null
+++ b/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/engines-path.patch
@@ -0,0 +1,47 @@
1Index: openssl-0.9.8m/Makefile.org
2===================================================================
3--- openssl-0.9.8m.orig/Makefile.org 2010-01-27 16:06:36.000000000 +0000
4+++ openssl-0.9.8m/Makefile.org 2010-02-27 00:43:04.000000000 +0000
5@@ -620,7 +620,7 @@
6 install_sw:
7 @$(PERL) $(TOP)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/bin \
8 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR) \
9- $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines \
10+ $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/ssl/engines \
11 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig \
12 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl \
13 $(INSTALL_PREFIX)$(OPENSSLDIR)/misc \
14Index: openssl-0.9.8m/engines/Makefile
15===================================================================
16--- openssl-0.9.8m.orig/engines/Makefile 2009-11-10 01:53:02.000000000 +0000
17+++ openssl-0.9.8m/engines/Makefile 2010-02-27 00:45:03.000000000 +0000
18@@ -101,13 +101,13 @@
19 *DSO_DL*) sfx="sl";; \
20 *) sfx="bad";; \
21 esac; \
22- cp lib$$l.$$sfx $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/lib$$l.$$sfx.new; \
23+ cp lib$$l.$$sfx $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/ssl/engines/lib$$l.$$sfx.new; \
24 else \
25 sfx="so"; \
26 cp cyg$$l.dll $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/lib$$l.$$sfx.new; \
27 fi; \
28- chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/lib$$l.$$sfx.new; \
29- mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/lib$$l.$$sfx.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/lib$$l.$$sfx ); \
30+ chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/ssl/engines/lib$$l.$$sfx.new; \
31+ mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/ssl/engines/lib$$l.$$sfx.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/lib$$l.$$sfx ); \
32 done; \
33 fi
34
35Index: openssl-0.9.8m/Configure
36===================================================================
37--- openssl-0.9.8m.orig/Configure 2010-02-27 00:40:42.000000000 +0000
38+++ openssl-0.9.8m/Configure 2010-02-27 00:46:47.000000000 +0000
39@@ -1738,7 +1738,7 @@
40 # $foo is to become "$prefix/lib$multilib/engines";
41 # as Makefile.org and engines/Makefile are adapted for
42 # $multilib suffix.
43- my $foo = "$prefix/lib/engines";
44+ my $foo = "$prefix/lib/ssl/engines";
45 $foo =~ s/\\/\\\\/g;
46 print OUT "#define ENGINESDIR \"$foo\"\n";
47 }
diff --git a/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/kfreebsd-pipe.patch b/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/kfreebsd-pipe.patch
new file mode 100644
index 0000000000..da97186886
--- /dev/null
+++ b/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/kfreebsd-pipe.patch
@@ -0,0 +1,13 @@
1Index: openssl-0.9.8k/crypto/perlasm/x86_64-xlate.pl
2===================================================================
3--- openssl-0.9.8k.orig/crypto/perlasm/x86_64-xlate.pl 2008-02-13 21:01:48.000000000 +0100
4+++ openssl-0.9.8k/crypto/perlasm/x86_64-xlate.pl 2009-07-19 11:37:23.000000000 +0200
5@@ -62,7 +62,7 @@
6 my ($outdev,$outino,@junk)=stat($output);
7
8 open STDOUT,">$output" || die "can't open $output: $!"
9- if ($stddev!=$outdev || $stdino!=$outino);
10+# if ($stddev!=$outdev || $stdino!=$outino);
11 }
12
13 my $masmref=8 + 50727*2**-32; # 8.00.50727 shipped with VS2005
diff --git a/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/make-targets.patch b/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/make-targets.patch
new file mode 100644
index 0000000000..b1239728e7
--- /dev/null
+++ b/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/make-targets.patch
@@ -0,0 +1,13 @@
1Index: openssl-0.9.8k/Makefile.org
2===================================================================
3--- openssl-0.9.8k.orig/Makefile.org 2009-07-19 11:32:41.000000000 +0200
4+++ openssl-0.9.8k/Makefile.org 2009-07-19 11:37:31.000000000 +0200
5@@ -131,7 +131,7 @@
6
7 BASEADDR=
8
9-DIRS= crypto fips ssl engines apps test tools
10+DIRS= crypto fips ssl engines apps tools
11 SHLIBDIRS= crypto ssl fips
12
13 # dirs in crypto to build
diff --git a/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/man-dir.patch b/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/man-dir.patch
new file mode 100644
index 0000000000..29563ecf59
--- /dev/null
+++ b/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/man-dir.patch
@@ -0,0 +1,13 @@
1Index: openssl-0.9.8k/Makefile.org
2===================================================================
3--- openssl-0.9.8k.orig/Makefile.org 2009-07-19 11:32:41.000000000 +0200
4+++ openssl-0.9.8k/Makefile.org 2009-07-19 11:37:29.000000000 +0200
5@@ -152,7 +152,7 @@
6
7 MAKEFILE= Makefile
8
9-MANDIR=$(OPENSSLDIR)/man
10+MANDIR=/usr/share/man
11 MAN1=1
12 MAN3=3
13 MANSUFFIX=
diff --git a/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/man-section.patch b/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/man-section.patch
new file mode 100644
index 0000000000..fe20ab0444
--- /dev/null
+++ b/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/man-section.patch
@@ -0,0 +1,32 @@
1Index: openssl-0.9.8k/Makefile.org
2===================================================================
3--- openssl-0.9.8k.orig/Makefile.org 2009-07-19 11:34:06.000000000 +0200
4+++ openssl-0.9.8k/Makefile.org 2009-07-19 11:37:21.000000000 +0200
5@@ -155,7 +155,8 @@
6 MANDIR=/usr/share/man
7 MAN1=1
8 MAN3=3
9-MANSUFFIX=
10+MANSUFFIX=ssl
11+MANSECTION=SSL
12 SHELL=/bin/sh
13
14 TOP= .
15@@ -694,7 +695,7 @@
16 echo "installing man$$sec/$$fn.$${sec}$(MANSUFFIX)"; \
17 (cd `$(PERL) util/dirname.pl $$i`; \
18 sh -c "$$pod2man \
19- --section=$$sec --center=OpenSSL \
20+ --section=$${sec}$(MANSECTION) --center=OpenSSL \
21 --release=$(VERSION) `basename $$i`") \
22 > $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
23 $(PERL) util/extract-names.pl < $$i | \
24@@ -711,7 +712,7 @@
25 echo "installing man$$sec/$$fn.$${sec}$(MANSUFFIX)"; \
26 (cd `$(PERL) util/dirname.pl $$i`; \
27 sh -c "$$pod2man \
28- --section=$$sec --center=OpenSSL \
29+ --section=$${sec}$(MANSECTION) --center=OpenSSL \
30 --release=$(VERSION) `basename $$i`") \
31 > $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
32 $(PERL) util/extract-names.pl < $$i | \
diff --git a/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/no-rpath.patch b/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/no-rpath.patch
new file mode 100644
index 0000000000..3ebc9accca
--- /dev/null
+++ b/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/no-rpath.patch
@@ -0,0 +1,13 @@
1Index: openssl-0.9.8k/Makefile.shared
2===================================================================
3--- openssl-0.9.8k.orig/Makefile.shared 2008-09-17 17:56:40.000000000 +0200
4+++ openssl-0.9.8k/Makefile.shared 2009-07-19 11:37:25.000000000 +0200
5@@ -151,7 +151,7 @@
6 NOALLSYMSFLAGS='-Wl,--no-whole-archive'; \
7 SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared -Wl,-Bsymbolic -Wl,-soname=$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX"
8
9-DO_GNU_APP=LDFLAGS="$(CFLAGS) -Wl,-rpath,$(LIBRPATH)"
10+DO_GNU_APP=LDFLAGS="$(CFLAGS)"
11
12 #This is rather special. It's a special target with which one can link
13 #applications without bothering with any features that have anything to
diff --git a/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/no-symbolic.patch b/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/no-symbolic.patch
new file mode 100644
index 0000000000..2504fa791e
--- /dev/null
+++ b/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/no-symbolic.patch
@@ -0,0 +1,13 @@
1Index: openssl-0.9.8k/Makefile.shared
2===================================================================
3--- openssl-0.9.8k.orig/Makefile.shared 2009-07-19 11:35:02.000000000 +0200
4+++ openssl-0.9.8k/Makefile.shared 2009-07-19 11:35:48.000000000 +0200
5@@ -149,7 +149,7 @@
6 SHLIB_SUFFIX=; \
7 ALLSYMSFLAGS='-Wl,--whole-archive'; \
8 NOALLSYMSFLAGS='-Wl,--no-whole-archive'; \
9- SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared -Wl,-Bsymbolic -Wl,-soname=$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX"
10+ SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared -Wl,-soname=$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX"
11
12 DO_GNU_APP=LDFLAGS="$(CFLAGS)"
13
diff --git a/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/perl-path.diff b/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/perl-path.diff
new file mode 100644
index 0000000000..a72f938d82
--- /dev/null
+++ b/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/perl-path.diff
@@ -0,0 +1,760 @@
1From: Kurt Roeckx <kurt@roeckx.be>
2Subject: Change the perl path's to /usr/bin/perl
3
4This is the result of running:
5perl util/perlpath.pl /usr/bin
6
7The upstream sources have this set to various different paths.
8
9--- openssl-0.9.8m.orig/Configure
10+++ openssl-0.9.8m/Configure
11@@ -1,4 +1,4 @@
12-:
13+#!/usr/bin/perl
14 eval 'exec perl -S $0 ${1+"$@"}'
15 if $running_under_some_shell;
16 ##
17--- openssl-0.9.8m.orig/VMS/VMSify-conf.pl
18+++ openssl-0.9.8m/VMS/VMSify-conf.pl
19@@ -1,4 +1,4 @@
20-#! /usr/bin/perl
21+#!/usr/bin/perl
22
23 use strict;
24 use warnings;
25--- openssl-0.9.8m.orig/Netware/do_tests.pl
26+++ openssl-0.9.8m/Netware/do_tests.pl
27@@ -1,4 +1,4 @@
28-# perl script to run OpenSSL tests
29+#!/usr/bin/perl
30
31
32 my $base_path = "\\openssl";
33--- openssl-0.9.8m.orig/apps/progs.pl
34+++ openssl-0.9.8m/apps/progs.pl
35@@ -1,4 +1,4 @@
36-#!/usr/local/bin/perl
37+#!/usr/bin/perl
38
39 print "/* apps/progs.h */\n";
40 print "/* automatically generated by progs.pl for openssl.c */\n\n";
41--- openssl-0.9.8m.orig/os2/backwardify.pl
42+++ openssl-0.9.8m/os2/backwardify.pl
43@@ -1,4 +1,4 @@
44-#!/usr/bin/perl -w
45+#!/usr/bin/perl
46 use strict;
47
48 # Use as $0
49--- openssl-0.9.8m.orig/times/091/mips-rel.pl
50+++ openssl-0.9.8m/times/091/mips-rel.pl
51@@ -1,4 +1,4 @@
52-#!/usr/local/bin/perl
53+#!/usr/bin/perl
54
55 &doit(100,"Pentium 100 32",0.0195,0.1000,0.6406,4.6100); # pentium-100
56 &doit(200,"PPro 200 32",0.0070,0.0340,0.2087,1.4700); # pentium-100
57--- openssl-0.9.8m.orig/fips/mkfipsscr.pl
58+++ openssl-0.9.8m/fips/mkfipsscr.pl
59@@ -1,4 +1,4 @@
60-#!/usr/local/bin/perl -w
61+#!/usr/bin/perl
62 # Quick & dirty utility to generate a script for executing the
63 # FIPS 140-2 CMVP algorithm tests based on the pathnames of
64 # input algorithm test files actually present (the unqualified
65--- openssl-0.9.8m.orig/fips/fipsalgtest.pl
66+++ openssl-0.9.8m/fips/fipsalgtest.pl
67@@ -1,4 +1,4 @@
68-#!/usr/bin/perl -w
69+#!/usr/bin/perl
70 # Perl utility to run or verify FIPS 140-2 CMVP algorithm tests based on the
71 # pathnames of input algorithm test files actually present (the unqualified
72 # file names are consistent but the pathnames are not).
73--- openssl-0.9.8m.orig/ms/uplink.pl
74+++ openssl-0.9.8m/ms/uplink.pl
75@@ -1,4 +1,4 @@
76-#!/usr/bin/env perl
77+#!/usr/bin/perl
78 #
79 # For Microsoft CL this is implemented as inline assembler. So that
80 # even though this script can generate even Win32 code, we'll be
81--- openssl-0.9.8m.orig/ms/segrenam.pl
82+++ openssl-0.9.8m/ms/segrenam.pl
83@@ -1,4 +1,4 @@
84-#!/usr/bin/env perl
85+#!/usr/bin/perl
86
87 my $quiet = 1;
88
89--- openssl-0.9.8m.orig/ms/cmp.pl
90+++ openssl-0.9.8m/ms/cmp.pl
91@@ -1,4 +1,4 @@
92-#!/usr/local/bin/perl
93+#!/usr/bin/perl
94
95 ($#ARGV == 1) || die "usage: cmp.pl <file1> <file2>\n";
96
97--- openssl-0.9.8m.orig/test/cms-test.pl
98+++ openssl-0.9.8m/test/cms-test.pl
99@@ -1,4 +1,4 @@
100-# test/cms-test.pl
101+#!/usr/bin/perl
102 # Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
103 # project.
104 #
105--- openssl-0.9.8m.orig/test/cms-examples.pl
106+++ openssl-0.9.8m/test/cms-examples.pl
107@@ -1,4 +1,4 @@
108-# test/cms-examples.pl
109+#!/usr/bin/perl
110 # Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
111 # project.
112 #
113--- openssl-0.9.8m.orig/demos/b64.pl
114+++ openssl-0.9.8m/demos/b64.pl
115@@ -1,4 +1,4 @@
116-#!/usr/local/bin/perl
117+#!/usr/bin/perl
118
119 #
120 # Make PEM encoded data have lines of 64 bytes of data
121--- openssl-0.9.8m.orig/demos/tunala/configure.in
122+++ openssl-0.9.8m/demos/tunala/configure.in
123@@ -1,4 +1,4 @@
124-dnl Process this file with autoconf to produce a configure script.
125+#!/usr/bin/perl
126 AC_INIT(tunala.c)
127 AM_CONFIG_HEADER(config.h)
128 AM_INIT_AUTOMAKE(tunala, 0.0.1-dev)
129--- openssl-0.9.8m.orig/crypto/x86cpuid.pl
130+++ openssl-0.9.8m/crypto/x86cpuid.pl
131@@ -1,4 +1,4 @@
132-#!/usr/bin/env perl
133+#!/usr/bin/perl
134
135 push(@INC,"perlasm");
136 require "x86asm.pl";
137--- openssl-0.9.8m.orig/crypto/x86_64cpuid.pl
138+++ openssl-0.9.8m/crypto/x86_64cpuid.pl
139@@ -1,4 +1,4 @@
140-#!/usr/bin/env perl
141+#!/usr/bin/perl
142
143 $output=shift;
144 $masm=1 if ($output =~ /\.asm/);
145--- openssl-0.9.8m.orig/crypto/md5/asm/md5-586.pl
146+++ openssl-0.9.8m/crypto/md5/asm/md5-586.pl
147@@ -1,4 +1,4 @@
148-#!/usr/local/bin/perl
149+#!/usr/bin/perl
150
151 # Normal is the
152 # md5_block_x86(MD5_CTX *c, ULONG *X);
153--- openssl-0.9.8m.orig/crypto/md5/asm/md5-x86_64.pl
154+++ openssl-0.9.8m/crypto/md5/asm/md5-x86_64.pl
155@@ -1,4 +1,4 @@
156-#!/usr/bin/perl -w
157+#!/usr/bin/perl
158 #
159 # MD5 optimized for AMD64.
160 #
161--- openssl-0.9.8m.orig/crypto/sha/asm/sha1-ia64.pl
162+++ openssl-0.9.8m/crypto/sha/asm/sha1-ia64.pl
163@@ -1,4 +1,4 @@
164-#!/usr/bin/env perl
165+#!/usr/bin/perl
166 #
167 # ====================================================================
168 # Written by Andy Polyakov <appro@fy.chalmers.se> for the OpenSSL
169--- openssl-0.9.8m.orig/crypto/sha/asm/sha1-x86_64.pl
170+++ openssl-0.9.8m/crypto/sha/asm/sha1-x86_64.pl
171@@ -1,4 +1,4 @@
172-#!/usr/bin/env perl
173+#!/usr/bin/perl
174 #
175 # ====================================================================
176 # Written by Andy Polyakov <appro@fy.chalmers.se> for the OpenSSL
177--- openssl-0.9.8m.orig/crypto/sha/asm/sha512-sse2.pl
178+++ openssl-0.9.8m/crypto/sha/asm/sha512-sse2.pl
179@@ -1,4 +1,4 @@
180-#!/usr/bin/env perl
181+#!/usr/bin/perl
182 #
183 # ====================================================================
184 # Written by Andy Polyakov <appro@fy.chalmers.se> for the OpenSSL
185--- openssl-0.9.8m.orig/crypto/sha/asm/sha512-ia64.pl
186+++ openssl-0.9.8m/crypto/sha/asm/sha512-ia64.pl
187@@ -1,4 +1,4 @@
188-#!/usr/bin/env perl
189+#!/usr/bin/perl
190 #
191 # ====================================================================
192 # Written by Andy Polyakov <appro@fy.chalmers.se> for the OpenSSL
193--- openssl-0.9.8m.orig/crypto/sha/asm/sha512-x86_64.pl
194+++ openssl-0.9.8m/crypto/sha/asm/sha512-x86_64.pl
195@@ -1,4 +1,4 @@
196-#!/usr/bin/env perl
197+#!/usr/bin/perl
198 #
199 # ====================================================================
200 # Written by Andy Polyakov <appro@fy.chalmers.se> for the OpenSSL
201--- openssl-0.9.8m.orig/crypto/sha/asm/sha1-586.pl
202+++ openssl-0.9.8m/crypto/sha/asm/sha1-586.pl
203@@ -1,4 +1,4 @@
204-#!/usr/bin/env perl
205+#!/usr/bin/perl
206
207 # ====================================================================
208 # [Re]written by Andy Polyakov <appro@fy.chalmers.se> for the OpenSSL
209--- openssl-0.9.8m.orig/crypto/des/asm/des-586.pl
210+++ openssl-0.9.8m/crypto/des/asm/des-586.pl
211@@ -1,4 +1,4 @@
212-#!/usr/local/bin/perl
213+#!/usr/bin/perl
214 #
215 # The inner loop instruction sequence and the IP/FP modifications are from
216 # Svend Olaf Mikkelsen <svolaf@inet.uni-c.dk>
217--- openssl-0.9.8m.orig/crypto/des/asm/desboth.pl
218+++ openssl-0.9.8m/crypto/des/asm/desboth.pl
219@@ -1,4 +1,4 @@
220-#!/usr/local/bin/perl
221+#!/usr/bin/perl
222
223 $L="edi";
224 $R="esi";
225--- openssl-0.9.8m.orig/crypto/des/asm/des686.pl
226+++ openssl-0.9.8m/crypto/des/asm/des686.pl
227@@ -1,4 +1,4 @@
228-#!/usr/local/bin/perl
229+#!/usr/bin/perl
230
231 $prog="des686.pl";
232
233--- openssl-0.9.8m.orig/crypto/des/asm/crypt586.pl
234+++ openssl-0.9.8m/crypto/des/asm/crypt586.pl
235@@ -1,4 +1,4 @@
236-#!/usr/local/bin/perl
237+#!/usr/bin/perl
238 #
239 # The inner loop instruction sequence and the IP/FP modifications are from
240 # Svend Olaf Mikkelsen <svolaf@inet.uni-c.dk>
241--- openssl-0.9.8m.orig/crypto/lhash/num.pl
242+++ openssl-0.9.8m/crypto/lhash/num.pl
243@@ -1,4 +1,4 @@
244-#!/usr/local/bin/perl
245+#!/usr/bin/perl
246
247 #node 10 -> 4
248
249--- openssl-0.9.8m.orig/crypto/ripemd/asm/rmd-586.pl
250+++ openssl-0.9.8m/crypto/ripemd/asm/rmd-586.pl
251@@ -1,4 +1,4 @@
252-#!/usr/local/bin/perl
253+#!/usr/bin/perl
254
255 # Normal is the
256 # ripemd160_block_asm_data_order(RIPEMD160_CTX *c, ULONG *X,int blocks);
257--- openssl-0.9.8m.orig/crypto/rc4/asm/rc4-586.pl
258+++ openssl-0.9.8m/crypto/rc4/asm/rc4-586.pl
259@@ -1,4 +1,4 @@
260-#!/usr/local/bin/perl
261+#!/usr/bin/perl
262
263 # At some point it became apparent that the original SSLeay RC4
264 # assembler implementation performs suboptimaly on latest IA-32
265--- openssl-0.9.8m.orig/crypto/rc4/asm/rc4-x86_64.pl
266+++ openssl-0.9.8m/crypto/rc4/asm/rc4-x86_64.pl
267@@ -1,4 +1,4 @@
268-#!/usr/bin/env perl
269+#!/usr/bin/perl
270 #
271 # ====================================================================
272 # Written by Andy Polyakov <appro@fy.chalmers.se> for the OpenSSL
273--- openssl-0.9.8m.orig/crypto/cast/asm/cast-586.pl
274+++ openssl-0.9.8m/crypto/cast/asm/cast-586.pl
275@@ -1,4 +1,4 @@
276-#!/usr/local/bin/perl
277+#!/usr/bin/perl
278
279 # define for pentium pro friendly version
280 $ppro=1;
281--- openssl-0.9.8m.orig/crypto/rc5/asm/rc5-586.pl
282+++ openssl-0.9.8m/crypto/rc5/asm/rc5-586.pl
283@@ -1,4 +1,4 @@
284-#!/usr/local/bin/perl
285+#!/usr/bin/perl
286
287 push(@INC,"perlasm","../../perlasm");
288 require "x86asm.pl";
289--- openssl-0.9.8m.orig/crypto/perlasm/x86ms.pl
290+++ openssl-0.9.8m/crypto/perlasm/x86ms.pl
291@@ -1,4 +1,4 @@
292-#!/usr/local/bin/perl
293+#!/usr/bin/perl
294
295 package x86ms;
296
297--- openssl-0.9.8m.orig/crypto/perlasm/x86asm.pl
298+++ openssl-0.9.8m/crypto/perlasm/x86asm.pl
299@@ -1,4 +1,4 @@
300-#!/usr/local/bin/perl
301+#!/usr/bin/perl
302
303 # require 'x86asm.pl';
304 # &asm_init("cpp","des-586.pl");
305--- openssl-0.9.8m.orig/crypto/perlasm/x86nasm.pl
306+++ openssl-0.9.8m/crypto/perlasm/x86nasm.pl
307@@ -1,4 +1,4 @@
308-#!/usr/local/bin/perl
309+#!/usr/bin/perl
310
311 package x86nasm;
312
313--- openssl-0.9.8m.orig/crypto/perlasm/x86unix.pl
314+++ openssl-0.9.8m/crypto/perlasm/x86unix.pl
315@@ -1,4 +1,4 @@
316-#!/usr/local/bin/perl
317+#!/usr/bin/perl
318
319 package x86unix; # GAS actually...
320
321--- openssl-0.9.8m.orig/crypto/perlasm/cbc.pl
322+++ openssl-0.9.8m/crypto/perlasm/cbc.pl
323@@ -1,4 +1,4 @@
324-#!/usr/local/bin/perl
325+#!/usr/bin/perl
326
327 # void des_ncbc_encrypt(input, output, length, schedule, ivec, enc)
328 # des_cblock (*input);
329--- openssl-0.9.8m.orig/crypto/perlasm/x86_64-xlate.pl
330+++ openssl-0.9.8m/crypto/perlasm/x86_64-xlate.pl
331@@ -1,4 +1,4 @@
332-#!/usr/bin/env perl
333+#!/usr/bin/perl
334
335 # Ascetic x86_64 AT&T to MASM assembler translator by <appro>.
336 #
337--- openssl-0.9.8m.orig/crypto/bf/asm/bf-686.pl
338+++ openssl-0.9.8m/crypto/bf/asm/bf-686.pl
339@@ -1,4 +1,4 @@
340-#!/usr/local/bin/perl
341+#!/usr/bin/perl
342
343 push(@INC,"perlasm","../../perlasm");
344 require "x86asm.pl";
345--- openssl-0.9.8m.orig/crypto/bf/asm/bf-586.pl
346+++ openssl-0.9.8m/crypto/bf/asm/bf-586.pl
347@@ -1,4 +1,4 @@
348-#!/usr/local/bin/perl
349+#!/usr/bin/perl
350
351 push(@INC,"perlasm","../../perlasm");
352 require "x86asm.pl";
353--- openssl-0.9.8m.orig/crypto/objects/objects.pl
354+++ openssl-0.9.8m/crypto/objects/objects.pl
355@@ -1,4 +1,4 @@
356-#!/usr/local/bin/perl
357+#!/usr/bin/perl
358
359 open (NUMIN,"$ARGV[1]") || die "Can't open number file $ARGV[1]";
360 $max_nid=0;
361--- openssl-0.9.8m.orig/crypto/objects/obj_dat.pl
362+++ openssl-0.9.8m/crypto/objects/obj_dat.pl
363@@ -1,4 +1,4 @@
364-#!/usr/local/bin/perl
365+#!/usr/bin/perl
366
367 # fixes bug in floating point emulation on sparc64 when
368 # this script produces off-by-one output on sparc64
369--- openssl-0.9.8m.orig/crypto/conf/keysets.pl
370+++ openssl-0.9.8m/crypto/conf/keysets.pl
371@@ -1,4 +1,4 @@
372-#!/usr/local/bin/perl
373+#!/usr/bin/perl
374
375 $NUMBER=0x01;
376 $UPPER=0x02;
377--- openssl-0.9.8m.orig/crypto/bn/bn_prime.pl
378+++ openssl-0.9.8m/crypto/bn/bn_prime.pl
379@@ -1,4 +1,4 @@
380-#!/usr/local/bin/perl
381+#!/usr/bin/perl
382 # bn_prime.pl
383
384 $num=2048;
385--- openssl-0.9.8m.orig/crypto/bn/asm/x86.pl
386+++ openssl-0.9.8m/crypto/bn/asm/x86.pl
387@@ -1,4 +1,4 @@
388-#!/usr/local/bin/perl
389+#!/usr/bin/perl
390
391 push(@INC,"perlasm","../../perlasm");
392 require "x86asm.pl";
393--- openssl-0.9.8m.orig/crypto/bn/asm/ppc.pl
394+++ openssl-0.9.8m/crypto/bn/asm/ppc.pl
395@@ -1,4 +1,4 @@
396-#!/usr/bin/env perl
397+#!/usr/bin/perl
398 #
399 # Implemented as a Perl wrapper as we want to support several different
400 # architectures with single file. We pick up the target based on the
401--- openssl-0.9.8m.orig/crypto/bn/asm/co-586.pl
402+++ openssl-0.9.8m/crypto/bn/asm/co-586.pl
403@@ -1,4 +1,4 @@
404-#!/usr/local/bin/perl
405+#!/usr/bin/perl
406
407 push(@INC,"perlasm","../../perlasm");
408 require "x86asm.pl";
409--- openssl-0.9.8m.orig/crypto/bn/asm/bn-586.pl
410+++ openssl-0.9.8m/crypto/bn/asm/bn-586.pl
411@@ -1,4 +1,4 @@
412-#!/usr/local/bin/perl
413+#!/usr/bin/perl
414
415 push(@INC,"perlasm","../../perlasm");
416 require "x86asm.pl";
417--- openssl-0.9.8m.orig/crypto/bn/asm/mo-586.pl
418+++ openssl-0.9.8m/crypto/bn/asm/mo-586.pl
419@@ -1,4 +1,4 @@
420-#!/usr/bin/env perl
421+#!/usr/bin/perl
422
423 # This is crypto/bn/asm/x86-mont.pl (with asciz from crypto/perlasm/x86asm.pl)
424 # from OpenSSL 0.9.9-dev
425--- openssl-0.9.8m.orig/crypto/bn/asm/x86_64-mont.pl
426+++ openssl-0.9.8m/crypto/bn/asm/x86_64-mont.pl
427@@ -1,4 +1,4 @@
428-#!/usr/bin/env perl
429+#!/usr/bin/perl
430
431 # ====================================================================
432 # Written by Andy Polyakov <appro@fy.chalmers.se> for the OpenSSL
433--- openssl-0.9.8m.orig/crypto/bn/asm/x86/comba.pl
434+++ openssl-0.9.8m/crypto/bn/asm/x86/comba.pl
435@@ -1,4 +1,4 @@
436-#!/usr/local/bin/perl
437+#!/usr/bin/perl
438 # x86 assember
439
440 sub mul_add_c
441--- openssl-0.9.8m.orig/crypto/bn/asm/x86/add.pl
442+++ openssl-0.9.8m/crypto/bn/asm/x86/add.pl
443@@ -1,4 +1,4 @@
444-#!/usr/local/bin/perl
445+#!/usr/bin/perl
446 # x86 assember
447
448 sub bn_add_words
449--- openssl-0.9.8m.orig/crypto/bn/asm/x86/mul.pl
450+++ openssl-0.9.8m/crypto/bn/asm/x86/mul.pl
451@@ -1,4 +1,4 @@
452-#!/usr/local/bin/perl
453+#!/usr/bin/perl
454 # x86 assember
455
456 sub bn_mul_words
457--- openssl-0.9.8m.orig/crypto/bn/asm/x86/mul_add.pl
458+++ openssl-0.9.8m/crypto/bn/asm/x86/mul_add.pl
459@@ -1,4 +1,4 @@
460-#!/usr/local/bin/perl
461+#!/usr/bin/perl
462 # x86 assember
463
464 sub bn_mul_add_words
465--- openssl-0.9.8m.orig/crypto/bn/asm/x86/sqr.pl
466+++ openssl-0.9.8m/crypto/bn/asm/x86/sqr.pl
467@@ -1,4 +1,4 @@
468-#!/usr/local/bin/perl
469+#!/usr/bin/perl
470 # x86 assember
471
472 sub bn_sqr_words
473--- openssl-0.9.8m.orig/crypto/bn/asm/x86/sub.pl
474+++ openssl-0.9.8m/crypto/bn/asm/x86/sub.pl
475@@ -1,4 +1,4 @@
476-#!/usr/local/bin/perl
477+#!/usr/bin/perl
478 # x86 assember
479
480 sub bn_sub_words
481--- openssl-0.9.8m.orig/crypto/bn/asm/x86/div.pl
482+++ openssl-0.9.8m/crypto/bn/asm/x86/div.pl
483@@ -1,4 +1,4 @@
484-#!/usr/local/bin/perl
485+#!/usr/bin/perl
486 # x86 assember
487
488 sub bn_div_words
489--- openssl-0.9.8m.orig/crypto/aes/asm/aes-586.pl
490+++ openssl-0.9.8m/crypto/aes/asm/aes-586.pl
491@@ -1,4 +1,4 @@
492-#!/usr/bin/env perl
493+#!/usr/bin/perl
494 #
495 # ====================================================================
496 # Written by Andy Polyakov <appro@fy.chalmers.se> for the OpenSSL
497--- openssl-0.9.8m.orig/crypto/aes/asm/aes-x86_64.pl
498+++ openssl-0.9.8m/crypto/aes/asm/aes-x86_64.pl
499@@ -1,4 +1,4 @@
500-#!/usr/bin/env perl
501+#!/usr/bin/perl
502 #
503 # ====================================================================
504 # Written by Andy Polyakov <appro@fy.chalmers.se> for the OpenSSL
505--- openssl-0.9.8m.orig/crypto/asn1/charmap.pl
506+++ openssl-0.9.8m/crypto/asn1/charmap.pl
507@@ -1,4 +1,4 @@
508-#!/usr/local/bin/perl -w
509+#!/usr/bin/perl
510
511 use strict;
512
513--- openssl-0.9.8m.orig/util/mksdef.pl
514+++ openssl-0.9.8m/util/mksdef.pl
515@@ -1,4 +1,4 @@
516-
517+#!/usr/bin/perl
518 # Perl script to split libeay32.def into two distinct DEF files for use in
519 # fipdso mode. It works out symbols in each case by running "link" command and
520 # parsing the output to find the list of missing symbols then splitting
521--- openssl-0.9.8m.orig/util/dirname.pl
522+++ openssl-0.9.8m/util/dirname.pl
523@@ -1,4 +1,4 @@
524-#!/usr/local/bin/perl
525+#!/usr/bin/perl
526
527 if ($#ARGV < 0) {
528 die "dirname.pl: too few arguments\n";
529--- openssl-0.9.8m.orig/util/tab_num.pl
530+++ openssl-0.9.8m/util/tab_num.pl
531@@ -1,4 +1,4 @@
532-#!/usr/local/bin/perl
533+#!/usr/bin/perl
534
535 $num=1;
536 $width=40;
537--- openssl-0.9.8m.orig/util/sp-diff.pl
538+++ openssl-0.9.8m/util/sp-diff.pl
539@@ -1,4 +1,4 @@
540-#!/usr/local/bin/perl
541+#!/usr/bin/perl
542 #
543 # This file takes as input, the files that have been output from
544 # ssleay speed.
545--- openssl-0.9.8m.orig/util/mkerr.pl
546+++ openssl-0.9.8m/util/mkerr.pl
547@@ -1,4 +1,4 @@
548-#!/usr/local/bin/perl -w
549+#!/usr/bin/perl
550
551 my $config = "crypto/err/openssl.ec";
552 my $debug = 0;
553--- openssl-0.9.8m.orig/util/clean-depend.pl
554+++ openssl-0.9.8m/util/clean-depend.pl
555@@ -1,4 +1,4 @@
556-#!/usr/local/bin/perl -w
557+#!/usr/bin/perl
558 # Clean the dependency list in a makefile of standard includes...
559 # Written by Ben Laurie <ben@algroup.co.uk> 19 Jan 1999
560
561--- openssl-0.9.8m.orig/util/add_cr.pl
562+++ openssl-0.9.8m/util/add_cr.pl
563@@ -1,4 +1,4 @@
564-#!/usr/local/bin/perl
565+#!/usr/bin/perl
566 #
567 # This adds a copyright message to a souce code file.
568 # It also gets the file name correct.
569--- openssl-0.9.8m.orig/util/pod2man.pl
570+++ openssl-0.9.8m/util/pod2man.pl
571@@ -1,4 +1,4 @@
572-: #!/usr/bin/perl-5.005
573+#!/usr/bin/perl
574 eval 'exec /usr/bin/perl -S $0 ${1+"$@"}'
575 if $running_under_some_shell;
576
577--- openssl-0.9.8m.orig/util/mkstack.pl
578+++ openssl-0.9.8m/util/mkstack.pl
579@@ -1,4 +1,4 @@
580-#!/usr/local/bin/perl -w
581+#!/usr/bin/perl
582
583 # This is a utility that searches out "DECLARE_STACK_OF()"
584 # declarations in .h and .c files, and updates/creates/replaces
585--- openssl-0.9.8m.orig/util/selftest.pl
586+++ openssl-0.9.8m/util/selftest.pl
587@@ -1,4 +1,4 @@
588-#!/usr/local/bin/perl -w
589+#!/usr/bin/perl
590 #
591 # Run the test suite and generate a report
592 #
593--- openssl-0.9.8m.orig/util/ck_errf.pl
594+++ openssl-0.9.8m/util/ck_errf.pl
595@@ -1,4 +1,4 @@
596-#!/usr/local/bin/perl
597+#!/usr/bin/perl
598 #
599 # This is just a quick script to scan for cases where the 'error'
600 # function name in a XXXerr() macro is wrong.
601--- openssl-0.9.8m.orig/util/mklink.pl
602+++ openssl-0.9.8m/util/mklink.pl
603@@ -1,4 +1,4 @@
604-#!/usr/local/bin/perl
605+#!/usr/bin/perl
606
607 # mklink.pl
608
609--- openssl-0.9.8m.orig/util/src-dep.pl
610+++ openssl-0.9.8m/util/src-dep.pl
611@@ -1,4 +1,4 @@
612-#!/usr/local/bin/perl
613+#!/usr/bin/perl
614
615 # we make up an array of
616 # $file{function_name}=filename;
617--- openssl-0.9.8m.orig/util/deleof.pl
618+++ openssl-0.9.8m/util/deleof.pl
619@@ -1,4 +1,4 @@
620-#!/usr/local/bin/perl
621+#!/usr/bin/perl
622
623 while (<>)
624 {
625--- openssl-0.9.8m.orig/util/arx.pl
626+++ openssl-0.9.8m/util/arx.pl
627@@ -1,4 +1,4 @@
628-#!/bin/perl
629+#!/usr/bin/perl
630
631 # Simple perl script to wrap round "ar" program and exclude any
632 # object files in the environment variable EXCL_OBJ
633--- openssl-0.9.8m.orig/util/copy.pl
634+++ openssl-0.9.8m/util/copy.pl
635@@ -1,4 +1,4 @@
636-#!/usr/local/bin/perl
637+#!/usr/bin/perl
638
639 use Fcntl;
640
641--- openssl-0.9.8m.orig/util/mkdir-p.pl
642+++ openssl-0.9.8m/util/mkdir-p.pl
643@@ -1,4 +1,4 @@
644-#!/usr/local/bin/perl
645+#!/usr/bin/perl
646
647 # mkdir-p.pl
648
649--- openssl-0.9.8m.orig/util/mkdef.pl
650+++ openssl-0.9.8m/util/mkdef.pl
651@@ -1,4 +1,4 @@
652-#!/usr/local/bin/perl -w
653+#!/usr/bin/perl
654 #
655 # generate a .def file
656 #
657--- openssl-0.9.8m.orig/util/files.pl
658+++ openssl-0.9.8m/util/files.pl
659@@ -1,4 +1,4 @@
660-#!/usr/local/bin/perl
661+#!/usr/bin/perl
662 #
663 # used to generate the file MINFO for use by util/mk1mf.pl
664 # It is basically a list of all variables from the passed makefile
665--- openssl-0.9.8m.orig/util/mkfiles.pl
666+++ openssl-0.9.8m/util/mkfiles.pl
667@@ -1,4 +1,4 @@
668-#!/usr/local/bin/perl
669+#!/usr/bin/perl
670 #
671 # This is a hacked version of files.pl for systems that can't do a 'make files'.
672 # Do a perl util/mkminfo.pl >MINFO to build MINFO
673--- openssl-0.9.8m.orig/util/perlpath.pl
674+++ openssl-0.9.8m/util/perlpath.pl
675@@ -1,4 +1,4 @@
676-#!/usr/local/bin/perl
677+#!/usr/bin/perl
678 #
679 # modify the '#!/usr/local/bin/perl'
680 # line in all scripts that rely on perl.
681--- openssl-0.9.8m.orig/util/mk1mf.pl
682+++ openssl-0.9.8m/util/mk1mf.pl
683@@ -1,4 +1,4 @@
684-#!/usr/local/bin/perl
685+#!/usr/bin/perl
686 # A bit of an evil hack but it post processes the file ../MINFO which
687 # is generated by `make files` in the top directory.
688 # This script outputs one mega makefile that has no shell stuff or any
689--- openssl-0.9.8m.orig/util/err-ins.pl
690+++ openssl-0.9.8m/util/err-ins.pl
691@@ -1,4 +1,4 @@
692-#!/usr/local/bin/perl
693+#!/usr/bin/perl
694 #
695 # tack error codes onto the end of a file
696 #
697--- openssl-0.9.8m.orig/util/pl/Mingw32.pl
698+++ openssl-0.9.8m/util/pl/Mingw32.pl
699@@ -1,4 +1,4 @@
700-#!/usr/local/bin/perl
701+#!/usr/bin/perl
702 #
703 # Mingw32.pl -- Mingw
704 #
705--- openssl-0.9.8m.orig/util/pl/unix.pl
706+++ openssl-0.9.8m/util/pl/unix.pl
707@@ -1,4 +1,4 @@
708-#!/usr/local/bin/perl
709+#!/usr/bin/perl
710 #
711 # unix.pl - the standard unix makefile stuff.
712 #
713--- openssl-0.9.8m.orig/util/pl/netware.pl
714+++ openssl-0.9.8m/util/pl/netware.pl
715@@ -1,4 +1,4 @@
716-# Metrowerks Codewarrior or gcc / nlmconv for NetWare
717+#!/usr/bin/perl
718 #
719
720 $version_header = "crypto/opensslv.h";
721--- openssl-0.9.8m.orig/util/pl/VC-32.pl
722+++ openssl-0.9.8m/util/pl/VC-32.pl
723@@ -1,4 +1,4 @@
724-#!/usr/local/bin/perl
725+#!/usr/bin/perl
726 # VC-32.pl - unified script for Microsoft Visual C++, covering Win32,
727 # Win64 and WinCE [follow $FLAVOR variable to trace the differences].
728 #
729--- openssl-0.9.8m.orig/util/pl/OS2-EMX.pl
730+++ openssl-0.9.8m/util/pl/OS2-EMX.pl
731@@ -1,4 +1,4 @@
732-#!/usr/local/bin/perl
733+#!/usr/bin/perl
734 #
735 # OS2-EMX.pl - for EMX GCC on OS/2
736 #
737--- openssl-0.9.8m.orig/util/pl/ultrix.pl
738+++ openssl-0.9.8m/util/pl/ultrix.pl
739@@ -1,4 +1,4 @@
740-#!/usr/local/bin/perl
741+#!/usr/bin/perl
742 #
743 # linux.pl - the standard unix makefile stuff.
744 #
745--- openssl-0.9.8m.orig/util/pl/linux.pl
746+++ openssl-0.9.8m/util/pl/linux.pl
747@@ -1,4 +1,4 @@
748-#!/usr/local/bin/perl
749+#!/usr/bin/perl
750 #
751 # linux.pl - the standard unix makefile stuff.
752 #
753--- openssl-0.9.8m.orig/util/pl/BC-32.pl
754+++ openssl-0.9.8m/util/pl/BC-32.pl
755@@ -1,4 +1,4 @@
756-#!/usr/local/bin/perl
757+#!/usr/bin/perl
758 # Borland C++ builder 3 and 4 -- Janez Jere <jj@void.si>
759 #
760
diff --git a/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/pic.patch b/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/pic.patch
new file mode 100644
index 0000000000..b534afa66c
--- /dev/null
+++ b/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/pic.patch
@@ -0,0 +1,301 @@
1Index: openssl-0.9.8o/crypto/Makefile
2===================================================================
3--- openssl-0.9.8o.orig/crypto/Makefile 2008-09-17 17:10:55.000000000 +0000
4+++ openssl-0.9.8o/crypto/Makefile 2010-06-06 13:09:28.000000000 +0000
5@@ -57,7 +57,7 @@
6 echo " #define DATE \"`LC_ALL=C LC_TIME=C date`\""; \
7 echo '#endif' ) >buildinf.h
8
9-x86cpuid-elf.s: x86cpuid.pl perlasm/x86asm.pl
10+x86cpuid-elf.S: x86cpuid.pl perlasm/x86asm.pl
11 $(PERL) x86cpuid.pl elf $(CFLAGS) $(PROCESSOR) > $@
12 x86cpuid-cof.s: x86cpuid.pl perlasm/x86asm.pl
13 $(PERL) x86cpuid.pl coff $(CFLAGS) $(PROCESSOR) > $@
14@@ -70,7 +70,7 @@
15 uplink-cof.s: ../ms/uplink.pl
16 $(PERL) ../ms/uplink.pl coff > $@
17
18-x86_64cpuid.s: x86_64cpuid.pl
19+x86_64cpuid.S: x86_64cpuid.pl
20 $(PERL) x86_64cpuid.pl $@
21 ia64cpuid.s: ia64cpuid.S
22 $(CC) $(CFLAGS) -E ia64cpuid.S > $@
23Index: openssl-0.9.8o/crypto/x86_64cpuid.pl
24===================================================================
25--- openssl-0.9.8o.orig/crypto/x86_64cpuid.pl 2007-11-11 16:25:00.000000000 +0000
26+++ openssl-0.9.8o/crypto/x86_64cpuid.pl 2010-06-06 13:09:28.000000000 +0000
27@@ -95,7 +95,11 @@
28 .size OPENSSL_wipe_cpu,.-OPENSSL_wipe_cpu
29
30 .section .init
31+#ifdef OPENSSL_PIC
32+ call OPENSSL_cpuid_setup\@PLT
33+#else
34 call OPENSSL_cpuid_setup
35+#endif
36
37 ___
38
39Index: openssl-0.9.8o/crypto/md5/Makefile
40===================================================================
41--- openssl-0.9.8o.orig/crypto/md5/Makefile 2008-09-17 17:11:02.000000000 +0000
42+++ openssl-0.9.8o/crypto/md5/Makefile 2010-06-06 13:09:28.000000000 +0000
43@@ -52,7 +52,8 @@
44 mx86-out.s: asm/md5-586.pl ../perlasm/x86asm.pl
45 (cd asm; $(PERL) md5-586.pl a.out $(CFLAGS) > ../$@)
46
47-md5-x86_64.s: asm/md5-x86_64.pl; $(PERL) asm/md5-x86_64.pl $@
48+md5-x86_64.s: asm/md5-x86_64.pl
49+ $(PERL) asm/md5-x86_64.pl $@
50
51 files:
52 $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
53Index: openssl-0.9.8o/crypto/des/asm/desboth.pl
54===================================================================
55--- openssl-0.9.8o.orig/crypto/des/asm/desboth.pl 2001-10-24 21:20:56.000000000 +0000
56+++ openssl-0.9.8o/crypto/des/asm/desboth.pl 2010-06-06 13:09:28.000000000 +0000
57@@ -16,6 +16,11 @@
58
59 &push("edi");
60
61+ &call (&label("pic_point0"));
62+ &set_label("pic_point0");
63+ &blindpop("ebp");
64+ &add ("ebp", "\$_GLOBAL_OFFSET_TABLE_+[.-" . &label("pic_point0") . "]");
65+
66 &comment("");
67 &comment("Load the data words");
68 &mov($L,&DWP(0,"ebx","",0));
69@@ -47,15 +52,21 @@
70 &mov(&swtmp(2), (DWC(($enc)?"1":"0")));
71 &mov(&swtmp(1), "eax");
72 &mov(&swtmp(0), "ebx");
73- &call("DES_encrypt2");
74+ &exch("ebx", "ebp");
75+ &call("DES_encrypt2\@PLT");
76+ &exch("ebx", "ebp");
77 &mov(&swtmp(2), (DWC(($enc)?"0":"1")));
78 &mov(&swtmp(1), "edi");
79 &mov(&swtmp(0), "ebx");
80- &call("DES_encrypt2");
81+ &exch("ebx", "ebp");
82+ &call("DES_encrypt2\@PLT");
83+ &exch("ebx", "ebp");
84 &mov(&swtmp(2), (DWC(($enc)?"1":"0")));
85 &mov(&swtmp(1), "esi");
86 &mov(&swtmp(0), "ebx");
87- &call("DES_encrypt2");
88+ &exch("ebx", "ebp");
89+ &call("DES_encrypt2\@PLT");
90+ &exch("ebx", "ebp");
91
92 &stack_pop(3);
93 &mov($L,&DWP(0,"ebx","",0));
94Index: openssl-0.9.8o/crypto/rc4/Makefile
95===================================================================
96--- openssl-0.9.8o.orig/crypto/rc4/Makefile 2008-11-19 16:03:50.000000000 +0000
97+++ openssl-0.9.8o/crypto/rc4/Makefile 2010-06-06 13:09:28.000000000 +0000
98@@ -51,7 +51,7 @@
99 rx86-out.s: asm/rc4-586.pl ../perlasm/x86asm.pl
100 (cd asm; $(PERL) rc4-586.pl a.out $(CFLAGS) > ../$@)
101
102-rc4-x86_64.s: asm/rc4-x86_64.pl; $(PERL) asm/rc4-x86_64.pl $@
103+rc4-x86_64.S: asm/rc4-x86_64.pl; $(PERL) asm/rc4-x86_64.pl $@
104
105 rc4-ia64.s: asm/rc4-ia64.S
106 @case `awk '/^#define RC4_INT/{print$$NF}' $(TOP)/include/openssl/opensslconf.h` in \
107Index: openssl-0.9.8o/crypto/rc4/asm/rc4-x86_64.pl
108===================================================================
109--- openssl-0.9.8o.orig/crypto/rc4/asm/rc4-x86_64.pl 2008-09-16 10:47:27.000000000 +0000
110+++ openssl-0.9.8o/crypto/rc4/asm/rc4-x86_64.pl 2010-06-06 13:09:28.000000000 +0000
111@@ -270,7 +270,11 @@
112 xor %r10,%r10
113 xor %r11,%r11
114
115+#ifdef OPENSSL_PIC
116+ mov OPENSSL_ia32cap_P\@GOTPCREL(%rip),$idx#d
117+#else
118 mov OPENSSL_ia32cap_P(%rip),$idx#d
119+#endif
120 bt \$20,$idx#d
121 jnc .Lw1stloop
122 bt \$30,$idx#d
123@@ -338,7 +342,11 @@
124 RC4_options:
125 .picmeup %rax
126 lea .Lopts-.(%rax),%rax
127+#ifdef OPENSSL_PIC
128+ mov OPENSSL_ia32cap_P\@GOTPCREL(%rip),%edx
129+#else
130 mov OPENSSL_ia32cap_P(%rip),%edx
131+#endif
132 bt \$20,%edx
133 jnc .Ldone
134 add \$12,%rax
135Index: openssl-0.9.8o/crypto/perlasm/x86unix.pl
136===================================================================
137--- openssl-0.9.8o.orig/crypto/perlasm/x86unix.pl 2008-05-01 23:11:32.000000000 +0000
138+++ openssl-0.9.8o/crypto/perlasm/x86unix.pl 2010-06-06 13:09:28.000000000 +0000
139@@ -400,6 +400,29 @@
140 $stack=4;
141 }
142
143+sub main'function_begin_B_static
144+ {
145+ local($func,$extra)=@_;
146+
147+ &main'external_label($func);
148+ $func=$under.$func;
149+
150+ local($tmp)=<<"EOF";
151+.text
152+EOF
153+ push(@out,$tmp);
154+ if ($main'cpp)
155+ { push(@out,"TYPE($func,\@function)\n"); }
156+ elsif ($main'coff)
157+ { $tmp=push(@out,".def\t$func;\t.scl\t2;\t.type\t32;\t.endef\n"); }
158+ elsif ($main'aout and !$main'pic)
159+ { }
160+ else { push(@out,".type $func,\@function\n"); }
161+ push(@out,".align\t$align\n");
162+ push(@out,"$func:\n");
163+ $stack=4;
164+ }
165+
166 sub main'function_end
167 {
168 local($func)=@_;
169@@ -694,7 +717,17 @@
170 {
171 $tmp=<<___;
172 .section .init
173+#ifdef OPENSSL_PIC
174+ pushl %ebx
175+ call .pic_point0
176+.pic_point0:
177+ popl %ebx
178+ addl \$_GLOBAL_OFFSET_TABLE_+[.-.pic_point0],%ebx
179+ call $under$f\@PLT
180+ popl %ebx
181+#else
182 call $under$f
183+#endif
184 jmp .Linitalign
185 .align $align
186 .Linitalign:
187Index: openssl-0.9.8o/crypto/perlasm/cbc.pl
188===================================================================
189--- openssl-0.9.8o.orig/crypto/perlasm/cbc.pl 2005-05-09 21:48:00.000000000 +0000
190+++ openssl-0.9.8o/crypto/perlasm/cbc.pl 2010-06-06 13:09:28.000000000 +0000
191@@ -122,7 +122,11 @@
192 &mov(&DWP($data_off,"esp","",0), "eax"); # put in array for call
193 &mov(&DWP($data_off+4,"esp","",0), "ebx"); #
194
195- &call($enc_func);
196+ &call (&label("pic_point0"));
197+ &set_label("pic_point0");
198+ &blindpop("ebx");
199+ &add ("ebx", "\$_GLOBAL_OFFSET_TABLE_+[.-" . &label("pic_point0") . "]");
200+ &call("$enc_func\@PLT");
201
202 &mov("eax", &DWP($data_off,"esp","",0));
203 &mov("ebx", &DWP($data_off+4,"esp","",0));
204@@ -187,7 +191,11 @@
205 &mov(&DWP($data_off,"esp","",0), "eax"); # put in array for call
206 &mov(&DWP($data_off+4,"esp","",0), "ebx"); #
207
208- &call($enc_func);
209+ &call (&label("pic_point1"));
210+ &set_label("pic_point1");
211+ &blindpop("ebx");
212+ &add ("ebx", "\$_GLOBAL_OFFSET_TABLE_+[.-" . &label("pic_point1") . "]");
213+ &call("$enc_func\@PLT");
214
215 &mov("eax", &DWP($data_off,"esp","",0));
216 &mov("ebx", &DWP($data_off+4,"esp","",0));
217@@ -220,7 +228,11 @@
218 &mov(&DWP($data_off,"esp","",0), "eax"); # put back
219 &mov(&DWP($data_off+4,"esp","",0), "ebx"); #
220
221- &call($dec_func);
222+ &call (&label("pic_point2"));
223+ &set_label("pic_point2");
224+ &blindpop("ebx");
225+ &add ("ebx", "\$_GLOBAL_OFFSET_TABLE_+[.-" . &label("pic_point2") . "]");
226+ &call("$dec_func\@PLT");
227
228 &mov("eax", &DWP($data_off,"esp","",0)); # get return
229 &mov("ebx", &DWP($data_off+4,"esp","",0)); #
230@@ -263,7 +275,11 @@
231 &mov(&DWP($data_off,"esp","",0), "eax"); # put back
232 &mov(&DWP($data_off+4,"esp","",0), "ebx"); #
233
234- &call($dec_func);
235+ &call (&label("pic_point3"));
236+ &set_label("pic_point3");
237+ &blindpop("ebx");
238+ &add ("ebx", "\$_GLOBAL_OFFSET_TABLE_+[.-" . &label("pic_point3") . "]");
239+ &call("$dec_func\@PLT");
240
241 &mov("eax", &DWP($data_off,"esp","",0)); # get return
242 &mov("ebx", &DWP($data_off+4,"esp","",0)); #
243Index: openssl-0.9.8o/crypto/perlasm/x86_64-xlate.pl
244===================================================================
245--- openssl-0.9.8o.orig/crypto/perlasm/x86_64-xlate.pl 2010-06-06 13:09:00.000000000 +0000
246+++ openssl-0.9.8o/crypto/perlasm/x86_64-xlate.pl 2010-06-06 13:09:28.000000000 +0000
247@@ -435,7 +435,7 @@
248
249 chomp($line);
250
251- $line =~ s|[#!].*$||; # get rid of asm-style comments...
252+# $line =~ s|[#!].*$||; # get rid of asm-style comments...
253 $line =~ s|/\*.*\*/||; # ... and C-style comments...
254 $line =~ s|^\s+||; # ... and skip white spaces in beginning
255
256Index: openssl-0.9.8o/crypto/aes/asm/aes-586.pl
257===================================================================
258--- openssl-0.9.8o.orig/crypto/aes/asm/aes-586.pl 2008-12-17 14:14:51.000000000 +0000
259+++ openssl-0.9.8o/crypto/aes/asm/aes-586.pl 2010-06-06 13:09:28.000000000 +0000
260@@ -250,7 +250,7 @@
261 sub _data_word() { my $i; while(defined($i=shift)) { &data_word($i,$i); } }
262
263 &public_label("AES_Te");
264-&function_begin_B("_x86_AES_encrypt");
265+&function_begin_B_static("_x86_AES_encrypt");
266 if ($vertical_spin) {
267 # I need high parts of volatile registers to be accessible...
268 &exch ($s1="edi",$key="ebx");
269@@ -539,7 +539,7 @@
270 }
271
272 &public_label("AES_Td");
273-&function_begin_B("_x86_AES_decrypt");
274+&function_begin_B_static("_x86_AES_decrypt");
275 # note that caller is expected to allocate stack frame for me!
276 &mov (&DWP(12,"esp"),$key); # save key
277
278@@ -1461,15 +1461,22 @@
279 &public_label("AES_Td");
280 &public_label("AES_Te");
281 &function_begin_B("AES_set_decrypt_key");
282+ &push ("ebx");
283 &mov ("eax",&wparam(0));
284 &mov ("ecx",&wparam(1));
285 &mov ("edx",&wparam(2));
286 &sub ("esp",12);
287+
288+ &call (&label("pic_point0"));
289+ &set_label("pic_point0");
290+ &blindpop("ebx");
291+ &add ("ebx", "\$_GLOBAL_OFFSET_TABLE_+[.-" . &label("pic_point0") . "]");
292 &mov (&DWP(0,"esp"),"eax");
293 &mov (&DWP(4,"esp"),"ecx");
294 &mov (&DWP(8,"esp"),"edx");
295- &call ("AES_set_encrypt_key");
296+ &call ("AES_set_encrypt_key\@PLT");
297 &add ("esp",12);
298+ &pop ("ebx");
299 &cmp ("eax",0);
300 &je (&label("proceed"));
301 &ret ();
diff --git a/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/pkg-config.patch b/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/pkg-config.patch
new file mode 100644
index 0000000000..38923b08bf
--- /dev/null
+++ b/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/pkg-config.patch
@@ -0,0 +1,34 @@
1Index: openssl-0.9.8k/Makefile.org
2===================================================================
3--- openssl-0.9.8k.orig/Makefile.org 2009-07-19 11:34:56.000000000 +0200
4+++ openssl-0.9.8k/Makefile.org 2009-07-19 11:36:02.000000000 +0200
5@@ -444,7 +444,8 @@
6 echo 'Description: OpenSSL cryptography library'; \
7 echo 'Version: '$(VERSION); \
8 echo 'Requires: '; \
9- echo 'Libs: -L$${libdir} -lcrypto $(EX_LIBS)'; \
10+ echo 'Libs: -L$${libdir} -lcrypto'; \
11+ echo 'Libs.private: $(EX_LIBS)'; \
12 echo 'Cflags: -I$${includedir} $(KRB5_INCLUDES)' ) > libcrypto.pc
13
14 libssl.pc: Makefile
15@@ -457,7 +458,8 @@
16 echo 'Description: Secure Sockets Layer and cryptography libraries'; \
17 echo 'Version: '$(VERSION); \
18 echo 'Requires: '; \
19- echo 'Libs: -L$${libdir} -lssl -lcrypto $(EX_LIBS)'; \
20+ echo 'Libs: -L$${libdir} -lssl'; \
21+ echo 'Libs.private: -lcrypto $(EX_LIBS)'; \
22 echo 'Cflags: -I$${includedir} $(KRB5_INCLUDES)' ) > libssl.pc
23
24 openssl.pc: Makefile
25@@ -470,7 +472,8 @@
26 echo 'Description: Secure Sockets Layer and cryptography libraries and tools'; \
27 echo 'Version: '$(VERSION); \
28 echo 'Requires: '; \
29- echo 'Libs: -L$${libdir} -lssl -lcrypto $(EX_LIBS)'; \
30+ echo 'Libs: -L$${libdir} -lssl -lcrypto'; \
31+ echo 'Libs.private: $(EX_LIBS)'; \
32 echo 'Cflags: -I$${includedir} $(KRB5_INCLUDES)' ) > openssl.pc
33
34 Makefile: Makefile.org Configure config
diff --git a/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/rc4-amd64.patch b/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/rc4-amd64.patch
new file mode 100644
index 0000000000..6f0421a014
--- /dev/null
+++ b/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/rc4-amd64.patch
@@ -0,0 +1,14 @@
1Index: openssl-0.9.8k/Configure
2===================================================================
3--- openssl-0.9.8k.orig/Configure 2009-07-19 11:32:41.000000000 +0200
4+++ openssl-0.9.8k/Configure 2009-07-19 11:37:10.000000000 +0200
5@@ -128,6 +128,9 @@
6 my $x86_out_asm="x86cpuid-out.o:bn86-out.o co86-out.o MAYBE-MO86-out.o:dx86-out.o yx86-out.o:ax86-out.o:bx86-out.o:mx86-out.o:sx86-out.o s512sse2-out.o:cx86-out.o:rx86-out.o rc4_skey.o:rm86-out.o:r586-out.o";
7
8 my $x86_64_asm="x86_64cpuid.o:x86_64-gcc.o x86_64-mont.o::aes-x86_64.o::md5-x86_64.o:sha1-x86_64.o sha256-x86_64.o sha512-x86_64.o::rc4-x86_64.o::";
9+# rc4 asm is disabled on amd64 because we configured it with RC4_CHAR while
10+# the assembler only works with int
11+my $x86_64_asm_linux="x86_64cpuid.o:x86_64-gcc.o x86_64-mont.o::aes-x86_64.o::md5-x86_64.o:sha1-x86_64.o sha256-x86_64.o sha512-x86_64.o::::";
12 my $ia64_asm=":bn-ia64.o::aes_core.o aes_cbc.o aes-ia64.o:::sha1-ia64.o sha256-ia64.o sha512-ia64.o::rc4-ia64.o rc4_skey.o::";
13
14 my $no_asm="::::::::::";
diff --git a/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/rehash-crt.patch b/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/rehash-crt.patch
new file mode 100644
index 0000000000..a8ff28c6f3
--- /dev/null
+++ b/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/rehash-crt.patch
@@ -0,0 +1,33 @@
1Index: openssl-0.9.8k/tools/c_rehash.in
2===================================================================
3--- openssl-0.9.8k.orig/tools/c_rehash.in 2002-10-11 22:31:27.000000000 +0200
4+++ openssl-0.9.8k/tools/c_rehash.in 2009-07-19 11:36:26.000000000 +0200
5@@ -59,12 +59,15 @@
6 }
7 }
8 closedir DIR;
9- FILE: foreach $fname (grep {/\.pem$/} @flist) {
10+ FILE: foreach $fname (grep {/\.pem$|\.crt$/} @flist) {
11 # Check to see if certificates and/or CRLs present.
12 my ($cert, $crl) = check_file($fname);
13 if(!$cert && !$crl) {
14- print STDERR "WARNING: $fname does not contain a certificate or CRL: skipping\n";
15- next;
16+ ($cert, $crl) = check_file("$openssl x509 -in \"$fname\" -inform der -outform pem | ");
17+ if(!$cert && !$crl) {
18+ print STDERR "WARNING: $fname does not contain a certificate or CRL: skipping\n";
19+ next;
20+ }
21 }
22 link_hash_cert($fname) if($cert);
23 link_hash_crl($fname) if($crl);
24@@ -102,6 +105,9 @@
25 my $fname = $_[0];
26 $fname =~ s/'/'\\''/g;
27 my ($hash, $fprint) = `"$openssl" x509 -hash -fingerprint -noout -in '$fname'`;
28+ if(!$hash || !fprint) {
29+ ($hash, $fprint) = `"$openssl" x509 -hash -fingerprint -noout -in '$fname' -inform der`;
30+ }
31 chomp $hash;
32 chomp $fprint;
33 $fprint =~ s/^.*=//;
diff --git a/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/rehash_pod.patch b/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/rehash_pod.patch
new file mode 100644
index 0000000000..94792c48e5
--- /dev/null
+++ b/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/rehash_pod.patch
@@ -0,0 +1,60 @@
1Index: openssl-0.9.8k/doc/apps/c_rehash.pod
2===================================================================
3--- /dev/null 1970-01-01 00:00:00.000000000 +0000
4+++ openssl-0.9.8k/doc/apps/c_rehash.pod 2009-07-19 11:36:27.000000000 +0200
5@@ -0,0 +1,55 @@
6+
7+=pod
8+
9+=head1 NAME
10+
11+c_rehash - Create symbolic links to files named by the hash values
12+
13+=head1 SYNOPSIS
14+
15+B<c_rehash>
16+[directory] ...
17+
18+=head1 DESCRIPTION
19+
20+c_rehash scans directories and takes a hash value of each .pem and .crt file in the directory. It then creates symbolic links for each of the files named by the hash value. This is useful as many programs require directories to be set up like this in order to find the certificates they require.
21+
22+If any directories are named on the command line then these directories are processed in turn. If not then and the environment variable SSL_CERT_DIR is defined then that is consulted. This variable should be a colon (:) separated list of directories, all of which will be processed. If neither of these conditions are true then /usr/lib/ssl/certs is processed.
23+
24+For each directory that is to be processed he user must have write permissions on the directory, if they do not then nothing will be printed for that directory.
25+
26+Note that this program deletes all the symbolic links that look like ones that it creates before processing a directory. Beware that if you run the program on a directory that contains symbolic links for other purposes that are named in the same format as those created by this program they will be lost.
27+
28+The hashes for certificate files are of the form <hash>.<n> where n is an integer. If the hash value already exists then n will be incremented, unless the file is a duplicate. Duplicates are detected using the fingerprint of the certificate. A warning will be printed if a duplicate is detected. The hashes for CRL files are of the form <hash>.r<n> and have the same behavior.
29+
30+The program will also warn if there are files with extension .pem which are not certificate or CRL files.
31+
32+The program uses the openssl program to compute the hashes and fingerprints. It expects the executable to be named openssl and be on the PATH, or in the /usr/lib/ssl/bin directory. If the OPENSSL environment variable is defined then this is used instead as the executable that provides the hashes and fingerprints. When called as $OPENSSL x509 -hash -fingerprint -noout -in $file it must output the hash of $file on the first line followed by the fingerprint on the second line, optionally prefixed with some text and an equals sign (=).
33+
34+=head1 OPTIONS
35+
36+None
37+
38+=head1 ENVIRONMENT
39+
40+=over 4
41+
42+=item B<OPENSSL>
43+
44+The name (and path) of an executable to use to generate hashes and fingerprints (see above).
45+
46+=item B<SSL_CERT_DIR>
47+
48+Colon separated list of directories to operate on. Ignored if directories are listed on the command line.
49+
50+=head1 SEE ALSO
51+
52+L<openssl(1)|openssl(1)>, L<x509(1)|x509(1)>
53+
54+=back
55+
56+=head1 BUGS
57+
58+No known bugs
59+
60+=cut
diff --git a/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/series b/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/series
new file mode 100644
index 0000000000..b764c0414d
--- /dev/null
+++ b/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/series
@@ -0,0 +1,20 @@
1ca.patch
2config-hurd.patch
3debian-targets.patch
4engines-path.patch
5kfreebsd-pipe.patch
6make-targets.patch
7man-dir.patch
8man-section.patch
9no-rpath.patch
10no-symbolic.patch
11pic.patch
12pkg-config.patch
13valgrind.patch
14rc4-amd64.patch
15rehash-crt.patch
16rehash_pod.patch
17shared-lib-ext.patch
18stddef.patch
19version-script.patch
20perl-path.diff
diff --git a/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/shared-lib-ext.patch b/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/shared-lib-ext.patch
new file mode 100644
index 0000000000..d27e9b2398
--- /dev/null
+++ b/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/shared-lib-ext.patch
@@ -0,0 +1,14 @@
1Index: openssl-0.9.8k/Configure
2===================================================================
3--- openssl-0.9.8k.orig/Configure 2009-07-19 11:36:24.000000000 +0200
4+++ openssl-0.9.8k/Configure 2009-07-19 11:37:03.000000000 +0200
5@@ -1568,7 +1568,8 @@
6 elsif ($shared_extension ne "" && $shared_extension =~ /^\.s([ol])\.[^\.]*\.[^\.]*$/)
7 {
8 my $sotmp = $1;
9- s/^SHARED_LIBS_LINK_EXTS=.*/SHARED_LIBS_LINK_EXTS=.s$sotmp.\$(SHLIB_MAJOR) .s$sotmp/;
10+# s/^SHARED_LIBS_LINK_EXTS=.*/SHARED_LIBS_LINK_EXTS=.s$sotmp.\$(SHLIB_MAJOR) .s$sotmp/;
11+ s/^SHARED_LIBS_LINK_EXTS=.*/SHARED_LIBS_LINK_EXTS=.s$sotmp/;
12 }
13 elsif ($shared_extension ne "" && $shared_extension =~ /^\.[^\.]*\.[^\.]*\.dylib$/)
14 {
diff --git a/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/stddef.patch b/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/stddef.patch
new file mode 100644
index 0000000000..bb65b23319
--- /dev/null
+++ b/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/stddef.patch
@@ -0,0 +1,12 @@
1Index: openssl-0.9.8k/crypto/sha/sha.h
2===================================================================
3--- openssl-0.9.8k.orig/crypto/sha/sha.h 2008-09-16 12:47:28.000000000 +0200
4+++ openssl-0.9.8k/crypto/sha/sha.h 2009-07-19 11:36:28.000000000 +0200
5@@ -59,6 +59,7 @@
6 #ifndef HEADER_SHA_H
7 #define HEADER_SHA_H
8
9+#include <stddef.h>
10 #include <openssl/e_os2.h>
11 #include <stddef.h>
12
diff --git a/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/valgrind.patch b/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/valgrind.patch
new file mode 100644
index 0000000000..e9f86eabbf
--- /dev/null
+++ b/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/valgrind.patch
@@ -0,0 +1,15 @@
1Index: openssl-0.9.8k/crypto/rand/md_rand.c
2===================================================================
3--- openssl-0.9.8k.orig/crypto/rand/md_rand.c 2008-09-16 13:50:05.000000000 +0200
4+++ openssl-0.9.8k/crypto/rand/md_rand.c 2009-07-19 11:36:05.000000000 +0200
5@@ -477,8 +477,10 @@
6 MD_Update(&m,local_md,MD_DIGEST_LENGTH);
7 MD_Update(&m,(unsigned char *)&(md_c[0]),sizeof(md_c));
8 #ifndef PURIFY
9+#if 0 /* Don't add uninitialised data. */
10 MD_Update(&m,buf,j); /* purify complains */
11 #endif
12+#endif
13 k=(st_idx+MD_DIGEST_LENGTH/2)-st_num;
14 if (k > 0)
15 {
diff --git a/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/version-script.patch b/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/version-script.patch
new file mode 100644
index 0000000000..64d8fc7fa2
--- /dev/null
+++ b/meta/recipes-connectivity/openssl/openssl-0.9.8o/debian/version-script.patch
@@ -0,0 +1,33 @@
1Index: openssl-0.9.8m/Configure
2===================================================================
3--- openssl-0.9.8m.orig/Configure 2010-02-27 12:28:32.000000000 +0100
4+++ openssl-0.9.8m/Configure 2010-02-27 12:28:35.000000000 +0100
5@@ -1512,6 +1512,8 @@
6 }
7 }
8
9+$shared_ldflag .= " -Wl,--version-script=openssl.ld";
10+
11 open(IN,'<Makefile.org') || die "unable to read Makefile.org:$!\n";
12 unlink("$Makefile.new") || die "unable to remove old $Makefile.new:$!\n" if -e "$Makefile.new";
13 open(OUT,">$Makefile.new") || die "unable to create $Makefile.new:$!\n";
14Index: openssl-0.9.8m/openssl.ld
15===================================================================
16--- /dev/null 1970-01-01 00:00:00.000000000 +0000
17+++ openssl-0.9.8m/openssl.ld 2010-02-27 12:28:35.000000000 +0100
18@@ -0,0 +1,5 @@
19+OPENSSL_0.9.8 {
20+ global:
21+ *;
22+};
23+
24Index: openssl-0.9.8m/engines/openssl.ld
25===================================================================
26--- /dev/null 1970-01-01 00:00:00.000000000 +0000
27+++ openssl-0.9.8m/engines/openssl.ld 2010-02-27 12:28:35.000000000 +0100
28@@ -0,0 +1,5 @@
29+OPENSSL_0.9.8 {
30+ global:
31+ *;
32+};
33+
diff --git a/meta/recipes-connectivity/openssl/openssl-0.9.8o/shared-libs.patch b/meta/recipes-connectivity/openssl/openssl-0.9.8o/shared-libs.patch
new file mode 100644
index 0000000000..10d9146dc9
--- /dev/null
+++ b/meta/recipes-connectivity/openssl/openssl-0.9.8o/shared-libs.patch
@@ -0,0 +1,48 @@
1diff --git a/Makefile.org b/Makefile.org
2index e87d623..25ff367 100644
3--- a/Makefile.org
4+++ b/Makefile.org
5@@ -355,7 +355,7 @@ libcrypto$(SHLIB_EXT): libcrypto.a $(SHARED_FIPS)
6 @if [ "$(SHLIB_TARGET)" != "" ]; then \
7 if [ "$(FIPSCANLIB)" = "libfips" ]; then \
8 $(ARD) libcrypto.a fipscanister.o ; \
9- $(MAKE) SHLIBDIRS='crypto' SHLIBDEPS='-lfips' build-shared; \
10+ $(MAKE) -e SHLIBDIRS='crypto' SHLIBDEPS='-lfips' build-shared; \
11 $(AR) libcrypto.a fips/fipscanister.o ; \
12 else \
13 if [ "$(FIPSCANLIB)" = "libcrypto" ]; then \
14@@ -373,7 +373,7 @@ libssl$(SHLIB_EXT): libcrypto$(SHLIB_EXT) libssl.a
15 @if [ "$(SHLIB_TARGET)" != "" ]; then \
16 shlibdeps=-lcrypto; \
17 [ "$(FIPSCANLIB)" = "libfips" ] && shlibdeps="$$shlibdeps -lfips"; \
18- $(MAKE) SHLIBDIRS=ssl SHLIBDEPS="$$shlibdeps" build-shared; \
19+ $(MAKE) -e SHLIBDIRS=ssl SHLIBDEPS="$$shlibdeps" build-shared; \
20 else \
21 echo "There's no support for shared libraries on this platform" >&2 ; \
22 exit 1; \
23diff --git a/crypto/Makefile b/crypto/Makefile
24index 6557f2b..a69bf7c 100644
25--- a/crypto/Makefile
26+++ b/crypto/Makefile
27@@ -103,7 +103,7 @@ $(LIB): $(LIBOBJ)
28
29 shared: buildinf.h lib subdirs
30 if [ -n "$(SHARED_LIBS)" ]; then \
31- (cd ..; $(MAKE) $(SHARED_LIB)); \
32+ (cd ..; $(MAKE) -e $(SHARED_LIB)); \
33 fi
34
35 libs:
36diff --git a/ssl/Makefile b/ssl/Makefile
37index 5ac3507..77ea2bd 100644
38--- a/ssl/Makefile
39+++ b/ssl/Makefile
40@@ -62,7 +62,7 @@ lib: $(LIBOBJ)
41
42 shared: lib
43 if [ -n "$(SHARED_LIBS)" ]; then \
44- (cd ..; $(MAKE) $(SHARED_LIB)); \
45+ (cd ..; $(MAKE) -e $(SHARED_LIB)); \
46 fi
47
48 files:
diff --git a/meta/recipes-connectivity/openssl/openssl.inc b/meta/recipes-connectivity/openssl/openssl.inc
new file mode 100644
index 0000000000..2482585c64
--- /dev/null
+++ b/meta/recipes-connectivity/openssl/openssl.inc
@@ -0,0 +1,100 @@
1DESCRIPTION = "Secure Socket Layer (SSL) binary and related cryptographic tools."
2HOMEPAGE = "http://www.openssl.org/"
3BUGTRACKER = "http://www.openssl.org/news/vulnerabilities.html"
4SECTION = "libs/network"
5
6# "openssl | SSLeay" dual license
7LICENSE = "openssl"
8LIC_FILES_CHKSUM = "file://LICENSE;md5=83d26c69f6f0172ee7f795790424b453"
9
10DEPENDS = "perl-native"
11
12SRC_URI = "http://www.openssl.org/source/openssl-${PV}.tar.gz"
13S = "${WORKDIR}/openssl-${PV}"
14
15AR_append = " r"
16CFLAG = "${@base_conditional('SITEINFO_ENDIANESS', 'le', '-DL_ENDIAN', '-DB_ENDIAN', d)} \
17 -DTERMIO ${FULL_OPTIMIZATION} -Wall"
18
19# -02 does not work on mipsel: ssh hangs when it tries to read /dev/urandom
20CFLAG_mtx-1 := "${@'${CFLAG}'.replace('-O2', '')}"
21CFLAG_mtx-2 := "${@'${CFLAG}'.replace('-O2', '')}"
22
23export DIRS = "crypto ssl apps"
24export EX_LIBS = "-lgcc -ldl"
25export AS = "${CC} -c"
26
27PARALLEL_MAKE = ""
28
29inherit pkgconfig siteinfo
30
31PACKAGES =+ "libcrypto libssl"
32FILES_libcrypto = "${libdir}/libcrypto.so.*"
33FILES_libssl = "${libdir}/libssl.so.*"
34FILES_${PN} =+ " ${libdir}/ssl/*"
35
36do_configure () {
37 cd util
38 perl perlpath.pl ${bindir}
39 cd ..
40 ln -sf apps/openssl.pod crypto/crypto.pod ssl/ssl.pod doc/
41
42 os=${HOST_OS}
43 if [ "x$os" = "xlinux-uclibc" ]; then
44 os=linux
45 fi
46 target="$os-${HOST_ARCH}"
47 case $target in
48 linux-arm)
49 target=linux-elf-arm
50 ;;
51 linux-armeb)
52 target=linux-elf-armeb
53 ;;
54 linux-sh3)
55 target=debian-sh3
56 ;;
57 linux-sh4)
58 target=debian-sh4
59 ;;
60 linux-i486)
61 target=debian-i386-i486
62 ;;
63 linux-i586)
64 target=debian-i386-i586
65 ;;
66 linux-i686)
67 target=debian-i386-i686/cmov
68 ;;
69 linux-mips)
70 target=debian-mips
71 ;;
72 linux-mipsel)
73 target=debian-mipsel
74 ;;
75 linux-powerpc)
76 target=linux-ppc
77 ;;
78 linux-supersparc)
79 target=linux-sparcv8
80 ;;
81 linux-sparc)
82 target=linux-sparcv8
83 ;;
84 esac
85 # inject machine-specific flags
86 sed -i -e "s|^\(\"$target\",\s*\"[^:]\+\):\([^:]\+\)|\1:${CFLAG}|g" Configure
87 perl ./Configure shared --prefix=${prefix} --openssldir=${libdir}/ssl $target
88}
89
90do_compile () {
91 oe_runmake
92}
93
94do_install () {
95 install -m 0755 -d ${D}${libdir}/pkgconfig
96 oe_runmake INSTALL_PREFIX="${D}" install
97 chmod 644 ${D}${libdir}/pkgconfig/openssl.pc
98 oe_libinstall -so libcrypto ${D}${libdir}
99 oe_libinstall -so libssl ${D}${libdir}
100}
diff --git a/meta/recipes-connectivity/openssl/openssl_0.9.8o.bb b/meta/recipes-connectivity/openssl/openssl_0.9.8o.bb
new file mode 100644
index 0000000000..31c5568ba1
--- /dev/null
+++ b/meta/recipes-connectivity/openssl/openssl_0.9.8o.bb
@@ -0,0 +1,28 @@
1require openssl.inc
2
3PR = "r0"
4SRC_URI += "file://debian/ca.patch \
5 file://debian/config-hurd.patch;apply=no \
6 file://debian/debian-targets.patch \
7 file://debian/engines-path.patch \
8 file://debian/kfreebsd-pipe.patch;apply=no \
9 file://debian/make-targets.patch \
10 file://debian/man-dir.patch \
11 file://debian/man-section.patch \
12 file://debian/no-rpath.patch \
13 file://debian/no-symbolic.patch \
14 file://debian/pic.patch \
15 file://debian/pkg-config.patch \
16 file://debian/valgrind.patch \
17 file://debian/rc4-amd64.patch \
18 file://debian/rehash-crt.patch \
19 file://debian/rehash_pod.patch \
20 file://debian/shared-lib-ext.patch \
21 file://debian/stddef.patch \
22 file://debian/version-script.patch \
23 file://debian/perl-path.diff"
24
25SRC_URI += "file://configure-targets.patch \
26 file://shared-libs.patch"
27
28BBCLASSEXTEND = "native"
diff --git a/meta/recipes-connectivity/openswan/openswan-2.4.7/installflags.patch b/meta/recipes-connectivity/openswan/openswan-2.4.7/installflags.patch
new file mode 100644
index 0000000000..e6da2eaa5f
--- /dev/null
+++ b/meta/recipes-connectivity/openswan/openswan-2.4.7/installflags.patch
@@ -0,0 +1,13 @@
1Index: openswan-2.4.7/Makefile.inc
2===================================================================
3--- openswan-2.4.7.orig/Makefile.inc 2006-12-25 18:05:40.608503250 +0100
4+++ openswan-2.4.7/Makefile.inc 2006-12-25 18:06:39.028154250 +0100
5@@ -158,7 +158,7 @@
6 # how backup names are composed.
7 # Note that the install procedures will never overwrite an existing config
8 # file, which is why -b is not specified for them.
9-INSTBINFLAGS=-b --suffix=.old
10+INSTBINFLAGS=
11 INSTSUIDFLAGS=--mode=u+rxs,g+rx,o+rx --group=root -b --suffix=.old
12 INSTMANFLAGS=
13 INSTCONFFLAGS=
diff --git a/meta/recipes-connectivity/openswan/openswan-2.4.7/ld-library-path-breakage.patch b/meta/recipes-connectivity/openswan/openswan-2.4.7/ld-library-path-breakage.patch
new file mode 100644
index 0000000000..e3cc8762cc
--- /dev/null
+++ b/meta/recipes-connectivity/openswan/openswan-2.4.7/ld-library-path-breakage.patch
@@ -0,0 +1,26 @@
1--- openswan-2.2.0.orig/programs/Makefile.program 2004-06-03 03:06:27.000000000 +0200
2+++ openswan-2.2.0/programs/Makefile.program 2005-03-05 13:50:19.000000000 +0100
3@@ -30,10 +30,6 @@
4
5 CFLAGS+= ${WERROR}
6
7-ifneq ($(LD_LIBRARY_PATH),)
8-LDFLAGS=-L$(LD_LIBRARY_PATH)
9-endif
10-
11 MANDIR8=$(MANTREE)/man8
12 MANDIR5=$(MANTREE)/man5
13
14--- openswan-2.2.0.orig/programs/pluto/Makefile 2005-01-03 20:40:45.000000000 +0100
15+++ openswan-2.2.0/programs/pluto/Makefile 2005-03-05 13:51:21.000000000 +0100
16@@ -234,10 +234,6 @@
17 LIBSPLUTO+=${CURL_LIBS}
18 LIBSPLUTO+= -lgmp -lresolv # -lefence
19
20-ifneq ($(LD_LIBRARY_PATH),)
21-LDFLAGS=-L$(LD_LIBRARY_PATH)
22-endif
23-
24 LIBSADNS = $(OPENSWANLIB)
25 LIBSADNS += -lresolv # -lefence
26
diff --git a/meta/recipes-connectivity/openswan/openswan-2.4.7/openswan-2.4.7-gentoo.patch b/meta/recipes-connectivity/openswan/openswan-2.4.7/openswan-2.4.7-gentoo.patch
new file mode 100644
index 0000000000..b3863a584b
--- /dev/null
+++ b/meta/recipes-connectivity/openswan/openswan-2.4.7/openswan-2.4.7-gentoo.patch
@@ -0,0 +1,377 @@
1diff -Nru openswan-2.4.7.orig/doc/Makefile openswan-2.4.7/doc/Makefile
2--- openswan-2.4.7.orig/doc/Makefile 2005-11-08 23:32:45.000000000 +0200
3+++ openswan-2.4.7/doc/Makefile 2006-12-06 22:46:54.732830840 +0200
4@@ -1,6 +1,6 @@
5 # Makefile to generate various formats from HTML source
6 #
7-# Assumes the htmldoc utility is available.
8+# No longer cares if the htmldoc utility is available.
9 # This can be downloaded from www.easysw.com
10 #
11 # Also needs lynx(1) for HTML-to-text conversion
12diff -Nru openswan-2.4.7.orig/lib/libcrypto/libdes/asm/crypt586.pl openswan-2.4.7/lib/libcrypto/libdes/asm/crypt586.pl
13--- openswan-2.4.7.orig/lib/libcrypto/libdes/asm/crypt586.pl 2004-07-16 03:24:45.000000000 +0300
14+++ openswan-2.4.7/lib/libcrypto/libdes/asm/crypt586.pl 2006-12-06 22:46:54.732830840 +0200
15@@ -1,4 +1,4 @@
16-#!/usr/local/bin/perl
17+#!/usr/bin/perl
18 #
19 # The inner loop instruction sequence and the IP/FP modifications are from
20 # Svend Olaf Mikkelsen <svolaf@inet.uni-c.dk>
21diff -Nru openswan-2.4.7.orig/lib/libcrypto/libdes/asm/perlasm/cbc.pl openswan-2.4.7/lib/libcrypto/libdes/asm/perlasm/cbc.pl
22--- openswan-2.4.7.orig/lib/libcrypto/libdes/asm/perlasm/cbc.pl 2004-07-10 11:07:06.000000000 +0300
23+++ openswan-2.4.7/lib/libcrypto/libdes/asm/perlasm/cbc.pl 2006-12-06 22:46:54.736831090 +0200
24@@ -1,4 +1,4 @@
25-#!/usr/local/bin/perl
26+#!/usr/bin/perl
27
28 # void des_ncbc_encrypt(input, output, length, schedule, ivec, enc)
29 # des_cblock (*input);
30diff -Nru openswan-2.4.7.orig/lib/libcrypto/libdes/asm/perlasm/x86asm.pl openswan-2.4.7/lib/libcrypto/libdes/asm/perlasm/x86asm.pl
31--- openswan-2.4.7.orig/lib/libcrypto/libdes/asm/perlasm/x86asm.pl 2004-07-10 11:07:06.000000000 +0300
32+++ openswan-2.4.7/lib/libcrypto/libdes/asm/perlasm/x86asm.pl 2006-12-06 22:46:54.736831090 +0200
33@@ -1,4 +1,4 @@
34-#!/usr/local/bin/perl
35+#!/usr/bin/perl
36
37 # require 'x86asm.pl';
38 # &asm_init("cpp","des-586.pl");
39diff -Nru openswan-2.4.7.orig/lib/libcrypto/libdes/asm/perlasm/x86ms.pl openswan-2.4.7/lib/libcrypto/libdes/asm/perlasm/x86ms.pl
40--- openswan-2.4.7.orig/lib/libcrypto/libdes/asm/perlasm/x86ms.pl 2004-07-10 11:07:07.000000000 +0300
41+++ openswan-2.4.7/lib/libcrypto/libdes/asm/perlasm/x86ms.pl 2006-12-06 22:46:54.736831090 +0200
42@@ -1,4 +1,4 @@
43-#!/usr/local/bin/perl
44+#!/usr/bin/perl
45
46 package x86ms;
47
48diff -Nru openswan-2.4.7.orig/lib/libcrypto/libdes/asm/perlasm/x86unix.pl openswan-2.4.7/lib/libcrypto/libdes/asm/perlasm/x86unix.pl
49--- openswan-2.4.7.orig/lib/libcrypto/libdes/asm/perlasm/x86unix.pl 2004-07-10 11:07:07.000000000 +0300
50+++ openswan-2.4.7/lib/libcrypto/libdes/asm/perlasm/x86unix.pl 2006-12-06 22:46:54.736831090 +0200
51@@ -1,4 +1,4 @@
52-#!/usr/local/bin/perl
53+#!/usr/bin/perl
54
55 package x86unix;
56
57diff -Nru openswan-2.4.7.orig/lib/liblwres/Makefile openswan-2.4.7/lib/liblwres/Makefile
58--- openswan-2.4.7.orig/lib/liblwres/Makefile 2004-12-18 20:13:34.000000000 +0200
59+++ openswan-2.4.7/lib/liblwres/Makefile 2006-12-06 22:46:54.736831090 +0200
60@@ -20,7 +20,7 @@
61 CDEFINES = -g
62 CWARNINGS = -Werror
63
64-CFLAGS=${CINCLUDES} ${CDEFINES} ${CWARNINGS}
65+CFLAGS=${CINCLUDES} ${CDEFINES} ${CWARNINGS} $(USERCOMPILE)
66
67 VERSION="@(\#) openswan-hacking-9.3-for-osw2"
68 LIBINTERFACE=2
69diff -Nru openswan-2.4.7.orig/linux/net/ipsec/des/asm/des-586.pl openswan-2.4.7/linux/net/ipsec/des/asm/des-586.pl
70--- openswan-2.4.7.orig/linux/net/ipsec/des/asm/des-586.pl 2004-07-10 11:06:50.000000000 +0300
71+++ openswan-2.4.7/linux/net/ipsec/des/asm/des-586.pl 2006-12-06 22:46:54.736831090 +0200
72@@ -1,4 +1,4 @@
73-#!/usr/local/bin/perl
74+#!/usr/bin/perl
75 #
76 # The inner loop instruction sequence and the IP/FP modifications are from
77 # Svend Olaf Mikkelsen <svolaf@inet.uni-c.dk>
78diff -Nru openswan-2.4.7.orig/linux/net/ipsec/des/asm/des686.pl openswan-2.4.7/linux/net/ipsec/des/asm/des686.pl
79--- openswan-2.4.7.orig/linux/net/ipsec/des/asm/des686.pl 2004-07-10 11:06:50.000000000 +0300
80+++ openswan-2.4.7/linux/net/ipsec/des/asm/des686.pl 2006-12-06 22:46:54.740831340 +0200
81@@ -1,4 +1,4 @@
82-#!/usr/local/bin/perl
83+#!/usr/bin/perl
84
85 $prog="des686.pl";
86
87diff -Nru openswan-2.4.7.orig/linux/net/ipsec/des/asm/desboth.pl openswan-2.4.7/linux/net/ipsec/des/asm/desboth.pl
88--- openswan-2.4.7.orig/linux/net/ipsec/des/asm/desboth.pl 2004-07-10 11:06:50.000000000 +0300
89+++ openswan-2.4.7/linux/net/ipsec/des/asm/desboth.pl 2006-12-06 22:46:54.740831340 +0200
90@@ -1,4 +1,4 @@
91-#!/usr/local/bin/perl
92+#!/usr/bin/perl
93
94 $L="edi";
95 $R="esi";
96diff -Nru openswan-2.4.7.orig/Makefile.inc openswan-2.4.7/Makefile.inc
97--- openswan-2.4.7.orig/Makefile.inc 2006-11-14 19:56:09.000000000 +0200
98+++ openswan-2.4.7/Makefile.inc 2006-12-06 22:48:32.534943089 +0200
99@@ -46,7 +46,7 @@
100 DESTDIR?=
101
102 # "local" part of tree, used in building other pathnames
103-INC_USRLOCAL=/usr/local
104+INC_USRLOCAL?=/usr
105
106 # PUBDIR is where the "ipsec" command goes; beware, many things define PATH
107 # settings which are assumed to include it (or at least, to include *some*
108@@ -80,7 +80,7 @@
109 MANPLACES=man3 man5 man8
110
111 # where configuration files go
112-FINALCONFFILE?=/etc/ipsec.conf
113+FINALCONFFILE?=/etc/ipsec/ipsec.conf
114 CONFFILE=$(DESTDIR)$(FINALCONFFILE)
115
116 FINALCONFDIR?=/etc
117@@ -91,7 +91,7 @@
118
119 # sample configuration files go into
120 INC_DOCDIR?=share/doc
121-FINALEXAMPLECONFDIR=${INC_USRLOCAL}/${INC_DOCDIR}/openswan
122+FINALEXAMPLECONFDIR?=${INC_USRLOCAL}/${INC_DOCDIR}/openswan
123 EXAMPLECONFDIR=${DESTDIR}${FINALEXAMPLECONFDIR}
124
125 FINALDOCDIR?=${INC_USRLOCAL}/${INC_DOCDIR}/openswan
126@@ -239,7 +239,7 @@
127 # installed one in RH 7.2, won't work - you wind up depending upon
128 # openssl.
129
130-BIND9STATICLIBDIR?=/usr/local/lib
131+BIND9STATICLIBDIR?=/usr/lib
132
133 # if you install elsewere, you may need to point the include files to it.
134 #BIND9STATICLIBDIR?=/sandel/lib
135diff -Nru openswan-2.4.7.orig/programs/barf/barf.in openswan-2.4.7/programs/barf/barf.in
136--- openswan-2.4.7.orig/programs/barf/barf.in 2006-11-07 05:49:18.000000000 +0200
137+++ openswan-2.4.7/programs/barf/barf.in 2006-12-06 22:46:54.740831340 +0200
138@@ -16,7 +16,7 @@
139
140 LOGS=${LOGS-/var/log}
141 CONFS=${IPSEC_CONFS-/etc}
142-CONFDDIR=${IPSEC_CONFDDIR-/etc/ipsec.d}
143+CONFDDIR=${IPSEC_CONFDDIR-/etc/ipsec/ipsec.d}
144 me="ipsec barf"
145 # Max lines to use for things like 'route -n'
146 maxlines=100
147@@ -238,13 +238,13 @@
148 done
149 fi
150 _________________________ ipsec/ls-libdir
151-ls -l ${IPSEC_LIBDIR-/usr/local/lib/ipsec}
152+ls -l ${IPSEC_LIBDIR-/usr/lib/ipsec}
153 _________________________ ipsec/ls-execdir
154-ls -l ${IPSEC_EXECDIR-/usr/local/libexec/ipsec}
155+ls -l ${IPSEC_EXECDIR-/usr/libexec/ipsec}
156 _________________________ ipsec/updowns
157-for f in `ls ${IPSEC_EXECDIR-/usr/local/libexec/ipsec} | egrep updown`
158+for f in `ls ${IPSEC_EXECDIR-/usr/libexec/ipsec} | egrep updown`
159 do
160- cat ${IPSEC_EXECDIR-/usr/local/libexec/ipsec}/$f
161+ cat ${IPSEC_EXECDIR-/usr/libexec/ipsec}/$f
162 done
163 _________________________ /proc/net/dev
164 cat /proc/net/dev
165diff -Nru openswan-2.4.7.orig/programs/eroute/eroute.5 openswan-2.4.7/programs/eroute/eroute.5
166--- openswan-2.4.7.orig/programs/eroute/eroute.5 2006-10-26 23:40:43.000000000 +0300
167+++ openswan-2.4.7/programs/eroute/eroute.5 2006-12-06 22:57:19.307864340 +0200
168@@ -168,7 +168,7 @@
169 .SH "FILES"
170
171 .PP
172-/proc/net/ipsec_eroute, /usr/local/bin/ipsec
173+/proc/net/ipsec_eroute, /usr/bin/ipsec
174
175 .SH "SEE ALSO"
176
177diff -Nru openswan-2.4.7.orig/programs/eroute/eroute.8 openswan-2.4.7/programs/eroute/eroute.8
178--- openswan-2.4.7.orig/programs/eroute/eroute.8 2003-10-31 04:32:27.000000000 +0200
179+++ openswan-2.4.7/programs/eroute/eroute.8 2006-12-06 22:46:54.740831340 +0200
180@@ -308,7 +308,7 @@
181 .br
182 .LP
183 .SH FILES
184-/proc/net/ipsec_eroute, /usr/local/bin/ipsec
185+/proc/net/ipsec_eroute, /usr/bin/ipsec
186 .SH "SEE ALSO"
187 ipsec(8), ipsec_manual(8), ipsec_tncfg(8), ipsec_spi(8),
188 ipsec_spigrp(8), ipsec_klipsdebug(8), ipsec_eroute(5)
189diff -Nru openswan-2.4.7.orig/programs/_include/_include.in openswan-2.4.7/programs/_include/_include.in
190--- openswan-2.4.7.orig/programs/_include/_include.in 2003-01-06 23:44:04.000000000 +0200
191+++ openswan-2.4.7/programs/_include/_include.in 2006-12-06 22:46:54.740831340 +0200
192@@ -47,10 +47,10 @@
193 do
194 if test ! -r "$f"
195 then
196- if test ! "$f" = "/etc/ipsec.conf"
197+ if test ! "$f" = "/etc/ipsec/ipsec.conf"
198 then
199 echo "#:cannot open configuration file \'$f\'"
200- if test "$f" = "/etc/ipsec.secrets"
201+ if test "$f" = "/etc/ipsec/ipsec.secrets"
202 then
203 echo "#:Your secrets file will be created when you start FreeS/WAN for the first time."
204 fi
205diff -Nru openswan-2.4.7.orig/programs/ipsec/ipsec.8 openswan-2.4.7/programs/ipsec/ipsec.8
206--- openswan-2.4.7.orig/programs/ipsec/ipsec.8 2003-02-27 18:51:54.000000000 +0200
207+++ openswan-2.4.7/programs/ipsec/ipsec.8 2006-12-06 22:46:54.744831590 +0200
208@@ -81,7 +81,7 @@
209 .I ipsec
210 thinks the IPsec configuration files are stored.
211 .SH FILES
212-/usr/local/lib/ipsec usual utilities directory
213+/usr/lib/ipsec usual utilities directory
214 .SH ENVIRONMENT
215 .PP
216 The following environment variables control where FreeS/WAN finds its
217diff -Nru openswan-2.4.7.orig/programs/klipsdebug/klipsdebug.5 openswan-2.4.7/programs/klipsdebug/klipsdebug.5
218--- openswan-2.4.7.orig/programs/klipsdebug/klipsdebug.5 2006-10-27 01:21:25.000000000 +0300
219+++ openswan-2.4.7/programs/klipsdebug/klipsdebug.5 2006-12-06 22:58:04.150666840 +0200
220@@ -114,7 +114,7 @@
221 .SH "FILES"
222
223 .PP
224-/proc/net/ipsec_klipsdebug, /usr/local/bin/ipsec
225+/proc/net/ipsec_klipsdebug, /usr/bin/ipsec
226
227 .SH "SEE ALSO"
228
229diff -Nru openswan-2.4.7.orig/programs/klipsdebug/klipsdebug.8 openswan-2.4.7/programs/klipsdebug/klipsdebug.8
230--- openswan-2.4.7.orig/programs/klipsdebug/klipsdebug.8 2006-10-27 01:21:25.000000000 +0300
231+++ openswan-2.4.7/programs/klipsdebug/klipsdebug.8 2006-12-06 22:58:22.295800840 +0200
232@@ -111,7 +111,7 @@
233 .SH "FILES"
234
235 .PP
236-/proc/net/ipsec_klipsdebug, /usr/local/bin/ipsec
237+/proc/net/ipsec_klipsdebug, /usr/bin/ipsec
238
239 .SH "SEE ALSO"
240
241diff -Nru openswan-2.4.7.orig/programs/mailkey/mailkey.in openswan-2.4.7/programs/mailkey/mailkey.in
242--- openswan-2.4.7.orig/programs/mailkey/mailkey.in 2006-10-29 02:49:23.000000000 +0300
243+++ openswan-2.4.7/programs/mailkey/mailkey.in 2006-12-06 22:46:54.828836839 +0200
244@@ -60,7 +60,7 @@
245
246 "$test1st"
247
248-Common concerns: This account must be able to read /etc/ipsec.secrets.
249+Common concerns: This account must be able to read /etc/ipsec/ipsec.secrets.
250 If you haven't generated your key yet, please run 'ipsec newhostkey'."
251 exit 0
252 }
253diff -Nru openswan-2.4.7.orig/programs/pluto/Makefile openswan-2.4.7/programs/pluto/Makefile
254--- openswan-2.4.7.orig/programs/pluto/Makefile 2006-11-07 17:55:52.000000000 +0200
255+++ openswan-2.4.7/programs/pluto/Makefile 2006-12-06 22:46:54.832837088 +0200
256@@ -256,7 +256,7 @@
257 -DPOLICYGROUPSDIR=\"${FINALCONFDDIR}/policies\" \
258 -DPERPEERLOGDIR=\"${FINALLOGDIR}/pluto/peer\"
259
260-ALLFLAGS = $(CPPFLAGS) $(CFLAGS)
261+ALLFLAGS = $(CPPFLAGS) $(CFLAGS) $(USERCOMPILE)
262
263 # libefence is a free memory allocation debugger
264 # Solaris 2 needs -lsocket -lnsl
265diff -Nru openswan-2.4.7.orig/programs/setup/Makefile openswan-2.4.7/programs/setup/Makefile
266--- openswan-2.4.7.orig/programs/setup/Makefile 2004-12-18 20:13:43.000000000 +0200
267+++ openswan-2.4.7/programs/setup/Makefile 2006-12-06 22:46:54.832837088 +0200
268@@ -33,25 +33,10 @@
269 @rm -f $(BINDIR)/setup
270 @$(INSTALL) $(INSTBINFLAGS) setup $(RCDIR)/ipsec
271 @ln -s $(FINALRCDIR)/ipsec $(BINDIR)/setup
272- -@for i in 0 1 2 3 4 5 6; do mkdir -p $(RCDIR)/../rc$$i.d; done
273- -@cd $(RCDIR)/../rc0.d && ln -f -s ../init.d/ipsec K76ipsec
274- -@cd $(RCDIR)/../rc1.d && ln -f -s ../init.d/ipsec K76ipsec
275- -@cd $(RCDIR)/../rc2.d && ln -f -s ../init.d/ipsec S47ipsec
276- -@cd $(RCDIR)/../rc3.d && ln -f -s ../init.d/ipsec S47ipsec
277- -@cd $(RCDIR)/../rc4.d && ln -f -s ../init.d/ipsec S47ipsec
278- -@cd $(RCDIR)/../rc5.d && ln -f -s ../init.d/ipsec S47ipsec
279- -@cd $(RCDIR)/../rc6.d && ln -f -s ../init.d/ipsec K76ipsec
280
281 install_file_list::
282 @echo $(RCDIR)/ipsec
283 @echo $(BINDIR)/setup
284- @echo $(RCDIR)/../rc0.d/K76ipsec
285- @echo $(RCDIR)/../rc1.d/K76ipsec
286- @echo $(RCDIR)/../rc2.d/S47ipsec
287- @echo $(RCDIR)/../rc3.d/S47ipsec
288- @echo $(RCDIR)/../rc4.d/S47ipsec
289- @echo $(RCDIR)/../rc5.d/S47ipsec
290- @echo $(RCDIR)/../rc6.d/K76ipsec
291
292 clean::
293 @rm -f setup
294diff -Nru openswan-2.4.7.orig/programs/showhostkey/showhostkey.in openswan-2.4.7/programs/showhostkey/showhostkey.in
295--- openswan-2.4.7.orig/programs/showhostkey/showhostkey.in 2004-11-14 15:40:41.000000000 +0200
296+++ openswan-2.4.7/programs/showhostkey/showhostkey.in 2006-12-06 22:46:54.844837840 +0200
297@@ -18,7 +18,7 @@
298 usage="Usage: $me [--file secrets] [--left] [--right] [--txt gateway] [--id id]
299 [--dhclient] [--ipseckey]"
300
301-file=/etc/ipsec.secrets
302+file=/etc/ipsec/ipsec.secrets
303 fmt=""
304 gw=
305 id=
306diff -Nru openswan-2.4.7.orig/programs/spi/spi.5 openswan-2.4.7/programs/spi/spi.5
307--- openswan-2.4.7.orig/programs/spi/spi.5 2006-10-26 23:53:59.000000000 +0300
308+++ openswan-2.4.7/programs/spi/spi.5 2006-12-06 23:00:11.910340779 +0200
309@@ -157,7 +157,7 @@
310 .SH "FILES"
311
312 .PP
313-/proc/net/ipsec_spi, /usr/local/bin/ipsec
314+/proc/net/ipsec_spi, /usr/bin/ipsec
315
316 .SH "SEE ALSO"
317
318diff -Nru openswan-2.4.7.orig/programs/spi/spi.8 openswan-2.4.7/programs/spi/spi.8
319--- openswan-2.4.7.orig/programs/spi/spi.8 2006-10-30 22:00:04.000000000 +0200
320+++ openswan-2.4.7/programs/spi/spi.8 2006-12-06 23:00:27.043286530 +0200
321@@ -215,7 +215,7 @@
322 .SH "FILES"
323
324 .PP
325-/proc/net/ipsec_spi, /usr/local/bin/ipsec
326+/proc/net/ipsec_spi, /usr/bin/ipsec
327
328 .SH "SEE ALSO"
329
330diff -Nru openswan-2.4.7.orig/programs/spigrp/spigrp.5 openswan-2.4.7/programs/spigrp/spigrp.5
331--- openswan-2.4.7.orig/programs/spigrp/spigrp.5 2006-10-26 23:50:29.000000000 +0300
332+++ openswan-2.4.7/programs/spigrp/spigrp.5 2006-12-06 23:01:25.650949280 +0200
333@@ -67,7 +67,7 @@
334 .SH "FILES"
335
336 .PP
337-/proc/net/ipsec_spigrp, /usr/local/bin/ipsec
338+/proc/net/ipsec_spigrp, /usr/bin/ipsec
339
340 .SH "SEE ALSO"
341
342diff -Nru openswan-2.4.7.orig/programs/spigrp/spigrp.8 openswan-2.4.7/programs/spigrp/spigrp.8
343--- openswan-2.4.7.orig/programs/spigrp/spigrp.8 2006-10-26 23:50:29.000000000 +0300
344+++ openswan-2.4.7/programs/spigrp/spigrp.8 2006-12-06 23:01:39.079788532 +0200
345@@ -87,7 +87,7 @@
346 .SH "FILES"
347
348 .PP
349-/proc/net/ipsec_spigrp, /usr/local/bin/ipsec
350+/proc/net/ipsec_spigrp, /usr/bin/ipsec
351
352 .SH "SEE ALSO"
353
354diff -Nru openswan-2.4.7.orig/programs/tncfg/tncfg.5 openswan-2.4.7/programs/tncfg/tncfg.5
355--- openswan-2.4.7.orig/programs/tncfg/tncfg.5 2006-10-26 23:58:11.000000000 +0300
356+++ openswan-2.4.7/programs/tncfg/tncfg.5 2006-12-06 23:01:59.385057530 +0200
357@@ -101,7 +101,7 @@
358 .SH "FILES"
359
360 .PP
361-/proc/net/ipsec_tncfg, /usr/local/bin/ipsec
362+/proc/net/ipsec_tncfg, /usr/bin/ipsec
363
364 .SH "SEE ALSO"
365
366diff -Nru openswan-2.4.7.orig/programs/tncfg/tncfg.8 openswan-2.4.7/programs/tncfg/tncfg.8
367--- openswan-2.4.7.orig/programs/tncfg/tncfg.8 2006-10-26 23:58:11.000000000 +0300
368+++ openswan-2.4.7/programs/tncfg/tncfg.8 2006-12-06 23:02:09.245673780 +0200
369@@ -63,7 +63,7 @@
370 .SH "FILES"
371
372 .PP
373-/proc/net/ipsec_tncfg, /usr/local/bin/ipsec
374+/proc/net/ipsec_tncfg, /usr/bin/ipsec
375
376 .SH "SEE ALSO"
377
diff --git a/meta/recipes-connectivity/openswan/openswan_2.4.7.bb b/meta/recipes-connectivity/openswan/openswan_2.4.7.bb
new file mode 100644
index 0000000000..4ebb9c7a45
--- /dev/null
+++ b/meta/recipes-connectivity/openswan/openswan_2.4.7.bb
@@ -0,0 +1,36 @@
1SECTION = "console/network"
2DESCRIPTION = "Openswan is an Open Source implementation of IPsec for the \
3Linux operating system."
4HOMEPAGE = "http://www.openswan.org"
5LICENSE = "GPLv2"
6DEPENDS = "gmp flex-native"
7RRECOMMENDS = "kernel-module-ipsec"
8RDEPENDS_nylon = "perl"
9PR = "r0"
10
11SRC_URI = "http://www.openswan.org/download/old/openswan-${PV}.tar.gz \
12 file://openswan-2.4.7-gentoo.patch;patch=1 \
13 file://installflags.patch;patch=1 \
14 file://ld-library-path-breakage.patch;patch=1"
15S = "${WORKDIR}/openswan-${PV}"
16
17PARALLEL_MAKE = ""
18EXTRA_OEMAKE = "DESTDIR=${D} \
19 USERCOMPILE="${CFLAGS}" \
20 FINALCONFDIR=${sysconfdir}/ipsec \
21 INC_RCDEFAULT=${sysconfdir}/init.d \
22 INC_USRLOCAL=${prefix} \
23 INC_MANDIR=share/man WERROR=''"
24
25do_compile () {
26 oe_runmake programs
27}
28
29do_install () {
30 oe_runmake install
31}
32
33FILES_${PN} = "${sysconfdir} ${libdir}/ipsec/* ${sbindir}/* ${libexecdir}/ipsec/*"
34FILES_${PN}-dbg += "${libdir}/ipsec/.debug ${libexecdir}/ipsec/.debug"
35
36CONFFILES_${PN} = "${sysconfdir}/ipsec/ipsec.conf"
diff --git a/meta/recipes-connectivity/opensync/libopensync-0.37/build-in-src.patch b/meta/recipes-connectivity/opensync/libopensync-0.37/build-in-src.patch
new file mode 100644
index 0000000000..1810b339a6
--- /dev/null
+++ b/meta/recipes-connectivity/opensync/libopensync-0.37/build-in-src.patch
@@ -0,0 +1,18 @@
1---
2 cmake/OpenSyncInternal.cmake.in | 1 -
3 1 file changed, 1 deletion(-)
4
5--- libopensync-0.36.orig/cmake/OpenSyncInternal.cmake.in
6+++ libopensync-0.36/cmake/OpenSyncInternal.cmake.in
7@@ -5,11 +5,10 @@ INCLUDE( OpenSyncTesting )
8 INCLUDE( OpenSyncPackaging )
9 INCLUDE( OpenSyncPlugin )
10 INCLUDE( OpenSyncPlatforms )
11 INCLUDE( MacroEnsureOutOfSourceBuild )
12
13-MACRO_ENSURE_OUT_OF_SOURCE_BUILD("${CMAKE_PROJECT_NAME} doesn't allow to build within the source directory. Please, create a seperate build directory and run 'cmake ${PROJECT_SOURCE_DIR} [options]'!")
14
15
16 SET( OPENSYNC_PLUGINDIR "@OPENSYNC_PLUGINDIR@" )
17 SET( OPENSYNC_FORMATSDIR "@OPENSYNC_FORMATSDIR@" )
18 SET( OPENSYNC_PYTHON_PLUGINDIR "@OPENSYNC_PYTHON_PLUGINDIR@" )
diff --git a/meta/recipes-connectivity/opensync/libopensync-0.37/cmake.patch b/meta/recipes-connectivity/opensync/libopensync-0.37/cmake.patch
new file mode 100644
index 0000000000..7ea4613548
--- /dev/null
+++ b/meta/recipes-connectivity/opensync/libopensync-0.37/cmake.patch
@@ -0,0 +1,17 @@
1---
2 opensync/CMakeLists.txt | 1 -
3 1 file changed, 1 deletion(-)
4
5Index: libopensync-0.37/opensync/CMakeLists.txt
6===================================================================
7--- libopensync-0.37.orig/opensync/CMakeLists.txt 2008-10-15 13:56:45.000000000 +0100
8+++ libopensync-0.37/opensync/CMakeLists.txt 2008-10-15 13:59:03.000000000 +0100
9@@ -67,8 +67,6 @@
10 SET_TARGET_PROPERTIES( opensync PROPERTIES VERSION ${OPENSYNC_LIBVERSION_VERSION} )
11 SET_TARGET_PROPERTIES( opensync PROPERTIES SOVERSION ${OPENSYNC_LIBVERSION_SOVERSION} )
12
13-SET_TARGET_PROPERTIES( opensync PROPERTIES COMPILE_FLAGS ${SYMBOLS_VISIBILITY} )
14-
15 IF ( OPENSYNC_UNITTESTS )
16 ADD_LIBRARY( opensync-testing SHARED ${libopensync_LIB_SRCS} )
17 TARGET_LINK_LIBRARIES( opensync-testing ${GLIB2_LIBRARIES} ${GTHREAD2_LIBRARIES} ${GMODULE2_LIBRARIES} ${LIBXML2_LIBRARIES} ${LIBXSLT_LIBRARIES} ${LIBEXSLT_LIBRARIES} ${SQLITE3_LIBRARIES} )
diff --git a/meta/recipes-connectivity/opensync/libopensync-0.37/no-python-check.patch b/meta/recipes-connectivity/opensync/libopensync-0.37/no-python-check.patch
new file mode 100644
index 0000000000..04257bc623
--- /dev/null
+++ b/meta/recipes-connectivity/opensync/libopensync-0.37/no-python-check.patch
@@ -0,0 +1,16 @@
1---
2 CMakeLists.txt | 1 -
3 1 file changed, 1 deletion(-)
4
5Index: libopensync-0.37/CMakeLists.txt
6===================================================================
7--- libopensync-0.37.orig/CMakeLists.txt 2008-08-18 16:14:24.000000000 +0100
8+++ libopensync-0.37/CMakeLists.txt 2008-10-15 14:00:12.000000000 +0100
9@@ -65,7 +65,6 @@
10 FIND_PACKAGE( LibXslt REQUIRED )
11 FIND_PACKAGE( LibExslt REQUIRED )
12 FIND_PACKAGE( SWIG )
13-FIND_PACKAGE( PythonLibs )
14 FIND_PACKAGE( Check )
15
16 ADD_SUBDIRECTORY( opensync )
diff --git a/meta/recipes-connectivity/opensync/libopensync-plugin-evolution2/0.37-fixes.patch b/meta/recipes-connectivity/opensync/libopensync-plugin-evolution2/0.37-fixes.patch
new file mode 100644
index 0000000000..4a1802ce17
--- /dev/null
+++ b/meta/recipes-connectivity/opensync/libopensync-plugin-evolution2/0.37-fixes.patch
@@ -0,0 +1,23 @@
1Index: libopensync-plugin-evolution2-0.36/cmake/modules/FindOpenSync.cmake
2===================================================================
3--- libopensync-plugin-evolution2-0.36.orig/cmake/modules/FindOpenSync.cmake 2008-10-20 13:07:14.000000000 +0100
4+++ libopensync-plugin-evolution2-0.36/cmake/modules/FindOpenSync.cmake 2008-10-20 13:08:09.000000000 +0100
5@@ -23,15 +23,15 @@
6 ENDIF ( OpenSync_FIND_REQUIRED )
7
8 IF ( OPENSYNC_MIN_VERSION )
9- PKG_SEARCH_MODULE( OPENSYNC ${_pkgconfig_REQUIRED} opensync-1.0>=${OPENSYNC_MIN_VERSION} )
10+ PKG_SEARCH_MODULE( OPENSYNC ${_pkgconfig_REQUIRED} libopensync>=${OPENSYNC_MIN_VERSION} )
11 ELSE ( OPENSYNC_MIN_VERSION )
12- PKG_SEARCH_MODULE( OPENSYNC ${_pkgconfig_REQUIRED} opensync-1.0 )
13+ PKG_SEARCH_MODULE( OPENSYNC ${_pkgconfig_REQUIRED} libopensync )
14 ENDIF ( OPENSYNC_MIN_VERSION )
15
16 FIND_PROGRAM( PKGCONFIG_EXECUTABLE NAMES pkg-config )
17
18 IF ( PKGCONFIG_EXECUTABLE )
19- EXEC_PROGRAM( ${PKGCONFIG_EXECUTABLE} ARGS opensync-1.0 --variable=datadir OUTPUT_VARIABLE _opensync_data_DIR )
20+ EXEC_PROGRAM( ${PKGCONFIG_EXECUTABLE} ARGS libopensync --variable=datadir OUTPUT_VARIABLE _opensync_data_DIR )
21 STRING( REGEX REPLACE "[\r\n]" " " _opensync_data_DIR "${_opensync_data_DIR}" )
22 ENDIF ( PKGCONFIG_EXECUTABLE )
23
diff --git a/meta/recipes-connectivity/opensync/libopensync-plugin-evolution2_0.36.bb b/meta/recipes-connectivity/opensync/libopensync-plugin-evolution2_0.36.bb
new file mode 100644
index 0000000000..a1c4cb1887
--- /dev/null
+++ b/meta/recipes-connectivity/opensync/libopensync-plugin-evolution2_0.36.bb
@@ -0,0 +1,7 @@
1require libopensync-plugin_0.36.inc
2
3DEPENDS += " eds-dbus"
4
5SRC_URI += "file://0.37-fixes.patch;patch=1"
6
7PR = "r1"
diff --git a/meta/recipes-connectivity/opensync/libopensync-plugin-file_0.37.bb b/meta/recipes-connectivity/opensync/libopensync-plugin-file_0.37.bb
new file mode 100644
index 0000000000..33a049b7d6
--- /dev/null
+++ b/meta/recipes-connectivity/opensync/libopensync-plugin-file_0.37.bb
@@ -0,0 +1 @@
require libopensync-plugin_0.36.inc
diff --git a/meta/recipes-connectivity/opensync/libopensync-plugin-google-calendar_0.36.bb b/meta/recipes-connectivity/opensync/libopensync-plugin-google-calendar_0.36.bb
new file mode 100644
index 0000000000..33a049b7d6
--- /dev/null
+++ b/meta/recipes-connectivity/opensync/libopensync-plugin-google-calendar_0.36.bb
@@ -0,0 +1 @@
require libopensync-plugin_0.36.inc
diff --git a/meta/recipes-connectivity/opensync/libopensync-plugin-irmc_0.36.bb b/meta/recipes-connectivity/opensync/libopensync-plugin-irmc_0.36.bb
new file mode 100644
index 0000000000..c06de2fde8
--- /dev/null
+++ b/meta/recipes-connectivity/opensync/libopensync-plugin-irmc_0.36.bb
@@ -0,0 +1,3 @@
1require libopensync-plugin_0.36.inc
2
3DEPENDS += "openobex bluez4"
diff --git a/meta/recipes-connectivity/opensync/libopensync-plugin-syncml/fixerror.patch b/meta/recipes-connectivity/opensync/libopensync-plugin-syncml/fixerror.patch
new file mode 100644
index 0000000000..7dad889422
--- /dev/null
+++ b/meta/recipes-connectivity/opensync/libopensync-plugin-syncml/fixerror.patch
@@ -0,0 +1,13 @@
1Index: libopensync-plugin-syncml-0.38/src/syncml_callbacks.c
2===================================================================
3--- libopensync-plugin-syncml-0.38.orig/src/syncml_callbacks.c 2009-07-31 10:30:33.000000000 +0100
4+++ libopensync-plugin-syncml-0.38/src/syncml_callbacks.c 2009-07-31 10:30:39.000000000 +0100
5@@ -405,7 +405,7 @@
6 } else {
7 /* This problem should be fixed with the next SLOW-SYNC. */
8 osync_trace(TRACE_EXIT_ERROR, "%s - unexpected Add or Replace command", __func__);
9- smlErrorSet(error, SML_ERROR_TEMPORARY, "Unwanted Add or Replace command on second OMA DS session.");
10+ smlErrorSet(error, SML_ERROR_GENERIC, "Unwanted Add or Replace command on second OMA DS session.");
11 return FALSE;
12 }
13 }
diff --git a/meta/recipes-connectivity/opensync/libopensync-plugin-syncml_0.38.bb b/meta/recipes-connectivity/opensync/libopensync-plugin-syncml_0.38.bb
new file mode 100644
index 0000000000..d32d62de47
--- /dev/null
+++ b/meta/recipes-connectivity/opensync/libopensync-plugin-syncml_0.38.bb
@@ -0,0 +1,7 @@
1require libopensync-plugin_0.36.inc
2
3DEPENDS += " libsyncml (>= 0.4.7)"
4
5SRC_URI += "file://fixerror.patch;patch=1"
6
7PR = "r1" \ No newline at end of file
diff --git a/meta/recipes-connectivity/opensync/libopensync-plugin-vformat_0.37.bb b/meta/recipes-connectivity/opensync/libopensync-plugin-vformat_0.37.bb
new file mode 100644
index 0000000000..84a48f21fe
--- /dev/null
+++ b/meta/recipes-connectivity/opensync/libopensync-plugin-vformat_0.37.bb
@@ -0,0 +1,3 @@
1require libopensync-plugin_0.36.inc
2
3DEPENDS += " check"
diff --git a/meta/recipes-connectivity/opensync/libopensync-plugin_0.36.inc b/meta/recipes-connectivity/opensync/libopensync-plugin_0.36.inc
new file mode 100644
index 0000000000..db6b1fa73a
--- /dev/null
+++ b/meta/recipes-connectivity/opensync/libopensync-plugin_0.36.inc
@@ -0,0 +1,9 @@
1DEPENDS = "libopensync (>= 0.36)"
2
3SRC_URI = "http://opensync.org/download/releases/${PV}/${P}.tar.bz2"
4
5inherit cmake
6
7FILES_${PN} += "${libdir}/opensync*/plugins/*.so \
8 ${libdir}/opensync*/formats/*.so \
9 ${datadir}/opensync*/defaults/"
diff --git a/meta/recipes-connectivity/opensync/libopensync_0.37.bb b/meta/recipes-connectivity/opensync/libopensync_0.37.bb
new file mode 100644
index 0000000000..e9b8ce202e
--- /dev/null
+++ b/meta/recipes-connectivity/opensync/libopensync_0.37.bb
@@ -0,0 +1,25 @@
1LICENSE = "LGPL"
2HOMEPAGE = "http://www.opensync.org/"
3
4DEPENDS = "sqlite3 libxml2 glib-2.0 check zlib libxslt"
5
6PR = "r1"
7
8SRC_URI = "http://opensync.org/download/releases/${PV}/libopensync-${PV}.tar.bz2\
9 file://cmake.patch;patch=1 \
10 file://build-in-src.patch;patch=1 \
11 file://no-python-check.patch;patch=1"
12
13inherit cmake pkgconfig
14
15LEAD_SONAME = "libopensync.so"
16
17FILES_${PN} += " ${libdir}/opensync*/formats/*.so \
18 ${libdir}/opensync*/osplugin \
19 ${datadir}/opensync*/schemas \
20 ${datadir}/opensync*/capabilities \
21 ${datadir}/opensync*/descriptions \
22 "
23FILES_${PN}-dbg += " ${libdir}/opensync*/formats/.debug/*.so \
24 ${libdir}/opensync*/.debug/osplugin "
25
diff --git a/meta/recipes-connectivity/opensync/libsync_svn.bb b/meta/recipes-connectivity/opensync/libsync_svn.bb
new file mode 100644
index 0000000000..660b39aa42
--- /dev/null
+++ b/meta/recipes-connectivity/opensync/libsync_svn.bb
@@ -0,0 +1,19 @@
1DESCRIPTION = "LibSync is a GObject-based framework for more convenient use of \
2OpenSync in GLib applications."
3LICENSE = "LGPL"
4SECTION = "x11"
5DEPENDS = "glib-2.0 gtk+ libglade libopensync avahi"
6RRECOMMENDS = "\
7 libopensync-plugin-file \
8 "
9PV = "0.0+svnr${SRCREV}"
10
11SRC_URI = "svn://svn.o-hand.com/repos/sync/trunk;module=sync;proto=http"
12
13inherit autotools pkgconfig
14
15S = "${WORKDIR}/sync"
16
17PACKAGES += "synctool"
18FILES_${PN} = "${libdir}/lib*.so.*"
19FILES_synctool = "${bindir} ${datadir}"
diff --git a/meta/recipes-connectivity/opensync/libsyncml/build-in-src.patch b/meta/recipes-connectivity/opensync/libsyncml/build-in-src.patch
new file mode 100644
index 0000000000..d8106bdfc7
--- /dev/null
+++ b/meta/recipes-connectivity/opensync/libsyncml/build-in-src.patch
@@ -0,0 +1,19 @@
1---
2 CMakeLists.txt | 4 ----
3 1 file changed, 4 deletions(-)
4
5Index: libsyncml-0.5.4/CMakeLists.txt
6===================================================================
7--- libsyncml-0.5.4.orig/CMakeLists.txt 2009-07-31 09:56:16.000000000 +0100
8+++ libsyncml-0.5.4/CMakeLists.txt 2009-07-31 09:57:33.000000000 +0100
9@@ -72,10 +72,6 @@
10 CHECK_TYPE_SIZE( uint32_t UINT32_T )
11 CHECK_TYPE_SIZE( uint8_t UINT8_T )
12
13-# ensure out od source build
14-INCLUDE( MacroEnsureOutOfSourceBuild )
15-MACRO_ENSURE_OUT_OF_SOURCE_BUILD("${CMAKE_PROJECT_NAME} doesn't allow to build within the source directory. Please, create a seperate build directory and run 'cmake ${PROJECT_SOURCE_DIR} [options]'!")
16-
17 # find requirements
18 SET ( GLIB2_MIN_VERSION "2.12" )
19 SET ( OPENOBEX_MIN_VERSION "1.1" )
diff --git a/meta/recipes-connectivity/opensync/libsyncml_0.5.4.bb b/meta/recipes-connectivity/opensync/libsyncml_0.5.4.bb
new file mode 100644
index 0000000000..7feb5e0f18
--- /dev/null
+++ b/meta/recipes-connectivity/opensync/libsyncml_0.5.4.bb
@@ -0,0 +1,17 @@
1DESCRIPTION = "Libsyncml is a implementation of the SyncML protocol."
2HOMEPAGE = "http://libsyncml.opensync.org/"
3LICENSE = "LGPL"
4DEPENDS = "sed-native wbxml2 libsoup libxml2 bluez4 openobex check"
5PR = "r1"
6
7SRC_URI = "${SOURCEFORGE_MIRROR}/libsyncml/0.5.4/libsyncml-0.5.4.tar.bz2 \
8 file://build-in-src.patch;patch=1"
9
10inherit cmake pkgconfig
11
12PACKAGES += "${PN}-tools"
13
14FILES_${PN}-tools = "${bindir}"
15FILES_${PN} = "${libdir}/*.so.*"
16
17export VERBOSE=1 \ No newline at end of file
diff --git a/meta/recipes-connectivity/opensync/msynctool_0.37.bb b/meta/recipes-connectivity/opensync/msynctool_0.37.bb
new file mode 100644
index 0000000000..773166b3be
--- /dev/null
+++ b/meta/recipes-connectivity/opensync/msynctool_0.37.bb
@@ -0,0 +1,7 @@
1SRC_URI = "http://www.opensync.org/download/releases/${PV}/msynctool-${PV}.tar.bz2"
2
3LICENSE = "GPL"
4DEPENDS = "libopensync glib-2.0"
5HOMEPAGE = "http://www.opensync.org/"
6
7inherit cmake pkgconfig
diff --git a/meta/recipes-connectivity/portmap/portmap-6.0/destdir-no-strip.patch b/meta/recipes-connectivity/portmap/portmap-6.0/destdir-no-strip.patch
new file mode 100644
index 0000000000..a1563c7141
--- /dev/null
+++ b/meta/recipes-connectivity/portmap/portmap-6.0/destdir-no-strip.patch
@@ -0,0 +1,44 @@
1From: Mike Frysinger <vapier@gentoo.org>
2Date: Sun, 13 May 2007 21:15:12 +0000 (-0400)
3Subject: respect DESTDIR and dont use -s with install
4X-Git-Url: http://neil.brown.name/git?p=portmap;a=commitdiff_plain;h=603c59b978c04df2354f68d4a2dc676a758ff46d
5
6respect DESTDIR and dont use -s with install
7
8$(DESTDIR) is the standard for installing into other trees, not $(BASEDIR) ...
9so I've converted the Makefile to use that. I've also left in $(BASEDIR) as a
10default to support old installs; not sure if you'd just cut it.
11
12Stripping should be left to the person to handle, not automatically done by
13the install step. Also, `install -s` always calls `strip` which is
14wrong/undesired in cross-compiling scenarios.
15
16Signed-off-by: Mike Frysinger <vapier@gentoo.org>
17Signed-off-by: Neil Brown <neilb@suse.de>
18---
19
20diff --git a/Makefile b/Makefile
21index 9e9a4b4..5343428 100644
22--- a/Makefile
23+++ b/Makefile
24@@ -135,13 +135,14 @@ from_local: CPPFLAGS += -DTEST
25 portmap.man : portmap.8
26 sed $(MAN_SED) < portmap.8 > portmap.man
27
28+DESTDIR = $(BASEDIR)
29 install: all
30- install -o root -g root -m 0755 -s portmap ${BASEDIR}/sbin
31- install -o root -g root -m 0755 -s pmap_dump ${BASEDIR}/sbin
32- install -o root -g root -m 0755 -s pmap_set ${BASEDIR}/sbin
33- install -o root -g root -m 0644 portmap.man ${BASEDIR}/usr/share/man/man8/portmap.8
34- install -o root -g root -m 0644 pmap_dump.8 ${BASEDIR}/usr/share/man/man8
35- install -o root -g root -m 0644 pmap_set.8 ${BASEDIR}/usr/share/man/man8
36+ install -o root -g root -m 0755 portmap $(DESTDIR)/sbin
37+ install -o root -g root -m 0755 pmap_dump $(DESTDIR)/sbin
38+ install -o root -g root -m 0755 pmap_set $(DESTDIR)/sbin
39+ install -o root -g root -m 0644 portmap.man $(DESTDIR)/usr/share/man/man8/portmap.8
40+ install -o root -g root -m 0644 pmap_dump.8 $(DESTDIR)/usr/share/man/man8
41+ install -o root -g root -m 0644 pmap_set.8 $(DESTDIR)/usr/share/man/man8
42
43 clean:
44 rm -f *.o portmap pmap_dump pmap_set from_local \
diff --git a/meta/recipes-connectivity/portmap/portmap-6.0/tcpd-config.patch b/meta/recipes-connectivity/portmap/portmap-6.0/tcpd-config.patch
new file mode 100644
index 0000000000..da55f3799d
--- /dev/null
+++ b/meta/recipes-connectivity/portmap/portmap-6.0/tcpd-config.patch
@@ -0,0 +1,28 @@
1From: Mike Frysinger <vapier@gentoo.org>
2Date: Sun, 13 May 2007 21:17:32 +0000 (-0400)
3Subject: fix building with tcpd support disabled
4X-Git-Url: http://neil.brown.name/git?p=portmap;a=commitdiff_plain;h=7847207aed1b44faf077eed14a9ac9c68244eba5
5
6fix building with tcpd support disabled
7
8Make sure pmap_check.c only includes tcpd.h when HOSTS_ACCESS is defined.
9
10Signed-off-by: Timothy Redaelli <drizzt@gentoo.org>
11Signed-off-by: Mike Frysinger <vapier@gentoo.org>
12Signed-off-by: Neil Brown <neilb@suse.de>
13---
14
15diff --git a/pmap_check.c b/pmap_check.c
16index 84f2c12..443a822 100644
17--- a/pmap_check.c
18+++ b/pmap_check.c
19@@ -44,7 +44,9 @@
20 #include <netinet/in.h>
21 #include <rpc/rpcent.h>
22 #endif
23+#ifdef HOSTS_ACCESS
24 #include <tcpd.h>
25+#endif
26 #include <arpa/inet.h>
27 #include <grp.h>
28
diff --git a/meta/recipes-connectivity/portmap/portmap.inc b/meta/recipes-connectivity/portmap/portmap.inc
new file mode 100644
index 0000000000..d563ad5b5a
--- /dev/null
+++ b/meta/recipes-connectivity/portmap/portmap.inc
@@ -0,0 +1,31 @@
1DESCRIPTION = "RPC program number mapper."
2HOMEPAGE = "http://neil.brown.name/portmap/"
3SECTION = "console/network"
4LICENSE = "BSD"
5LIC_FILES_CHKSUM = "file://portmap.c;beginline=2;endline=31;md5=51ff67e66ec84b2009b017b1f94afbf4 \
6 file://from_local.c;beginline=9;endline=35;md5=1bec938a2268b8b423c58801ace3adc1"
7DEPENDS = "virtual/fakeroot-native"
8
9SRC_URI = "${DEBIAN_MIRROR}/main/p/portmap/portmap_5.orig.tar.gz \
10 ${DEBIAN_MIRROR}/main/p/portmap/portmap_${PV}.diff.gz;patch=1 \
11 file://portmap.init \
12 file://make.patch;apply=yes"
13S = "${WORKDIR}/portmap_5beta"
14
15INITSCRIPT_NAME = "portmap"
16INITSCRIPT_PARAMS = "start 43 S . start 32 0 6 . stop 81 1 ."
17
18inherit update-rc.d
19
20sbindir = "/sbin"
21
22fakeroot do_install() {
23 install -d ${D}${sysconfdir}/init.d
24 install -d ${D}${base_sbindir}
25 install -m 0755 ${WORKDIR}/portmap.init ${D}${sysconfdir}/init.d/portmap
26 oe_runmake 'docdir=${docdir}/portmap' 'DESTDIR=${D}' install
27}
28
29PACKAGES =+ "portmap-utils"
30FILES_portmap-utils = "/sbin/pmap_set /sbin/pmap_dump"
31FILES_${PN}-doc += "${docdir}"
diff --git a/meta/recipes-connectivity/portmap/portmap/portmap.init b/meta/recipes-connectivity/portmap/portmap/portmap.init
new file mode 100755
index 0000000000..e46513e115
--- /dev/null
+++ b/meta/recipes-connectivity/portmap/portmap/portmap.init
@@ -0,0 +1,59 @@
1#!/bin/sh
2#
3### BEGIN INIT INFO
4# Provides: portmap
5# Required-Start: $network
6# Required-Stop: $network
7# Default-Start: S 2 3 4 5
8# Default-Stop: 0 1 6
9# Short-Description: The RPC portmapper
10# Description: Portmap is a server that converts RPC (Remote
11# Procedure Call) program numbers into DARPA
12# protocol port numbers. It must be running in
13# order to make RPC calls. Services that use
14# RPC include NFS and NIS.
15### END INIT INFO
16
17test -f /sbin/portmap || exit 0
18
19case "$1" in
20 start)
21 echo "Starting portmap daemon..."
22 start-stop-daemon --start --quiet --exec /sbin/portmap
23
24 if [ -f /var/run/portmap.upgrade-state ]; then
25 echo "Restoring old RPC service information..."
26 sleep 1 # needs a short pause or pmap_set won't work. :(
27 pmap_set </var/run/portmap.upgrade-state
28 rm -f /var/run/portmap.upgrade-state
29 echo "done."
30 fi
31
32 ;;
33 stop)
34 echo "Stopping portmap daemon..."
35 start-stop-daemon --stop --quiet --exec /sbin/portmap
36 ;;
37 reload)
38 ;;
39 force-reload)
40 $0 restart
41 ;;
42 restart)
43 pmap_dump >/var/run/portmap.state
44 $0 stop
45 $0 start
46 if [ ! -f /var/run/portmap.upgrade-state ]; then
47 sleep 1
48 pmap_set </var/run/portmap.state
49 fi
50 rm -f /var/run/portmap.state
51 ;;
52 *)
53 echo "Usage: /etc/init.d/portmap {start|stop|reload|restart}"
54 exit 1
55 ;;
56esac
57
58exit 0
59
diff --git a/meta/recipes-connectivity/portmap/portmap_6.0.bb b/meta/recipes-connectivity/portmap/portmap_6.0.bb
new file mode 100644
index 0000000000..49ac1d8332
--- /dev/null
+++ b/meta/recipes-connectivity/portmap/portmap_6.0.bb
@@ -0,0 +1,20 @@
1require portmap.inc
2
3DEPENDS += "tcp-wrappers"
4PR = "r7"
5
6SRC_URI = "http://www.sourcefiles.org/Networking/Tools/Miscellanenous/portmap-6.0.tgz \
7 file://destdir-no-strip.patch \
8 file://tcpd-config.patch \
9 file://portmap.init"
10
11S = "${WORKDIR}/${BPN}_${PV}/"
12
13CPPFLAGS += "-DFACILITY=LOG_DAEMON -DENABLE_DNS -DHOSTS_ACCESS"
14CFLAGS += "-Wall -Wstrict-prototypes -fPIC"
15
16fakeroot do_install() {
17 install -d ${D}${mandir}/man8/ ${D}${base_sbindir} ${D}${sysconfdir}/init.d
18 install -m 0755 ${WORKDIR}/portmap.init ${D}${sysconfdir}/init.d/portmap
19 oe_runmake install DESTDIR=${D}
20}
diff --git a/meta/recipes-connectivity/ppp-dialin/files/host-peer b/meta/recipes-connectivity/ppp-dialin/files/host-peer
new file mode 100644
index 0000000000..e7e2e11d49
--- /dev/null
+++ b/meta/recipes-connectivity/ppp-dialin/files/host-peer
@@ -0,0 +1,11 @@
1-detach
2defaultroute
3nocrtscts
4lock
5noauth
6lcp-echo-interval 5
7lcp-echo-failure 3
8usepeerdns
9115200
10local
11asyncmap 0
diff --git a/meta/recipes-connectivity/ppp-dialin/files/ppp-dialin b/meta/recipes-connectivity/ppp-dialin/files/ppp-dialin
new file mode 100644
index 0000000000..ea2771311a
--- /dev/null
+++ b/meta/recipes-connectivity/ppp-dialin/files/ppp-dialin
@@ -0,0 +1,3 @@
1#!/bin/sh
2
3/usr/sbin/pppd call host
diff --git a/meta/recipes-connectivity/ppp-dialin/ppp-dialin_0.1.bb b/meta/recipes-connectivity/ppp-dialin/ppp-dialin_0.1.bb
new file mode 100644
index 0000000000..6861d8ad44
--- /dev/null
+++ b/meta/recipes-connectivity/ppp-dialin/ppp-dialin_0.1.bb
@@ -0,0 +1,35 @@
1SECTION = "console/network"
2DESCRIPTION = "Enables PPP dial-in through a serial connection"
3DEPENDS = "ppp"
4RDEPENDS = "ppp"
5PR = "r5"
6LICENSE = "MIT"
7
8SRC_URI = "file://host-peer \
9 file://ppp-dialin"
10
11do_install() {
12 install -d ${D}${sysconfdir}/ppp/peers
13 install -m 0644 ${WORKDIR}/host-peer ${D}${sysconfdir}/ppp/peers/host
14
15 install -d ${D}${sbindir}
16 install -m 0755 ${WORKDIR}/ppp-dialin ${D}${sbindir}
17}
18
19PACKAGE_ARCH = "all"
20
21pkg_postinst() {
22if test "x$D" != "x"; then
23 exit 1
24else
25 adduser --system --home /dev/null --no-create-home --empty-password --ingroup nogroup -s ${sbindir}/ppp-dialin ppp
26fi
27}
28
29pkg_postrm() {
30if test "x$D" != "x"; then
31 exit 1
32else
33 deluser ppp
34fi
35}
diff --git a/meta/recipes-connectivity/ppp/ppp-2.4.5/08setupdns b/meta/recipes-connectivity/ppp/ppp-2.4.5/08setupdns
new file mode 100644
index 0000000000..998219de97
--- /dev/null
+++ b/meta/recipes-connectivity/ppp/ppp-2.4.5/08setupdns
@@ -0,0 +1,12 @@
1#!/bin/sh
2ACTUALCONF=/var/run/resolv.conf
3PPPCONF=/var/run/ppp/resolv.conf
4if [ -f $PPPCONF ] ; then
5 if [ -f $ACTUALCONF ] ; then
6 if [ ! -h $ACTUALCONF -o ! "`readlink $ACTUALCONF 2>&1`" = "$PPPCONF" ] ; then
7 mv $ACTUALCONF $ACTUALCONF.ppporig
8 fi
9 fi
10
11 ln -sf $PPPCONF $ACTUALCONF
12fi
diff --git a/meta/recipes-connectivity/ppp/ppp-2.4.5/92removedns b/meta/recipes-connectivity/ppp/ppp-2.4.5/92removedns
new file mode 100644
index 0000000000..2eadec6899
--- /dev/null
+++ b/meta/recipes-connectivity/ppp/ppp-2.4.5/92removedns
@@ -0,0 +1,5 @@
1#!/bin/sh
2ACTUALCONF=/var/run/resolv.conf
3if [ -f $ACTUALCONF.ppporig ] ; then
4 mv $ACTUALCONF.ppporig $ACTUALCONF
5fi
diff --git a/meta/recipes-connectivity/ppp/ppp-2.4.5/cifdefroute.patch b/meta/recipes-connectivity/ppp/ppp-2.4.5/cifdefroute.patch
new file mode 100644
index 0000000000..6473a08bc7
--- /dev/null
+++ b/meta/recipes-connectivity/ppp/ppp-2.4.5/cifdefroute.patch
@@ -0,0 +1,290 @@
1This patch comes from OpenEmbedded.
2The original patch is from Debian / SuSE to implement replacedefaultroute
3Rebased it to fit ppp-2.4.5. Dongxiao Xu <dongxiao.xu@intel.com>
4
5diff -urN ppp-2.4.5-orig/pppd/ipcp.c ppp-2.4.5/pppd/ipcp.c
6--- ppp-2.4.5-orig/pppd/ipcp.c 2010-06-30 15:51:12.050166398 +0800
7+++ ppp-2.4.5/pppd/ipcp.c 2010-06-30 16:40:00.478716855 +0800
8@@ -198,6 +198,16 @@
9 "disable defaultroute option", OPT_ALIAS | OPT_A2CLR,
10 &ipcp_wantoptions[0].default_route },
11
12+#ifdef __linux__
13+ { "replacedefaultroute", o_bool,
14+ &ipcp_wantoptions[0].replace_default_route,
15+ "Replace default route", 1
16+ },
17+ { "noreplacedefaultroute", o_bool,
18+ &ipcp_allowoptions[0].replace_default_route,
19+ "Never replace default route", OPT_A2COPY,
20+ &ipcp_wantoptions[0].replace_default_route },
21+#endif
22 { "proxyarp", o_bool, &ipcp_wantoptions[0].proxy_arp,
23 "Add proxy ARP entry", OPT_ENABLE|1, &ipcp_allowoptions[0].proxy_arp },
24 { "noproxyarp", o_bool, &ipcp_allowoptions[0].proxy_arp,
25@@ -271,7 +281,7 @@
26 ip_active_pkt
27 };
28
29-static void ipcp_clear_addrs __P((int, u_int32_t, u_int32_t));
30+static void ipcp_clear_addrs __P((int, u_int32_t, u_int32_t, bool));
31 static void ipcp_script __P((char *, int)); /* Run an up/down script */
32 static void ipcp_script_done __P((void *));
33
34@@ -1742,7 +1752,12 @@
35 if (!sifnpmode(u, PPP_IP, NPMODE_QUEUE))
36 return 0;
37 if (wo->default_route)
38+#ifndef __linux__
39 if (sifdefaultroute(u, wo->ouraddr, wo->hisaddr))
40+#else
41+ if (sifdefaultroute(u, wo->ouraddr, wo->hisaddr,
42+ wo->replace_default_route))
43+#endif
44 default_route_set[u] = 1;
45 if (wo->proxy_arp)
46 if (sifproxyarp(u, wo->hisaddr))
47@@ -1830,7 +1845,8 @@
48 */
49 if (demand) {
50 if (go->ouraddr != wo->ouraddr || ho->hisaddr != wo->hisaddr) {
51- ipcp_clear_addrs(f->unit, wo->ouraddr, wo->hisaddr);
52+ ipcp_clear_addrs(f->unit, wo->ouraddr, wo->hisaddr,
53+ wo->replace_default_route);
54 if (go->ouraddr != wo->ouraddr) {
55 warn("Local IP address changed to %I", go->ouraddr);
56 script_setenv("OLDIPLOCAL", ip_ntoa(wo->ouraddr), 0);
57@@ -1855,7 +1871,12 @@
58
59 /* assign a default route through the interface if required */
60 if (ipcp_wantoptions[f->unit].default_route)
61+#ifndef __linux__
62 if (sifdefaultroute(f->unit, go->ouraddr, ho->hisaddr))
63+#else
64+ if (sifdefaultroute(f->unit, go->ouraddr, ho->hisaddr,
65+ wo->replace_default_route))
66+#endif
67 default_route_set[f->unit] = 1;
68
69 /* Make a proxy ARP entry if requested. */
70@@ -1905,7 +1926,12 @@
71
72 /* assign a default route through the interface if required */
73 if (ipcp_wantoptions[f->unit].default_route)
74+#ifndef __linux__
75 if (sifdefaultroute(f->unit, go->ouraddr, ho->hisaddr))
76+#else
77+ if (sifdefaultroute(f->unit, go->ouraddr, ho->hisaddr,
78+ wo->replace_default_route))
79+#endif
80 default_route_set[f->unit] = 1;
81
82 /* Make a proxy ARP entry if requested. */
83@@ -1983,7 +2009,7 @@
84 sifnpmode(f->unit, PPP_IP, NPMODE_DROP);
85 sifdown(f->unit);
86 ipcp_clear_addrs(f->unit, ipcp_gotoptions[f->unit].ouraddr,
87- ipcp_hisoptions[f->unit].hisaddr);
88+ ipcp_hisoptions[f->unit].hisaddr, 0);
89 }
90
91 /* Execute the ip-down script */
92@@ -1999,12 +2025,21 @@
93 * proxy arp entries, etc.
94 */
95 static void
96-ipcp_clear_addrs(unit, ouraddr, hisaddr)
97+ipcp_clear_addrs(unit, ouraddr, hisaddr, replacedefaultroute)
98 int unit;
99 u_int32_t ouraddr; /* local address */
100 u_int32_t hisaddr; /* remote address */
101+ bool replacedefaultroute;
102 {
103- if (proxy_arp_set[unit]) {
104+ /* If replacedefaultroute, sifdefaultroute will be called soon
105+ * with replacedefaultroute set and that will overwrite the current
106+ * default route. This is the case only when doing demand, otherwise
107+ * during demand, this cifdefaultroute would restore the old default
108+ * route which is not what we want in this case. In the non-demand
109+ * case, we'll delete the default route and restore the old if there
110+ * is one saved by an sifdefaultroute with replacedefaultroute.
111+ */
112+ if (!replacedefaultroute && default_route_set[unit]) {
113 cifproxyarp(unit, hisaddr);
114 proxy_arp_set[unit] = 0;
115 }
116diff -urN ppp-2.4.5-orig/pppd/ipcp.h ppp-2.4.5/pppd/ipcp.h
117--- ppp-2.4.5-orig/pppd/ipcp.h 2010-06-30 15:51:12.043682063 +0800
118+++ ppp-2.4.5/pppd/ipcp.h 2010-06-30 16:40:49.586203129 +0800
119@@ -70,6 +70,7 @@
120 bool old_addrs; /* Use old (IP-Addresses) option? */
121 bool req_addr; /* Ask peer to send IP address? */
122 bool default_route; /* Assign default route through interface? */
123+ bool replace_default_route; /* Replace default route through interface? */
124 bool proxy_arp; /* Make proxy ARP entry for peer? */
125 bool neg_vj; /* Van Jacobson Compression? */
126 bool old_vj; /* use old (short) form of VJ option? */
127diff -urN ppp-2.4.5-orig/pppd/pppd.8 ppp-2.4.5/pppd/pppd.8
128--- ppp-2.4.5-orig/pppd/pppd.8 2010-06-30 15:51:12.043682063 +0800
129+++ ppp-2.4.5/pppd/pppd.8 2010-06-30 16:42:47.102413859 +0800
130@@ -121,6 +121,13 @@
131 This entry is removed when the PPP connection is broken. This option
132 is privileged if the \fInodefaultroute\fR option has been specified.
133 .TP
134+.B replacedefaultroute
135+This option is a flag to the defaultroute option. If defaultroute is
136+set and this flag is also set, pppd replaces an existing default route
137+with the new default route.
138+
139+
140+.TP
141 .B disconnect \fIscript
142 Execute the command specified by \fIscript\fR, by passing it to a
143 shell, after
144@@ -717,7 +724,12 @@
145 .TP
146 .B nodefaultroute
147 Disable the \fIdefaultroute\fR option. The system administrator who
148-wishes to prevent users from creating default routes with pppd
149+wishes to prevent users from adding a default route with pppd
150+can do so by placing this option in the /etc/ppp/options file.
151+.TP
152+.B noreplacedefaultroute
153+Disable the \fIreplacedefaultroute\fR option. The system administrator who
154+wishes to prevent users from replacing a default route with pppd
155 can do so by placing this option in the /etc/ppp/options file.
156 .TP
157 .B nodeflate
158diff -urN ppp-2.4.5-orig/pppd/pppd.h ppp-2.4.5/pppd/pppd.h
159--- ppp-2.4.5-orig/pppd/pppd.h 2010-06-30 15:51:12.050166398 +0800
160+++ ppp-2.4.5/pppd/pppd.h 2010-06-30 16:43:36.514148327 +0800
161@@ -643,7 +643,11 @@
162 int cif6addr __P((int, eui64_t, eui64_t));
163 /* Remove an IPv6 address from i/f */
164 #endif
165+#ifndef __linux__
166 int sifdefaultroute __P((int, u_int32_t, u_int32_t));
167+#else
168+int sifdefaultroute __P((int, u_int32_t, u_int32_t, bool replace_default_rt));
169+#endif
170 /* Create default route through i/f */
171 int cifdefaultroute __P((int, u_int32_t, u_int32_t));
172 /* Delete default route through i/f */
173diff -urN ppp-2.4.5-orig/pppd/sys-linux.c ppp-2.4.5/pppd/sys-linux.c
174--- ppp-2.4.5-orig/pppd/sys-linux.c 2010-06-30 15:51:12.050166398 +0800
175+++ ppp-2.4.5/pppd/sys-linux.c 2010-06-30 16:54:00.362716231 +0800
176@@ -206,6 +206,8 @@
177
178 static int if_is_up; /* Interface has been marked up */
179 static int have_default_route; /* Gateway for default route added */
180+static struct rtentry old_def_rt; /* Old default route */
181+static int default_rt_repl_rest; /* replace and restore old default rt */
182 static u_int32_t proxy_arp_addr; /* Addr for proxy arp entry added */
183 static char proxy_arp_dev[16]; /* Device for proxy arp entry */
184 static u_int32_t our_old_addr; /* for detecting address changes */
185@@ -1537,6 +1539,9 @@
186 p = NULL;
187 }
188
189+ SET_SA_FAMILY (rt->rt_dst, AF_INET);
190+ SET_SA_FAMILY (rt->rt_gateway, AF_INET);
191+
192 SIN_ADDR(rt->rt_dst) = strtoul(cols[route_dest_col], NULL, 16);
193 SIN_ADDR(rt->rt_gateway) = strtoul(cols[route_gw_col], NULL, 16);
194 SIN_ADDR(rt->rt_genmask) = strtoul(cols[route_mask_col], NULL, 16);
195@@ -1606,20 +1611,51 @@
196 /********************************************************************
197 *
198 * sifdefaultroute - assign a default route through the address given.
199- */
200-
201-int sifdefaultroute (int unit, u_int32_t ouraddr, u_int32_t gateway)
202-{
203- struct rtentry rt;
204-
205- if (defaultroute_exists(&rt) && strcmp(rt.rt_dev, ifname) != 0) {
206- if (rt.rt_flags & RTF_GATEWAY)
207- error("not replacing existing default route via %I",
208- SIN_ADDR(rt.rt_gateway));
209- else
210- error("not replacing existing default route through %s",
211- rt.rt_dev);
212- return 0;
213+ *
214+ * If the global default_rt_repl_rest flag is set, then this function
215+ * already replaced the original system defaultroute with some other
216+ * route and it should just replace the current defaultroute with
217+ * another one, without saving the current route. Use: demand mode,
218+ * when pppd sets first a defaultroute it it's temporary ppp0 addresses
219+ * and then changes the temporary addresses to the addresses for the real
220+ * ppp connection when it has come up.
221+ */
222+
223+int sifdefaultroute (int unit, u_int32_t ouraddr, u_int32_t gateway, bool replace)
224+{
225+ struct rtentry rt, tmp_rt;
226+ struct rtentry *del_rt = NULL;
227+
228+ if (default_rt_repl_rest) {
229+ /* We have already reclaced the original defaultroute, if we
230+ * are called again, we will delete the current default route
231+ * and set the new default route in this function.
232+ * - this is normally only the case the doing demand: */
233+ if (defaultroute_exists( &tmp_rt ))
234+ del_rt = &tmp_rt;
235+ } else if ( defaultroute_exists( &old_def_rt ) &&
236+ strcmp( old_def_rt.rt_dev, ifname ) != 0) {
237+ /* We did not yet replace an existing default route, let's
238+ * check if we should save and replace a default route:
239+ */
240+ u_int32_t old_gateway = SIN_ADDR(old_def_rt.rt_gateway);
241+ if (old_gateway != gateway) {
242+ if (!replace) {
243+ error("not replacing default route to %s [%I]",
244+ old_def_rt.rt_dev, old_gateway);
245+ return 0;
246+ } else {
247+ // we need to copy rt_dev because we need it permanent too:
248+ char * tmp_dev = malloc(strlen(old_def_rt.rt_dev)+1);
249+ strcpy(tmp_dev, old_def_rt.rt_dev);
250+ old_def_rt.rt_dev = tmp_dev;
251+
252+ notice("replacing old default route to %s [%I]",
253+ old_def_rt.rt_dev, old_gateway);
254+ default_rt_repl_rest = 1;
255+ del_rt = &old_def_rt;
256+ }
257+ }
258 }
259
260 memset (&rt, 0, sizeof (rt));
261@@ -1638,6 +1674,12 @@
262 error("default route ioctl(SIOCADDRT): %m");
263 return 0;
264 }
265+ if (default_rt_repl_rest && del_rt)
266+ if (ioctl(sock_fd, SIOCDELRT, del_rt) < 0) {
267+ if ( ! ok_error ( errno ))
268+ error("del old default route ioctl(SIOCDELRT): %m(%d)", errno);
269+ return 0;
270+ }
271
272 have_default_route = 1;
273 return 1;
274@@ -1673,6 +1715,16 @@
275 return 0;
276 }
277 }
278+ if (default_rt_repl_rest) {
279+ notice("restoring old default route to %s [%I]",
280+ old_def_rt.rt_dev, SIN_ADDR(old_def_rt.rt_gateway));
281+ if (ioctl(sock_fd, SIOCADDRT, &old_def_rt) < 0) {
282+ if ( ! ok_error ( errno ))
283+ error("restore default route ioctl(SIOCADDRT): %m(%d)", errno);
284+ return 0;
285+ }
286+ default_rt_repl_rest = 0;
287+ }
288
289 return 1;
290 }
diff --git a/meta/recipes-connectivity/ppp/ppp-2.4.5/enable-ipv6.patch b/meta/recipes-connectivity/ppp/ppp-2.4.5/enable-ipv6.patch
new file mode 100644
index 0000000000..daa7f2ecc6
--- /dev/null
+++ b/meta/recipes-connectivity/ppp/ppp-2.4.5/enable-ipv6.patch
@@ -0,0 +1,13 @@
1The patch comes from OpenEmbedded
2
3--- ppp-2.4.3/pppd/Makefile.linux.orig 2005-10-28 21:07:40.396359250 +0100
4+++ ppp-2.4.3/pppd/Makefile.linux 2005-10-28 21:07:54.217223000 +0100
5@@ -62,7 +62,7 @@
6
7 HAS_SHADOW=y
8 #USE_PAM=y
9-#HAVE_INET6=y
10+HAVE_INET6=y
11
12 # Enable plugins
13 PLUGIN=y
diff --git a/meta/recipes-connectivity/ppp/ppp-2.4.5/init b/meta/recipes-connectivity/ppp/ppp-2.4.5/init
new file mode 100755
index 0000000000..5b3b7abe2f
--- /dev/null
+++ b/meta/recipes-connectivity/ppp/ppp-2.4.5/init
@@ -0,0 +1,50 @@
1#!/bin/sh
2#
3# /etc/init.d/ppp: start or stop PPP link.
4#
5# If you want PPP started on boot time (most dialup systems won't need it)
6# rename the /etc/ppp/no_ppp_on_boot file to /etc/ppp/ppp_on_boot, and
7# follow the instructions in the comments in that file.
8
9test -x /usr/sbin/pppd -a -f /etc/ppp/ppp_on_boot || exit 0
10if [ -x /etc/ppp/ppp_on_boot ]; then RUNFILE=1; fi
11
12case "$1" in
13 start)
14 echo -n "Starting up PPP link: pppd"
15 if [ "$RUNFILE" = "1" ]; then
16 /etc/ppp/ppp_on_boot
17 else
18 pppd call provider
19 fi
20 echo "."
21 ;;
22 stop)
23 echo -n "Shutting down PPP link: pppd"
24 if [ "$RUNFILE" = "1" ]; then
25 poff
26 else
27 poff provider
28 fi
29 echo "."
30 ;;
31 restart|force-reload)
32 echo -n "Restarting PPP link: pppd"
33 if [ "$RUNFILE" = "1" ]; then
34 poff
35 sleep 5
36 /etc/ppp/ppp_on_boot
37 else
38 poff provider
39 sleep 5
40 pppd call provider
41 fi
42 echo "."
43 ;;
44 *)
45 echo "Usage: /etc/init.d/ppp {start|stop|restart|force-reload}"
46 exit 1
47 ;;
48esac
49
50exit 0
diff --git a/meta/recipes-connectivity/ppp/ppp-2.4.5/ip-down b/meta/recipes-connectivity/ppp/ppp-2.4.5/ip-down
new file mode 100755
index 0000000000..06d35487a5
--- /dev/null
+++ b/meta/recipes-connectivity/ppp/ppp-2.4.5/ip-down
@@ -0,0 +1,43 @@
1#!/bin/sh
2#
3# $Id: ip-down,v 1.2 1998/02/10 21:21:55 phil Exp $
4#
5# This script is run by the pppd _after_ the link is brought down.
6# It uses run-parts to run scripts in /etc/ppp/ip-down.d, so to delete
7# routes, unset IP addresses etc. you should create script(s) there.
8#
9# Be aware that other packages may include /etc/ppp/ip-down.d scripts (named
10# after that package), so choose local script names with that in mind.
11#
12# This script is called with the following arguments:
13# Arg Name Example
14# $1 Interface name ppp0
15# $2 The tty ttyS1
16# $3 The link speed 38400
17# $4 Local IP number 12.34.56.78
18# $5 Peer IP number 12.34.56.99
19# $6 Optional ``ipparam'' value foo
20
21# The environment is cleared before executing this script
22# so the path must be reset
23PATH=/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin
24export PATH
25# These variables are for the use of the scripts run by run-parts
26PPP_IFACE="$1"
27PPP_TTY="$2"
28PPP_SPEED="$3"
29PPP_LOCAL="$4"
30PPP_REMOTE="$5"
31PPP_IPPARAM="$6"
32export PPP_IFACE PPP_TTY PPP_SPEED PPP_LOCAL PPP_REMOTE PPP_IPPARAM
33
34# as an additional convenience, $PPP_TTYNAME is set to the tty name,
35# stripped of /dev/ (if present) for easier matching.
36PPP_TTYNAME=`/usr/bin/basename "$2"`
37export PPP_TTYNAME
38
39# Main Script starts here
40
41run-parts /etc/ppp/ip-down.d
42
43# last line
diff --git a/meta/recipes-connectivity/ppp/ppp-2.4.5/ip-up b/meta/recipes-connectivity/ppp/ppp-2.4.5/ip-up
new file mode 100755
index 0000000000..fc2fae9fe0
--- /dev/null
+++ b/meta/recipes-connectivity/ppp/ppp-2.4.5/ip-up
@@ -0,0 +1,44 @@
1#!/bin/sh
2#
3# $Id: ip-up,v 1.2 1998/02/10 21:25:34 phil Exp $
4#
5# This script is run by the pppd after the link is established.
6# It uses run-parts to run scripts in /etc/ppp/ip-up.d, so to add routes,
7# set IP address, run the mailq etc. you should create script(s) there.
8#
9# Be aware that other packages may include /etc/ppp/ip-up.d scripts (named
10# after that package), so choose local script names with that in mind.
11#
12# This script is called with the following arguments:
13# Arg Name Example
14# $1 Interface name ppp0
15# $2 The tty ttyS1
16# $3 The link speed 38400
17# $4 Local IP number 12.34.56.78
18# $5 Peer IP number 12.34.56.99
19# $6 Optional ``ipparam'' value foo
20
21# The environment is cleared before executing this script
22# so the path must be reset
23PATH=/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin
24export PATH
25# These variables are for the use of the scripts run by run-parts
26PPP_IFACE="$1"
27PPP_TTY="$2"
28PPP_SPEED="$3"
29PPP_LOCAL="$4"
30PPP_REMOTE="$5"
31PPP_IPPARAM="$6"
32export PPP_IFACE PPP_TTY PPP_SPEED PPP_LOCAL PPP_REMOTE PPP_IPPARAM
33
34
35# as an additional convenience, $PPP_TTYNAME is set to the tty name,
36# stripped of /dev/ (if present) for easier matching.
37PPP_TTYNAME=`/usr/bin/basename "$2"`
38export PPP_TTYNAME
39
40# Main Script starts here
41
42run-parts /etc/ppp/ip-up.d
43
44# last line
diff --git a/meta/recipes-connectivity/ppp/ppp-2.4.5/makefile-remove-hard-usr-reference.patch b/meta/recipes-connectivity/ppp/ppp-2.4.5/makefile-remove-hard-usr-reference.patch
new file mode 100644
index 0000000000..9ba868839e
--- /dev/null
+++ b/meta/recipes-connectivity/ppp/ppp-2.4.5/makefile-remove-hard-usr-reference.patch
@@ -0,0 +1,19 @@
1The patch comes from OpenEmbedded.
2Rebased for ppp-2.4.5. Dongxiao Xu <dongxiao.xu@intel.com>
3
4diff -urN ppp-2.4.5-orig/pppd/Makefile.linux ppp-2.4.5/pppd/Makefile.linux
5--- ppp-2.4.5-orig/pppd/Makefile.linux 2010-06-30 15:51:12.043682063 +0800
6+++ ppp-2.4.5/pppd/Makefile.linux 2010-06-30 17:08:21.806363042 +0800
7@@ -117,10 +117,10 @@
8 #LIBS += -lshadow $(LIBS)
9 endif
10
11-ifneq ($(wildcard /usr/include/crypt.h),)
12+#ifneq ($(wildcard /usr/include/crypt.h),)
13 CFLAGS += -DHAVE_CRYPT_H=1
14 LIBS += -lcrypt
15-endif
16+#endif
17
18 ifdef NEEDDES
19 ifndef USE_CRYPT
diff --git a/meta/recipes-connectivity/ppp/ppp-2.4.5/makefile.patch b/meta/recipes-connectivity/ppp/ppp-2.4.5/makefile.patch
new file mode 100644
index 0000000000..94af5af6de
--- /dev/null
+++ b/meta/recipes-connectivity/ppp/ppp-2.4.5/makefile.patch
@@ -0,0 +1,93 @@
1The patch comes from OpenEmbedded
2Rebased for ppp-2.4.5. Dongxiao Xu <dongxiao.xu@intel.com>
3
4diff -ruN ppp-2.4.5-orig/chat/Makefile.linux ppp-2.4.5/chat/Makefile.linux
5--- ppp-2.4.5-orig/chat/Makefile.linux 2010-06-30 15:51:12.050166398 +0800
6+++ ppp-2.4.5/chat/Makefile.linux 2010-06-30 15:51:30.450118446 +0800
7@@ -25,7 +25,7 @@
8
9 install: chat
10 mkdir -p $(BINDIR) $(MANDIR)
11- $(INSTALL) -s -c chat $(BINDIR)
12+ $(INSTALL) -c chat $(BINDIR)
13 $(INSTALL) -c -m 644 chat.8 $(MANDIR)
14
15 clean:
16diff -ruN ppp-2.4.5-orig/pppd/Makefile.linux ppp-2.4.5/pppd/Makefile.linux
17--- ppp-2.4.5-orig/pppd/Makefile.linux 2010-06-30 15:51:12.043682063 +0800
18+++ ppp-2.4.5/pppd/Makefile.linux 2010-06-30 15:52:11.214170607 +0800
19@@ -99,7 +99,7 @@
20 CFLAGS += -DUSE_SRP -DOPENSSL -I/usr/local/ssl/include
21 LIBS += -lsrp -L/usr/local/ssl/lib -lcrypto
22 TARGETS += srp-entry
23-EXTRAINSTALL = $(INSTALL) -s -c -m 555 srp-entry $(BINDIR)/srp-entry
24+EXTRAINSTALL = $(INSTALL) -c -m 555 srp-entry $(BINDIR)/srp-entry
25 MANPAGES += srp-entry.8
26 EXTRACLEAN += srp-entry.o
27 NEEDDES=y
28@@ -200,7 +200,7 @@
29 install: pppd
30 mkdir -p $(BINDIR) $(MANDIR)
31 $(EXTRAINSTALL)
32- $(INSTALL) -s -c -m 555 pppd $(BINDIR)/pppd
33+ $(INSTALL) -c -m 555 pppd $(BINDIR)/pppd
34 if chgrp pppusers $(BINDIR)/pppd 2>/dev/null; then \
35 chmod o-rx,u+s $(BINDIR)/pppd; fi
36 $(INSTALL) -c -m 444 pppd.8 $(MANDIR)
37diff -ruN ppp-2.4.5-orig/pppd/plugins/radius/Makefile.linux ppp-2.4.5/pppd/plugins/radius/Makefile.linux
38--- ppp-2.4.5-orig/pppd/plugins/radius/Makefile.linux 2010-06-30 15:51:12.047676187 +0800
39+++ ppp-2.4.5/pppd/plugins/radius/Makefile.linux 2010-06-30 15:53:47.750182267 +0800
40@@ -36,11 +36,11 @@
41
42 install: all
43 $(INSTALL) -d -m 755 $(LIBDIR)
44- $(INSTALL) -s -c -m 755 radius.so $(LIBDIR)
45- $(INSTALL) -s -c -m 755 radattr.so $(LIBDIR)
46- $(INSTALL) -s -c -m 755 radrealms.so $(LIBDIR)
47- $(INSTALL) -c -m 444 pppd-radius.8 $(MANDIR)
48- $(INSTALL) -c -m 444 pppd-radattr.8 $(MANDIR)
49+ $(INSTALL) -c -m 755 radius.so $(LIBDIR)
50+ $(INSTALL) -c -m 755 radattr.so $(LIBDIR)
51+ $(INSTALL) -c -m 755 radrealms.so $(LIBDIR)
52+ $(INSTALL) -m 444 pppd-radius.8 $(MANDIR)
53+ $(INSTALL) -m 444 pppd-radattr.8 $(MANDIR)
54
55 radius.so: radius.o libradiusclient.a
56 $(CC) -o radius.so -shared radius.o libradiusclient.a
57diff -ruN ppp-2.4.5-orig/pppd/plugins/rp-pppoe/Makefile.linux ppp-2.4.5/pppd/plugins/rp-pppoe/Makefile.linux
58--- ppp-2.4.5-orig/pppd/plugins/rp-pppoe/Makefile.linux 2010-06-30 15:51:12.047676187 +0800
59+++ ppp-2.4.5/pppd/plugins/rp-pppoe/Makefile.linux 2010-06-30 15:53:15.454486877 +0800
60@@ -43,9 +43,9 @@
61
62 install: all
63 $(INSTALL) -d -m 755 $(LIBDIR)
64- $(INSTALL) -s -c -m 4550 rp-pppoe.so $(LIBDIR)
65+ $(INSTALL) -c -m 4550 rp-pppoe.so $(LIBDIR)
66 $(INSTALL) -d -m 755 $(BINDIR)
67- $(INSTALL) -s -c -m 555 pppoe-discovery $(BINDIR)
68+ $(INSTALL) -c -m 555 pppoe-discovery $(BINDIR)
69
70 clean:
71 rm -f *.o *.so pppoe-discovery
72diff -ruN ppp-2.4.5-orig/pppdump/Makefile.linux ppp-2.4.5/pppdump/Makefile.linux
73--- ppp-2.4.5-orig/pppdump/Makefile.linux 2010-06-30 15:51:12.058183383 +0800
74+++ ppp-2.4.5/pppdump/Makefile.linux 2010-06-30 15:52:25.762183537 +0800
75@@ -17,5 +17,5 @@
76
77 install:
78 mkdir -p $(BINDIR) $(MANDIR)
79- $(INSTALL) -s -c pppdump $(BINDIR)
80+ $(INSTALL) -c pppdump $(BINDIR)
81 $(INSTALL) -c -m 444 pppdump.8 $(MANDIR)
82diff -ruN ppp-2.4.5-orig/pppstats/Makefile.linux ppp-2.4.5/pppstats/Makefile.linux
83--- ppp-2.4.5-orig/pppstats/Makefile.linux 2010-06-30 15:51:12.058183383 +0800
84+++ ppp-2.4.5/pppstats/Makefile.linux 2010-06-30 15:52:42.486341081 +0800
85@@ -22,7 +22,7 @@
86
87 install: pppstats
88 -mkdir -p $(MANDIR)
89- $(INSTALL) -s -c pppstats $(BINDIR)
90+ $(INSTALL) -c pppstats $(BINDIR)
91 $(INSTALL) -c -m 444 pppstats.8 $(MANDIR)
92
93 pppstats: $(PPPSTATSRCS)
diff --git a/meta/recipes-connectivity/ppp/ppp-2.4.5/poff b/meta/recipes-connectivity/ppp/ppp-2.4.5/poff
new file mode 100644
index 0000000000..0521a9406a
--- /dev/null
+++ b/meta/recipes-connectivity/ppp/ppp-2.4.5/poff
@@ -0,0 +1,26 @@
1#!/bin/sh
2
3# Lets see how many pppds are running....
4set -- `cat /var/run/ppp*.pid 2>/dev/null`
5
6case $# in
7 0) # pppd only creates a pid file once ppp is up, so let's try killing pppd
8 # on the assumption that we've not got that far yet.
9 killall pppd
10 ;;
11 1) # If only one was running then it can be killed (apparently killall
12 # caused problems for some, so lets try killing the pid from the file)
13 kill $1
14 ;;
15 *) # More than one! Aieehh.. Dont know which one to kill.
16 echo "More than one pppd running. None stopped"
17 exit 1
18 ;;
19esac
20
21if [ -r /var/run/ppp-quick ]
22then
23 rm -f /var/run/ppp-quick
24fi
25
26exit 0
diff --git a/meta/recipes-connectivity/ppp/ppp-2.4.5/pon b/meta/recipes-connectivity/ppp/ppp-2.4.5/pon
new file mode 100644
index 0000000000..91c059501a
--- /dev/null
+++ b/meta/recipes-connectivity/ppp/ppp-2.4.5/pon
@@ -0,0 +1,9 @@
1#!/bin/sh
2
3if [ "$1" = "quick" ]
4then
5 touch /var/run/ppp-quick
6 shift
7fi
8
9/usr/sbin/pppd call ${1:-provider}
diff --git a/meta/recipes-connectivity/ppp/ppp-2.4.5/pppd-resolv-varrun.patch b/meta/recipes-connectivity/ppp/ppp-2.4.5/pppd-resolv-varrun.patch
new file mode 100644
index 0000000000..c4e61fdd28
--- /dev/null
+++ b/meta/recipes-connectivity/ppp/ppp-2.4.5/pppd-resolv-varrun.patch
@@ -0,0 +1,43 @@
1The patch comes from OpenEmbedded
2Rebased for ppp-2.4.5. Dongxiao Xu <dongxiao.xu@intel.com>
3
4diff -ruN ppp-2.4.5-orig/pppd/ipcp.c ppp-2.4.5/pppd/ipcp.c
5--- ppp-2.4.5-orig/pppd/ipcp.c 2010-06-30 15:51:12.050166398 +0800
6+++ ppp-2.4.5/pppd/ipcp.c 2010-06-30 17:02:33.930393283 +0800
7@@ -55,6 +55,8 @@
8 #include <sys/socket.h>
9 #include <netinet/in.h>
10 #include <arpa/inet.h>
11+#include <sys/stat.h>
12+#include <unistd.h>
13
14 #include "pppd.h"
15 #include "fsm.h"
16@@ -2095,6 +2097,14 @@
17 u_int32_t peerdns1, peerdns2;
18 {
19 FILE *f;
20+ struct stat dirinfo;
21+
22+ if(stat(_PATH_OUTDIR, &dirinfo)) {
23+ if(mkdir(_PATH_OUTDIR, 0775)) {
24+ error("Failed to create directory %s: %m", _PATH_OUTDIR);
25+ return;
26+ }
27+ }
28
29 f = fopen(_PATH_RESOLV, "w");
30 if (f == NULL) {
31diff -ruN ppp-2.4.5-orig/pppd/pathnames.h ppp-2.4.5/pppd/pathnames.h
32--- ppp-2.4.5-orig/pppd/pathnames.h 2010-06-30 15:51:12.043682063 +0800
33+++ ppp-2.4.5/pppd/pathnames.h 2010-06-30 17:03:20.594371055 +0800
34@@ -30,7 +30,8 @@
35 #define _PATH_TTYOPT _ROOT_PATH "/etc/ppp/options."
36 #define _PATH_CONNERRS _ROOT_PATH "/etc/ppp/connect-errors"
37 #define _PATH_PEERFILES _ROOT_PATH "/etc/ppp/peers/"
38-#define _PATH_RESOLV _ROOT_PATH "/etc/ppp/resolv.conf"
39+#define _PATH_OUTDIR _ROOT_PATH _PATH_VARRUN "/ppp"
40+#define _PATH_RESOLV _PATH_OUTDIR "/resolv.conf"
41
42 #define _PATH_USEROPT ".ppprc"
43 #define _PATH_PSEUDONYM ".ppp_pseudonym"
diff --git a/meta/recipes-connectivity/ppp/ppp_2.4.5.bb b/meta/recipes-connectivity/ppp/ppp_2.4.5.bb
new file mode 100644
index 0000000000..e9caf3d13e
--- /dev/null
+++ b/meta/recipes-connectivity/ppp/ppp_2.4.5.bb
@@ -0,0 +1,77 @@
1DESCRIPTION = "ppp (Paul's PPP Package) is an open source package which implements \
2the Point-to-Point Protocol (PPP) on Linux and Solaris systems."
3SECTION = "console/network"
4HOMEPAGE = "http://samba.org/ppp/"
5BUGTRACKER = "http://ppp.samba.org/cgi-bin/ppp-bugs"
6DEPENDS = "libpcap"
7LICENSE = "BSD & GPLv2+ & LGPLv2+ & public domain"
8LIC_FILES_CHKSUM = "file://pppd/ccp.c;beginline=1;endline=29;md5=e2c43fe6e81ff77d87dc9c290a424dea \
9 file://pppd/plugins/passprompt.c;beginline=1;endline=10;md5=3bcbcdbf0e369c9a3e0b8c8275b065d8 \
10 file://pppd/tdb.c;beginline=1;endline=27;md5=4ca3a9991b011038d085d6675ae7c4e6 \
11 file://chat/chat.c;beginline=1;endline=15;md5=0d374b8545ee5c62d7aff1acbd38add2"
12PR = "r0"
13
14SRC_URI = "http://ppp.samba.org/ftp/ppp/ppp-${PV}.tar.gz \
15 file://makefile.patch \
16 file://cifdefroute.patch \
17 file://pppd-resolv-varrun.patch \
18 file://enable-ipv6.patch \
19 file://makefile-remove-hard-usr-reference.patch \
20 file://pon \
21 file://poff \
22 file://init \
23 file://ip-up \
24 file://ip-down \
25 file://08setupdns \
26 file://92removedns"
27
28SRC_URI_append_nylon = " file://ppp-tdbread.patch;patch=1"
29
30inherit autotools
31
32EXTRA_OEMAKE = "STRIPPROG=${STRIP} MANDIR=${D}${datadir}/man/man8 INCDIR=${D}/usr/include LIBDIR=${D}/usr/lib/pppd/${PV} BINDIR=${D}/usr/sbin"
33EXTRA_OECONF = "--disable-strip"
34
35do_install_append () {
36 make install-etcppp ETCDIR=${D}/${sysconfdir}/ppp
37 mkdir -p ${D}${bindir}/ ${D}${sysconfdir}/init.d
38 mkdir -p ${D}${sysconfdir}/ppp/ip-up.d/
39 mkdir -p ${D}${sysconfdir}/ppp/ip-down.d/
40 install -m 0755 ${WORKDIR}/pon ${D}${bindir}/pon
41 install -m 0755 ${WORKDIR}/poff ${D}${bindir}/poff
42 install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/ppp
43 install -m 0755 ${WORKDIR}/ip-up ${D}${sysconfdir}/ppp/
44 install -m 0755 ${WORKDIR}/ip-down ${D}${sysconfdir}/ppp/
45 install -m 0755 ${WORKDIR}/08setupdns ${D}${sysconfdir}/ppp/ip-up.d/
46 install -m 0755 ${WORKDIR}/92removedns ${D}${sysconfdir}/ppp/ip-down.d/
47 rm -rf ${D}/${mandir}/man8/man8
48}
49
50CONFFILES_${PN} = "${sysconfdir}/ppp/pap-secrets ${sysconfdir}/ppp/chap-secrets ${sysconfdir}/ppp/options"
51PACKAGES += "ppp-oa ppp-oe ppp-radius ppp-winbind ppp-minconn ppp-password ppp-tools"
52FILES_${PN} = "/etc /usr/bin /usr/sbin/chat /usr/sbin/pppd"
53FILES_${PN}_nylon = "/etc /usr/bin /usr/sbin/chat /usr/sbin/pppd /usr/sbin/tdbread"
54FILES_${PN}-dbg += "${libdir}/pppd/2.4.3/.debug"
55FILES_ppp-oa = "/usr/lib/pppd/2.4.3/pppoatm.so"
56FILES_ppp-oe = "/usr/sbin/pppoe-discovery /usr/lib/pppd/2.4.3/rp-pppoe.so"
57FILES_ppp-radius = "/usr/lib/pppd/2.4.3/radius.so /usr/lib/pppd/2.4.3/radattr.so /usr/lib/pppd/2.4.3/radrealms.so"
58FILES_ppp-winbind = "/usr/lib/pppd/2.4.3/winbind.so"
59FILES_ppp-minconn = "/usr/lib/pppd/2.4.3/minconn.so"
60FILES_ppp-password = "/usr/lib/pppd/2.4.3/pass*.so"
61FILES_ppp-tools = "/usr/sbin/pppstats /usr/sbin/pppdump"
62DESCRIPTION_ppp-oa = "Plugin for PPP needed for PPP-over-ATM"
63DESCRIPTION_ppp-oe = "Plugin for PPP needed for PPP-over-Ethernet"
64DESCRIPTION_ppp-radius = "Plugin for PPP that are related to RADIUS"
65DESCRIPTION_ppp-winbind = "Plugin for PPP to authenticate against Samba or Windows"
66DESCRIPTION_ppp-minconn = "Plugin for PPP to specify a minimum connect time before the idle timeout applies"
67DESCRIPTION_ppp-password = "Plugin for PPP to get passwords via a pipe"
68DESCRIPTION_ppp-tools = "The pppdump and pppstats utitilities"
69RDEPENDS_ppp_minconn += "libpcap0.8"
70
71pkg_postinst_${PN}() {
72if test "x$D" != "x"; then
73 exit 1
74else
75 chmod u+s ${sbindir}/pppd
76fi
77}
diff --git a/meta/recipes-connectivity/resolvconf/resolvconf_1.43.bb b/meta/recipes-connectivity/resolvconf/resolvconf_1.43.bb
new file mode 100644
index 0000000000..f751f17e0e
--- /dev/null
+++ b/meta/recipes-connectivity/resolvconf/resolvconf_1.43.bb
@@ -0,0 +1,30 @@
1DESCRIPTION = "Resolvconf is a framework for keeping track of the system's \
2information about currently available nameservers. It sets \
3itself up as the intermediary between programs that supply \
4nameserver information and programs that need nameserver \
5information."
6SECTION = "console/network"
7LICENSE = "GPL"
8AUTHOR = "Thomas Hood"
9HOMEPAGE = "http://packages.debian.org/resolvconf"
10DEPENDS = "bash"
11RDEPENDS = "bash"
12PR = "r1"
13
14SRC_URI = "${DEBIAN_MIRROR}/main/r/resolvconf/resolvconf_${PV}.tar.gz"
15
16do_compile () {
17 :
18}
19
20do_install () {
21 install -d ${D}${sysconfdir} ${D}${sbindir} ${D}${base_sbindir} ${D}${localstatedir}/volatile/run/resolvconf/interface
22 install -d ${D}${mandir}/man8 ${D}${docdir}/${P}
23 cp -pPR etc/* ${D}${sysconfdir}/
24 install -m 0755 bin/resolvconf ${D}${base_sbindir}/
25 install -m 0644 README ${D}${docdir}/${P}/
26 install -m 0644 man/resolvconf.8 ${D}${mandir}/man8/
27}
28
29PACKAGE_ARCH = "all"
30
diff --git a/meta/recipes-connectivity/wbxml/files/no-doc-install.patch b/meta/recipes-connectivity/wbxml/files/no-doc-install.patch
new file mode 100644
index 0000000000..16084e60e6
--- /dev/null
+++ b/meta/recipes-connectivity/wbxml/files/no-doc-install.patch
@@ -0,0 +1,15 @@
1--- wbxml2-0.9.2/Makefile.am.old 2007-01-03 19:50:24.000000000 +0000
2+++ wbxml2-0.9.2/Makefile.am 2007-01-03 19:50:39.000000000 +0000
3@@ -24,9 +24,9 @@
4 TODO\
5 doxygen.h
6
7-install-data-local:
8- $(mkinstalldirs) $(DESTDIR)$(wbxmldocdir)/manual
9- cp -Rp doc/* $(DESTDIR)$(wbxmldocdir)/manual
10+#install-data-local:
11+# $(mkinstalldirs) $(DESTDIR)$(wbxmldocdir)/manual
12+# cp -Rp doc/* $(DESTDIR)$(wbxmldocdir)/manual
13
14 dist-bz2: distdir
15 sed -e "s/tar.gz/tar.bz2/g" $(distdir)/wbxml2.spec > $(distdir)/wbxml2.spec.aux
diff --git a/meta/recipes-connectivity/wbxml/wbxml2_0.9.2.bb b/meta/recipes-connectivity/wbxml/wbxml2_0.9.2.bb
new file mode 100644
index 0000000000..b8ba8c747f
--- /dev/null
+++ b/meta/recipes-connectivity/wbxml/wbxml2_0.9.2.bb
@@ -0,0 +1,20 @@
1DESCRIPTION = "parser for wbxml"
2LICENSE = "GPLv2"
3
4DEPENDS = "libxml2 sed-native expat"
5
6SRC_URI = "${SOURCEFORGE_MIRROR}/wbxmllib/${P}.tar.gz \
7 file://no-doc-install.patch;patch=1"
8
9inherit autotools pkgconfig
10
11do_configure_append() {
12 sed -i s:-I/usr/include::g Makefile
13 sed -i s:-I/usr/include::g */Makefile
14}
15
16PACKAGES += "${PN}-tools"
17
18FILES_${PN}-tools = "${bindir}"
19FILES_${PN} = "${libdir}/*.so.*"
20