Re: [ptxdist] Ptxdist error : Failed to source lib

2011-01-12 Thread EL MEHRAZ Haytem
Hi Raph,

Thanks for your advice, its works like a charm with "ptxdist-2010.07.0" ;-)

Have a nice day



-Message d'origine-
De : ptxdist-boun...@pengutronix.de [mailto:ptxdist-boun...@pengutronix.de] De 
la part de Raphaël Martin
Envoyé : lundi 10 janvier 2011 15:12
À : ptxdist@pengutronix.de
Objet : Re: [ptxdist] Ptxdist error : Failed to source lib

Le lundi 10 jan 2011 à 14:39:37 (+0100), EL MEHRAZ Haytem écrivait : 
>Hi All,

Hi Haytem,

>I'm a new ptxdist user.
>After selecting commands like "ptxdist go", "ptxdist menuconfig kernel", I
>obtain this error:
> 
>error: failed to source lib:
>/usr/local/lib/ptxdist-1.99.19.1/scripts/lib/ptxd_make_00-init.sh
>
>any idea about how to solve it??

Got the same error a few weeks ago.
Solved it with the help of some ptxdist experts. You should not use the
binary version of the Toolchain as installed by the Phytec toolkit of
your demo board. It's defective (or maybe only working on their OpenSuse
platform).

You should rebuild from source your own OSELAS Toolchain with ptxdist.
And if you use the ptxdist version delivered on your kit for your BSP
(1.99.19.1), Toolchain compile will fail. You will need
"ptxdist-2010.08.0" to compile it successfully.
Then you can use the old one for your BSP.

-- 
Raphaël Martin
.
%{---+
 | People pray to Jesus, but Jesus prays to Linus Torvalds.  |
 | -- Linus Torvalds facts   |
 +---%}

-- 
ptxdist mailing list
ptxdist@pengutronix.de


-- 
ptxdist mailing list
ptxdist@pengutronix.de


Re: [ptxdist] use ptxdist with vim

2011-01-12 Thread Robert Schwebel
On Wed, Jan 12, 2011 at 01:06:11PM +0100, Benoît Burnichon wrote:
> This will work in only the topdir directory. Suppose I am working on a
> package named foo, I would open vim in directory
> $PROJECT_DIR/local_src/foo-trunk/
>
> If a type !ptxdist clean foo, there will be an error as the
> current directory will not be the $PROJECT_DIR. This way, I cannot
> start the write, compile, test loop

I usually have one vi for the sources open, plus a shell for the ptxdist
commands :-) But feel free to propose better workflow ideas.

rsc
-- 
Pengutronix e.K.   | |
Industrial Linux Solutions | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0|
Amtsgericht Hildesheim, HRA 2686   | Fax:   +49-5121-206917- |

-- 
ptxdist mailing list
ptxdist@pengutronix.de


Re: [ptxdist] finding includes with cmake based projects

2011-01-12 Thread Alexander Dahl
Hello there,

>> So does someone have a hint, how to successfully include the right
>> header files from the cross compiling build tree and linking against
>> the appropriate libraries then in our cmake files?
>
> The problem occurs when running cmake, right? How do you search for the
> headers?

Exactly.

> You should use find_path(...). If you use the default prepare stage, then
> cmake is called with the proper parameters to find stuff in
> sysroot-target.

This looks only slightly different in our rule:

$(STATEDIR)/foo.prepare:
@$(call targetinfo, $@)
@$(call clean, $(FOO_DIR)/config.cache)
rm -rf $(FOO_BUILD_DIR)
mkdir -p $(FOO_BUILD_DIR)
cd $(FOO_BUILD_DIR)/ && \
$(FOO_PATH) $(FOO_CONF_ENV) \
cmake .. $(FOO_CMAKE)
@$(call touch, $@)

compared to what is stated in the "manual":

