Skip to content

Commit

Permalink
20241122
Browse files Browse the repository at this point in the history
  • Loading branch information
WhatAmISupposedToPutHere committed Nov 24, 2024
1 parent ce1552a commit f433589
Show file tree
Hide file tree
Showing 51 changed files with 133 additions and 76 deletions.
5 changes: 1 addition & 4 deletions build.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
#!/bin/bash
source envs.sh
set -euo pipefail
cp -a ./* /var/tmp/catalyst/
cd /var/tmp/catalyst/
git init
git remote add origin https://github.com/WhatAmISupposedToPutHere/fex-rootfs
git fetch -a origin
git checkout "${GIT_SHA}"
mkdir -p builds/23.0-default
if [[ "x${DOWNLOAD_SEED-}" != x ]]; then
name="stage3-amd64-systemd-${TIMESTAMP_L}.tar.xz"
Expand Down
2 changes: 0 additions & 2 deletions config/stages/package.accept_keywords/stage13/clinfo

This file was deleted.

1 change: 0 additions & 1 deletion config/stages/package.accept_keywords/stage13/musl

This file was deleted.

2 changes: 0 additions & 2 deletions config/stages/package.accept_keywords/stage4/clinfo

This file was deleted.

1 change: 0 additions & 1 deletion config/stages/package.accept_keywords/stage4/intel_clc

This file was deleted.

1 change: 0 additions & 1 deletion config/stages/package.accept_keywords/stage4/libnss

This file was deleted.

1 change: 0 additions & 1 deletion config/stages/package.accept_keywords/stage4/musl

This file was deleted.

This file was deleted.

1 change: 1 addition & 0 deletions config/stages/package.accept_keywords/stage4f
1 change: 1 addition & 0 deletions config/stages/package.accept_keywords/stage4l
2 changes: 0 additions & 2 deletions config/stages/package.mask/stage4/rust

This file was deleted.

1 change: 1 addition & 0 deletions config/stages/package.mask/stage4f
1 change: 1 addition & 0 deletions config/stages/package.mask/stage4l
8 changes: 0 additions & 8 deletions config/stages/package.use/stage13/cet

This file was deleted.

2 changes: 0 additions & 2 deletions config/stages/package.use/stage13/clang

This file was deleted.

5 changes: 0 additions & 5 deletions config/stages/package.use/stage13/musl

This file was deleted.

8 changes: 0 additions & 8 deletions config/stages/package.use/stage4/cet

This file was deleted.

2 changes: 0 additions & 2 deletions config/stages/package.use/stage4/clang

This file was deleted.

5 changes: 0 additions & 5 deletions config/stages/package.use/stage4/musl

This file was deleted.

File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1 +1 @@
*/* pulseaudio wayland unwind gles2 vaapi vdpau llvm_targets_SPIRV
*/* pulseaudio wayland unwind gles2 vaapi vdpau llvm_targets_SPIRV harfbuzz
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 6 additions & 0 deletions config/stages/package.use/stage4l/circular
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# this makes only a difference for the "desktop" stages
dev-db/sqlite -icu
dev-lang/python -bluetooth

# this is also needed for normal stage3
net-misc/curl -http2 -http3 -quic -curl_quic_openssl
1 change: 1 addition & 0 deletions config/stages/package.use/stage4l/fex-root
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*/* pulseaudio wayland unwind gles2 vaapi vdpau llvm_targets_SPIRV -harfbuzz
2 changes: 2 additions & 0 deletions config/stages/package.use/stage4l/gmp
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# testing this for bug 894134
dev-libs/gmp asm cpudetection
5 changes: 5 additions & 0 deletions config/stages/package.use/stage4l/libpcre
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# required by sys-libs/libselinux-2.7
dev-libs/libpcre static-libs

