Skip to content

Commit

Permalink
FIXED xfwm4 compositing
Browse files Browse the repository at this point in the history
- components/gtk.yml: added libxcomposite, libxinerama, libxcursor missing dependencies causing xfwm4 compositing issues
- components/fontconfig.yml: added integration command
- components/gdk-pixbuf.yml: added integration command
- boards/image.yml: added fuse2 dependency for AppImages
  • Loading branch information
itsManjeet committed Sep 8, 2023
1 parent 73a2054 commit f41aa3b
Show file tree
Hide file tree
Showing 12 changed files with 227 additions and 32 deletions.
37 changes: 22 additions & 15 deletions elements/apps/mtr.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,30 @@
merge: [elements/include/appimage.yml]
id: mtr
version: "0.95"
version: 0.95
about: Combines the functionality of traceroute and ping into one tool
release: 0

variables:
desktopfile: |-
[Desktop Entry]
Type=Application
Name=MTR
Comment=Combines the functionality of traceroute and ping into one tool
Exec=mtr
Icon=AppImage
StartupNotify=true
Terminal=true
Categories=System;
build-time:
- components/ncurses.yml
- components/gtk.yml
- components/libcap.yml
- components/gdk-pixbuf.yml
- components/appimagetool.yml
- components/ncurses.yml
- components/gtk.yml
- components/libcap.yml
- components/gdk-pixbuf.yml
- components/appimagetool.yml
sources:
- https://github.com/traviscross/mtr/archive/v%{version}/%{id}-%{version}.tar.gz
- https://github.com/traviscross/mtr/archive/v%{version}/%{id}-%{version}.tar.gz
pre-script: |
echo %{version} > .tarball-version
autoreconf -fiv
post-script: |
mkdir -p %{install-root}/usr/lib/
install -v -D -m 0644 /files/mtr.svg %{install-root}/%{id}.png
install -v -D -m 0755 /files/AppRun %{install-root}/AppRun
install -v -D -m 0644 /files/%{id}.desktop %{install-root}/%{id}.desktop
configure: |
configure: >-
--with-gtk
11 changes: 7 additions & 4 deletions elements/apps/thunar.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
id: thunar
version: 4.16.10
version: 4.18.7
about: Xfce file manager
release: 0
depends:
build-time:
- components/exo.yml
- components/hicolor-icon-theme.yml
- components/libgudev.yml
Expand All @@ -11,5 +10,9 @@ depends:
- components/pcre.yml
- components/libexif.yml
- components/tumbler.yml
- components/appimagetool.yml

sources:
- https://archive.xfce.org/src/xfce/thunar/4.16/thunar-4.16.10.tar.bz2
- https://archive.xfce.org/src/xfce/thunar/%{version:1}/thunar-%{version}.tar.bz2

merge: [elements/include/appimage.yml]
8 changes: 8 additions & 0 deletions elements/boards/common/image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@ script: |
C /etc/X11
C /etc/xdg
C /etc/swupd.yml
C /etc/fonts
C /etc/skel
C /etc/sudoers
C /etc/sudoers.d
C /etc/sudoers.dist
EOF
mksquashfs %{include-root}/usr %{install-root}/usr_%{version}.squashfs
Expand Down Expand Up @@ -91,6 +96,9 @@ include:
# Desktop Environment
- components/xfce4.yml

# AppImage
- components/fuse2.yml

# X11
- components/x11/xserver.yml
- components/x11/xinit.yml
Expand Down
24 changes: 16 additions & 8 deletions elements/components/appimagetool.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,22 @@
id: appimagetool
version: "13"
version: continuous
about: used to generate an AppImage from an existing AppDir

script: install -v -D -m 0755 appimagetool-x86_64.AppImage %{install-root}/usr/bin/appimagetool

depends:
- components/fuse2.yml
- components/desktop-file-utils.yml
sources:
- https://github.com/AppImage/AppImageKit/releases/download/13/appimagetool-x86_64.AppImage
- components/libgcrypt.yml
- components/gpgme.yml

script: |-
chmod +x appimagetool-x86_64.AppImage
./appimagetool-x86_64.AppImage --appimage-extract
# TODO: FIX update url
# TODO: build from source
install -vDm 0755 squashfs-root/usr/bin/appimagetool -t %{install-root}/%{bindir}
install -vDm 0755 squashfs-root/usr/lib/appimagekit/mksquashfs -t %{install-root}/%{libdir}/appimagekit
install -vDm 0755 AppRun-x86_64 %{install-root}/%{libdir}/appimagekit/AppRun
install -vDm 0755 runtime-x86_64 %{install-root}/%{libdir}/appimagekit/runtime
sources:
- https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage
- https://github.com/AppImage/AppImageKit/releases/download/continuous/AppRun-x86_64
- https://github.com/AppImage/AppImageKit/releases/download/continuous/runtime-x86_64
3 changes: 3 additions & 0 deletions elements/components/fontconfig.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ build-type: autotools
configure: >-
--sysconfdir=%{sysconfdir}
integration: |-
fc-cache -s
sources:
- https://www.freedesktop.org/software/fontconfig/release/fontconfig-%{version}.tar.xz
depends:
Expand Down
16 changes: 16 additions & 0 deletions elements/components/fuse2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,19 @@ about:
A simple interface for userspace programs to export a virtual filesystem to
the Linux kernel

