Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
c85f05a
[vcpkg] Add ubuntu-insights
theartful Nov 11, 2026
563df73
[insights] Add wrapper & smoke tests for insights
theartful Nov 11, 2026
2952967
[snap] Support building multipass with insights
theartful Nov 11, 2026
3664434
[ci] Set up Go for Ubuntu Insights
theartful Nov 11, 2026
401520f
[ci] Disable plugs that require approval
theartful Nov 11, 2026
0cd8744
[ci] Expose go toolchain to vcpkg builds
theartful Nov 11, 2026
a09f50c
[insights] Various fixes
theartful Nov 11, 2026
fcd54b5
[vcpkg] Drop CGO_CC
theartful Nov 11, 2026
ec22474
[cmake] Pass Go location to vcpkg
theartful Nov 11, 2026
6bff7d6
[vcpkg] Drop wayland from dependencies
theartful Nov 11, 2026
2110786
[vcpkg] Use VCPKG_KEEP_ENV_VARS to pass go dir
theartful Nov 11, 2026
932d731
[vcpkg] Copy libinsights dll to debug/bin as well
theartful Nov 11, 2026
f031291
[ci] No need to disable caching for go
theartful Nov 12, 2026
c3e5e4a
[vcpkg] Both Ubuntu-insights and msys2 support arm
theartful Nov 12, 2026
7145daa
[snap] Fix ubuntu insights snap environment
theartful Nov 12, 2026
09a2047
[cmake] Fix typo in ENABLE_INSIGHTS description
theartful Nov 12, 2026
962d3bc
[cmake] Ship ubuntu insights shared library
theartful Nov 12, 2026
714adef
[snap] Drop new plug requirements for insights
theartful Nov 15, 2026
4998896
[cmake] Make insights support a feature flag
theartful Nov 15, 2026
803e489
[vcpkg] Use insights/v1.0.1 tag
theartful Nov 15, 2026
7bf672a
[tests] Drop Qt from LibInsights smoke tests
theartful Nov 16, 2026
909d1ff
[ubuntu-insights] Support only x64 on Windows
theartful Nov 17, 2026
b4ce314
[vcpkg] Use $VERSION in ubuntu insights port
theartful Nov 17, 2026
6255646
[vcpkg] Add supports clause in insights vcpkg.json
theartful Nov 17, 2026
cb65d36
[vcpkg] Fix ubuntu insights go environment
theartful Nov 17, 2026
837d347
[vcpkg] Put ubuntu insights tools behind a feature
theartful Nov 17, 2026
3297e82
[docs] Add go compiler section in BUILD
theartful Nov 17, 2026
2ed65f6
[vcpkg] Add comment about syncing insights.def
theartful Nov 17, 2026
904aefb
[vcpkg] Add mingw lockfile when computing abi hash
theartful Nov 17, 2026
81eaf63
[vcpkg] Share MSYS2 root between qemu and insights
theartful Nov 17, 2026
6dc6b74
[vcpkg] Auto-generate insights import library def
theartful Nov 20, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ jobs:

env:
BUILD_DIR: ${{ github.workspace }}/build
GOTOOLCHAIN: local
SCCACHE_DIR: ${{ github.workspace }}/.sccache
RUST_DIR: ${{ github.workspace }}/rxx
RUSTC_WRAPPER: "sccache"
Expand Down Expand Up @@ -105,6 +106,11 @@ jobs:
- name: Set up Rust
uses: dtolnay/rust-toolchain@stable

- name: Set up Go
Comment thread
xmkg marked this conversation as resolved.
Resolved
uses: actions/setup-go@v7
with:
go-version: '1.26.x'

- name: Install dependencies from brew
run: |
# Avoid reinstalling cmake
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/tics.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
COVERAGE_DIR: ${{ github.workspace }}/coverage
NEEDRESTART_SUSPEND: yes
DEBIAN_FRONTEND: noninteractive
GOTOOLCHAIN: local

steps:
- name: Checkout code
Expand Down Expand Up @@ -51,6 +52,11 @@ jobs:
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable

- name: Set up Go
uses: actions/setup-go@v7
with:
go-version: '1.26.x'

- name: Install cmake
uses: lukka/get-cmake@v4.4.4

Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ jobs:

