summaryrefslogtreecommitdiff
path: root/sys-fs
diff options
context:
space:
mode:
authorBrahmajit Das <brahmajit.xyz@gmail.com>2023-09-05 04:21:04 +0000
committerJoonas Niilola <juippis@gentoo.org>2023-09-05 10:30:34 +0300
commitcd73ce1d3249c9259abfc8a8b9a74e29a8b3cfa7 (patch)
tree3885e83c103b4e1bbdb3bf46bc815073657c4a27 /sys-fs
parentwww-client/firefox: update the ppc64 webrtc patch on 117.0 (diff)
downloadgentoo-cd73ce1d3249c9259abfc8a8b9a74e29a8b3cfa7.tar.gz
gentoo-cd73ce1d3249c9259abfc8a8b9a74e29a8b3cfa7.tar.bz2
gentoo-cd73ce1d3249c9259abfc8a8b9a74e29a8b3cfa7.zip
sys-fs/lxcfs: Fix incompatible integer to pointer conversion
Closes: https://bugs.gentoo.org/894348 Signed-off-by: Brahmajit Das <brahmajit.xyz@gmail.com> Closes: https://github.com/gentoo/gentoo/pull/32616 Signed-off-by: Joonas Niilola <juippis@gentoo.org>
Diffstat (limited to 'sys-fs')
-rw-r--r--sys-fs/lxcfs/files/lxcfs-5.0.4-fix-incompatible-pointer-conversion.patch19
-rw-r--r--sys-fs/lxcfs/lxcfs-5.0.4-r1.ebuild84
2 files changed, 103 insertions, 0 deletions
diff --git a/sys-fs/lxcfs/files/lxcfs-5.0.4-fix-incompatible-pointer-conversion.patch b/sys-fs/lxcfs/files/lxcfs-5.0.4-fix-incompatible-pointer-conversion.patch
new file mode 100644
index 000000000000..bead63bd52dd
--- /dev/null
+++ b/sys-fs/lxcfs/files/lxcfs-5.0.4-fix-incompatible-pointer-conversion.patch
@@ -0,0 +1,19 @@
+Bug: https://bugs.gentoo.org/894348
+Upstream PR: https://github.com/lxc/lxcfs/pull/610
+--- a/src/proc_loadavg.c
++++ b/src/proc_loadavg.c
+@@ -603,12 +603,12 @@ pthread_t load_daemon(int load_use)
+
+ ret = init_load();
+ if (ret == -1)
+- return log_error(0, "Initialize hash_table fails in load_daemon!");
++ return (pthread_t) log_error(0, "Initialize hash_table fails in load_daemon!");
+
+ ret = pthread_create(&pid, NULL, load_begin, NULL);
+ if (ret != 0) {
+ load_free();
+- return log_error(0, "Create pthread fails in load_daemon!");
++ return (pthread_t) log_error(0, "Create pthread fails in load_daemon!");
+ }
+
+ /* use loadavg, here loadavg = 1*/
diff --git a/sys-fs/lxcfs/lxcfs-5.0.4-r1.ebuild b/sys-fs/lxcfs/lxcfs-5.0.4-r1.ebuild
new file mode 100644
index 000000000000..6d2a14c5eb13
--- /dev/null
+++ b/sys-fs/lxcfs/lxcfs-5.0.4-r1.ebuild
@@ -0,0 +1,84 @@
+# Copyright 2022-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{9..12} )
+
+inherit cmake meson python-any-r1 systemd verify-sig
+
+DESCRIPTION="FUSE filesystem for LXC"
+HOMEPAGE="https://linuxcontainers.org/lxcfs/introduction/ https://github.com/lxc/lxcfs/"
+SRC_URI="https://linuxcontainers.org/downloads/lxcfs/${P}.tar.gz
+ verify-sig? ( https://linuxcontainers.org/downloads/lxcfs/${P}.tar.gz.asc )"
+
+LICENSE="Apache-2.0 LGPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~riscv ~x86"
+IUSE="doc test"
+
+DEPEND="sys-fs/fuse:3"
+RDEPEND="${DEPEND}"
+BDEPEND="${PYTHON_DEPS}
+ virtual/pkgconfig
+ $(python_gen_any_dep '
+ dev-python/jinja[${PYTHON_USEDEP}]
+ ')
+ doc? ( sys-apps/help2man )
+ verify-sig? ( sec-keys/openpgp-keys-linuxcontainers )"
+
+# Needs some black magic to work inside container/chroot.
+RESTRICT="test"
+
+VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/linuxcontainers.asc
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-5.0.4-fix-incompatible-pointer-conversion.patch
+)
+
+python_check_deps() {
+ python_has_version -b "dev-python/jinja[${PYTHON_USEDEP}]"
+}
+
+pkg_setup() {
+ python-any-r1_pkg_setup
+}
+
+src_prepare() {
+ default
+
+ # Fix python shebangs for python-exec[-native-symlinks], #851480
+ local shebangs=($(grep -rl "#!/usr/bin/env python3" || die))
+ python_fix_shebang -q ${shebangs[*]}
+}
+
+src_configure() {
+ local emesonargs=(
+ --localstatedir "${EPREFIX}/var"
+
+ $(meson_use doc docs)
+ $(meson_use test tests)
+
+ -Dfuse-version=3
+ -Dinit-script=""
+ -Dwith-init-script=""
+ )
+
+ meson_src_configure
+}
+
+src_test() {
+ cd "${BUILD_DIR}"/tests || die "failed to change into tests/ directory."
+ ./main.sh || die
+}
+
+src_install() {
+ meson_src_install
+
+ newconfd "${FILESDIR}"/lxcfs-5.0.2.confd lxcfs
+ newinitd "${FILESDIR}"/lxcfs-5.0.2.initd lxcfs
+
+ # Provide our own service file (copy of upstream) due to paths being different from upstream,
+ # #728470
+ systemd_newunit "${FILESDIR}"/lxcfs-5.0.2.service lxcfs.service
+}