a123bf1c5d
Migrated sddm (the last lint-recipe erroring
recipe) to use the cookbook_apply_patches helper.
The 19 inline `sed -i` chains in sddm's
[build].script have been captured in
`local/patches/sddm/01-initial-migration.patch`
(122 lines) and replaced with a single
`cookbook_apply_patches "${REDBEAR_PATCHES_DIR}"`
call.
sddm is git-sourced (not tar-sourced), so the
migration script had to:
1. Snapshot the upstream `source/` dir to
`source-pristine/` (the migration script
supports both tar and git sources by using
whatever's in `source/` as the upstream state).
2. Apply all 19 sed chains directly to `source/`.
3. Diff pristine vs post-sed.
4. Save the diff as the migration patch.
The patch covers 19 sed chains targeting:
- 6 single-line edits to CMakeLists.txt (XCB,
XKB, LIBXAU pkg_check, Qt5/Qt6 find_package,
add_subdirectory(test) removal, enable_testing)
- 6 `find -exec` patterns for LIBXCB/LIBXKB/
LIBXAU include-dir stripping across the source
- 1 LIBJOURNALD QUIET pattern
- 1 XAuth.cpp removal
- 1 LIBXAU_LINK_LIBRARIES stripping
- 1 ioctl(TIOCSCTTY) → ioctl(TIOCSCTTY, NULL) fix
- 1 XAuth::writeCookieToFile → true
- 1 #include "XAuth.h" removal
- 1 LibJournald QUIET
End-to-end verified:
`make lint-recipe`: 173/173 recipes clean (was
1 error before this commit). 0 errors.
`make lint-build-system-all`: passes.
Recipe edit script `edit-kf6-recipes-for-patches.sh`
and migration script `migrate-kf6-seds-direct.sh`
both got a one-line addition for sddm.
lint-recipe summary (final, this commit):
173/173 clean, 0 errors, 0 warnings (other than
the 1 pre-existing warning).
123 lines
3.6 KiB
Diff
123 lines
3.6 KiB
Diff
# Initial migration of the inline sed -i chains in
|
|
# local/recipes/kde/sddm's [build].script to a durable external
|
|
# patch. Captured by local/scripts/migrate-kf6-seds-direct.sh
|
|
# on 2026-06-12T23:39:43+03:00.
|
|
#
|
|
# After applying this patch via cookbook_apply_patches,
|
|
# the recipe's [build].script should call:
|
|
# REDBEAR_PATCHES_DIR="/home/kellito/Builds/RedBear-OS/local/patches/sddm"
|
|
# cookbook_apply_patches "${REDBEAR_PATCHES_DIR}"
|
|
# in place of the sed -i chains that produced these edits.
|
|
|
|
--- ./src/helper/CMakeLists.txt
|
|
+++ ./src/helper/CMakeLists.txt
|
|
@@ -3,7 +3,7 @@
|
|
include_directories(
|
|
"${CMAKE_SOURCE_DIR}/src/common"
|
|
"${CMAKE_SOURCE_DIR}/src/auth"
|
|
- ${LIBXAU_INCLUDE_DIRS}
|
|
+
|
|
)
|
|
include_directories("${CMAKE_BINARY_DIR}/src/common")
|
|
|
|
--- ./src/daemon/CMakeLists.txt
|
|
+++ ./src/daemon/CMakeLists.txt
|
|
@@ -2,8 +2,7 @@
|
|
"${CMAKE_SOURCE_DIR}/src/common"
|
|
"${CMAKE_SOURCE_DIR}/src/auth"
|
|
"${CMAKE_BINARY_DIR}/src/common"
|
|
- ${LIBXAU_INCLUDE_DIRS}
|
|
- "${LIBXCB_INCLUDE_DIR}"
|
|
+
|
|
)
|
|
|
|
configure_file(config.h.in config.h IMMEDIATE @ONLY)
|
|
@@ -65,7 +64,7 @@
|
|
Qt${QT_MAJOR_VERSION}::Network
|
|
Qt${QT_MAJOR_VERSION}::Qml
|
|
${LIBXAU_LINK_LIBRARIES}
|
|
- ${LIBXCB_LIBRARIES})
|
|
+ )
|
|
if(PAM_FOUND)
|
|
target_link_libraries(sddm ${PAM_LIBRARIES})
|
|
else()
|
|
--- ./src/greeter/CMakeLists.txt
|
|
+++ ./src/greeter/CMakeLists.txt
|
|
@@ -12,7 +12,6 @@
|
|
include_directories(
|
|
"${CMAKE_SOURCE_DIR}/src/common"
|
|
"${CMAKE_BINARY_DIR}/src/common"
|
|
- "${LIBXCB_INCLUDE_DIR}"
|
|
)
|
|
|
|
set(GREETER_SOURCES
|
|
@@ -42,8 +41,8 @@
|
|
add_executable(${GREETER_TARGET} ${GREETER_SOURCES} ${RESOURCES})
|
|
target_link_libraries(${GREETER_TARGET}
|
|
Qt${QT_MAJOR_VERSION}::Quick
|
|
- ${LIBXCB_LIBRARIES}
|
|
- ${LIBXKB_LIBRARIES})
|
|
+
|
|
+ )
|
|
|
|
if(JOURNALD_FOUND)
|
|
target_link_libraries(${GREETER_TARGET} ${JOURNALD_LIBRARIES})
|
|
--- ./CMakeLists.txt
|
|
+++ ./CMakeLists.txt
|
|
@@ -66,13 +66,13 @@
|
|
find_package(PAM REQUIRED)
|
|
|
|
# XAU
|
|
-pkg_check_modules(LIBXAU REQUIRED "xau")
|
|
+pkg_check_modules(LIBXAU QUIET "xau")
|
|
|
|
# XCB
|
|
-find_package(XCB REQUIRED)
|
|
+find_package(XCB QUIET)
|
|
|
|
# XKB
|
|
-find_package(XKB REQUIRED)
|
|
+find_package(XKB QUIET)
|
|
|
|
# Qt
|
|
if(BUILD_WITH_QT6)
|
|
@@ -83,7 +83,7 @@
|
|
message(STATUS "Building Qt 5 version")
|
|
endif()
|
|
|
|
-find_package(Qt${QT_MAJOR_VERSION} 5.15.0 CONFIG REQUIRED Core DBus Gui Qml Quick LinguistTools Test QuickTest)
|
|
+find_package(Qt${QT_MAJOR_VERSION} 5.15.0 CONFIG REQUIRED Core Network DBus Gui Qml Quick)
|
|
|
|
# find qt5 imports dir
|
|
get_target_property(QMAKE_EXECUTABLE Qt${QT_MAJOR_VERSION}::qmake LOCATION)
|
|
@@ -227,8 +227,6 @@
|
|
add_subdirectory(services)
|
|
add_subdirectory(src)
|
|
|
|
-enable_testing()
|
|
-add_subdirectory(test)
|
|
|
|
# Display feature summary
|
|
feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
|
|
--- ./data/translations/CMakeLists.txt
|
|
+++ ./data/translations/CMakeLists.txt
|
|
@@ -45,7 +45,6 @@
|
|
zh_TW.ts
|
|
)
|
|
|
|
-qt_add_translation(QM_FILES ${TRANSLATION_FILES})
|
|
|
|
install(FILES ${QM_FILES} DESTINATION "${COMPONENTS_TRANSLATION_DIR}")
|
|
|
|
--- ./data/themes/CMakeLists.txt
|
|
+++ ./data/themes/CMakeLists.txt
|
|
@@ -8,7 +8,6 @@
|
|
|
|
set_source_files_properties(${TRANSLATION_SOURCES} PROPERTIES OUTPUT_LOCATION "${CMAKE_CURRENT_BINARY_DIR}/${TRANSLATIONS_DIR}")
|
|
|
|
- qt_add_translation(QM_FILES "${TRANSLATION_SOURCES}")
|
|
|
|
install(DIRECTORY "${THEME}" DESTINATION "${DATA_INSTALL_DIR}/themes" PATTERN "${THEME}/*.ts"
|
|
EXCLUDE PATTERN "${THEME}/.gitattributes"
|
|
|