Re: [OpenWrt-Devel] Adding host Java support to the buildbots
On Fri, 30 Dec 2016 06:52:32 -0800 Dana Myers wrote: > On 12/29/2016 11:50 PM, Ralph Sennhauser wrote: > > Hi Dana > > > > On Thu, 29 Dec 2016 12:30:37 -0800 > > Dana Myers wrote: > > > >> In reference to https://github.com/openwrt/packages/pull/3686 > >> > >> We've added OpenWRT support for: > >> > >> * JamVM 2.0: Java JVM > >> * GNU Classpath 2.0: Java class library > > There is no classpath 2.0 > > Right you are - serves me right for spewing version numbers off the > top of my head from something I initially did two years :-) It's > classpath 0.99 > > > >> * RXTX Java serial communications library > >> > >> However, the build bots won't build these packages yet because > >> a host Java compiler is required. To build these packages, I > >> install: > > The main reason to use jamvm with gnu classpath is you can > > bootstrap it without a jdk, right? If you already require a host > > jdk why not go for jamvm with the openjdk classpath to get full > > java support? > > I don't understand the question about bootstrapping and host vs > target JDK. Host JDK is used specifically for javac to compile Java > to bytecodes; target has no dependency on JDK otherwise. Well, if you require openjdk-7-jdk on the build host you sidestep bootstrapping java all together (c compiler & source code -> build) in which case jamvm with openjdk classpath is as easy to get as with gnu classpath but the latter only supports part of 1.5 & 1.6. The question boils down to why you settle for something inferior when you can have something much better. > > Classpath was, for many years, the only library supported by JamVM, > is much smaller than OpenJDK (valuable on resource-constrained > systems) and remains the default library supported by JamVM. For the > purposes of my project from which I contributed, Classpath is > adequate and appears to avoid concerns about encumbrance of the > target builds/devices with OpenJDK. Most specifically, however, was > the apparent lack of support for MIPS32 which is a show-stopper for > the AR71xx architecture I'm using. Another alternative to hotspot on mips would be cacao, again with openjdk classpath. Though jamvm certainly is a vaild pick. What encumbrance concerns do you have in mind? Debian also ships the binaries as in openjdk-7-jdk. I don't object to jamvm with gnu classpath, just that I was wondering why you'd pick it over the alternatives. Basically it's adding java support that is hardly usable this days apart of a few specialized cases. Cheers Ralph ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] Bug in ipkg?
I just saw something bizarre. I had a Perl module (CGI v4.35) which contained the following: my $appease_cpants_kwalitee = q/ use strict; use warnings; #/; which is just a quoted string containing the lines that some sanity checking code expects to see (albeit as actual code, and not embedded as a string constant). That was in the original source. Getting into build_dir/target-xxx/perl/CGI-4.35/ and looking at ipkg-install/usr/lib/perl5/5.22/CGI.pm it’s identical to what’s in the tarball. However, looking at ipkg-x86_64/perl-cgi/usr/lib/perl5/5.22/CGI.pm I see that every line starting with /^#/ has been deleted. WTH??? Interestingly, lines beginning with /^[ \t]+#/ are untouched. Is ipkg doing something evil like stripping lines that it (apparently incorrectly) thinks are comments to save space? And if so, why How do I disable this? Thanks, -Philip ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [LEDE-DEV] Bug in ipkg?
> On Jan 2, 2017, at 9:32 PM, Philip Prindeville > wrote: > > I just saw something bizarre. > > I had a Perl module (CGI v4.35) which contained the following: > > my $appease_cpants_kwalitee = q/ > use strict; > use warnings; > #/; > > which is just a quoted string containing the lines that some sanity checking > code expects to see (albeit as actual code, and not embedded as a string > constant). > > That was in the original source. > > Getting into build_dir/target-xxx/perl/CGI-4.35/ and looking at > ipkg-install/usr/lib/perl5/5.22/CGI.pm it’s identical to what’s in the > tarball. > > However, looking at ipkg-x86_64/perl-cgi/usr/lib/perl5/5.22/CGI.pm I see that > every line starting with /^#/ has been deleted. WTH??? > > Interestingly, lines beginning with /^[ \t]+#/ are untouched. > > Is ipkg doing something evil like stripping lines that it (apparently > incorrectly) thinks are comments to save space? And if so, why > > How do I disable this? > > Thanks, > > -Philip > And here’s the offending code: (cd /home/philip/bertram/bmu-philip/openwrt/build_dir/target-x86_64_core2_musl-1.1.15_powercode-bmu/perl/CGI-4.35/ipkg-install/usr/lib/perl5/5.22 && rsync --relative -rlHp --itemize-changes --exclude=\*.pod --exclude=.packlist --prune-empty-dirs CGI CGI.pm auto/CGI /home/philip/bertram/bmu-philip/openwrt/build_dir/target-x86_64_core2_musl-1.1.15_powercode-bmu/perl/CGI-4.35/ipkg-x86_64/perl-cgi/usr/lib/perl5/5.22) >f+ CGI.pm cd+ CGI/ >f+ CGI/Carp.pm >f+ CGI/Cookie.pm >f+ CGI/Pretty.pm >f+ CGI/Push.pm >f+ CGI/Util.pm cd+ CGI/File/ >f+ CGI/File/Temp.pm cd+ CGI/HTML/ >f+ CGI/HTML/Functions.pm chmod -R u+w /home/philip/bertram/bmu-philip/openwrt/build_dir/target-x86_64_core2_musl-1.1.15_powercode-bmu/perl/CGI-4.35/ipkg-x86_64/perl-cgi/usr/lib/perl5/5.22 ---> Stripping modules in: /home/philip/bertram/bmu-philip/openwrt/build_dir/target-x86_64_core2_musl-1.1.15_powercode-bmu/perl/CGI-4.35/ipkg-x86_64/perl-cgi/usr/lib/perl5/5.22 find /home/philip/bertram/bmu-philip/openwrt/build_dir/target-x86_64_core2_musl-1.1.15_powercode-bmu/perl/CGI-4.35/ipkg-x86_64/perl-cgi/usr/lib/perl5/5.22 -name \*.pm -or -name \*.pl | xargs -r sed -i -e '/^=\(head\|pod\|item\|over\|back\|encoding\|begin\|end\|for\)/,/^=cut/d' -e '/^=\(head\|pod\|item\|over\|back\|encoding\|begin\|end\|for\)/,$d' -e '/^#$/d' -e '/^#[^!"'"'"']/d’ those last 2 expressions being passed to sed… If I have something like: my $hdr = <<__EOF__ ; #!/bin/bash -x __EOF__ then it’s going to totally do the wrong thing… It thinks that’s a comment but it’s not, it’s a literal in a here-document… ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [LEDE-DEV] Bug in ipkg?
> On Jan 2, 2017, at 9:59 PM, Philip Prindeville > wrote: > > >> On Jan 2, 2017, at 9:32 PM, Philip Prindeville >> wrote: >> >> I just saw something bizarre. >> >> I had a Perl module (CGI v4.35) which contained the following: >> >> my $appease_cpants_kwalitee = q/ >> use strict; >> use warnings; >> #/; >> >> which is just a quoted string containing the lines that some sanity checking >> code expects to see (albeit as actual code, and not embedded as a string >> constant). >> >> That was in the original source. >> >> Getting into build_dir/target-xxx/perl/CGI-4.35/ and looking at >> ipkg-install/usr/lib/perl5/5.22/CGI.pm it’s identical to what’s in the >> tarball. >> >> However, looking at ipkg-x86_64/perl-cgi/usr/lib/perl5/5.22/CGI.pm I see >> that every line starting with /^#/ has been deleted. WTH??? >> >> Interestingly, lines beginning with /^[ \t]+#/ are untouched. >> >> Is ipkg doing something evil like stripping lines that it (apparently >> incorrectly) thinks are comments to save space? And if so, why >> >> How do I disable this? >> >> Thanks, >> >> -Philip >> > > > And here’s the offending code: > > (cd > /home/philip/bertram/bmu-philip/openwrt/build_dir/target-x86_64_core2_musl-1.1.15_powercode-bmu/perl/CGI-4.35/ipkg-install/usr/lib/perl5/5.22 > && rsync --relative -rlHp --itemize-changes --exclude=\*.pod > --exclude=.packlist --prune-empty-dirs CGI CGI.pm auto/CGI > /home/philip/bertram/bmu-philip/openwrt/build_dir/target-x86_64_core2_musl-1.1.15_powercode-bmu/perl/CGI-4.35/ipkg-x86_64/perl-cgi/usr/lib/perl5/5.22) >> f+ CGI.pm > cd+ CGI/ >> f+ CGI/Carp.pm >> f+ CGI/Cookie.pm >> f+ CGI/Pretty.pm >> f+ CGI/Push.pm >> f+ CGI/Util.pm > cd+ CGI/File/ >> f+ CGI/File/Temp.pm > cd+ CGI/HTML/ >> f+ CGI/HTML/Functions.pm > chmod -R u+w > /home/philip/bertram/bmu-philip/openwrt/build_dir/target-x86_64_core2_musl-1.1.15_powercode-bmu/perl/CGI-4.35/ipkg-x86_64/perl-cgi/usr/lib/perl5/5.22 > ---> Stripping modules in: > /home/philip/bertram/bmu-philip/openwrt/build_dir/target-x86_64_core2_musl-1.1.15_powercode-bmu/perl/CGI-4.35/ipkg-x86_64/perl-cgi/usr/lib/perl5/5.22 > find > /home/philip/bertram/bmu-philip/openwrt/build_dir/target-x86_64_core2_musl-1.1.15_powercode-bmu/perl/CGI-4.35/ipkg-x86_64/perl-cgi/usr/lib/perl5/5.22 > -name \*.pm -or -name \*.pl | xargs -r sed -i -e > '/^=\(head\|pod\|item\|over\|back\|encoding\|begin\|end\|for\)/,/^=cut/d' -e > '/^=\(head\|pod\|item\|over\|back\|encoding\|begin\|end\|for\)/,$d' -e > '/^#$/d' -e '/^#[^!"'"'"']/d’ > > > those last 2 expressions being passed to sed… > > If I have something like: > > my $hdr = <<__EOF__ ; > #!/bin/bash -x > > __EOF__ > > then it’s going to totally do the wrong thing… It thinks that’s a comment > but it’s not, it’s a literal in a here-document… > Okay, resolved…. I needed to change the Package/perl-cgi/install macro in the Makefile to invoke perlmod/Install/NoStrip instead of perlmod/Install. Sigh. Would it be reasonable to add a global variable which disables the stripping in perlmod/Install? If you’re on a box with a decent amount of cycles and adequate flash, then I don’t really see the point of stripping comments from the Perl anyway… -Philip ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [LEDE-DEV] Bug in ipkg?
> On Jan 2, 2017, at 10:08 PM, Philip Prindeville > wrote: > > Okay, resolved…. I needed to change the Package/perl-cgi/install macro in > the Makefile to invoke perlmod/Install/NoStrip instead of perlmod/Install. > Sigh. > > Would it be reasonable to add a global variable which disables the stripping > in perlmod/Install? > > If you’re on a box with a decent amount of cycles and adequate flash, then I > don’t really see the point of stripping comments from the Perl anyway… > > -Philip > Okay, and here’s a fix… though it might also be nice to allow packages themselves to indicate that they’re known to get mangled by perlmod.mk… perlmod-unstripped.patch Description: Binary data ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] ubus: ubus_free: clear pending timers before freeing context
From: Abhimanyu Vishwakarma If a synchronous operation is executed on a ubus context after uloop_done() has been called, the context's pending_timer may remain in uloop's list of timeouts. This leads to undefined behaviour during next execution of uloop code, as it may be referring to unavailable memory or memory that has been allocated for different purposes. Signed-off-by: Marcin Nowakowski Signed-off-by: Abhimanyu Vishwakarma --- libubus.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libubus.c b/libubus.c index 8163ff7..a044003 100644 --- a/libubus.c +++ b/libubus.c @@ -362,6 +362,7 @@ void ubus_shutdown(struct ubus_context *ctx) if (!ctx) return; close(ctx->sock.fd); + uloop_timeout_cancel(&ctx->pending_timer); free(ctx->msgbuf.data); } -- 2.7.4 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel