forked from pool/pam_kwallet6
Accepting request 1158166 from KDE:Frameworks
OBS-URL: https://build.opensuse.org/request/show/1158166 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/pam_kwallet6?expand=0&rev=3
This commit is contained in:
commit
1bb11bdbf5
32
0001-Allow-specifing-KWALLETD_BIN_PATH-manually.patch
Normal file
32
0001-Allow-specifing-KWALLETD_BIN_PATH-manually.patch
Normal file
@ -0,0 +1,32 @@
|
||||
From 9be236e39ef3ac75772066ecc60cab2ca6f54e5c Mon Sep 17 00:00:00 2001
|
||||
From: Fabian Vogt <fabian@ritter-vogt.de>
|
||||
Date: Thu, 14 Mar 2024 19:29:48 +0100
|
||||
Subject: [PATCH 1/2] Allow specifing KWALLETD_BIN_PATH manually
|
||||
|
||||
That way the dependency on KF6::Wallet can be avoided.
|
||||
---
|
||||
CMakeLists.txt | 7 +++++--
|
||||
1 file changed, 5 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 4f10b4f..643270e 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -43,9 +43,12 @@ set(pam_kwallet_SRCS
|
||||
pam_kwallet.c
|
||||
)
|
||||
|
||||
-find_package(KF6 ${KF6_MIN_VERSION} REQUIRED COMPONENTS
|
||||
+if (NOT KWALLETD_BIN_PATH)
|
||||
+ message (STATUS "KWALLETD_BIN_PATH not set, trying KF6::Wallet")
|
||||
+ find_package(KF6 ${KF6_MIN_VERSION} REQUIRED COMPONENTS
|
||||
Wallet
|
||||
-)
|
||||
+ )
|
||||
+endif ()
|
||||
|
||||
add_definitions(-DKWALLETD_BIN_PATH="${KWALLETD_BIN_PATH}")
|
||||
|
||||
--
|
||||
2.43.0
|
||||
|
44
0002-Use-GNUInstallDirs-instead-of-KDEInstallDirs.patch
Normal file
44
0002-Use-GNUInstallDirs-instead-of-KDEInstallDirs.patch
Normal file
@ -0,0 +1,44 @@
|
||||
From ca7f4d4ee95f37d9de9d80b5bba7407e0d11c59a Mon Sep 17 00:00:00 2001
|
||||
From: Fabian Vogt <fabian@ritter-vogt.de>
|
||||
Date: Thu, 14 Mar 2024 19:37:30 +0100
|
||||
Subject: [PATCH 2/2] Use GNUInstallDirs instead of KDEInstallDirs
|
||||
|
||||
This installs rather generic files so it's not necessary to query Qt here.
|
||||
---
|
||||
CMakeLists.txt | 12 +++++-------
|
||||
1 file changed, 5 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 643270e..e94130b 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -12,7 +12,7 @@ find_package (ECM ${KF6_MIN_VERSION} REQUIRED NO_MODULE)
|
||||
set (CMAKE_MODULE_PATH ${ECM_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules" )
|
||||
|
||||
include(CheckFunctionExists)
|
||||
-include(KDEInstallDirs)
|
||||
+include(GNUInstallDirs)
|
||||
include(KDEClangFormat)
|
||||
include(ECMConfiguredInstall)
|
||||
|
||||
@@ -90,13 +90,11 @@ target_link_libraries (${library_name}
|
||||
file(GLOB_RECURSE ALL_CLANG_FORMAT_SOURCE_FILES *.cpp *.h)
|
||||
kde_clang_format(${ALL_CLANG_FORMAT_SOURCE_FILES})
|
||||
|
||||
-install(TARGETS ${library_name} DESTINATION ${KDE_INSTALL_LIBDIR}/security)
|
||||
+install(TARGETS ${library_name} DESTINATION ${CMAKE_INSTALL_LIBDIR}/security)
|
||||
|
||||
configure_file(pam_kwallet_init.desktop.cmake ${CMAKE_BINARY_DIR}/pam_kwallet_init.desktop)
|
||||
-
|
||||
-install(PROGRAMS pam_kwallet_init DESTINATION ${KDE_INSTALL_LIBEXECDIR})
|
||||
-
|
||||
-install(FILES ${CMAKE_BINARY_DIR}/pam_kwallet_init.desktop DESTINATION ${KDE_INSTALL_AUTOSTARTDIR})
|
||||
+install(PROGRAMS pam_kwallet_init DESTINATION ${CMAKE_INSTALL_LIBEXECDIR})
|
||||
+install(FILES ${CMAKE_BINARY_DIR}/pam_kwallet_init.desktop DESTINATION /etc/xdg/autostart/)
|
||||
|
||||
ecm_install_configured_files(INPUT plasma-kwallet-pam.service.in @ONLY DESTINATION
|
||||
- ${KDE_INSTALL_SYSTEMDUSERUNITDIR})
|
||||
+ ${CMAKE_INSTALL_PREFIX}/lib/systemd/user/)
|
||||
--
|
||||
2.43.0
|
||||
|
@ -1,3 +1,15 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Mar 14 22:28:42 UTC 2024 - Fabian Vogt <fabian@ritter-vogt.de>
|
||||
|
||||
- Also attempt pam-config enablement in %posttrans (boo#1221371)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Mar 14 18:59:17 UTC 2024 - Fabian Vogt <fabian@ritter-vogt.de>
|
||||
|
||||
- Add patches to avoid depending on Qt:
|
||||
* 0001-Allow-specifing-KWALLETD_BIN_PATH-manually.patch
|
||||
* 0002-Use-GNUInstallDirs-instead-of-KDEInstallDirs.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Mar 13 09:10:02 UTC 2024 - Fabian Vogt <fabian@ritter-vogt.de>
|
||||
|
||||
|
@ -34,11 +34,13 @@ Source1: https://download.kde.org/stable/plasma/%{version}/%{rname}-%{ver
|
||||
Source2: plasma.keyring
|
||||
%endif
|
||||
Source3: baselibs.conf
|
||||
# PATCH-FEATURE-OPENSUSE
|
||||
Patch1: 0001-Allow-specifing-KWALLETD_BIN_PATH-manually.patch
|
||||
Patch2: 0002-Use-GNUInstallDirs-instead-of-KDEInstallDirs.patch
|
||||
BuildRequires: kf6-extra-cmake-modules >= %{kf6_version}
|
||||
BuildRequires: pam-devel
|
||||
BuildRequires: pkgconfig
|
||||
BuildRequires: socat
|
||||
BuildRequires: cmake(KF6Wallet) >= %{kf6_version}
|
||||
BuildRequires: pkgconfig(libgcrypt) >= 1.5.0
|
||||
# PAM modules need to be available for all archs of PAM on the system, otherwise pam-config
|
||||
# will not enable it.
|
||||
@ -49,9 +51,9 @@ Requires: pam_kwallet6-common = %{version}
|
||||
Requires(post): coreutils
|
||||
Requires(post): pam
|
||||
Requires(post): pam-config
|
||||
Requires(postun):coreutils
|
||||
Requires(postun):pam
|
||||
Requires(postun):pam-config
|
||||
Requires(postun): coreutils
|
||||
Requires(postun): pam
|
||||
Requires(postun): pam-config
|
||||
Provides: pam_kwallet = %{version}
|
||||
Obsoletes: pam_kwallet < %{version}
|
||||
|
||||
@ -76,9 +78,10 @@ module.
|
||||
|
||||
%build
|
||||
# Before usrmerge, the PAM module goes into /lib*/security/
|
||||
%cmake_kf6 \
|
||||
%cmake_kf6 -DKWALLETD_BIN_PATH=%{_kf6_bindir}/kwalletd6 \
|
||||
-DCMAKE_INSTALL_LIBEXECDIR=%{_libexecdir} \
|
||||
%if 0%{?suse_version} < 1550
|
||||
-DKDE_INSTALL_LIBDIR=/%{_lib}
|
||||
-DCMAKE_INSTALL_LIBDIR=/%{_lib}
|
||||
%endif
|
||||
|
||||
%kf6_build
|
||||
@ -86,8 +89,9 @@ module.
|
||||
%install
|
||||
%kf6_install
|
||||
|
||||
# Due to boo#728586 it is necessary to duplicate this in the 32bit variant.
|
||||
# So you need to edit baselibs.conf if you change this.
|
||||
# Try to enable it in %post already, but it might not work at this time.
|
||||
# Due to boo#728586 it is necessary to duplicate this in the 32bit variant,
|
||||
# so you need to edit baselibs.conf if you change this.
|
||||
%post
|
||||
%{_sbindir}/pam-config -a --kwallet5 || :
|
||||
|
||||
@ -96,6 +100,11 @@ if [ "$1" = "0" ]; then
|
||||
%{_sbindir}/pam-config -d --kwallet5 || :
|
||||
fi
|
||||
|
||||
# Enable this in posttrans to win over the old package's %postun
|
||||
# and to run once the modules are installed for all archs (boo#728586).
|
||||
%posttrans
|
||||
%{_sbindir}/pam-config -a --kwallet5 || :
|
||||
|
||||
%post common
|
||||
%{systemd_user_post plasma-kwallet-pam.service}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user