Accepting request 1078245 from home:seife:branches:Base:System

do not ship thinkpad_handler script or config, it's broken since libexecdir changed and nobody noticed, most likely it's not doing anything on recent thinkpads, put it into the examples instead

OBS-URL: https://build.opensuse.org/request/show/1078245
OBS-URL: https://build.opensuse.org/package/show/Base:System/acpid?expand=0&rev=106
This commit is contained in:
Thomas Renninger 2023-04-13 14:07:10 +00:00 committed by Git OBS Bridge
parent 641ff0cda6
commit 16d3cda5fe
2 changed files with 22 additions and 7 deletions

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Sun Apr 9 10:14:44 UTC 2023 - Stefan Seyfried <seife+obs@b1-systems.com>
- do not ship thinkpad_handler script or config, it's broken since
libexecdir changed and nobody noticed, most likely it's not doing
anything on recent thinkpads, put it into the examples instead
- fix file timestamps to not change with every rebuild
------------------------------------------------------------------- -------------------------------------------------------------------
Tue Nov 15 14:01:40 UTC 2022 - Dominique Leuenberger <dimstar@opensuse.org> Tue Nov 15 14:01:40 UTC 2022 - Dominique Leuenberger <dimstar@opensuse.org>

View File

@ -1,7 +1,7 @@
# #
# spec file for package acpid # spec file for package acpid
# #
# Copyright (c) 2022 SUSE LLC # Copyright (c) 2023 SUSE LLC
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -47,7 +47,15 @@ needed modules.
%setup -q %setup -q
%patch1 %patch1
cp %{SOURCE3} %{SOURCE5} %{SOURCE6} %{SOURCE7} %{SOURCE9} %{SOURCE10} %{SOURCE11} . cp -p %{SOURCE3} %{SOURCE5} %{SOURCE6} %{SOURCE7} %{SOURCE9} %{SOURCE10} %{SOURCE11} .
# libexecdir is different in factory that in 15.x
for i in events.*; do
if ! grep -q 'action=%{_libexecdir}' $i; then
sed -i.orig -e 's@action=/usr/lib/@action=%{_libexecdir}/@' $i
touch -r $i.orig $i
rm $i.orig
fi
done
%build %build
export CFLAGS="%{optflags}" export CFLAGS="%{optflags}"
@ -57,14 +65,14 @@ export LDFLAGS="-Wl,-z,relro,-z,now"
%install %install
%make_install BINDIR=%{_sbindir} %make_install BINDIR=%{_sbindir}
install -Dm 744 thinkpad_handler %{buildroot}%{_libexecdir}/acpid/thinkpad_handler install -dm 755 %{buildroot}%{_libexecdir}/acpid/
install -Dm 644 events.thinkpad %{buildroot}%{_sysconfdir}/acpi/events/thinkpad install -dm 755 %{buildroot}%{_sysconfdir}/acpi/events
mkdir -p %{buildroot}/%{_unitdir} mkdir -p %{buildroot}/%{_unitdir}
install -m 644 %{SOURCE8} %{buildroot}/%{_unitdir} install -m 644 %{SOURCE8} %{buildroot}/%{_unitdir}
ln -sf %{_sbindir}/service %{buildroot}%{_sbindir}/rcacpid ln -sf %{_sbindir}/service %{buildroot}%{_sbindir}/rcacpid
# formerly installed, but no longer useful with systemd. Keep as documentation. # formerly installed, but no longer useful with systemd. Keep as documentation.
cp -p events.power_button events.sleep_button power_button sleep_button samples/ cp -p events.power_button events.sleep_button events.thinkpad power_button sleep_button thinkpad_handler samples/
# for the rpmlint fascists # for the rpmlint fascists
mv samples examples mv samples examples
# keep the logfile # keep the logfile
@ -86,8 +94,7 @@ touch %{buildroot}%{_localstatedir}/log/acpid
%files %files
%dir %{_sysconfdir}/acpi %dir %{_sysconfdir}/acpi
%dir %{_sysconfdir}/acpi/events %dir %{_sysconfdir}/acpi/events
%{_sysconfdir}/acpi/events/thinkpad %dir %{_libexecdir}/acpid
%{_libexecdir}/acpid
%{_unitdir}/%{name}.service %{_unitdir}/%{name}.service
%{_sbindir}/rcacpid %{_sbindir}/rcacpid
%{_sbindir}/acpid %{_sbindir}/acpid