Re: [tup] Tup and linux namespaces

2015-09-30 Thread Ben Boeckel
On Wed, Sep 30, 2015 at 22:53:35 +0200, Freddie Chopin wrote:
> Anyway - I cloned the repo, checked out your branch and tried to build it, 
> but 
> the procedure failed. I think I may be missing something here - I'm not a 
> Linux expert, so sorry if this is dumb...
> 
> > $ ./bootstrap.sh
> > ...
> > .tup repository initialized.
> > unshare(CLONE_NEWUSER): Invalid argument
> > tup error: Unable to create user namespace for subprocesses.

Your kernel is either too old or doesn't have the option turned on.

https://lwn.net/Articles/532593/

> Starting with Linux 3.8 (and unlike the flags used for creating other
> types of namespaces), no privilege is required to create a user
> namespace.

--Ben

-- 
-- 
tup-users mailing list
email: tup-users@googlegroups.com
unsubscribe: tup-users+unsubscr...@googlegroups.com
options: http://groups.google.com/group/tup-users?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"tup-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tup-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [tup] Tup and linux namespaces

2015-09-30 Thread Freddie Chopin
On Wednesday 30 of September 2015 17:18:58 Ben Boeckel wrote:
> Do you have any /proc/config* files?

Just this:

> $ ls /proc/config*
> /proc/config.gz

> Do they have CONFIG_USER_NS in them
> at all?

After extracting:

> # CONFIG_USER_NS is not set

So I guess Arch Linux won't work in this scenario... Is there any way I could 
make my user "privileged"?

Regards,
FCh

-- 
-- 
tup-users mailing list
email: tup-users@googlegroups.com
unsubscribe: tup-users+unsubscr...@googlegroups.com
options: http://groups.google.com/group/tup-users?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"tup-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tup-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [tup] Tup and linux namespaces

2015-09-30 Thread Freddie Chopin
On Wednesday 30 of September 2015 17:04:02 Ben Boeckel wrote:
> Your kernel is either too old or doesn't have the option turned on.
> 
> https://lwn.net/Articles/532593/
> 
> > Starting with Linux 3.8 (and unlike the flags used for creating other
> > types of namespaces), no privilege is required to create a user
> > namespace.

Well, it certainly isn't too old, so this leaves the second option...

> $ uname -a
> Linux 4.2.1-1-ARCH #1 SMP PREEMPT Tue Sep 22 06:57:07 CEST 2015
> x86_64 GNU/Linux

Does the thing below have something to do with my problem?

> Due to security concerns, the default Arch kernel does NOT ship with the
> ability to run containers as an unprivileged user;

https://wiki.archlinux.org/index.php/Linux_Containers#Required_software

?

I've tried to run the compilation via "sudo", but this didn't change anything.

Regards,
FCh

-- 
-- 
tup-users mailing list
email: tup-users@googlegroups.com
unsubscribe: tup-users+unsubscr...@googlegroups.com
options: http://groups.google.com/group/tup-users?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"tup-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tup-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [tup] Multiple output groups?

2015-09-30 Thread Freddie Chopin
Hello Mike!

On Tuesday 29 of September 2015 16:34:04 Mike Shal wrote:
> I don't think there are any major technical reasons why it couldn't be
> implemented. There was an issue filed on github a while back for this that
> has some more details: https://github.com/gittup/tup/issues/166

Good to know that there are no technical limitations to implementing such 
thing. For now I've solved my problem without need for multiple groups, but 
the solution with multiple groups would look better and be more universal (;

If anyone is interested in what I've done, you can check last few commits that 
mention "tup build", or any tup file (Tuprules.lua, Tupfile.lua) - 
https://github.com/DISTORTEC/distortos

Generally I've managed to (ab)use groups to pass any number of single files 
with their path (archives, generated linker scripts) or any number of normal 
groups (compiled objects) to the function that does linking (link()). All of 
that uses lua's varargs.

> Yeah, they can be handy :). Part of me thinks that we could just use groups
> for inputs/outputs and not list any files manually. Though we'd also have
> to fix the explicit-listing-of-output-files issue for that to work.