env:
BUILD_DIR: ${{ github.workspace }}/build
GOTOOLCHAIN: local
SCCACHE_DIR: ${{ github.workspace }}/.sccache
#RUSTC_WRAPPER: "sccache" Removed due to concurrency issues between C++ and Rust

Expand All @@ -96,6 +97,11 @@ jobs:
- name: Set up Rust
uses: dtolnay/rust-toolchain@stable

- name: Set up Go
Comment thread
xmkg marked this conversation as resolved.
Resolved
uses: actions/setup-go@v7
with:
go-version: '1.26.x'

- name: Install other packages from Choco
uses: crazy-max/ghaction-chocolatey@v4
with:
Expand Down
44 changes: 44 additions & 0 deletions 3rd-party/vcpkg-port-utils/mingw/acquire-mingw-msys.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
include("${CMAKE_CURRENT_LIST_DIR}/get-mingw-packages.cmake")

# Acquire a shared MSYS2 root for all ports to avoid repeatedly setting up the
# same environment.
function(multipass_acquire_mingw_msys OUT_ROOT)
multipass_get_mingw_packages(MINGW_DIRECT_PACKAGES MINGW_URLS MINGW_SHA512S)
vcpkg_acquire_msys(MSYS_ROOT
PACKAGES findutils perl
DIRECT_PACKAGES ${MINGW_DIRECT_PACKAGES}
)

# vcpkg_acquire_msys() extracts the full MinGW packages but then deletes
# every mingw64/lib/pkgconfig on *every* call (the removal sits outside its
# "assemble the root once" guard). qemu-img's meson build needs the glib/zstd
# .pc files, so we keep a private backup of them (harvested once, gated on the
# backup dir) and copy it back into the canonical mingw64/lib/pkgconfig on
# every run. The canonical location matters: pkgconf's --define-prefix (on by
# default) only rewrites each .pc's absolute `prefix=/mingw64` into the real
# Windows path when the file is found under a `.../lib/pkgconfig` layout, and
# native mingw gcc can't resolve the bare `/mingw64` POSIX paths otherwise.
set(PKGCONFIG_BACKUP "${MSYS_ROOT}/.multipass-qemu-pkgconfig")
if(NOT EXISTS "${PKGCONFIG_BACKUP}")
# Re-extract the pinned packages into a scratch dir and copy out their
# .pc files (the headers/libs acquire already installed are untouched).
set(_harvest "${CURRENT_BUILDTREES_DIR}/pkgconfig-harvest")
file(REMOVE_RECURSE "${_harvest}")
list(LENGTH MINGW_URLS _mingw_count)
math(EXPR _mingw_last "${_mingw_count} - 1")
foreach(_i RANGE ${_mingw_last})
list(GET MINGW_URLS ${_i} _url)
list(GET MINGW_SHA512S ${_i} _sha)
get_filename_component(_fn "${_url}" NAME)
vcpkg_download_distfile(_archive URLS "${_url}" FILENAME "${_fn}" SHA512 "${_sha}" QUIET)
file(ARCHIVE_EXTRACT INPUT "${_archive}" DESTINATION "${_harvest}")
endforeach()
file(GLOB _pc_files "${_harvest}/mingw64/lib/pkgconfig/*.pc")
file(COPY ${_pc_files} DESTINATION "${PKGCONFIG_BACKUP}")
file(REMOVE_RECURSE "${_harvest}")
endif()
file(GLOB _pc_backup "${PKGCONFIG_BACKUP}/*.pc")
file(COPY ${_pc_backup} DESTINATION "${MSYS_ROOT}/mingw64/lib/pkgconfig")

set(${OUT_ROOT} "${MSYS_ROOT}" PARENT_SCOPE)
endfunction()
26 changes: 26 additions & 0 deletions 3rd-party/vcpkg-port-utils/mingw/get-mingw-packages.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Reads the pinned MinGW closure into the requested output variables.
function(multipass_get_mingw_packages OUT_DIRECT_PACKAGES OUT_URLS OUT_SHA512S)
if(NOT ARGC EQUAL 3)
message(FATAL_ERROR "multipass_get_mingw_packages requires direct-packages, URLs, and SHA512 output variables")
endif()

