Remove system76 packages. Use khoverlay instead.

This commit is contained in:
Sravan Balaji
2024-09-15 19:39:25 -04:00
parent 11b7567805
commit 666a835901
10 changed files with 0 additions and 394 deletions

View File

@@ -1,37 +0,0 @@
# Copyright 2020-2023 Bryan Gardiner <bog@khumba.net>
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit linux-mod-r1 git-r3
DESCRIPTION="System76 ACPI Driver"
HOMEPAGE="https://github.com/pop-os/system76-acpi-dkms"
EGIT_REPO_URI="https://github.com/pop-os/system76-acpi-dkms.git"
EGIT_BRANCH="master"
EGIT_CHECKOUT_DIR="${WORKDIR}/${PN}"
EGIT_SUBMODULES=( '*' )
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64"
RDEPEND=""
DEPEND="${RDEPEND}"
S="${WORKDIR}/${PN}"
src_compile() {
local modlist=( "system76_acpi=misc" )
local modargs=( "KERNEL_DIR=${KERNEL_DIR}" )
linux-mod-r1_src_compile
}
src_install() {
linux-mod-r1_src_install
insinto /lib/udev/hwdb.d
doins lib/udev/hwdb.d/*
}

View File

@@ -1,2 +0,0 @@
system76-io
system76-thelio-io

View File

@@ -1 +0,0 @@
system76-io

View File

@@ -1,42 +0,0 @@
# Copyright 2020-2022 Bryan Gardiner <bog@khumba.net>
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit linux-mod-r1 git-r3
DESCRIPTION="System76 I/O Board Driver"
HOMEPAGE="https://github.com/pop-os/system76-io-dkms"
EGIT_REPO_URI="https://github.com/pop-os/system76-io-dkms.git"
EGIT_BRANCH="master"
EGIT_CHECKOUT_DIR="${WORKDIR}/${PN}"
EGIT_SUBMODULES=( '*' )
LICENSE="GPL-2+"
SLOT="0"
KEYWORDS="~amd64"
RDEPEND=""
DEPEND="${RDEPEND}"
S="${WORKDIR}/${PN}"
src_compile() {
local modlist=( "system76-io=misc" "system76-thelio-io=misc" )
local modargs=( "KERNEL_DIR=${KERNEL_DIR}" )
linux-mod-r1_src_compile
}
src_install() {
linux-mod-r1_src_install
# The system76-io module is present and loaded on Pop!_OS for darp6
# in 2020, but it doesn't seem to load on its own on Gentoo. So we
# install a file to ask it to load.
#
# Not sure about system76-thelio-io, but let's have it autoload too.
insinto /usr/lib/modules-load.d
newins "${FILESDIR}/system76-io+thelio.conf" system76-io.conf
}

View File

@@ -1,41 +0,0 @@
# Copyright 2020-2023 Bryan Gardiner <bog@khumba.net>
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit linux-info linux-mod-r1 git-r3
DESCRIPTION="System76 Driver"
HOMEPAGE="https://github.com/pop-os/system76-dkms"
EGIT_REPO_URI="https://github.com/pop-os/system76-dkms.git"
EGIT_BRANCH="master"
EGIT_CHECKOUT_DIR="${WORKDIR}/${PN}"
EGIT_SUBMODULES=( '*' )
LICENSE="GPL-2+"
SLOT="0"
KEYWORDS="~amd64"
RDEPEND=""
DEPEND="${RDEPEND}"
S="${WORKDIR}/${PN}"
CONFIG_CHECK="
ACPI_WMI
"
src_compile() {
local modlist=( "system76=misc" )
local modargs=( "KERNEL_DIR=${KERNEL_DIR}" )
linux-mod-r1_src_compile
}
src_install() {
linux-mod-r1_src_install
insinto /lib/udev/hwdb.d
doins lib/udev/hwdb.d/*
}

View File

@@ -1,53 +0,0 @@
From bc9b94cbabf2fbb119fc7facd684f2d265c84ce9 Mon Sep 17 00:00:00 2001
From: Bryan Gardiner <bog@khumba.net>
Date: Fri, 11 Sep 2020 18:52:15 -0700
Subject: [PATCH] Patches for Gentoo.
---
debian/system76-driver.service | 2 +-
system76-nm-restart | 2 +-
system76-user-daemon.desktop | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/debian/system76-driver.service b/debian/system76-driver.service
index e0915dd..4890ac0 100644
--- a/debian/system76-driver.service
+++ b/debian/system76-driver.service
@@ -2,7 +2,7 @@
Description=System76 airplane-mode hotkey and LED support
[Service]
-ExecStart=/usr/lib/system76-driver/system76-daemon
+ExecStart=/usr/bin/system76-daemon
Restart=on-failure
[Install]
diff --git a/system76-nm-restart b/system76-nm-restart
index 444b99d..54df9ce 100755
--- a/system76-nm-restart
+++ b/system76-nm-restart
@@ -33,7 +33,7 @@ set -e
if [ "$2" = "suspend" ] || [ "$2" = "hybrid-sleep" ]; then
case "$1" in
pre) true ;;
- post) sleep 1 && sudo systemctl restart NetworkManager ;;
+ post) sleep 1 && systemctl restart NetworkManager ;;
esac
fi
diff --git a/system76-user-daemon.desktop b/system76-user-daemon.desktop
index 5df120d..cad8b3f 100644
--- a/system76-user-daemon.desktop
+++ b/system76-user-daemon.desktop
@@ -3,7 +3,7 @@ Type=Application
Encoding=UTF-8
Name=System76 User Daemon
Comment=Make backlight work on GNOME with NVIDIA 9-Series hardware
-Exec=/usr/lib/system76-driver/system76-user-daemon
+Exec=/usr/bin/system76-user-daemon
Terminal=false
Icon=folder
NoDisplay=true
--
2.37.4

View File

@@ -1,21 +0,0 @@
From: Bryan Gardiner <bog@khumba.net>
Date: 2024-01-25
Portage builds packages with a custom TMPDIR. The tests need updating not to
expect /tmp.
diff --git a/system76driver/tests/test_util.py b/system76driver/tests/test_util.py
index c2be570..7689e25 100644
--- a/system76driver/tests/test_util.py
+++ b/system76driver/tests/test_util.py
@@ -36,7 +36,9 @@ class TestFunctions(TestCase):
SubProcess.reset(mocking=False)
(tmp, tgz) = util.create_tmp_logs(func=None)
self.assertTrue(path.isdir(tmp))
- self.assertTrue(tmp.startswith('/tmp/logs.'))
+ self.assertTrue(tmp.startswith(
+ (os.environ.get('TMPDIR') or '/tmp') + '/logs.'
+ ))
self.assertEqual(
sorted(os.listdir(tmp)),
['system76-logs', 'system76-logs.tgz'],

View File

@@ -1,12 +0,0 @@
#!/sbin/openrc-run
description="System76 airplane-mode hotkey and LED support"
command=/usr/bin/system76-daemon
command_background=true
pidfile=/run/system76-driver.pid
output_log=/var/log/system76-driver.out
error_log=/var/log/system76-driver.err
depend() {
need dbus
}

View File

@@ -1,151 +0,0 @@
# Copyright 2020-2024 Bryan Gardiner <bog@khumba.net>
# Distributed under the terms of the GNU General Public License v2
# Source: https://data.gpo.zugaina.org/khoverlay/sys-apps/system76-driver/
EAPI=8
PYTHON_COMPAT=( python3_{11..13} )
DISTUTILS_SINGLE_IMPL=1
DISTUTILS_USE_PEP517=setuptools
inherit distutils-r1 systemd virtualx git-r3
DESCRIPTION="Universal driver for System76 computers"
HOMEPAGE="https://github.com/pop-os/system76-driver"
EGIT_REPO_URI="https://github.com/pop-os/system76-driver.git"
EGIT_BRANCH="master"
EGIT_CHECKOUT_DIR="${WORKDIR}/${PN}"
EGIT_SUBMODULES=( '*' )
S="${WORKDIR}/${PN}"
LICENSE="GPL-2+"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="
bluetooth
elogind
lm-sensors
+modules
networkmanager
+suspend-workarounds
systemd
video_cards_nvidia
"
REQUIRED_USE="
${PYTHON_REQUIRED_USE}
suspend-workarounds? ( ^^ ( systemd elogind ) )
"
# We skip the Debian package's hard dependency on system76-wallpapers.
# It's only used for gsettings overrides, which we don't install anyway.
# x11-themes/system76-wallpapers can be installed separately if desired.
#
# We also skip depending on python-systemd. Upstream declares a
# dependency on python3-systemd in debian/control, but looking at the
# code, actual use of the package appears to have been added with the
# dependency in 18.04.23, and then removed without dropping the
# dependency in 18.10.3.
RDEPEND="
${PYTHON_DEPS}
$(python_gen_cond_dep 'dev-python/dbus-python[${PYTHON_USEDEP}]')
$(python_gen_cond_dep 'dev-python/evdev[${PYTHON_USEDEP}]')
$(python_gen_cond_dep 'dev-python/pygobject:3[${PYTHON_USEDEP}]')
$(python_gen_cond_dep 'dev-python/distro[${PYTHON_USEDEP}]')
net-wireless/wireless-tools
lm-sensors? ( sys-apps/lm-sensors )
sys-process/at
x11-apps/xbacklight
modules? (
app-laptop/system76-acpi-module
app-laptop/system76-io-module
app-laptop/system76-module
)
suspend-workarounds? (
elogind? ( sys-auth/elogind )
systemd? ( sys-apps/systemd )
bluetooth? ( sys-apps/util-linux )
networkmanager? ( net-misc/networkmanager )
)
video_cards_nvidia? ( x11-drivers/nvidia-drivers )
"
DEPEND="${RDEPEND}"
PATCHES=(
"${FILESDIR}/system76-driver-20.04.69-gentoo.patch"
"${FILESDIR}/system76-driver-20.04.85-test-tmpdir.patch"
)
distutils_enable_tests setup.py
src_test() {
virtx distutils-r1_src_test
}
src_install() {
distutils-r1_src_install
# See system76-driver.git/debian/system76-driver.install.
python_doscript "${S}/system76-daemon"
python_doscript "${S}/system76-user-daemon"
insinto /usr/share/polkit-1/actions
doins "${S}/com.system76.pkexec.system76-driver.policy"
insinto /etc/xdg/autostart
doins "${S}/system76-user-daemon.desktop"
if use suspend-workarounds; then
local utildir
if use systemd; then
utildir=$(systemd_get_utildir) || die "Couldn't read systemd utildir."
elif use elogind; then
utildir=$(get_libdir)/elogind || die "Couldn't read system libdir."
else
die "Unknown configuration for suspend-workarounds."
fi
exeinto "${utildir}/system-sleep"
doexe "${S}/system76-thunderbolt-reload"
doexe "${S}/system76-virtual-hub"
if use bluetooth; then
doexe "${S}/lib/systemd/system-sleep/system76-driver_bluetooth-suspend"
fi
if use networkmanager; then
doexe "${S}/system76-nm-restart"
fi
fi
systemd_dounit "${S}/debian/system76-driver.service"
newinitd "${FILESDIR}/${PN}.openrc" "${PN}"
}
pkg_postinst() {
if [[ -z ${REPLACING_VERSIONS} ]]; then
elog "Run system76-driver or system76-driver-cli as root to apply settings for"
elog "your specific System76 hardware. system76-driver launches a GTK+ UI where"
elog "you can see which actions will be taken. system76-driver-cli runs entirely"
elog "from the command line and prints out actions taken, but does not ask for"
elog "confirmation."
elog ""
elog " # system76-driver-cli"
elog ""
elog "You may want to run the System76 daemon to enable further hardware support"
elog "and fixes:"
elog ""
elog " # systemctl enable --now system76-driver.service (systemd)"
elog " # rc-update add system76-driver default (OpenRC)"
elog ""
elog "This message is only displayed the first time system76-driver is installed."
elif ! use suspend-workarounds && ! use systemd; then
local ver
for ver in ${REPLACING_VERSIONS}; do
if ver_test "${ver}" -lt 20.04.90; then
elog "Starting with version 20.04.90, the system76-driver ebuild supports"
elog "USE=suspend-workarounds via elogind, not only systemd. If you are an"
elog "elogind user, consider enabling the suspend workarounds for better"
elog "support of your System76 hardware."
break
fi
done
fi
}

View File

@@ -1,34 +0,0 @@
# Copyright 2022-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
CRATES="
"
inherit cargo git-r3
DESCRIPTION="System76 Power Management"
HOMEPAGE="https://github.com/pop-os/system76-power"
SRC_URI="$(cargo_crate_uris ${CRATES})"
EGIT_REPO_URI="https://github.com/pop-os/system76-power.git"
LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64"
S="${WORKDIR}/${P}"
DEPEND=""
RDEPEND="${DEPEND}"
BDEPEND=""
src_unpack(){
x86_64-pc-linux-gnu-gcc -v
git-r3_src_unpack
cargo_live_src_unpack
}
src_install(){
default
}