From f41aa3b10b8e64fdc26d285272fc15925fc11e3b Mon Sep 17 00:00:00 2001 From: itsmanjeet Date: Fri, 8 Sep 2023 23:24:50 +0530 Subject: [PATCH] FIXED xfwm4 compositing - 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 --- elements/apps/mtr.yml | 37 ++++++++------ elements/apps/thunar.yml | 11 +++-- elements/boards/common/image.yml | 8 +++ elements/components/appimagetool.yml | 24 ++++++--- elements/components/fontconfig.yml | 3 ++ elements/components/fuse2.yml | 16 ++++++ elements/components/gdk-pixbuf.yml | 3 ++ elements/components/gtk.yml | 15 ++++++ elements/components/x11/libxcomposite.yml | 17 +++++-- elements/include/appimage.yml | 50 +++++++++++++++++++ files/AppImage.svg | 15 ++++++ patches/fuse2/glibc-2.34-fix.patch | 60 +++++++++++++++++++++++ 12 files changed, 227 insertions(+), 32 deletions(-) create mode 100644 elements/include/appimage.yml create mode 100644 files/AppImage.svg create mode 100644 patches/fuse2/glibc-2.34-fix.patch diff --git a/elements/apps/mtr.yml b/elements/apps/mtr.yml index d7047ebed..bd3a65631 100644 --- a/elements/apps/mtr.yml +++ b/elements/apps/mtr.yml @@ -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 - diff --git a/elements/apps/thunar.yml b/elements/apps/thunar.yml index 3962b1e96..7b434ee93 100644 --- a/elements/apps/thunar.yml +++ b/elements/apps/thunar.yml @@ -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 @@ -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] diff --git a/elements/boards/common/image.yml b/elements/boards/common/image.yml index 77a10fe9a..cc005da91 100644 --- a/elements/boards/common/image.yml +++ b/elements/boards/common/image.yml @@ -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 @@ -91,6 +96,9 @@ include: # Desktop Environment - components/xfce4.yml + # AppImage + - components/fuse2.yml + # X11 - components/x11/xserver.yml - components/x11/xinit.yml diff --git a/elements/components/appimagetool.yml b/elements/components/appimagetool.yml index 4ff7bb091..4dae6588b 100644 --- a/elements/components/appimagetool.yml +++ b/elements/components/appimagetool.yml @@ -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 \ No newline at end of file + 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 diff --git a/elements/components/fontconfig.yml b/elements/components/fontconfig.yml index ebc7e7fe9..6c50b4056 100644 --- a/elements/components/fontconfig.yml +++ b/elements/components/fontconfig.yml @@ -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: diff --git a/elements/components/fuse2.yml b/elements/components/fuse2.yml index cb8f94535..38eead15b 100644 --- a/elements/components/fuse2.yml +++ b/elements/components/fuse2.yml @@ -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 @@ -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 diff --git a/elements/components/gdk-pixbuf.yml b/elements/components/gdk-pixbuf.yml index b475fd9da..e86046587 100644 --- a/elements/components/gdk-pixbuf.yml +++ b/elements/components/gdk-pixbuf.yml @@ -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 diff --git a/elements/components/gtk.yml b/elements/components/gtk.yml index 3e40a97f2..2a628194a 100644 --- a/elements/components/gtk.yml +++ b/elements/components/gtk.yml @@ -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 @@ -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 diff --git a/elements/components/x11/libxcomposite.yml b/elements/components/x11/libxcomposite.yml index 4b37c0c47..09e40039b 100644 --- a/elements/components/x11/libxcomposite.yml +++ b/elements/components/x11/libxcomposite.yml @@ -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 diff --git a/elements/include/appimage.yml b/elements/include/appimage.yml new file mode 100644 index 000000000..af4155bb3 --- /dev/null +++ b/elements/include/appimage.yml @@ -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 \ No newline at end of file diff --git a/files/AppImage.svg b/files/AppImage.svg new file mode 100644 index 000000000..ba81debf1 --- /dev/null +++ b/files/AppImage.svg @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/patches/fuse2/glibc-2.34-fix.patch b/patches/fuse2/glibc-2.34-fix.patch new file mode 100644 index 000000000..9f2cf22c7 --- /dev/null +++ b/patches/fuse2/glibc-2.34-fix.patch @@ -0,0 +1,60 @@ +From 5a43d0f724c56f8836f3f92411e0de1b5f82db32 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 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 + #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) + {