buildbot: 3.11.3 -> 4.0.0

sometimes takes a while for upstream to publish on pypi so switch to using github source for master, pkg, worker and github releases for the plugins which require built assets
This commit is contained in:
zowoq 2024-06-23 10:41:24 +10:00
parent a58313d535
commit 7244df6927
7 changed files with 50 additions and 64 deletions

View File

@ -47,6 +47,8 @@
- For convenience, the top-level `clang-tools` attribute remains and is now bound to `llvmPackages.clang-tools`.
- Top-level `clang_tools_<version>` attributes are now aliases; these will be removed in a future release.
- `buildbot` was updated to 4.0, the AngularJS frontend has been replaced by a React frontend, see the [upstream release notes](https://docs.buildbot.net/current/manual/upgrading/4.0-upgrade.html).
- `nginx` package no longer includes `gd` and `geoip` dependencies. For enabling it, override `nginx` package with the optionals `withImageFilter` and `withGeoIP`.
- `openssh` and `openssh_hpn` are now compiled without Kerberos 5 / GSSAPI support in an effort to reduce the attack surface of the components for the majority of users. Users needing this support can

View File

@ -14,7 +14,7 @@ import ./make-test-python.nix ({ pkgs, ... }: {
"steps.ShellCommand(command=['bash', 'fakerepo.sh'])"
];
changeSource = [
"changes.GitPoller('git://gitrepo/fakerepo.git', workdir='gitpoller-workdir', branch='master', pollinterval=300)"
"changes.GitPoller('git://gitrepo/fakerepo.git', workdir='gitpoller-workdir', branch='master', pollInterval=300)"
];
};
networking.firewall.allowedTCPPorts = [ 8010 8011 9989 ];

View File

@ -2,7 +2,6 @@
, stdenv
, buildPythonApplication
, fetchFromGitHub
, fetchpatch
, makeWrapper
# Tie withPlugins through the fixed point here, so it will receive an
# overridden version properly
@ -73,7 +72,7 @@ let
in
buildPythonApplication rec {
pname = "buildbot";
version = "3.11.3";
version = "4.0.0";
format = "pyproject";
disabled = pythonOlder "3.8";
@ -82,7 +81,7 @@ buildPythonApplication rec {
owner = "buildbot";
repo = "buildbot";
rev = "v${version}";
hash = "sha256-rDbAWLoEEjygW72YDBsVwiaHdRTVYA9IFxY3XMDleho=";
hash = "sha256-uJj7bSRGdYkA7Jl0qe/DncexWXNfQEEPcqGI7AbwX1w=";
};
build-system = [
@ -137,13 +136,6 @@ 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 = ''
@ -171,8 +163,11 @@ buildPythonApplication rec {
passthru = {
inherit withPlugins;
tests.buildbot = nixosTests.buildbot;
updateScript = ./update.sh;
} // lib.optionalAttrs stdenv.isLinux {
tests = {
inherit (nixosTests) buildbot;
};
};
meta = with lib; {

View File

@ -1,15 +1,11 @@
{ lib, buildPythonPackage, fetchPypi, isPy3k, buildbot }:
{ lib, buildPythonPackage, isPy3k, buildbot }:
buildPythonPackage rec {
buildPythonPackage {
pname = "buildbot_pkg";
inherit (buildbot) version;
src = fetchPypi {
inherit pname version;
hash = "sha256-pO2TmTwbY0cnR+882pl7wDiR6JEK+sHHpAltKmTxiIM=";
};
inherit (buildbot) src version;
postPatch = ''
cd pkg
# Their listdir function filters out `node_modules` folders.
# Do we have to care about that with Nix...?
substituteInPlace buildbot_pkg.py --replace "os.listdir = listdir" ""

View File

@ -1,4 +1,4 @@
{ lib, buildPythonPackage, fetchPypi, callPackage, mock, cairosvg, klein, jinja2, buildbot-pkg }:
{ lib, buildPythonPackage, fetchurl, callPackage, mock, cairosvg, klein, jinja2, buildbot-pkg }:
{
# this is exposed for potential plugins to use and for nix-update
inherit buildbot-pkg;
@ -6,9 +6,9 @@
pname = "buildbot_www";
inherit (buildbot-pkg) version;
src = fetchPypi {
inherit pname version;
hash = "sha256-EL5iZ257VXnL+29Jr6r3PVeURX1AcugfZ4RLTjClsXo=";
src = fetchurl {
url = "https://github.com/buildbot/buildbot/releases/download/v${version}/${pname}-${version}.tar.gz";
hash = "sha256-OzH7ckNL09s4r3f6PIc3q9lLT3NgCdIf0IMwJtwlKiY=";
};
# Remove unnecessary circular dependency on buildbot
@ -33,9 +33,9 @@
pname = "buildbot_www_react";
inherit (buildbot-pkg) version;
src = fetchPypi {
inherit pname version;
hash = "sha256-5QLw5nXnU+z11E5Tgvu9bbbpCTRpV2zXndukcZPRjtE=";
src = fetchurl {
url = "https://github.com/buildbot/buildbot/releases/download/v${version}/${pname}-${version}.tar.gz";
hash = "sha256-lfurzhNJ5DvuPCD/WJ3k+ajuZzhNF6zGOgSuuD0/+Ys=";
};
# Remove unnecessary circular dependency on buildbot
@ -60,9 +60,9 @@
pname = "buildbot_console_view";
inherit (buildbot-pkg) version;
src = fetchPypi {
inherit pname version;
hash = "sha256-tzqifo9A/KJF9dLpO7jblVaDjx7++v0wLz1Olc79JxI=";
src = fetchurl {
url = "https://github.com/buildbot/buildbot/releases/download/v${version}/${pname}-${version}.tar.gz";
hash = "sha256-uKNqnqUkNkd14/6QcquyWp1v59bNWcTB4s8lRO9hkUc=";
};
buildInputs = [ buildbot-pkg ];
@ -82,9 +82,9 @@
pname = "buildbot_react_console_view";
inherit (buildbot-pkg) version;
src = fetchPypi {
inherit pname version;
hash = "sha256-fzaqYmaO+vWnQpUvOsPCny3W27atcIHsgeGV6dKEJeg=";
src = fetchurl {
url = "https://github.com/buildbot/buildbot/releases/download/v${version}/${pname}-${version}.tar.gz";
hash = "sha256-wUrhPbd71F3OfXI5Re1xPnc1/vZxYXxdxX58fnWKjYE=";
};
buildInputs = [ buildbot-pkg ];
@ -104,9 +104,9 @@
pname = "buildbot_waterfall_view";
inherit (buildbot-pkg) version;
src = fetchPypi {
inherit pname version;
hash = "sha256-BLIs91k8/A4LYMTDgct7TOWFoLU4qK47Javr8qRzkZQ=";
src = fetchurl {
url = "https://github.com/buildbot/buildbot/releases/download/v${version}/${pname}-${version}.tar.gz";
hash = "sha256-qc5mP7V2cOR3SOt224i8HVoAyWHvVYbsqfIQvPjesmE=";
};
buildInputs = [ buildbot-pkg ];
@ -126,9 +126,9 @@
pname = "buildbot_react_waterfall_view";
inherit (buildbot-pkg) version;
src = fetchPypi {
inherit pname version;
hash = "sha256-dX+tp+WidfLy612+41jz+do/iXQTaIQPcetG8td3jp4=";
src = fetchurl {
url = "https://github.com/buildbot/buildbot/releases/download/v${version}/${pname}-${version}.tar.gz";
hash = "sha256-s6L4oF/wTOfM9uKFEJ/mjnQWE6oPRcd32lM1p2ox9+I=";
};
buildInputs = [ buildbot-pkg ];
@ -148,9 +148,9 @@
pname = "buildbot_grid_view";
inherit (buildbot-pkg) version;
src = fetchPypi {
inherit pname version;
hash = "sha256-2kLGdvmf2mnF21gkDCf6h+bhnsxveaNNh95qczRY824=";
src = fetchurl {
url = "https://github.com/buildbot/buildbot/releases/download/v${version}/${pname}-${version}.tar.gz";
hash = "sha256-tZRwDqWYjBwguqA6T3ZoY38+QFogXKiTzbg1qjs/spE=";
};
buildInputs = [ buildbot-pkg ];
@ -170,9 +170,9 @@
pname = "buildbot_react_grid_view";
inherit (buildbot-pkg) version;
src = fetchPypi {
inherit pname version;
hash = "sha256-rIAbk9+6Wi1PCjizHp9p6jpCwaBgBT5Ch1Sa4VKDoww=";
src = fetchurl {
url = "https://github.com/buildbot/buildbot/releases/download/v${version}/${pname}-${version}.tar.gz";
hash = "sha256-t++yXEgM4l40grSVccjx399TM/vUTmQOSInfH+Wqi50=";
};
buildInputs = [ buildbot-pkg ];
@ -192,9 +192,9 @@
pname = "buildbot_wsgi_dashboards";
inherit (buildbot-pkg) version;
src = fetchPypi {
inherit pname version;
hash = "sha256-D9mjEKFrh+ytNbpuN/06XbiBnKjFLopXfjDg28j7niw=";
src = fetchurl {
url = "https://github.com/buildbot/buildbot/releases/download/v${version}/${pname}-${version}.tar.gz";
hash = "sha256-MkrMcaf2UeUYjkwcdhj4rhBwEtVESJEMtGa7RArNLz0=";
};
buildInputs = [ buildbot-pkg ];
@ -214,9 +214,9 @@
pname = "buildbot_react_wsgi_dashboards";
inherit (buildbot-pkg) version;
src = fetchPypi {
inherit pname version;
hash = "sha256-q3In0IMAIBUjxSzv4LlH9EJukLYJ3WzoEYkFBZB96W8=";
src = fetchurl {
url = "https://github.com/buildbot/buildbot/releases/download/v${version}/${pname}-${version}.tar.gz";
hash = "sha256-iCAtKOl/8sfCwa3tsK2oQ+ybs0TVF5uWg4Jv/r7oPWg=";
};
buildInputs = [ buildbot-pkg ];
@ -236,9 +236,9 @@
pname = "buildbot_badges";
inherit (buildbot-pkg) version;
src = fetchPypi {
inherit pname version;
hash = "sha256-TK4KYn3CWxymTsKWeqHr2i5rdO9ZDHvJrb9RqfKNJV4=";
src = fetchurl {
url = "https://github.com/buildbot/buildbot/releases/download/v${version}/${pname}-${version}.tar.gz";
hash = "sha256-28vj6wUZEnVUSUWrveJ5tdIjN+l4RDewPnm3IVQPXn4=";
};
buildInputs = [ buildbot-pkg ];

View File

@ -3,8 +3,6 @@
set -eu -o pipefail
nix-update buildbot
nix-update --version=skip buildbot-worker
nix-update --version=skip buildbot-plugins.buildbot-pkg
nix-update --version=skip buildbot-plugins.www
nix-update --version=skip buildbot-plugins.www-react
nix-update --version=skip buildbot-plugins.console-view

View File

@ -1,6 +1,5 @@
{ lib
, buildPythonPackage
, fetchPypi
, buildbot
, stdenv
@ -22,16 +21,12 @@
, nixosTests
}:
buildPythonPackage (rec {
buildPythonPackage ({
pname = "buildbot_worker";
inherit (buildbot) version;
src = fetchPypi {
inherit pname version;
hash = "sha256-TFymBnUufOEWZ/IUKd7nebZ+yl58ZChFkGrUxOXn28g=";
};
inherit (buildbot) src version;
postPatch = ''
cd worker
substituteInPlace buildbot_worker/scripts/logwatcher.py \
--replace /usr/bin/tail "${coreutils}/bin/tail"
'';