Merge pull request #1146 from flatcar/krnowak/vmware-sysext

Sysext image for VMware OEM
This commit is contained in:
Krzesimir Nowak 2023-09-25 14:51:02 +02:00 committed by GitHub
commit c593d76e7a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
76 changed files with 1806 additions and 343 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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))

View File

@ -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.

View File

@ -0,0 +1,24 @@
From fdf599994d58ef47b73dc94d21d3556a2ec5d9da Mon Sep 17 00:00:00 2001
From: Mike Gilbert <floppym@gentoo.org>
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

View File

@ -0,0 +1,26 @@
From 08caf83eaa0e66cee8f3e49479cd201a10bb3919 Mon Sep 17 00:00:00 2001
From: Mike Gilbert <floppym@gentoo.org>
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

View File

@ -0,0 +1,2 @@
#!/bin/sh
hgfsmounter "$@" >/dev/null 2>&1 || vmhgfs-fuse "$@"

View File

@ -1,31 +0,0 @@
From d41aae8430eb0148dda9f71f311626bbe779d115 Mon Sep 17 00:00:00 2001
From: Benjamin Gilbert <benjamin.gilbert@coreos.com>
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

View File

@ -0,0 +1,2 @@
# Set this to no to disable drag and drop (and vmblock) loading.
VM_DRAG_AND_DROP="yes"

View File

@ -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
}

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -1,14 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>floppym@gentoo.org</email>
<name>Mike Gilbert</name>
</maintainer>
<maintainer type="project">
<email>vmware@gentoo.org</email>
<name>Gentoo VMware Project</name>
</maintainer>
<!-- maintainer-needed -->
<longdescription>
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.
</longdescription>
<use>
<flag name="caf">Build Common Agent Framework</flag>
<flag name="deploypkg">Build deploypkg plugin</flag>
<flag name="dnet">Enable support for nicinfo</flag>
<flag name="doc">Generate API documentation</flag>
<flag name="fuse">Enable vmblock-fuse/vmhgfs-fuse</flag>
<flag name="grabbitmqproxy">Build grabbitmqproxy plugin</flag>
<flag name="gtkmm">Compile with Gtkmm and sigc++ (Recommended)</flag>
<flag name="multimon">Enable multimon (Requires X)</flag>
<flag name="pic">Force shared libraries to be built as PIC</flag>
<flag name="resolutionkms">Build the linux/unix resolutionkms module</flag>
<flag name="vgauth">Build vgauth</flag>
<flag name="xml-security-c">Build vgauth with xml-security-c instead of xmlsec1</flag>
<flag name="xmlsec">Build vgauth with xmlsec1 instead of xml-security-c</flag>
</use>
<upstream>
<remote-id type="github">vmware/open-vm-tools</remote-id>
<remote-id type="cpe">cpe:/a:vmware:tools</remote-id>
</upstream>
</pkgmetadata>

View File

@ -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
}

View File

@ -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
}

View File

@ -4,8 +4,9 @@
EAPI=8
OEMIDS=(
qemu
azure
qemu
vmware
)
DESCRIPTION='Common OEM files'

View File

@ -0,0 +1 @@
set linux_append="flatcar.autologin"

View File

@ -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/

View File

@ -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.

View File

@ -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
}
]
}
}

View File

@ -0,0 +1,3 @@
[Service]
PrivateTmp=true
ExecStartPre=/usr/bin/ln -sfrT /usr/share/flatcar/oem-vmware/vmware-tools /etc/vmware-tools

View File

@ -1,4 +0,0 @@
# Flatcar GRUB settings
set oem_id="vmware"
set linux_append="flatcar.autologin"

View File

@ -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[@]}"

View File

@ -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"

View File

@ -0,0 +1,2 @@
[Unit]
Upholds=vmtoolsd.service vgauthd.service

View File

@ -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"
}

View File

@ -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"
}

View File

@ -0,0 +1,26 @@
From 115fca8a25d3705b494f41e59248c2cad17a16cb Mon Sep 17 00:00:00 2001
From: Krzesimir Nowak <knowak@microsoft.com>
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

