Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,20 @@ project(static-subid C)
# ##############################################################################
# CMake modules
include(GNUInstallDirs)
include(CheckCSourceCompiles)
include(CheckCCompilerFlag)
enable_testing()

# ##############################################################################
# Require out-of-source builds
file(TO_CMAKE_PATH "${PROJECT_BINARY_DIR}/CMakeLists.txt" LOC_PATH)
if(EXISTS "${LOC_PATH}")
message(
FATAL_ERROR
"You cannot build in a source directory (or any directory with a CMakeLists.txt file). Please make a build subdirectory and run cmake from there."
)
endif(EXISTS "${LOC_PATH}")
if(CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR)
message(FATAL_ERROR
"In-source builds are not allowed.\n"
"Create a separate build directory and run cmake from there:\n"
" mkdir build && cd build && cmake ..\n"
"Remove CMakeCache.txt and CMakeFiles/ if they were created here."
)
endif()

# ##############################################################################
# Compiler Sanity Test
Expand Down
2 changes: 1 addition & 1 deletion static-subid.spec
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Suggests: %{name}-systemd
Requires: shadow-utils
Summary: Assign deterministic subordinate UID/GID ranges
%description
static-subuid is a small utility to generate predictable subordinate UID and GID ranges for Linux users, avoiding the default dynamic allocation behavior used by many systems.
static-subid is a small utility to generate predictable subordinate UID and GID ranges for Linux users, avoiding the default dynamic allocation behavior used by many systems.

This can be useful when you need consistent UID/GID mappings across multiple systems (for example in identity-mapped rootless containers or reproducible user namespace setups).

Expand Down
Loading