Skip to content

Commit

Permalink
fix: Too large deb package for dist
Browse files Browse the repository at this point in the history
  • Loading branch information
Nativu5 committed Dec 25, 2024
1 parent 5e18f0f commit 3fb8ae3
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,14 @@ install(TARGETS craned
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_WRITE GROUP_EXECUTE WORLD_READ WORLD_WRITE WORLD_EXECUTE
)

if(ENABLE_BPF)
install(FILES
${CMAKE_BINARY_DIR}/src/Misc/BPF/cgroup_dev_bpf.o
DESTINATION /usr/local/lib64/bpf/
COMPONENT cranedc
PERMISSIONS OWNER_READ GROUP_READ WORLD_READ)
endif()

# Install unit files
install(FILES
${CMAKE_BINARY_DIR}/etc/cranectld.service
Expand All @@ -409,14 +417,6 @@ install(FILES
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ)

# Install configuration files
if(ENABLE_BPF)
install(FILES
${CMAKE_BINARY_DIR}/src/Misc/BPF/cgroup_dev_bpf.o
DESTINATION /usr/local/lib64/bpf/
COMPONENT cranedc
PERMISSIONS OWNER_READ GROUP_READ WORLD_READ)
endif()

install(FILES ${CMAKE_SOURCE_DIR}/etc/config.yaml
DESTINATION /etc/crane/
COMPONENT cranectldc
Expand Down Expand Up @@ -448,16 +448,19 @@ set(CPACK_PACKAGE_DESCRIPTION "An HPC and Cloud Computing Fused Job Scheduling S
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE")
set(CPACK_RESOURCE_FILE_README "${CMAKE_SOURCE_DIR}/README.md")
set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CMAKE_PROJECT_VERSION}-${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}")

# Do not allow the package to be relocated
set(CPACK_PACKAGE_RELOCATABLE OFF)

# RPM
set(CPACK_RPM_PACKAGE_GROUP "System Environment/Base")
set(CPACK_RPM_PACKAGE_LICENSE "AGPL v3")
set(CPACK_RPM_COMPRESSION_TYPE "xz")
#TODO CPACK_PACKAGE_DESCRIPTION

# DEB
set(CPACK_DEB_COMPONENT_INSTALL ON)
set(CPACK_DEBIAN_COMPRESSION_TYPE "xz")
# Seperate the debuginfo to avoid large DEB package
set(CPACK_DEBIAN_DEBUGINFO_PACKAGE ON)

include(CPack)

0 comments on commit 3fb8ae3

Please sign in to comment.