View File

@ -0,0 +1,26 @@
From 115fca8a25d3705b494f41e59248c2cad17a16cb Mon Sep 17 00:00:00 2001
From: Krzesimir Nowak <knowak@microsoft.com>
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

View File

@ -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.

View File

@ -1 +0,0 @@
DIST libdnet-1.14.tar.gz 520833 BLAKE2B 97e241fc374fc9489e70d440db5e19199f4e653650af85e24af56bbbc0167db1c451349c43fcb630a26c61f8ca15c58f5c879e0d82654e275189ca3e140bb22a SHA512 ce8d95228f5175e4d9a8ff71bb99eb1ccc3ccd599a85dd07adbfd9842fc54066235d362c8060828fb3ba8129d0e1e8e071e93d60d69c6d03be310c80e61cea93

View File

@ -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.

View File

@ -1 +0,0 @@
DIST rpcsvc-proto-1.4.2.tar.gz 61788 BLAKE2B e941fa86088d690e3e80a501beb5169a51ff77b60d618f54db9d9fd5fb96c2b2a4277ab8d847dcdb29dadd2f6947d155b15cd8b6af1f1420e023da8637d555c0 SHA512 6769f9439e3f187eebdeef4ee8d54f8a6fee6f410e3137d0c1b26e61b705873932890856faff55b68c39aa702e456b36fe9410b85baf1ef9b20ee97f2158971a

View File

@ -1,12 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>toolchain@gentoo.org</email>
<name>Gentoo Toolchain Project</name>
</maintainer>
<maintainer type="project">
<email>base-system@gentoo.org</email>
<name>Gentoo Base System Project</name>
</maintainer>
</pkgmetadata>

View File

@ -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="
!<sys-libs/glibc-2.26
virtual/libintl
"
src_prepare() {
default
eautoreconf
# Use ${CHOST}-cpp, not 'cpp': bug #718138
# Ideally we should use @CPP@ but rpcgen makes it hard to use '${CHOST}-gcc -E'
sed -i -s "s/CPP = \"cpp\";/CPP = \"${CHOST}-cpp\";/" rpcgen/rpc_main.c || die
}
src_install() {
default
# provided by sys-fs/quota[rpc]
rm "${ED}"/usr/include/rpcsvc/rquota.{x,h} || die
}

View File

@ -38,6 +38,7 @@
# Keep versions on both arches in sync.
=dev-libs/ding-libs-0.6.1-r1 ~arm64
=dev-libs/libdnet-1.16.2 ~arm64
=dev-libs/libgcrypt-1.10.1-r3 ~arm64
=dev-python/lxml-4.9.3-r1 ~arm64
=dev-util/bpftool-6.3 ~arm64
@ -71,6 +72,9 @@
=sys-devel/automake-1.16.5-r1 ~arm64
=sys-firmware/edk2-aarch64-18.02 **
# Needed for a cross-compilation fix.
=sys-fs/fuse-3.16.1 ~amd64 ~arm64
# Keep versions on both arches in sync.
=sys-libs/libselinux-3.1-r3 ~arm64
=sys-libs/libsemanage-3.1-r2 ~arm64

View File

@ -33,5 +33,11 @@ app-shells/bash -net
# needed by docker
sys-libs/libseccomp static-libs
# Gentoo's new hardened profile disables PIC, but open-vm-tools needs it
app-emulation/open-vm-tools pic
# prefer fuse3 over fuse2
# no icu - it's used for l10n only
# enable pam
# no resolutionkms - we provide no graphics
app-emulation/open-vm-tools -fuse fuse3 -icu pam -resolutionkms
# no suid binaries, please
sys-fs/fuse -suid

View File