set(_direct_packages "")
set(_urls "")
set(_sha512s "")
file(STRINGS "${CMAKE_CURRENT_FUNCTION_LIST_DIR}/mingw64-toolchain.lock" _lock_lines)
foreach(_line IN LISTS _lock_lines)
if(_line MATCHES "^#" OR _line STREQUAL "")
continue()
endif()
if(NOT _line MATCHES "^([^ \t]+)[ \t]+([0-9a-fA-F]+)$")
message(FATAL_ERROR "Malformed mingw64-toolchain.lock entry: ${_line}")
endif()
list(APPEND _direct_packages "${CMAKE_MATCH_1}" "${CMAKE_MATCH_2}")
list(APPEND _urls "${CMAKE_MATCH_1}")
list(APPEND _sha512s "${CMAKE_MATCH_2}")
endforeach()

set(${OUT_DIRECT_PACKAGES} "${_direct_packages}" PARENT_SCOPE)
set(${OUT_URLS} "${_urls}" PARENT_SCOPE)
set(${OUT_SHA512S} "${_sha512s}" PARENT_SCOPE)
endfunction()
66 changes: 6 additions & 60 deletions 3rd-party/vcpkg-ports/qemu/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ if(VCPKG_TARGET_IS_WINDOWS)
# Windows: build only qemu-img (the sole QEMU tool Multipass uses here; no
# system emulator). The GCC/MinGW toolchain is acquired hermetically via
# vcpkg_acquire_msys() from packages pinned by URL + SHA512 -- vcpkg's own
# pinned msys shell layer plus the MinGW closure in mingw64-toolchain.lock
# (regenerate with generate-mingw-lockfile.py).
# pinned msys shell layer plus the shared MinGW closure in
# vcpkg-port-utils/mingw/mingw64-toolchain.lock.
###########################################################################

if(NOT VCPKG_TARGET_ARCHITECTURE STREQUAL "x64")
Expand All @@ -109,31 +109,8 @@ if(VCPKG_TARGET_IS_WINDOWS)
set(${OUT_VAR} "${_p}" PARENT_SCOPE)
endfunction()

# Pinned MinGW-w64 closure (regenerate with generate-mingw-lockfile.py).
# Each non-comment line is "<url> <sha512>". Keep an interleaved list for
# vcpkg_acquire_msys(DIRECT_PACKAGES ...) plus parallel url/sha lists.
set(MINGW_DIRECT_PACKAGES "")
set(MINGW_URLS "")
set(MINGW_SHA512S "")
file(STRINGS "${CMAKE_CURRENT_LIST_DIR}/mingw64-toolchain.lock" _lock_lines)
foreach(_line IN LISTS _lock_lines)
if(_line MATCHES "^#" OR _line STREQUAL "")
continue()
endif()
if(NOT _line MATCHES "^([^ \t]+)[ \t]+([0-9a-fA-F]+)$")
message(FATAL_ERROR "Malformed mingw64-toolchain.lock entry: ${_line}")
endif()
list(APPEND MINGW_DIRECT_PACKAGES "${CMAKE_MATCH_1}" "${CMAKE_MATCH_2}")
list(APPEND MINGW_URLS "${CMAKE_MATCH_1}")
list(APPEND MINGW_SHA512S "${CMAKE_MATCH_2}")
endforeach()

# Assemble a private, content-addressed MSYS2 root: vcpkg's pinned msys shell
# utilities (plus findutils/perl for configure) and our pinned MinGW closure.
vcpkg_acquire_msys(MSYS_ROOT
PACKAGES findutils perl
DIRECT_PACKAGES ${MINGW_DIRECT_PACKAGES}
)
include("${CMAKE_CURRENT_LIST_DIR}/../../vcpkg-port-utils/mingw/acquire-mingw-msys.cmake")
multipass_acquire_mingw_msys(MSYS_ROOT)

# Run the MSYS2 tools under an explicit MINGW64 environment (no login shell):
# mingw64/bin and usr/bin on PATH, MSYSTEM selecting the MinGW64 personality.
Expand All @@ -156,37 +133,6 @@ if(VCPKG_TARGET_IS_WINDOWS)
to_msys_path("${BUILD_DIR}" BUILD_DIR_UNIX)
to_msys_path("${CURRENT_PACKAGES_DIR}" INSTALL_PREFIX_UNIX)