# required by dev-vcs/git
dev-libs/libpcre2 jit
1 change: 1 addition & 0 deletions config/stages/package.use/stage4l/multilib
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*/* abi_x86_32 abi_x86_64
7 changes: 7 additions & 0 deletions config/stages/package.use/stage4l/no-filecaps
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# For stage building, we cannot be sure the final unpack destination will have
# xattr/fcaps support. To be safe, we build stages without filecaps, but allow
# filecaps to be turned back on @ next full world upgrade. The ebuilds using
# fcaps eclass will have more logic to safely fall back in case of missing
# support.

*/* -filecaps
6 changes: 6 additions & 0 deletions config/stages/package.use/stage4l/openmp
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

# compilers from stage1 do not have openmp capability, so turn this off
# here to avoid failures in stage3
app-crypt/libb2 -openmp
app-portage/portage-utils -openmp
sys-devel/gettext -openmp
2 changes: 0 additions & 2 deletions config/stages/profile/package.use.force/stage13/llvm

This file was deleted.

2 changes: 0 additions & 2 deletions config/stages/profile/package.use.force/stage13/musl

This file was deleted.

10 changes: 0 additions & 10 deletions config/stages/profile/package.use.force/stage4/alternatives

This file was deleted.

3 changes: 0 additions & 3 deletions config/stages/profile/package.use.force/stage4/glibc

This file was deleted.

2 changes: 0 additions & 2 deletions config/stages/profile/package.use.force/stage4/llvm

This file was deleted.

2 changes: 0 additions & 2 deletions config/stages/profile/package.use.force/stage4/musl

This file was deleted.

1 change: 1 addition & 0 deletions config/stages/profile/package.use.force/stage4f
1 change: 1 addition & 0 deletions config/stages/profile/package.use.force/stage4l
4 changes: 2 additions & 2 deletions envs.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
export TIMESTAMP_L=20241110T170333Z
export TIMESTAMP_S=20241116
export TIMESTAMP_L=20241117T163407Z
export TIMESTAMP_S=20241122
export RELEASE=${TIMESTAMP_S}
4 changes: 4 additions & 0 deletions overlay/metadata/layout.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
masters = gentoo
auto-sync = false
thin-manifests = true
sign-manifests = false
1 change: 1 addition & 0 deletions overlay/profiles/repo_name
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
local
1 change: 1 addition & 0 deletions overlay/x11-libs/libxshmfence/Manifest
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DIST libxshmfence-1.3.2.tar.xz 259024 BLAKE2B 2f0ef0767fbb29349acf43b4cb4d7177956c06c389f0443db06e398c4e0f3b424432ce6fe8946d70fdd59b9446c53bf2f1ee126df4d41b3065f1e94438facecf SHA512 e20a6827e370726cf50489a69f4a52b897f1c44e3eba8c72a4e626b08724e877d090770b8016765736d887d5d5eaba1fda9c29066e62d259b4d1e2064bc1626c
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
From 3aaf46a2742d1698f3a4399b2bb2f855c0b904fe Mon Sep 17 00:00:00 2001
From: Asahi Lina <[email protected]>
Date: Tue, 22 Oct 2024 22:28:19 +0900
Subject: [PATCH] alloc: Allow disabling memfd usage at runtime with
XSHMFENCE_NO_MEMFD=1

For thin VMs used for compatibility reasons, it is desirable to directly
proxy the X11 protocol between an application running in a VM and an X
server running on the host. We can proxy futex wakeups with some watcher
code, but we need the futex memory itself to be shared. This works when
/dev/shm is mounted with virtiofs with DAX, but cannot work for memfds.

Add a XSHMFENCE_NO_MEMFD environment variable that, when set, disables
the memfd codepath and falls back to /dev/shm.