@ -0,0 +1,4 @@
DIST libdnet-1.14.tar.gz 520833 BLAKE2B 97e241fc374fc9489e70d440db5e19199f4e653650af85e24af56bbbc0167db1c451349c43fcb630a26c61f8ca15c58f5c879e0d82654e275189ca3e140bb22a SHA512 ce8d95228f5175e4d9a8ff71bb99eb1ccc3ccd599a85dd07adbfd9842fc54066235d362c8060828fb3ba8129d0e1e8e071e93d60d69c6d03be310c80e61cea93
DIST libdnet-1.16.1.tar.gz 666619 BLAKE2B 74472af1bc97c4771909e926eb9b27193c50d665036672fc89ff21159408daeef090e682c5e76e19f31d04e802fb73edf01d1aa057b543568f534d31f8db375b SHA512 9c6899b42502f3892463f1ec694934cc3b02831222fa15b5a899868229366ed4e9cc728ea2c70ec857ee9d676d763b1e390f6878a597a33f7d1cd5a7bd870586
DIST libdnet-1.16.2.tar.gz 675191 BLAKE2B 04e4533dbe45700decec4755c7db608d0ca68be05431bf44e6984b2c6a4aec55888fc0f0159916c8ac4a60ec5f743047d2a0a541786cd13fda61739bd7eef0fb SHA512 4b1902553a57eeb56952968e15be032de92d8106dc6e0ebf8e10470605c9c2ed69cb015f4057a5c119d01509c6795fc0dcda85a311d14124dddefdeb6223f848
DIST libdnet-1.16.4.tar.gz 684358 BLAKE2B 40be891c9004288329aaee0c79a29ebf0f095dfaaca4da98fd5ecfd759e22b8d10dc6b906200db1ac5b0a8cfbbea8fbe509da393e60cddeb5f875ad179cdc67a SHA512 6c5556e365047afcc5da3f76b1c99aa70723c076a7cf75c03d96a661a583dfa6d0ab605076e68efffe5ddca2d69875e4bc4938e0874b8aa24915fcfbfe3f3ff9

View File

@ -1,11 +1,12 @@
# Copyright 1999-2021 Gentoo Authors
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
AT_M4DIR="config"
inherit autotools
PYTHON_COMPAT=( python3_{9..10} )
DISTUTILS_OPTIONAL=1
inherit autotools distutils-r1
DESCRIPTION="simplified, portable interface to several low-level networking routines"
HOMEPAGE="https://github.com/ofalk/libdnet"
@ -15,13 +16,16 @@ S="${WORKDIR}/${PN}-${P}"
LICENSE="LGPL-2"
SLOT="0"
KEYWORDS="~alpha amd64 arm ~arm64 ~hppa ~ia64 ~mips ppc ppc64 ~riscv sparc x86"
IUSE="test"
REQUIRED_USE=""
IUSE="python test"
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
RESTRICT="!test? ( test )"
DEPEND=""
DEPEND="python? ( ${PYTHON_DEPS} )"
RDEPEND="${DEPEND}"
BDEPEND="
python? (
dev-python/cython[${PYTHON_USEDEP}]
)
"
DOCS=( README.md THANKS )
@ -46,19 +50,35 @@ src_prepare() {
Makefile.am || die
eautoreconf
if use python; then
cd python || die
distutils-r1_src_prepare
fi
}
src_configure() {
# Install into OEM, don't bother with a sbin directory.
econf \
--prefix=/oem \
--sbindir=/oem/bin \
--disable-static \
--without-python
$(use_with python)
}
src_compile() {
default
if use python; then
cd python || die
distutils-r1_src_compile
fi
}
src_install() {
default
if use python; then
cd python || die
unset DOCS
distutils-r1_src_install
fi
find "${ED}" -name '*.la' -delete || die
}

View File