$(STATEDIR)/@pack...@.prepare:
@$(call targetinfo)
@$(call clean, $(@pack...@_dir)/config.cache)
cd $(@pack...@_dir) && \
$(@pack...@_path) $(@pack...@_env) \
cmake $(@pack...@_cmake)
@$(call touch)

The PATH and ENV variables are set the same, the only difference is an
explicit out-of-source-build with cmake. I found some subtly errors in
other parts of our rule and some other errors in our
FindNETSNMP.cmake. Currently the latter looks like this:

IF(NOT NETSNMP_INCLUDE_DIR)
find_path(NETSNMP_INCLUDE_DIR
NAMES
net-snmp-includes.h
net-snmp-config.h
PATHS
/usr/include
/usr/local/include
PATH_SUFFIXES
net-snmp
)
ENDIF()

IF(NOT NETSNMP_LIBRARIES)
find_library(NETSNMP_LIBRARIES
NAMES
netsnmp
PATHS
/usr/lib
/usr/local/lib
)
ENDIF()

IF (NETSNMP_INCLUDE_DIR AND NETSNMP_LIBRARIES)
SET(NETSNMP_FOUND "YES")
ELSE ()
SET(NETSNMP_FOUND "NO")
ENDIF ()

IF (NETSNMP_FOUND)
IF (NOT NETSNMP_FIND_QUIETLY)
MESSAGE(STATUS "Found netsnmp library: ${NETSNMP_LIBRARIES}")
ENDIF ()
ELSE ()
IF (NOT NETSNMP_FIND_QUIETLY)
MESSAGE(STATUS "Could not find netsnmp library.")
ENDIF ()
ENDIF ()

MARK_AS_ADVANCED(NETSNMP_INCLUDE_DIR NETSNMP_LIBRARIES)

However this doesn't work correctly yet. In our rule file we still set
the following:

FOO_CMAKE += -DLIBCGI_INCLUDE_DIR=$(SYSROOT)/usr/include/libcgi
FOO_CMAKE += -DLIBCGI_LIBRARIES=$(SYSROOT)/usr/lib/libcgi.so
FOO_CMAKE += -DNETSNMP_INCLUDE_DIR=$(SYSROOT)/usr/include
FOO_CMAKE += -DNETSNMP_LIBRARIES=$(SYSROOT)/usr/lib/libnetsnmp.so

When setting this at least our build completes, but without the libs
are not found. (The system libs however are found when building
without ptxdist on x86 with the same cmake files.)

Currently I'm not aware how to further debug the cmake part and how
the includes and libs are searched, lacks some cmake experience still.

Regards
Alexander



-- 
ptxdist mailing list
ptxdist@pengutronix.de


Re: [ptxdist] use ptxdist with vim

2011-01-12 Thread Benoît Burnichon
This will work in only the topdir directory. Suppose I am working on a package 
named foo, I would open vim in directory $PROJECT_DIR/local_src/foo-trunk/

If a type !ptxdist clean foo, there will be an error as the current 
directory will not be the $PROJECT_DIR. This way, I cannot start the write, 
compile, test loop

Ben

-Message d'origine-
De : ptxdist-boun...@pengutronix.de [mailto:ptxdist-boun...@pengutronix.de] De 
la part de Robert Schwebel
Envoyé : mercredi 12 janvier 2011 12:57
À : ptxdist@pengutronix.de
Objet : Re: [ptxdist] use ptxdist with vim

On Wed, Jan 12, 2011 at 12:50:00PM +0100, Benoît Burnichon wrote:
> Hi all,
>
> I use vim to edit my program (I actually use a remote ssh server with no X 
> server).
>
> I would like to be able to run compile within vim.
>
> Is there a way to enter ptxdist bash environment. And then use standard make 
> commands to perform ptxdist operations like
>
> make clean udev  for ptxdist clean udev
> make drop udev.compile   for ptxdist drop udev.compile
> make compile udevfor ptxdist compile udev
> make targetinstall world for ptxdist go

:!ptxdist go

