multipass: remove unmaintained package and module

This commit is contained in:
Adam C. Stephens
2025-11-29 10:55:19 -05:00
parent 2a6c26188b
commit 71cb937c51
16 changed files with 4 additions and 518 deletions
-1
View File
@@ -1945,7 +1945,6 @@
./virtualisation/libvirtd.nix
./virtualisation/lxc.nix
./virtualisation/lxcfs.nix
./virtualisation/multipass.nix
./virtualisation/nixos-containers.nix
./virtualisation/oci-containers.nix
./virtualisation/oci-options.nix
+3
View File
@@ -441,6 +441,9 @@ in
to periodically collect random data from the device and mix it
into the kernel's RNG.
'')
(mkRemovedOptionModule [ "virtualisation" "multipass" ] ''
virtualisation.multipass has been removed since it was unmaintained in nixpkgs
'')
# Do NOT add any option renames here, see top of the file
];
}
@@ -1,66 +0,0 @@
{
config,
lib,
pkgs,
...
}:
let
cfg = config.virtualisation.multipass;
in
{
options = {
virtualisation.multipass = {
enable = lib.mkEnableOption "Multipass, a simple manager for virtualised Ubuntu instances";
logLevel = lib.mkOption {
type = lib.types.enum [
"error"
"warning"
"info"
"debug"
"trace"
];
default = "debug";
description = ''
The logging verbosity of the multipassd binary.
'';
};
package = lib.mkPackageOption pkgs "multipass" { };
};
};
config = lib.mkIf cfg.enable {
environment.systemPackages = [ cfg.package ];
systemd.services.multipass = {
description = "Multipass orchestrates virtual Ubuntu instances.";
wantedBy = [ "multi-user.target" ];
wants = [ "network-online.target" ];
after = [ "network-online.target" ];
environment = {
"XDG_DATA_HOME" = "/var/lib/multipass/data";
"XDG_CACHE_HOME" = "/var/lib/multipass/cache";
"XDG_CONFIG_HOME" = "/var/lib/multipass/config";
};
serviceConfig = {
ExecStart = "${cfg.package}/bin/multipassd --logger platform --verbosity ${cfg.logLevel}";
SyslogIdentifier = "multipassd";
Restart = "on-failure";
TimeoutStopSec = 300;
Type = "simple";
WorkingDirectory = "/var/lib/multipass";
StateDirectory = "multipass";
StateDirectoryMode = "0750";
CacheDirectory = "multipass";
CacheDirectoryMode = "0750";
};
};
};
}
-1
View File
@@ -983,7 +983,6 @@ in
mpd = runTest ./mpd.nix;
mpv = runTest ./mpv.nix;
mtp = runTest ./mtp.nix;
multipass = runTest ./multipass.nix;
mumble = runTest ./mumble.nix;
munge = runTest ./munge.nix;
munin = runTest ./munin.nix;
-39
View File
@@ -1,39 +0,0 @@
{ pkgs, lib, ... }:
let
multipass-image = import ../release.nix {
configuration = {
# Building documentation makes the test unnecessarily take a longer time:
documentation.enable = lib.mkForce false;
};
};
in
{
name = "multipass";
meta.maintainers = [ ];
nodes.machine =
{ lib, ... }:
{
virtualisation = {
cores = 1;
memorySize = 1024;
diskSize = 4096;
multipass.enable = true;
};
};
testScript = ''
machine.wait_for_unit("sockets.target")
machine.wait_for_unit("multipass.service")
machine.wait_for_file("/var/lib/multipass/data/multipassd/network/multipass_subnet")
# Wait for Multipass to settle
machine.sleep(1)
machine.succeed("multipass list")
'';
}
@@ -1,13 +0,0 @@
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 52bd407f..a1100112 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -28,7 +28,7 @@ FetchContent_Declare(googletest
)
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
set(INSTALL_GTEST OFF CACHE BOOL "")
-FetchContent_MakeAvailable(googletest)
+# FetchContent_MakeAvailable(googletest)
add_executable(multipass_tests
blueprint_test_lambdas.cpp
@@ -1,14 +0,0 @@
diff --git a/src/cert/CMakeLists.txt b/src/cert/CMakeLists.txt
index d44a0b09..de440f24 100644
--- a/src/cert/CMakeLists.txt
+++ b/src/cert/CMakeLists.txt
@@ -22,7 +22,7 @@ add_library(cert STATIC
target_include_directories(cert PRIVATE
${OPENSSL_INCLUDE_DIR})
-foreach(flag -Wno-nested-anon-types -Wno-gnu -Wno-pedantic -Wno-ignored-qualifiers)
+foreach(flag -Wno-nested-anon-types -Wno-gnu -Wno-pedantic -Wno-ignored-qualifiers -Wno-ignored-attributes)
check_cxx_compiler_flag(${flag} SUPPORTED)
if(SUPPORTED)
target_compile_options(cert PRIVATE ${flag})
-83
View File
@@ -1,83 +0,0 @@
{
commonMeta,
multipass_src,
multipassd,
version,
autoPatchelfHook,
flutter332,
gtkmm3,
keybinder3,
lib,
libayatana-appindicator,
libnotify,
protobuf,
protoc-gen-dart,
qt6,
}:
flutter332.buildFlutterApplication {
inherit version;
pname = "multipass-gui";
src = multipass_src;
sourceRoot = "${multipass_src.name}/src/client/gui";
pubspecLock = lib.importJSON ./pubspec.lock.json;
gitHashes = {
dartssh2 = "sha256-9XrxxOamy0uS7kUz6mwWwp4yIBHLX/GSoyxMk/Wwa+4=";
hotkey_manager_linux = "sha256-aO0h94YZvgV/ggVupNw8GjyZsnXrq3qTHRDtuhNv3oI=";
tray_menu = "sha256-TAlRW7VkZWAoHAVlrPeDqS3BsqhQTyCekYQ2b4AEqjU=";
window_size = "sha256-71PqQzf+qY23hTJvcm0Oye8tng3Asr42E2vfF1nBmVA=";
xterm = "sha256-h8vIonTPUVnNqZPk/A4ZV7EYCMyM0rrErL9ZOMe4ZBE=";
};
buildInputs = [
gtkmm3
keybinder3
libayatana-appindicator
libnotify
qt6.qtbase
qt6.qtwayland
];
nativeBuildInputs = [
autoPatchelfHook
protobuf
protoc-gen-dart
qt6.wrapQtAppsHook
];
preBuild = ''
# Temporary fix which can be removed in the next release.
# Already addressed upstream, but part of a larger patch
# that did not trivially apply.
substituteInPlace lib/main.dart --replace-fail 'TabBarTheme(' 'TabBarThemeData('
mkdir -p lib/generated
# Generate the Dart gRPC code for the Multipass GUI.
protoc \
--plugin=protoc-gen-dart=${lib.getExe protoc-gen-dart} \
--dart_out=grpc:lib/generated \
-I ../../rpc \
../../rpc/multipass.proto \
google/protobuf/timestamp.proto
'';
runtimeDependencies = [ multipassd ];
postFixup = ''
mv $out/bin/multipass_gui $out/bin/multipass.gui
install -Dm444 $out/app/multipass-gui/data/flutter_assets/assets/icon.png \
$out/share/icons/hicolor/256x256/apps/multipass.gui.png
cp $out/share/applications/multipass.gui.autostart.desktop \
$out/share/applications/multipass.gui.desktop
'';
meta = commonMeta // {
description = "Flutter frontend application for managing Ubuntu VMs";
};
}
@@ -1,13 +0,0 @@
diff --git a/src/platform/backends/lxd/lxd_request.h b/src/platform/backends/lxd/lxd_request.h
index 4b5e8840..5e673ad7 100644
--- a/src/platform/backends/lxd/lxd_request.h
+++ b/src/platform/backends/lxd/lxd_request.h
@@ -27,7 +27,7 @@
namespace multipass
{
-const QUrl lxd_socket_url{"unix:///var/snap/lxd/common/lxd/unix.socket@1.0"};
+const QUrl lxd_socket_url{"unix:///var/lib/lxd/unix.socket@1.0"};
const QString lxd_project_name{"multipass"};
class NetworkAccessManager;
-139
View File
@@ -1,139 +0,0 @@
{
commonMeta,
multipass_src,
version,
cmake,
dnsmasq,
fetchFromGitHub,
fmt,
git,
grpc,
gtest,
iproute2,
iptables,
lib,
libapparmor,
libvirt,
libxml2,
openssl,
OVMF,
pkg-config,
poco,
protobuf,
qemu-utils,
qemu,
qt6,
slang,
stdenv,
xterm,
}:
stdenv.mkDerivation {
inherit version;
pname = "multipassd";
src = multipass_src;
patches = [
# Multipass is usually only delivered as a snap package on Linux, and it expects that
# the LXD backend will also be delivered via a snap - in which cases the LXD socket
# is available at '/var/snap/lxd/...'. Here we patch to ensure that Multipass uses the
# LXD socket location on NixOS in '/var/lib/...'
./lxd_socket_path.patch
# The upstream cmake file attempts to fetch googletest using FetchContent, which fails
# in the Nix build environment. This patch disables the fetch in favour of providing
# the googletest library from nixpkgs.
./cmake_no_fetch.patch
# As of Multipass 1.14.0, the upstream started using vcpkg for grabbing C++ dependencies,
# which doesn't work in the nix build environment. This patch reverts that change, in favour
# of providing those dependencies manually in this derivation.
./vcpkg_no_install.patch
# The compiler flags used in nixpkgs surface an error in the test suite where an
# unreachable path was not annotated as such - this patch adds the annotation to ensure
# that the test suite passes in the nix build process.
./test_unreachable_call.patch
];
postPatch = ''
# Make sure the version is reported correctly in the compiled binary.
substituteInPlace ./CMakeLists.txt \
--replace-fail "determine_version(MULTIPASS_VERSION)" "" \
--replace-fail 'set(MULTIPASS_VERSION ''${MULTIPASS_VERSION})' 'set(MULTIPASS_VERSION "v${version}")'
# Don't build the GUI .desktop file, do that in the gui derivation instead
substituteInPlace ./CMakeLists.txt --replace-fail "add_subdirectory(data)" ""
# Don't build/use vcpkg
rm -rf 3rd-party/vcpkg
# Patch the patch of the OVMF binaries to use paths from the nix store.
substituteInPlace ./src/platform/backends/qemu/linux/qemu_platform_detail_linux.cpp \
--replace-fail "OVMF.fd" "${OVMF.fd}/FV/OVMF.fd" \
--replace-fail "QEMU_EFI.fd" "${OVMF.fd}/FV/QEMU_EFI.fd"
# Configure CMake to use gtest from the nix store since we disabled fetching from the internet.
cat >> tests/CMakeLists.txt <<'EOF'
add_library(gtest INTERFACE)
target_include_directories(gtest INTERFACE ${gtest.dev}/include)
target_link_libraries(gtest INTERFACE ${gtest}/lib/libgtest.so ''${CMAKE_THREAD_LIBS_INIT})
add_dependencies(gtest GMock)
add_library(gtest_main INTERFACE)
target_include_directories(gtest_main INTERFACE ${gtest.dev}/include)
target_link_libraries(gtest_main INTERFACE ${gtest}/lib/libgtest_main.so gtest)
add_library(gmock INTERFACE)
target_include_directories(gmock INTERFACE ${gtest.dev}/include)
target_link_libraries(gmock INTERFACE ${gtest}/lib/libgmock.so gtest)
add_library(gmock_main INTERFACE)
target_include_directories(gmock_main INTERFACE ${gtest.dev}/include)
target_link_libraries(gmock_main INTERFACE ${gtest}/lib/libgmock_main.so gmock gtest_main)
EOF
'';
# We'll build the flutter application separately using buildFlutterApplication
cmakeFlags = [ "-DMULTIPASS_ENABLE_FLUTTER_GUI=false" ];
buildInputs = [
fmt
grpc
gtest
libapparmor
libvirt
libxml2
openssl
poco.dev
protobuf
qt6.qtbase
qt6.qtwayland
];
nativeBuildInputs = [
cmake
git
pkg-config
qt6.wrapQtAppsHook
slang
];
nativeCheckInputs = [ gtest ];
postInstall = ''
wrapProgram $out/bin/multipassd --prefix PATH : ${
lib.makeBinPath [
dnsmasq
iproute2
iptables
OVMF.fd
qemu
qemu-utils
xterm
]
}
'';
meta = commonMeta // {
description = "Backend server & client for managing on-demand Ubuntu VMs";
};
}
-61
View File
@@ -1,61 +0,0 @@
{
callPackage,
fetchFromGitHub,
lib,
nixosTests,
stdenv,
symlinkJoin,
}:
let
name = "multipass";
version = "1.16.1";
multipass_src = fetchFromGitHub {
owner = "canonical";
repo = "multipass";
rev = "refs/tags/v${version}";
hash = "sha256-DryVXuyAdjk+KhJZYqGh/r1H50rwM16vJ9igLtftgDY=";
fetchSubmodules = true;
};
commonMeta = {
homepage = "https://multipass.run";
license = lib.licenses.gpl3Plus;
maintainers = [ ];
platforms = [ "x86_64-linux" ];
};
multipassd = callPackage ./multipassd.nix {
inherit commonMeta multipass_src version;
};
multipass-gui = callPackage ./gui.nix {
inherit
commonMeta
multipass_src
multipassd
version
;
};
in
symlinkJoin {
inherit version;
pname = name;
paths = [
multipassd
multipass-gui
];
passthru = {
tests = lib.optionalAttrs stdenv.hostPlatform.isLinux {
inherit (nixosTests) multipass;
};
updateScript = ./update.sh;
};
meta = commonMeta // {
description = "Ubuntu VMs on demand for any workstation";
};
}
File diff suppressed because one or more lines are too long
@@ -1,12 +0,0 @@
diff --git a/tests/test_common_callbacks.cpp b/tests/test_common_callbacks.cpp
index ccae78e0..f9ab4423 100644
--- a/tests/test_common_callbacks.cpp
+++ b/tests/test_common_callbacks.cpp
@@ -73,6 +73,7 @@ struct TestLoggingSpinnerCallbacks : public TestSpinnerCallbacks, public WithPar
default:
assert(false && "shouldn't be here");
}
+ __builtin_unreachable();
}
};
-61
View File
@@ -1,61 +0,0 @@
#!/usr/bin/env nix-shell
#!nix-shell -I nixpkgs=./. -i bash -p curl jq nix-prefetch-github yj git
# shellcheck shell=bash
set -euo pipefail
cd $(readlink -e $(dirname "${BASH_SOURCE[0]}"))
# Download the latest pubspec.lock (which is a YAML file), convert it to JSON and write it to
# the package directory as pubspec.lock.json
update_pubspec_json() {
local version; version="$1"
echo "Updating pubspec.lock.json"
curl -s \
"https://raw.githubusercontent.com/canonical/multipass/refs/tags/v${version}/src/client/gui/pubspec.lock" \
| yj > pubspec.lock.json
}
# Update the SRI hash of a particular overridden Dart package in the Nix expression
update_dart_pkg_hash() {
local pkg_name; pkg_name="$1"
local owner; owner="$2";
local repo; repo="$3";
echo "Updating dart package hash: $pkg_name"
resolved_ref="$(jq -r --arg PKG "$pkg_name" '.packages[$PKG].description."resolved-ref"' pubspec.lock.json)"
hash="$(nix-prefetch-github --rev "$resolved_ref" "$owner" "$repo" | jq '.hash')"
sed -i "s|${pkg_name} = \".*\";|${pkg_name} = $hash;|" gui.nix
}
# Update the hash of the multipass source code in the Nix expression.
update_multipass_source() {
local version; version="$1"
echo "Updating multipass source"
sri_hash="$(nix-prefetch-github canonical multipass --rev "refs/tags/v${version}" --fetch-submodules | jq -r '.hash')"
sed -i "s|version = \".*$|version = \"$version\";|" package.nix
sed -i "s|hash = \".*$|hash = \"${sri_hash}\";|" package.nix
}
LATEST_TAG="$(curl -s ${GITHUB_TOKEN:+-u ":$GITHUB_TOKEN"} https://api.github.com/repos/canonical/multipass/releases/latest | jq -r '.tag_name')"
LATEST_VERSION="$(expr "$LATEST_TAG" : 'v\(.*\)')"
CURRENT_VERSION="$(grep -Po "version = \"\K[^\"]+" package.nix)"
if [[ "$CURRENT_VERSION" == "$LATEST_VERSION" ]]; then
echo "multipass is up to date: ${CURRENT_VERSION}"
exit 0
fi
update_pubspec_json "$LATEST_VERSION"
update_dart_pkg_hash dartssh2 canonical dartssh2
update_dart_pkg_hash hotkey_manager_linux canonical hotkey_manager
update_dart_pkg_hash tray_menu canonical tray_menu
update_dart_pkg_hash window_size google flutter-desktop-embedding
update_dart_pkg_hash xterm levkropp xterm.dart
update_multipass_source "$LATEST_VERSION"
@@ -1,14 +0,0 @@
diff --git i/CMakeLists.txt w/CMakeLists.txt
index fd8d446c8..870a2c19c 100644
--- i/CMakeLists.txt
+++ w/CMakeLists.txt
@@ -83,9 +83,6 @@ else()
message(STATUS "Bootstrapping vcpkg completed successfully.")
endif()
-set(CMAKE_TOOLCHAIN_FILE "${CMAKE_CURRENT_SOURCE_DIR}/3rd-party/vcpkg/scripts/buildsystems/vcpkg.cmake"
- CACHE STRING "Vcpkg toolchain file")
-
project(Multipass)
option(MULTIPASS_ENABLE_TESTS "Build tests" ON)
+1
View File
@@ -1084,6 +1084,7 @@ mapAliases {
mrxvt = throw "'mrxvt' has been removed due to lack of maintainence upstream"; # Added 2025-09-25
msgpack = throw "msgpack has been split into msgpack-c and msgpack-cxx"; # Added 2025-09-14
msp430NewlibCross = throw "'msp430NewlibCross' has been renamed to/replaced by 'msp430Newlib'"; # Converted to throw 2025-10-27
multipass = throw "multipass was dropped since it was unmaintained."; # Added 2025-11-29
mumps_par = throw "'mumps_par' has been renamed to/replaced by 'mumps-mpi'"; # Converted to throw 2025-10-27
mustache-tcl = throw "'mustache-tcl' has been renamed to/replaced by 'tclPackages.mustache-tcl'"; # Converted to throw 2025-10-27
mutt-with-sidebar = throw "'mutt-with-sidebar' has been renamed to/replaced by 'mutt'"; # Converted to throw 2025-10-27