@ -0,0 +1,79 @@
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{9..10} )
DISTUTILS_OPTIONAL=1
inherit autotools distutils-r1
DESCRIPTION="Simplified, portable interface to several low-level networking routines"
HOMEPAGE="https://github.com/ofalk/libdnet"
SRC_URI="https://github.com/ofalk/${PN}/archive/${P}.tar.gz"
S="${WORKDIR}/${PN}-${P}"
LICENSE="LGPL-2"
SLOT="0"
KEYWORDS="~alpha amd64 arm ~arm64 ~hppa ~ia64 ~mips ppc ppc64 ~riscv sparc x86"
IUSE="python test"
RESTRICT="!test? ( test )"
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
DEPEND="dev-libs/libbsd
python? ( ${PYTHON_DEPS} )"
RDEPEND="${DEPEND}"
BDEPEND="python? ( dev-python/cython[${PYTHON_USEDEP}] )
test? ( dev-libs/check )"
DOCS=( README.md THANKS )
src_prepare() {
default
sed -i \
-e 's/libcheck.a/libcheck.so/g' \
configure.ac || die
sed -i \
-e 's|-L$libdir ||g' \
dnet-config.in || die
sed -i \
-e '/^SUBDIRS/s|python||g' \
Makefile.am || die
# Stale e.g. pkg-config macros w/ bashisms
rm aclocal.m4 {config,m4}/libtool.m4 || die
AT_M4DIR="config" eautoreconf
if use python; then
cd python || die
distutils-r1_src_prepare
fi
}
src_configure() {
econf \
$(use_with python) \
$(use_with test check "${ESYSROOT}/usr")
}
src_compile() {
default
if use python; then
cd python || die
distutils-r1_src_compile
fi
}
src_install() {
default
if use python; then
cd python || die
unset DOCS
distutils-r1_src_install
fi
find "${ED}" -name '*.la' -delete || die
}

View File

@ -0,0 +1,79 @@
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{9..11} )
DISTUTILS_OPTIONAL=1
inherit autotools distutils-r1
DESCRIPTION="Simplified, portable interface to several low-level networking routines"
HOMEPAGE="https://github.com/ofalk/libdnet"
SRC_URI="https://github.com/ofalk/${PN}/archive/${P}.tar.gz"
S="${WORKDIR}/${PN}-${P}"
LICENSE="LGPL-2"
SLOT="0"
KEYWORDS="~alpha amd64 arm ~arm64 ~hppa ~ia64 ~mips ppc ppc64 ~riscv sparc x86"
IUSE="python test"
RESTRICT="!test? ( test )"
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
DEPEND="dev-libs/libbsd
python? ( ${PYTHON_DEPS} )"
RDEPEND="${DEPEND}"
BDEPEND="python? ( dev-python/cython[${PYTHON_USEDEP}] )
test? ( dev-libs/check )"
DOCS=( README.md THANKS )
src_prepare() {
default
sed -i \
-e 's/libcheck.a/libcheck.so/g' \
configure.ac || die
sed -i \
-e 's|-L$libdir ||g' \
dnet-config.in || die
sed -i \
-e '/^SUBDIRS/s|python||g' \
Makefile.am || die
# Stale e.g. pkg-config macros w/ bashisms
rm aclocal.m4 {config,m4}/libtool.m4 || die
AT_M4DIR="config" eautoreconf
if use python; then
cd python || die
distutils-r1_src_prepare
fi
}
src_configure() {
econf \
$(use_with python) \
$(use_with test check "${ESYSROOT}/usr")
}
src_compile() {
default
if use python; then
cd python || die
distutils-r1_src_compile
fi
}
src_install() {
default
if use python; then
cd python || die
unset DOCS
distutils-r1_src_install
fi
find "${ED}" -name '*.la' -delete || die
}

View File