rsc
--
Pengutronix e.K.   | |
Industrial Linux Solutions | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0|
Amtsgericht Hildesheim, HRA 2686   | Fax:   +49-5121-206917- |

--
ptxdist mailing list
ptxdist@pengutronix.de

-- 
ptxdist mailing list
ptxdist@pengutronix.de


Re: [ptxdist] use ptxdist with vim

2011-01-12 Thread Robert Schwebel
On Wed, Jan 12, 2011 at 12:50:00PM +0100, Benoît Burnichon wrote:
> Hi all,
> 
> I use vim to edit my program (I actually use a remote ssh server with no X 
> server).
> 
> I would like to be able to run compile within vim.
> 
> Is there a way to enter ptxdist bash environment. And then use standard make 
> commands to perform ptxdist operations like
> 
> make clean udev  for ptxdist clean udev
> make drop udev.compile   for ptxdist drop udev.compile
> make compile udevfor ptxdist compile udev
> make targetinstall world for ptxdist go

:!ptxdist go

rsc
-- 
Pengutronix e.K.   | |
Industrial Linux Solutions | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0|
Amtsgericht Hildesheim, HRA 2686   | Fax:   +49-5121-206917- |

-- 
ptxdist mailing list
ptxdist@pengutronix.de


[ptxdist] use ptxdist with vim

2011-01-12 Thread Benoît Burnichon
Hi all,

I use vim to edit my program (I actually use a remote ssh server with no X 
server).

I would like to be able to run compile within vim.

Is there a way to enter ptxdist bash environment. And then use standard make 
commands to perform ptxdist operations like

make clean udev  for ptxdist clean udev
make drop udev.compile   for ptxdist drop udev.compile
make compile udevfor ptxdist compile udev
make targetinstall world for ptxdist go

Thanks for your support,

Benoît Burnichon

-- 
ptxdist mailing list
ptxdist@pengutronix.de


[ptxdist] [patch v2 1/1] add package openswan

2011-01-12 Thread Harro Haan
Openswan is an IPsec implementation for Linux.
Openswan supports the Openswan KLIPS IPsec stack and the Linux NETKEY
IPsec stack (kernel configuration with CONFIG_NET_KEY required).
For more info about choosing the Kernel IPsec stack see:
www.installationwiki.org/Openswan#Choosing_the_Kernel_IPsec_Stack

NOTE: First version 2.6.31 was integrated, but it did not work for an ARM
development board. Therefore the latest version integrated in Debian is
used instead (2.6.28), including security patches.

Signed-off-by: Harro Haan 
---
 .../01-2.6.26-2.6.28-CVE-2010-330x.dpatch  |  300 
 .../02-CVE-2010-330x-patch-regression-fix.dpatch   |   33 +++
 .../replace-absolute-link-by-relative-link.patch   |   22 ++
 patches/openswan-2.6.28/series |3 +
 rules/openswan.in  |   35 +++
 rules/openswan.make|  143 ++
 6 files changed, 536 insertions(+), 0 deletions(-)
 create mode 100755 
patches/openswan-2.6.28/01-2.6.26-2.6.28-CVE-2010-330x.dpatch
 create mode 100755 
patches/openswan-2.6.28/02-CVE-2010-330x-patch-regression-fix.dpatch
 create mode 100755 
patches/openswan-2.6.28/replace-absolute-link-by-relative-link.patch
 create mode 100755 patches/openswan-2.6.28/series
 create mode 100755 rules/openswan.in
 create mode 100755 rules/openswan.make

diff --git a/patches/openswan-2.6.28/01-2.6.26-2.6.28-CVE-2010-330x.dpatch 
b/patches/openswan-2.6.28/01-2.6.26-2.6.28-CVE-2010-330x.dpatch
new file mode 100755
index 000..f834246
--- /dev/null
+++ b/patches/openswan-2.6.28/01-2.6.26-2.6.28-CVE-2010-330x.dpatch
@@ -0,0 +1,300 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## /tmp/2.6.26-2.6.28-CVE-2010-330x.patch.dpatch by D. Hugh Redelmeier 

