Blame SPECS/acpid.spec

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