variables:
run-autogen: false
seperate-build-dir: false

environ:
- UDEV_RULES_PATH=%{libdir}/udev/rules.d
- MOUNT_FUSE_PATH=%{bindir}

pre-script: |-
patch -Np1 -i /patches/fuse2/glibc-2.34-fix.patch
autoreconf -i
configure: >-
--enable-lib
--enable-util
Expand All @@ -15,4 +28,7 @@ post-script: |
sources:
- https://github.com/libfuse/libfuse/releases/download/fuse-%{version}/fuse-%{version}.tar.gz

depends:
- components/glibc.yml
# TODO: fix update url
3 changes: 3 additions & 0 deletions elements/components/gdk-pixbuf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ configure: >
--buildtype=release
-D man=false
integration: |-
gdk-pixbuf-query-loaders --update-cache
sources:
- https://download.gnome.org/sources/gdk-pixbuf/%{version:1}/gdk-pixbuf-%{version}.tar.xz

Expand Down
15 changes: 15 additions & 0 deletions elements/components/gtk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,18 @@ configure: >
-D wayland_backend=true
-D x11_backend=true
post-script: |-
install -vDm 0644 /dev/stdin %{install-root}/%{sysconfdir}/gtk-3.0/settings.ini << "EOF"
[Settings]
gtk-icon-theme-name = Fluent
gtk-theme-name = Fluent-light
gtk-font-name = Cantarell 11
EOF
install -vDm 0644 /dev/stdin %{install-root}/%{libdir}/tmpfiles.d/gtk3.conf << "EOF"
C /etc/gtk-3.0
EOF
integration: |-
gtk-query-immodules-3.0 --update-cache
Expand All @@ -28,5 +40,8 @@ depends:
- components/colord.yml
- components/desktop-file-utils.yml
- components/x11/libxkbcommon.yml
- components/x11/libxcomposite.yml
- components/x11/libxinerama.yml
- components/x11/libxcursor.yml
- components/wayland-protocols.yml
# TODO: fix update url
17 changes: 12 additions & 5 deletions elements/components/x11/libxcomposite.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
id: libXcomposite
version: "7"
about: xorg library libXcomposite
release: 0
id: libxcomposite
version: 0.4.6
about: X11 composite extension library

depends:
- components/x11/libxfixes.yml

build-time:
- components/x11/util-macros.yml
- components/x11/xorgproto.yml

sources:
- https://www.x.org/pub/individual/lib/libXcomposite-0.4.5.tar.bz2
- https://www.x.org/pub/individual/lib/libXcomposite-%{version}.tar.xz
50 changes: 50 additions & 0 deletions elements/include/appimage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
variables:
skip-libraries: ""
include-files: ""
icon-filepath: "/files/AppImage.svg"
desktop-filepath: ""
apprun-filepath: "/lib/appimagekit/AppRun"
apprun: ""
desktopfile: ""

post-script: |
if [[ -n "%{include-files}" ]] ; then
for i in %{include-files} ; do
cp -v $i %{install-root}/$i
done
fi
find %{install-root}/ -type f -executable | xargs objdump -p | grep NEEDED | awk '{print $2}' >> required-libraries
if [[ -n "%{skip-libraries}" ]] ; then
skipped=""
for i in %{skip-libraries} ; do
skipped="$skipped -e $i"
done
FILTER="grep -v $skipped"
else
FILTER="cat"
fi
mkdir -p %{install-root}/%{libdir}
for i in $(cat required-libraries | sort | uniq | ${FILTER}) ; do
if [[ -e %{libdir}/$i ]] ; then
cp %{libdir}/$i %{install-root}/%{libdir}
elif [[ -e %{install-root}/%{libdir}/$i ]] ; then
continue
else
echo "MISSING REQUIRED LIBRARY $i"
fi
done
[[ -n "%{icon-filepath}" ]] && cp %{icon-filepath} %{install-root}/
[[ -n "%{desktop-filepath}" ]] && cp %{desktop-filepath} %{install-root}/
[[ -n "%{apprun-filepath}" ]] && cp %{apprun-filepath} %{install-root}/AppRun
[[ -n "%{apprun}" ]] && echo "%{apprun}" > %{install-root}/AppRun
[[ -n "%{desktopfile}" ]] && echo "%{desktopfile}" > %{install-root}/%{id}.desktop
chmod +x %{install-root}/AppRun
mv %{install-root} AppDir
mkdir -p %{install-root}
appimagetool AppDir %{install-root}/%{id}-%{version}.app
15 changes: 15 additions & 0 deletions files/AppImage.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
60 changes: 60 additions & 0 deletions patches/fuse2/glibc-2.34-fix.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
From 5a43d0f724c56f8836f3f92411e0de1b5f82db32 Mon Sep 17 00:00:00 2001
From: Sam James <[email protected]>
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 <[email protected]>
---
configure.ac | 1 +
util/ulockmgr_server.c | 6 ++++++
2 files changed, 7 insertions(+)

diff --git a/configure.ac b/configure.ac
index 9946a0ef..a2d481aa 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 273c7d92..a04dac5c 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)
{

0 comments on commit f41aa3b

Please sign in to comment.