+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: fdebd
+## DP: Author: D. Hugh Redelmeier 
+## DP:
+## DP:
+## DP: fixes CVE-2010-3302 and CVE-2010-3308
+
+...@dpatch@
+
+---
+ programs/pluto/connections.c |   26 +--
+ programs/pluto/connections.h |   12 +++--
+ programs/pluto/kernel.c  |   18 ++-
+ programs/pluto/xauth.c   |  100 
+--
+ 4 files changed, 112 insertions(+), 44 deletions(-)
+
+Index: openswan-2.6.28/programs/pluto/connections.c
+===
+--- openswan-2.6.28.orig/programs/pluto/connections.c
 openswan-2.6.28/programs/pluto/connections.c
+@@ -319,6 +319,11 @@ delete_connection(struct connection *c, 
+ set_debugging(old_cur_debugging);
+ #endif
+ pfreeany(c->name);
++#ifdef XAUTH
++pfreeany(c->cisco_dns_info);
++pfreeany(c->cisco_domain_info);
++pfreeany(c->cisco_banner);
++#endif
+ #ifdef DYNAMICDNS
+ pfreeany(c->dnshostname);
+ #endif /* DYNAMICDNS */
+@@ -756,6 +761,12 @@ unshare_connection_strings(struct connec
+ 
+ c->name = clone_str(c->name, "connection name");
+ 
++#ifdef XAUTH
++c->cisco_dns_info = clone_str(c->cisco_dns_info, "connection 
cisco_dns_info");
++c->cisco_domain_info = clone_str(c->cisco_domain_info, "connection 
cisco_domain_info");
++c->cisco_banner = clone_str(c->cisco_banner, "connection cisco_banner");
++#endif
++
+ #ifdef DYNAMICDNS
+ c->dnshostname = clone_str(c->dnshostname, "connection dnshostname");
+ #endif /* DYNAMICDNS */
+@@ -1197,7 +1208,17 @@ add_connection(const struct whack_messag
+   c->name = wm->name;
+   c->connalias = wm->connalias;
+ 
++#ifdef XAUTH_USEPAM
++  c->pamh = NULL;
++#endif
++
++#ifdef XAUTH
++  c->cisco_dns_info = NULL;
++  c->cisco_domain_info = NULL;
++  c->cisco_banner = NULL;
++#endif
+ #ifdef DYNAMICDNS
++  c->dnshostname = NULL;
+   if (wm->dnshostname)
+   c->dnshostname = wm->dnshostname;
+ #endif /* DYNAMICDNS */
+@@ -1302,11 +1323,6 @@ add_connection(const struct whack_messag
+ 
+ /* Cisco interop: remote peer type */
+ c->remotepeertype=wm->remotepeertype;
+-/* Initializing Cisco dns and domain info */
+-if (c->remotepeertype == CISCO) {
+-c->cisco_dns_info[0] ='\0'; 
+-c->cisco_domain_info[0] ='\0';
+-}
+ 
+ /* Network Manager support */
+ #ifdef HAVE_NM
+Index: openswan-2.6.28/programs/pluto/connections.h
+===
+--- openswan-2.6.28.orig/programs/pluto/connections.h
 openswan-2.6.28/programs/pluto/connections.h
+@@ -259,15 +259,17 @@ struct connection {
+ #ifdef DYNAMICDNS
+ char *dnshostname;
+ #endif /* DYNAMICDNS */
+-#ifdef MODECFG
++#ifdef XAUTH
++# ifdef MODECFG
+ ip_address modecfg_dns1;
+ ip_address modecfg_dns2;
+ ip_address modecfg_wins1;
+ ip_address modecfg_wins2;
+-#endif
+-char cisco_dns_info[50];
+-char cisco_domain_info[50];
+-char server_banner[500];
++# endif
++char *cisco_dns_info;
++char *cisco_domain_info;
++char *cisco_banner;
++#endif /* XAUTH