Signed-off-by: Asahi Lina <[email protected]>
Part-of: <https://gitlab.freedesktop.org/xorg/lib/libxshmfence/-/merge_requests/9>
---
src/xshmfence_alloc.c | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/src/xshmfence_alloc.c b/src/xshmfence_alloc.c
index 932adb9..77f968c 100644
--- a/src/xshmfence_alloc.c
+++ b/src/xshmfence_alloc.c
@@ -69,13 +69,22 @@ int
xshmfence_alloc_shm(void)
{
char template[] = SHMDIR "/shmfd-XXXXXX";
- int fd;
+ int fd = -1;
#ifndef HAVE_MKOSTEMP
int flags;
#endif

#if HAVE_MEMFD_CREATE
- fd = memfd_create("xshmfence", MFD_CLOEXEC|MFD_ALLOW_SEALING);
+ static int disable_memfd = -1;
+
+ if (disable_memfd == -1) {
+ const char *val = getenv("XSHMFENCE_NO_MEMFD");
+ disable_memfd = val ? !!atoi(val) : 0;
+ }
+
+ if (disable_memfd <= 0)
+ fd = memfd_create("xshmfence", MFD_CLOEXEC|MFD_ALLOW_SEALING);
+
if (fd < 0)
#endif
#ifdef SHM_ANON
--
GitLab

18 changes: 18 additions & 0 deletions overlay/x11-libs/libxshmfence/libxshmfence-1.3.2-r1.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

XORG_MULTILIB=yes
XORG_TARBALL_SUFFIX="xz"
inherit xorg-3

DESCRIPTION="Shared memory fences using futexes"

KEYWORDS="amd64"

DEPEND="x11-base/xorg-proto"

PATCHES="
${FILESDIR}/${P}-memfd-envvar.patch
"
11 changes: 11 additions & 0 deletions overlay/x11-libs/libxshmfence/metadata.xml
Original file line number Diff line number Diff line change
@@ -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>[email protected]</email>
<name>X11</name>
</maintainer>
<upstream>
<remote-id type="freedesktop-gitlab">xorg/lib/libxshmfence</remote-id>
</upstream>
</pkgmetadata>
2 changes: 1 addition & 1 deletion stage1-systemd-23.spec
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ profile: default/linux/amd64/23.0/systemd
snapshot_treeish: @[email protected]
source_subpath: 23.0-default/stage3-amd64-systemd-@TIMESTAMP@
compression_mode: tar
update_seed: yes
update_seed: no
update_seed_command: --update --newuse -1 jinja2
portage_confdir: /var/tmp/catalyst/config/stages
portage_prefix: stage13
8 changes: 4 additions & 4 deletions stage4-fex.spec
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@ snapshot_treeish: @[email protected]
source_subpath: 23.0-default/stage4-amd64-clang
compression_mode: tar
portage_confdir: /var/tmp/catalyst/config/stages
portage_prefix: stage4
repos: /var/tmp/catalyst/overlay
portage_prefix: stage4f
binrepo_path: amd64/binpackages/23.0/x86-64
stage4/fsscript: fsscript.sh
stage4/packages: --with-bdeps=y --deep sys-fs/fuse:0 sys-fs/fuse:3 x11-libs/gtk+:2 x11-libs/gtk+:3
app-emulation/wine-vanilla
dev-libs/nspr
dev-libs/nss
dev-libs/opencl-icd-loader
dev-libs/protobuf
dev-libs/protobuf-c
dev-python/pyyaml
dev-util/bindgen
dev-util/clinfo
dev-util/vulkan-tools
media-libs/glew
media-libs/glu
Expand All @@ -31,9 +31,9 @@ stage4/packages: --with-bdeps=y --deep sys-fs/fuse:0 sys-fs/fuse:3 x11-libs/gtk+
media-libs/sdl2-image
media-libs/sdl2-mixer
media-libs/sdl2-net
media-libs/sdl2-ttf
media-libs/speex
sys-apps/pciutils
sys-apps/usbutils
sys-auth/libnss-nis
x11-apps/mesa-progs
x11-libs/xcb-util-cursor
Expand Down
4 changes: 2 additions & 2 deletions stage4-llvm.spec
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ snapshot_treeish: @[email protected]
source_subpath: 23.0-default/stage3-amd64-systemd
compression_mode: tar
portage_confdir: /var/tmp/catalyst/config/stages
portage_prefix: stage4
portage_prefix: stage4l
binrepo_path: amd64/binpackages/23.0/x86-64
stage4/packages: --with-bdeps=y sys-devel/clang
stage4/packages: --with-bdeps=y sys-devel/clang freetype harfbuzz

0 comments on commit f433589

Please sign in to comment.