Skip to content

Ports merges

Konrad Witaszczyk edited this page Mar 20, 2024 · 15 revisions

Merge steps

On a Morello box:

  1. Create a branch merge-<YYMMDD>-<short git hash> based on main.

    • <short git hash> is a short Git hash of a revision of the main branch in freebsd/freebsd-ports that you want to merge.

    • <YYMMDD> is a date of the above revision.

  2. Merge freebsd-ports into the merge branch.

  3. Resolve conflicts while documenting them in this page to keep track of them.

  4. If necessary, update a bootstrapping compiler for Rust.

  5. Check if CheriBSD/CHERI-related patches can be applied after the merge:

    for _port in $(printf "./devel/qt5-buildtools\n"; find -E . -regex '.*/files/.*cheri.*' | sed 's@/files/.*@@' | sort | uniq); do
      sudo make -C "${_port}" -s clean patch BATCH=1 NOCLEANDEPENDS=1
    done
    
  6. Make sure all ports with patches for CheriABI that haven't been upstreamed can be built.

  7. Make sure important ports can be built.

On a Poudriere infrastructure host:

  1. Build all ports from the merge branch at the Poudriere infrastructure.

  2. Compare the list of newly built packages with a list of previously built packages.

  3. Make sure the new package repository isn't missing any important packages.

  4. Upload the new package repository to pkg.CheriBSD.org into a separate directory.

  5. Make sure that important packages can be installed using package managers on a Morello box and they successfully run.

  6. Merge the merge branch into main.

  7. Update pkg.CheriBSD.org to point to the new package repository.

Rust updates

NOTE: you can ignore this section if a Rust version from CheriBSD ports matches the version from the main branch of FreeBSD ports.

Rust requires a bootstrapping compiler -- a compiler from a previous release to build the current release. FreeBSD provides a bootstrapping compiler for FreeBSD/arm64 but removes it when updating Rust in FreeBSD ports. The following process must be followed in case there is a mismatch between a Rust version from CheriBSD ports and FreeBSD ports and a Rust compiler required in CheriBSD ports is not available at distcache.FreeBSD.org/local-distfiles any more.

On a FreeBSD/arm64 host:

  1. Install Rust.

    pkg install rust
    
  2. Change the current directory to lang/rust-bootstrap.

    cd /path/to/cheribsd-ports/lang/rust-bootstrap
    
  3. Build distfiles from lang/rust-bootstrap.

    make stage
    
  4. Remember date and version of the compiler.

    j -r .compiler work-aarch64/rustc-<version>-src/src/stage0.json
    
  5. Upload distfiles.

    rsync -avz work-aarch64/stage/usr/local/rust-bootstrap/aarch64/ cheri-dist:/var/www/pkg.cheribsd.org/local-distfiles/rust/<date>/
    
  6. Change the current directory to lang/rust.

    cd /path/to/cheribsd/ports/lang/rust
    
  7. Update BOOTSTRAPS_DATE and RUST_BOOTSTRAP_VERSION in Makefile.

  8. Rebuild distinfo.

    make makesum
    
  9. Commit changes.

    git commit -v ../rust-bootstrap ../rust
    

Important ports

The following ports should be tested before deploying new package repositories.

CheriABI

  • databases/sqlite3
  • devel/autoconf
  • devel/git
  • devel/gmake
  • devel/pkgconf
  • editors/kate
  • editors/nano
  • graphics/okular
  • lang/perl5.34
  • lang/tcl86
  • net/rsync31
  • ports-mgmt/pkg
  • security/sudo
  • shells/bash
  • sysutils/cheri-vm-support
  • sysutils/seatd
  • sysutils/tmux
  • x11-fm/dolphin
  • x11/cheri-desktop
  • x11/konsole
  • x11/sddm

Hybrid ABI

  • devel/cmake-core
  • devel/gdb-cheri
  • devel/gef-cheri
  • devel/ghidra-cheri
  • devel/llvm-base
  • devel/llvm-morello-csa
  • devel/meson
  • devel/ninja
  • devel/qemu-cheri
  • editors/vim
  • lang/python3
  • security/gnupg
  • www/chromium
  • www/firefox
  • x11/cheri-desktop-hybrid-extras

