diff options
author | V3n3RiX <venerix@koprulu.sector> | 2024-08-23 11:25:16 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2024-08-23 11:25:16 +0100 |
commit | fe3d2116cb34a0d53731a11169d988e205a4a603 (patch) | |
tree | d10b72e92f2d2bfa85ffde7e493a061e0387fb69 | |
parent | 734c0b98b5e4839eb033e2ee2b8b89bda2568027 (diff) |
sys-boot/rpi-imager : new package
6 files changed, 207 insertions, 0 deletions
diff --git a/metadata/md5-cache/sys-boot/rpi-imager-1.8.5 b/metadata/md5-cache/sys-boot/rpi-imager-1.8.5 new file mode 100644 index 00000000..df1ef04d --- /dev/null +++ b/metadata/md5-cache/sys-boot/rpi-imager-1.8.5 @@ -0,0 +1,17 @@ +BDEPEND=!qt6? ( dev-qt/linguist-tools ) test? ( || ( dev-lang/python:3.13 dev-lang/python:3.12 dev-lang/python:3.11 dev-lang/python:3.10 ) || ( ( dev-lang/python:3.13 dev-python/jsonschema[python_targets_python3_13(-)] dev-python/pytest[python_targets_python3_13(-)] dev-python/urllib3[python_targets_python3_13(-)] ) ( dev-lang/python:3.12 dev-python/jsonschema[python_targets_python3_12(-)] dev-python/pytest[python_targets_python3_12(-)] dev-python/urllib3[python_targets_python3_12(-)] ) ( dev-lang/python:3.11 dev-python/jsonschema[python_targets_python3_11(-)] dev-python/pytest[python_targets_python3_11(-)] dev-python/urllib3[python_targets_python3_11(-)] ) ( dev-lang/python:3.10 dev-python/jsonschema[python_targets_python3_10(-)] dev-python/pytest[python_targets_python3_10(-)] dev-python/urllib3[python_targets_python3_10(-)] ) ) ) app-alternatives/ninja >=dev-build/cmake-3.20.5 +DEFINED_PHASES=compile configure install postinst postrm preinst prepare setup test +DEPEND=app-arch/libarchive:= app-arch/xz-utils net-libs/gnutls:= net-misc/curl !qt6? ( dev-qt/qtcore:5 dev-qt/qtdbus:5 dev-qt/qtdeclarative:5 dev-qt/qtgui:5 dev-qt/qtnetwork:5 dev-qt/qtquickcontrols2:5 dev-qt/qtwidgets:5 ) qt6? ( dev-qt/qtbase:6[dbus,gui,network,widgets] dev-qt/qtdeclarative:6 ) !qt6? ( dev-qt/qtsvg:5 ) qt6? ( dev-qt/qtsvg:6 ) +DESCRIPTION=Raspberry Pi Imaging Utility +EAPI=8 +HOMEPAGE=https://github.com/raspberrypi/rpi-imager +IDEPEND=dev-util/desktop-file-utils x11-misc/shared-mime-info +INHERIT=cmake optfeature python-any-r1 xdg +IUSE=qt6 +filter-drivelist test +KEYWORDS=~amd64 +LICENSE=Apache-2.0 +RDEPEND=app-arch/libarchive:= app-arch/xz-utils net-libs/gnutls:= net-misc/curl !qt6? ( dev-qt/qtcore:5 dev-qt/qtdbus:5 dev-qt/qtdeclarative:5 dev-qt/qtgui:5 dev-qt/qtnetwork:5 dev-qt/qtquickcontrols2:5 dev-qt/qtwidgets:5 ) qt6? ( dev-qt/qtbase:6[dbus,gui,network,widgets] dev-qt/qtdeclarative:6 ) +RESTRICT=test !test? ( test ) +SLOT=0 +SRC_URI=https://github.com/raspberrypi/rpi-imager/archive/v1.8.5.tar.gz -> rpi-imager-1.8.5.tar.gz +_eclasses_=cmake 10a50dfaf728b802fcfd37f8d0da9056 flag-o-matic e503ea5acc20410237ba33ec3f7c857d multilib c19072c3cd7ac5cb21de013f7e9832e0 multiprocessing 30ead54fa2e2b5f9cd4e612ffc34d0fe ninja-utils 2df4e452cea39a9ec8fb543ce059f8d6 optfeature 222cb475c5a4f7ae7cfb0bf510a6fe54 python-any-r1 5af215c3da6aef17a2d5e02968df1d5a python-utils-r1 6881b056477c23167d9a6b33e146374e toolchain-funcs 333970c740aa7b1a92e4fcdc52f612bd xdg 4a14c5c24f121e7da66e5aab4a168c6e xdg-utils baea6080dd821f5562d715887954c9d3 +_md5_=149246d82a1dc27f2ad1c9c5c531a237 diff --git a/metadata/pkg_desc_index b/metadata/pkg_desc_index index b62cbb28..417de6cd 100644 --- a/metadata/pkg_desc_index +++ b/metadata/pkg_desc_index @@ -54,6 +54,7 @@ sys-boot/etcher 1.19.21: Flash OS images to SD cards & USB drives, safely and ea sys-boot/grub 2.04-r15: GNU GRUB boot loader sys-boot/os-prober 1.77-r10: Utility to detect other OSs on a set of drives sys-boot/plymouth 0.9.4-r11: Graphical boot animation (splash) and logger +sys-boot/rpi-imager 1.8.5: Raspberry Pi Imaging Utility sys-boot/unetbootin-static 625-r5: Universal Netboot Installer creates Live USB systems for various OS distributions sys-fs/cryptsetup 2.6.1-r5: Tool to setup encrypted devices with dm-crypt sys-fs/gocryptfs 2.0.1-r1: Encrypted overlay filesystem written in Go diff --git a/sys-boot/rpi-imager/Manifest b/sys-boot/rpi-imager/Manifest new file mode 100644 index 00000000..5b7690b7 --- /dev/null +++ b/sys-boot/rpi-imager/Manifest @@ -0,0 +1 @@ +DIST rpi-imager-1.8.5.tar.gz 22455707 BLAKE2B a3268674a9d8345c23b765beef041404185eb31a25cefc2adee0d6de7910aa526c1b1f0073e4fd959ae3aa04764c9890355835295dab40149d07e37b0869a890 SHA512 574d4310234344be7502ecb6e01802f658455bc329a8080c88173c020c3e291478f5145b45c9ed68136ff1dafbaf8b842de2f8f086888cab806e931660f1d3b8 diff --git a/sys-boot/rpi-imager/files/1.7.3-move-DRIVELIST_FILTER_SYSTEM_DRIVES-to-cmake-arg.patch b/sys-boot/rpi-imager/files/1.7.3-move-DRIVELIST_FILTER_SYSTEM_DRIVES-to-cmake-arg.patch new file mode 100644 index 00000000..d7e151bd --- /dev/null +++ b/sys-boot/rpi-imager/files/1.7.3-move-DRIVELIST_FILTER_SYSTEM_DRIVES-to-cmake-arg.patch @@ -0,0 +1,37 @@ +# Expose drivelist filtering as cmake variable + +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -134,6 +134,17 @@ else() + add_definitions(-DTELEMETRY_ENABLED_DEFAULT=false) + endif() + ++if(DEFINED DRIVELIST_FILTER_SYSTEM_DRIVES) ++ if(DRIVELIST_FILTER_SYSTEM_DRIVES) ++ # Hide system drives from list ++ add_definitions(-DDRIVELIST_FILTER_SYSTEM_DRIVES=true) ++ else() ++ add_definitions(-DDRIVELIST_FILTER_SYSTEM_DRIVES=false) ++ endif() ++else() ++ add_definitions(-DDRIVELIST_FILTER_SYSTEM_DRIVES=true) ++endif() ++ + if(ENABLE_CHECK_VERSION) + add_definitions(-DCHECK_VERSION_DEFAULT=true) + else() +--- a/src/config.h ++++ b/src/config.h +@@ -19,9 +19,6 @@ + /* Hash algorithm for verifying (uncompressed image) checksum */ + #define OSLIST_HASH_ALGORITHM QCryptographicHash::Sha256 + +-/* Hide system drives from list */ +-#define DRIVELIST_FILTER_SYSTEM_DRIVES true +- + /* Update progressbar every 0.1 second */ + #define PROGRESS_UPDATE_INTERVAL 100 + +-- +2.38.2 + diff --git a/sys-boot/rpi-imager/files/rpi-imager-1.8.5-expose-DRIVELIST_FILTER_SYSTEM_DRIVES.patch b/sys-boot/rpi-imager/files/rpi-imager-1.8.5-expose-DRIVELIST_FILTER_SYSTEM_DRIVES.patch new file mode 100644 index 00000000..0935599f --- /dev/null +++ b/sys-boot/rpi-imager/files/rpi-imager-1.8.5-expose-DRIVELIST_FILTER_SYSTEM_DRIVES.patch @@ -0,0 +1,50 @@ +https://github.com/raspberrypi/rpi-imager/commit/a44b9ae85601a0bf9317c8717813fd0e6ac14d3e +https://github.com/raspberrypi/rpi-imager/pull/816 +https://github.com/raspberrypi/rpi-imager/issues/534 +https://gitlab.com/src_prepare/src_prepare-overlay/-/merge_requests/343 + +From a44b9ae85601a0bf9317c8717813fd0e6ac14d3e Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?MrSm=C3=B6r?= <66489839+MrSmoer@users.noreply.github.com> +Date: Fri, 9 Feb 2024 11:08:00 +0100 +Subject: [PATCH] Exposing 'DRIVELIST_FILTER_SYSTEM_DRIVES' as a cmake variable + +Makes the filtering-behaviour userconfigureable during compile-time. +This way its easier to configure the imager for flashing SATA or NVME +Drives installed in your system (because of lack of adapters), +or if the drives are (accidentally) labled as systemdrives by drivelist. +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -4,6 +4,7 @@ + cmake_minimum_required(VERSION 3.9.4) + OPTION (ENABLE_CHECK_VERSION "Check for version updates" ON) + OPTION (ENABLE_TELEMETRY "Enable sending telemetry" ON) ++OPTION (DRIVELIST_FILTER_SYSTEM_DRIVES "Filter System drives from displayed drives" ON) + + project(rpi-imager LANGUAGES CXX C) + set(IMAGER_VERSION_MAJOR 1) +@@ -164,6 +165,13 @@ else() + add_definitions(-DCHECK_VERSION_DEFAULT=false) + endif() + ++if(DRIVELIST_FILTER_SYSTEM_DRIVES) ++ # Hide system drives from list ++ add_definitions(-DDRIVELIST_FILTER_SYSTEM_DRIVES=true) ++else() ++ add_definitions(-DDRIVELIST_FILTER_SYSTEM_DRIVES=false) ++endif() ++ + # Because dependencies are typically not available by default on Windows, build bundled code + if (WIN32) + # Target Windows 7 (needed for drivelist module) +--- a/src/config.h ++++ b/src/config.h +@@ -19,9 +19,6 @@ + /* Hash algorithm for verifying (uncompressed image) checksum */ + #define OSLIST_HASH_ALGORITHM QCryptographicHash::Sha256 + +-/* Hide system drives from list */ +-#define DRIVELIST_FILTER_SYSTEM_DRIVES true +- + /* Update progressbar every 0.1 second */ + #define PROGRESS_UPDATE_INTERVAL 100 + diff --git a/sys-boot/rpi-imager/rpi-imager-1.8.5.ebuild b/sys-boot/rpi-imager/rpi-imager-1.8.5.ebuild new file mode 100644 index 00000000..86c25ee0 --- /dev/null +++ b/sys-boot/rpi-imager/rpi-imager-1.8.5.ebuild @@ -0,0 +1,101 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..13} ) + +inherit cmake optfeature python-any-r1 xdg + +DESCRIPTION="Raspberry Pi Imaging Utility" +HOMEPAGE="https://github.com/raspberrypi/rpi-imager" + +if [[ "${PV}" == *9999* ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/raspberrypi/rpi-imager.git" +else + SRC_URI="https://github.com/raspberrypi/rpi-imager/archive/v${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64" +fi + +LICENSE="Apache-2.0" +SLOT="0" +IUSE="qt6 +filter-drivelist test" +RESTRICT="test !test? ( test )" # requires network and extra permissions to write + +RDEPEND=" + app-arch/libarchive:= + app-arch/xz-utils + net-libs/gnutls:= + net-misc/curl + !qt6? ( + dev-qt/qtcore:5 + dev-qt/qtdbus:5 + dev-qt/qtdeclarative:5 + dev-qt/qtgui:5 + dev-qt/qtnetwork:5 + dev-qt/qtquickcontrols2:5 + dev-qt/qtwidgets:5 + ) + qt6? ( + dev-qt/qtbase:6[dbus,gui,network,widgets] + dev-qt/qtdeclarative:6 + ) +" +DEPEND=" + ${RDEPEND} + !qt6? ( + dev-qt/qtsvg:5 + ) + qt6? ( + dev-qt/qtsvg:6 + ) +" +BDEPEND=" + !qt6? ( dev-qt/linguist-tools ) + test? ( + ${PYTHON_DEPS} + $(python_gen_any_dep ' + dev-python/jsonschema[${PYTHON_USEDEP}] + dev-python/pytest[${PYTHON_USEDEP}] + dev-python/urllib3[${PYTHON_USEDEP}] + ') + ) +" + +PATCHES=( + #https://github.com/raspberrypi/rpi-imager/pull/816 + "${FILESDIR}/rpi-imager-1.8.5-expose-DRIVELIST_FILTER_SYSTEM_DRIVES.patch" +) + +CMAKE_USE_DIR="${S}/src" + +python_check_deps() { + python_has_version "dev-python/jsonschema[${PYTHON_USEDEP}]" \ + && python_has_version "dev-python/pytest[${PYTHON_USEDEP}]" \ + && python_has_version "dev-python/urllib3[${PYTHON_USEDEP}]" +} + +pkg_setup() { + use test && python-any-r1_pkg_setup +} + +src_configure() { + local mycmakeargs=( + -DENABLE_CHECK_VERSION=OFF + -DENABLE_TELEMETRY=OFF + -DDRIVELIST_FILTER_SYSTEM_DRIVES=$(usex filter-drivelist) + $(cmake_use_find_package !qt6 Qt5) + ) + + cmake_src_configure +} + +src_test() { + epytest tests +} + +pkg_postinst() { + xdg_pkg_postinst + optfeature "writing to disk as non-root user" sys-fs/udisks:2 +} |