Blame SPECS/acpid.spec

d4a401
# hardened build if not overridden
d4a401
%{!?_hardened_build:%global _hardened_build 1}
d4a401
d4a401
%if %{?_hardened_build}%{!?_hardened_build:0}
d4a401
%global harden -pie -Wl,-z,relro,-z,now
d4a401
%endif
d4a401
d4a401
Summary: ACPI Event Daemon
d4a401
Name: acpid
d4a401
Version: 2.0.19
d4a401
Release: 9%{?dist}
d4a401
License: GPLv2+
d4a401
Group: System Environment/Daemons
d4a401
Source: http://downloads.sourceforge.net/acpid2/%{name}-%{version}.tar.xz
d4a401
Source1: acpid.init
d4a401
Source2: acpid.video.conf
d4a401
Source3: acpid.power.conf
d4a401
Source4: acpid.power.sh
d4a401
Source5: acpid.service
d4a401
Source6: acpid.sysconfig
d4a401
# backported from upstream
d4a401
Patch0: acpid-2.0.19-dynamic-connections.patch
d4a401
# https://sourceforge.net/p/acpid2/tickets/14/
d4a401
Patch1: acpid-2.0.19-kacpimon-dynamic-connections.patch
d4a401
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
d4a401
ExclusiveArch: ia64 x86_64 %{ix86} aarch64
d4a401
URL: http://sourceforge.net/projects/acpid2/
d4a401
BuildRequires: systemd
d4a401
Requires(post): /sbin/chkconfig
d4a401
Requires(preun): /sbin/chkconfig
d4a401
Requires: systemd
d4a401
d4a401
d4a401
%description
d4a401
acpid is a daemon that dispatches ACPI events to user-space programs.
d4a401
d4a401
%package sysvinit
d4a401
Summary: ACPI Event Daemon
d4a401
Group: System Environment/Daemons
d4a401
Requires: %{name} = %{version}-%{release}
d4a401
Requires(preun): /sbin/service
d4a401
d4a401
%description sysvinit
d4a401
The acpid-sysvinit contains SysV initscript.
d4a401
d4a401
%prep
d4a401
%setup -q
d4a401
%patch0 -p1 -b .dynamic-connections
d4a401
%patch1 -p1 -b .kacpimon-dynamic-connections
d4a401
d4a401
%build
d4a401
%configure
d4a401
make %{?_smp_mflags} CFLAGS="%{optflags} %{?harden}"
d4a401
d4a401
d4a401
%install
d4a401
rm -rf %{buildroot}
d4a401
mkdir -p %{buildroot}
d4a401
make install DESTDIR=%{buildroot} docdir=%{_docdir}/%{name}-%{version}
d4a401
d4a401
mkdir -p %{buildroot}%{_sysconfdir}/acpi/events
d4a401
mkdir -p %{buildroot}%{_sysconfdir}/acpi/actions
d4a401
mkdir -p %{buildroot}%{_unitdir}
d4a401
mkdir -p %{buildroot}%{_sysconfdir}/sysconfig
d4a401
d4a401
chmod 755 %{buildroot}%{_sysconfdir}/acpi/events
d4a401
install -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/acpi/events/videoconf
d4a401
install -m 644 %{SOURCE3} %{buildroot}%{_sysconfdir}/acpi/events/powerconf
d4a401
install -m 755 %{SOURCE4} %{buildroot}%{_sysconfdir}/acpi/actions/power.sh
d4a401
install -m 644 %{SOURCE5} %{buildroot}%{_unitdir}
d4a401
install -m 644 %{SOURCE6} %{buildroot}%{_sysconfdir}/sysconfig/acpid
d4a401
d4a401
mkdir -p %{buildroot}%{_sysconfdir}/rc.d/init.d
d4a401
install -m 755 %{SOURCE1} %{buildroot}%{_sysconfdir}/rc.d/init.d/acpid
d4a401
d4a401
d4a401
%clean
d4a401
rm -rf %{buildroot}
d4a401
d4a401
d4a401
%files
d4a401
%defattr(-,root,root)
d4a401
%doc %{_docdir}/%{name}-%{version}
d4a401
%{_unitdir}/%{name}.service
d4a401
%dir %{_sysconfdir}/acpi
d4a401
%dir %{_sysconfdir}/acpi/events
d4a401
%dir %{_sysconfdir}/acpi/actions
d4a401
%config(noreplace) %attr(0644,root,root) %{_sysconfdir}/acpi/events/videoconf
d4a401
%config(noreplace) %attr(0644,root,root) %{_sysconfdir}/acpi/events/powerconf
d4a401
%config(noreplace) %attr(0755,root,root) %{_sysconfdir}/acpi/actions/power.sh
d4a401
%config(noreplace) %attr(0644,root,root) %{_sysconfdir}/sysconfig/acpid
d4a401
%{_bindir}/acpi_listen
d4a401
%{_sbindir}/acpid
d4a401
%{_sbindir}/kacpimon
d4a401
%{_mandir}/man8/acpid.8.gz
d4a401
%{_mandir}/man8/acpi_listen.8.gz
d4a401
%{_mandir}/man8/kacpimon.8.gz
d4a401
d4a401
%files sysvinit
d4a401
%attr(0755,root,root) %{_sysconfdir}/rc.d/init.d/acpid
d4a401
d4a401
%post
d4a401
%systemd_post %{name}.service
d4a401
d4a401
%preun
d4a401
%systemd_preun %{name}.service
d4a401
d4a401
%postun
d4a401
%systemd_postun_with_restart %{name}.service
d4a401
d4a401
%posttrans
d4a401
# automatic name conversion for older customized configs
d4a401
for f in %{_sysconfdir}/acpi/events/*.conf
d4a401
do
d4a401
  [ -f "$f" ] && mv "$f" "${f/%.conf/conf}" &>/dev/null || :
d4a401
done
d4a401
d4a401
%triggerun -- %{name} < 2.0.10-2
d4a401
/sbin/chkconfig --del acpid >/dev/null 2>&1 || :
d4a401
/bin/systemctl try-restart acpid.service >/dev/null 2>&1 || :
d4a401
d4a401
%triggerpostun -n %{name}-sysvinit -- %{name} < 2.0.10-2
d4a401
/sbin/chkconfig --add acpid >/dev/null 2>&1 || :
d4a401
d4a401
d4a401
%changelog
d4a401
* Thu Aug 31 2017 Jaroslav Škarvada <jskarvad@redhat.com> - 2.0.19-9
d4a401
- Switched kacpimon to dynamic connections (increased max connections
d4a401
  from 20 to 1024)
d4a401
  Resolves: rhbz#1450980
d4a401
d4a401
* Tue May  9 2017 Jaroslav Škarvada <jskarvad@redhat.com> - 2.0.19-8
d4a401
- Fixed conversion scriptlet
d4a401
  Resolves: rhbz#1436320
d4a401
d4a401
* Tue Mar 21 2017 Jaroslav Škarvada <jskarvad@redhat.com> - 2.0.19-7
d4a401
- Switched to dynamic connections (increased max connections from 20 to 1024)
d4a401
  Resolves: rhbz#1351999
d4a401
- Simplified conversion script and moved it to posttrans to get rid of warnings
d4a401
  during upgrade from RHEL-6 to RHEL-7
d4a401
  Resolves: rhbz#1086686
d4a401
d4a401
* Wed Sep  2 2015 Jaroslav Škarvada <jskarvad@redhat.com> - 2.0.19-6
d4a401
- Hardened build
d4a401
  Resolves: rhbz#1092516
d4a401
d4a401
* Tue Feb 18 2014 Jaroslav Škarvada <jskarvad@redhat.com> - 2.0.19-5
d4a401
- Used unitdir macro instead of the hardcoded systemd paths
d4a401
  Related: rhbz#1057268
d4a401
- Fixed bogus date in changelog (best effort)
d4a401
d4a401
* Mon Feb 17 2014 Jaroslav Škarvada <jskarvad@redhat.com> - 2.0.19-4
d4a401
- Fixed systemd requires
d4a401
  Resolves: rhbz#1057268
d4a401
d4a401
* Tue Feb 04 2014 Jan Grulich <jgrulich@redhat.com> - 2.0.19-3
d4a401
- Add aarch64 to ExclusiveArch
d4a401
- Resolves: rhbz#1055717
d4a401
d4a401
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 2.0.19-2
d4a401
- Mass rebuild 2013-12-27
d4a401
d4a401
* Tue May 28 2013 Jaroslav Škarvada <jskarvad@redhat.com> - 2.0.19-1
d4a401
- New version
d4a401
d4a401
* Mon Feb 25 2013 Jaroslav Škarvada <jskarvad@redhat.com> - 2.0.18-3
d4a401
- Switched to systemd-rpm macros
d4a401
  Resolves: rhbz#850020
d4a401
d4a401
* Fri Feb 15 2013 Jaroslav Škarvada <jskarvad@redhat.com> - 2.0.18-2
d4a401
- Fixed source URL
d4a401
d4a401
* Fri Feb 15 2013 Jaroslav Škarvada <jskarvad@redhat.com> - 2.0.18-1
d4a401
- New version
d4a401
- Replaced RPM_BUILD_ROOT variables by {buildroot} macros
d4a401
- Updated URLs to project home page and source code
d4a401
- Dropped mk patch, handled better way in the spec
d4a401
d4a401
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.17-2
d4a401
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
d4a401
d4a401
* Mon Sep 17 2012 Jaroslav Škarvada <jskarvad@redhat.com> - 2.0.17-1
d4a401
- New version
d4a401
  Resolves: rhbz#857695
d4a401
d4a401
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.16-5
d4a401
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
d4a401
d4a401
* Mon Jul  9 2012 Jaroslav Škarvada <jskarvad@redhat.com> - 2.0.16-4
d4a401
- Update of power.sh to be compatible with new systemd-loginctl
d4a401
  Resolves: rhbz#819547
d4a401
d4a401
* Thu Jun 14 2012 Jaroslav Škarvada <jskarvad@redhat.com> - 2.0.16-3
d4a401
- Silenced possible ck-list-sessions errors in power.sh
d4a401
d4a401
* Thu Jun 14 2012 Jaroslav Škarvada <jskarvad@redhat.com> - 2.0.16-2
d4a401
- Added support for systemd-loginctl list-sessions
d4a401
  Resolves: rhbz#819559
d4a401
d4a401
* Thu Mar 29 2012 Jaroslav Škarvada <jskarvad@redhat.com> - 2.0.16-1
d4a401
- New version
d4a401
d4a401
* Fri Mar 16 2012 Jiri Skala <jskala@redhat.com> - 2.0.15-1
d4a401
- updated to latest upstream 2.0.15
d4a401
d4a401
* Thu Jan 12 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.14-3
d4a401
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
d4a401
d4a401
* Mon Jan 02 2012 Jiri Skala <jskala@redhat.com> - 2.0.14-2
d4a401
- fixes #722325 - xfce4-power-manager does not seem to be supported
d4a401
d4a401
* Mon Dec 19 2011 Jiri Skala <jskala@redhat.com> - 2.0.14-1
d4a401
- updated to latest upstream 2.0.14
d4a401
d4a401
* Wed Nov 16 2011 Jiri Skala <jskala@redhat.com> - 2.0.13-1
d4a401
- updated to latest upstream 2.0.13
d4a401
d4a401
* Tue Aug 16 2011 Jiri Skala <jskala@redhat.com> - 2.0.12-1
d4a401
- updated to latest upstream 2.0.12
d4a401
d4a401
* Mon Aug 01 2011 Jiri Skala <jskala@redhat.com> - 2.0.11-1
d4a401
- updated to latest upstream 2.0.11
d4a401
d4a401
* Mon Jun 27 2011 Jiri Skala <jskala@redhat.com> - 2.0.10-2
d4a401
- fixes #716923 - move SysV initscript file into an optional subpackage
d4a401
d4a401
* Wed May 18 2011 Jiri Skala <jskala@redhat.com> - 2.0.10-1
d4a401
- update to latest upstream 2.0.10
d4a401
d4a401
* Fri May 06 2011 Bill Nottingham <notting@redhat.com> - 2.0.9-4
d4a401
- fix systemd scriptlets to properly handle upgrade
d4a401
d4a401
* Tue May 03 2011 Jiri Skala <jskala@redhat.com> - 2.0.9-3
d4a401
- corrected relase number to be min equal to f15
d4a401
d4a401
* Mon Apr 18 2011 Jiri Skala <jskala@redhat.com> - 2.0.9-1
d4a401
- update to latest upstream 2.0.9
d4a401
d4a401
* Wed Feb 16 2011 Jiri Skala <jskala@redhat.com> - 2.0.8-1
d4a401
- update to latest upstream 2.0.8
d4a401
d4a401
* Wed Feb 09 2011 Jiri Skala <jskala@redhat.com> - 2.0.7-3
d4a401
- fixes unused varable and coparison of different var types
d4a401
d4a401
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.7-2
d4a401
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
d4a401
d4a401
* Wed Dec 08 2010 Jiri Skala <jskala@redhat.com> - 2.0.7-1
d4a401
- update to latest upstream
d4a401
- fixes #660459 - Should be able to set options with /etc/sysconfig/acpi
d4a401
d4a401
* Wed Nov 03 2010 Jiri Skala <jskala@redhat.com> - 2.0.5-5
d4a401
- fixes #648221 - SELinux is preventing /sbin/iwconfig access to a leaked /dev/input/event0 file descriptor
d4a401
d4a401
* Wed Sep 29 2010 jkeating - 2.0.5-4
d4a401
- Rebuilt for gcc bug 634757
d4a401
d4a401
* Mon Sep 13 2010 Jiri Skala <jskala@redhat.com> - 2.0.5-3
d4a401
- fixes #629740 - acpid doesn't fork, but systemd unit file claims otherwise
d4a401
d4a401
* Wed Aug 11 2010 Jiri Skala <jskala@redhat.com> - 2.0.5-2
d4a401
- fixes #617317 - Providing native systemd file for upcoming F14 Feature Systemd
d4a401
d4a401
* Tue Jul 13 2010 Jiri Skala <jskala@redhat.com> - 2.0.5-1
d4a401
- latest upstream version
d4a401
- fixes #613315 kernel-2.6.35 doesn't create /proc/acpi/event
d4a401
d4a401
* Wed May 05 2010 Jiri Skala <jskala@redhat.com> - 2.0.4-1
d4a401
- latest upstream version
d4a401
d4a401
* Wed Mar 17  2010 Jiri Skala <jskala@redhat.com> - 2.0.3-2
d4a401
- fixes #575320 - acpid fails to load any event config files
d4a401
d4a401
* Thu Feb 25 2010 Jiri Skala <jskala@redhat.com> - 2.0.2-1
d4a401
- latest upstream version
d4a401
- removed spare umask
d4a401
- fixes missing headers
d4a401
d4a401
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.10-2
d4a401
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
d4a401
d4a401
* Thu Apr 23 2009 Zdenek Prikryl <zprikryl@redhat.com> - 1.0.10-1
d4a401
- Updated to version 1.0.10
d4a401
d4a401
* Mon Feb 23 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.8-3
d4a401
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
d4a401
d4a401
* Wed Feb 04 2009 Zdenek Prikryl <zprikryl@redhat.com> - 1.0.8-2
d4a401
- power.sh works with KDE 4.* (#483417)
d4a401
d4a401
* Tue Nov 11 2008 Zdenek Prikryl <zprikryl@redhat.com> - 1.0.8-1
d4a401
- Updated to version 1.0.8
d4a401
- power.sh works with ConsoleKit >= 0.3.0 (#470752)
d4a401
- Fixed conditions in power.sh, which look for power-managers (#470752)
d4a401
- Added check to init script
d4a401
d4a401
* Mon Jul 14 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 1.0.6-8
d4a401
- fix license tag
d4a401
d4a401
* Thu Apr 17 2008 Bill Nottingham <notting@redhat.com> - 1.0.6-7.fc9
d4a401
- adjust start/stop priority to not conflict with HAL (#442759)
d4a401
d4a401
* Thu Feb 14 2008 Zdenek Prikryl <zprikryl@redhat.com> - 1.0.6-6.fc9
d4a401
- Update of acpid-1.0.6-makefile.patch, it fix building with gcc 4.3
d4a401
d4a401
* Wed Jan 23 2008 Zdenek Prikryl <zprikryl@redhat.com> - 1.0.6-5.fc9
d4a401
- Fixed managing of power button (#361501)
d4a401
- Fixed power script to check for KDE power manager (#419331)
d4a401
d4a401
* Fri Nov 23 2007 Zdenek Prikryl <zprikryl@redhat.com> - 1.0.6-4.fc9
d4a401
- Removed old logrotate file
d4a401
- Fixed socket leak (#394431)
d4a401
- Fixed dumping useless info to log (#389581)
d4a401
d4a401
* Tue Oct 23 2007 Zdenek Prikryl <zprikryl@redhat.com> - 1.0.6-3.fc9
d4a401
- Silent initscript
d4a401
- Resolves: #345611
d4a401
d4a401
* Wed Sep 26 2007 Zdenek Prikryl <zprikryl@redhat.com> - 1.0.6-2.fc8
d4a401
- Fixed leak of a file descriptor
d4a401
- Resolves: #304761
d4a401
d4a401
* Tue Aug 07 2007 Zdenek Prikryl <zprikryl@redhat.com> - 1.0.6-1.fc8
d4a401
- Updated to version 1.0.6
d4a401
d4a401
* Wed Jul 25 2007 Zdenek Prikryl <zprikryl@redhat.com> - 1.0.4-8.fc8
d4a401
- Fixed init script to comply with LSB standard
d4a401
- Resolves: #237754
d4a401
d4a401
* Wed Feb 14 2007 Phil Knirsch <pknirsch@redhat.com> - 1.0.4-7.fc7
d4a401
- Dropped /var/log/acpid ownership as per review (225237)
d4a401
d4a401
* Wed Feb 07 2007 Phil Knirsch <pknirsch@redhat.com> - 1.0.4-6.fc7
d4a401
- Tons of specfile changes due to review (#225237)
d4a401
d4a401
* Tue Oct 10 2006 Phil Knirsch <pknirsch@redhat.com> - 1.0.4-5
d4a401
- Made acpid a PIE binary (#210016)
d4a401
d4a401
* Thu Aug 24 2006 Phil Knirsch <pknirsch@redhat.com> - 1.0.4-4
d4a401
- Made a better fix for the powerdown button which checks if g-p-m is running
d4a401
- Don't install sample.conf anymore, not needed
d4a401
d4a401
* Thu Aug 10 2006 Phil Knirsch <pknirsch@redhat.com> - 1.0.4-3
d4a401
- Disable the automatic shutdown -h via powerdown button by default due to
d4a401
  conflicts with gnome-power-manager
d4a401
d4a401
* Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 1.0.4-2.1
d4a401
- rebuild
d4a401
d4a401
* Wed Mar 01 2006 Phil Knirsch <pknirsch@redhat.com> - 1.0.4-2
d4a401
- Added video.conf file to turn on DPMS when opening the laptop lid. Disabled
d4a401
  by default.
d4a401
d4a401
* Tue Feb 07 2006 Jesse Keating <jkeating@redhat.com> - 1.0.4-1.2
d4a401
- rebuilt for new gcc4.1 snapshot and glibc changes
d4a401
d4a401
* Fri Dec 09 2005 Jesse Keating <jkeating@redhat.com>
d4a401
- rebuilt
d4a401
d4a401
* Wed Mar 16 2005 Bill Nottingham <notting@redhat.com> - 1.0.4-1
d4a401
- update to 1.0.4
d4a401
d4a401
* Mon Aug  9 2004 Miloslav Trmac <mitr@redhat.com> - 1.0.3-2
d4a401
- Update to 1.0.3 (fixes #128834)
d4a401
- s/Copyright/License/
d4a401
- Add logrotate config file (#110677, from Michal Jaegermann)
d4a401
- Don't verify contents of /var/log/acpid (#125862)
d4a401
- Use $RPM_OPT_FLAGS
d4a401
- Fix and cleanup acpid-1.0.1-pm1.patch
d4a401
- Add condrestart to %%postun
d4a401
d4a401
* Tue Jun 15 2004 Elliot Lee <sopwith@redhat.com>
d4a401
- rebuilt
d4a401
d4a401
* Fri Feb 13 2004 Elliot Lee <sopwith@redhat.com>
d4a401
- rebuilt
d4a401
d4a401
* Wed Oct 22 2003  Bill Nottingham <notting@redhat.com> 1.0.2-5
d4a401
- fix handling of sample.conf (#107160)
d4a401
- mark for translations (#107459)
d4a401
d4a401
* Sun Oct 19 2003 Florian La Roche <Florian.LaRoche@redhat.de>
d4a401
- add %%clean specfile target
d4a401
d4a401
* Wed Oct  1 2003  Bill Nottingham <notting@redhat.com> 1.0.2-3
d4a401
- re-enable x86
d4a401
- don't load the button module
d4a401
d4a401
* Thu Aug  7 2003  Bill Nottingham <notting@redhat.com> 1.0.2-2
d4a401
- no x86 for now
d4a401
d4a401
* Mon Jul  7 2003  Bill Nottingham <notting@redhat.com> 1.0.2-1
d4a401
- update to 1.0.2
d4a401
d4a401
* Wed Dec 11 2002  Bill Nottingham <notting@redhat.com> 1.0.1-4
d4a401
- don't start if /proc/acpi/event isn't there
d4a401
d4a401
* Thu Nov 14 2002  Bill Nottingham <notting@redhat.com> 1.0.1-3
d4a401
- build on more arches
d4a401
d4a401
* Mon Aug 26 2002  Bill Nottingham <notting@redhat.com> 1.0.1-2
d4a401
- tweak default config to run shutdown -h now on a power button event
d4a401
d4a401
* Thu Aug 22 2002  Bill Nottingham <notting@redhat.com> 1.0.1-1
d4a401
- initial build, bang on included specfile
d4a401
d4a401
* Fri Mar 15 2002  Tim Hockin <thockin@sun.com>
d4a401
  - Updated RPM spec with patch from sun for chkconfig on/off
d4a401
  - Add Changelog, make 'make rpm' use it.
d4a401
d4a401
* Wed Mar 13 2002  Tim Hockin <thockin@sun.com>
d4a401
  - Fixed logging bug - not appending to log (O_APPEND needed)
d4a401
  - Fix 'make install' to not need root access
d4a401
  - Fix RPM spec to not need root
d4a401
d4a401
* Thu Sep 6 2001 Tim Hockin <thockin@sun.com>
d4a401
  - 1.0.0
d4a401
d4a401
* Thu Aug 16 2001  Tim Hockin <thockin@sun.com>
d4a401
  - Added commandline options to actions
d4a401
d4a401
* Wed Aug 15 2001  Tim Hockin <thockin@sun.com>
d4a401
  - Added UNIX domain socket support
d4a401
  - Changed /etc/acpid.d to /etc/acpid/events
d4a401
d4a401
* Mon Aug 13 2001  Tim Hockin <thockin@sun.com>
d4a401
  - added changelog
d4a401
  - 0.99.1-1
d4a401