Merge history

We keep track of the merge history and encountered conflicts to improve the build system and reduce the number of conflicts, e.g. by introducing additional ABI-specific flags that can enable or disable features without introducing conflicts in port files.

merge-230804-652d0c1

Patches that could be dropped:

  • graphics/png - 1.6.40

  • x11-servers/xwayland-devel - 21.0.99.1-507 (master at 34446a995)

  • x11/libX11 - 1.8.6

  • x11/sddm - 0.20.0

Patches needed to be rebased:

  • databases/sqlite3 - from 3.39.0 to 3.42.0

  • devel/dbus - from 1.14.0 to 1.14.6

  • devel/gnulib - within the same version

  • devel/libepoll-shim - from 0.0.20220703 to 0.0.20230411

  • devel/libffi - from 3.4.2 to 3.4.4

  • devel/qt5 - from 5.15.5p165 to 5.15.8p157

  • graphics/libdrm - from 2.4.113 to 2.4.115

  • graphics/libglvnd - from 1.4.0 to 1.6.0

  • graphics/mesa-dri - from 21.3.8 to 22.3.7

  • lang/tcl86 - from 8.6.12 to 8.6.13

  • ports-mgmt/pkg - from 1.18.4 to 1.20.5

  • sysutils/plasma5-kde-cli-tools - from 5.24.6 to 5.27.6

  • www/firefox - from 105.0.1 to 116.0

  • x11-wm/plasma5-kwin - from 5.24.6 to 5.27.6

  • x11/plasma5-plasma-desktop - from 5.24.6 to 5.27.6

  • x11/plasma5-plasma-workspace - from 5.24.6 to 5.27.6

Build system files needed to be fixed:

  • Mk/Uses/cargo.mk

    • FreeBSD ports updated BUILD_DEPENDS to point at an updated Rust port.

    • CheriBSD ports cherry-picked another Rust update.

  • Mk/Uses/cmake.mk

    • FreeBSD ports generalised the logic to all cmake ports, including cmake-core that aims to build cmake using an internal cmake command.

    • CheriBSD ports modified the logic to allow specifying a custom cmake command with CMAKE_CMD or fallback to the cmake command rather than a specific binary from the local base.

  • Mk/Uses/meson.mk

    • FreeBSD ports removed a devel/meson port version from BUILD_DEPENDS.

    • CheriBSD ports modified BUILD_DEPENDS to allow specifying a custom meson command with MESON_CMD or fallback to the hybrid ABI meson.

  • Mk/Uses/python.mk

    • FreeBSD ports updated the logic for Python 3.

    • CheriBSD ports added a feature to specify a custom Python command with PYTHON_CMD_RUN.

  • Mk/bsd.gecko.mk

    • FreeBSD ports updated BUILD_DEPENDS to point at an updated Rust port.

    • CheriBSD ports cherry-picked another Rust update.

