Skip to content

Commit b486cda

Browse files
committed
Bug#37737658 Adapt Fedora RPMS to merge of bin and sbin
In Fedora 42+ /usr/sbin is merely a symlink to /usr/bin, try to detect this and change paths as needed. Change-Id: Ideba537092e21a6c809967302abc56d30ee25c87
1 parent 05d2563 commit b486cda

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

cmake/install_layout.cmake

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,11 @@ SET(INSTALL_SECURE_FILE_PRIVDIR_TARGZ ${secure_file_priv_path})
197197
# RPM layout
198198
#
199199
SET(INSTALL_BINDIR_RPM "bin")
200-
SET(INSTALL_SBINDIR_RPM "sbin")
200+
IF(LINUX_FEDORA_SBIN_MERGE)
201+
SET(INSTALL_SBINDIR_RPM "bin")
202+
ELSE()
203+
SET(INSTALL_SBINDIR_RPM "sbin")
204+
ENDIF()
201205
#
202206
IF(CMAKE_SYSTEM_PROCESSOR IN_LIST KNOWN_64BIT_ARCHITECTURES)
203207
SET(INSTALL_LIBDIR_RPM "lib64/mysql")

cmake/os/Linux.cmake

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,12 @@ IF(EXISTS "/etc/fedora-release")
5151
FEDORA_RELEASE MATCHES "34")
5252
SET(LINUX_FEDORA_34 1)
5353
ENDIF()
54+
IF(IS_SYMLINK "/usr/sbin")
55+
FILE(READ_SYMLINK "/usr/sbin" USR_SBIN)
56+
IF(USR_SBIN STREQUAL "bin")
57+
SET(LINUX_FEDORA_SBIN_MERGE 1)
58+
ENDIF()
59+
ENDIF()
5460
ENDIF()
5561

5662
# Use dpkg-buildflags --get CPPFLAGS | CFLAGS | CXXFLAGS | LDFLAGS

0 commit comments

Comments
 (0)