diff options
Diffstat (limited to 'nonsystemd')
-rw-r--r-- | nonsystemd/opentmpfiles/PKGBUILD | 39 | ||||
-rw-r--r-- | nonsystemd/opentmpfiles/chattr-ignore-nocow.patch | 19 |
2 files changed, 47 insertions, 11 deletions
diff --git a/nonsystemd/opentmpfiles/PKGBUILD b/nonsystemd/opentmpfiles/PKGBUILD index c6dc9824f..fb93fb570 100644 --- a/nonsystemd/opentmpfiles/PKGBUILD +++ b/nonsystemd/opentmpfiles/PKGBUILD @@ -1,23 +1,40 @@ # Maintainer: David P. <megver83@parabola.nu> # Contributor: Luke Shumaker <lukeshu@parabola.nu> -# Maintainer (Artix): artoo <artoo@artixlinux.org> +# Contributor: artoo <artoo@artixlinux.org> + + +# NOTE: this was originally based on the artix PKGBUILD (<= v0.2) +# artix as since dropped this software in favor of 'etmpfiles' from eudev +# https://gitea.artixlinux.org/artixlinux/packages/commit/e8314e156545bfaab6455f8200a253932dc0049c + pkgname=opentmpfiles -pkgver=0.2 -pkgrel=2 -pkgdesc="A standalone utility for handling systemd-style tmpfiles.d settings" +pkgver=0.3.1 +pkgrel=1 +pkgdesc="standalone utility for handling systemd-style tmpfiles.d settings" arch=('any') url="https://github.com/OpenRC/opentmpfiles" license=('BSD2') -depends=('pacman') -source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/${pkgver}.tar.gz" +source=("${pkgname}-${pkgver}.tar.gz::https://github.com/OpenRC/${pkgname}/archive/${pkgver}.tar.gz" '30-opentmpfiles.hook' - 'tmpfiles-hook') -sha256sums=('4fa6a78600b1d67d34c441919e5e62ad181af358d9353ce380f515d623177ecb' + 'tmpfiles-hook' + 'chattr-ignore-nocow.patch') +sha256sums=('47d651ccda53a204463285044a9d34b1bd54d927509dac43994a9d6341be084a' '23c73b3cc20ec38e0a5166f254293c911d20ae3efec8e133f424c1a1d0703fb8' - 'adbee03530006e8284ea44c5dd7eb99f6cc6c4e383c09fec36d7a22f7d486fc5') + 'adbee03530006e8284ea44c5dd7eb99f6cc6c4e383c09fec36d7a22f7d486fc5' + '9a753d36a536c7913a38ac9e3cc22ffce4c1214f25059a0a00152bce0043a96e') + + +prepare() +{ + cd "${pkgbase}-${pkgver}" + + # https://github.com/OpenRC/opentmpfiles/issues/2 + patch -Np1 < ${srcdir}/chattr-ignore-nocow.patch +} -package_opentmpfiles() { +package() +{ replaces=('opentmpfiles-systemdcompat') conflicts=('opentmpfiles-systemdcompat' 'systemd-tools') @@ -43,5 +60,5 @@ package_opentmpfiles() { ln -snf /etc/init.d/opentmpfiles-setup "${pkgdir}"/etc/runlevels/boot/opentmpfiles-setup install -dm755 "${pkgdir}/usr/share/licenses/${pkgname}" - install -m644 "license" "${pkgdir}/usr/share/licenses/${pkgname}/" + install -m644 "LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/" } diff --git a/nonsystemd/opentmpfiles/chattr-ignore-nocow.patch b/nonsystemd/opentmpfiles/chattr-ignore-nocow.patch new file mode 100644 index 000000000..c3aa84d9c --- /dev/null +++ b/nonsystemd/opentmpfiles/chattr-ignore-nocow.patch @@ -0,0 +1,19 @@ +diff a/tmpfiles.sh b/tmpfiles.sh +--- a/tmpfiles.sh ++++ b/tmpfiles.sh +@@ -54,6 +54,15 @@ _chattr() { + '') return ;; + *) attr="+$attr" ;; + esac ++ ++ # ignore attempts to set unsupported attributes ++ local fs_type ++ case $attr in ++ [+-=]C) fs_type="$(df --output=fstype "$3" | tail --lines=1)" ++ test "$fstype" == 'btrfs' || return 0 ++ ;; ++ esac ++ + local IFS= + dryrun_or_real chattr "$1" "$attr" -- "$3" + } |