From 92ac8cb52cd53da263447d2324331d4e690d5e3409494a7238cacb8157dac5b4 Mon Sep 17 00:00:00 2001 From: Anna Maresova Date: Thu, 3 Mar 2022 10:29:56 +0000 Subject: [PATCH 1/2] Accepting request 956359 from home:favogt:branches:Base:System - Fix build without %_distconfdir (see bsc#1195679) OBS-URL: https://build.opensuse.org/request/show/956359 OBS-URL: https://build.opensuse.org/package/show/Base:System/kbd?expand=0&rev=145 --- kbd.changes | 5 +++++ kbd.spec | 8 ++++++++ 2 files changed, 13 insertions(+) diff --git a/kbd.changes b/kbd.changes index d1be507..006a9f6 100644 --- a/kbd.changes +++ b/kbd.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Feb 21 10:31:41 UTC 2022 - Fabian Vogt + +- Fix build without %_distconfdir (see bsc#1195679) + ------------------------------------------------------------------- Tue Feb 1 07:39:15 UTC 2022 - Dirk Müller diff --git a/kbd.spec b/kbd.spec index ccf120b..b84ef70 100644 --- a/kbd.spec +++ b/kbd.spec @@ -278,9 +278,13 @@ install -m 755 fbtest %{buildroot}%{_sbindir} install -d %{buildroot}%{_libexecdir}/%{name} install -m 755 numlockbios %{buildroot}%{_libexecdir}/%{name} %endif +%if %{defined _distconfdir} rm -rf %{buildroot}%{_sysconfdir}/pam.d install -d %{buildroot}%{_distconfdir}/pam.d install -m 644 %{SOURCE4} %{buildroot}%{_distconfdir}/pam.d/vlock +%else +install -m 644 %{SOURCE4} %{buildroot}%{_sysconfdir}/pam.d/vlock +%endif install -m 644 %{SOURCE12} %{buildroot}%{_mandir}/man8/ %if !0%{?usrmerged} mkdir -p %{buildroot}/bin @@ -522,7 +526,11 @@ test -f /etc/pam.d/vlock.rpmsave && mv -v /etc/pam.d/vlock.rpmsave /etc/pam.d/vl %{_mandir}/man8/setvesablank.8%{ext_man} %{_mandir}/man8/setvtrgb.8%{ext_man} %{_mandir}/man8/vcstime.8%{ext_man} +%if %{defined _distconfdir} %{_distconfdir}/pam.d/vlock +%else +%config(noreplace) %{_sysconfdir}/pam.d/vlock +%endif %dir %{_datadir}/systemd %{_prefix}/lib/systemd/system/kbdsettings.service %{_datadir}/systemd/kbd-model-map.xkb-generated From b7f0f2b97ccf65d8c9ec051d3b9c514cb4409ce0025d5bea98e4b1d13eb410d1 Mon Sep 17 00:00:00 2001 From: Anna Maresova Date: Thu, 3 Mar 2022 12:46:22 +0000 Subject: [PATCH 2/2] Accepting request 958329 from home:wolfi323:branches:Base:System - [kbdsettings] try to run numlockbios from /usr/libexec/kbd/ first as Tumbleweed moved to this location a while ago (boo#1179295) OBS-URL: https://build.opensuse.org/request/show/958329 OBS-URL: https://build.opensuse.org/package/show/Base:System/kbd?expand=0&rev=146 --- kbd.changes | 6 ++++++ kbdsettings | 6 +++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/kbd.changes b/kbd.changes index 006a9f6..c36cc39 100644 --- a/kbd.changes +++ b/kbd.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Mar 1 18:29:13 UTC 2022 - Wolfgang Bauer + +- [kbdsettings] try to run numlockbios from /usr/libexec/kbd/ first + as Tumbleweed moved to this location a while ago (boo#1179295) + ------------------------------------------------------------------- Mon Feb 21 10:31:41 UTC 2022 - Fabian Vogt diff --git a/kbdsettings b/kbdsettings index 33736ac..bfc7e7d 100644 --- a/kbdsettings +++ b/kbdsettings @@ -26,7 +26,11 @@ for i in NUM SCR CAPS; do /usr/bin/setleds -D -$param < /dev/$tty ;; bios) - bios=$(/usr/lib/kbd/numlockbios 2>/dev/null) + if [ -x /usr/libexec/kbd/numlockbios ]; then + bios=$(/usr/libexec/kbd/numlockbios 2>/dev/null) + else + bios=$(/usr/lib/kbd/numlockbios 2>/dev/null) + fi if [ $param = "num" ]; then if [ "$bios" = "on" ]; then touch /run/numlock-on