On Thu, Aug 2, 2012 at 2:28 AM, Hisham <[email protected]> wrote:

> On Mon, Jul 23, 2012 at 11:58 AM, eric koorn <[email protected]> wrote:
> > L.S.
> >
> > With below patch I get luarocks (version 2.0.10) working for the lua
> > packages I use on the NetBSD platform. Probably more needs to be done but
> > with this first step packages get installed instead of failing on an
> > unspecified stat option.
> >
> > ==BEGIN PATCH
> > --- ./org/lua/share/lua/5.1/luarocks/cfg.lua    2012-07-23
> > 03:35:07.000000000 +0200
> > +++ ./new/lua/share/lua/5.1/luarocks/cfg.lua    2012-07-23
> > 02:46:03.000000000 +0200
> > @@ -69,6 +69,10 @@
> >     detected.unix = true
> >     detected.openbsd = true
> >     detected.bsd = true
> > +elseif system == "NetBSD" then
> > +   detected.unix = true
> > +   detected.netbsd = true
> > +   detected.bsd = true
> >  elseif system == "Darwin" then
> >     detected.unix = true
> >     detected.macosx = true
> > @@ -380,6 +384,16 @@
> >     defaults.platforms = {"unix", "bsd", "openbsd"}
> >  end
> >
> > +if detected.netbsd then
> > +   defaults.arch = "netbsd-"..proc
> > +   defaults.make = "gmake"
> > +   defaults.platforms = {"unix", "bsd", "netbsd"}
> > +   defaults.variables.CC = "gcc"
> > +   defaults.variables.LD = "gcc"
> > +   defaults.variables.LIBFLAG = "-shared"
> > +   defaults.variables.STATFLAG = "-f '%OLp'"
> > +end
> > +
> >  if detected.solaris then
> >     defaults.arch = "solaris-"..proc
> >     defaults.platforms = {"unix", "solaris"}
> > ==END PATCH
>
> Thank you! A question, though: does the STATFLAG really have to be
> different from the other BSDs?
>
> -- Hisham
> http://hisham.hm/
>
L.S

I do not have the other major BSD platforms available for test.
But a quick review of the online stat(1) manpages show they are all the
same in this respect.

The default luarocks bsd STATFLAG = "-f '%A'" is not going to work on any
of these!

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!!!!!!

The OpenBSD override STATFLAG = "-f '%Op'" could then probably disappear
since the addition L in my NetBSD patch specifies
the ``user'', ``group'', and ``other'' bits also on OpenBSD


ref: FreeBSD (and OpenBSD) manpage part:
L            ``Low'' -- specifies the minor number for devices from r
                     or d, the ``other'' bits for permissions from the
string
                     form of p, ==>>the ``user'', ``group'', and ``other''
bits
                     from the numeric forms of p<<==, and the ls -F sty

ref man pages of the major bsd's:
http://www.openbsd.org/cgi-bin/man.cgi?query=stat&apropos=0&sektion=1&manpath=OpenBSD+Current&arch=i386&format=html
http://www.freebsd.org/cgi/man.cgi?query=stat&apropos=0&sektion=1&manpath=FreeBSD+9.0-RELEASE&arch=default&format=html
http://netbsd.gw.com/cgi-bin/man-cgi?stat+1+NetBSD-current

regards Eric
------------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/luarocks-developers

Reply via email to