Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update TriBITS install targets to set permissions and owning group #314

Closed
bartlettroscoe opened this issue Apr 22, 2020 · 10 comments
Closed

Comments

@bartlettroscoe
Copy link
Member

bartlettroscoe commented Apr 22, 2020

Description

This story is to extend the both (if possible) the built-in install target as well as the TriBITS custom install_package_by_package target to set the correct owning group and the correct group and other permissions after the install of all of the files that are not being set correctly in in some cases currently (see ATDV-241). This extends the existing support for the TriBITS variables:

  -D <Project>_MAKE_INSTALL_GROUP_READABLE=[TRUE|FALSE] \
  -D <Project>_MAKE_INSTALL_WORLD_READABLE=[TRUE|FALSE] \

which impact existing installed files and newly created directories. The problem is that current implementation does not result in installed files and directories in certain cases (again, see see ATDV-241).

In some cases the correct owning group is not being set correctly because some systems don't allow implementation of the group sticky bit (i.e. were one runs chgrp -R <owning-group> <install-base> ; chmod -R g+s <install-base>). Therefore, the owning group on the files and directories that CMake installs cannot be controlled in that way and instead the desired owning group must be manually set after the fact. This occurs, for example, in the case where a shared entity account drives the install but where the default group for that account is not the desired owning group of the installed files and directories. (This is the case where the 'jenkins' entity account with default group 'jenkins' installs Trilinos but where the wg-run-as-admin-devops group needs to own the install after it is complete.)

One solution to the group ownership problem is to this is to allow the user to select the desired owning group of the created installed files and directories at configure time by setting the TriBITS cache var:

  -D <Project>_MAKE_INSTALL_GROUP=<owning-group>

and then adding the custom install commands to manually set the owning group to <owning-group> after the install is complete.

Also, the correct group and other permissions can't be controlled by initially setting the umask when one is having to recursively install a set of files and directories using:

  INSTALL( DIRECTORY "<src-dir>" DESTINATION "<dest-dir-base>"
    USE_SOURCE_PERMISSIONS ... )

One must use USE_SOURCE_PERMISSIONS to preserve execute permissions on various scripts when they get installed. The reason that we have to use USE_SOURCE_PERMISSIONS is that we don't always know a-priori which of the files in <src-dir> have execute permissions and therefore we can't list them out to set their execute permissions (or we could just list them out explicitly). (This was needed to install the custom system settings directory in the ATDM Trilinos configuration where that directory can contain arbitrarily named shell scripts like trilinos_jsrun.) However, using USE_SOURCE_PERMISSIONS overrides the other permission options that CMake would otherwise use based on the specific permissions options being passed into other install() commands and using CMAKE_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS as described in Setting install directory permissions. So we need a way to fix those permissions after the fact. (Kitware contractor suggested fixing them manually with a recursive chmod.) In this case, we will need to fix the group and other read, write, and execute permissions appropriately. This may include needing to set group write access by setting:

  -D <Project>_MAKE_INSTALL_GROUP_WRITABLE=[TRUE|FALSE] \

Note that the CMake install command may create base directories above ${CMAKE_INSTALL_PREFIX} if it needs to create them so we need to know where to start fixing the group ownership and permissions. To make this explicit, we can ask the user to set the cache var:

  -D <Project>_SET_GROUP_AND_PERMISSIONS_ON_INSTALL_BASE_DIR=<install-base-dir>

where <install-base-dir> is a base directory of of ${CMAKE_INSTALL_PREFIX} that may not exist before the install is done and therefore the install command may create it. (If <Project>_SET_GROUP_AND_PERMISSIONS_ON_CMAKE_INSTALL_PREFIX_BASE is not set, then no fix up of permissions will be performed.)

Therefore, to configure to properly set the owning group and permissions, one would configure with the options:

