UPower-1.91.1

#### Beyond Linux® From Scratch (systemd Edition) - Version 13.0

### Chapter 12. System Utilities

- Prev

  UnRar-7.2.4

- Next

  Which-2.23 and Alternatives

- Up
- Home

# UPower-1.91.1

## Introduction to UPower

The UPower package provides an interface for enumerating power devices, listening to device events, and querying history and statistics. Any application or service on the system can access the org.freedesktop.UPower service via the system message bus.

### Note

This package is known to build and work properly using an LFS 13.0 platform.

### Package Information

- Download (HTTP): https://gitlab.freedesktop.org/upower/upower/-/archive/v1.91.1/upower-v1.91.1.tar.bz2

- Download MD5 sum: 693c8b37ad61286a9ba955f6b6f406bc

- Download size: 168 KB

- Estimated disk space required: 6.5 MB (add 3.7 MB for tests)

- Estimated build time: less than 0.1 SBU (add 0.8 SBU for tests)

### UPower Dependencies

#### Required

libgudev-238 and libusb-1.0.29

#### Optional (Required if building GNOME)

GLib-2.86.4 (with GObject Introspection)

#### Optional

GTK-Doc-1.35.1, libxslt-1.1.45, docbook-xsl-nons-1.79.2, PyGObject-3.54.5, dbusmock-0.38.1, umockdev-0.19.4 (for part of the test suite), and libimobiledevice

## Kernel Configuration

Enable the following options in the kernel configuration and recompile the kernel if necessary:

    General setup --->
      -*- Namespaces support --->                                       [NAMESPACES]
        [*] User namespace                                                 [USER_NS]

## Installation of UPower

Install UPower by running the following commands:

    mkdir build               &&
    cd    build               &&

    meson setup ..            \
          --prefix=/usr       \
          --buildtype=release \
          -D gtk-doc=false    \
          -D man=false        &&
    ninja

To test the results, issue: LC_ALL=C ninja test. The test suite should be run from a local GUI session started with dbus-launch. On 32-bit machines, one test will fail due to rounding errors: `Tests.test_battery_energy_charge_mixed`. On some systems, two tests relating to the headphone hotplug feature are known to fail. Those can be safely ignored since the functionality still works.

Now, as the `root` user:

    ninja install

## Command Explanations

`-D gtk-doc=false`: Prevents building the documentation. Remove this if you have GTK-Doc installed and wish to build the documentation.

`-D man=false`: Prevents building the manual pages. Remove this if you have libxslt-1.1.45 and docbook-xsl-nons-1.79.2 installed and wish to build the manual pages.

## Contents

Installed Programs: upower
Installed Libraries: libupower-glib.so
Installed Directories: /etc/UPower, /usr/include/libupower-glib, and /var/lib/upower

### Short Descriptions

upower | is the UPower command line tool
`libupower-glib.so` | contains the UPower API functions

- Prev

  UnRar-7.2.4

- Next

  Which-2.23 and Alternatives

- Up
- Home