Package Details: gnome-shell-extension-cpupower-git r198.e2320e9-2

Git Clone URL: https://aur.archlinux.org/gnome-shell-extension-cpupower-git.git (read-only, click to copy)
Package Base: gnome-shell-extension-cpupower-git
Description: Gnome-Shell Extension for intel-pstate driver
Upstream URL: https://github.com/martin31821/cpupower
Licenses: GPL3
Submitter: m3thodic
Maintainer: m3thodic
Last Packager: m3thodic
Votes: 3
Popularity: 0.015509
First Submitted: 2017-03-06 19:47
Last Updated: 2020-09-18 22:53

Latest Comments

Cervox commented on 2020-10-06 14:01

This extension breaks on 3.38 at the time of writing. Until the developers themselves can you please add in the patch found in here? https://github.com/martin31821/cpupower/issues/135

Rodolpheh commented on 2020-05-16 12:35

It seems that the latest version changed the polkit rule and is now asking for permission to run the installer.sh script as root. It seems that the rules must now be in /usr/share/polkit-1/rules.d and the cpufreqctl tool must be in /usr/bin or /usr/local/bin. I tried to change the PKGBUILD myself but apparently I don't have the proper skills. Would your be kind enough to fix it ?

EDIT: I think I was heavily mistaken on the polkit rules and actions. Hang on, I think I'll get to it...

EDIT2: This is what I came up with :

package() {
        cd $_gitname

        _extid="cpupower@mko-sl.de"
        _extpath="${pkgdir}/usr/share/gnome-shell/extensions/${_extid}"

        DIR="/usr/share/gnome-shell/extensions/cpupower@mko-sl.de"
        CFC="/usr/bin/cpufreqctl"
        POLICY="mko.cpupower.setcpufreq"

        SCHEMADIR="${pkgdir}/usr/share/glib-2.0/schemas"

        ACTION_IN="${_extpath}/data/mko.cpupower.policy.in"
        ACTION_DIR="${pkgdir}/usr/share/polkit-1/actions"
        ACTION_OUT="${ACTION_DIR}/${POLICY}.policy"

        RULE_IN="${_extpath}/data/10-mko.cpupower.setcpufreq.rules"
        RULE_DIR="${pkgdir}/usr/share/polkit-1/rules.d"
        RULE_OUT="${RULE_DIR}/10-mko.cpupower.setcpufreq.rules"

        install -dm755 "${_extpath}"
        cp -a * "${_extpath}"

        # INSTALLING CPUFREQCTL
        echo "Installing cpufreqctl tool..."
        mkdir -p "${pkgdir}/usr/bin"
        cp -a "tool/cpufreqctl" "${pkgdir}/${CFC}"

        # INSTALLING POLKIT ACTION
        echo "Installing policykit action..."
        mkdir -p "${ACTION_DIR}"
        sed -e "s:{{PATH}}:${CFC}:g" -e "s:{{ID}}:${POLICY}:g" "${ACTION_IN}" > "${ACTION_OUT}"

        # INSTALLING POLICYKIT RULE
        echo "Installing policykit rule..."
        mkdir -p "${RULE_DIR}"
        chmod 750 "${RULE_DIR}"
        cp "${RULE_IN}" "${RULE_OUT}"
        chmod 644 "${RULE_OUT}"

        # INSTALLING SCHEMA
        echo "Installing schema..."
        mkdir -p "${SCHEMADIR}"
        cp schemas/org.gnome.shell.extensions.cpupower.gschema.xml "${SCHEMADIR}"
}

I think it's a little bit dirty but it works for me. If someone could have a second look on it before using it, that would be perfect.

uno20001 commented on 2020-04-06 16:32

I found that modifying the package() part of the PKGBUILD file like this:

package() {
    cd $_gitname
    make PREFIX="$pkgdir/usr" install
}

solves the building problem.

oconnor663 commented on 2020-04-06 14:20

I've started seeing an error building this package:

==> Starting package()...
chown: cannot access '/home/jacko/.cache/yay/gnome-shell-extension-cpupower-git/pkg/gnome-shell-extension-cpupower-git//usr/share/gnome-shell/extensions/cpupower@mko-sl.de/src/cpufreqctl': No such file or directory
==> ERROR: A failure occurred in package().

It looks like the failure bisects to this upstream commit:

commit e89b71174f369137eaf03dc1b61039dce200008f
Author: Fin Christensen <christensen.fin@gmail.com>
Date:   Mon Mar 30 12:39:37 2020 +0200

    Add Makefile and adjust installation according to #102, #84, #95