| Submitter | John Faith |
|---|---|
| Date | 2010-01-23 23:16:46 |
| Message ID | <1264288606-8013-1-git-send-email-john@soundmetrics.com> |
| Download | mbox | patch |
| Permalink | /patch/1516/ |
| State | Superseded, archived |
| Headers | show |
Comments
Am Samstag, den 23.01.2010, 15:16 -0800 schrieb John Faith: [Moved note about v2 to the end of commit message.] > Allow socat 1.7.1.2 to cross build. In configure.in, the 4th value in > AC_TRY_RUN() gives a default value for cross build environments since > a test program cannot be run on the build system. There are 2 places > where AC_MSG_RESULT() is used instead of a default value which seems > to result in code like "#define CRDLY_SHIFT" which breaks preprocessor > checks like "#if CRDLY_SHIFT >= 0". Maybe add an item, why the change in do_configure() is needed. Just copy it from your reply to Koen maybe. > The patch gives default values in configure and configure.in for cross > compiling and checks were added in the affected source. v2: Added package source checksums, changed PR to r0, and removed some trailing whitespace in the patch. > Signed-off-by: John Faith <john@soundmetrics.com> Build-tested-by: Paul Menzel <paulepanter@users.sourceforge.net> (beagleboard, Ångström) /oe/angstrom-dev/deploy/glibc/ipk/armv7a$ ls -lh socat* -rw-r--r-- 1 x x 146K 24. Jan 12:21 socat_1.7.1.2-r0.5_armv7a.ipk -rw-r--r-- 1 x x 9,4M 24. Jan 12:21 socat-dbg_1.7.1.2-r0.5_armv7a.ipk -rw-r--r-- 1 x x 790 24. Jan 12:21 socat-dev_1.7.1.2-r0.5_armv7a.ipk -rw-r--r-- 1 x x 36K 24. Jan 12:21 socat-doc_1.7.1.2-r0.5_armv7a.ipk I am just wondering about the size of `socat-dbg*.ipk` though. > --- […] > +--- socat-1.7.1.2/xioopts.c.orig 2010-01-04 04:29:36.000000000 -0800 > ++++ socat-1.7.1.2/xioopts.c 2010-01-21 10:54:03.561742501 -0800 > +@@ -763,7 +763,7 @@ const struct optname optionnames[] = { > + IF_IP6 ("ipv6only", &opt_ipv6_v6only) Still some trailing whitespaces (in all ipv6 lines I think). openembedded$ git am -s /tmp/\[oe\]_\[PATCH_v2\]_socat\:_Add_version_1.7.1.2 Applying: socat: Add version 1.7.1.2 /oe/openembedded/.git/rebase-apply/patch:76: space before tab in indent. IF_IP6 ("ipv6only", &opt_ipv6_v6only) /oe/openembedded/.git/rebase-apply/patch:78: space before tab in indent. IF_TERMIOS("isig", &opt_isig) /oe/openembedded/.git/rebase-apply/patch:81: space before tab in indent. IF_TERMIOS("ispeed", &opt_ispeed) /oe/openembedded/.git/rebase-apply/patch:83: space before tab in indent. IF_TERMIOS("istrip", &opt_istrip) /oe/openembedded/.git/rebase-apply/patch:85: space before tab in indent. IF_OPENSSL("openssl-pseudo", &opt_openssl_pseudo) warning: squelched 5 whitespace errors warning: 10 lines add whitespace errors. (Try to apply your patch yourself.) But I guess it is alright. […] > diff --git a/recipes/socat/socat_1.7.1.2.bb b/recipes/socat/socat_1.7.1.2.bb > new file mode 100644 > index 0000000..2214354 > --- /dev/null > +++ b/recipes/socat/socat_1.7.1.2.bb > @@ -0,0 +1,23 @@ > +SECTION = "console/network" > +DEPENDS = "openssl readline" > +DESCRIPTION = "Socat is a network relay for bidirectional data \ > +transfer between two independent data channels." > +LICENSE = "GPL" > +PR = "r0" > + > +SRC_URI = "http://www.dest-unreach.org/socat/download/${P}.tar.bz2 \ > + file://socat-1.7.1.2-cross.patch;patch=1 " > + > +inherit autotools > + > +do_configure() { > + # Override this function so the included config.h.in is used instead > + # of recreating it with autoheader. > + (cd ${S} && gnu-configize) || die "failure in running gnu-configize" Someone else has to judge on the autotool stuff. […]
On Sunday 24 January 2010 00:16:46 John Faith wrote: > Second try. Added package source checksums, changed PR to r0, and removed > some trailing whitespace in the patch. First of all, thank you for the contribution. I have one question. Why did you need to patch the configure script? It should be automatically regenerated in the do_configure stage?
Holger Hans Peter Freyther wrote: > On Sunday 24 January 2010 00:16:46 John Faith wrote: > >> Second try. Added package source checksums, changed PR to r0, and removed >> some trailing whitespace in the patch. >> > > First of all, thank you for the contribution. I have one question. Why did you > need to patch the configure script? It should be automatically regenerated in > the do_configure stage? > > > Hi, Using the default do_configure() overwrote config.h.in which lacked #defines like HAVE_SIGACTION and broke compilation for me. I imagine that the right thing to do would be to just to patch configure.in and recreate the configure script and config.h.in. This page: http://www.gnu.org/software/hello/manual/gettext/config_002eh_002ein.html seems to indicate that its ok to manually maintain a config.h.in, so I wonder what do_configure() should do in this case when this file is included in the source. , John
On Mon, Jan 25, 2010 at 8:50 AM, John Faith <john@soundmetrics.com> wrote: > Holger Hans Peter Freyther wrote: >> >> On Sunday 24 January 2010 00:16:46 John Faith wrote: >> >>> >>> Second try. Added package source checksums, changed PR to r0, and removed >>> some trailing whitespace in the patch. >>> >> >> First of all, thank you for the contribution. I have one question. Why did >> you need to patch the configure script? It should be automatically >> regenerated in the do_configure stage? >> >> >> > > Hi, > Using the default do_configure() overwrote config.h.in which lacked #defines > like HAVE_SIGACTION and broke compilation for me. I imagine that the right > thing to do would be to just to patch configure.in and recreate the > configure script and config.h.in. This page: > http://www.gnu.org/software/hello/manual/gettext/config_002eh_002ein.html > seems to indicate that its ok to manually maintain a config.h.in, so I > wonder what do_configure() should do in this case when this file is included > in the source. autoheader is creating the config.h.in and do_configure will do it if project is set to maintain config.h.in automatically. Your option is to override do_configure and invoke the only regeneration commands that are needed however fixing it in configure.in would be best IMO because then autoheader will get it right too. > > , > John > > > _______________________________________________ > Openembedded-devel mailing list > Openembedded-devel@lists.openembedded.org > http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel >
Paul Menzel wrote: > Am Samstag, den 23.01.2010, 15:16 -0800 schrieb John Faith: > > [Moved note about v2 to the end of commit message.] > > >> Allow socat 1.7.1.2 to cross build. In configure.in, the 4th value in >> AC_TRY_RUN() gives a default value for cross build environments since >> a test program cannot be run on the build system. There are 2 places >> where AC_MSG_RESULT() is used instead of a default value which seems >> to result in code like "#define CRDLY_SHIFT" which breaks preprocessor >> checks like "#if CRDLY_SHIFT >= 0". >> > > Maybe add an item, why the change in do_configure() is needed. Just copy > it from your reply to Koen maybe. > Do you want a v3 of the patch for this or other changes? >> The patch gives default values in configure and configure.in for cross >> compiling and checks were added in the affected source. >> > > v2: Added package source checksums, changed PR to r0, and removed some > trailing whitespace in the patch. > > >> Signed-off-by: John Faith <john@soundmetrics.com> >> > > Build-tested-by: Paul Menzel <paulepanter@users.sourceforge.net> > (beagleboard, Ångström) > > /oe/angstrom-dev/deploy/glibc/ipk/armv7a$ ls -lh socat* > -rw-r--r-- 1 x x 146K 24. Jan 12:21 socat_1.7.1.2-r0.5_armv7a.ipk > -rw-r--r-- 1 x x 9,4M 24. Jan 12:21 socat-dbg_1.7.1.2-r0.5_armv7a.ipk > -rw-r--r-- 1 x x 790 24. Jan 12:21 socat-dev_1.7.1.2-r0.5_armv7a.ipk > -rw-r--r-- 1 x x 36K 24. Jan 12:21 socat-doc_1.7.1.2-r0.5_armv7a.ipk > > I am just wondering about the size of `socat-dbg*.ipk` though. > > Hm, my debug ipk is only 30k and contains 3 files: ~/oe/arago-deploy/ipk/armv5te $ ls -lh socat*1.7*r0* -rw-r--r-- 1 148K 2010-01-23 13:37 socat_1.7.1.2-r0.2_armv5te.ipk -rw-r--r-- 1 30K 2010-01-23 13:37 socat-dbg_1.7.1.2-r0.2_armv5te.ipk -rw-r--r-- 1 784 2010-01-23 13:37 socat-dev_1.7.1.2-r0.2_armv5te.ipk -rw-r--r-- 1 36K 2010-01-23 13:37 socat-doc_1.7.1.2-r0.2_armv5te.ipk # opkg files socat-dbg Package socat-dbg (1.7.1.2-r0.2) is installed on root and has the following files: /usr/bin/.debug/procan /usr/bin/.debug/filan /usr/bin/.debug/socat # ls -l /usr/bin/.debug -rwxr-xr-x 1 root root 20599 Jan 23 21:37 filan -rwxr-xr-x 1 root root 18750 Jan 23 21:37 procan -rwxr-xr-x 1 root root 59328 Jan 23 21:37 socat > >> +--- socat-1.7.1.2/xioopts.c.orig 2010-01-04 04:29:36.000000000 -0800 >> ++++ socat-1.7.1.2/xioopts.c 2010-01-21 10:54:03.561742501 -0800 >> +@@ -763,7 +763,7 @@ const struct optname optionnames[] = { >> + IF_IP6 ("ipv6only", &opt_ipv6_v6only) >> > > Still some trailing whitespaces (in all ipv6 lines I think). > > openembedded$ git am -s /tmp/\[oe\]_\[PATCH_v2\]_socat\:_Add_version_1.7.1.2 > Applying: socat: Add version 1.7.1.2 > /oe/openembedded/.git/rebase-apply/patch:76: space before tab in indent. > IF_IP6 ("ipv6only", &opt_ipv6_v6only) > /oe/openembedded/.git/rebase-apply/patch:78: space before tab in indent. > IF_TERMIOS("isig", &opt_isig) > /oe/openembedded/.git/rebase-apply/patch:81: space before tab in indent. > IF_TERMIOS("ispeed", &opt_ispeed) > /oe/openembedded/.git/rebase-apply/patch:83: space before tab in indent. > IF_TERMIOS("istrip", &opt_istrip) > /oe/openembedded/.git/rebase-apply/patch:85: space before tab in indent. > IF_OPENSSL("openssl-pseudo", &opt_openssl_pseudo) > warning: squelched 5 whitespace errors > warning: 10 lines add whitespace errors. > > (Try to apply your patch yourself.) But I guess it is alright. > > […] > I did try 'git am' and noticed that the number of whitespace warnings wend down after I manually removed spaces on otherwise empty lines apparently introduced by my diff process. The remaining "space before tab" warnings are in the socat source in adjacent lines created by diff -u; these of course could never go away since a patch to remove them containing the '-<space><tab>' would itself trigger a warning from "git am". Not sure how the socat authors would feel about changing all these ;). socat-1.7.1.2$ grep ' \t' * | wc -l 7615 Thanks for the review. , John
On Sunday 24 January 2010 00:16:46 John Faith wrote: > Second try. Added package source checksums, changed PR to r0, and removed > some trailing whitespace in the patch. Hi, I'm terrible sorry... besides posting in this thread I forgot about it when upgrading socat to that version. The problem for me was with the newer autoconf and that it needs three parameters for the autoheader app to properly generate entries... z.
Patch
diff --git a/conf/checksums.ini b/conf/checksums.ini index 68babd1..d191072 100644 --- a/conf/checksums.ini +++ b/conf/checksums.ini @@ -25150,6 +25150,10 @@ sha256=ecfbca297c26eff6cb04c2c45af1ee5c21d4a123a05f8b056a1c81ffcdfa1e3a md5=860fe417ea5e9ca2d2b2225192b85b87 sha256=ecfbca297c26eff6cb04c2c45af1ee5c21d4a123a05f8b056a1c81ffcdfa1e3a +[http://www.dest-unreach.org/socat/download/socat-1.7.1.2.tar.bz2] +md5=9c0c5e83ce665f38d4d3aababad275eb +sha256=f7395b154914bdaa49805603aac2a90fb3d60255f95691d7779ab4680615e167 + [http://download.ronetix.info/sk-eb926x/linux/kernel/2.6.25.4/socketcan-driver-at91.patch] md5=fe6945121eaea5e9c570e3dad54d7569 sha256=578db455270592833156358f79205b21701aa12b64142da16df08fb36fca3322 diff --git a/recipes/socat/files/socat-1.7.1.2-cross.patch b/recipes/socat/files/socat-1.7.1.2-cross.patch new file mode 100644 index 0000000..159e514 --- /dev/null +++ b/recipes/socat/files/socat-1.7.1.2-cross.patch @@ -0,0 +1,98 @@ +--- socat-1.7.1.2/configure.in.orig 2010-01-10 05:29:50.000000000 -0800 ++++ socat-1.7.1.2/configure.in 2010-01-21 09:41:42.959191482 -0800 +@@ -1286,10 +1286,13 @@ AC_CACHE_CHECK(shift offset of $1, $2, + ], + [$2=`cat $conftestoffset`], + [$2=-1], +- [AC_MSG_RESULT(please determine $1_SHIFT manually)] ++ [$2=-1] + ) + LIBS="$LIBS1"]) + AC_DEFINE_UNQUOTED($1_SHIFT, ${$2}) ++if test "$2" = -1; then ++AC_MSG_WARN(please determine $1_SHIFT manually) ++fi + ]) + + AC_SHIFT_OFFSET(CRDLY, sc_cv_sys_crdly_shift) +--- socat-1.7.1.2/configure.orig 2010-01-10 05:39:29.000000000 -0800 ++++ socat-1.7.1.2/configure 2010-01-21 10:01:27.463190768 -0800 +@@ -13596,6 +13596,7 @@ else + if test "$cross_compiling" = yes; then + { echo "$as_me:$LINENO: result: please determine CRDLY_SHIFT manually" >&5 + echo "${ECHO_T}please determine CRDLY_SHIFT manually" >&6; } ++ sc_cv_sys_crdly_shift=-1 + + else + cat >conftest.$ac_ext <<_ACEOF +@@ -13680,6 +13681,7 @@ else + if test "$cross_compiling" = yes; then + { echo "$as_me:$LINENO: result: please determine TABDLY_SHIFT manually" >&5 + echo "${ECHO_T}please determine TABDLY_SHIFT manually" >&6; } ++ sc_cv_sys_tabdly_shift=-1 + + else + cat >conftest.$ac_ext <<_ACEOF +@@ -13764,6 +13766,7 @@ else + if test "$cross_compiling" = yes; then + { echo "$as_me:$LINENO: result: please determine CSIZE_SHIFT manually" >&5 + echo "${ECHO_T}please determine CSIZE_SHIFT manually" >&6; } ++ sc_cv_sys_csize_shift=-1 + + else + cat >conftest.$ac_ext <<_ACEOF +--- socat-1.7.1.2/xioopts.c.orig 2010-01-04 04:29:36.000000000 -0800 ++++ socat-1.7.1.2/xioopts.c 2010-01-21 10:54:03.561742501 -0800 +@@ -763,7 +763,7 @@ const struct optname optionnames[] = { + IF_IP6 ("ipv6only", &opt_ipv6_v6only) + #endif + IF_TERMIOS("isig", &opt_isig) +-#ifdef HAVE_TERMIOS_ISPEED ++#if defined(HAVE_TERMIOS_ISPEED) && defined(ISPEED_OFFSET) && (ISPEED_OFFSET != -1) + IF_TERMIOS("ispeed", &opt_ispeed) + #endif + IF_TERMIOS("istrip", &opt_istrip) +@@ -1077,7 +1077,7 @@ const struct optname optionnames[] = { + IF_OPENSSL("openssl-pseudo", &opt_openssl_pseudo) + IF_OPENSSL("openssl-verify", &opt_openssl_verify) + IF_TERMIOS("opost", &opt_opost) +-#ifdef HAVE_TERMIOS_ISPEED ++#if defined(HAVE_TERMIOS_ISPEED) && defined(OSPEED_OFFSET) && (OSPEED_OFFSET != -1) + IF_TERMIOS("ospeed", &opt_ospeed) + #endif + IF_ANY ("owner", &opt_user) +--- socat-1.7.1.2/xio-termios.c.orig 2009-04-02 00:32:48.000000000 -0700 ++++ socat-1.7.1.2/xio-termios.c 2010-01-21 10:51:46.627690848 -0800 +@@ -270,8 +270,12 @@ const struct optdesc opt_raw = { "r + const struct optdesc opt_sane = { "sane", NULL, OPT_SANE, GROUP_TERMIOS, PH_FD, TYPE_CONST, OFUNC_TERMIOS_SPEC }; + + #ifdef HAVE_TERMIOS_ISPEED ++#if defined(ISPEED_OFFSET) && (ISPEED_OFFSET != -1) ++#if defined(OSPEED_OFFSET) && (OSPEED_OFFSET != -1) + const struct optdesc opt_ispeed = { "ispeed", NULL, OPT_ISPEED, GROUP_TERMIOS, PH_FD, TYPE_UINT, OFUNC_TERMIOS_SPEED, ISPEED_OFFSET }; + const struct optdesc opt_ospeed = { "ospeed", NULL, OPT_OSPEED, GROUP_TERMIOS, PH_FD, TYPE_UINT, OFUNC_TERMIOS_SPEED, OSPEED_OFFSET }; ++#endif ++#endif + #endif /* HAVE_TERMIOS_ISPEED */ + + +--- socat-1.7.1.2/xioinitialize.c.orig 2009-04-02 00:32:48.000000000 -0700 ++++ socat-1.7.1.2/xioinitialize.c 2010-01-21 10:46:50.620191091 -0800 +@@ -62,12 +62,16 @@ int xioinitialize(void) { + assert(tdata.termarg.c_oflag == tdata.flags[1]); + assert(tdata.termarg.c_cflag == tdata.flags[2]); + assert(tdata.termarg.c_lflag == tdata.flags[3]); +-#if HAVE_TERMIOS_ISPEED ++#if HAVE_TERMIOS_ISPEED && (ISPEED_OFFSET != -1) && (OSPEED_OFFSET != -1) ++#if defined(ISPEED_OFFSET) && (ISPEED_OFFSET != -1) ++#if defined(OSPEED_OFFSET) && (OSPEED_OFFSET != -1) + tdata.termarg.c_ispeed = 0x56789abc; + tdata.termarg.c_ospeed = 0x6789abcd; + assert(tdata.termarg.c_ispeed == tdata.speeds[ISPEED_OFFSET]); + assert(tdata.termarg.c_ospeed == tdata.speeds[OSPEED_OFFSET]); + #endif ++#endif ++#endif + } + #endif + diff --git a/recipes/socat/socat_1.7.1.2.bb b/recipes/socat/socat_1.7.1.2.bb new file mode 100644 index 0000000..2214354 --- /dev/null +++ b/recipes/socat/socat_1.7.1.2.bb @@ -0,0 +1,23 @@ +SECTION = "console/network" +DEPENDS = "openssl readline" +DESCRIPTION = "Socat is a network relay for bidirectional data \ +transfer between two independent data channels." +LICENSE = "GPL" +PR = "r0" + +SRC_URI = "http://www.dest-unreach.org/socat/download/${P}.tar.bz2 \ + file://socat-1.7.1.2-cross.patch;patch=1 " + +inherit autotools + +do_configure() { + # Override this function so the included config.h.in is used instead + # of recreating it with autoheader. + (cd ${S} && gnu-configize) || die "failure in running gnu-configize" + oe_runconf +} + +do_install_prepend () { + mkdir -p ${D}${bindir} + install -d ${D}${bindir} ${D}${mandir}/man1 +}
Second try. Added package source checksums, changed PR to r0, and removed some trailing whitespace in the patch. Allow socat 1.7.1.2 to cross build. In configure.in, the 4th value in AC_TRY_RUN() gives a default value for cross build environments since a test program cannot be run on the build system. There are 2 places where AC_MSG_RESULT() is used instead of a default value which seems to result in code like "#define CRDLY_SHIFT" which breaks preprocessor checks like "#if CRDLY_SHIFT >= 0". The patch gives default values in configure and configure.in for cross compiling and checks were added in the affected source. Signed-off-by: John Faith <john@soundmetrics.com> --- conf/checksums.ini | 4 + recipes/socat/files/socat-1.7.1.2-cross.patch | 98 +++++++++++++++++++++++++ recipes/socat/socat_1.7.1.2.bb | 23 ++++++ 3 files changed, 125 insertions(+), 0 deletions(-) create mode 100644 recipes/socat/files/socat-1.7.1.2-cross.patch create mode 100644 recipes/socat/socat_1.7.1.2.bb