%define tag f5cea82 Name: olpc-powerd Summary: OLPC XO power management Version: 110 Release: 14%{?dist} License: GPLv2+ URL: http://dev.laptop.org/git/users/pgf/powerd/tree/powerd # Source0: the source tarball is created by "make tarball" from within # a clone of this git tree: git://dev.laptop.org/users/pgf/powerd Source0: %{name}-%{version}-git%{tag}.tar.gz Patch0: 0001-nm_monitor-port-to-libnm.patch BuildRequires: gcc BuildRequires: kernel-headers, NetworkManager-libnm-devel, libusb1-devel, systemd-devel Requires: olpc-kbdshim, ethtool, evtest, inotify-tools, libusb Requires(post): systemd Requires(preun): systemd Requires(postun): systemd #ExclusiveArch: %{ix86} %{arm} %description powerd is the user-level power management daemon for the XO family of laptops. It is independent of X, and moderately independent of dbus. This package provides the powerd and olpc-switchd daemons, and related utilities. %package dbus Summary: D-Bus interface to powerd Requires: olpc-powerd, dbus BuildRequires: dbus-glib-devel %description dbus Provides a dbus-activated daemon to provide access to powerd functionality over the D-Bus system bus. %prep %setup -q %patch0 -p1 %build export OPT_FLAGS="$RPM_OPT_FLAGS" make %install mkdir -p %{buildroot}%{_sbindir} mkdir -p %{buildroot}%{_bindir} mkdir -p %{buildroot}%{_libexecdir} mkdir -p %{buildroot}%{_libexecdir}/powerd mkdir -p %{buildroot}%{_sysconfdir}/dbus-1/system.d mkdir -p %{buildroot}%{_sysconfdir}/powerd mkdir -p %{buildroot}%{_sysconfdir}/powerd/postresume.d mkdir -p %{buildroot}%{_sysconfdir}/powerd/flags install -p -m 755 olpc-switchd %{buildroot}%{_sbindir}/olpc-switchd install -p -m 755 powerd %{buildroot}%{_sbindir}/powerd install -p -m 755 pnmto565fb %{buildroot}%{_libexecdir}/powerd/pnmto565fb install -p -m 755 usblist %{buildroot}%{_libexecdir}/powerd/usblist install -p -m 755 powerd-config %{buildroot}%{_bindir}/powerd-config install -p -m 755 olpc-nosleep %{buildroot}%{_bindir}/olpc-nosleep install -p -m 644 pleaseconfirm.pgm %{buildroot}%{_sysconfdir}/powerd/pleaseconfirm.pgm install -p -m 644 shuttingdown.pgm %{buildroot}%{_sysconfdir}/powerd/shuttingdown.pgm install -p -m 644 powerd.conf.dist %{buildroot}%{_sysconfdir}/powerd/powerd.conf install -p -m 644 version %{buildroot}%{_sysconfdir}/powerd/version install -p -m 644 power-logger %{buildroot}%{_libexecdir}/powerd/power-logger install -p -m 644 usb-inhibits %{buildroot}%{_sysconfdir}/powerd/flags/usb-inhibits install -p -m 755 powerd-dbus/powerd-dbus %{buildroot}%{_libexecdir}/powerd/powerd-dbus install -p -m 644 powerd-dbus/powerd.conf %{buildroot}%{_sysconfdir}/dbus-1/system.d/powerd.conf install -d %{buildroot}/%{_unitdir} install -p -m 644 powerd.service %{buildroot}/%{_unitdir}/powerd.service install -p -m 644 olpc-switchd.service %{buildroot}/%{_unitdir}/olpc-switchd.service %files %doc COPYING %{_sbindir}/olpc-switchd %{_sbindir}/powerd %{_libexecdir}/powerd/pnmto565fb %{_libexecdir}/powerd/usblist %{_bindir}/powerd-config %{_bindir}/olpc-nosleep %{_libexecdir}/powerd/power-logger %{_unitdir}/*.service %config(noreplace) %{_sysconfdir}/powerd/pleaseconfirm.pgm %config(noreplace) %{_sysconfdir}/powerd/shuttingdown.pgm %config(noreplace) %{_sysconfdir}/powerd/powerd.conf %config(noreplace) %{_sysconfdir}/powerd/flags/usb-inhibits %{_sysconfdir}/powerd/version %files dbus %{_libexecdir}/powerd/powerd-dbus %config(noreplace) %{_sysconfdir}/dbus-1/system.d/powerd.conf %post %systemd_post powerd.service %systemd_post olpc-switchd.service %preun %systemd_preun powerd.service %systemd_preun olpc-switchd.service %postun %systemd_postun_with_restart powerd.service %systemd_postun_with_restart olpc-switchd.service %changelog * Thu Jul 25 2019 Fedora Release Engineering - 110-14 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild * Fri Feb 01 2019 Fedora Release Engineering - 110-13 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild * Fri Jul 13 2018 Fedora Release Engineering - 110-12 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild * Thu Feb 08 2018 Fedora Release Engineering - 110-11 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild * Thu Aug 03 2017 Fedora Release Engineering - 110-10 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild * Thu Jul 27 2017 Fedora Release Engineering - 110-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild * Sat Feb 11 2017 Fedora Release Engineering - 110-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild * Thu Feb 04 2016 Fedora Release Engineering - 110-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild * Wed Jun 17 2015 Fedora Release Engineering - 110-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild * Sun Aug 17 2014 Fedora Release Engineering - 110-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild * Sat Jun 07 2014 Fedora Release Engineering - 110-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild * Sun May 11 2014 Peter Robinson 110-3 - Update systemd scripts to latest distro specs (RHBZ 1094920) * Sat Aug 03 2013 Fedora Release Engineering - 110-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild * Thu May 23 2013 Paul Fox - 110-1 - protect against negative seconds since the epoch (#12621) - do a better job of detecting tty lockfiles (#11286) * Thu Feb 14 2013 Fedora Release Engineering - 108-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild * Tue Jan 22 2013 Paul Fox - 108-1 - detect lid-closed more reliably * Mon Jan 7 2013 Paul Fox - 107-1 - detect telepathy on ipv6 sockets - other XO-4 fixes * Fri Dec 21 2012 - 106-1 - XO-4 changes -- suspend enabled * Wed Aug 29 2012 - 105-1 - XO-4 tweaks * Fri Aug 24 2012 - 104-1 - XO-4 early support * Fri Jul 20 2012 Fedora Release Engineering - 103-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild * Wed May 23 2012 Paul Fox - 103-1 - inhibit suspend when audio device is in use * Thu May 17 2012 Paul Fox - 102-1 - update internal documentation - fix wakeup conditions which caused touchpad loss * Mon Apr 30 2012 Paul Fox - 101-1 - removed dependence on /proc/bus/usb - reimplemented XO-1 wlan power control - inhibit suspend when any ttyUSBn is in use - systemd control files from fedora upstream now bundled * Fri Mar 30 2012 Paul Fix - 100-1 - Support for 3.x kernels on XO-1 and XO-1.5 - Improvments in inhibit-suspend flag * Tue Feb 21 2012 Paul Fox - 45-1 - implement wakeup control for recently controllable devices. * Sun Feb 12 2012 Paul Fox - 44-1 - implement camera-busy heuristic to inhibit suspend on 1.75 - fix touchscreen presence check * Mon Feb 6 2012 - 43-1 - better support for wlan wakeups on 1.75 - initial support for 3.0 and later kernels on XO-1/1.5. - 42-1 (unreleased) - keep olpc-switchd and powerd from respawning due to missing drivers: AC, battery, DCON, lid and ebook switches. also defend against transient errors when accessing AC and battery. - support for XO-3 -- no DCON, different backlight control, different display. - working touchscreen support - (no version 41 was created) * Fri Jan 13 2012 Fedora Release Engineering - 42-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild * Sat Dec 24 2011 Peter Robinson - 42-1 - update to 42 * Tue Nov 29 2011 Peter Robinson 40-1 - update to 40 * Mon Nov 21 2011 Peter Robinson 39-1 - update to 39 * Sat Nov 19 2011 Peter Robinson 38-1 - update to 38 * Wed Oct 19 2011 Daniel Drake - 37-1 - Reduce window for suspend during network connection - Close unused input devices in switchd * Wed Sep 06 2011 Daniel Drake - 36-1 - Use evtest for switch state querying - powerd-dbus now inhibits suspend while connecting to wireless networks * Thu Sep 01 2011 Daniel Drake - 35-1 - Initial XO-1.75 support * Sun Jun 26 2011 Peter Robinson - 33-3 - Add ARM to exclusive platforms * Sun Mar 13 2011 Daniel Drake - 33-2 - port to systemd * Sun Feb 20 2011 Daniel Drake - 33-1 - latest version * Thu Feb 10 2011 Daniel Drake - 31-3 - -combine gcc option was dropped, switch to -flto * Tue Feb 08 2011 Fedora Release Engineering - 31-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild * Thu Nov 25 2010 Daniel Drake - 31-1 - Lid wakeup improvements on XO-1 - LED bug workaround for XO-1 - Enable wake-on-multicast if salut collaboration is being used * Mon Nov 8 2010 Daniel Drake - 29-1 - opening lid no longer wakes the laptop, to suppress unwanted wakeups when laptops are stacked. (configurable) - improvements for very short idle timeouts - add missing dependency on ethtool * Wed Sep 29 2010 jkeating - 28-2 - Rebuilt for gcc bug 634757 * Wed Sep 22 2010 Daniel Drake - 28-1 - Update to v28, update for Upstart 0.6 * Tue Aug 24 2010 Daniel Drake - 26-1 - Update to v26 * Mon May 3 2010 Paul Fox - 21-1 - close hole where creation of inhibit file won't always inhibit suspend. - close hole where net traffic won't inhibit suspend after a lot of traffic * Fri Apr 30 2010 Paul Fox - 20-1 - add preemptive sync on power button, or when idle suspend is imminent. - fix bug causing power button splash menu to not appear sometimes. - bring documentation up to date. * Thu Apr 15 2010 Paul Fox - 19-1 - improve olpc-pwr-log.sh logging - modify handling of battery dis/charge wakeups which were preventing eventual shutdown. * Tue Apr 6 2010 Paul Fox - 18-1 - ensure dcon is awake and unfrozen if powerd exits. - enable network activity checks: pings, inbound traffic for established tcp connections, as well as any non-mdns outbound traffic, within 5 seconds of the target time, will all keep the inhibit suspend. - bug fixes for recently introduced problems. * Mon Apr 5 2010 Paul Fox - 17-1 - reorder the background "xxx_is_busy" checks for better useability. * Tue Mar 30 2010 Paul Fox - 16-1 - inhibit suspend when camera is active - lower the cpu busy-ness threshold required to inhibit suspend -- audio apps now inhibit. - make trace file easier to summarize. (grep for ": @") - suppress wake-on-wlan when screen is blanked, by default. * Wed Mar 24 2010 Paul Fox - 15-1 - ensure battery and AC events are always reported correctly * Wed Mar 24 2010 Paul Fox - 14-1 - allow keypress to wake from a blanked idle-suspend state - properly keep wireless working during idle suspends - check for closed lid on startup, so we sleep right away - workaround issues with AC jack reporting - capture stdout to the trace file, to prevent console spew - force a date stamp into the trace file on startup - lengthen dim/blank/shutdown timeouts * Fri Mar 12 2010 Paul Fox - 13-1 - early enhancements/fixes to olpc-pwr-log functionality * Tue Mar 9 2010 Paul Fox - 12-1 - integrate the functionality of olpc-pwr-log - setting most timer values to 0 now does something interesting - catch events that might be lost during brief action wakeups * Fri Feb 19 2010 Paul Fox - 11-1 - adjust default dim/suspend times (suspend long before dim) - new olpc-nosleep wrapper command for inhibiting suspend - support for XO-1.5 - new persistent inhibit file - unfreeze delay is configurable * Mon Jan 25 2010 Paul Fox - 10-1 - speedups in splash image drawing - remove some bash-isms so powerd will run with dash on debian - improvements to make input switch device detection more robust. - powerd.wip is work-in-progress for supporting XO-1.5. * Thu Jul 30 2009 Paul Fox - 9-1 - disable tracing, by default. use "powerd-control =tracing-on" to enable at runtime. - create the inhibit file so that root owns it and can make it writeable. - don't brighten the screen on wlan wakeups. * Fri Jul 17 2009 Paul Fox - 8-1 - incorporate package review fixups - commentary and powerd-config UI clarification - fix fatal bug when battery is missing * Fri Jul 6 2009 Paul Fox - 7-1 - no longer wake on AC events -- unnecessary - doc fixups * Thu Jun 11 2009 Paul Fox - 6-2 - utility targets in makefile * Sat Jun 6 2009 Paul Fox - 6-1 - various fixes - incorporate lessons from kbdshim review * Tue May 5 2009 Paul Fox - 5-1 - fixed ability to shut down with backlight off. oops. - various utility bug fixes (powerd-config, olpc-brightness) * Sun Apr 12 2009 Paul Fox - 4-1 - add control over sleep on lid-close - resync version numbers * Sat Apr 11 2009 Paul Fox - 3-3 - fixed powerd-config behavior wrt symlinked configs * Fri Apr 10 2009 Paul Fox - 3-2 - fix bugs, implement cpu idleness check, and add suspend inhibit mechanism * Tue Apr 7 2009 Paul Fox - 3-1 - convert to HAL-based operation * Thu Mar 19 2009 Paul Fox - 2-3 - removed extra dcon calls. * Thu Mar 19 2009 Paul Fox - 2-2 - bug fixing * Tue Mar 17 2009 Paul Fox - 2-1 - added powerd-config, and added blank-or-shutdown after sleep capability * Fri Mar 13 2009 Paul Fox - 1-2 - fix rpmlint errors, move daemons to /usr/sbin