ncftp: fix host/target confusion
PATCH 1/1 ncftp: fix host/target confusion
The ncftp build process tries to build and run a small program called ccdv to beautify the build process output. If it manages to build and run it, then it uses it.
Unfortunately, this doesn't work well when the target architecture is close to the host architecture, but not exactly the same. Because both architectures are close to each other, the test run of ccdv succeeds, but real use of ccdv during ncftp build process causes an Illegal instruction issue.
This for example happens with the CodeSourcery AMD64 toolchain, on a build machine running an i7-4600U, and has been detected in the autobuilders since the CodeSourcery AMD64 toolchain was upgraded at the end of January:
http://autobuild.buildroot.net/?reason=ncftp-3.2.6
The issue was also reported by Christopher Arguin back in July 2016:
http://lists.busybox.net/pipermail/buildroot/2016-July/168026.html
and at the time, we identified that simply disabling the ccdv tool, by passing --disable-ccdv, was enough to solve the issue. But Christopher never submitted the patch, so the problem remained unfixed.
Therefore, we pass --disable-ccdv to the configure script, which fixes:
http://autobuild.buildroot.net/results/6eadad0e879ca70bb07b13b4196d42c64b11699f/
--- package/ncftp/ncftp.mk | 1 + 1 file changed, 1 insertion(+)
package/ncftp/ncftp.mk +1 -0
@@ -12,6 +12,7 @@ NCFTP_LICENSE = Clarified Artistic License NCFTP_LICENSE_FILES = doc/LICENSE.txt NCFTP_DEPENDENCIES = host-autoconf +NCFTP_CONF_OPTS = --disable-ccdv # The bundled configure script is generated by autoconf 2.13 and doesn't # detect cross-compilation correctly. Therefore, we have to regenerate it.
Signature · 1 line
2.7.4
PATCH 1/1 ncftp: fix host/target confusion
Thomas, All,
On 2017-02-28 23:54 +0100, Thomas Petazzoni spake thusly:
Quoted 25 lines
The ncftp build process tries to build and run a small program called ccdv to beautify the build process output. If it manages to build and run it, then it uses it.
Unfortunately, this doesn't work well when the target architecture is close to the host architecture, but not exactly the same. Because both architectures are close to each other, the test run of ccdv succeeds, but real use of ccdv during ncftp build process causes an Illegal instruction issue.
This for example happens with the CodeSourcery AMD64 toolchain, on a build machine running an i7-4600U, and has been detected in the autobuilders since the CodeSourcery AMD64 toolchain was upgraded at the end of January:
http://autobuild.buildroot.net/?reason=ncftp-3.2.6
The issue was also reported by Christopher Arguin back in July 2016:
http://lists.busybox.net/pipermail/buildroot/2016-July/168026.html
and at the time, we identified that simply disabling the ccdv tool, by passing --disable-ccdv, was enough to solve the issue. But Christopher never submitted the patch, so the problem remained unfixed.
Quoted 6 lines
Therefore, we pass --disable-ccdv to the configure script, which fixes:
http://autobuild.buildroot.net/results/6eadad0e879ca70bb07b13b4196d42c64b11699f/
Signed-off-by Thomas Petazzoni <[email protected]>
Regards,
Yann E. MORIN.
Quoted 23 lines
--- package/ncftp/ncftp.mk | 1 + 1 file changed, 1 insertion(+)package/ncftp/ncftp.mk +1
-0@@ -12,6 +12,7 @@ NCFTP_LICENSE = Clarified Artistic License NCFTP_LICENSE_FILES = doc/LICENSE.txt NCFTP_DEPENDENCIES = host-autoconf +NCFTP_CONF_OPTS = --disable-ccdv # The bundled configure script is generated by autoconf 2.13 and doesn't # detect cross-compilation correctly. Therefore, we have to regenerate it.Signature · 6 lines
2.7.4 _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
Thomas Petazzoni
AppliedPATCH 1/1 ncftp: fix host/target confusion
In reply to Thomas PetazzoniHello,
Quoted 28 lines · Thomas Petazzoni
The ncftp build process tries to build and run a small program called ccdv to beautify the build process output. If it manages to build and run it, then it uses it.
Unfortunately, this doesn't work well when the target architecture is close to the host architecture, but not exactly the same. Because both architectures are close to each other, the test run of ccdv succeeds, but real use of ccdv during ncftp build process causes an Illegal instruction issue.
This for example happens with the CodeSourcery AMD64 toolchain, on a build machine running an i7-4600U, and has been detected in the autobuilders since the CodeSourcery AMD64 toolchain was upgraded at the end of January:
http://autobuild.buildroot.net/?reason=ncftp-3.2.6
The issue was also reported by Christopher Arguin back in July 2016:
http://lists.busybox.net/pipermail/buildroot/2016-July/168026.html
and at the time, we identified that simply disabling the ccdv tool, by passing --disable-ccdv, was enough to solve the issue. But Christopher never submitted the patch, so the problem remained unfixed.
Therefore, we pass --disable-ccdv to the configure script, which fixes:
Quoted 6 lines
http://autobuild.buildroot.net/results/6eadad0e879ca70bb07b13b4196d42c64b11699f/
Signed-off-by Thomas Petazzoni <[email protected]>--- package/ncftp/ncftp.mk | 1 + 1 file changed, 1 insertion(+)
Applied to master, thanks. Peter, I believe this one qualifies for the LTS branch.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH 1/1 ncftp: fix host/target confusion
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Thomas" == Thomas Petazzoni <[email protected]> writes:
Hi,
Quoted 2 lines
Applied to master, thanks. Peter, I believe this one qualifies for the LTS branch.
Committed to 2017.02.x, thanks.
Signature · 1 line
Bye, Peter Korsgaard
PATCH 1/1 ncftp: fix host/target confusion
Peter,
Quoted 8 lines · Peter Korsgaard
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Thomas" == Thomas Petazzoni <[email protected]> writes:
Hi,
Quoted 2 lines
Applied to master, thanks. Peter, I believe this one qualifies for the LTS branch.
Committed to 2017.02.x, thanks.
Are you able to download this tarball with the hash indicated in ncftp.hash? I keep getting an error:
ERROR: ncftp-3.2.6-src.tar.xz has wrong sha256 hash:
ERROR: expected:7abd3e8f848f0efb4bb6a4bc5da58a59524d4378fc8d70a52adb0fe1fd00b89d
ERROR: got :5f200687c05d0807690d9fb770327b226f02dd86155b49e750853fce4e31098d
ERROR: Incomplete download, or man-in-the-middle (MITM) attack
Danomi -
Quoted 6 lines
--
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
PATCH 1/1 ncftp: fix host/target confusion
Hello,
Quoted 9 lines · Danomi Manchego
Are you able to download this tarball with the hash indicated in ncftp.hash? I keep getting an error:
ERROR: ncftp-3.2.6-src.tar.xz has wrong sha256 hash:
ERROR: expected:7abd3e8f848f0efb4bb6a4bc5da58a59524d4378fc8d70a52adb0fe1fd00b89d
ERROR: got :5f200687c05d0807690d9fb770327b226f02dd86155b49e750853fce4e31098d
ERROR: Incomplete download, or man-in-the-middle (MITM) attack
It seems like the tarball has been re-generated and republished by upstream.
Indeed, a diff between the two shows:
-3.2.6, 2016-12-04
+3.2.6, 2016-09-23
(where the - lines are the tarball from the upstream site, which is newer, and the + lines are the tarball from sources.buildroot.net). And interestingly, the web page at
http://www.ncftp.com/ncftp/doc/changelog.html pretends that the 3.2.6 version has been released on 2016-11-27...
And the diffstat is actually not that small:
Strn/DStrInternal.h | 4 Strn/Strn.h | 2 autoconf_local/acconfig.h | 8 autoconf_local/aclocal.m4 | 116 --- config.h.in | 8 configure | 1701 ++++++++++++++++++++-------------------------- configure.in | 9 doc/CHANGELOG.txt | 2 libncftp/c_opennologin.c | 4 libncftp/ftp.c | 31 libncftp/ftw.c | 2 libncftp/io_getmem.c | 2 libncftp/io_list.c | 6 libncftp/io_sendfile.c | 4 libncftp/io_util.c | 4 libncftp/ncftp.h | 2 libncftp/open.c | 4 libncftp/rftw.c | 2 libncftp/rglobr.c | 2 libncftp/u_decodehost.c | 2 libncftp/u_decodeurl.c | 2 libncftp/u_getpass.c | 2 libncftp/u_misc.c | 2 libncftp/u_pathcat.c | 4 libncftp/u_scram.c | 2 libncftp/wincfg.h | 1 ncftp/cmds.c | 38 - ncftp/gl_getline.c | 26 ncftp/ls.c | 9 ncftp/ls.h | 9 ncftp/progress.c | 9 ncftp/readln.c | 4 ncftp/shell.h | 10 ncftp/spoolutil.c | 8 ncftp/version.c | 2 sh/mksrctar.sh | 1 sh_util/gpshare.c | 12 sh_util/ncftpbatch.c | 110 -- sh_util/ncftpget.c | 6 sh_util/ncftpls.c | 5 sh_util/ncftpput.c | 14 sio/DNSUtil.c | 4 sio/Makefile.in | 16 sio/SBind.c | 35 sio/SConnect.c | 9 sio/SNew.c | 115 --- sio/SRead.c | 6 sio/StrAddr.c | 6 sio/config.h.in | 24 sio/configure.in | 8 sio/sio.h | 18 sio/wincfg.h | 1 vis/bmed.c | 13 vis/wgets.c | 12 vis/wgets.h | 7 vis/wutil.c | 6 vis/wutil.h | 6 win/bmed/bmed.vcproj | 4
I'm not sure what to do in this case? Blindly take the new upstream version? Complain to upstream?
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com
PATCH 1/1 ncftp: fix host/target confusion
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Thomas" == Thomas Petazzoni <[email protected]> writes:
Hi,
Quoted 2 lines
I'm not sure what to do in this case? Blindly take the new upstream version? Complain to upstream?
We should probably update. I have mailed support at ncftp.com asking them what happened.
I will let you know when/if I hear back from them.
Signature · 1 line
Bye, Peter Korsgaard
PATCH 1/1 ncftp: fix host/target confusion
Quoted 11 lines · Peter Korsgaard
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Thomas" == Thomas Petazzoni <[email protected]> writes:
Hi,
Quoted 2 lines
I'm not sure what to do in this case? Blindly take the new upstream version? Complain to upstream?
We should probably update. I have mailed support at ncftp.com asking them what happened.
I will let you know when/if I hear back from them.
This is terribly annoying, however, since we just released 2017.02 with the7abd3e8f hash. So now people are downloading it from sources.buildroot.net. But if we apply the new hash and update sources.buildroot.net, people using the 2017.02 release have no way to download ncftp anymore...
Regards,
Arnout
Signature · 6 lines
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286500 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
PATCH 1/1 ncftp: fix host/target confusion
Quoted 13 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Arnout" == Arnout Vandecappelle <[email protected]> writes:
Quoted 10 lines · Peter Korsgaard
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Thomas" == Thomas Petazzoni <[email protected]> writes:
Hi,
Quoted 2 lines
I'm not sure what to do in this case? Blindly take the new upstream version? Complain to upstream?
We should probably update. I have mailed support at ncftp.com asking them what happened.
Quoted 6 lines
Quoted 1 line
I will let you know when/if I hear back from them.
This is terribly annoying, however, since we just released 2017.02 with the
7abd3e8fhash. So now people are downloading it from sources.buildroot.net. But if we apply the new hash and update sources.buildroot.net, people using the 2017.02 release have no way to download ncftp anymore...
Indeed :/ We can naturally fix it in 2017.02.1, but still. Lets see what the ncftp guys say.
Signature · 1 line
Bye, Peter Korsgaard
PATCH 1/1 ncftp: fix host/target confusion
In reply to Peter KorsgaardQuoted 5 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
"Peter" == Peter Korsgaard <[email protected]> writes:
"Thomas" == Thomas Petazzoni <[email protected]> writes:
Hi,
Quoted 7 lines
Quoted 2 lines
I'm not sure what to do in this case? Blindly take the new upstream version? Complain to upstream?
We should probably update. I have mailed support at ncftp.com asking them what happened.
I will let you know when/if I hear back from them.
After sending them a detailed mail explaining the issue with them updating the tarballs and a diff of the changes, I got the following answer:
Quoted 1 line
Is this update intentional? Why was the tarball regenerated?
Yes.
Which wasn't exactly helpful :/ I'll send a patch to update our hash, but I will NOT update the tarball on sources.buildroot.net yet.
Signature · 1 line
Bye, Peter Korsgaard
PATCH 1/1 ncftp: fix host/target confusion
Hello,
Quoted 17 lines · Peter Korsgaard
Quoted 5 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
"Peter" == Peter Korsgaard <[email protected]> writes:
"Thomas" == Thomas Petazzoni <[email protected]> writes:
Hi,
Quoted 7 lines
Quoted 2 lines
I'm not sure what to do in this case? Blindly take the new upstream version? Complain to upstream?
We should probably update. I have mailed support at ncftp.com asking them what happened.
I will let you know when/if I hear back from them.
After sending them a detailed mail explaining the issue with them updating the tarballs and a diff of the changes, I got the following answer:
Quoted 6 lines
Quoted 1 line
Is this update intentional? Why was the tarball regenerated?
Yes.
Which wasn't exactly helpful :/ I'll send a patch to update our hash, but I will NOT update the tarball on sources.buildroot.net yet.
Isn't sources.buildroot.net going to automatically pick up the new tarball once you change the hash?
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com
PATCH 1/1 ncftp: fix host/target confusion
Quoted 5 lines
Quoted 5 lines
Quoted 4 lines
Quoted 1 line
Quoted 1 line
"Thomas" == Thomas Petazzoni <[email protected]> writes:
Is this update intentional? Why was the tarball regenerated?
Quoted 7 lines
Quoted 4 lines
Yes.
Which wasn't exactly helpful :/ I'll send a patch to update our hash, but I will NOT update the tarball on sources.buildroot.net yet.
Isn't sources.buildroot.net going to automatically pick up the new tarball once you change the hash?
Hmm, I guess so. It just runs 'make -k source'. I guess we should wait until we are ready to release 2017.02.1 then.
Signature · 1 line
Bye, Peter Korsgaard
PATCH 1/1 ncftp: fix host/target confusion
Quoted 7 lines · Peter Korsgaard
Quoted 7 lines
Quoted 7 lines
Quoted 4 lines
Quoted 1 line
Quoted 1 line
"Thomas" == Thomas Petazzoni <[email protected]> writes:
Is this update intentional? Why was the tarball regenerated?
Yes.
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
Which wasn't exactly helpful :/ I'll send a patch to update our hash, but I will NOT update the tarball on sources.buildroot.net yet.
Isn't sources.buildroot.net going to automatically pick up the new tarball once you change the hash?
Hmm, I guess so. It just runs 'make -k source'. I guess we should wait until we are ready to release 2017.02.1 then.
So this issue missed 2017.02.1 :-)
However, we can do a workaround: in master, we can use the tar.gz file instead
of the tar.xz. That way, there can be two separate tarballs on sources.buildroot.net for the two versions.
Regards,
Arnout
Signature · 6 lines
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286500 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
PATCH 1/1 ncftp: fix host/target confusion
Quoted 13 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Arnout" == Arnout Vandecappelle <[email protected]> writes:
Quoted 10 lines · Peter Korsgaard
Quoted 9 lines
Quoted 9 lines
Quoted 4 lines
Quoted 1 line
Quoted 1 line
"Thomas" == Thomas Petazzoni <[email protected]> writes:
Is this update intentional? Why was the tarball regenerated?
Yes.
Which wasn't exactly helpful :/ I'll send a patch to update our hash, but I will NOT update the tarball on sources.buildroot.net yet.
Quoted 7 lines
Quoted 5 lines
Quoted 2 lines
Isn't sources.buildroot.net going to automatically pick up the new tarball once you change the hash?
Hmm, I guess so. It just runs 'make -k source'. I guess we should wait until we are ready to release 2017.02.1 then.
So this issue missed 2017.02.1 :-)
Argh, yes :/
Quoted 3 lines
However, we can do a workaround: in master, we can use the tar.gz file instead
of the tar.xz. That way, there can be two separate tarballs on sources.buildroot.net for the two versions.
Ahh yes, good idea - I'll send a patch doing that.
Signature · 1 line
Bye, Peter Korsgaard