# vcpkg_acquire_msys() extracts the full MinGW packages but then deletes
# every mingw64/lib/pkgconfig on *every* call (the removal sits outside its
# "assemble the root once" guard). qemu-img's meson build needs the glib/zstd
# .pc files, so we keep a private backup of them (harvested once, gated on the
# backup dir) and copy it back into the canonical mingw64/lib/pkgconfig on
# every run. The canonical location matters: pkgconf's --define-prefix (on by
# default) only rewrites each .pc's absolute `prefix=/mingw64` into the real
# Windows path when the file is found under a `.../lib/pkgconfig` layout, and
# native mingw gcc can't resolve the bare `/mingw64` POSIX paths otherwise.
set(PKGCONFIG_BACKUP "${MSYS_ROOT}/.multipass-qemu-pkgconfig")
if(NOT EXISTS "${PKGCONFIG_BACKUP}")
# Re-extract the pinned packages into a scratch dir and copy out their
# .pc files (the headers/libs acquire already installed are untouched).
set(_harvest "${CURRENT_BUILDTREES_DIR}/pkgconfig-harvest")
file(REMOVE_RECURSE "${_harvest}")
list(LENGTH MINGW_URLS _mingw_count)
math(EXPR _mingw_last "${_mingw_count} - 1")
foreach(_i RANGE ${_mingw_last})
list(GET MINGW_URLS ${_i} _url)
list(GET MINGW_SHA512S ${_i} _sha)
get_filename_component(_fn "${_url}" NAME)
vcpkg_download_distfile(_archive URLS "${_url}" FILENAME "${_fn}" SHA512 "${_sha}" QUIET)
file(ARCHIVE_EXTRACT INPUT "${_archive}" DESTINATION "${_harvest}")
endforeach()
file(GLOB _pc_files "${_harvest}/mingw64/lib/pkgconfig/*.pc")
file(COPY ${_pc_files} DESTINATION "${PKGCONFIG_BACKUP}")
file(REMOVE_RECURSE "${_harvest}")
endif()
file(GLOB _pc_backup "${PKGCONFIG_BACKUP}/*.pc")
file(COPY ${_pc_backup} DESTINATION "${MSYS_ROOT}/mingw64/lib/pkgconfig")

# meson build deps: distlib + QEMU's vendored meson wheel. site-packages
# survives acquire's deletions, so this is a genuine one-time step.
set(PYTHON_STAMP "${MSYS_ROOT}/.multipass-qemu-python-ready")
Expand All @@ -199,7 +145,7 @@ if(VCPKG_TARGET_IS_WINDOWS)
# skips the system emulator, --disable-docs avoids the sphinx dependency, and
# pixman/zstd are pinned off/on so features don't depend on autodetection.
# PKG_CONFIG_PATH/LIBDIR are cleared so pkgconf falls back to its default
# search (the canonical mingw64/lib/pkgconfig we restore above), which is what
# search (the canonical mingw64/lib/pkgconfig restored by the helper), which is what
# triggers --define-prefix to emit real Windows include/lib paths. --prefix is
# required (meson validates it) though we never install; the binary is copied
# straight from the build tree.
Expand Down Expand Up @@ -337,4 +283,4 @@ set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled)
# even for static-linkage triplets.
set(VCPKG_POLICY_ALLOW_EXES_IN_BIN enabled)
set(VCPKG_POLICY_DLLS_IN_STATIC_LIBRARY enabled)
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING")
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING")
18 changes: 18 additions & 0 deletions 3rd-party/vcpkg-ports/ubuntu-insights/0001-c-api-free.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
diff --git a/insights/C/libinsights.go b/insights/C/libinsights.go
--- a/insights/C/libinsights.go
+++ b/insights/C/libinsights.go
@@ -16,6 +16,14 @@ import (
"github.com/ubuntu/ubuntu-insights/insights"
)

+// insights_free releases strings returned by the C API using the library's
+// allocator, including when the caller uses a different Windows C runtime.
+//
+//export insights_free
+func insights_free(ptr unsafe.Pointer) {
Comment thread
xmkg marked this conversation as resolved.
Resolved
+ C.free(ptr)
+}
+
/**
* insights_collect creates a report for the specified source.
* If config is NULL, defaults are used.
Loading
Loading