diff --git a/.github/workflows/portage-stable-packages-list b/.github/workflows/portage-stable-packages-list index f97ab4bdc3e..5ba23e9d6c0 100644 --- a/.github/workflows/portage-stable-packages-list +++ b/.github/workflows/portage-stable-packages-list @@ -152,10 +152,12 @@ dev-libs/jsoncpp dev-libs/libaio dev-libs/libassuan dev-libs/libbsd +dev-libs/libdnet dev-libs/libgcrypt dev-libs/libgpg-error dev-libs/libksba dev-libs/libltdl +dev-libs/libmspack dev-libs/libnl dev-libs/libpcre dev-libs/libpcre2 @@ -170,6 +172,7 @@ dev-libs/oniguruma dev-libs/popt dev-libs/protobuf dev-libs/userspace-rcu +dev-libs/xmlsec dev-perl/File-Slurp dev-perl/Locale-gettext @@ -340,6 +343,7 @@ net-libs/libnsl net-libs/libpcap net-libs/libslirp net-libs/nghttp2 +net-libs/rpcsvc-proto net-misc/bridge-utils net-misc/curl @@ -450,6 +454,8 @@ sys-firmware/sgabios sys-fs/cryptsetup sys-fs/dosfstools sys-fs/e2fsprogs +sys-fs/fuse +sys-fs/fuse-common sys-fs/lsscsi sys-fs/mtools sys-fs/multipath-tools diff --git a/build_library/vm_image_util.sh b/build_library/vm_image_util.sh index 8ac169e3ced..c09abc63897 100644 --- a/build_library/vm_image_util.sh +++ b/build_library/vm_image_util.sh @@ -190,17 +190,23 @@ IMG_vagrant_parallels_OEM_PACKAGE=oem-vagrant IMG_vmware_DISK_FORMAT=vmdk_scsi IMG_vmware_DISK_LAYOUT=vm IMG_vmware_CONF_FORMAT=vmx -IMG_vmware_OEM_PACKAGE=oem-vmware +IMG_vmware_OEM_USE=vmware +IMG_vmware_OEM_PACKAGE=common-oem-files +IMG_vmware_OEM_SYSEXT=oem-vmware ## vmware_ova IMG_vmware_ova_DISK_FORMAT=vmdk_stream IMG_vmware_ova_DISK_LAYOUT=vm -IMG_vmware_ova_OEM_PACKAGE=oem-vmware IMG_vmware_ova_CONF_FORMAT=ovf_vmware IMG_vmware_ova_BUNDLE_FORMAT=ova +IMG_vmware_ova_OEM_USE=vmware +IMG_vmware_ova_OEM_PACKAGE=common-oem-files +IMG_vmware_ova_OEM_SYSEXT=oem-vmware ## vmware_raw -IMG_vmware_raw_OEM_PACKAGE=oem-vmware +IMG_vmware_raw_OEM_USE=vmware +IMG_vmware_raw_OEM_PACKAGE=common-oem-files +IMG_vmware_raw_OEM_SYSEXT=oem-vmware ## vmware_insecure IMG_vmware_insecure_DISK_FORMAT=vmdk_scsi diff --git a/changelog/changes/2023-09-20-vmware-sysext.md b/changelog/changes/2023-09-20-vmware-sysext.md new file mode 100644 index 00000000000..377ff09f8f2 --- /dev/null +++ b/changelog/changes/2023-09-20-vmware-sysext.md @@ -0,0 +1,2 @@ +- Reworked the VMware OEM software to be shipped as A/B updated systemd-sysext image +- The open-vm-tools package in VMware OEM now comes with vmhgfs-fuse, udev rules, pam and vgauth diff --git a/changelog/updates/2023-09-20-vmware-sysext.md b/changelog/updates/2023-09-20-vmware-sysext.md new file mode 100644 index 00000000000..1bf0fb632af --- /dev/null +++ b/changelog/updates/2023-09-20-vmware-sysext.md @@ -0,0 +1,2 @@ +- rpcsvc-proto ([1.4.4](https://github.com/thkukuk/rpcsvc-proto/releases/tag/v1.4.4)) +- VMWARE: libdnet ([1.16.2](https://github.com/ofalk/libdnet/releases/tag/libdnet-1.16.2) (includes [1.16](https://github.com/ofalk/libdnet/releases/tag/libdnet-1.16)) diff --git a/sdk_container/src/third_party/coreos-overlay/app-emulation/open-vm-tools/README b/sdk_container/src/third_party/coreos-overlay/app-emulation/open-vm-tools/README deleted file mode 100644 index aff503a9c85..00000000000 --- a/sdk_container/src/third_party/coreos-overlay/app-emulation/open-vm-tools/README +++ /dev/null @@ -1,3 +0,0 @@ -When updating the version of open-vm-tools the ebuild version of -oem-vmware must be updated to match as well. That way the reported "OEM" -version directly reflects the installed tools. diff --git a/sdk_container/src/third_party/coreos-overlay/app-emulation/open-vm-tools/files/10.1.0-Werror.patch b/sdk_container/src/third_party/coreos-overlay/app-emulation/open-vm-tools/files/10.1.0-Werror.patch new file mode 100644 index 00000000000..b79865e62db --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/app-emulation/open-vm-tools/files/10.1.0-Werror.patch @@ -0,0 +1,24 @@ +From fdf599994d58ef47b73dc94d21d3556a2ec5d9da Mon Sep 17 00:00:00 2001 +From: Mike Gilbert +Date: Sat, 26 Nov 2016 11:54:33 -0500 +Subject: [PATCH] build: drop -Werror + +--- + open-vm-tools/configure.ac | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/open-vm-tools/configure.ac b/open-vm-tools/configure.ac +index 8d4604e8..4d925f22 100644 +--- a/open-vm-tools/configure.ac ++++ b/open-vm-tools/configure.ac +@@ -1137,7 +1137,6 @@ AC_C_VOLATILE + + ### General flags / actions + CFLAGS="$CFLAGS -Wall" +-CFLAGS="$CFLAGS -Werror" + + # -Wno-unknown-pragmas is due to gcc not understanding '#pragma ident' + # in Xlib.h on OpenSolaris. +-- +2.11.0.rc2 + diff --git a/sdk_container/src/third_party/coreos-overlay/app-emulation/open-vm-tools/files/11.3.5-icu.patch b/sdk_container/src/third_party/coreos-overlay/app-emulation/open-vm-tools/files/11.3.5-icu.patch new file mode 100644 index 00000000000..d51c0cc60a3 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/app-emulation/open-vm-tools/files/11.3.5-icu.patch @@ -0,0 +1,26 @@ +From 08caf83eaa0e66cee8f3e49479cd201a10bb3919 Mon Sep 17 00:00:00 2001 +From: Mike Gilbert +Date: Sat, 25 Sep 2021 21:14:25 -0400 +Subject: [PATCH] lib/unicode: add ICU_LIBS to LDADD + +--- + open-vm-tools/lib/unicode/Makefile.am | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/open-vm-tools/lib/unicode/Makefile.am b/open-vm-tools/lib/unicode/Makefile.am +index 4284c51c..40261fba 100644 +--- a/open-vm-tools/lib/unicode/Makefile.am ++++ b/open-vm-tools/lib/unicode/Makefile.am +@@ -25,7 +25,9 @@ libUnicode_la_SOURCES += unicodeSimpleTypes.c + libUnicode_la_SOURCES += unicodeSimpleOperations.c + libUnicode_la_SOURCES += unicodeSimpleTransforms.c + libUnicode_la_SOURCES += unicodeStatic.c ++libUnicode_la_LIBADD = + + if HAVE_ICU + libUnicode_la_SOURCES += unicodeICU.c ++libUnicode_la_LIBADD += @ICU_LIBS@ + endif +-- +2.33.0 + diff --git a/sdk_container/src/third_party/coreos-overlay/app-emulation/open-vm-tools/files/mount.vmhgfs b/sdk_container/src/third_party/coreos-overlay/app-emulation/open-vm-tools/files/mount.vmhgfs new file mode 100644 index 00000000000..d4b319c80cb --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/app-emulation/open-vm-tools/files/mount.vmhgfs @@ -0,0 +1,2 @@ +#!/bin/sh +hgfsmounter "$@" >/dev/null 2>&1 || vmhgfs-fuse "$@" diff --git a/sdk_container/src/third_party/coreos-overlay/app-emulation/open-vm-tools/files/open-vm-tools-0001-configure-Add-options-for-fuse-hgfs-and-udev.patch b/sdk_container/src/third_party/coreos-overlay/app-emulation/open-vm-tools/files/open-vm-tools-0001-configure-Add-options-for-fuse-hgfs-and-udev.patch deleted file mode 100644 index 1501b9ba31b..00000000000 --- a/sdk_container/src/third_party/coreos-overlay/app-emulation/open-vm-tools/files/open-vm-tools-0001-configure-Add-options-for-fuse-hgfs-and-udev.patch +++ /dev/null @@ -1,31 +0,0 @@ -From d41aae8430eb0148dda9f71f311626bbe779d115 Mon Sep 17 00:00:00 2001 -From: Benjamin Gilbert -Date: Tue, 21 Mar 2017 16:04:30 -0700 -Subject: [PATCH] configure: Add options for fuse, hgfs, and udev - ---- - open-vm-tools/configure.ac | 16 +++++++++++++++- - 1 file changed, 15 insertions(+), 1 deletion(-) - -diff --git a/open-vm-tools/configure.ac b/open-vm-tools/configure.ac -index ab315b84..33839087 100644 ---- a/open-vm-tools/configure.ac -+++ b/open-vm-tools/configure.ac -@@ -1425,7 +1433,13 @@ if test "$os" = "solaris"; then - fi - fi - --if test "$os" = "linux"; then -+AC_ARG_WITH([udev-rules], -+ [AS_HELP_STRING([--without-udev-rules], -+ [don't install udev rules])], -+ [], -+ [with_udev_rules=yes]) -+ -+if test "$os" = "linux" -a "$with_udev_rules" = "yes"; then - have_udev="yes" - AC_ARG_WITH([udev-rules-dir], - [AS_HELP_STRING([--with-udev-rules-dir=DIR], --- -2.26.3 - diff --git a/sdk_container/src/third_party/coreos-overlay/app-emulation/open-vm-tools/files/open-vm-tools.confd b/sdk_container/src/third_party/coreos-overlay/app-emulation/open-vm-tools/files/open-vm-tools.confd new file mode 100644 index 00000000000..4414fabdb46 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/app-emulation/open-vm-tools/files/open-vm-tools.confd @@ -0,0 +1,2 @@ +# Set this to no to disable drag and drop (and vmblock) loading. +VM_DRAG_AND_DROP="yes" diff --git a/sdk_container/src/third_party/coreos-overlay/app-emulation/open-vm-tools/files/open-vm-tools.initd b/sdk_container/src/third_party/coreos-overlay/app-emulation/open-vm-tools/files/open-vm-tools.initd new file mode 100644 index 00000000000..8b91e4fb4c0 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/app-emulation/open-vm-tools/files/open-vm-tools.initd @@ -0,0 +1,59 @@ +#!/sbin/openrc-run +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +pidfile="/run/vmtoolsd.pid" +command="/usr/bin/vmtoolsd" +command_args="-b ${pidfile}" + +vmblockmntpt="/proc/fs/vmblock/mountPoint" +vmblockfusemntpt="/run/vmblock-fuse" + +depend() { + before checkfs fsck net X +} + +start_vmblock() { + checkpath -d -m 1777 /tmp/VMwareDnD + if command -v vmware-vmblock-fuse > /dev/null; then + modprobe fuse > /dev/null 2>&1 + checkpath -d "${vmblockfusemntpt}" + ebegin "Mounting vmblock-fuse" + vmware-vmblock-fuse \ + -o subtype=vmware-vmblock,default_permissions,allow_other \ + "${vmblockfusemntpt}" + eend $? + else + modprobe vmblock > /dev/null 2>&1 + checkpath -d "${vmblockmntpt}" + ebegin "Mounting vmblock" + mount -t vmblock vmblock "${vmblockmntpt}" + eend $? + fi +} + +stop_vmblock() { + if [ -d "${vmblockfusemntpt}" ]; then + ebegin "Unmounting vmblock-fuse" + umount "${vmblockfusemntpt}" + eend $? + else + ebegin "Unmounting vmblock" + umount "${vmblockmntpt}" + eend $? + fi +} + +start_pre() { + if [ x"${VM_DRAG_AND_DROP}" = xyes ]; then + start_vmblock + fi + return 0 +} + +stop_post() { + if [ x"${VM_DRAG_AND_DROP}" = xyes ]; then + stop_vmblock + fi + return 0 +} diff --git a/sdk_container/src/third_party/coreos-overlay/app-emulation/open-vm-tools/files/vgauthd.service b/sdk_container/src/third_party/coreos-overlay/app-emulation/open-vm-tools/files/vgauthd.service new file mode 100644 index 00000000000..db27bd56ef5 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/app-emulation/open-vm-tools/files/vgauthd.service @@ -0,0 +1,14 @@ +[Unit] +Description=VGAuth Service for open-vm-tools +Documentation=https://github.com/vmware/open-vm-tools +ConditionVirtualization=vmware +PartOf=vmtoolsd.service + +[Service] +# For dev-libs/xerces-c[iconv,-icu] +EnvironmentFile=-/etc/env.d/50xerces-c +ExecStart=/usr/bin/VGAuthService -s +TimeoutStopSec=5 + +[Install] +RequiredBy=vmtoolsd.service diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-vmware/files/units/vmtoolsd.service b/sdk_container/src/third_party/coreos-overlay/app-emulation/open-vm-tools/files/vmtoolsd.service similarity index 52% rename from sdk_container/src/third_party/coreos-overlay/coreos-base/oem-vmware/files/units/vmtoolsd.service rename to sdk_container/src/third_party/coreos-overlay/app-emulation/open-vm-tools/files/vmtoolsd.service index 0b989953d2a..1226291bc8d 100644 --- a/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-vmware/files/units/vmtoolsd.service +++ b/sdk_container/src/third_party/coreos-overlay/app-emulation/open-vm-tools/files/vmtoolsd.service @@ -1,13 +1,11 @@ [Unit] -Description=VMware Tools Agent +Description=Service for virtual machines hosted on VMware Documentation=https://github.com/vmware/open-vm-tools ConditionVirtualization=vmware [Service] -ExecStartPre=/usr/bin/ln -sfT /oem/vmware-tools /etc/vmware-tools -ExecStart=/oem/bin/vmtoolsd +ExecStart=/usr/bin/vmtoolsd TimeoutStopSec=5 -PrivateTmp=true [Install] WantedBy=multi-user.target diff --git a/sdk_container/src/third_party/coreos-overlay/app-emulation/open-vm-tools/files/vmtoolsd.vgauth.service b/sdk_container/src/third_party/coreos-overlay/app-emulation/open-vm-tools/files/vmtoolsd.vgauth.service new file mode 100644 index 00000000000..1cb6e00ecf5 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/app-emulation/open-vm-tools/files/vmtoolsd.vgauth.service @@ -0,0 +1,14 @@ +[Unit] +Description=Service for virtual machines hosted on VMware +Documentation=https://github.com/vmware/open-vm-tools +ConditionVirtualization=vmware +Requires=vgauthd.service +After=vgauthd.service + +[Service] +ExecStart=/usr/bin/vmtoolsd +TimeoutStopSec=5 + +[Install] +WantedBy=multi-user.target +Also=vgauthd.service diff --git a/sdk_container/src/third_party/coreos-overlay/app-emulation/open-vm-tools/metadata.xml b/sdk_container/src/third_party/coreos-overlay/app-emulation/open-vm-tools/metadata.xml index 9e8e61bb812..f53e431f81a 100644 --- a/sdk_container/src/third_party/coreos-overlay/app-emulation/open-vm-tools/metadata.xml +++ b/sdk_container/src/third_party/coreos-overlay/app-emulation/open-vm-tools/metadata.xml @@ -1,14 +1,7 @@ - + - - floppym@gentoo.org - Mike Gilbert - - - vmware@gentoo.org - Gentoo VMware Project - + The Open Virtual Machine Tools (open-vm-tools) are the open source implementation of VMware Tools. They are a set of guest operating system @@ -16,21 +9,17 @@ of virtual machines. - Build Common Agent Framework Build deploypkg plugin Enable support for nicinfo Generate API documentation Enable vmblock-fuse/vmhgfs-fuse - Build grabbitmqproxy plugin Compile with Gtkmm and sigc++ (Recommended) Enable multimon (Requires X) - Force shared libraries to be built as PIC Build the linux/unix resolutionkms module Build vgauth - Build vgauth with xml-security-c instead of xmlsec1 - Build vgauth with xmlsec1 instead of xml-security-c vmware/open-vm-tools + cpe:/a:vmware:tools diff --git a/sdk_container/src/third_party/coreos-overlay/app-emulation/open-vm-tools/open-vm-tools-12.3.0-r1.ebuild b/sdk_container/src/third_party/coreos-overlay/app-emulation/open-vm-tools/open-vm-tools-12.3.0-r1.ebuild new file mode 100644 index 00000000000..e582b2cce3c --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/app-emulation/open-vm-tools/open-vm-tools-12.3.0-r1.ebuild @@ -0,0 +1,170 @@ +# Copyright 2007-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools linux-info pam systemd udev + +DESCRIPTION="Tools for VMware guests" +HOMEPAGE="https://github.com/vmware/open-vm-tools" +MY_P="${P}-22234872" +SRC_URI="https://github.com/vmware/open-vm-tools/releases/download/stable-${PV}/${MY_P}.tar.gz" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="amd64 x86" +# Flatcar: TO UPSTREAM: added fuse3 USE flag +IUSE="X +deploypkg +dnet doc +fuse fuse3 gtkmm +icu multimon pam +resolutionkms +ssl +vgauth" +# Flatcar: TO UPSTREAM: made fuse and fuse3 exclusive +REQUIRED_USE=" + multimon? ( X ) + vgauth? ( ssl ) + ?? ( fuse fuse3 ) +" + +# Flatcar: TO UPSTREAM: added optional dep on sys-fs/fuse:3 +RDEPEND=" + dev-libs/glib + net-libs/libtirpc + deploypkg? ( dev-libs/libmspack ) + fuse? ( sys-fs/fuse:0 ) + fuse3? ( sys-fs/fuse:3 ) + pam? ( sys-libs/pam ) + !pam? ( virtual/libcrypt:= ) + ssl? ( dev-libs/openssl:0= ) + vgauth? ( + dev-libs/libxml2 + dev-libs/xmlsec:= + ) + X? ( + x11-libs/libXext + multimon? ( x11-libs/libXinerama ) + x11-libs/libXi + x11-libs/libXrender + x11-libs/libXrandr + x11-libs/libXtst + x11-libs/libSM + x11-libs/libXcomposite + x11-libs/gdk-pixbuf-xlib + x11-libs/gtk+:3 + gtkmm? ( + dev-cpp/gtkmm:3.0 + dev-libs/libsigc++:2 + ) + ) + dnet? ( dev-libs/libdnet ) + icu? ( dev-libs/icu:= ) + resolutionkms? ( + x11-libs/libdrm[video_cards_vmware] + virtual/libudev + ) +" + +DEPEND="${RDEPEND} + net-libs/rpcsvc-proto +" + +BDEPEND=" + dev-util/glib-utils + virtual/pkgconfig + doc? ( app-doc/doxygen ) +" + +S="${WORKDIR}/${MY_P}" + +PATCHES=( + "${FILESDIR}/10.1.0-Werror.patch" + "${FILESDIR}/11.3.5-icu.patch" +) + +pkg_setup() { + local CONFIG_CHECK="~VMWARE_BALLOON ~VMWARE_PVSCSI ~VMXNET3" + use X && CONFIG_CHECK+=" ~DRM_VMWGFX" + kernel_is -lt 3 9 || CONFIG_CHECK+=" ~VMWARE_VMCI ~VMWARE_VMCI_VSOCKETS" + kernel_is -lt 3 || CONFIG_CHECK+=" ~FUSE_FS" + kernel_is -lt 5 5 || CONFIG_CHECK+=" ~X86_IOPL_IOPERM" + linux-info_pkg_setup +} + +src_prepare() { + eapply -p2 "${PATCHES[@]}" + eapply_user + eautoreconf +} + +src_configure() { + local myeconfargs=( + --disable-glibc-check + --without-root-privileges + $(use_enable multimon) + $(use_with X x) + $(use_with X gtk3) + $(use_with gtkmm gtkmm3) + $(use_enable doc docs) + --disable-tests + $(use_enable resolutionkms) + --disable-static + $(use_enable deploypkg) + $(use_with pam) + $(use_enable vgauth) + $(use_with dnet) + $(use_with icu) + --with-udev-rules-dir="$(get_udevdir)/rules.d" + # Flatcar: TO UPSTREAM: explicitly specify fuse version + $(use_with fuse fuse 2) + $(use_with fuse3 fuse 3) + # Flatcar: TO UPSTREAM: Disable it explicitly, we do + # not yet list the containerinfo dependencies in the + # ebuild + --disable-containerinfo + # Flatcar: TO UPSTREAM: Disable it explicitly, gtk2 is + # obsolete + --without-gtk2 + # Flatcar: TO UPSTREAM: Possibly add a separate USE + # flag for the utility, or merge it into resolutionkms + --disable-vmwgfxctrl + ) + # Avoid a bug in configure.ac + use ssl || myeconfargs+=( --without-ssl ) + + econf "${myeconfargs[@]}" +} + +src_install() { + default + find "${ED}" -name '*.la' -delete || die + + if use pam; then + rm "${ED}"/etc/pam.d/vmtoolsd || die + pamd_mimic_system vmtoolsd auth account + fi + + newinitd "${FILESDIR}/open-vm-tools.initd" vmware-tools + newconfd "${FILESDIR}/open-vm-tools.confd" vmware-tools + + if use vgauth; then + systemd_newunit "${FILESDIR}"/vmtoolsd.vgauth.service vmtoolsd.service + systemd_dounit "${FILESDIR}"/vgauthd.service + else + systemd_dounit "${FILESDIR}"/vmtoolsd.service + fi + + # Flatcar: TO UPSTREAM: vmhgfs-fuse is built only when fuse or fuse3 are enabled + if use fuse || use fuse3; then + # Make fstype = vmhgfs-fuse work in fstab + dosym vmhgfs-fuse /usr/bin/mount.vmhgfs-fuse + fi + + if use X; then + fperms 4711 /usr/bin/vmware-user-suid-wrapper + dobin scripts/common/vmware-xdg-detect-de + fi +} + +pkg_postinst() { + udev_reload +} + +pkg_postrm() { + udev_reload +} diff --git a/sdk_container/src/third_party/coreos-overlay/app-emulation/open-vm-tools/open-vm-tools-12.3.0.ebuild b/sdk_container/src/third_party/coreos-overlay/app-emulation/open-vm-tools/open-vm-tools-12.3.0.ebuild deleted file mode 100644 index 2ca1c4dd565..00000000000 --- a/sdk_container/src/third_party/coreos-overlay/app-emulation/open-vm-tools/open-vm-tools-12.3.0.ebuild +++ /dev/null @@ -1,109 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -inherit autotools flag-o-matic multilib toolchain-funcs - -DESCRIPTION="Opensourced tools for VMware guests" -HOMEPAGE="https://github.com/vmware/open-vm-tools" -MY_P="${P}-22234872" -SRC_URI="https://github.com/vmware/open-vm-tools/releases/download/stable-${PV}/${MY_P}.tar.gz" - -LICENSE="LGPL-2.1" -SLOT="0" -KEYWORDS="amd64 ~x86" -# Flatcar: add USE flag salt-minion -IUSE="+deploypkg +dnet +pic salt-minion" # TODO: pam - -DEPEND="dev-libs/glib:2 - net-libs/libtirpc - deploypkg? ( dev-libs/libmspack ) - dnet? ( dev-libs/libdnet )" - -# Runtime dependencies provided by CoreOS, not the OEM: -# dev-libs/glib:2 -# sys-apps/ethtool -# pam? ( sys-libs/pam ) -RDEPEND="dnet? ( dev-libs/libdnet ) - deploypkg? ( dev-libs/libmspack )" - -S="${WORKDIR}/${MY_P}" - -PATCHES=( - "${FILESDIR}/${PN}-0001-configure-Add-options-for-fuse-hgfs-and-udev.patch" -) - -src_prepare() { - eapply -p2 "${PATCHES[@]}" - eapply_user - eautoreconf -} - -# Override configure's use of pkg-config to ensure ${SYSROOT} is respected. -override_vmw_check_lib() { - local lib="$1" - local var="$2" - local pkgconfig="$(tc-getPKG_CONFIG)" - export "CUSTOM_${var}_CPPFLAGS=$(${pkgconfig} --cflags ${lib})" - export "CUSTOM_${var}_LIBS=$(${pkgconfig} --libs ${lib})" -} - -src_configure() { - local oemlib="/oem/$(get_libdir)" - local oeminc="/oem/include" - - # set rpath even if oem is in ld.so.conf - append-ldflags "-Wl,-rpath,${oemlib}" - - # libdnet is installed to /oem - export CUSTOM_DNET_CPPFLAGS="-I=${oeminc}" - export CUSTOM_DNET_LIBS="-L=${oemlib}" - export CUSTOM_MSPACK_CPPFLAGS="-I=${oeminc}" - export CUSTOM_MSPACK_LIBS="-L=${oemlib}" - - # for everything else configure is still wrong because it calls - # pkg-config directly instead of favoring the ${CHOST}-pkg-config - # wrapper or using the standard autoconf macro. - override_vmw_check_lib glib-2.0 GLIB2 - override_vmw_check_lib gmodule-2.0 GMODULE - override_vmw_check_lib gobject-2.0 GOBJECT - override_vmw_check_lib gthread-2.0 GTHREAD - - local myeconfargs=( - --prefix=/oem - $(use_enable deploypkg) - $(use_enable salt-minion) - --disable-containerinfo - --disable-docs - --disable-multimon - --disable-tests - --without-fuse - --without-icu - --without-kernel-modules - --without-pam - --without-udev-rules - --without-x - --disable-vgauth - $(use_with dnet) - $(use_with pic) - ) - # TODO: $(use_with pam) - - econf "${myeconfargs[@]}" - - # Bugs 260878, 326761 - find ./ -name Makefile | xargs sed -i -e 's/-Werror//g' || die "sed out Werror failed" -} - -src_install() { - # Relocate event scripts, a symlink will be created by the systemd - # unit. - emake DESTDIR="${D}" confdir=/oem/vmware-tools install - - rm "${D}"/etc/pam.d/vmtoolsd - # TODO: pamd_mimic_system vmtoolsd auth account - - # We never bother with i10n on CoreOS - rm -rf "${D}"/usr/share/open-vm-tools -} diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/common-oem-files/common-oem-files-0.ebuild b/sdk_container/src/third_party/coreos-overlay/coreos-base/common-oem-files/common-oem-files-0.ebuild index e3e58924f90..14ccd3e11e6 100644 --- a/sdk_container/src/third_party/coreos-overlay/coreos-base/common-oem-files/common-oem-files-0.ebuild +++ b/sdk_container/src/third_party/coreos-overlay/coreos-base/common-oem-files/common-oem-files-0.ebuild @@ -4,8 +4,9 @@ EAPI=8 OEMIDS=( - qemu azure + qemu + vmware ) DESCRIPTION='Common OEM files' diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/common-oem-files/files/vmware/grub.cfg.frag b/sdk_container/src/third_party/coreos-overlay/coreos-base/common-oem-files/files/vmware/grub.cfg.frag new file mode 100644 index 00000000000..4f9e06c2c8c --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/coreos-base/common-oem-files/files/vmware/grub.cfg.frag @@ -0,0 +1 @@ +set linux_append="flatcar.autologin" diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/misc-files/files/oems/vmware b/sdk_container/src/third_party/coreos-overlay/coreos-base/misc-files/files/oems/vmware new file mode 100644 index 00000000000..2f4f7b7777b --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/coreos-base/misc-files/files/oems/vmware @@ -0,0 +1,9 @@ +/etc/systemd/system/multi-user.target.wants/vmtoolsd.service +/etc/systemd/system/vmtoolsd.service +/etc/vmware-tools +/oem/base/ +/oem/bin/ +/oem/include/ +/oem/lib64/ +/oem/units/ +/oem/vmware-tools/ diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-vmware/files/base/README b/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-vmware/files/base/README deleted file mode 100644 index 97bd5f67386..00000000000 --- a/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-vmware/files/base/README +++ /dev/null @@ -1,4 +0,0 @@ -These Ignition configs are part of the OEM configuration. Do not modify -them. If you want to write an Ignition config directly to disk, put it in -../config.ign and it will be applied at first boot instead of a config -in guestinfo. diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-vmware/files/base/base.ign b/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-vmware/files/base/base.ign deleted file mode 100644 index cd57bdbb546..00000000000 --- a/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-vmware/files/base/base.ign +++ /dev/null @@ -1,25 +0,0 @@ -{ - "ignition": { - "version": "2.1.0" - }, - "storage": { - "files": [ - { - "filesystem": "root", - "path": "/etc/systemd/system/vmtoolsd.service", - "contents": { - "source": "oem:///units/vmtoolsd.service" - }, - "mode": 292 - } - ] - }, - "systemd": { - "units": [ - { - "name": "vmtoolsd.service", - "enabled": true - } - ] - } -} diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-vmware/files/flatcar-fixups.conf b/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-vmware/files/flatcar-fixups.conf new file mode 100644 index 00000000000..49b5e1365d0 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-vmware/files/flatcar-fixups.conf @@ -0,0 +1,3 @@ +[Service] +PrivateTmp=true +ExecStartPre=/usr/bin/ln -sfrT /usr/share/flatcar/oem-vmware/vmware-tools /etc/vmware-tools diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-vmware/files/grub.cfg b/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-vmware/files/grub.cfg deleted file mode 100644 index d58568ab54c..00000000000 --- a/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-vmware/files/grub.cfg +++ /dev/null @@ -1,4 +0,0 @@ -# Flatcar GRUB settings - -set oem_id="vmware" -set linux_append="flatcar.autologin" diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-vmware/files/manglefs.sh b/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-vmware/files/manglefs.sh new file mode 100755 index 00000000000..a0e17ca6ec3 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-vmware/files/manglefs.sh @@ -0,0 +1,37 @@ +#!/bin/bash + +set -euo pipefail + +rootfs=${1} + +cd "${rootfs}" + +# Move stuff out of /etc. The systemd unit files are patched to create +# symlinks from /etc to those directories. +mkdir -p usr/lib/pam.d +mv etc/pam.d/vmtoolsd usr/lib/pam.d/vmtoolsd +mkdir -p usr/share/flatcar/oem-vmware +mv etc/vmware-tools usr/share/flatcar/oem-vmware/vmware-tools + +files_to_drop=( + # Development stuff. + usr/bin/dnet-config + usr/bin/*xslt-config + usr/bin/xmlsec1-config + usr/lib64/*Conf.sh +) + +dirs_to_drop=( + # Debugging symbols. + usr/lib/debug/ + # Translations. + usr/share/open-vm-tools/messages/ + # Development stuff. + usr/include/ + usr/lib64/cmake/ + usr/lib64/pkgconfig/ + usr/share/aclocal/ +) + +rm -f "${files_to_drop[@]}" +rm -rf "${dirs_to_drop[@]}" diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-vmware/files/oem-release b/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-vmware/files/oem-release deleted file mode 100644 index 9d6442280a2..00000000000 --- a/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-vmware/files/oem-release +++ /dev/null @@ -1,5 +0,0 @@ -ID=vmware -VERSION_ID=@@OEM_VERSION_ID@@ -NAME="VMware" -HOME_URL="https://www.vmware.com/" -BUG_REPORT_URL="https://issues.flatcar.org" diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-vmware/files/open-vm-tools-sysext-upholds.conf b/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-vmware/files/open-vm-tools-sysext-upholds.conf new file mode 100644 index 00000000000..86184f717ff --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-vmware/files/open-vm-tools-sysext-upholds.conf @@ -0,0 +1,2 @@ +[Unit] +Upholds=vmtoolsd.service vgauthd.service diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-vmware/oem-vmware-12.3.0-r1.ebuild b/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-vmware/oem-vmware-12.3.0-r1.ebuild new file mode 100644 index 00000000000..7fc289026bc --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-vmware/oem-vmware-12.3.0-r1.ebuild @@ -0,0 +1,38 @@ +# Copyright (c) 2014 CoreOS, Inc.. All rights reserved. +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit systemd + +DESCRIPTION="OEM suite for VMware" +HOMEPAGE="https://www.vmware.com/" +SRC_URI="" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="amd64 arm64" +IUSE="" + +RDEPEND=" + ~app-emulation/open-vm-tools-${PV} +" + +# no source directory +S="${WORKDIR}" + +# for coreos-base/common-oem-files +OEM_NAME="VMware" + +src_install() { + local unit_dir + unit_dir=$(systemd_get_systemunitdir) + unit_dir=${unit_dir#"${EPREFIX}"} + local tool + for tool in vmtoolsd vgauthd; do + insinto "${unit_dir}/${tool}.service.d" + doins "${FILESDIR}/flatcar-fixups.conf" + done + insinto "${unit_dir}/multi-user.target.d" + doins "${FILESDIR}/open-vm-tools-sysext-upholds.conf" +} diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-vmware/oem-vmware-12.3.0.ebuild b/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-vmware/oem-vmware-12.3.0.ebuild deleted file mode 100644 index fb9fa225754..00000000000 --- a/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-vmware/oem-vmware-12.3.0.ebuild +++ /dev/null @@ -1,35 +0,0 @@ -# Copyright (c) 2014 CoreOS, Inc.. All rights reserved. -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -DESCRIPTION="OEM suite for VMware" -HOMEPAGE="https://github.com/flatcar/coreos-overlay/tree/main/coreos-base" -SRC_URI="" - -LICENSE="Apache-2.0" -SLOT="0" -KEYWORDS="amd64" -IUSE="" - -DEPEND=" - ~app-emulation/open-vm-tools-${PV} - " -RDEPEND="${DEPEND}" - -# no source directory -S="${WORKDIR}" - -src_prepare() { - default - sed -e "s\\@@OEM_VERSION_ID@@\\${PVR}\\g" \ - "${FILESDIR}/oem-release" > "${T}/oem-release" || die -} - -src_install() { - insinto "/oem" - doins "${FILESDIR}/grub.cfg" - doins "${T}/oem-release" - doins -r "${FILESDIR}/base" - doins -r "${FILESDIR}/units" -} diff --git a/sdk_container/src/third_party/coreos-overlay/coreos/user-patches/app-emulation/open-vm-tools/0001-configure-Use-portageq-to-query-the-kernel-version-r.patch b/sdk_container/src/third_party/coreos-overlay/coreos/user-patches/app-emulation/open-vm-tools/0001-configure-Use-portageq-to-query-the-kernel-version-r.patch new file mode 100644 index 00000000000..83f159a7f40 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/coreos/user-patches/app-emulation/open-vm-tools/0001-configure-Use-portageq-to-query-the-kernel-version-r.patch @@ -0,0 +1,26 @@ +From 115fca8a25d3705b494f41e59248c2cad17a16cb Mon Sep 17 00:00:00 2001 +From: Krzesimir Nowak +Date: Thu, 14 Sep 2023 14:26:33 +0200 +Subject: [PATCH] configure: Use portageq to query the kernel version, rather + than uname + +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 0b683b86..5985ca0a 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -100,7 +100,7 @@ AC_ARG_WITH([kernel-release], + [AS_HELP_STRING([--with-kernel-release], + [specifies the kernel release you want to build against])], + [KERNEL_RELEASE="$withval"], +- [KERNEL_RELEASE=`uname -r`]) ++ [KERNEL_RELEASE=$(portageq best-version sys-kernel/coreos-kernel | sed -e 's/.*\([0-9]\+\.[0-9]\+\.[0-9]\+\).*/\1/')]) + + AC_ARG_WITH([linuxdir], + [AS_HELP_STRING([--with-linuxdir], +-- +2.25.1 + diff --git a/sdk_container/src/third_party/coreos-overlay/coreos/user-patches/app-emulation/open-vm-tools/0001-configure-Use-portageq-to-query-the-kernel-version-r.patch.git-orig b/sdk_container/src/third_party/coreos-overlay/coreos/user-patches/app-emulation/open-vm-tools/0001-configure-Use-portageq-to-query-the-kernel-version-r.patch.git-orig new file mode 100644 index 00000000000..94434fad2fe --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/coreos/user-patches/app-emulation/open-vm-tools/0001-configure-Use-portageq-to-query-the-kernel-version-r.patch.git-orig @@ -0,0 +1,26 @@ +From 115fca8a25d3705b494f41e59248c2cad17a16cb Mon Sep 17 00:00:00 2001 +From: Krzesimir Nowak +Date: Thu, 14 Sep 2023 14:26:33 +0200 +Subject: [PATCH] configure: Use portageq to query the kernel version, rather + than uname + +--- + open-vm-tools/configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/open-vm-tools/configure.ac b/open-vm-tools/configure.ac +index 0b683b86..5985ca0a 100644 +--- a/open-vm-tools/configure.ac ++++ b/open-vm-tools/configure.ac +@@ -100,7 +100,7 @@ AC_ARG_WITH([kernel-release], + [AS_HELP_STRING([--with-kernel-release], + [specifies the kernel release you want to build against])], + [KERNEL_RELEASE="$withval"], +- [KERNEL_RELEASE=`uname -r`]) ++ [KERNEL_RELEASE=$(portageq best-version sys-kernel/coreos-kernel | sed -e 's/.*\([0-9]\+\.[0-9]\+\.[0-9]\+\).*/\1/')]) + + AC_ARG_WITH([linuxdir], + [AS_HELP_STRING([--with-linuxdir], +-- +2.25.1 + diff --git a/sdk_container/src/third_party/coreos-overlay/coreos/user-patches/app-emulation/open-vm-tools/README.md b/sdk_container/src/third_party/coreos-overlay/coreos/user-patches/app-emulation/open-vm-tools/README.md new file mode 100644 index 00000000000..370ddcdaf48 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/coreos/user-patches/app-emulation/open-vm-tools/README.md @@ -0,0 +1,11 @@ +The patch for configure.ac is not upstreamable at all, we either need +to modify the ebuild or the build system. We went with the latter, so +the ebuild could eventually be moved to portage-stable. + +Git repo of open-vm-tools has a different layout of files than the +tarball. The files that are in toplevel directory in tarball (like +`configure.ac`) are inside the `open-vm-tools` directory in the git +repo. Which means that regenerating the user patches made in the git +repo also entails dropping the `open-vm-tools/` prefix from the paths +in the patch. The `.patch.git-orig` files are original patches from +git repo and can be useful for regenerating against a new tag. diff --git a/sdk_container/src/third_party/coreos-overlay/dev-libs/libdnet/Manifest b/sdk_container/src/third_party/coreos-overlay/dev-libs/libdnet/Manifest deleted file mode 100644 index dad5f443f91..00000000000 --- a/sdk_container/src/third_party/coreos-overlay/dev-libs/libdnet/Manifest +++ /dev/null @@ -1 +0,0 @@ -DIST libdnet-1.14.tar.gz 520833 BLAKE2B 97e241fc374fc9489e70d440db5e19199f4e653650af85e24af56bbbc0167db1c451349c43fcb630a26c61f8ca15c58f5c879e0d82654e275189ca3e140bb22a SHA512 ce8d95228f5175e4d9a8ff71bb99eb1ccc3ccd599a85dd07adbfd9842fc54066235d362c8060828fb3ba8129d0e1e8e071e93d60d69c6d03be310c80e61cea93 diff --git a/sdk_container/src/third_party/coreos-overlay/dev-libs/libdnet/README.md b/sdk_container/src/third_party/coreos-overlay/dev-libs/libdnet/README.md deleted file mode 100644 index a99664f3304..00000000000 --- a/sdk_container/src/third_party/coreos-overlay/dev-libs/libdnet/README.md +++ /dev/null @@ -1,6 +0,0 @@ -This is a fork of gentoo package. It's a dependency of the -open-vm-tools which is installed in the oem partition. We have it in -overlay, because: - -- We drop python stuff from the package. -- We change the prefix and sbindir. diff --git a/sdk_container/src/third_party/coreos-overlay/net-libs/rpcsvc-proto/Manifest b/sdk_container/src/third_party/coreos-overlay/net-libs/rpcsvc-proto/Manifest deleted file mode 100644 index e0324f8e649..00000000000 --- a/sdk_container/src/third_party/coreos-overlay/net-libs/rpcsvc-proto/Manifest +++ /dev/null @@ -1 +0,0 @@ -DIST rpcsvc-proto-1.4.2.tar.gz 61788 BLAKE2B e941fa86088d690e3e80a501beb5169a51ff77b60d618f54db9d9fd5fb96c2b2a4277ab8d847dcdb29dadd2f6947d155b15cd8b6af1f1420e023da8637d555c0 SHA512 6769f9439e3f187eebdeef4ee8d54f8a6fee6f410e3137d0c1b26e61b705873932890856faff55b68c39aa702e456b36fe9410b85baf1ef9b20ee97f2158971a diff --git a/sdk_container/src/third_party/coreos-overlay/net-libs/rpcsvc-proto/metadata.xml b/sdk_container/src/third_party/coreos-overlay/net-libs/rpcsvc-proto/metadata.xml deleted file mode 100644 index 2d4f8ac9895..00000000000 --- a/sdk_container/src/third_party/coreos-overlay/net-libs/rpcsvc-proto/metadata.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - toolchain@gentoo.org - Gentoo Toolchain Project - - - base-system@gentoo.org - Gentoo Base System Project - - diff --git a/sdk_container/src/third_party/coreos-overlay/net-libs/rpcsvc-proto/rpcsvc-proto-1.4.2.ebuild b/sdk_container/src/third_party/coreos-overlay/net-libs/rpcsvc-proto/rpcsvc-proto-1.4.2.ebuild deleted file mode 100644 index 0d012345ff8..00000000000 --- a/sdk_container/src/third_party/coreos-overlay/net-libs/rpcsvc-proto/rpcsvc-proto-1.4.2.ebuild +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit autotools - -DESCRIPTION="rpcsvc protocol definitions from glibc" -HOMEPAGE="https://github.com/thkukuk/rpcsvc-proto" -SRC_URI="https://github.com/thkukuk/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" - -SLOT="0" -LICENSE="LGPL-2.1+ BSD" -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" -IUSE="" - -# sys-devel/gettext is only for libintl detection macros. -DEPEND="sys-devel/gettext" -RDEPEND=" - !/dev/null || die + pushd "${WORKDIR}" > /dev/null || die + cp -aL "${S}"/${PN} "${WORKDIR}"/${PN}-source || die rm -r "${S}" || die mv "${WORKDIR}"/${PN}-source "${S}" || die - popd &>/dev/null || die + + popd > /dev/null || die fi default eautoreconf - - multilib_copy_sources } -multilib_src_configure() { - ECONF_SOURCE="${S}" econf \ - --prefix=/oem \ - $(use_enable debug) \ - $(use_enable static-libs static) +src_configure() { + econf $(use_enable debug) } -multilib_src_test() { - if multilib_is_native_abi; then - default - cd "${S}"/test && "${BUILD_DIR}"/test/cabd_test || die - fi +src_test() { + default + + cd "${S}"/test || die + ./cabd_test || die } -multilib_src_install_all() { - DOCS=(AUTHORS ChangeLog NEWS README TODO) - use doc && HTML_DOCS=(doc/*) - default_src_install - if use doc; then +src_install() { + use doc && HTML_DOCS=( doc/. ) + + default + + if use doc ; then rm "${ED}"/usr/share/doc/"${PF}"/html/{Makefile*,Doxyfile*} || die fi find "${ED}" -name '*.la' -delete || die - if ! use static-libs ; then - find "${ED}" -name "*.a" -delete || die - fi + find "${ED}" -name "*.a" -delete || die } diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libmspack/libmspack-0.11_alpha.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/libmspack/libmspack-0.11_alpha.ebuild new file mode 100644 index 00000000000..2a4ad5dfcc6 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-libs/libmspack/libmspack-0.11_alpha.ebuild @@ -0,0 +1,67 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools + +if [[ ${PV} == *9999 ]] ; then + EGIT_REPO_URI="https://github.com/kyz/libmspack.git" + inherit git-r3 + MY_P="${PN}-9999" +else + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~arm64-macos ~x64-macos ~x64-solaris" + MY_PV="${PV/_alpha/alpha}" + MY_P="${PN}-${MY_PV}" + SRC_URI="https://www.cabextract.org.uk/libmspack/libmspack-${MY_PV}.tar.gz" +fi + +DESCRIPTION="A library for Microsoft compression formats" +HOMEPAGE="https://www.cabextract.org.uk/libmspack/" + +LICENSE="LGPL-2.1" +SLOT="0" +IUSE="debug doc" + +S="${WORKDIR}/${MY_P}" + +src_prepare() { + if [[ ${PV} == *9999 ]] ; then + # Re-create file layout from release tarball + pushd "${WORKDIR}" > /dev/null || die + + cp -aL "${S}"/${PN} "${WORKDIR}"/${PN}-source || die + rm -r "${S}" || die + mv "${WORKDIR}"/${PN}-source "${S}" || die + + popd > /dev/null || die + fi + + default + + eautoreconf +} + +src_configure() { + econf $(use_enable debug) +} + +src_test() { + default + + cd "${S}"/test || die + ./cabd_test || die +} + +src_install() { + use doc && HTML_DOCS=( doc/. ) + + default + + if use doc ; then + rm "${ED}"/usr/share/doc/"${PF}"/html/{Makefile*,Doxyfile*} || die + fi + + find "${ED}" -name '*.la' -delete || die + find "${ED}" -name "*.a" -delete || die +} diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libmspack/libmspack-9999.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/libmspack/libmspack-9999.ebuild new file mode 100644 index 00000000000..2a4ad5dfcc6 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-libs/libmspack/libmspack-9999.ebuild @@ -0,0 +1,67 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools + +if [[ ${PV} == *9999 ]] ; then + EGIT_REPO_URI="https://github.com/kyz/libmspack.git" + inherit git-r3 + MY_P="${PN}-9999" +else + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~arm64-macos ~x64-macos ~x64-solaris" + MY_PV="${PV/_alpha/alpha}" + MY_P="${PN}-${MY_PV}" + SRC_URI="https://www.cabextract.org.uk/libmspack/libmspack-${MY_PV}.tar.gz" +fi + +DESCRIPTION="A library for Microsoft compression formats" +HOMEPAGE="https://www.cabextract.org.uk/libmspack/" + +LICENSE="LGPL-2.1" +SLOT="0" +IUSE="debug doc" + +S="${WORKDIR}/${MY_P}" + +src_prepare() { + if [[ ${PV} == *9999 ]] ; then + # Re-create file layout from release tarball + pushd "${WORKDIR}" > /dev/null || die + + cp -aL "${S}"/${PN} "${WORKDIR}"/${PN}-source || die + rm -r "${S}" || die + mv "${WORKDIR}"/${PN}-source "${S}" || die + + popd > /dev/null || die + fi + + default + + eautoreconf +} + +src_configure() { + econf $(use_enable debug) +} + +src_test() { + default + + cd "${S}"/test || die + ./cabd_test || die +} + +src_install() { + use doc && HTML_DOCS=( doc/. ) + + default + + if use doc ; then + rm "${ED}"/usr/share/doc/"${PF}"/html/{Makefile*,Doxyfile*} || die + fi + + find "${ED}" -name '*.la' -delete || die + find "${ED}" -name "*.a" -delete || die +} diff --git a/sdk_container/src/third_party/coreos-overlay/dev-libs/libmspack/metadata.xml b/sdk_container/src/third_party/portage-stable/dev-libs/libmspack/metadata.xml similarity index 76% rename from sdk_container/src/third_party/coreos-overlay/dev-libs/libmspack/metadata.xml rename to sdk_container/src/third_party/portage-stable/dev-libs/libmspack/metadata.xml index ea25c82c21f..98cc0646bef 100644 --- a/sdk_container/src/third_party/coreos-overlay/dev-libs/libmspack/metadata.xml +++ b/sdk_container/src/third_party/portage-stable/dev-libs/libmspack/metadata.xml @@ -5,4 +5,7 @@ reavertm@gentoo.org Maciej Mrozowski + + kyz/libmspack + diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/xmlsec/Manifest b/sdk_container/src/third_party/portage-stable/dev-libs/xmlsec/Manifest new file mode 100644 index 00000000000..3c2ede1438c --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-libs/xmlsec/Manifest @@ -0,0 +1,3 @@ +DIST xmlsec1-1.2.37.tar.gz 2009175 BLAKE2B 19f43ba6bf6eb49428b9c5563baecbab21476f326cceee13785ae16769afa258f100732831c0f3f7d160543bd075cdcfdc5cbf11b7406637ee6c2f0e27c07f30 SHA512 99220cb28a346ffac0023f9f177d6a7be3ddcea04bea434b7dc926c1f0aaa5564d75f74f92896ac100179c04d77e001f688ddf46fed4e0a0b4f20b7b87c24900 +DIST xmlsec1-1.2.38.tar.gz 2036578 BLAKE2B 03f7e1b5e659793bf1984c5a59582d9459089ce913620d5cc1e5a5d0eb65557580cd23fa190db277298fd7cc55bd41563b93cf61a37c8b7521a4690cd2ca3489 SHA512 724089777caae95db27e67f24381c066eaae23a9d64819a18bb04837c1ab1b380d19be2c7ee25659ca481d9eab96fcbe8027a430a0ac1630ad3b073cddd20fac +DIST xmlsec1-1.3.1.tar.gz 2432943 BLAKE2B 1dafdffd959579add5c579e3fa9c9f9ddc73ce4aadc6fc2139506e6e64ffcd1bbe7298786e414900eb9f33f93b0a47da64e686c499e48d4c80d81b256db6692e SHA512 7f30c15c3edcafe70fa5febaa0ba39f73f8d30525ee102b5961a658dd2842fbc58e63f7595f15b150d71bf735bfa7688c3694a191b0d475776ca26902d90d25f diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/xmlsec/files/xmlsec-1.2.37-libressl.patch b/sdk_container/src/third_party/portage-stable/dev-libs/xmlsec/files/xmlsec-1.2.37-libressl.patch new file mode 100644 index 00000000000..acdb535ba55 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-libs/xmlsec/files/xmlsec-1.2.37-libressl.patch @@ -0,0 +1,40 @@ +https://github.com/lsh123/xmlsec/pull/456 +https://github.com/lsh123/xmlsec/commit/c5469cfc8443c57a25a8783f0bd669f71e29bb04 +https://github.com/lsh123/xmlsec/pull/654 +https://github.com/lsh123/xmlsec/commit/dfdf981f3522e4059170b504fb6fd40b37c9d70f + +From c5469cfc8443c57a25a8783f0bd669f71e29bb04 Mon Sep 17 00:00:00 2001 +From: lsh123 +Date: Mon, 12 Dec 2022 10:34:56 -0500 +Subject: [PATCH] fix libressl (#456) + +--- + src/openssl/openssl_compat.h | 9 ++++++++- + 1 file changed, 8 insertions(+), 1 deletion(-) + +From d113d1e6355c4841fd03c6aa797d33bde1d064f3 Mon Sep 17 00:00:00 2001 +From: orbea +Date: Mon, 29 May 2023 07:46:58 -0700 +Subject: [PATCH] openssl_compat.h: Update LibreSSL UI_null() compat + +LibreSSL added UI_null() in 3.7.1. +--- + src/openssl/openssl_compat.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/src/openssl/openssl_compat.h ++++ b/src/openssl/openssl_compat.h +@@ -123,6 +123,13 @@ static inline int xmlSecOpenSSLCompatRand(unsigned char *buf, xmlSecSize size) { + * LibreSSL 2.7 compatibility (implements most of OpenSSL 1.1 API) + * + *****************************************************************************/ ++#if defined(LIBRESSL_VERSION_NUMBER) && (LIBRESSL_VERSION_NUMBER < 0x3070200fL) ++ ++/* Needed for Engine initialization */ ++#define UI_null() NULL ++ ++#endif /* defined(LIBRESSL_VERSION_NUMBER) */ ++ + #if defined(LIBRESSL_VERSION_NUMBER) && (LIBRESSL_VERSION_NUMBER < 0x30500000L) && defined(XMLSEC_OPENSSL_API_110) + /* EVP_CIPHER_CTX stuff */ + #define EVP_CIPHER_CTX_encrypting(x) ((x)->encrypt) diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/xmlsec/files/xmlsec-1.3.0-optimisation.patch b/sdk_container/src/third_party/portage-stable/dev-libs/xmlsec/files/xmlsec-1.3.0-optimisation.patch new file mode 100644 index 00000000000..2cd0401e019 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-libs/xmlsec/files/xmlsec-1.3.0-optimisation.patch @@ -0,0 +1,11 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -2482,7 +2482,7 @@ AC_ARG_ENABLE([pedantic], [AS_HELP_STRING([--enable-pedantic],[enable pedantic c + if test "z$enable_pedantic" = "zno" ; then + AC_MSG_RESULT([disabled]) + else +- CFLAGS="$CFLAGS -O -std=c99 -pedantic -pedantic-errors -W -Wall -Wextra" ++ CFLAGS="$CFLAGS -std=c99 -pedantic -W -Wall -Wextra" + CFLAGS="$CFLAGS -fno-inline -Wnull-dereference -Wdouble-promotion" + CFLAGS="$CFLAGS -Wformat=2 -Wformat-security -Wformat-nonliteral" + CFLAGS="$CFLAGS -Wconversion -Wunused -Wshadow -Wpointer-arith -Wcast-align" diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/xmlsec/metadata.xml b/sdk_container/src/third_party/portage-stable/dev-libs/xmlsec/metadata.xml new file mode 100644 index 00000000000..0f981c3c9b1 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-libs/xmlsec/metadata.xml @@ -0,0 +1,15 @@ + + + + + + Install xmlsec-gcrypt library + Install xmlsec-gnutls library + Allow fetching over HTTP via libxml2. + Install xmlsec-nss library + Install xmlsec-openssl library + + + lsh123/xmlsec + + diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/xmlsec/xmlsec-1.2.37.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/xmlsec/xmlsec-1.2.37.ebuild new file mode 100644 index 00000000000..65dfdf2c4a4 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-libs/xmlsec/xmlsec-1.2.37.ebuild @@ -0,0 +1,62 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DESCRIPTION="Command line tool for signing, verifying, encrypting and decrypting XML" +HOMEPAGE="https://www.aleksey.com/xmlsec" +SRC_URI="https://www.aleksey.com/xmlsec/download/${PN}1-${PV}.tar.gz" +S="${WORKDIR}/${PN}1-${PV}" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="amd64 arm arm64 ~loong ppc ppc64 ~riscv ~sparc x86" +IUSE="doc gcrypt gnutls nss +openssl static-libs test" +RESTRICT="!test? ( test )" +REQUIRED_USE="|| ( gcrypt gnutls nss openssl ) + gnutls? ( gcrypt )" + +RDEPEND=">=dev-libs/libxml2-2.7.4[ftp(+)] + >=dev-libs/libxslt-1.0.20 + dev-libs/libltdl + gcrypt? ( >=dev-libs/libgcrypt-1.4.0:= ) + gnutls? ( >=net-libs/gnutls-2.8.0:= ) + nss? ( + >=dev-libs/nspr-4.4.1 + >=dev-libs/nss-3.9 + ) + openssl? ( + dev-libs/openssl:= + )" +DEPEND="${RDEPEND}" +BDEPEND="virtual/pkgconfig + test? ( + nss? ( + >=dev-libs/nss-3.9[utils] + ) + )" + +src_configure() { + # Bash because of bug #721128 + CONFIG_SHELL="${BROOT}"/bin/bash econf \ + $(use_enable doc docs) \ + $(use_enable static-libs static) \ + $(use_with gcrypt) \ + $(use_with gnutls) \ + $(use_with nss nspr) \ + $(use_with nss) \ + $(use_with openssl) \ + --enable-mans \ + --enable-pkgconfig +} + +src_test() { + # See https://github.com/lsh123/xmlsec/issues/280 for TZ=UTC + TZ=UTC SHELL="${BROOT}"/bin/bash emake TMPFOLDER="${T}" check +} + +src_install() { + default + + find "${ED}" -name '*.la' -delete || die +} diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/xmlsec/xmlsec-1.2.38.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/xmlsec/xmlsec-1.2.38.ebuild new file mode 100644 index 00000000000..7db6d541822 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-libs/xmlsec/xmlsec-1.2.38.ebuild @@ -0,0 +1,72 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DESCRIPTION="Command line tool for signing, verifying, encrypting and decrypting XML" +HOMEPAGE="https://www.aleksey.com/xmlsec" +SRC_URI="https://www.aleksey.com/xmlsec/download/${PN}1-${PV}.tar.gz" +S="${WORKDIR}/${PN}1-${PV}" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86" +IUSE="doc gcrypt gnutls nss +openssl static-libs test" +RESTRICT="!test? ( test )" +REQUIRED_USE=" + || ( gcrypt gnutls nss openssl ) + gnutls? ( gcrypt ) +" + +RDEPEND=" + >=dev-libs/libxml2-2.7.4[ftp(+)] + >=dev-libs/libxslt-1.0.20 + dev-libs/libltdl + gcrypt? ( >=dev-libs/libgcrypt-1.4.0:= ) + gnutls? ( >=net-libs/gnutls-2.8.0:= ) + nss? ( + >=dev-libs/nspr-4.4.1 + >=dev-libs/nss-3.9 + ) + openssl? ( + dev-libs/openssl:= + ) +" +DEPEND="${RDEPEND}" +BDEPEND=" + virtual/pkgconfig + test? ( + nss? ( + >=dev-libs/nss-3.9[utils] + ) + ) +" + +PATCHES=( + "${FILESDIR}"/${PN}-1.2.37-libressl.patch # bug #903001 +) + +src_configure() { + # Bash because of bug #721128 + CONFIG_SHELL="${BROOT}"/bin/bash econf \ + $(use_enable doc docs) \ + $(use_enable static-libs static) \ + $(use_with gcrypt) \ + $(use_with gnutls) \ + $(use_with nss nspr) \ + $(use_with nss) \ + $(use_with openssl) \ + --enable-mans \ + --enable-pkgconfig +} + +src_test() { + # See https://github.com/lsh123/xmlsec/issues/280 for TZ=UTC + TZ=UTC SHELL="${BROOT}"/bin/bash emake TMPFOLDER="${T}" check +} + +src_install() { + default + + find "${ED}" -name '*.la' -delete || die +} diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/xmlsec/xmlsec-1.3.1.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/xmlsec/xmlsec-1.3.1.ebuild new file mode 100644 index 00000000000..1508b3b8def --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-libs/xmlsec/xmlsec-1.3.1.ebuild @@ -0,0 +1,93 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools + +DESCRIPTION="Command line tool for signing, verifying, encrypting and decrypting XML" +HOMEPAGE="https://www.aleksey.com/xmlsec" +SRC_URI="https://www.aleksey.com/xmlsec/download/${PN}1-${PV}.tar.gz" +S="${WORKDIR}/${PN}1-${PV}" + +LICENSE="MIT" +# Upstream consider major version bumps to be changes in either X or Y in X.Y.Z +SLOT="0/$(ver_cut 1-2)" +KEYWORDS="amd64 arm arm64 ~loong ppc ppc64 ~riscv ~sparc x86" +IUSE="doc gcrypt gnutls http nss +openssl static-libs test" +RESTRICT="!test? ( test )" +REQUIRED_USE=" + || ( gnutls nss openssl ) +" + +RDEPEND=" + >=dev-libs/libxml2-2.7.4 + >=dev-libs/libxslt-1.0.20 + dev-libs/libltdl + gcrypt? ( >=dev-libs/libgcrypt-1.4.0:= ) + gnutls? ( >=net-libs/gnutls-3.6.13:= ) + nss? ( + >=dev-libs/nspr-4.4.1 + >=dev-libs/nss-3.9 + ) + openssl? ( dev-libs/openssl:= ) +" +DEPEND="${RDEPEND}" +BDEPEND=" + virtual/pkgconfig + test? ( + nss? ( + >=dev-libs/nss-3.9[utils] + ) + ) +" + +PATCHES=( + "${FILESDIR}"/${PN}-1.3.0-optimisation.patch +) + +src_prepare() { + default + + eautoreconf +} + +src_configure() { + local myeconfargs=( + $(use_enable doc docs) + $(use_enable static-libs static) + $(use_with gcrypt) + $(use_with gnutls) + $(use_with nss nspr) + $(use_with nss) + $(use_with openssl) + + --disable-werror + --enable-mans + --enable-pkgconfig + + --enable-concatkdf + --enable-pbkdf2 + --enable-ec + --enable-dh + --enable-sha3 + + --enable-files + $(use_enable http) + --disable-ftp + ) + + # Bash because of bug #721128 + CONFIG_SHELL="${BROOT}"/bin/bash econf "${myeconfargs[@]}" +} + +src_test() { + # See https://github.com/lsh123/xmlsec/issues/280 for TZ=UTC + TZ=UTC SHELL="${BROOT}"/bin/bash emake TMPFOLDER="${T}" check +} + +src_install() { + default + + find "${ED}" -name '*.la' -delete || die +} diff --git a/sdk_container/src/third_party/portage-stable/net-libs/rpcsvc-proto/Manifest b/sdk_container/src/third_party/portage-stable/net-libs/rpcsvc-proto/Manifest new file mode 100644 index 00000000000..2141468596b --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/net-libs/rpcsvc-proto/Manifest @@ -0,0 +1 @@ +DIST rpcsvc-proto-1.4.4.tar.xz 168648 BLAKE2B 2cba39b0307d773133306c4222e43cc44d4189bb125f993634b2a5e7679e5f5b4d28b05b95db6e694d316b4fdd182cf91c2a01ed1c519a3ca7ced5ebf5da3d10 SHA512 0138ac8fb2d8de3cb56f661bd1b6435fa0a35d3bd12c5cb7081c9ae1701e3620f47fe3dd002263db456655b61316749768e9a1a44325a1a6a542beae364a0393 diff --git a/sdk_container/src/third_party/portage-stable/net-libs/rpcsvc-proto/metadata.xml b/sdk_container/src/third_party/portage-stable/net-libs/rpcsvc-proto/metadata.xml new file mode 100644 index 00000000000..779ecf1ccbe --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/net-libs/rpcsvc-proto/metadata.xml @@ -0,0 +1,15 @@ + + + + + toolchain@gentoo.org + Gentoo Toolchain Project + + + base-system@gentoo.org + Gentoo Base System Project + + + thkukuk/rpcsvc-proto + + diff --git a/sdk_container/src/third_party/coreos-overlay/net-libs/rpcsvc-proto/rpcsvc-proto-0.ebuild b/sdk_container/src/third_party/portage-stable/net-libs/rpcsvc-proto/rpcsvc-proto-0-r1.ebuild similarity index 89% rename from sdk_container/src/third_party/coreos-overlay/net-libs/rpcsvc-proto/rpcsvc-proto-0.ebuild rename to sdk_container/src/third_party/portage-stable/net-libs/rpcsvc-proto/rpcsvc-proto-0-r1.ebuild index 865a87574ec..95113756b22 100644 --- a/sdk_container/src/third_party/coreos-overlay/net-libs/rpcsvc-proto/rpcsvc-proto-0.ebuild +++ b/sdk_container/src/third_party/portage-stable/net-libs/rpcsvc-proto/rpcsvc-proto-0-r1.ebuild @@ -1,17 +1,16 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=6 +EAPI=8 DESCRIPTION="rpcsvc protocol definitions from glibc" HOMEPAGE="https://github.com/thkukuk/rpcsvc-proto" # Fake version to help portage upgrading. -SLOT="0" LICENSE="LGPL-2.1+ BSD" +SLOT="0" KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~s390 sparc x86 ~amd64-linux ~x86-linux" -IUSE="" DEPEND="elibc_glibc? ( sys-libs/glibc[rpc(-)] )" RDEPEND="${DEPEND}" diff --git a/sdk_container/src/third_party/portage-stable/net-libs/rpcsvc-proto/rpcsvc-proto-1.4.4.ebuild b/sdk_container/src/third_party/portage-stable/net-libs/rpcsvc-proto/rpcsvc-proto-1.4.4.ebuild new file mode 100644 index 00000000000..a8c26ec4e97 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/net-libs/rpcsvc-proto/rpcsvc-proto-1.4.4.ebuild @@ -0,0 +1,44 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DESCRIPTION="rpcsvc protocol definitions from glibc" +HOMEPAGE="https://github.com/thkukuk/rpcsvc-proto" +SRC_URI="https://github.com/thkukuk/rpcsvc-proto/releases/download/v${PV}/${P}.tar.xz" + +LICENSE="LGPL-2.1+ BSD" +SLOT="0" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" + +RDEPEND=" + !/dev/null; then + cpp=${x} + break + fi + done + [[ -n ${cpp} ]] || die "Unable to find cpp" + sed -i -e "s/CPP = \"cpp\";/CPP = \"${cpp}\";/" rpcgen/rpc_main.c || die +} + +src_install() { + default + + # provided by sys-fs/quota[rpc] + rm "${ED}"/usr/include/rpcsvc/rquota.{x,h} || die +} diff --git a/sdk_container/src/third_party/portage-stable/sys-fs/fuse-common/Manifest b/sdk_container/src/third_party/portage-stable/sys-fs/fuse-common/Manifest new file mode 100644 index 00000000000..c63c77bce90 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-fs/fuse-common/Manifest @@ -0,0 +1 @@ +DIST fuse-3.10.4.tar.xz 2787472 BLAKE2B 174b51bf55544bbc08e04089a4d8685b371d3f584e337ed0d8d82c62e10c14b6ef14a964d6627e8a121036db1ab4c6c1ccd413c08f8685d3d91893874427e46f SHA512 1cb7600dc04f148b15ec3183d0348320dd946cf15d4077798e7e34fe7e8202837718c8b8bd1f190b7dddda2453ee2b0433d77e18f142ecb7affec1cae29520f6 diff --git a/sdk_container/src/third_party/portage-stable/sys-fs/fuse-common/files/fuse.init b/sdk_container/src/third_party/portage-stable/sys-fs/fuse-common/files/fuse.init new file mode 100644 index 00000000000..6c99929c226 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-fs/fuse-common/files/fuse.init @@ -0,0 +1,35 @@ +#!/sbin/openrc-run +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +MOUNTPOINT=/sys/fs/fuse/connections + +depend() { + need localmount +} + +start() { + + ebegin "Starting fuse" + if ! grep -qw fuse /proc/filesystems; then + modprobe fuse >/dev/null 2>&1 || eerror $? "Error loading fuse module" + fi + if grep -qw fusectl /proc/filesystems && \ + ! grep -qw $MOUNTPOINT /proc/mounts; then + mount -t fusectl none $MOUNTPOINT >/dev/null 2>&1 || \ + eerror $? "Error mounting control filesystem" + fi + eend ${?} + +} + +stop() { + + ebegin "Stopping fuse" + if grep -qw $MOUNTPOINT /proc/mounts; then + umount $MOUNTPOINT >/dev/null 2>&1 || \ + eerror $? "Error unmounting control filesystem" + fi + eend ${?} + +} diff --git a/sdk_container/src/third_party/portage-stable/sys-fs/fuse-common/fuse-common-3.10.4.ebuild b/sdk_container/src/third_party/portage-stable/sys-fs/fuse-common/fuse-common-3.10.4.ebuild new file mode 100644 index 00000000000..8fd9d127f57 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-fs/fuse-common/fuse-common-3.10.4.ebuild @@ -0,0 +1,32 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit udev + +DESCRIPTION="Common files for multiple slots of sys-fs/fuse" +HOMEPAGE="https://github.com/libfuse/libfuse" +SRC_URI="https://github.com/libfuse/libfuse/releases/download/fuse-${PV}/fuse-${PV}.tar.xz" + +LICENSE="GPL-2 LGPL-2.1" +SLOT="0" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" + +BDEPEND="virtual/pkgconfig" +RDEPEND="! + + + + base-system@gentoo.org + + + libfuse/libfuse + + diff --git a/sdk_container/src/third_party/portage-stable/sys-fs/fuse/Manifest b/sdk_container/src/third_party/portage-stable/sys-fs/fuse/Manifest new file mode 100644 index 00000000000..a9d70908711 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-fs/fuse/Manifest @@ -0,0 +1,5 @@ +DIST fuse-2.9.9.tar.gz 1813177 BLAKE2B 9e9141380bda46eb0bcce325c6fd293fe3844fe884a4952bb38d4b89dc48b728ffcc891038b3a7a861f05acfacce9dd7bb0e11d600609f3ad0ab278ccbe98847 SHA512 3d82fafd04f2924299bb09d2bb144935fa004a43fb9a6568e2e1cc5a60fded2efa1711029a0d7f12b3e6e4501f7217f2ee3545646d89da8dece083cb390f23e2 +DIST fuse-3.15.0.tar.xz 4589124 BLAKE2B 4777a956f8429aee2e5da43b9606ac6acc66744943739051f2be87a646b93c2aaa8f0b7f0c188f6d1724c1ab3fdf706d35c981066b0ba8c4dd647c0eb1f3c821 SHA512 5046b827c2cdccd03031761aeb995caf159f075a16cdda7248fcdd81177500f337368208948e0ff0e4bee32d06dd3d2d966828d3b5e82a79339f28a01727b1ae +DIST fuse-3.15.1.tar.gz 14078062 BLAKE2B 8842874c65f9bcd4f867175f9c6ca496c02069f269ac16e588307e5d9cb67b6251511f9015e830f6015ca492c05824445a75091210e0bc78b5416f208201ca80 SHA512 927132acff5f313257b39a487d2bb1cb47a4e2a71b49ffc2a2d3428cea22f7c57d133fe93fefc943fec8271802ecd1ddbd43e5e1f534b8ddf2036c1039902ffd +DIST fuse-3.16.1.tar.gz 14175331 BLAKE2B 80bdf704d2251edba795f50e5623ba5194c36bbc940a185f3a7b4f7d965b7e7d8a81650c4c1dfe33ad73010cbdd841063b2f07356b3b2b70794af2072f8bf377 SHA512 3f07919a7451a30d05bc174e2f8ec2c65b6225e63b4bbb40f2b097d760d4aa9b753a1da5da4874855094a01979fc4313ffabce54668ed20a6900f5eed92912c8 +DIST iconv.m4.bz2 3057 BLAKE2B 9d8f7637d87bfcea1b60f3ea11e162aecf391b3f4579a3b85afb01735f56bfbae363a7e781279f3b2bed0d1dd3336f7d0678d3b1d59004824d7d0ca848dceb6e SHA512 9899368b8acc06e216a7a548b83a894f780e152a02612cd52af02b5c3f2ff38e2c36e77bda300587f81c3d74c90addec8066885216fa0e74f3f3280a383d2b55 diff --git a/sdk_container/src/third_party/portage-stable/sys-fs/fuse/files/fuse-2.9.3-kernel-types.patch b/sdk_container/src/third_party/portage-stable/sys-fs/fuse/files/fuse-2.9.3-kernel-types.patch new file mode 100644 index 00000000000..52d9658a2d8 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-fs/fuse/files/fuse-2.9.3-kernel-types.patch @@ -0,0 +1,19 @@ +this is a minimal version of: +https://sourceforge.net/p/fuse/fuse/ci/6b02a7082ae4c560427ff95b51aa8930bb4a6e1f/ + +--- a/include/fuse_kernel.h ++++ b/include/fuse_kernel.h +@@ -88,12 +88,7 @@ + #ifndef _LINUX_FUSE_H + #define _LINUX_FUSE_H + +-#include +-#define __u64 uint64_t +-#define __s64 int64_t +-#define __u32 uint32_t +-#define __s32 int32_t +-#define __u16 uint16_t ++#include + + /* + * Version negotiation: diff --git a/sdk_container/src/third_party/portage-stable/sys-fs/fuse/files/fuse-2.9.9-avoid-calling-umount.patch b/sdk_container/src/third_party/portage-stable/sys-fs/fuse/files/fuse-2.9.9-avoid-calling-umount.patch new file mode 100644 index 00000000000..b5c141d29ed --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-fs/fuse/files/fuse-2.9.9-avoid-calling-umount.patch @@ -0,0 +1,38 @@ +From acb69eca6c25db44523efb4cb1e7088ae66d093d Mon Sep 17 00:00:00 2001 +From: Sam James +Date: Tue, 3 Aug 2021 23:14:12 +0100 +Subject: [PATCH] Avoid calling umount + +Converting a sed into a patch. + +Ebuild had: + # sandbox violation with mtab writability wrt #438250 + # don't sed configure.in without eautoreconf because of maintainer mode + sed -i 's:umount --fake:true --fake:' configure || die + +Bug: https://bugs.gentoo.org/438250 +--- + configure.ac | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 9946a0e..de433cb 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -101,11 +101,11 @@ util_linux_ok=yes + if test "$arch" = linux -a "$cross_compiling" != "yes"; then + AC_MSG_CHECKING([if umount supports --fake --no-canonicalize]) + # exit code of umount is 1 if option is unrecognised, 2 otherwise +- umount --fake --no-canonicalize > /dev/null 2>&1 ++ true --fake --no-canonicalize > /dev/null 2>&1 + if test $? != 1; then + AC_MSG_RESULT([yes]) + else +- firstline=`umount --fake --no-canonicalize 2>&1 | head -1` ++ firstline=`true --fake --no-canonicalize 2>&1 | head -1` + if test "$firstline" = 'umount: only root can use "--fake" option'; then + AC_MSG_RESULT([yes]) + else +-- +2.32.0 + diff --git a/sdk_container/src/third_party/portage-stable/sys-fs/fuse/files/fuse-2.9.9-closefrom-glibc-2-34.patch b/sdk_container/src/third_party/portage-stable/sys-fs/fuse/files/fuse-2.9.9-closefrom-glibc-2-34.patch new file mode 100644 index 00000000000..beb8d51da1e --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-fs/fuse/files/fuse-2.9.9-closefrom-glibc-2-34.patch @@ -0,0 +1,60 @@ +From ae2352bca9b4e607538412da0cc2a9625cd8b692 Mon Sep 17 00:00:00 2001 +From: Sam James +Date: Sat, 24 Jul 2021 22:02:45 +0100 +Subject: [PATCH] util/ulockmgr_server.c: conditionally define closefrom (fix + glibc-2.34+) + +closefrom(3) has joined us in glibc-land from *BSD and Solaris. Since +it's available in glibc 2.34+, we want to detect it and only define our +fallback if the libc doesn't provide it. + +Bug: https://bugs.gentoo.org/803923 +Signed-off-by: Sam James +--- + configure.ac | 1 + + util/ulockmgr_server.c | 6 ++++++ + 2 files changed, 7 insertions(+) + +diff --git a/configure.ac b/configure.ac +index 9946a0efa..a2d481aa9 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -55,6 +55,7 @@ fi + + AC_CHECK_FUNCS([fork setxattr fdatasync splice vmsplice utimensat]) + AC_CHECK_FUNCS([posix_fallocate]) ++AC_CHECK_FUNCS([closefrom]) + AC_CHECK_MEMBERS([struct stat.st_atim]) + AC_CHECK_MEMBERS([struct stat.st_atimespec]) + +diff --git a/util/ulockmgr_server.c b/util/ulockmgr_server.c +index 273c7d923..a04dac5c6 100644 +--- a/util/ulockmgr_server.c ++++ b/util/ulockmgr_server.c +@@ -22,6 +22,10 @@ + #include + #include + ++#ifdef HAVE_CONFIG_H ++ #include "config.h" ++#endif ++ + struct message { + unsigned intr : 1; + unsigned nofd : 1; +@@ -124,6 +128,7 @@ static int receive_message(int sock, void *buf, size_t buflen, int *fdp, + return res; + } + ++#if !defined(HAVE_CLOSEFROM) + static int closefrom(int minfd) + { + DIR *dir = opendir("/proc/self/fd"); +@@ -141,6 +146,7 @@ static int closefrom(int minfd) + } + return 0; + } ++#endif + + static void send_reply(int cfd, struct message *msg) + { diff --git a/sdk_container/src/third_party/portage-stable/sys-fs/fuse/fuse-2.9.9-r2.ebuild b/sdk_container/src/third_party/portage-stable/sys-fs/fuse/fuse-2.9.9-r2.ebuild new file mode 100644 index 00000000000..93b3e2a8d0d --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-fs/fuse/fuse-2.9.9-r2.ebuild @@ -0,0 +1,78 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit autotools flag-o-matic linux-info udev + +DESCRIPTION="An interface for filesystems implemented in userspace" +HOMEPAGE="https://github.com/libfuse/libfuse" +SRC_URI="https://github.com/libfuse/libfuse/releases/download/${P}/${P}.tar.gz" +# For bug #809920 to avoid a gettext dependency +# extracted from sys-devel/gettext-0.21-r1 +SRC_URI+=" https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/iconv.m4.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux" +IUSE="examples static-libs" + +BDEPEND="sys-devel/gettext + virtual/pkgconfig" +RDEPEND=">=sys-fs/fuse-common-3.3.0-r1" + +PATCHES=( + "${FILESDIR}"/${PN}-2.9.3-kernel-types.patch + "${FILESDIR}"/${PN}-2.9.9-avoid-calling-umount.patch + "${FILESDIR}"/${PN}-2.9.9-closefrom-glibc-2-34.patch +) + +pkg_setup() { + if use kernel_linux ; then + CONFIG_CHECK="~FUSE_FS" + WARNING_FUSE_FS="You need to have FUSE module built to use user-mode utils" + linux-info_pkg_setup + fi +} + +src_prepare() { + default + + # Can be dropped along with additional SRC_URI if dropping eautoreconf + cp "${WORKDIR}"/iconv.m4 m4/ || die + eautoreconf +} + +src_configure() { + # lto not supported yet -- https://github.com/libfuse/libfuse/issues/198 + # gcc-9 with -flto leads to link failures: #663518 (see also #863899) + # https://gcc.gnu.org/PR91186 + filter-lto + # ... and strict aliasing warnings, bug #863899 + append-flags -fno-strict-aliasing + + econf \ + INIT_D_PATH="${EPREFIX}/etc/init.d" \ + MOUNT_FUSE_PATH="${EPREFIX}/sbin" \ + UDEV_RULES_PATH="${EPREFIX}/$(get_udevdir)/rules.d" \ + $(use_enable static-libs static) \ + --disable-example +} + +src_install() { + local DOCS=( AUTHORS ChangeLog README.md README.NFS NEWS doc/how-fuse-works doc/kernel.txt ) + default + + if use examples ; then + docinto examples + dodoc example/* + fi + + find "${ED}" -name '*.la' -delete || die + + # installed via fuse-common + rm -r "${ED}"/{etc,$(get_udevdir)} || die + + # handled by the device manager + rm -r "${D}"/dev || die +} diff --git a/sdk_container/src/third_party/portage-stable/sys-fs/fuse/fuse-3.15.0.ebuild b/sdk_container/src/third_party/portage-stable/sys-fs/fuse/fuse-3.15.0.ebuild new file mode 100644 index 00000000000..7bcca0ad688 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-fs/fuse/fuse-3.15.0.ebuild @@ -0,0 +1,74 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..11} ) +inherit flag-o-matic meson-multilib udev python-any-r1 + +DESCRIPTION="An interface for filesystems implemented in userspace" +HOMEPAGE="https://github.com/libfuse/libfuse" +SRC_URI="https://github.com/libfuse/libfuse/releases/download/${P}/${P}.tar.xz" + +LICENSE="GPL-2 LGPL-2.1" +SLOT="3" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" +IUSE="+suid test" +RESTRICT="!test? ( test ) test? ( userpriv )" + +BDEPEND=" + virtual/pkgconfig + test? ( + ${PYTHON_DEPS} + $(python_gen_any_dep 'dev-python/pytest[${PYTHON_USEDEP}]') + ) +" +RDEPEND=">=sys-fs/fuse-common-3.3.0-r1" + +DOCS=( AUTHORS ChangeLog.rst README.md doc/README.NFS doc/kernel.txt ) + +python_check_deps() { + python_has_version "dev-python/pytest[${PYTHON_USEDEP}]" +} + +pkg_setup() { + use test && python-any-r1_pkg_setup +} + +multilib_src_configure() { + # bug #853058 + filter-lto + + local emesonargs=( + $(meson_use test examples) + $(meson_use test tests) + -Duseroot=false + -Dinitscriptdir= + -Dudevrulesdir="${EPREFIX}$(get_udevdir)/rules.d" + ) + meson_src_configure +} + +src_test() { + if has sandbox ${FEATURES}; then + ewarn "Sandbox enabled, skipping tests" + else + multilib-minimal_src_test + fi +} + +multilib_src_test() { + epytest +} + +multilib_src_install_all() { + # Installed via fuse-common + rm -r "${ED}"{/etc,$(get_udevdir)} || die + + # useroot=false prevents the build system from doing this. + use suid && fperms u+s /usr/bin/fusermount3 + + # manually install man pages to respect compression + rm -r "${ED}"/usr/share/man || die + doman doc/{fusermount3.1,mount.fuse3.8} +} diff --git a/sdk_container/src/third_party/portage-stable/sys-fs/fuse/fuse-3.15.1.ebuild b/sdk_container/src/third_party/portage-stable/sys-fs/fuse/fuse-3.15.1.ebuild new file mode 100644 index 00000000000..10840ae807b --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-fs/fuse/fuse-3.15.1.ebuild @@ -0,0 +1,74 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..11} ) +inherit flag-o-matic meson-multilib udev python-any-r1 + +DESCRIPTION="An interface for filesystems implemented in userspace" +HOMEPAGE="https://github.com/libfuse/libfuse" +SRC_URI="https://github.com/libfuse/libfuse/releases/download/${P}/${P}.tar.gz" + +LICENSE="GPL-2 LGPL-2.1" +SLOT="3" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" +IUSE="+suid test" +RESTRICT="!test? ( test ) test? ( userpriv )" + +BDEPEND=" + virtual/pkgconfig + test? ( + ${PYTHON_DEPS} + $(python_gen_any_dep 'dev-python/pytest[${PYTHON_USEDEP}]') + ) +" +RDEPEND=">=sys-fs/fuse-common-3.3.0-r1" + +DOCS=( AUTHORS ChangeLog.rst README.md doc/README.NFS doc/kernel.txt ) + +python_check_deps() { + python_has_version "dev-python/pytest[${PYTHON_USEDEP}]" +} + +pkg_setup() { + use test && python-any-r1_pkg_setup +} + +multilib_src_configure() { + # bug #853058 + filter-lto + + local emesonargs=( + $(meson_use test examples) + $(meson_use test tests) + -Duseroot=false + -Dinitscriptdir= + -Dudevrulesdir="${EPREFIX}$(get_udevdir)/rules.d" + ) + meson_src_configure +} + +src_test() { + if has sandbox ${FEATURES}; then + ewarn "Sandbox enabled, skipping tests" + else + multilib-minimal_src_test + fi +} + +multilib_src_test() { + epytest +} + +multilib_src_install_all() { + # Installed via fuse-common + rm -r "${ED}"{/etc,$(get_udevdir)} || die + + # useroot=false prevents the build system from doing this. + use suid && fperms u+s /usr/bin/fusermount3 + + # manually install man pages to respect compression + rm -r "${ED}"/usr/share/man || die + doman doc/{fusermount3.1,mount.fuse3.8} +} diff --git a/sdk_container/src/third_party/portage-stable/sys-fs/fuse/fuse-3.16.1.ebuild b/sdk_container/src/third_party/portage-stable/sys-fs/fuse/fuse-3.16.1.ebuild new file mode 100644 index 00000000000..d70683145e0 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-fs/fuse/fuse-3.16.1.ebuild @@ -0,0 +1,74 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..11} ) +inherit flag-o-matic meson-multilib udev python-any-r1 + +DESCRIPTION="An interface for filesystems implemented in userspace" +HOMEPAGE="https://github.com/libfuse/libfuse" +SRC_URI="https://github.com/libfuse/libfuse/releases/download/${P}/${P}.tar.gz" + +LICENSE="GPL-2 LGPL-2.1" +SLOT="3" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +IUSE="+suid test" +RESTRICT="!test? ( test ) test? ( userpriv )" + +BDEPEND=" + virtual/pkgconfig + test? ( + ${PYTHON_DEPS} + $(python_gen_any_dep 'dev-python/pytest[${PYTHON_USEDEP}]') + ) +" +RDEPEND=">=sys-fs/fuse-common-3.3.0-r1" + +DOCS=( AUTHORS ChangeLog.rst README.md doc/README.NFS doc/kernel.txt ) + +python_check_deps() { + python_has_version "dev-python/pytest[${PYTHON_USEDEP}]" +} + +pkg_setup() { + use test && python-any-r1_pkg_setup +} + +multilib_src_configure() { + # bug #853058 + filter-lto + + local emesonargs=( + $(meson_use test examples) + $(meson_use test tests) + -Duseroot=false + -Dinitscriptdir= + -Dudevrulesdir="${EPREFIX}$(get_udevdir)/rules.d" + ) + meson_src_configure +} + +src_test() { + if has sandbox ${FEATURES}; then + ewarn "Sandbox enabled, skipping tests" + else + multilib-minimal_src_test + fi +} + +multilib_src_test() { + epytest +} + +multilib_src_install_all() { + # Installed via fuse-common + rm -r "${ED}"{/etc,$(get_udevdir)} || die + + # useroot=false prevents the build system from doing this. + use suid && fperms u+s /usr/bin/fusermount3 + + # manually install man pages to respect compression + rm -r "${ED}"/usr/share/man || die + doman doc/{fusermount3.1,mount.fuse3.8} +} diff --git a/sdk_container/src/third_party/portage-stable/sys-fs/fuse/metadata.xml b/sdk_container/src/third_party/portage-stable/sys-fs/fuse/metadata.xml new file mode 100644 index 00000000000..1bd33fd4136 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-fs/fuse/metadata.xml @@ -0,0 +1,11 @@ + + + + + base-system@gentoo.org + + + cpe:/a:fuse:fuse + libfuse/libfuse + +