Ports needed to be fixed:

  • archivers/dpkg

    • Differences in Makefile:

      • FreeBSD ports removed an empty line alongside USES.

      • CheriBSD ports added localbase to USES.

  • chinese/ibus-libpinyin

    • Differences in Makefile:

      • FreeBSD ports removed USE_PYTHON alongside USES.

      • CheriBSD ports added localbase to USES.

  • comms/libmodbus

    • Differences in Makefile:

      • FreeBSD ports implemented the DOCS and MANPAGES options.

      • CheriBSD ports implemented the MANPAGES option.

    • Differences in pkg-plist:

      • FreeBSD ports added DOCS and MANPAGES support.

      • CheriBSD ports added DOCS support.

  • databases/memcached

    • Differences in Makefile:

      • FreeBSD ports rearranged OPTIONS_*.

      • CheriBSD ports excluded SASL in OPTIONS for CheriABI.

  • devel/Makefile

    • FreeBSD ports added new ports.

    • CheriBSD ports added the devel/mrs port.

  • devel/boost-libs

    • Differences in pkg-plist:

      • FreeBSD ports updated pkg-plist.

      • CheriBSD ports removed header files from pkg-plist and created a separate port devel/boost-headers that includes only the headers.

  • devel/cmake-core

    • Differences in Makefile:

      • FreeBSD ports changed LIB_DEPENDS and CONFIGURE_ARGS.

      • CheriBSD ports removed devel/jsoncpp from LIB_DEPENDS to make it conditional on the ABI.

  • devel/dbus

    • Differences in distinfo:

      • FreeBSD ports updated the port.

      • CheriBSD ports added a patch.

  • devel/electron24

    • Differences in Makefile:

      • FreeBSD ports moved the file from devel/electron18.

      • CheriBSD ports enforced to use a compiler from ports instead of a missing system compiler.

    • Differences in pkg-plist.

  • devel/gdb

    • Differences in Makefile:

      • FreeBSD ports added new options.

      • CheriBSD ports removed SOURCE_HIGHLIGHT from OPTIONS because gdb doesn't build with this option set for aarch64.

  • devel/kf5-kfilemetadata

    • Differences in pkg-plist:

      • FreeBSD ports updated pkg-plist.

      • CheriBSD ports added additional options to exclude features for CheriABI that would require dependencies unavailable for CheriABI.

  • devel/kf5-kio

    • Differences in pkg-plist:

      • FreeBSD ports updated pkg-plist.

      • CheriBSD ports added DOCS support.

  • devel/llvm-cheri

    • Differences in Makefile:

      • FreeBSD ports replaced python:3.6+ with python in _USES_PYTHON.

      • CheriBSD ports cherry-picked a port update.

    • Differences in pkg-plist.

  • devel/llvm-devel

    • Differences in Makefile:

      • FreeBSD ports modified OPTIONS, including excluding FLANG for aarch64.

      • CheriBSD ports excluded FLANG in OPTIONS for aarch64.

  • devel/llvm15

    • Differences in Makefile:

      • FreeBSD ports restructured the file to separate sections.

      • CheriBSD ports added FLAG to excluded OPTIONS on aarch64.

  • editors/kate

    • Differences in pkg-plist:

      • FreeBSD ports removed a file from the list.

      • CheriBSD ports added DOCS support.

  • games/gnuchess

    • Differences in Makefile:

      • FreeBSD ports modifed USES to a different line.

      • CheriBSD ports added localbase to USES.

  • games/tome4

    • Differences in Makefile:

      • FreeBSD ports modified CFLAGS alongside MAKE_ARGS.

      • CheriBSD ports modified CFLAGS to use double quotes for CC and CXX in case their values contain spaces, e.g. when passing a compiler command with its flags in CC which should not happen but sometimes is the only way to pass the flags to a port.

  • graphics/mesa-dri

    • Differences in Makefile:

      • FreeBSD ports modified GALLIUM_DRIVERS and MESON_ARGS.

      • CheriBSD ports modified VULKAN_DRIVERS and MESON_ARGS depending on the ABI.

    • Differences in `Makefile.common:

      • FreeBSD ports removed libpthread-stubs from BUILD_DEPENDS and moved BUILD_DEPENDS to a different line.

      • CheriBSD ports changed BUILD_DEPENDS to depend on py-mako from the hybrid ABI local base.

  • graphics/mesa-libs

    • Differences in Makefile:

      • FreeBSD ports modified MESON_ARGS.

      • CheriBSD ports added additional make variables and modified MESON_ARGS.

  • graphics/qt5-wayland

    • Differences in Makefile:

      • FreeBSD ports added perl5 to USES.

      • CheriBSD ports removed gnome from USES to make it depend on the ABI.

  • japanese/ibus-anthy

    • Differences in Makefile:

      • FreeBSD ports replaced python:3.6+ with python in USES.

      • CheriBSD ports added localbase to USES.

  • lang/rust-bootstrap

    • Differences in Makefile:

      • FreeBSD ports added powerpc64 to ONLY_FOR_ARCHS.

      • CheriBSD ports added aarch64 to ONLY_FOR_ARCHS.

    • Differences in pkg-plist:

      • FreeBSD ports updated the port.

      • CheriBSD ports cherry-picked another port update.

  • lang/rust

    • Differences in Makefile:

      • FreeBSD ports updated the port and changed the logic for PowerPC.

      • CheriBSD ports cherry-picked another port update, changed the bootstrapping compiler to CheriBSD's one and changed LLVM to LLVM for Morello.

    • Differences in pkg-plist:

      • FreeBSD ports updated the port.

      • CheriBSD ports removed architectures unsupported by CheriBSD.

  • multimedia/gstreamer1

    • Differences in Makefile:

      • FreeBSD ports added and removed dependencies in USES.

      • CheriBSD ports added localbase to USES.

  • net/tigervnc-server

    • Differences in Makefile:

      • FreeBSD ports modified the post-configure target to print commands.

      • CheriBSD ports modified the post-configure target to pass autoreconf flags depending on the ABI.

  • print/harfbuzz

    • Differences in Makefile:

      • FreeBSD ports updated MESON_ARGS to a newer port version.

      • CheriBSD ports removed flags from MESON_ARGS to make them depend on GOBJECT and GLIB options that are disabled for CheriABI.

    • Differences in pkg-plist:

      • FreeBSD ports reorded files.

      • CheriBSD ports added the GOBJECT option.

  • security/libgcrypt

    • Differences in Makefile:

      • FreeBSD ports added new lines to modify CFLAGS.

      • CheriBSD ports add new lines to modify CONFIGURE_ARGS depending on the ABI.

  • security/plasma5-kscreenlocker

    • Differences in Makefile:

      • FreeBSD ports added security/unix-selfauth-helper to RUN_DEPENDS.

      • CheriBSD ports removed sysutils/consolekit2 from RUN_DEPENDS to depend on the CONSOLEKIT option that is disabled for CheriABI.

    • Differences in pkg-plist:

      • FreeBSD ports updated pkg-plist.

      • CheriBSD ports added the CONSOLEKIT option.

  • security/yapet

    • Differences in Makefile:

      • FreeBSD ports added USE_CXXSTD after USES.

      • CheriBSD ports added localbase to USES.

  • shells/bash

    • Differences in Makefile:

      • FreeBSD ports moved lines in the file.

      • CheriBSD ports removed makeinfo from USES to depend on the DOCS option.

  • shells/ksh93

    • Differences in Makefile:

      • FreeBSD ports bumped PORTREVISION.

      • CheriBSD ports cherry-picked another port update.

  • sysutils/kf5-kwallet

    • Differences in Makefile:

      • FreeBSD ports changed from security/gpgme-qt5 to security/gpgme-qt@qt5 in LIB_DEPENDS.

      • CheriBSD ports moved LIB_DEPENDS to depend on the ABI.

  • sysutils/libudisks

    • Differences in Makefile:

      • FreeBSD ports added pathfix to USES.

      • CheriBSD ports added localbase to USES.

  • sysutils/opensbi

    • Differences in Makefile:

      • FreeBSD ports modified MAKE_ARGS.

      • CheriBSD ports added unnecessary change to enclose a variable value in quotes.

  • sysutils/plasma5-drkonqi

    • Differences in Makefile:

      • FreeBSD ports added kdeclarative to USE_KDE.

      • CheriBSD ports made xmlrpcclient from USE_KDE depend on the ABI.

  • sysutils/plasma5-kde-cli-tools

    • Differences in Makefile:

      • FreeBSD ports sorted USES.

      • CheriBSD ports made desktop-file-utils from USES depend on the ABI.

    • Differences in pkg-plist:

      • FreeBSD ports updated pkg-plist.

      • CheriBSD ports added DOCS support.

  • sysutils/plasma5-kinfocenter

    • Differences in Makefile:

      • FreeBSD ports added a dependency in RUN_DEPENDS.

      • CheriBSD ports moved RUN_DEPENDS to depend on the ABI.

    • Differences in pkg-plist:

      • freebsd ports updated pkg-plist.

      • cheribsd ports added docs support.

  • sysutils/plasma5-kmenuedit

    • Differences in pkg-plist:

      • freebsd ports updated pkg-plist.

      • cheribsd ports added docs support.

  • sysutils/plasma5-ksysguard

    • Differences in Makefile:

      • FreeBSD ports introduced new unrelated port changes.

      • CheriBSD ports modified USES for CheriABI.

  • sysutils/plasma5-libksysguard

    • Differences in Makefile:

      • FreeBSD ports fixed style in USE_KDE.

      • CheriBSD ports removed script webkit from USE_QT.

  • sysutils/plasma5-systemsettings

    • Differences in pkg-plist:

      • FreeBSD ports updated pkg-plist.

      • CheriBSD ports added DOCS support.

  • textproc/expat2

    • Differences in Makefile, pkg-plist and distinfo:

    • FreeBSD ports updated the port.

    • CheriBSD ports cherry-picked another port update.

  • textproc/groff

    • Differences in Makefile:

      • FreeBSD ports moved USES to another line and sorted CONFIGURE_ARGS.

      • CheriBSD ports added localbase to USES.

  • textproc/ibus-table

    • Differences in Makefile:

      • FreeBSD ports renamed python:3.4+ to python in USES.

      • CheriBSD ports added localbase to USES.

  • textproc/kf5-syntax-highlighting

    • Differences in Makefile:

      • FreeBSD ports added an additional dependency in USE_QT.

      • CheriBSD ports enabled the hybrid ABI Perl in USE_PERL5.

  • textproc/libxml2

    • Differences in distinfo

      • FreeBSD ports updated the port version

      • CheriBSD ports added patches from the libxml2 upstream

  • www/chromium

    • Differences in Makefile

      • LLVM_DEFAULT version was changed for the case a local compiler is older than LLVM 16. Previously, LLVM 13 was preferred but LLVM for Morello based on LLVM 13 couldn't process profdata. Given that LLVM for Morello is older than the preferred LLVM 16 in upstream, we can switch back to the original logic and fallback to LLVM 16 when using LLVM for Morello.
  • www/firefox

    • Differences in Makefile

      • MOZ_OPTIONS was changed in upstream while a condition next to it was changed locally.
  • x11-fonts/fontconfig

    • Differences in Makefile due to an additional pre-configure target.
  • x11-toolkits/kf5-kconfigwidgets

    • Differences in pkg-plist due to unsupported port options (DOCS).
  • x11-toolkits/qt5-gui

    • Differences in Makefile (RUN_DEPENDS).
  • x11-wm/plasma5-kwin

    • Differences in Makefile (USES).

    • Differences in pkg-plist due to unsupported port options (DOCS).

  • x11/kf5-kded

    • Differences in pkg-plist due to unsupported port options (DOCS).
  • x11/konsole

    • Differences in Makefile (USE_QT).
  • x11/libX11

    • Differences in distinfo. The file includes an additional patch checksum.
  • x11/libinput

    • Differences in Makefile (USES).
  • x11/plasma5-plasma-desktop

    • Differences in Makefile (USES, OPTIONS_DEFINE).

    • Differences in pkg-plist due to added port potions (CLOCK, DOCS).

  • x11/plasma5-plasma-integration

    • Differences in Makefile (LIB_DEPENDS).
  • x11/plasma5-plasma-workspace

    • Differences in Makefile (USE_KDE) due to added port options (BALOO, DOCS, QALCULATE, CONSOLEKIT, POLKIT).

    • Differences in pkg-plist due to added port options (BALOO, DOCS).

  • x11/sddm

    • Differences in Makefile (CMAKE_ARGS) due to added port options (DOCS).

    • Differences in pkg-plist due to added port options (DOCS).

merge-220923-7d2af59

Patches needed to be rebased:

None.

Ports needed to be fixed:

None.

merge-220909-b1c21e7

Patches needed to be rebased:

None.

Ports needed to be fixed:

None.

merge-220826-7861d77

Patches needed to be rebased:

None.

Ports needed to be fixed:

  • net/rsync

    • Needs to be a separate port from rsync adapted to CheriABI.

    • A new port net/rsync31 should be created instead.

merge-220811-f515b0e

Patches needed to be rebased:

  • databases/sqlite3 - 3.39.0,1

  • ports-mgmt/pkg - 1.18.4

  • print/harfbuzz - 5.1.0

  • sysutils/tmux - 3.3a

Ports needed to be fixed:

  • math/mpdecimal

    • Needs to use CC for LD also in case of Clang.