QA fixes
This commit is contained in:
		
							
								
								
									
										1
									
								
								app-mobilephone/flashlight/Manifest
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								app-mobilephone/flashlight/Manifest
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1 @@
 | 
			
		||||
DIST flashlight-0.1.1.tar.gz 20077 BLAKE2B c9ed29d034c5c7e91a87209236e153afbada4c0e098dba0e0ed8fa0f7b321d3ec693fe198de415031024f4a29437ba2986809f30009c5c09751d7800449a42af SHA512 ed8350bf75f5638c36ba070dee7f5aa0455fcde5ed4ecc63ff7a27578d34e382e16b2998e25898e972b95b5307af58de14b96ee359bedfcee924f9b7e865dcd6
 | 
			
		||||
							
								
								
									
										5
									
								
								app-mobilephone/flashlight/files/60-flashlight.rules
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								app-mobilephone/flashlight/files/60-flashlight.rules
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,5 @@
 | 
			
		||||
#  SPDX-License-Identifier: GPL-3+
 | 
			
		||||
#
 | 
			
		||||
#  This file is part of flashlight.
 | 
			
		||||
 | 
			
		||||
SUBSYSTEM=="leds", KERNEL=="white:flash", ACTION=="add", RUN+="/bin/chmod -R a+w /sys%p"
 | 
			
		||||
							
								
								
									
										2
									
								
								app-mobilephone/flashlight/files/90-flashlight.rules
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								app-mobilephone/flashlight/files/90-flashlight.rules
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,2 @@
 | 
			
		||||
SUBSYSTEM=="leds", ACTION=="add", KERNEL=="white:flash", \
 | 
			
		||||
  RUN+="/bin/chmod 777 /sys/class/leds/%k/brightness"
 | 
			
		||||
							
								
								
									
										37
									
								
								app-mobilephone/flashlight/flashlight-0.1.1-r2.ebuild
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										37
									
								
								app-mobilephone/flashlight/flashlight-0.1.1-r2.ebuild
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,37 @@
 | 
			
		||||
# Copyright 1999-2021 Gentoo Authors
 | 
			
		||||
# Distributed under the terms of the GNU General Public License v2
 | 
			
		||||
 | 
			
		||||
EAPI=7
 | 
			
		||||
 | 
			
		||||
inherit meson gnome2-utils udev xdg-utils
 | 
			
		||||
 | 
			
		||||
MY_COMMIT="f5feb4b3d17bbf16171d716bbb8e28f3a84542ef"
 | 
			
		||||
 | 
			
		||||
DESCRIPTION="It's a flashlight, what do you expect?"
 | 
			
		||||
HOMEPAGE="https://gitlab.com/a-wai/flashlight.git"
 | 
			
		||||
SRC_URI="https://gitlab.com/a-wai/flashlight/-/archive/${MY_COMMIT}.tar.gz -> ${P}.tar.gz"
 | 
			
		||||
 | 
			
		||||
LICENSE="GPL-2"
 | 
			
		||||
SLOT="0"
 | 
			
		||||
KEYWORDS="~amd64 ~arm64"
 | 
			
		||||
 | 
			
		||||
RDEPEND="x11-libs/gtk+"
 | 
			
		||||
BDEPEND="dev-lang/python-exec[native-symlinks]"
 | 
			
		||||
 | 
			
		||||
S="${WORKDIR}/${PN}-${MY_COMMIT}"
 | 
			
		||||
 | 
			
		||||
