From 06a2842fe98f269286aeca0d82b0e7e1d469a511 Mon Sep 17 00:00:00 2001 From: Arthur Zamarin Date: Sun, 10 Sep 2023 21:43:44 +0300 Subject: sys-fs/cachefilesd: EAPI=8, some refactors Signed-off-by: Arthur Zamarin --- sys-fs/cachefilesd/cachefilesd-0.10.10-r1.ebuild | 21 +++++++++------------ sys-fs/cachefilesd/files/README.gentoo | 7 +++++++ .../files/cachefilesd-0.10.9-makefile.patch | 8 ++++---- 3 files changed, 20 insertions(+), 16 deletions(-) create mode 100644 sys-fs/cachefilesd/files/README.gentoo (limited to 'sys-fs') diff --git a/sys-fs/cachefilesd/cachefilesd-0.10.10-r1.ebuild b/sys-fs/cachefilesd/cachefilesd-0.10.10-r1.ebuild index 94bbc2597dd0..8347767ca534 100644 --- a/sys-fs/cachefilesd/cachefilesd-0.10.10-r1.ebuild +++ b/sys-fs/cachefilesd/cachefilesd-0.10.10-r1.ebuild @@ -1,9 +1,9 @@ -# Copyright 1999-2022 Gentoo Authors +# Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=6 +EAPI=8 -inherit flag-o-matic systemd toolchain-funcs tmpfiles +inherit flag-o-matic systemd toolchain-funcs tmpfiles readme.gentoo-r1 DESCRIPTION="Provides a caching directory on an already mounted filesystem" HOMEPAGE="https://people.redhat.com/~dhowells/fscache/" @@ -15,7 +15,6 @@ KEYWORDS="amd64 ~riscv x86" IUSE="doc selinux" RDEPEND="selinux? ( sec-policy/selinux-cachefilesd )" -DEPEND="" PATCHES=( "${FILESDIR}"/${PN}-0.10.9-makefile.patch @@ -34,6 +33,8 @@ src_prepare() { src_install() { default + readme.gentoo_create_doc + if use selinux; then dodoc -r selinux docompress -x /usr/share/doc/${PF}/selinux @@ -52,12 +53,8 @@ src_install() { pkg_postinst() { tmpfiles_process ${PN}.conf - [[ -d /var/cache/fscache ]] && return - elog "Before CacheFiles can be used, a directory for local storage" - elog "must be created. The default configuration of /etc/cachefilesd.conf" - elog "uses /var/cache/fscache. The filesystem mounted there must support" - elog "extended attributes (mount -o user_xattr)." - echo "" - elog "Once that is taken care of, start the daemon, add -o ...,fsc" - elog "to the mount options of your network mounts, and let it fly!" + if [[ ! -d /var/cache/fscache ]]; then + FORCE_PRINT_ELOG=1 + fi + readme.gentoo_print_elog } diff --git a/sys-fs/cachefilesd/files/README.gentoo b/sys-fs/cachefilesd/files/README.gentoo new file mode 100644 index 000000000000..a21b8cb8facf --- /dev/null +++ b/sys-fs/cachefilesd/files/README.gentoo @@ -0,0 +1,7 @@ +Before CacheFiles can be used, a directory for local storage +must be created. The default configuration of /etc/cachefilesd.conf +uses /var/cache/fscache. The filesystem mounted there must support +extended attributes (mount -o user_xattr). + +Once that is taken care of, start the daemon, add -o ...,fsc +to the mount options of your network mounts, and let it fly! diff --git a/sys-fs/cachefilesd/files/cachefilesd-0.10.9-makefile.patch b/sys-fs/cachefilesd/files/cachefilesd-0.10.9-makefile.patch index 276eff35a1c0..b4bda450505f 100644 --- a/sys-fs/cachefilesd/files/cachefilesd-0.10.9-makefile.patch +++ b/sys-fs/cachefilesd/files/cachefilesd-0.10.9-makefile.patch @@ -1,5 +1,5 @@ ---- cachefilesd-0.10.9/Makefile.old 2016-07-18 11:12:38.467106807 +0800 -+++ cachefilesd-0.10.9/Makefile 2016-07-18 11:13:59.937770347 +0800 +--- cachefilesd-0.10.9/Makefile ++++ cachefilesd-0.10.9/Makefile @@ -1,4 +1,3 @@ -CFLAGS := -g -O2 -Wall -Wsign-compare INSTALL := install @@ -8,12 +8,12 @@ @@ -40,7 +39,10 @@ ############################################################################### all: cachefilesd - + -cachefilesd: cachefilesd.c Makefile +cachefilesd.o: cachefilesd.c + $(CC) $(CFLAGS) -c $< + +cachefilesd: cachefilesd.o $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< - + ############################################################################### -- cgit v1.2.3-65-gdbad