On Fri, Aug 3, 2012 at 10:45 PM, eric koorn <eric.ko...@gmail.com> wrote: > On Fri, Aug 3, 2012 at 8:26 PM, Hisham <h...@hisham.hm> wrote: >> >> On Fri, Aug 3, 2012 at 3:46 AM, Ildar Mulyukov >> <il...@users.sourceforge.net> wrote: >> > On 02.08.2012 17:18:10, eric koorn wrote: >> >> The default luarocks bsd STATFLAG = "-f '%A'" is not going to work on >> >> any >> >> of these! >> >> As of the current version, "-f '%A'" is the default on MacOSX only. >> >> >> Probably the STATFLAG = "-f '%OLp'" that I use should be implemented >> >> for bsd in general. >> >> But then I would expect other BSD users to have complainted in the >> >> past!!!!!! >> > >> > I'm not sure there're plenty of them using LR regularly. >> >> They have complained, and the default STATFLAG for BSDs is "-f '%Op'". >> I would expect this to be sufficient for NetBSD as well. >> > I) > When I use luarocks v2.0.10 on NetBSD the platform is not recognized as bsd > platform and I have > multiple warnings in the output when installing lpeg but this version > manages to install the package. > (at least that is the message I did not actually test lpeg in this case.) > > $ bin/luarocks install lpeg > Installing http://luarocks.org/repositories/rocks/lpeg-0.10.2-1.src.rock... > Using http://luarocks.org/repositories/rocks/lpeg-0.10.2-1.src.rock... > switching to 'build' mode > Archive: > /tmp/luarocks_luarocks-rock-lpeg-0.10.2-1-5614/lpeg-0.10.2-1.src.rock > extracting: lpeg-0.10.2-1.rockspec > extracting: lpeg-0.10.2.tar.gz > cc -O2 -fPIC -I/k/home/eric/project/inline/lua/include -c lpeg.c -o lpeg.o > ld -shared -o lpeg.so -L/k/home/eric/project/inline/lua/lib lpeg.o > stat: unknown option -- c > usage: stat [-FlLnqrsx] [-f format] [-t timefmt] [file ...] > stat: unknown option -- c > usage: stat [-FlLnqrsx] [-f format] [-t timefmt] [file ...] > stat: unknown option -- c > usage: stat [-FlLnqrsx] [-f format] [-t timefmt] [file ...] > stat: unknown option -- c > usage: stat [-FlLnqrsx] [-f format] [-t timefmt] [file ...] > stat: unknown option -- c > usage: stat [-FlLnqrsx] [-f format] [-t timefmt] [file ...] > Updating manifest for /k/home/eric/project/inline/lua/lib/luarocks/rocks > > lpeg 0.10.2-1 is now built and installed in /k/home/eric/project/inline/lua/ > (license: MIT/X11) > > II) > When I patch luarocks to recognize NetBSD as a bsd platform (it is then > using STATFLAG = "-f '%Op'") with: > > elseif system == "NetBSD" then > detected.unix = true > detected.netbsd = true > detected.bsd = true > > and I install lpeg, it is successful but chmod is failing as you can see > below: > (Here I actually tested that lpeg could be loaded in lua.) > > $ bin/luarocks install lpeg > Installing http://luarocks.org/repositories/rocks/lpeg-0.10.2-1.src.rock... > Using http://luarocks.org/repositories/rocks/lpeg-0.10.2-1.src.rock... > switching to 'build' mode > Archive: > /tmp/luarocks_luarocks-rock-lpeg-0.10.2-1-1697/lpeg-0.10.2-1.src.rock > extracting: lpeg-0.10.2-1.rockspec > extracting: lpeg-0.10.2.tar.gz > cc -O2 -fPIC -I/k/home/eric/project/inline/lua/include -c lpeg.c -o lpeg.o > ld -shared -o lpeg.so -L/k/home/eric/project/inline/lua/lib lpeg.o > chmod: Cannot set file mode `100755': Invalid argument > chmod: Cannot set file mode `100444': Invalid argument > chmod: Cannot set file mode `100755': Invalid argument > chmod: Cannot set file mode `100644': Invalid argument > chmod: Cannot set file mode `100644': Invalid argument > Updating manifest for /k/home/eric/project/inline/lua/lib/luarocks/rocks > > lpeg 0.10.2-1 is now built and installed in /k/home/eric/project/inline/lua/ > (license: MIT/X11) > > III) > But to get rid of these chmod error on NetBSD the STATFLAG = "-f '%OLp'" is > doing the trick for me > > $ bin/luarocks install lpeg > Installing http://luarocks.org/repositories/rocks/lpeg-0.10.2-1.src.rock... > Using http://luarocks.org/repositories/rocks/lpeg-0.10.2-1.src.rock... > switching to 'build' mode > Archive: > /tmp/luarocks_luarocks-rock-lpeg-0.10.2-1-417/lpeg-0.10.2-1.src.rock > extracting: lpeg-0.10.2-1.rockspec > extracting: lpeg-0.10.2.tar.gz > cc -O2 -fPIC -I/k/home/eric/project/inline/lua/include -c lpeg.c -o lpeg.o > ld -shared -o lpeg.so -L/k/home/eric/project/inline/lua/lib lpeg.o > Updating manifest for /k/home/eric/project/inline/lua/lib/luarocks/rocks > > lpeg 0.10.2-1 is now built and installed in /k/home/eric/project/inline/lua/ > (license: MIT/X11) > > IV) > As you can see below doing some manual testing this will bring bsd results > for stat in line with linux behaviour: > > Linux stat behaviour using the luarocks (default) STATFLAG = "-c '%a'" > $ uname > Linux > $ stat -c '%a' .bash_profile > 644 > > FreeBSD test using the online FreeBSD system at m-net.arbornet.org > $ uname > FreeBSD > $ stat -f '%A' .login > stat: %A: bad format > $ stat -f '%Op' .login > 100644 > $ stat -f '%OLp' .login > 644 > > NetBSD test using a local system > $ uname > NetBSD > $ stat -f '%A' .login > stat: %A: bad format > $ stat -f '%Op' .login > 100644 > $ stat -f '%OLp' .login > 644 > > I expect OpenBSD to work the same as NetBSD (and FreeBSD) since OpenBSD is a > fork of NetBSD and > BSD developers do not start changing flags of basic unix userland utils, > certainly not Theo de Raadt :-) > > This brings me to the conclusion that the STATFLAG = "-f '%OLp'" is correct > for Free, Open and Net-BSD > And nobody is complaining because the package is installed anyhow.....
Thanks for the detailed testing and analysis! I'll update the default flags for the BSDs. -- Hisham http://hisham.hm/ ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Luarocks-developers mailing list Luarocks-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/luarocks-developers