buildbot: apply upstream fix for gitpoller

This commit is contained in:
Jörg Thalheim 2024-06-03 12:40:09 +02:00
parent 38cc180bcf
commit eb77fcd0b1
2 changed files with 21 additions and 8 deletions

View File

@ -1,7 +1,8 @@
{ lib
, stdenv
, buildPythonApplication
, fetchPypi
, fetchFromGitHub
, fetchpatch
, makeWrapper
# Tie withPlugins through the fixed point here, so it will receive an
# overridden version properly
@ -77,9 +78,11 @@ buildPythonApplication rec {
disabled = pythonOlder "3.8";
src = fetchPypi {
inherit pname version;
hash = "sha256-qcICSsjcgOrLG8zHBx0eSVSiXDAeHPH4roRZI9TZTkk=";
src = fetchFromGitHub {
owner = "buildbot";
repo = "buildbot";
rev = "v${version}";
hash = "sha256-rDbAWLoEEjygW72YDBsVwiaHdRTVYA9IFxY3XMDleho=";
};
build-system = [
@ -134,10 +137,20 @@ buildPythonApplication rec {
# This patch disables the test that tries to read /etc/os-release which
# is not accessible in sandboxed builds.
./skip_test_linux_distro.patch
# Fix gitpoller, source: https://github.com/buildbot/buildbot/pull/7664
# Included in next release.
(fetchpatch {
url = "https://github.com/buildbot/buildbot/commit/dd5d61e63e3b0740cc538a225ccf104ccecfc734.patch";
sha256 = "sha256-CL6uRaKxh8uCBfWQ0tNiLh2Ym0HVatWni8hcuTyAAw0=";
excludes = ["master/buildbot/test/unit/changes/test_gitpoller.py"];
})
];
postPatch = ''
substituteInPlace buildbot/scripts/logwatcher.py --replace '/usr/bin/tail' "$(type -P tail)"
substituteInPlace master/buildbot/scripts/logwatcher.py --replace '/usr/bin/tail' "$(type -P tail)"
'';
preBuild = ''
cd master
'';
# Silence the depreciation warning from SqlAlchemy

View File

@ -1,6 +1,6 @@
diff -Nur buildbot-0.9.6/buildbot/test/unit/test_buildbot_net_usage_data.py buildbot-0.9.6.patched/buildbot/test/unit/test_buildbot_net_usage_data.py
--- buildbot-0.9.6/buildbot/test/unit/test_buildbot_net_usage_data.py 2017-04-19 16:57:02.000000000 +0200
+++ buildbot-0.9.6.patched/buildbot/test/unit/test_buildbot_net_usage_data.py 2017-05-04 12:22:54.575762551 +0200
diff -Nur buildbot-0.9.6/master/buildbot/test/unit/test_buildbot_net_usage_data.py buildbot-0.9.6.patched/buildbot/test/unit/test_buildbot_net_usage_data.py
--- buildbot-0.9.6/master/buildbot/test/unit/test_buildbot_net_usage_data.py 2017-04-19 16:57:02.000000000 +0200
+++ buildbot-0.9.6.patched/master/buildbot/test/unit/test_buildbot_net_usage_data.py 2017-05-04 12:22:54.575762551 +0200
@@ -147,6 +147,7 @@
_sendBuildbotNetUsageData({'foo': 'bar'})