[build2] Executable ELF files not installed with executable file mode

Boris Kolpackov boris at codesynthesis.com
Mon Sep 17 15:13:49 UTC 2018


Matthew Krupcale <mkrupcale at matthewkrupcale.com> writes:

> If the user does not specify target install.mode and specifies the
> install directory mode 755 for /usr/lib64, will static libraries
> installed here still have mode 644 (as they should)? I noticed lines
> like
> 
> install_mode<liba> (bs, "644");
> 
> in build2/build2/bin/init.cxx and was wondering how this worked.

Yes, we can specify the install mode on the target type (or
even specific target) basis and it will override the mode of
the installation directory.


> Is the target-type-specific install.mode specified in the buildfile
> and/or root.build file(s)? If so, this is quite general and powerful.

It can be. For some targets (like liba{} above) the default is specified
by the build system module.


> If both the target type install.mode and the directory mode e.g.
> config.install.bin.mode are not specified, what will the default mode
> be? Is the default mode target-type dependent?

It will be taken from the global (i.e., project-wide) install.mode
which defaults to 644 and is configurable with config.install.mode.
BTW, all this (flexible but also admittedly hairy) logic is in
build2/install/init.cxx.

 
> Thanks for the help and sorry for my misunderstanding / oversimplification.

No, problem. We will need to properly document all this at some point so
it's good to see which areas need attention.



More information about the users mailing list