src_install() {
 | 
			
		||||
	meson_src_install
 | 
			
		||||
	udev_dorules "${FILESDIR}/60-flashlight.rules"
 | 
			
		||||
	mv "${D}/usr/share/appdata" "${D}/usr/share/metainfo" || die
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
pkg_postinst() {
 | 
			
		||||
	gnome2_schemas_update
 | 
			
		||||
	xdg_desktop_database_update
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
pkg_postrm() {
 | 
			
		||||
	gnome2_schemas_update
 | 
			
		||||
	xdg_icon_cache_update
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										5
									
								
								app-mobilephone/flashlight/metadata.xml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								app-mobilephone/flashlight/metadata.xml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,5 @@
 | 
			
		||||
<?xml version='1.0' encoding='UTF-8'?>
 | 
			
		||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
 | 
			
		||||
<pkgmetadata>
 | 
			
		||||
	<!-- maintainer-needed -->
 | 
			
		||||
</pkgmetadata>
 | 
			
		||||
							
								
								
									
										8
									
								
								app-mobilephone/pinephone-meta/metadata.xml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								app-mobilephone/pinephone-meta/metadata.xml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,8 @@
 | 
			
		||||
<?xml version='1.0' encoding='UTF-8'?>
 | 
			
		||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
 | 
			
		||||
<pkgmetadata>
 | 
			
		||||
	<!-- maintainer-needed -->
 | 
			
		||||
	<use>
 | 
			
		||||
		<flag name="eg25-manager">Enable eg25 modem manager</flag>
 | 
			
		||||
	</use>
 | 
			
		||||
</pkgmetadata>
 | 
			
		||||
							
								
								
									
										26
									
								
								app-mobilephone/pinephone-meta/pinephone-meta-0.2.ebuild
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										26
									
								
								app-mobilephone/pinephone-meta/pinephone-meta-0.2.ebuild
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,26 @@
 | 
			
		||||
# Copyright 1999-2021 Gentoo Authors
 | 
			
		||||
# Distributed under the terms of the GNU General Public License v2
 | 
			
		||||
 | 
			
		||||
EAPI=7
 | 
			
		||||
 | 
			
		||||
inherit systemd udev
 | 
			
		||||
 | 
			
		||||
DESCRIPTION="Meta-package for installing phosh on pinephone"
 | 
			
		||||
HOMEPAGE="https://gitlab.manjaro.org/manjaro-arm/packages/community/phosh/pinephone-manjaro-tweaks.git"
 | 
			
		||||
 | 
			
		||||
LICENSE="GPL-3"
 | 
			
		||||
SLOT="0"
 | 
			
		||||
KEYWORDS="~arm64"
 | 
			
		||||
IUSE="+eg25-manager"
 | 
			
		||||
 | 
			
		||||
RDEPEND="
 | 
			
		||||
	app-mobilephone/pinephone-modem-scripts
 | 
			
		||||
	app-mobilephone/usb-tethering
 | 
			
		||||
	gnome-extra/iio-sensor-proxy
 | 
			
		||||
	gui-wm/phosh-meta
 | 
			
		||||
	media-libs/alsa-ucm-pinephone
 | 
			
		||||
	media-tv/v4l-utils
 | 
			
		||||
	net-misc/eg25-manager
 | 
			
		||||
	sys-firmware/pinephone-firmware
 | 
			
		||||
	x11-themes/sound-theme-librem5
 | 
			
		||||
"
 | 
			
		||||
							
								
								
									
										5
									
								
								app-mobilephone/usb-tethering/files/dhcpd.conf
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								app-mobilephone/usb-tethering/files/dhcpd.conf
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,5 @@
 | 
			
		||||
option domain-name-servers 8.8.8.8, 8.8.4.4;
 | 
			
		||||
option subnet-mask 255.255.255.0;
 | 
			
		||||
subnet 10.15.19.0 netmask 255.255.255.0 {
 | 
			
		||||
  range 10.15.19.100 10.15.19.254;
 | 
			
		||||
}
 | 
			
		||||
@@ -0,0 +1,9 @@
 | 
			
		||||
[Service]
 | 
			
		||||
PIDFile=/run/danctnix/dhcpd4.pid
 | 
			
		||||
 | 
			
		||||
# We need to fix this ASAP, dhcpd won't run with dhcp user, this needs
 | 
			
		||||
# to be investigated.
 | 
			
		||||
User=root
 | 
			
		||||
 | 
			
		||||
ExecStart=
 | 
			
		||||
ExecStart=/usr/bin/dhcpd -4 -q -cf /etc/danctnix/dhcpd.conf -pf /run/danctnix/dhcpd4.pid -lf /run/danctnix/dhcpd4.lease
 | 
			
		||||
@@ -0,0 +1,2 @@
 | 
			
		||||
d /run/danctnix 0755 root root
 | 
			
		||||
f /run/danctnix/dhcpd4.lease 0644 root root
 | 
			
		||||
							
								
								
									
										77
									
								
								app-mobilephone/usb-tethering/files/usb-tethering
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										77
									
								
								app-mobilephone/usb-tethering/files/usb-tethering
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,77 @@
 | 
			
		||||
#!/bin/sh
 | 
			
		||||
 | 
			
		||||
# ConfigFS script is taken from postmarketOS
 | 
			
		||||
# https://postmarketos.org
 | 
			
		||||
 | 
			
		||||
# These are very important, it defines what is the device:
 | 
			
		||||
 | 
			
		||||
deviceinfo_usb_idVendor="0x1F3A"
 | 
			
		||||
deviceinfo_usb_idProduct="0xEFE8"
 | 
			
		||||
deviceinfo_manufacturer="DanctNIX"
 | 
			
		||||
deviceinfo_name="Arch Linux Mobile"
 | 
			
		||||
 | 
			
		||||
# We'll let them know that this device is Arch ARM.
 | 
			
		||||
deviceinfo_usb_serialnumber="Arch"
 | 
			
		||||
 | 
			
		||||
setup_usb_network_configfs() {
 | 
			
		||||
	# See: https://www.kernel.org/doc/Documentation/usb/gadget_configfs.txt
 | 
			
		||||
	CONFIGFS=/sys/kernel/config/usb_gadget/
 | 
			
		||||
 | 
			
		||||
	if ! [ -e "$CONFIGFS" ]; then
 | 
			
		||||
		echo "  $CONFIGFS does not exist, skipping configfs usb gadget"
 | 
			
		||||
		return
 | 
			
		||||
	fi
 | 
			
		||||
 | 
			
		||||
	# Default values for USB-related deviceinfo variables
 | 
			
		||||
	usb_idVendor="${deviceinfo_usb_idVendor:-0x18D1}"   # default: Google Inc.
 | 
			
		||||
	usb_idProduct="${deviceinfo_usb_idProduct:-0xD001}" # default: Nexus 4 (fastboot)
 | 
			
		||||
	usb_serialnumber="${deviceinfo_usb_serialnumber:-postmarketOS}"
 | 
			
		||||
	usb_rndis_function="${deviceinfo_usb_rndis_function:-rndis.usb0}"
 | 
			
		||||
 | 
			
		||||
	echo "  Setting up an USB gadget through configfs"
 | 
			
		||||
	# Create an usb gadet configuration
 | 
			
		||||
	mkdir $CONFIGFS/g1 || echo "  Couldn't create $CONFIGFS/g1"
 | 
			
		||||
	echo "$usb_idVendor"  > "$CONFIGFS/g1/idVendor"
 | 
			
		||||
	echo "$usb_idProduct" > "$CONFIGFS/g1/idProduct"
 | 
			
		||||
 | 
			
		||||
	# Create english (0x409) strings
 | 
			
		||||
	mkdir $CONFIGFS/g1/strings/0x409 || echo "  Couldn't create $CONFIGFS/g1/strings/0x409"
 | 
			
		||||
 | 
			
		||||
	# shellcheck disable=SC2154
 | 
			
		||||
	echo "$deviceinfo_manufacturer" > "$CONFIGFS/g1/strings/0x409/manufacturer"
 | 
			
		||||
	echo "$usb_serialnumber"        > "$CONFIGFS/g1/strings/0x409/serialnumber"
 | 
			
		||||
	# shellcheck disable=SC2154
 | 
			
		||||
	echo "$deviceinfo_name"         > "$CONFIGFS/g1/strings/0x409/product"
 | 
			
		||||
 | 
			
		||||
	# Create rndis function. The function can be named differently in downstream kernels.
 | 
			
		||||
	mkdir $CONFIGFS/g1/functions/"$usb_rndis_function" \
 | 
			
		||||
		|| echo "  Couldn't create $CONFIGFS/g1/functions/$usb_rndis_function"
 | 
			
		||||
 | 
			
		||||
	# Create configuration instance for the gadget
 | 
			
		||||
	mkdir $CONFIGFS/g1/configs/c.1 \
 | 
			
		||||
		|| echo "  Couldn't create $CONFIGFS/g1/configs/c.1"
 | 
			
		||||
	mkdir $CONFIGFS/g1/configs/c.1/strings/0x409 \
 | 
			
		||||
		|| echo "  Couldn't create $CONFIGFS/g1/configs/c.1/strings/0x409"
 | 
			
		||||
	echo "rndis" > $CONFIGFS/g1/configs/c.1/strings/0x409/configuration \
 | 
			
		||||
		|| echo "  Couldn't write configration name"
 | 
			
		||||
 | 
			
		||||
	# Link the rndis instance to the configuration
 | 
			
		||||
	ln -s $CONFIGFS/g1/functions/"$usb_rndis_function" $CONFIGFS/g1/configs/c.1 \
 | 
			
		||||
		|| echo "  Couldn't symlink $usb_rndis_function"
 | 
			
		||||
 | 
			
		||||
	# Check if there's an USB Device Controller
 | 
			
		||||
	if [ -z "$(ls /sys/class/udc)" ]; then
 | 
			
		||||
		echo "  No USB Device Controller available"
 | 
			
		||||
		return
 | 
			
		||||
	fi
 | 
			
		||||
 | 
			
		||||
	# Link the gadget instance to an USB Device Controller. This activates the gadget.
 | 
			
		||||
	# See also: https://github.com/postmarketOS/pmbootstrap/issues/338
 | 
			
		||||
	# shellcheck disable=SC2005
 | 
			
		||||
	echo "$(ls /sys/class/udc)" > $CONFIGFS/g1/UDC || echo "  Couldn't write UDC"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
# And we go.
 | 
			
		||||
setup_usb_network_configfs
 | 
			
		||||
ip address add 10.15.19.82/24 dev usb0
 | 
			
		||||
ip link set usb0 up
 | 
			
		||||
							
								
								
									
										12
									
								
								app-mobilephone/usb-tethering/files/usb-tethering.service
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								app-mobilephone/usb-tethering/files/usb-tethering.service
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,12 @@
 | 
			
		||||
# systemd service file for usb-tethering
 | 
			
		||||
 | 
			
		||||
[Unit]
 | 
			
		||||
Wants=dhcpd4.service
 | 
			
		||||
Description=USB Tethering
 | 
			
		||||
 | 
			
		||||
[Service]
 | 
			
		||||
Type=oneshot
 | 
			
		||||
ExecStart=/bin/bash /usr/lib/danctnix/usb-tethering
 | 
			
		||||
 | 
			
		||||
[Install]
 | 
			
		||||
WantedBy=multi-user.target
 | 
			
		||||
							
								
								
									
										5
									
								
								app-mobilephone/usb-tethering/metadata.xml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								app-mobilephone/usb-tethering/metadata.xml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,5 @@
 | 
			
		||||
<?xml version='1.0' encoding='UTF-8'?>
 | 
			
		||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
 | 
			
		||||
<pkgmetadata>
 | 
			
		||||
	<!-- maintainer-needed -->
 | 
			
		||||
</pkgmetadata>
 | 
			
		||||
							
								
								
									
										33
									
								
								app-mobilephone/usb-tethering/usb-tethering-0.1.ebuild
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										33
									
								
								app-mobilephone/usb-tethering/usb-tethering-0.1.ebuild
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,33 @@
 | 
			
		||||
# Copyright 1999-2021 Gentoo Authors
 | 
			
		||||
# Distributed under the terms of the GNU General Public License v2
 | 
			
		||||
 | 
			
		||||
EAPI=7
 | 
			
		||||
 | 
			
		||||
inherit systemd
 | 
			
		||||
 | 
			
		||||
DESCRIPTION="USB tethering on Pine64/ConfigFS systems"
 | 
			
		||||
HOMEPAGE="https://github.com/dreemurrs-embedded/Pine64-Arch"
 | 
			
		||||
 | 
			
		||||
LICENSE="GPL-2+"
 | 
			
		||||
SLOT="0"
 | 
			
		||||
KEYWORDS="~arm64"
 | 
			
		||||
 | 
			
		||||
DEPEND="
 | 
			
		||||
	net-misc/dhcp
 | 
			
		||||
	sys-apps/systemd
 | 
			
		||||
"
 | 
			
		||||
RDEPEND="${DEPEND}"
 | 
			
		||||
 | 
			
		||||
S="${WORKDIR}"
 | 
			
		||||
 | 
			
		||||
src_install() {
 | 
			
		||||
	exeinto "/usr/lib/danctnix"
 | 
			
		||||
	doexe "${FILESDIR}/usb-tethering"
 | 
			
		||||
	systemd_dounit "${FILESDIR}"/usb-tethering.service
 | 
			
		||||
	insinto "/usr/lib/tmpfiles.d/"
 | 
			
		||||
	doins "${FILESDIR}"/tmpfiles.d.danctnix-usb.conf
 | 
			
		||||
	insinto "/etc/systemd/system/dhcpd4.service.d/"
 | 
			
		||||
	doins "${FILESDIR}"/dhcpd4.service-customexec.conf
 | 
			
		||||
	insinto "/etc/danctnix/"
 | 
			
		||||
	doins "${FILESDIR}"/dhcpd.conf
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user