Files
fedora-tools/plasma-always-show-unlock/plasma-always-show-unlock.spec
T
ajp_anton d2a6aafc71 Support Plasma 6.8 unlock prompts across screen blanking
Keep prompt visibility separate from native authentication, reapply the patch after lock-screen file updates, and retain Plasma 6.7 compatibility. Add modern patch and visibility regression tests and document Fedora 45 package support.
2026-11-14 02:09:04 +00:00

117 lines
4.5 KiB
RPMSpec

Name: plasma-always-show-unlock
Version: 0.1.0
Release: 13%{?dist}
Summary: Immediately show the Plasma unlock prompt without requiring input
License: MIT AND GPL-2.0-or-later
URL: https://git.ajpanton.se/ajp_anton/fedora-tools
Source0: plasma-always-show-unlock
Source1: LockScreenUi.patch
Source2: test-plasma-always-show-unlock
Source3: LockScreenUi.qml
Source4: LICENSE
Source5: README.md
Source6: FedoraToolsFingerprintRetry.qml
Source7: tst_fingerprintretry.qml
Source8: FedoraToolsUnlockPrompt.qml
Source9: LockScreenUi-visibility.patch
Source10: LockScreenUi-6.8.qml
Source11: tst_unlockprompt.qml
Source12: test-plasma-always-show-unlock-modern
BuildArch: noarch
BuildRequires: bash
BuildRequires: patch
BuildRequires: qt6-qtdeclarative-devel
Requires: bash
Requires: patch
Requires: plasma-desktop >= 6.7.4
Provides: fedora-tools-tool
%description
Keeps KDE Plasma's unlock prompt visible when the screen is locked, after the
display is turned off, and after suspend. The package reapplies its narrow QML
patch after lock-screen updates. On Plasma 6.8 and newer, authentication stays
under Plasma's control. Unsupported lock-screen interfaces are left unchanged.
%prep
%build
%check
bash %{SOURCE2} %{SOURCE0} %{SOURCE1} %{SOURCE3}
bash %{SOURCE12} %{SOURCE0} %{SOURCE1} %{SOURCE9} %{SOURCE10}
mkdir -p qml-tests/tests
cp %{SOURCE6} %{SOURCE8} qml-tests/
cp %{SOURCE7} %{SOURCE11} qml-tests/tests/
QT_QPA_PLATFORM=offscreen QT_QUICK_BACKEND=software \
qmltestrunner-qt6 -input qml-tests/tests
%install
install -Dpm 0755 %{SOURCE0} \
%{buildroot}%{_libexecdir}/plasma-always-show-unlock
install -Dpm 0644 %{SOURCE1} \
%{buildroot}%{_datadir}/plasma-always-show-unlock/LockScreenUi.patch
install -Dpm 0644 %{SOURCE4} \
%{buildroot}%{_licensedir}/%{name}/LICENSE
install -Dpm 0644 %{SOURCE5} \
%{buildroot}%{_docdir}/%{name}/README.md
install -Dpm 0644 %{SOURCE6} \
%{buildroot}%{_datadir}/plasma/shells/org.kde.plasma.desktop/contents/lockscreen/FedoraToolsFingerprintRetry.qml
install -Dpm 0644 %{SOURCE8} \
%{buildroot}%{_datadir}/plasma/shells/org.kde.plasma.desktop/contents/lockscreen/FedoraToolsUnlockPrompt.qml
install -Dpm 0644 %{SOURCE9} \
%{buildroot}%{_datadir}/plasma-always-show-unlock/LockScreenUi-visibility.patch
%pre
# Revert using the installed helper and patch, before RPM replaces either.
# The new patch must be applied to the original QML, not an older patched copy.
if [ -x %{_libexecdir}/plasma-always-show-unlock ] && \
%{_libexecdir}/plasma-always-show-unlock status >/dev/null 2>&1; then
%{_libexecdir}/plasma-always-show-unlock revert || exit 1
fi
%preun
if [ "$1" -eq 0 ]; then
%{_libexecdir}/plasma-always-show-unlock revert || :
fi
%transfiletriggerin -- %{_datadir}/plasma/shells/org.kde.plasma.desktop/contents/lockscreen/
%{_libexecdir}/plasma-always-show-unlock apply || :
%files
%license %{_licensedir}/%{name}/LICENSE
%doc %{_docdir}/%{name}/README.md
%{_libexecdir}/plasma-always-show-unlock
%{_datadir}/plasma-always-show-unlock/LockScreenUi.patch
%{_datadir}/plasma-always-show-unlock/LockScreenUi-visibility.patch
%{_datadir}/plasma/shells/org.kde.plasma.desktop/contents/lockscreen/FedoraToolsFingerprintRetry.qml
%{_datadir}/plasma/shells/org.kde.plasma.desktop/contents/lockscreen/FedoraToolsUnlockPrompt.qml
%changelog
* Sat Nov 14 2026 fedora-tools contributors - 0.1.0-13
- Follow the active greeter window and keep the prompt ready after Escape
* Fri Nov 13 2026 fedora-tools contributors - 0.1.0-12
- Support Plasma 6.8 with a small visibility policy and native authentication
- Reapply after lock-screen file updates and tolerate unrelated layout changes
- Allow upgrades after Plasma has already replaced an older patched file
* Mon Sep 14 2026 fedora-tools contributors - 0.1.0-11
- Retry idle fingerprint conversations without polling or restarting fprintd
- Preserve failed-scan handling and test timeout recovery in QML
- Revert the installed patch before upgrading to a new revision
* Sat Sep 05 2026 fedora-tools contributors - 0.1.0-10
- Clarify the package summary
* Sat Sep 05 2026 fedora-tools contributors - 0.1.0-9
- Advertise the tool to Fedora Tools settings
* Thu Sep 03 2026 fedora-tools contributors - 0.1.0-8
- Keep the prompt visible without continuously restarting authentication
- Retry authentication after resume and the automatic-lock grace period
* Wed Sep 02 2026 fedora-tools contributors - 0.1.0-1
- Initial package