Merge staging-next into staging
This commit is contained in:
@@ -0,0 +1,84 @@
|
||||
From 55d499f4cd5667c04c21f7201d7f10484e187907 Mon Sep 17 00:00:00 2001
|
||||
From: Florian Klink <flokli@flokli.de>
|
||||
Date: Sun, 27 Dec 2020 13:03:12 +0100
|
||||
Subject: [PATCH] unit/test-dbus: pick up dbus-daemon from $PATH
|
||||
|
||||
This allows running the unit tests in environments where `dbus-daemon`
|
||||
isn't in /usr/bin, but in $PATH.
|
||||
|
||||
Signed-off-by: Florian Klink <flokli@flokli.de>
|
||||
---
|
||||
unit/test-dbus-message-fds.c | 4 ++--
|
||||
unit/test-dbus-properties.c | 4 ++--
|
||||
unit/test-dbus.c | 4 ++--
|
||||
3 files changed, 6 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/unit/test-dbus-message-fds.c b/unit/test-dbus-message-fds.c
|
||||
index 6f68bae..4b5662e 100644
|
||||
--- a/unit/test-dbus-message-fds.c
|
||||
+++ b/unit/test-dbus-message-fds.c
|
||||
@@ -51,7 +51,7 @@ static bool start_dbus_daemon(void)
|
||||
char *prg_envp[1];
|
||||
pid_t pid;
|
||||
|
||||
- prg_argv[0] = "/usr/bin/dbus-daemon";
|
||||
+ prg_argv[0] = "dbus-daemon";
|
||||
prg_argv[1] = "--nopidfile";
|
||||
prg_argv[2] = "--nofork";
|
||||
prg_argv[3] = "--config-file=" UNITDIR "dbus.conf";
|
||||
@@ -68,7 +68,7 @@ static bool start_dbus_daemon(void)
|
||||
}
|
||||
|
||||
if (pid == 0) {
|
||||
- execve(prg_argv[0], prg_argv, prg_envp);
|
||||
+ execvpe(prg_argv[0], prg_argv, prg_envp);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
diff --git a/unit/test-dbus-properties.c b/unit/test-dbus-properties.c
|
||||
index b435062..049f0f4 100644
|
||||
--- a/unit/test-dbus-properties.c
|
||||
+++ b/unit/test-dbus-properties.c
|
||||
@@ -49,7 +49,7 @@ static bool start_dbus_daemon(void)
|
||||
char *prg_envp[1];
|
||||
pid_t pid;
|
||||
|
||||
- prg_argv[0] = "/usr/bin/dbus-daemon";
|
||||
+ prg_argv[0] = "dbus-daemon";
|
||||
prg_argv[1] = "--nopidfile";
|
||||
prg_argv[2] = "--nofork";
|
||||
prg_argv[3] = "--config-file=" UNITDIR "dbus.conf";
|
||||
@@ -66,7 +66,7 @@ static bool start_dbus_daemon(void)
|
||||
}
|
||||
|
||||
if (pid == 0) {
|
||||
- execve(prg_argv[0], prg_argv, prg_envp);
|
||||
+ execvpe(prg_argv[0], prg_argv, prg_envp);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
diff --git a/unit/test-dbus.c b/unit/test-dbus.c
|
||||
index 67f0a7b..582847e 100644
|
||||
--- a/unit/test-dbus.c
|
||||
+++ b/unit/test-dbus.c
|
||||
@@ -45,7 +45,7 @@ static void start_dbus_daemon(void)
|
||||
char *prg_envp[1];
|
||||
pid_t pid;
|
||||
|
||||
- prg_argv[0] = "/usr/bin/dbus-daemon";
|
||||
+ prg_argv[0] = "dbus-daemon";
|
||||
prg_argv[1] = "--nopidfile";
|
||||
prg_argv[2] = "--nofork";
|
||||
prg_argv[3] = "--config-file=" UNITDIR "dbus.conf";
|
||||
@@ -62,7 +62,7 @@ static void start_dbus_daemon(void)
|
||||
}
|
||||
|
||||
if (pid == 0) {
|
||||
- execve(prg_argv[0], prg_argv, prg_envp);
|
||||
+ execvpe(prg_argv[0], prg_argv, prg_envp);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
--
|
||||
2.29.2
|
||||
|
||||
@@ -12,13 +12,14 @@ stdenv.mkDerivation rec {
|
||||
outputs = [ "out" "dev" ];
|
||||
|
||||
src = fetchgit {
|
||||
url = "https://git.kernel.org/pub/scm/libs/${pname}/${pname}.git";
|
||||
rev = version;
|
||||
sha256 = "16z7xwlrpx1bsr2y1rgxxxixzwc84cwn2g557iqxhwsxfzy6q3dk";
|
||||
url = "https://git.kernel.org/pub/scm/libs/${pname}/${pname}.git";
|
||||
rev = version;
|
||||
sha256 = "16z7xwlrpx1bsr2y1rgxxxixzwc84cwn2g557iqxhwsxfzy6q3dk";
|
||||
};
|
||||
|
||||
patches = [
|
||||
./fix-dbus-tests.patch
|
||||
# Sent upstream in https://lists.01.org/hyperkitty/list/ell@lists.01.org/thread/SQEZAIS2LZXSXGTXOW3GTAM5ZPXRLTN4/
|
||||
./0001-unit-test-dbus-pick-up-dbus-daemon-from-PATH.patch
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
||||
@@ -1,65 +0,0 @@
|
||||
--- a/Makefile.am
|
||||
+++ b/Makefile.am
|
||||
@@ -140,6 +140,7 @@
|
||||
ell_libell_private_la_SOURCES = $(ell_libell_la_SOURCES)
|
||||
|
||||
AM_CFLAGS = -fvisibility=hidden -DUNITDIR=\""$(top_srcdir)/unit/"\" \
|
||||
+ -DDBUS_DAEMON=\""$(DBUS_DAEMONDIR)/dbus-daemon"\" \
|
||||
-DCERTDIR=\""$(top_builddir)/unit/"\"
|
||||
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -14,6 +14,8 @@
|
||||
|
||||
AC_PREFIX_DEFAULT(/usr/local)
|
||||
|
||||
+PKG_PROG_PKG_CONFIG
|
||||
+
|
||||
COMPILER_FLAGS
|
||||
|
||||
AC_LANG_C
|
||||
@@ -131,6 +133,10 @@
|
||||
AC_CHECK_PROG(have_xxd, [xxd], [yes], [no])
|
||||
fi
|
||||
|
||||
+PKG_CHECK_MODULES(DBUS, dbus-1, dummy=yes,
|
||||
+ AC_MSG_ERROR(D-Bus is required for running tests))
|
||||
+PKG_CHECK_VAR(DBUS_DAEMONDIR, dbus-1, daemondir)
|
||||
+
|
||||
AM_CONDITIONAL(DBUS_TESTS, test "${little_endian}" = "yes")
|
||||
AM_CONDITIONAL(CERT_TESTS, test "${have_openssl}" = "yes")
|
||||
|
||||
--- a/unit/test-dbus-message-fds.c
|
||||
+++ b/unit/test-dbus-message-fds.c
|
||||
@@ -51,7 +51,7 @@
|
||||
char *prg_envp[1];
|
||||
pid_t pid;
|
||||
|
||||
- prg_argv[0] = "/usr/bin/dbus-daemon";
|
||||
+ prg_argv[0] = DBUS_DAEMON;
|
||||
prg_argv[1] = "--nopidfile";
|
||||
prg_argv[2] = "--nofork";
|
||||
prg_argv[3] = "--config-file=" UNITDIR "dbus.conf";
|
||||
--- a/unit/test-dbus-properties.c
|
||||
+++ b/unit/test-dbus-properties.c
|
||||
@@ -48,7 +48,7 @@
|
||||
char *prg_envp[1];
|
||||
pid_t pid;
|
||||
|
||||
- prg_argv[0] = "/usr/bin/dbus-daemon";
|
||||
+ prg_argv[0] = DBUS_DAEMON;
|
||||
prg_argv[1] = "--nopidfile";
|
||||
prg_argv[2] = "--nofork";
|
||||
prg_argv[3] = "--config-file=" UNITDIR "dbus.conf";
|
||||
--- a/unit/test-dbus.c
|
||||
+++ b/unit/test-dbus.c
|
||||
@@ -45,7 +45,7 @@
|
||||
char *prg_envp[1];
|
||||
pid_t pid;
|
||||
|
||||
- prg_argv[0] = "/usr/bin/dbus-daemon";
|
||||
+ prg_argv[0] = DBUS_DAEMON;
|
||||
prg_argv[1] = "--nopidfile";
|
||||
prg_argv[2] = "--nofork";
|
||||
prg_argv[3] = "--config-file=" UNITDIR "dbus.conf";
|
||||
@@ -2,22 +2,22 @@
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "raspberrypi-wireless-firmware";
|
||||
version = "2019-08-16";
|
||||
version = "2020-12-01";
|
||||
|
||||
srcs = [
|
||||
(fetchFromGitHub {
|
||||
name = "bluez-firmware";
|
||||
owner = "RPi-Distro";
|
||||
repo = "bluez-firmware";
|
||||
rev = "96eefffcccc725425fd83be5e0704a5c32b79e54";
|
||||
sha256 = "05h57gcxhb2c84h99cyxxx4mzi6kd5fm8pjqkz3nq5vs3nv8cqhr";
|
||||
rev = "1e4ee0c05bae10002124b56c0e44bb9ac6581ddc";
|
||||
sha256 = "10n6ibr3ra71f4hlvbpy8csjlgrapawxrr6jmijn470vkcqcpq27";
|
||||
})
|
||||
(fetchFromGitHub {
|
||||
name = "firmware-nonfree";
|
||||
owner = "RPi-Distro";
|
||||
repo = "firmware-nonfree";
|
||||
rev = "130cb86fa30cafbd575d38865fa546350d4c5f9c";
|
||||
sha256 = "0jmhgbpldzz8n8lncpzwfl5ym8zgss05y952rfpwcf9v5c7vgabx";
|
||||
rev = "b66ab26cebff689d0d3257f56912b9bb03c20567";
|
||||
sha256 = "0cffgsp0w7vv7ylpymdddx0bl9dx3pl7snlh30p4rr9srmn8869f";
|
||||
})
|
||||
];
|
||||
|
||||
@@ -41,10 +41,10 @@ stdenv.mkDerivation {
|
||||
|
||||
outputHashMode = "recursive";
|
||||
outputHashAlgo = "sha256";
|
||||
outputHash = "1r4alf1fbj6vkkf54d0anm47ymb6gn2ykl4a2hhd34b0hnf1dnhn";
|
||||
outputHash = "17k9y499kjc4zv7ivnsfrgfibwj0ldr3sqdgia4dackbr70jfg2h";
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Firmware for builtin Wifi/Bluetooth devices in the Raspberry Pi 3 and Zero W";
|
||||
description = "Firmware for builtin Wifi/Bluetooth devices in the Raspberry Pi 3+ and Zero W";
|
||||
homepage = "https://github.com/RPi-Distro/firmware-nonfree";
|
||||
license = licenses.unfreeRedistributableFirmware;
|
||||
platforms = platforms.linux;
|
||||
|
||||
@@ -1,14 +1,15 @@
|
||||
{ stdenv, fetchFromGitHub }:
|
||||
{ stdenvNoCC, fetchFromGitHub }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
stdenvNoCC.mkDerivation rec {
|
||||
# NOTE: this should be updated with linux_rpi
|
||||
pname = "raspberrypi-firmware";
|
||||
version = "1.20201022";
|
||||
version = "1.20201201";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "raspberrypi";
|
||||
repo = "firmware";
|
||||
rev = version;
|
||||
sha256 = "0j5m50cmmr11m3h8kk89j1pqkdqr7mzdzg04ayiqvfhvy32qqlg8";
|
||||
sha256 = "09yha3k72yqx29rwnv2j2zm73lzc4jgmcbmcc6yrl1i07x84lx3n";
|
||||
};
|
||||
|
||||
installPhase = ''
|
||||
@@ -16,9 +17,11 @@ stdenv.mkDerivation rec {
|
||||
cp -R boot/* $out/share/raspberrypi/boot
|
||||
'';
|
||||
|
||||
dontConfigure = true;
|
||||
dontBuild = true;
|
||||
dontFixup = true;
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with stdenvNoCC.lib; {
|
||||
description = "Firmware for the Raspberry Pi board";
|
||||
homepage = "https://github.com/raspberrypi/firmware";
|
||||
license = licenses.unfreeRedistributableFirmware; # See https://github.com/raspberrypi/firmware/blob/master/boot/LICENCE.broadcom
|
||||
|
||||
@@ -1,37 +0,0 @@
|
||||
{ stdenv, fetchFromGitHub, fetchpatch, cmake, pkgconfig }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "raspberrypi-tools";
|
||||
version = "2020-05-28";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "raspberrypi";
|
||||
repo = "userland";
|
||||
rev = "f97b1af1b3e653f9da2c1a3643479bfd469e3b74";
|
||||
sha256 = "1r7n05rv96hqjq0rn0qzchmfqs0j7vh3p8jalgh66s6l0vms5mwy";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake pkgconfig ];
|
||||
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
# https://github.com/raspberrypi/userland/pull/670
|
||||
url = "https://github.com/raspberrypi/userland/pull/670/commits/37cb44f314ab1209fe2a0a2449ef78893b1e5f62.patch";
|
||||
sha256 = "1fbrbkpc4cc010ji8z4ll63g17n6jl67kdy62m74bhlxn72gg9rw";
|
||||
})
|
||||
];
|
||||
|
||||
preConfigure = ''
|
||||
cmakeFlagsArray+=("-DVMCS_INSTALL_PREFIX=$out")
|
||||
'' + stdenv.lib.optionalString stdenv.isAarch64 ''
|
||||
cmakeFlagsArray+=("-DARM64=1")
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Userland tools for the Raspberry Pi board";
|
||||
homepage = "https://github.com/raspberrypi/userland";
|
||||
license = licenses.bsd3;
|
||||
platforms = [ "x86_64-linux" "armv6l-linux" "armv7l-linux" "aarch64-linux" ];
|
||||
maintainers = with maintainers; [ dezgeg tavyc ];
|
||||
};
|
||||
}
|
||||
@@ -21,7 +21,8 @@ stdenv.mkDerivation rec {
|
||||
sha256 = "0gzpdgfwzlqj2n3amf2zhi2hlpa412878yphgx79y6b5gn1y1lm2";
|
||||
};
|
||||
|
||||
outputs = [ "out" "man" "test" ];
|
||||
outputs = [ "out" "man" ]
|
||||
++ stdenv.lib.optional (stdenv.hostPlatform == stdenv.buildPlatform) "test";
|
||||
|
||||
nativeBuildInputs = [
|
||||
autoreconfHook
|
||||
@@ -38,7 +39,9 @@ stdenv.mkDerivation rec {
|
||||
|
||||
checkInputs = [ openssl ];
|
||||
|
||||
pythonPath = [
|
||||
# wrapPython wraps the scripts in $test. They pull in gobject-introspection,
|
||||
# which doesn't cross-compile.
|
||||
pythonPath = stdenv.lib.optionals (stdenv.hostPlatform == stdenv.buildPlatform) [
|
||||
python3Packages.dbus-python
|
||||
python3Packages.pygobject3
|
||||
];
|
||||
@@ -61,11 +64,12 @@ stdenv.mkDerivation rec {
|
||||
doCheck = true;
|
||||
|
||||
postInstall = ''
|
||||
mkdir -p $test/bin
|
||||
cp -a test/* $test/bin/
|
||||
mkdir -p $out/share
|
||||
cp -a doc $out/share/
|
||||
cp -a README AUTHORS TODO $out/share/doc/
|
||||
'' + stdenv.lib.optionalString (stdenv.hostPlatform == stdenv.buildPlatform) ''
|
||||
mkdir -p $test/bin
|
||||
cp -a test/* $test/bin/
|
||||
'';
|
||||
|
||||
preFixup = ''
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
{ stdenv, lib, buildPackages, fetchFromGitHub, perl, buildLinux, rpiVersion, ... } @ args:
|
||||
|
||||
let
|
||||
modDirVersion = "4.19.118";
|
||||
tag = "1.20200601";
|
||||
# NOTE: raspberrypifw & raspberryPiWirelessFirmware should be updated with this
|
||||
modDirVersion = "5.4.79";
|
||||
tag = "1.20201201";
|
||||
in
|
||||
lib.overrideDerivation (buildLinux (args // {
|
||||
version = "${modDirVersion}-${tag}";
|
||||
@@ -12,7 +13,7 @@ lib.overrideDerivation (buildLinux (args // {
|
||||
owner = "raspberrypi";
|
||||
repo = "linux";
|
||||
rev = "raspberrypi-kernel_${tag}-1";
|
||||
sha256 = "11jzsmnd1qry2ir9vmsv0nfdzjpgkn5yab5ylxcz406plc073anp";
|
||||
sha256 = "093p5kh5f27djkhbcw371w079lhhihvg3s4by3wzsd40di4fcgn9";
|
||||
};
|
||||
|
||||
defconfig = {
|
||||
@@ -22,6 +23,11 @@ lib.overrideDerivation (buildLinux (args // {
|
||||
"4" = "bcm2711_defconfig";
|
||||
}.${toString rpiVersion};
|
||||
|
||||
extraConfig = ''
|
||||
# ../drivers/pci/controller/pcie-altera.c:679:8: error: too few arguments to function 'devm_of_pci_get_host_bridge_resources'
|
||||
PCIE_ALTERA n
|
||||
'';
|
||||
|
||||
features = {
|
||||
efiBootStub = false;
|
||||
} // (args.features or {});
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
{ stdenvNoCC, lib, fetchFromGitHub, makeWrapper
|
||||
, python3, binutils-unwrapped, findutils, kmod, pciutils, raspberrypi-tools
|
||||
, python3, binutils-unwrapped, findutils, kmod, pciutils, libraspberrypi
|
||||
}:
|
||||
stdenvNoCC.mkDerivation {
|
||||
pname = "raspberrypi-eeprom";
|
||||
version = "unstable-2020-10-05";
|
||||
version = "2020-12-11";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "raspberrypi";
|
||||
repo = "rpi-eeprom";
|
||||
rev = "718820bcebd21d4a619fa262d9b9cf3acbf110f8";
|
||||
sha256 = "1277jsiyv34dqpandva8kxy1s0y5ql344pl9gk84avzp1mqjnv4g";
|
||||
rev = "54a9796abbee59067bff9da6b90c1014178f2c21";
|
||||
sha256 = "0yp7bn444n6yisp4hiblrm00rrvrf213amzb4sh96mlb5nhxspqk";
|
||||
};
|
||||
|
||||
buildInputs = [ python3 ];
|
||||
@@ -35,7 +35,7 @@ stdenvNoCC.mkDerivation {
|
||||
patchShebangs $out/bin
|
||||
wrapProgram $out/bin/rpi-eeprom-update \
|
||||
--set FIRMWARE_ROOT $out/share/rpi-eeprom \
|
||||
${lib.optionalString stdenvNoCC.isAarch64 "--set VCMAILBOX ${raspberrypi-tools}/bin/vcmailbox"} \
|
||||
${lib.optionalString stdenvNoCC.isAarch64 "--set VCMAILBOX ${libraspberrypi}/bin/vcmailbox"} \
|
||||
--prefix PATH : "${lib.makeBinPath ([
|
||||
binutils-unwrapped
|
||||
findutils
|
||||
@@ -43,7 +43,7 @@ stdenvNoCC.mkDerivation {
|
||||
pciutils
|
||||
(placeholder "out")
|
||||
] ++ lib.optionals stdenvNoCC.isAarch64 [
|
||||
raspberrypi-tools
|
||||
libraspberrypi
|
||||
])}"
|
||||
'';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user