diff options
author | Alexander Golubev <fatzer2@gmail.com> | 2025-08-22 21:37:54 +0300 |
---|---|---|
committer | Alexander Golubev <fatzer2@gmail.com> | 2025-08-23 15:33:42 +0300 |
commit | 31bdb77a270848e2a3cfb2f71e41a0c5d8d44a37 (patch) | |
tree | 1ea4b972b29f9c17d8dfade85f563b523d8534f5 | |
parent | 20a17f52d2cd9810ae6cc82337d0ecd05fc36d3b (diff) | |
download | tdebase-feat/separate-tsak.tar.gz tdebase-feat/separate-tsak.zip |
Separate WITH_TSAK and BUILD_TSAK flagsfeat/separate-tsak
As for now BUILD_TSAK was used as both: a flag for building the `tsak`
binary and to enable/disable tsak support in tdm/kdesktop. The problem
is it creates problem with split build (when each sub-package is built
independently): if `tsak` is built as a separate package there is no way
to enable/disable support for it when building `kdesktop`/`tdm` without
also triggerin the build of `tsak` itself.
Besides this issue it just violates convention that BUILD_* flags do not
conditionally enable functionality in other packages.
This commit separates this logic into two different flags: BUILD_TSAK
for building the tsak binary and WITH_TSAK for adding support for it to
kdesktop and/or tdm.
Signed-off-by: Alexander Golubev <fatzer2@gmail.com>
-rw-r--r-- | CMakeLists.txt | 2 | ||||
-rw-r--r-- | config.h.cmake | 4 | ||||
-rw-r--r-- | kdesktop/lock/main.cpp | 2 | ||||
-rw-r--r-- | kdesktop/lockeng.cpp | 2 | ||||
-rw-r--r-- | tdm/backend/session.c | 2 | ||||
-rw-r--r-- | tdm/kfrontend/kgapp.cpp | 2 | ||||
-rw-r--r-- | tdmlib/CMakeLists.txt | 4 |
7 files changed, 10 insertions, 8 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index fd4f5102b..b6d199756 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -119,6 +119,7 @@ option( WITH_SENSORS "Enable lm_sensors support (ksysguard)" ${WITH_ALL_OPTIONS} option( WITH_TDEHWLIB "Enable TDE hardware library support" ${WITH_ALL_OPTIONS} ) option( WITH_UPOWER "Enable UPOWER support" ${WITH_ALL_OPTIONS} ) option( WITH_ELFICON "Enable ELF embedded metadata support" ${WITH_ALL_OPTIONS} ) +option( WITH_TSAK "Enable Secure Attention Key support via tsak" ${WITH_ALL_OPTIONS} ) option( WITH_GCC_VISIBILITY "Enable fvisibility and fvisibility-inlines-hidden" ${WITH_ALL_OPTIONS} ) option( WITH_XKB_TRANSLATIONS "Use translations for xkb messages provided by xkeyboard-config" ON ) @@ -157,6 +158,7 @@ option( WITH_XKB_TRANSLATIONS "Use translations for xkb messages provided by xke # WITH_PCRE2 affects twin/compton-tde # WITH_SUDO_TDESU_BACKEND affects tdesu # WITH_SUDO_KONSOLE_SUPER_USER_COMMAND affects launching Konsole super user sessions +# WITH_TSAK affects kdesktop tdm # WITH_XKB_TRANSLATIONS affects kxkb # NOTE: WITH_SHADOW and WITH_PAM shouldn't be set concurrently diff --git a/config.h.cmake b/config.h.cmake index 1f5aaac61..d940692f4 100644 --- a/config.h.cmake +++ b/config.h.cmake @@ -251,8 +251,8 @@ unsigned long strlcpy(char*, const char*, unsigned long); // tdm, kcontrol #cmakedefine WITH_XRANDR "@WITH_XRANDR@" -// tsak -#cmakedefine BUILD_TSAK "@BUILD_TSAK@" +// kdesktop, tdm +#cmakedefine WITH_TSAK 1 // Defined when wanting ksmserver shutdown debugging timing markers in .xsession-errors #cmakedefine BUILD_PROFILE_SHUTDOWN 1 diff --git a/kdesktop/lock/main.cpp b/kdesktop/lock/main.cpp index 41b918664..a937bfe03 100644 --- a/kdesktop/lock/main.cpp +++ b/kdesktop/lock/main.cpp @@ -479,7 +479,7 @@ int main( int argc, char **argv ) trinity_desktop_lock_use_system_modal_dialogs = !KDesktopSettings::useUnmanagedLockWindows(); trinity_desktop_lock_delay_screensaver_start = KDesktopSettings::delaySaverStart(); if (trinity_desktop_lock_use_system_modal_dialogs) { -#ifdef BUILD_TSAK +#ifdef WITH_TSAK trinity_desktop_lock_use_sak = tdmconfig->readBoolEntry("UseSAK", false) && KDesktopSettings::useTDESAK(); #else trinity_desktop_lock_use_sak = false; diff --git a/kdesktop/lockeng.cpp b/kdesktop/lockeng.cpp index 3de190484..5f35ba43d 100644 --- a/kdesktop/lockeng.cpp +++ b/kdesktop/lockeng.cpp @@ -880,7 +880,7 @@ bool SaverEngineEventHandler::restartLockProcess() } config->setGroup("X-:*-Greeter"); bool useSAKProcess = false; -#ifdef BUILD_TSAK +#ifdef WITH_TSAK useSAKProcess = config->readBoolEntry("UseSAK", false) && KDesktopSettings::useTDESAK(); #endif if (useSAKProcess) diff --git a/tdm/backend/session.c b/tdm/backend/session.c index 0bcd92d5f..4fc974f96 100644 --- a/tdm/backend/session.c +++ b/tdm/backend/session.c @@ -581,7 +581,7 @@ ManageSession( struct display *d ) } int start_tsak = 0; -#ifdef BUILD_TSAK +#ifdef WITH_TSAK start_tsak = d->useSAK; #endif if (start_tsak) { diff --git a/tdm/kfrontend/kgapp.cpp b/tdm/kfrontend/kgapp.cpp index 731cb33b5..8b4e1a386 100644 --- a/tdm/kfrontend/kgapp.cpp +++ b/tdm/kfrontend/kgapp.cpp @@ -220,7 +220,7 @@ kg_main( const char *argv0 ) TDEProcess *dcop = 0; TDEProcess *twin = 0; -#ifdef BUILD_TSAK +#ifdef WITH_TSAK trinity_desktop_lock_use_sak = _useSAK; #else trinity_desktop_lock_use_sak = false; diff --git a/tdmlib/CMakeLists.txt b/tdmlib/CMakeLists.txt index 7f6fbbbcc..0aa11e10d 100644 --- a/tdmlib/CMakeLists.txt +++ b/tdmlib/CMakeLists.txt @@ -56,14 +56,13 @@ tde_add_kpart( kgreet_winbind AUTOMOC ) - endif( BUILD_TDM ) ##### dmctl (static) ############################ if( BUILD_KICKER OR BUILD_KDESKTOP OR BUILD_TDM OR - BUILD_KSMSERVER OR BUILD_TDEIOSLAVES ) + BUILD_KSMSERVER OR BUILD_TDEIOSLAVES OR BUILD_TSAK ) tde_add_library( dmctl STATIC_PIC SOURCES dmctl.cpp @@ -72,6 +71,7 @@ if( BUILD_KICKER OR BUILD_KDESKTOP OR BUILD_TDM OR endif( ) + ##### tdmtsak (executable) ####################### if( BUILD_TSAK ) |