@ -0,0 +1,80 @@
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{10..11} )
DISTUTILS_EXT=1
DISTUTILS_OPTIONAL=1
inherit autotools distutils-r1
DESCRIPTION="Simplified, portable interface to several low-level networking routines"
HOMEPAGE="https://github.com/ofalk/libdnet"
SRC_URI="https://github.com/ofalk/${PN}/archive/${P}.tar.gz"
S="${WORKDIR}/${PN}-${P}"
LICENSE="LGPL-2"
SLOT="0"
KEYWORDS="~alpha ~amd64 arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~sparc x86"
IUSE="python test"
RESTRICT="!test? ( test )"
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
DEPEND="dev-libs/libbsd
python? ( ${PYTHON_DEPS} )"
RDEPEND="${DEPEND}"
BDEPEND="python? ( dev-python/cython[${PYTHON_USEDEP}] )
test? ( dev-libs/check )"
DOCS=( README.md THANKS )
src_prepare() {
default
sed -i \
-e 's/libcheck.a/libcheck.so/g' \
configure.ac || die
sed -i \
-e 's|-L$libdir ||g' \
dnet-config.in || die
sed -i \
-e '/^SUBDIRS/s|python||g' \
Makefile.am || die
# Stale e.g. pkg-config macros w/ bashisms
rm aclocal.m4 {config,m4}/libtool.m4 || die
AT_M4DIR="config" eautoreconf
if use python; then
cd python || die
distutils-r1_src_prepare
fi
}
src_configure() {
econf \
$(use_with python) \
$(use_with test check "${ESYSROOT}/usr")
}
src_compile() {
default
if use python; then
cd python || die
distutils-r1_src_compile
fi
}
src_install() {
default
if use python; then
cd python || die
unset DOCS
distutils-r1_src_install
fi
find "${ED}" -name '*.la' -delete || die
}

View File

@ -1 +1,2 @@
DIST libmspack-0.10.1alpha.tar.gz 963274 BLAKE2B 39bcb3b7ea419d6d00850b70c217c802a2095dd4398038e594ae7c01ca12e71508218c1cfca5ae8b102636ab9517b13d55c1e411b31e87d28aa46331cd0127e6 SHA512 a7b5f7caa49190c5021f3e768b92f2e51cc0ce685c9ab6ed6fb36de885c73231b58d47a8a3b5c5aa5c9ac56c25c500eb683d84dbf11f09f97f6cb4fff5adc245
DIST libmspack-0.11alpha.tar.gz 509478 BLAKE2B 7e386ab5ae160000bab9e5523f2ebf3907a5cb564fb7cc8945ca15daf5c8ff2563f6680383c52f6de95d1aa992d6616e2f80133740c8329390a8e5c76ba84301 SHA512 40c487e5b4e2f63a6cada26d29db51f605e8c29525a1cb088566d02cf2b1cc9dba263f80e2101d7f8e9d69cf7684a15bcaf791fb4891ad013a56afc7256dfa62

View File

@ -1,16 +1,16 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
EAPI=8
inherit autotools multilib-minimal
inherit autotools
if [[ ${PV} == "9999" ]] ; then
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 ~m68k ppc ppc64 ~riscv ~s390 sparc x86 ~x64-macos ~x64-solaris"
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"
@ -21,54 +21,47 @@ HOMEPAGE="https://www.cabextract.org.uk/libmspack/"
LICENSE="LGPL-2.1"
SLOT="0"
IUSE="debug doc static-libs"
DEPEND=""
RDEPEND=""
IUSE="debug doc"
S="${WORKDIR}/${MY_P}"
src_prepare() {
if [[ ${PV} == "9999" ]] ; then
if [[ ${PV} == *9999 ]] ; then
# Re-create file layout from release tarball
pushd "${WORKDIR}" &>/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
}

View File

@ -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
}

View File

@ -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
}

View File

@ -5,4 +5,7 @@
<email>reavertm@gentoo.org</email>
<name>Maciej Mrozowski</name>
</maintainer>
<upstream>
<remote-id type="github">kyz/libmspack</remote-id>
</upstream>
</pkgmetadata>

View File

@ -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

View File

@ -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 <aleksey@aleksey.com>
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 <orbea@riseup.net>
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)

View File

@ -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"

View File

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<!-- maintainer-needed -->
<use>
<flag name="gcrypt">Install xmlsec-gcrypt library</flag>
<flag name="gnutls">Install xmlsec-gnutls library</flag>
<flag name="http">Allow fetching over HTTP via libxml2.</flag>
<flag name="nss">Install xmlsec-nss library</flag>
<flag name="openssl">Install xmlsec-openssl library</flag>
</use>
<upstream>
<remote-id type="github">lsh123/xmlsec</remote-id>
</upstream>
</pkgmetadata>

