Compare commits
No commits in common. "64c8952d4345f55e1550894b36bb239b1c5b419c" and "25865dab672d9962d76acae8b4d58b96cc85f50c" have entirely different histories.
64c8952d43
...
25865dab67
@ -1,50 +0,0 @@
|
||||
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
|
||||
|
@ -1,95 +1,59 @@
|
||||
# Copyright 1999-2024 Gentoo Authors
|
||||
# Copyright 1999-2022 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
PYTHON_COMPAT=( python3_{10..12} )
|
||||
|
||||
inherit cmake optfeature python-any-r1 xdg
|
||||
inherit xdg cmake optfeature
|
||||
|
||||
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"
|
||||
EGIT_REPO_URI="https://github.com/raspberrypi/${PN}.git"
|
||||
else
|
||||
SRC_URI="https://github.com/raspberrypi/rpi-imager/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
SRC_URI="https://github.com/raspberrypi/${PN}/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
|
||||
CMAKE_USE_DIR="${S}/src"
|
||||
|
||||
BDEPEND="
|
||||
dev-qt/linguist-tools
|
||||
"
|
||||
RDEPEND="
|
||||
app-arch/libarchive:=
|
||||
app-arch/xz-utils
|
||||
net-libs/gnutls:=
|
||||
net-misc/curl
|
||||
!qt6? (
|
||||
app-arch/libarchive
|
||||
dev-qt/qtconcurrent:5
|
||||
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/qtsvg:5
|
||||
dev-qt/qtwidgets:5
|
||||
)
|
||||
qt6? (
|
||||
dev-qt/qtbase:6[dbus,gui,network,widgets]
|
||||
dev-qt/qtdeclarative:6
|
||||
dev-qt/qtxml:5
|
||||
net-misc/curl
|
||||
sys-fs/udisks:2
|
||||
|| (
|
||||
dev-libs/openssl
|
||||
net-libs/gnutls
|
||||
)
|
||||
"
|
||||
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}]
|
||||
')
|
||||
)
|
||||
"
|
||||
|
||||
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
|
||||
optfeature "writing to disk as non-root user" sys-fs/udisks
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user