-D <Project>_MAKE_INSTALL_WORLD_READABLE=TRUE \
-D <Project>_MAKE_INSTALL_GROUP_WRITABLE=TRUE \
-D <Project>_MAKE_INSTALL_GROUP=<owning-group> \
-D <Project>_SET_GROUP_AND_PERMISSIONS_ON_INSTALL_BASE_DIR=<install-base-dir> \

In the ATDM Trilinos configuration, this would be, for example:

-D <Project>_MAKE_INSTALL_WORLD_READABLE=TRUE \
-D <Project>_MAKE_INSTALL_GROUP_WRITABLE=TRUE \
-D <Project>_MAKE_INSTALL_GROUP=wg-run-as-atdm-devops \
-D <Project>_SET_GROUP_AND_PERMISSIONS_ON_INSTALL_BASE_DIR=/projects/atdm_devops/trilinos_installs/2020-04-10 \

which gets run by the 'jenkins' entity account. That would ensure that all of the files and directories from /projects/atdm_devops/trilinos_installs/2020-04-10 are owned by the wg-run-as-atdm-devops group and have the the directory and executable file permissions rwxrwxr-x and other regular files will have permissions rw-rw-r--.

Definition of Done

  • Try to have both the built-in install and the custom install_package_by_package targets set the correct owning group and permissions for all installed files and directories (for whatever files get installed).

  • Document the new group and permissions handling in the TriBITS Project Build Reference (replacing the current "Setting install directory permissions") to describe these new options and behaviors and why they are needed (i.e. systems were the group sticky bit is turned off and where umask can't be used due to USE_SOURCE_PERMISSIONS)

Tasks

[ ] ???

@jmgate
Copy link
Collaborator

jmgate commented Apr 23, 2020

@bartlettroscoe, do you have an idea on time-to-completion for this? I'm thinking I need to hack in a temporary solution for our deploys on chama/eclipse/stria. For some reason things work just fine on mutrino/vortex though.

@bartlettroscoe
Copy link
Member Author

do you have an idea on time-to-completion for this?

@jmgate, I am going to try to get this done today and submit a Trilinos PR for you to review (testing should not be needed on your end).

bartlettroscoe added a commit to bartlettroscoe/TriBITS that referenced this issue Apr 24, 2020
@bartlettroscoe
Copy link
Member Author

Some useful info from Kitware developers to keep in mind while I implement this.


From: Bartlett, Roscoe A
Sent: Friday, April 24, 2020 11:00 AM
To: 'Brad King' brad.king@kitware.com; Kyle Edwards kyle.edwards@kitware.com
Subject: RE: [EXTERNAL] Re: CMake install() settings to recursively install files and keep executable permissions?

Hello Brad,

Thanks for pointing that out the order specification. Since this will be called at the base-level CMakeLists.txt scope, I will not need to worry about ordering between directories.

That means I just need to call:

Install(SCRIPT "<...>/set_installed_group_and_permissions.sh)

at the very end of the TRIBITS_PROJECT() command, after everything else might have been installed.

(And projects will need to be careful to not do any extra installs after the TRIBITS_PROJECT() command ends but instead any extra rep-level or project-level installs in the files <projectDir>/cmake/CallbackDefineProjectPackaging.cmake and <repoDir>/cmake/CallbackDefineRepositoryPackaging.cmake. I wil need to remember to document that in the TriBITS Developers Guilde.)

Thanks!

-Ross


From: Brad King brad.king@kitware.com
Sent: Friday, April 24, 2020 7:21 AM
To: Bartlett, Roscoe A rabartl@sandia.gov; Kyle Edwards kyle.edwards@kitware.com
Subject: Re: [EXTERNAL] Re: CMake install() settings to recursively install files and keep executable permissions?

On 4/23/2020 4:47 PM, Bartlett, Roscoe A wrote:

Is it guaranteed that when using install(SCRIPT <script> ...) that
the <script> will be run after all of the other files are installed?
There is no mention of ordering of this script during installation at:

https://cmake.org/cmake/help/v3.17/command/install.html#code

Yes, scripts will stay ordered. The overall introduction at the top of that page:

https://cmake.org/cmake/help/v3.17/command/install.html#introduction

says "Rules ... within a source directory are executed in order during installation".

It also says the "order across directories is not defined", but if CMP0082:

https://cmake.org/cmake/help/v3.17/policy/CMP0082.html

is set to NEW then I think the order is now defined across directories too.
Kyle, is the order under CMP0082's NEW behavior now well-defined such that we should update that documentation?

-Brad

bartlettroscoe added a commit to bartlettroscoe/TriBITS that referenced this issue Apr 24, 2020
How this has all of the parts needed to ensure that the group and directory
permissions are set correctly on install that matches the ATDM Trilinos case
reproted in ATDV-241.
bartlettroscoe added a commit to bartlettroscoe/TriBITS that referenced this issue Apr 24, 2020
How this has all of the parts needed to ensure that the group and directory
permissions are set correctly on install that matches the ATDM Trilinos case
reproted in ATDV-241.
bartlettroscoe added a commit to bartlettroscoe/TriBITS that referenced this issue Apr 24, 2020
bartlettroscoe added a commit to bartlettroscoe/TriBITS that referenced this issue Apr 24, 2020
@bartlettroscoe
Copy link
Member Author

I created the PR for this #315.

@bradking,

It looks like using:

install(SCRIPT set_installed_group_and_permissions.cmake)

to try to get it to run after all of the other files get installed does not actually work. If you look at the TriBITS test for the 'install' command at:

you will see that the script gets called pretty early on during the 'install' command showing:

...
-- Installing: /home/travis/build/TriBITSPub/tribits-build/BUILD/test/core/ExamplesUnitTests/TriBITS_TribitsExampleProject_install_perms/install_base/install/include/TribitsExProjConfig.cmake
-- Running: chgrp travis -R /home/travis/build/TriBITSPub/tribits-build/BUILD/test/core/ExamplesUnitTests/TriBITS_TribitsExampleProject_install_perms/install_base
-- Running: chmod g+rwX,o+rX -R /home/travis/build/TriBITSPub/tribits-build/BUILD/test/core/ExamplesUnitTests/TriBITS_TribitsExampleProject_install_perms/install_base
...

It seems like everything in subdirs is installed after the project-level stuff, even though that install(SCRIPT ...) command was called after all of those other add_subdirectory() commands.

Is this how it is supposed to work?

bartlettroscoe added a commit to bartlettroscoe/TriBITS that referenced this issue Apr 25, 2020
I also fixed the group read-only permissions.  Not sure how I missed that.

Note that we can now set permissions correctly for all versions of CMake!
bartlettroscoe added a commit to bartlettroscoe/TriBITS that referenced this issue Apr 25, 2020
…riBITSPub#314)

I also removed the surrounding whitespace around the tests.
@bartlettroscoe
Copy link
Member Author

@bradking,

I found a workaround that I show in commit 7790c7e. The workaround is to add the install(SCRIPT ...) command in a CMakeLists.txt file included with add_subdirectory() after all of the other subdirectories have been added.

Note that the most current documentation at:

which says:

This command generates installation rules for a project. Rules specified by calls to this command within a source directory are executed in order during installation. The order across directories is not defined.

is not true if policy:

is set. You should update that documentation to mention policy CMP0082 (since what is currently stated "The order across directories is not defined" is actually deprecated behavior).

However, we can't rely on that policy because the plan in #299 it to make TriBITS require CMake 3.13+ but this was only added in CMake 3.14. (But we are setting that policy to NEW when defined just to be safe.)

So now I just need to update documentation, clean up the commits, and this is ready to merge to 'master' and update to Trilinos.

bartlettroscoe added a commit to bartlettroscoe/TriBITS that referenced this issue Apr 25, 2020
…y_package test (TriBITSPub#314)

Now I know that if a package fails to build and install that the other
packages that did build will install and have the correct permissions.
@bradking
Copy link
Contributor

CMake MR 4672 updates the install() command documentation to mention CMP0082. Without that policy, using a final add_subdirectory is a suitable approach. I've done that in other projects before.

bartlettroscoe added a commit to bartlettroscoe/TriBITS that referenced this issue Apr 27, 2020
bartlettroscoe added a commit to bartlettroscoe/TriBITS that referenced this issue Apr 27, 2020
bartlettroscoe added a commit to bartlettroscoe/TriBITS that referenced this issue Apr 27, 2020
bartlettroscoe added a commit to bartlettroscoe/TriBITS that referenced this issue Apr 27, 2020
…TSPub#314)

I also fixed numerious mispelling of "UNITEST" to "UNITTEST".
bartlettroscoe added a commit to bartlettroscoe/TriBITS that referenced this issue Apr 27, 2020
…SPub#314)

Refectored some other installation-cleanup code to by extracting some
functions.
bartlettroscoe added a commit to bartlettroscoe/TriBITS that referenced this issue Apr 28, 2020
bartlettroscoe added a commit to bartlettroscoe/TriBITS that referenced this issue Apr 29, 2020
bartlettroscoe added a commit to bartlettroscoe/TriBITS that referenced this issue Apr 29, 2020
…riBITSPub#314, ATDV-241)

This is needed to fix some permisisons problems related to that ATDM Trilinos
builds (see ATDV-241).

See the updated documentation and unit tests for details.

Other things I did as part of this:

* Options ${PROJECT_NAME}_MAKE_INSTALL_GROUP_READABLE and
  ${PROJECT_NAME}_MAKE_INSTALL_WORLD_READABLE no longer conditional (since
  they are enforced by recursive chmod).

* Set policy CMP0082 to make install() commands run in order based on how they
  were executed in the CMake configure.

* Added TRIBITS_DIR_IS_BASEDIR() and unit tests

* Fixed numerious mispelling of "UNITEST" to "UNITTEST".

* Refectored some other installation-cleanup code to by extracting some
  functions.
bartlettroscoe added a commit that referenced this issue Apr 29, 2020
Build/Test Cases Summary
Enabled Packages:
Enabled all Packages
0) MPI_DEBUG => passed: passed=364,notpassed=0 (1.79 min)
1) SERIAL_RELEASE => passed: passed=364,notpassed=0 (1.50 min)
Other local commits for this build/test group: 889fa64, aa0f122
@bartlettroscoe
Copy link
Member Author

FYI: PR #315 is merged. Now to snapshot this to Trilinos and update the ATDM Trilinos configuration to automatically fixup the permissions for all ATDM Trilinos builds.

Putting this issue in review.

@bartlettroscoe
Copy link
Member Author

Shoot, one issue that I overlooked is what happens when to different user accounts try to install into the same base directory. For that ATDM Trilinos builds, they install (as of today) under the same <date> directory using two different user accounts 'jenkins' and 'atdm-devops-admin' on the SNL HPC machines. All of the builds on these machines configure with:

-D CMAKE_INSTALL_PREFIX=/projects/atdm_devops/trilinos_installs/<date>/<buildname> \
-D Trilinos_SET_GROUP_AND_PERMISSIONS_ON_INSTALL_BASE_DIR=/projects/atdm_devops/trilinos_installs/<date> \

So for today it was:

-D CMAKE_INSTALL_PREFIX=/projects/atdm_devops/trilinos_installs/2020-05-01/<buildname> \
-D Trilinos_SET_GROUP_AND_PERMISSIONS_ON_INSTALL_BASE_DIR=/projects/atdm_devops/trilinos_installs/2020-05-01 \

Looking at that directory and its subdirs today on the SNL HPC machines, we can see what happened:

$ ls -ld /projects/atdm_devops/trilinos_installs/2020-05-01
drwxrwxr-x 16 atdm-devops-admin wg-run-as-atdm-devops 4096 May  1 07:58 /projects/atdm_devops/trilinos_installs/2020-05-01

$ ls -ld /projects/atdm_devops/trilinos_installs/2020-05-01/*
drwxrwxr-x 6 atdm-devops-admin wg-run-as-atdm-devops 4096 Apr 30 23:36 /projects/atdm_devops/trilinos_installs/2020-05-01/ats1-hsw_intel-18.0.5_mpich-7.7.6_openmp_static_dbg
drwxrwxr-x 6 atdm-devops-admin wg-run-as-atdm-devops 4096 Apr 30 23:31 /projects/atdm_devops/trilinos_installs/2020-05-01/ats1-hsw_intel-18.0.5_mpich-7.7.6_openmp_static_opt
drwxrwxr-x 6 atdm-devops-admin wg-run-as-atdm-devops 4096 Apr 30 23:35 /projects/atdm_devops/trilinos_installs/2020-05-01/ats1-hsw_intel-19.0.4_mpich-7.7.6_openmp_static_dbg
drwxrwxr-x 6 atdm-devops-admin wg-run-as-atdm-devops 4096 Apr 30 23:30 /projects/atdm_devops/trilinos_installs/2020-05-01/ats1-hsw_intel-19.0.4_mpich-7.7.6_openmp_static_opt
drwxrwxr-x 6 atdm-devops-admin wg-run-as-atdm-devops 4096 May  1 06:35 /projects/atdm_devops/trilinos_installs/2020-05-01/ats1-knl_intel-18.0.5_mpich-7.7.6_openmp_static_dbg
drwxrwxr-x 6 atdm-devops-admin wg-run-as-atdm-devops 4096 May  1 06:50 /projects/atdm_devops/trilinos_installs/2020-05-01/ats1-knl_intel-18.0.5_mpich-7.7.6_openmp_static_opt
drwxrwxr-x 6 atdm-devops-admin wg-run-as-atdm-devops 4096 May  1 07:58 /projects/atdm_devops/trilinos_installs/2020-05-01/ats1-knl_intel-19.0.4_mpich-7.7.6_openmp_static_dbg
drwxrwxr-x 6 atdm-devops-admin wg-run-as-atdm-devops 4096 May  1 07:29 /projects/atdm_devops/trilinos_installs/2020-05-01/ats1-knl_intel-19.0.4_mpich-7.7.6_openmp_static_opt
drwxrwxr-x 7 jenkins           wg-run-as-atdm-devops 4096 May  1 06:32 /projects/atdm_devops/trilinos_installs/2020-05-01/ats2-cuda-10.1.243-gnu-7.3.1-spmpi-2019.06.24_static_dbg
drwxrwxr-x 7 jenkins           wg-run-as-atdm-devops 4096 May  1 07:08 /projects/atdm_devops/trilinos_installs/2020-05-01/ats2-cuda-10.1.243-gnu-7.3.1-spmpi-2019.06.24_static_opt
drwxrwxr-x 7 jenkins           wg-run-as-atdm-devops 4096 May  1 04:03 /projects/atdm_devops/trilinos_installs/2020-05-01/ats2-gnu-7.3.1-spmpi-2019.06.24_serial_static_dbg
drwxrwxr-x 7 jenkins           wg-run-as-atdm-devops 4096 May  1 03:45 /projects/atdm_devops/trilinos_installs/2020-05-01/ats2-gnu-7.3.1-spmpi-2019.06.24_serial_static_opt
drwxrwxr-x 7 jenkins           wg-run-as-atdm-devops 4096 May  1 02:52 /projects/atdm_devops/trilinos_installs/2020-05-01/van1-tx2_arm-20.0_openmpi-4.0.2_openmp_static_dbg
drwxrwxr-x 7 jenkins           wg-run-as-atdm-devops 4096 May  1 02:23 /projects/atdm_devops/trilinos_installs/2020-05-01/van1-tx2_arm-20.0_openmpi-4.0.2_openmp_static_opt

We can see that the 'atdm-devops-admin' account completed the install first and created the directory:

drwxrwxr-x 16 atdm-devops-admin wg-run-as-atdm-devops 4096 May  1 07:58 /projects/atdm_devops/trilinos_installs/2020-05-01

first and therefore all of the 'jenkins' jobs trying to install for the envs 'van1-tx2' (on 'stria') and 'ats2' (on 'vortex') have the commands:

-- 0: Running: chgrp wg-run-as-atdm-devops /projects/atdm_devops/trilinos_installs/2020-05-01
-- 0: Running: chmod g+rwX,o+rX /projects/atdm_devops/trilinos_installs/2020-05-01

failing since 'jenkins' does not own that directory. You can see this in the Trilinos-atdm-ats2-cuda-10.1.243-gnu-7.3.1-spmpi-2019.06.24_static_dbg build today with the build error in 'Zoltan2' for the target 'install_package_by_package' shown here showing:

chgrp: changing group of ‘/projects/atdm_devops/trilinos_installs/2020-05-01’: Operation not permitted
CMake Error at set_installed_group_and_permissions.cmake:23 (MESSAGE): 
  ERROR: Above command failed!
Call Stack (most recent call first):
   set_installed_group_and_permissions.cmake:30 (ECHO_AND_RUN_CMND)
   set_installed_group_and_permissions.cmake:63 (SET_DIR_OWNER_AND_PERMS)
   add_install_group_and_perms_fixups/cmake_install.cmake:46 (include)
   cmake_install.cmake:195 (include) 

chmod: changing permissions of ‘/projects/atdm_devops/trilinos_installs/2020-05-01’: Operation not permitted
CMake Error at set_installed_group_and_permissions.cmake:23 (MESSAGE):
   ERROR: Above command failed! Call Stack (most recent call first):
   set_installed_group_and_permissions.cmake:35 (ECHO_AND_RUN_CMND)
   set_installed_group_and_permissions.cmake:63 (SET_DIR_OWNER_AND_PERMS)
   add_install_group_and_perms_fixups/cmake_install.cmake:46 (include)
   cmake_install.cmake:195 (include)

Now, this did not cause the install to fail in anyway because the driver script set_installed_group_and_permissions.cmake is set up to be "robust" and complete the running of all of the commands which you can see here showing:

-- 0: Running: chgrp wg-run-as-atdm-devops /projects/atdm_devops/trilinos_installs/2020-05-01
-- 0: Running: chmod g+rwX,o+rX /projects/atdm_devops/trilinos_installs/2020-05-01
-- 1: Running: chgrp wg-run-as-atdm-devops -R /projects/atdm_devops/trilinos_installs/2020-05-01/ats2-cuda-10.1.243-gnu-7.3.1-spmpi-2019.06.24_static_dbg
-- 1: Running: chmod g+rwX,o+rX -R /projects/atdm_devops/trilinos_installs/2020-05-01/ats2-cuda-10.1.243-gnu-7.3.1-spmpi-2019.06.24_static_dbg

And we see the right group and permissions set on the actual CMAKE_INSTALL_PREFIX dir above.

But we can't be having build errors showing up on CDash for this. Therefore, I need to add logic to make sure that the owner of these base directories are the same as the owner trying to change the group and permissions. If the owner is not the same, then just print a note that the group and permissions can not be changed because the owner is different.

I can implement this and test it manually, but it will be hard to write an automated test for this. But it did occur to me that I could use the 'atdm-devops-admin' account and the 'run-as-atdm-devops-admin' utility executable to set up a test that can simulate this in TriBITS. I will do that.

bartlettroscoe added a commit to bartlettroscoe/TriBITS that referenced this issue May 1, 2020
bartlettroscoe added a commit to bartlettroscoe/TriBITS that referenced this issue May 1, 2020
The test took about 10x more time and care to write than the actual production
code :-(
bartlettroscoe added a commit to bartlettroscoe/TriBITS that referenced this issue May 1, 2020
The test took about 10x more time and care to write the tests than the actual
production code :-(
bartlettroscoe added a commit to bartlettroscoe/TriBITS that referenced this issue May 1, 2020
The test took about 10x more time and care to write the tests than the actual
production code :-(
bartlettroscoe added a commit that referenced this issue May 1, 2020
Build/Test Cases Summary
Enabled Packages:
Enabled all Packages
0) MPI_DEBUG => passed: passed=365,notpassed=0 (2.35 min)
1) SERIAL_RELEASE => passed: passed=365,notpassed=0 (1.99 min)
Other local commits for this build/test group: 4b335ea, 6556c99, b60530c
bartlettroscoe added a commit to bartlettroscoe/Trilinos that referenced this issue May 1, 2020
…nstall-base-dir (ATDV-241)

Avoids trying to change the group or permissions on a base install dir you
don't own.  (See TriBITSPub/TriBITS#314)
@bartlettroscoe
Copy link
Member Author

With the pushed merge commit be318a4 to TriBITS 'master' and the Trilinos TriBITS snapshot PR trilinos/Trilinos#7297, this should not be 100% complete.

Moving back to "in review" to watch this some more.

@bartlettroscoe
Copy link
Member Author

@jmgate verified this fixed the install permissions problems with EMPIRE. (See https://cee-gitlab.sandia.gov/EM-Plasma/BuildScripts/issues/301#note_415312)

@bartlettroscoe bartlettroscoe changed the title Update TriBITS install targets to set permissions and owning grup Update TriBITS install targets to set permissions and owning group Sep 22, 2020
bartlettroscoe added a commit to bartlettroscoe/TriBITS that referenced this issue Sep 22, 2020
…Windows (TriBITSPub#314)

This replaces logic that just ignored the instal perm/group modification
options for Windows platforms added as part of Story TriBITSPub#314.  Now if the user
tries to set any of these options, it errors out with a (hopefully) good error
message.

This was flagged as part of the review of PR TriBITSPub#327.
bartlettroscoe added a commit that referenced this issue Sep 22, 2020
…trilinos/Trilinos#7881)

Build/Test Cases Summary
Enabled Packages:
Enabled all Packages
0) MPI_DEBUG => passed: passed=382,notpassed=0 (2.25 min)
1) SERIAL_RELEASE => passed: passed=382,notpassed=0 (1.43 min)
2) MPI_DEBUG_CMake-3.17.0 => passed: passed=387,notpassed=0 (2.85 min)
3) SERIAL_RELEASE_CMake-3.17.0 => passed: passed=387,notpassed=0 (2.40 min)
Other local commits for this build/test group: f4001a1, 1ed3811, e8467f7
bartlettroscoe added a commit to bartlettroscoe/TriBITS that referenced this issue Jul 20, 2021
…#314, TriBITSPub#363)

With CMake 3.21, with umask=g-rwx,o-rwx you need explicitly set g+rX for the
group permissions to be r-X when setting
<Project>_MAKE_INSTALL_WORLD_READABLE=ON which was doing just:

  chmod -R o+rX <dir>

Now, when you ony set <Project>_MAKE_INSTALL_WORLD_READABLE=ON, you get:

  chmod -R g+rX,o+rX <dir>

For some reason, with older verisons of CMake, it was setting the default
group permission as 'r-x' when it should not have been.  I ran exactly the
same build on the same machine (crf450) with the same env except I used CMake
3.21.0 vs. 3.17.1 and I had to make this change to get the same permissions on
the base install directory.  Strange.
@bartlettroscoe bartlettroscoe moved this to Done in TriBITS Jun 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

No branches or pull requests

3 participants