View File

@ -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
}

View File

@ -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
}

View File

@ -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
}

View File

@ -0,0 +1 @@
DIST rpcsvc-proto-1.4.4.tar.xz 168648 BLAKE2B 2cba39b0307d773133306c4222e43cc44d4189bb125f993634b2a5e7679e5f5b4d28b05b95db6e694d316b4fdd182cf91c2a01ed1c519a3ca7ced5ebf5da3d10 SHA512 0138ac8fb2d8de3cb56f661bd1b6435fa0a35d3bd12c5cb7081c9ae1701e3620f47fe3dd002263db456655b61316749768e9a1a44325a1a6a542beae364a0393

View File

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>toolchain@gentoo.org</email>
<name>Gentoo Toolchain Project</name>
</maintainer>
<maintainer type="project">
<email>base-system@gentoo.org</email>
<name>Gentoo Base System Project</name>
</maintainer>
<upstream>
<remote-id type="github">thkukuk/rpcsvc-proto</remote-id>
</upstream>
</pkgmetadata>

View File

@ -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}"

View File

@ -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="
!<sys-libs/glibc-2.26
virtual/libintl
"
DEPEND="${RDEPEND}"
# sys-devel/gettext is only for libintl detection macros.
BDEPEND="sys-devel/gettext"
src_prepare() {
default
# Search for a valid 'cpp' command.
# The CPP envvar might contain '${CC} -E', which does not work for rpcgen.
# Bug 718138, 870031, 870061.
local x cpp=
for x in {${CHOST}-,}{,clang-}cpp; do
if type -P "${x}" >/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
}

View File

@ -0,0 +1 @@
DIST fuse-3.10.4.tar.xz 2787472 BLAKE2B 174b51bf55544bbc08e04089a4d8685b371d3f584e337ed0d8d82c62e10c14b6ef14a964d6627e8a121036db1ab4c6c1ccd413c08f8685d3d91893874427e46f SHA512 1cb7600dc04f148b15ec3183d0348320dd946cf15d4077798e7e34fe7e8202837718c8b8bd1f190b7dddda2453ee2b0433d77e18f142ecb7affec1cae29520f6

View File

@ -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 ${?}
}

View File

@ -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="!<sys-fs/fuse-2.9.7-r1:0"
S=${WORKDIR}/fuse-${PV}
src_install() {
udev_newrules util/udev.rules 99-fuse.rules
if use kernel_linux ; then
newinitd "${FILESDIR}"/fuse.init fuse
else
die "We don't know what init code install for your kernel, please file a bug."
fi
insinto /etc
doins util/fuse.conf
}

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>base-system@gentoo.org</email>
</maintainer>
<upstream>
<remote-id type="github">libfuse/libfuse</remote-id>
</upstream>
</pkgmetadata>

View File

@ -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

View File

@ -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 <sys/types.h>
-#define __u64 uint64_t
-#define __s64 int64_t
-#define __u32 uint32_t
-#define __s32 int32_t
-#define __u16 uint16_t
+#include <linux/types.h>
/*
* Version negotiation:

View File

@ -0,0 +1,38 @@
From acb69eca6c25db44523efb4cb1e7088ae66d093d Mon Sep 17 00:00:00 2001
From: Sam James <sam@gentoo.org>
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

View File

@ -0,0 +1,60 @@
From ae2352bca9b4e607538412da0cc2a9625cd8b692 Mon Sep 17 00:00:00 2001
From: Sam James <sam@gentoo.org>
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 <sam@gentoo.org>
---
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 <sys/socket.h>
#include <sys/wait.h>
+#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)
{

View File

@ -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
}

View File

@ -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}
}

View File

@ -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}
}

View File

@ -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}
}

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>base-system@gentoo.org</email>
</maintainer>
<upstream>
<remote-id type="cpe">cpe:/a:fuse:fuse</remote-id>
<remote-id type="github">libfuse/libfuse</remote-id>
</upstream>
</pkgmetadata>