This is something (partially) close to what I've done in my project. If I 
archive multiple objects to an archive libsomething.a in output/some/path/ 
then I also put this file in $(TOP)/output/some/path/. By 
passing such group to a function (that generates some rule - for example to do 
the linking) I can get the type of the file from the extension in the group 
name (".a") and I can get the path from the whole string. I actually pass only 
the real path to file to the function, which internally is converted to proper 
group. Lua parser gives you many possibilities, but because not many people 
use it (noone? (; ) most of the "proper ways of doing something" still wait to 
be discovered (;

Regards,
FCh

-- 
-- 
tup-users mailing list
email: tup-users@googlegroups.com
unsubscribe: tup-users+unsubscr...@googlegroups.com
options: http://groups.google.com/group/tup-users?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"tup-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tup-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [tup] Tup and linux namespaces

2015-09-30 Thread Freddie Chopin
On Tuesday 29 of September 2015 16:28:33 Mike Shal wrote:
> Well I know it's been a long time, but I was finally able to revisit this.
> I pushed a test patch to the 'unshare' branch on github, which avoids the
> .tup/mnt path issue, even without using the ^c flag and without suid.
> 
> For those who are interested, can you try it out and let me know if there
> are any regressions? The test cases pass on Linux (it probably breaks OSX,
> which is why it's not on master). I've noticed a small degradation in
> performance, but I'm not totally sure yet where it's coming from.

Hi!

First of all - it's good to see you back, I was starting to worry that tup 
would become a dead project... ;(

Anyway - I cloned the repo, checked out your branch and tried to build it, but 
the procedure failed. I think I may be missing something here - I'm not a 
Linux expert, so sorry if this is dumb...

> $ ./bootstrap.sh
> 
>   mkdir build
>   cd build
>   bootstrap CC -g ../src/lua/lapi.c
>   bootstrap CC -g ../src/lua/lauxlib.c
>   bootstrap CC -g ../src/lua/lbaselib.c
>   bootstrap CC -g ../src/lua/lbitlib.c
>   bootstrap CC -g ../src/lua/lcode.c
>   bootstrap CC -g ../src/lua/lcorolib.c
>   bootstrap CC -g ../src/lua/lctype.c
>   bootstrap CC -g ../src/lua/ldblib.c
>   bootstrap CC -g ../src/lua/ldebug.c
>   bootstrap CC -g ../src/lua/ldo.c
>   bootstrap CC -g ../src/lua/ldump.c
>   bootstrap CC -g ../src/lua/lfunc.c
>   bootstrap CC -g ../src/lua/lgc.c
>   bootstrap CC -g ../src/lua/linit.c
>   bootstrap CC -g ../src/lua/liolib.c
>   bootstrap CC -g ../src/lua/llex.c
>   bootstrap CC -g ../src/lua/lmathlib.c
>   bootstrap CC -g ../src/lua/lmem.c
>   bootstrap CC -g ../src/lua/loadlib.c
>   bootstrap CC -g ../src/lua/lobject.c
>   bootstrap CC -g ../src/lua/lopcodes.c
>   bootstrap CC -g ../src/lua/loslib.c
>   bootstrap CC -g ../src/lua/lparser.c
>   bootstrap CC -g ../src/lua/lstate.c
>   bootstrap CC -g ../src/lua/lstring.c
>   bootstrap CC -g ../src/lua/lstrlib.c
>   bootstrap CC -g ../src/lua/ltable.c
>   bootstrap CC -g ../src/lua/ltablib.c
>   bootstrap CC -g ../src/lua/ltm.c
>   bootstrap CC -g ../src/lua/lua.c
>   bootstrap CC -g ../src/lua/luac.c
>   bootstrap CC -g ../src/lua/lundump.c
>   bootstrap CC -g ../src/lua/lvm.c
>   bootstrap CC -g ../src/lua/lzio.c
>   link lua
>   bootstrap CC -g ../src/tup/bin.c
>   bootstrap CC -g ../src/tup/colors.c
>   bootstrap CC -g ../src/tup/config.c
>   bootstrap CC -g ../src/tup/create_name_file.c
>   bootstrap CC -g ../src/tup/db.c
>   bootstrap CC -g ../src/tup/debug.c
>   bootstrap CC -g ../src/tup/delete_name_file.c
>   bootstrap CC -g ../src/tup/dircache.c
>   bootstrap CC -g ../src/tup/entry.c
>   bootstrap CC -g ../src/tup/environ.c
>   bootstrap CC -g ../src/tup/estring.c
>   bootstrap CC -g ../src/tup/file.c
>   bootstrap CC -g ../src/tup/fslurp.c
>   bootstrap CC -g ../src/tup/graph.c
>   bootstrap CC -g ../src/tup/if_stmt.c
>   bootstrap CC -g ../src/tup/init.c
>   bootstrap CC -g ../src/tup/lock.c
>   bootstrap CC -g ../src/tup/luaparser.c
>   bootstrap CC -g ../src/tup/option.c
>   bootstrap CC -g ../src/tup/parser.c
>   bootstrap CC -g ../src/tup/path.c
>   bootstrap CC -g ../src/tup/pel_group.c
>   bootstrap CC -g ../src/tup/platform.c
>   bootstrap CC -g ../src/tup/progress.c
>   bootstrap CC -g ../src/tup/send_event.c
>   bootstrap CC -g ../src/tup/string_tree.c
>   bootstrap CC -g ../src/tup/thread_tree.c
>   bootstrap CC -g ../src/tup/timespan.c
>   bootstrap CC -g ../src/tup/tupid_tree.c
>   bootstrap CC -g ../src/tup/updater.c
>   bootstrap CC -g ../src/tup/vardb.c
>   bootstrap CC -g ../src/tup/vardict.c
>   bootstrap CC -g ../src/tup/variant.c
>   bootstrap CC -g ../src/tup/varsed.c
>   bootstrap CC -g ../src/tup/tup/main.c
>   bootstrap CC -g ../src/tup/monitor/null.c
>   bootstrap CC -g ../src/tup/flock/fcntl.c
>   bootstrap CC -g ../src/tup/server/fuse_fs.c
>   bootstrap CC -g ../src/tup/server/fuse_server.c
>   bootstrap CC -g ../src/tup/server/master_fork.c
>   bootstrap CC -g ../src/inih/ini.c
>   bootstrap CC -g ../src/compat/dummy.c
>   bootstrap CC -g ../src/compat/utimensat_linux.c
>   bootstrap CC -g ../src/sqlite3/sqlite3.c
>   bootstrap LD tup -lm
> 
> .tup repository initialized.
> unshare(CLONE_NEWUSER): Invalid argument
> tup error: Unable to create user namespace for subprocesses.
> [ tup ] [0.007s] Scanning filesystem...
> [ tup ] [0.042s] Reading in new environment variables...
> [ tup ] [0.049s] Parsing Tupfiles...
> 
>  1) [0.003s] src/lua
>  2) [0.001s] src/luabuiltin
>  3) [0.004s] src/tup
>  4) [0.000s] src/tup/flock
>  5) [0.000s] src/tup/monitor
>  6) [0.001s] src/tup/server
>  7) [0.001s] src/sqlite3
>  8) [0.001s] src/inih
>  9) [0.000s] src/compat
>  10) [0.000s] src/tup/tup
>  11) [0.002s] .
>  12) [0.000s] build
>  13) [0.000s] build/luabuiltin
>  14) [0.001s] test
>  15) [0.000s] test/make_v_tup
>  16) [0.000s] src
>  17) [0.000s] src/compat/win32
>  18) [0.000s] src/compat/win32/detect
>  19) [0.000s] 

Re: [tup] Tup and linux namespaces

2015-09-30 Thread Ben Boeckel
On Wed, Sep 30, 2015 at 23:24:01 +0200, Freddie Chopin wrote:
> After extracting:
> 
> > # CONFIG_USER_NS is not set

For future reference, there is also zless and zgrep :) .

> So I guess Arch Linux won't work in this scenario... Is there any way I could 
> make my user "privileged"?

This means support isn't even enabled, root or no. You'll need to
recompile your kernel with it set.

--Ben

-- 
-- 
tup-users mailing list
email: tup-users@googlegroups.com
unsubscribe: tup-users+unsubscr...@googlegroups.com
options: http://groups.google.com/group/tup-users?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"tup-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tup-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.