%global debug_package %{nil} URL: https://github.com/MCC45TR/uke-linux-hardware-support Source0: uke-upower-1.91.5.tar.xz ExclusiveArch: aarch64 BuildRequires: gettext BuildRequires: git BuildRequires: glib2-devel >= 2.6.0 BuildRequires: gobject-introspection-devel BuildRequires: gtk-doc BuildRequires: libgudev1-devel BuildRequires: libimobiledevice-devel BuildRequires: meson BuildRequires: polkit-devel BuildRequires: systemd BuildRequires: gcc python3 umockdev dbus-daemon systemd-rpm-macros BuildRequires: glib2-devel >= 2.76 BuildRequires: gobject-introspection-devel = 1.86.0-12.fc46 BuildRequires: meson = 1.12.1-2.fc46 BuildRequires: python3 = 3.15.2-1.fc46 Name: uke-upower Version: 1.91.5 Release: 20.fc46 License: GPL-2.0-or-later Summary: Power Management Service Requires: uke-upower-libs(aarch-64) = 1.91.5-20.fc46 Requires: udev Provides: upower = 1.91.5-20.fc46 Provides: upower%{?_isa} = 1.91.5-20.fc46 Obsoletes: upower < 1.91.5-20.fc46 Conflicts: upower Requires(pre): rpm systemd coreutils sed Requires(posttrans): systemd coreutils sed %description -n uke-upower UPower (formerly DeviceKit-power) provides a daemon, API and command line tools for managing power devices attached to the system. %package -n uke-upower-libs Version: 1.91.5 Release: 20.fc46 License: GPL-2.0-or-later Summary: Client libraries for UPower Requires: gobject-introspection Recommends: uke-upower(aarch-64) = 1.91.5-20.fc46 Conflicts: uke-upower < 0.99.20-4 Provides: upower-libs = 1.91.5-20.fc46 Provides: upower-libs%{?_isa} = 1.91.5-20.fc46 Obsoletes: upower-libs < 1.91.5-20.fc46 Conflicts: upower-libs %description -n uke-upower-libs Client libraries for UPower. %package -n uke-upower-devel Version: 1.91.5 Release: 20.fc46 License: GPL-2.0-or-later Summary: Headers and libraries for UPower Requires: uke-upower-libs(aarch-64) = 1.91.5-20.fc46 Provides: upower-devel = 1.91.5-20.fc46 Provides: upower-devel%{?_isa} = 1.91.5-20.fc46 Obsoletes: upower-devel < 1.91.5-20.fc46 Conflicts: upower-devel %description -n uke-upower-devel Headers and libraries for UPower. %package -n uke-upower-devel-docs Version: 1.91.5 Release: 20.fc46 License: GPL-2.0-or-later Summary: Developer documentation for for libupower-glib Requires: uke-upower-libs = 1.91.5-20.fc46 BuildArch: noarch Provides: upower-devel-docs = 1.91.5-20.fc46 Provides: upower-devel-docs%{?_isa} = 1.91.5-20.fc46 Obsoletes: upower-devel-docs < 1.91.5-20.fc46 Conflicts: upower-devel-docs %description -n uke-upower-devel-docs Developer documentation for for libupower-glib. %prep %setup -q ( mkdir -p "%{_builddir}/uke-upower-1.91.5/work/upower" cd '%{_builddir}/uke-upower-1.91.5/work/upower' rm -rf 'upower-v1.91.5' /usr/bin/rpmuncompress -x '%{_builddir}/uke-upower-1.91.5/inputs/upower/upower-v1.91.5.tar.bz2' STATUS=$? if [ $STATUS -ne 0 ]; then exit $STATUS fi cd 'upower-v1.91.5' /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w . /usr/bin/git init -q /usr/bin/git config user.name "rpm-build" /usr/bin/git config user.email "" /usr/bin/git config gc.auto 0 /usr/bin/git add --force . GIT_COMMITTER_DATE=@${SOURCE_DATE_EPOCH:-${RPM_BUILD_TIME:?}} GIT_AUTHOR_DATE=@${SOURCE_DATE_EPOCH:-${RPM_BUILD_TIME:?}}\ /usr/bin/git commit -q --no-gpg-sign --allow-empty -a\ --author "rpm-build " -m "upower-1.91.5 base" /usr/bin/git checkout --track -b rpm-build /usr/bin/rpmuncompress %{_builddir}/uke-upower-1.91.5/inputs/upower/0001-required-threshold-write-errors.patch | /usr/bin/git apply --index --reject -p1 - GIT_COMMITTER_DATE=@${SOURCE_DATE_EPOCH:-${RPM_BUILD_TIME:?}} GIT_AUTHOR_DATE=@${SOURCE_DATE_EPOCH:-${RPM_BUILD_TIME:?}}\ /usr/bin/git commit -q --no-gpg-sign -m 0001-required-threshold-write-errors.patch --author "rpm-build " /usr/bin/rpmuncompress %{_builddir}/uke-upower-1.91.5/inputs/upower/0002-preserve-reported-health-capacity.patch | /usr/bin/git apply --index --reject -p1 - GIT_COMMITTER_DATE=@${SOURCE_DATE_EPOCH:-${RPM_BUILD_TIME:?}} GIT_AUTHOR_DATE=@${SOURCE_DATE_EPOCH:-${RPM_BUILD_TIME:?}}\ /usr/bin/git commit -q --no-gpg-sign -m 0002-preserve-reported-health-capacity.patch --author "rpm-build " /usr/bin/rpmuncompress %{_builddir}/uke-upower-1.91.5/inputs/upower/0003-recognize-standard-wireless-supplies.patch | /usr/bin/git apply --index --reject -p1 - GIT_COMMITTER_DATE=@${SOURCE_DATE_EPOCH:-${RPM_BUILD_TIME:?}} GIT_AUTHOR_DATE=@${SOURCE_DATE_EPOCH:-${RPM_BUILD_TIME:?}}\ /usr/bin/git commit -q --no-gpg-sign -m 0003-recognize-standard-wireless-supplies.patch --author "rpm-build " /usr/bin/rpmuncompress %{_builddir}/uke-upower-1.91.5/inputs/upower/0004-recover-late-capacity-units.patch | /usr/bin/git apply --index --reject -p1 - GIT_COMMITTER_DATE=@${SOURCE_DATE_EPOCH:-${RPM_BUILD_TIME:?}} GIT_AUTHOR_DATE=@${SOURCE_DATE_EPOCH:-${RPM_BUILD_TIME:?}}\ /usr/bin/git commit -q --no-gpg-sign -m 0004-recover-late-capacity-units.patch --author "rpm-build " /usr/bin/rpmuncompress %{_builddir}/uke-upower-1.91.5/inputs/upower/0005-deterministic-history-selftest.patch | /usr/bin/git apply --index --reject -p1 - GIT_COMMITTER_DATE=@${SOURCE_DATE_EPOCH:-${RPM_BUILD_TIME:?}} GIT_AUTHOR_DATE=@${SOURCE_DATE_EPOCH:-${RPM_BUILD_TIME:?}}\ /usr/bin/git commit -q --no-gpg-sign -m 0005-deterministic-history-selftest.patch --author "rpm-build " ) %build ( cd "%{_builddir}/uke-upower-1.91.5/work/upower/upower-v1.91.5" CFLAGS="${CFLAGS:--O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -mbranch-protection=standard -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer }" ; export CFLAGS ; CXXFLAGS="${CXXFLAGS:--O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -mbranch-protection=standard -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer }" ; export CXXFLAGS ; FFLAGS="${FFLAGS:--O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -mbranch-protection=standard -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -I/usr/lib64/gfortran/modules }" ; export FFLAGS ; FCFLAGS="${FCFLAGS:--O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -mbranch-protection=standard -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -I/usr/lib64/gfortran/modules }" ; export FCFLAGS ; VALAFLAGS="${VALAFLAGS:--g}" ; export VALAFLAGS ; RUSTFLAGS="${RUSTFLAGS:--Copt-level=3 -Cdebuginfo=2 -Ccodegen-units=1 -Cstrip=none -Cforce-frame-pointers=yes -Clink-arg=-specs=/usr/lib/rpm/redhat/redhat-package-notes --cap-lints=warn}" ; export RUSTFLAGS ; LDFLAGS="${LDFLAGS:--Wl,-z,relro -Wl,--as-needed -Wl,-z,pack-relative-relocs -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-hardened-ld-errors -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -specs=/usr/lib/rpm/redhat/redhat-package-notes }" ; export LDFLAGS ; LT_SYS_LIBRARY_PATH="${LT_SYS_LIBRARY_PATH:-/usr/lib64:}" ; export LT_SYS_LIBRARY_PATH ; CC="${CC:-gcc}" ; export CC ; CXX="${CXX:-g++}" ; export CXX /usr/bin/meson setup --buildtype=plain --prefix=/usr --libdir=/usr/lib64 --libexecdir=/usr/libexec --bindir=/usr/bin --sbindir=/usr/bin --includedir=/usr/include --datadir=/usr/share --mandir=/usr/share/man --infodir=/usr/share/info --localedir=/usr/share/locale --sysconfdir=/etc --localstatedir=/var --sharedstatedir=/var/lib --wrap-mode=nodownload --auto-features=enabled . redhat-linux-build \ -Didevice=enabled \ -Dman=true \ -Dgtk-doc=true \ -Dintrospection=enabled \ -Dinstalled_tests=false /usr/bin/meson compile -C redhat-linux-build -j${RPM_BUILD_NCPUS} --verbose ) %install ( cd "%{_builddir}/uke-upower-1.91.5/work/upower/upower-v1.91.5" DESTDIR=%{buildroot} /usr/bin/meson install -C redhat-linux-build --no-rebuild /usr/lib/rpm/find-lang.sh %{buildroot} upower ) %check ( cd "%{_builddir}/uke-upower-1.91.5/work/upower/upower-v1.91.5" LD_LIBRARY_PATH=redhat-linux-build/libupower-glib timeout -k 5s 30s redhat-linux-build/src/up_self_test -p /power/history bash %{_builddir}/uke-upower-1.91.5/inputs/upower/upower-threshold-contract.sh src/linux/up-device-supply-battery.c bash %{_builddir}/uke-upower-1.91.5/inputs/upower/upower-health-contract.sh src/up-device-battery.c mkdir -p charging-fixture/tests/fixtures/upower cp %{_builddir}/uke-upower-1.91.5/inputs/upower/upower-fixture.sh charging-fixture/tests/upower-fixture.sh cp %{_builddir}/uke-upower-1.91.5/inputs/upower/ac-net-discharge.umockdev charging-fixture/tests/fixtures/upower/ac-net-discharge.umockdev LD_LIBRARY_PATH=redhat-linux-build/libupower-glib timeout -k 5s 90s bash charging-fixture/tests/upower-fixture.sh redhat-linux-build/src/upowerd LD_LIBRARY_PATH=redhat-linux-build/libupower-glib timeout -k 5s 150s bash %{_builddir}/uke-upower-1.91.5/inputs/upower/upower-late-capacity.sh redhat-linux-build/src/upowerd if find %{buildroot} -type f \( -name '*.py' -o -name '*.pyc' -o -name '*.pyo' -o -name 'python*' \) -print -quit | grep -q .; then exit 1; fi while IFS= read -r -d '' file; do if head -c 256 "$file" | LC_ALL=C grep -aE '^#!.*(python|pypy)'; then exit 1; fi; done < <(find %{buildroot} -type f -print0) ) %post -n uke-upower if [ $1 -eq 1 ] && [ -x "/usr/lib/systemd/systemd-update-helper" ]; then # Initial installation /usr/lib/systemd/systemd-update-helper install-system-units upower.service || : fi %preun -n uke-upower if [ $1 -eq 0 ] && [ -x "/usr/lib/systemd/systemd-update-helper" ]; then # Package removal, not upgrade /usr/lib/systemd/systemd-update-helper remove-system-units upower.service || : fi %postun -n uke-upower if [ $1 -ge 1 ] && [ -x "/usr/lib/systemd/systemd-update-helper" ]; then # Package upgrade, not uninstall /usr/lib/systemd/systemd-update-helper mark-restart-system-units upower.service || : fi %files -n uke-upower -f work/upower/upower-v1.91.5/upower.lang %license work/upower/upower-v1.91.5/COPYING %doc work/upower/upower-v1.91.5/NEWS work/upower/upower-v1.91.5/AUTHORS work/upower/upower-v1.91.5/HACKING.md work/upower/upower-v1.91.5/README.md /usr/share/dbus-1/system.d/org.freedesktop.UPower.conf /usr/lib/udev/rules.d/*-upower-*.rules /usr/lib/udev/hwdb.d/*-upower-*.hwdb %ghost %dir /var/lib/upower %dir /etc/UPower %config(noreplace) /etc/UPower/UPower.conf /etc/UPower/UPower.conf.d/README.md /usr/bin/upower /usr/libexec/upowerd /usr/share/man/man1/upower.1* /usr/share/man/man7/UPower.7* /usr/share/man/man8/upowerd.8* /usr/share/dbus-1/system-services/org.freedesktop.UPower.service /usr/lib/systemd/system/upower.service /usr/share/polkit-1/actions/org.freedesktop.upower.policy /usr/share/polkit-1/rules.d/org.freedesktop.upower.rules %dir /usr/share/zsh/site-functions /usr/share/zsh/site-functions/_upower %files -n uke-upower-libs %license work/upower/upower-v1.91.5/COPYING /usr/lib64/libupower-glib.so.3{,.*} /usr/lib64/girepository-1.0/UPowerGlib-1.0.typelib %files -n uke-upower-devel /usr/share/dbus-1/interfaces/org.freedesktop.UPower*.xml /usr/lib64/libupower-glib.so /usr/lib64/pkgconfig/upower-glib.pc /usr/share/gir-1.0/UPowerGlib-1.0.gir %dir /usr/include/libupower-glib /usr/include/libupower-glib/up-*.h /usr/include/libupower-glib/upower.h %files -n uke-upower-devel-docs %dir /usr/share/gtk-doc %dir /usr/share/gtk-doc/html/UPower /usr/share/gtk-doc/html/UPower/* %pre -n uke-upower old=upower; new=uke-upower; unit=upower.service; phase=save # POSIX shell fragment embedded only in RPM migration scriptlets. # Restore the admitted state; never enable a previously disabled hardware path. case "$phase" in save) [ -d /run/systemd/system ] || exit 0 test "$(rpm -q --qf '%%{NAME}' "$old" 2>/dev/null)" = "$old" || exit 0 state=/run/uke-rpm-migration [ ! -L "$state" ] && [ ! -L "$state/$new" ] || exit 1 install -d -m700 "$state" enabled=$(systemctl is-enabled "$unit" 2>/dev/null) || : active=$(systemctl is-active "$unit" 2>/dev/null) || : case "$enabled" in enabled|enabled-runtime|disabled|static|indirect|masked|masked-runtime) ;; *) exit 1;; esac case "$active" in active|inactive|failed|activating|deactivating) ;; *) exit 1;; esac (umask 077; printf '%%s\n%%s\n' "$enabled" "$active" >"$state/$new") ;; restore) if [ "$new" = uke-iio-sensor-proxy ]; then if /usr/bin/selinuxenabled; then /usr/bin/semodule -i /usr/share/selinux/packages/uke-ssc.cil || exit 1 else /usr/bin/semodule -n -s targeted -i /usr/share/selinux/packages/uke-ssc.cil || exit 1 fi fi state=/run/uke-rpm-migration [ -f "$state/$new" ] && [ ! -L "$state" ] && [ ! -L "$state/$new" ] || exit 0 enabled=$(sed -n '1p' "$state/$new") active=$(sed -n '2p' "$state/$new") current=$(systemctl is-enabled "$unit" 2>/dev/null) || : case "$current" in masked|masked-runtime) unlink "$state/$new"; exit 0;; esac systemctl daemon-reload || exit 1 case "$enabled" in enabled) systemctl enable "$unit" || exit 1;; enabled-runtime) systemctl enable --runtime "$unit" || exit 1;; masked|masked-runtime) unlink "$state/$new"; exit 0;; esac if [ "$active" = active ]; then systemctl start "$unit" || exit 1; fi unlink "$state/$new" ;; *) exit 1;; esac %posttrans -n uke-upower old=upower; new=uke-upower; unit=upower.service; phase=restore # POSIX shell fragment embedded only in RPM migration scriptlets. # Restore the admitted state; never enable a previously disabled hardware path. case "$phase" in save) [ -d /run/systemd/system ] || exit 0 test "$(rpm -q --qf '%%{NAME}' "$old" 2>/dev/null)" = "$old" || exit 0 state=/run/uke-rpm-migration [ ! -L "$state" ] && [ ! -L "$state/$new" ] || exit 1 install -d -m700 "$state" enabled=$(systemctl is-enabled "$unit" 2>/dev/null) || : active=$(systemctl is-active "$unit" 2>/dev/null) || : case "$enabled" in enabled|enabled-runtime|disabled|static|indirect|masked|masked-runtime) ;; *) exit 1;; esac case "$active" in active|inactive|failed|activating|deactivating) ;; *) exit 1;; esac (umask 077; printf '%%s\n%%s\n' "$enabled" "$active" >"$state/$new") ;; restore) if [ "$new" = uke-iio-sensor-proxy ]; then if /usr/bin/selinuxenabled; then /usr/bin/semodule -i /usr/share/selinux/packages/uke-ssc.cil || exit 1 else /usr/bin/semodule -n -s targeted -i /usr/share/selinux/packages/uke-ssc.cil || exit 1 fi fi state=/run/uke-rpm-migration [ -f "$state/$new" ] && [ ! -L "$state" ] && [ ! -L "$state/$new" ] || exit 0 enabled=$(sed -n '1p' "$state/$new") active=$(sed -n '2p' "$state/$new") current=$(systemctl is-enabled "$unit" 2>/dev/null) || : case "$current" in masked|masked-runtime) unlink "$state/$new"; exit 0;; esac systemctl daemon-reload || exit 1 case "$enabled" in enabled) systemctl enable "$unit" || exit 1;; enabled-runtime) systemctl enable --runtime "$unit" || exit 1;; masked|masked-runtime) unlink "$state/$new"; exit 0;; esac if [ "$active" = active ]; then systemctl start "$unit" || exit 1; fi unlink "$state/$new" ;; *) exit 1;; esac %changelog * Thu Oct 29 2026 Senemos Maintainers <75160848+MCC45TR@users.noreply.github.com> - 1.91.5-20.fc46 - Build this component independently from its reviewed source recipe.