From 9f6a82a85d400d6ae7de04c43cee88dbc6bc4da0 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Wed, 26 Jun 2024 00:12:24 +0100 Subject: gentoo auto-resync : 26:06:2024 - 00:12:24 --- sys-fs/btrfsmaintenance/Manifest | 3 +- .../btrfsmaintenance-0.5.1-r1.ebuild | 66 ++++++++++++++++++++++ .../btrfsmaintenance/btrfsmaintenance-0.5.1.ebuild | 65 --------------------- .../files/btrfsmaintenance-0.5.1-script-fix.patch | 12 ++++ 4 files changed, 80 insertions(+), 66 deletions(-) create mode 100644 sys-fs/btrfsmaintenance/btrfsmaintenance-0.5.1-r1.ebuild delete mode 100644 sys-fs/btrfsmaintenance/btrfsmaintenance-0.5.1.ebuild create mode 100644 sys-fs/btrfsmaintenance/files/btrfsmaintenance-0.5.1-script-fix.patch (limited to 'sys-fs/btrfsmaintenance') diff --git a/sys-fs/btrfsmaintenance/Manifest b/sys-fs/btrfsmaintenance/Manifest index 7fb71fa66124..af1530ed1a8c 100644 --- a/sys-fs/btrfsmaintenance/Manifest +++ b/sys-fs/btrfsmaintenance/Manifest @@ -1,5 +1,6 @@ +AUX btrfsmaintenance-0.5.1-script-fix.patch 422 BLAKE2B ae70f1af682c3dc1782a7e9a465467ea467c28b472bd2e3ae2987b926bb27114a0bfd241b39b3c4b02268a7b98b71197ed5c638831826c65f61107ab92be4740 SHA512 e685ddda9c44c46fa241b5cf3ebc740844c4663e2fb3ecdffed7d476d4afa08f68c93825e5ff0d49108983031c5851fecc54e2bf3efb5920d34dde0a526b8249 DIST btrfsmaintenance-0.5.1.tar.gz 26835 BLAKE2B 22cbde3208c7652bc341014785e61d5904b0696cb864edb9ff1563fc277cde14cfa990895a85a98071bdb9b7e4562d0ea9b981a23d1a6511dfda7390ac110f22 SHA512 9ac40c166ff2692373d28107bc4956e78d76090fefb21b8305feb3f936d98a7f94f1bc62b36529a882dbf93083402c48ac94c30a05eab7bd1f9eda13d410ef41 DIST btrfsmaintenance-0.5.tar.gz 24602 BLAKE2B 313c904aa53fc237472256ae74c9eafaf2305b437e280b6bb9c79c2bbaffb6b273304e57d096a911e658fa41fe80308f2a7ad76ded62d79a7f72439163b36444 SHA512 fadab1cf33992c42d476649fd017ac4ae26d6bf6a814dc49d0b7b38e04861474c4e54e6ebe429a83e662b8e5c7be7f460b551c65788d960e2f8f0c7512deef41 -EBUILD btrfsmaintenance-0.5.1.ebuild 2183 BLAKE2B d67ed6ba12000334909ce05281e94051715c316d913184abc2143debd30f25536c169e03839b0e779cf20c6c50ba877205b845a3e07572a737dd529937acc5f6 SHA512 bcb095d8406b3872b28cea83011e984fbc6141ade09caee52b4b52b0afb7c1d3fbef72b1361172da26ff3dbf8d66eaddafeaf98838e8e09feea3f2de06e19258 +EBUILD btrfsmaintenance-0.5.1-r1.ebuild 2231 BLAKE2B 7e74754d492cf414eb45e842f2f72e4f0c809c215f8a1d1d5b7a6239f916f97e79343694a67122c81a0c7df56c12ebe64696023bbf5cc1dfd59ead56931d5f37 SHA512 1354669d117e55e75297aac4cddf555032b7c56abfc91afe8d76a070290a45e374ecab858e907e4a3451beac71978644b6b1f877f0867eda6e33225c2919ecfc EBUILD btrfsmaintenance-0.5.ebuild 2180 BLAKE2B dea3d0da1d630ada178c3d0a82bf268dae3bf8abe681b3ef4819e7e41ee3061dcb0121ccf40a5ca3f9f1c8819e38d5d940af70c902575019476a38db2d341b73 SHA512 3bb517b257ee7e83a61850a2fca6cf8276f7826235b325c6bb8700e79f6ed404a3148c6a29205a23f150314ac64ac489907f6ab531fd338aa189ff140e1f4d73 MISC metadata.xml 595 BLAKE2B e37fd5ba56f1d30747d847927e50b29314b84851c35cc911e0648af421b0130166300fbdf71ee316b32fdc91927a1f5c411eb18ff0cc2d3da67364d71da12af0 SHA512 92834a34c01a8b8a0feddf89d75f2eecfb45027157070e49de765ab61acfee6900a4fe7a12ed42b1204142a12a7309e5134ddfc69dfc8c108bc02a83e443d861 diff --git a/sys-fs/btrfsmaintenance/btrfsmaintenance-0.5.1-r1.ebuild b/sys-fs/btrfsmaintenance/btrfsmaintenance-0.5.1-r1.ebuild new file mode 100644 index 000000000000..e26232645159 --- /dev/null +++ b/sys-fs/btrfsmaintenance/btrfsmaintenance-0.5.1-r1.ebuild @@ -0,0 +1,66 @@ +# Copyright 2022-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit systemd + +DESCRIPTION="Scripts for btrfs maintenance tasks like periodic scrub, balance, trim or defrag" +HOMEPAGE="https://github.com/kdave/btrfsmaintenance" +SRC_URI="https://github.com/kdave/btrfsmaintenance/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86" +IUSE="systemd" + +RDEPEND=" + app-shells/bash + sys-apps/util-linux + sys-fs/btrfs-progs + systemd? ( sys-apps/systemd ) + !systemd? ( virtual/cron ) +" +PATCHES=( "${FILESDIR}/${P}-script-fix.patch" ) + +src_prepare() { + # Fix config path into watching service + sed -i 's%/etc/sysconfig/btrfsmaintenance%/etc/default/btrfsmaintenance%g' btrfsmaintenance-refresh.* || + die "Unable to patch btrfsmaintenance-refresh.*" + rm btrfs-defrag-plugin.sh || die "cannot remove btrfs-defrag-plugin.sh" # not necessary on gentoo systems + default +} + +src_install() { + dodoc README.md CONTRIBUTING.md CHANGES.md + insinto /etc/default + newins sysconfig.btrfsmaintenance btrfsmaintenance + insinto /usr/share/btrfsmaintenance + doins btrfsmaintenance-functions + exeinto /usr/share/btrfsmaintenance + doexe btrfs*.sh + systemd_dounit *.service *.timer *.path +} + +pkg_postinst() { + elog "Installing default btrfsmaintenance scripts" + if use systemd; then + "${EROOT}"/usr/share/btrfsmaintenance/btrfsmaintenance-refresh-cron.sh systemd-timer || die + else + "${EROOT}"/usr/share/btrfsmaintenance/btrfsmaintenance-refresh-cron.sh || die + fi + elog "Now edit cron periods and mount points in /etc/default/btrfsmaintenance " + elog "then run /usr/share/btrfsmaintenance/btrfsmaintenance-refresh-cron.sh to" + elog "update cron symlinks or run" + elog "/usr/share/btrfsmaintenance/btrfsmaintenance-refresh-cron.sh systemd-timer" + elog "to update systemd timers." + elog "You can also enable btrfsmaintenance-refresh.path service in order to" + elog "monitor the config files changes and update systemd timers accordly." +} + +pkg_prerm() { + if [[ -z ${REPLACED_BY_VERSION} ]] ; then + elog "Removing symlinks from btrfsmaintenance cron tasks" + "${EROOT}"/usr/share/btrfsmaintenance/btrfsmaintenance-refresh-cron.sh uninstall || die + fi +} diff --git a/sys-fs/btrfsmaintenance/btrfsmaintenance-0.5.1.ebuild b/sys-fs/btrfsmaintenance/btrfsmaintenance-0.5.1.ebuild deleted file mode 100644 index 82b7ba58cf41..000000000000 --- a/sys-fs/btrfsmaintenance/btrfsmaintenance-0.5.1.ebuild +++ /dev/null @@ -1,65 +0,0 @@ -# Copyright 2022-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit systemd - -DESCRIPTION="Scripts for btrfs maintenance tasks like periodic scrub, balance, trim or defrag" -HOMEPAGE="https://github.com/kdave/btrfsmaintenance" -SRC_URI="https://github.com/kdave/btrfsmaintenance/archive/v${PV}.tar.gz -> ${P}.tar.gz" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86" -IUSE="systemd" - -RDEPEND=" - app-shells/bash - sys-apps/util-linux - sys-fs/btrfs-progs - systemd? ( sys-apps/systemd ) - !systemd? ( virtual/cron ) -" - -src_prepare() { - # Fix config path into watching service - sed -i 's%/etc/sysconfig/btrfsmaintenance%/etc/default/btrfsmaintenance%g' btrfsmaintenance-refresh.* || - die "Unable to patch btrfsmaintenance-refresh.*" - rm btrfs-defrag-plugin.sh || die "cannot remove btrfs-defrag-plugin.sh" # not necessary on gentoo systems - default -} - -src_install() { - dodoc README.md CONTRIBUTING.md CHANGES.md - insinto /etc/default - newins sysconfig.btrfsmaintenance btrfsmaintenance - insinto /usr/share/btrfsmaintenance - doins btrfsmaintenance-functions - exeinto /usr/share/btrfsmaintenance - doexe btrfs*.sh - systemd_dounit *.service *.timer *.path -} - -pkg_postinst() { - elog "Installing default btrfsmaintenance scripts" - if use systemd; then - "${EROOT}"/usr/share/btrfsmaintenance/btrfsmaintenance-refresh-cron.sh systemd-timer || die - else - "${EROOT}"/usr/share/btrfsmaintenance/btrfsmaintenance-refresh-cron.sh || die - fi - elog "Now edit cron periods and mount points in /etc/default/btrfsmaintenance " - elog "then run /usr/share/btrfsmaintenance/btrfsmaintenance-refresh-cron.sh to" - elog "update cron symlinks or run" - elog "/usr/share/btrfsmaintenance/btrfsmaintenance-refresh-cron.sh systemd-timer" - elog "to update systemd timers." - elog "You can also enable btrfsmaintenance-refresh.path service in order to" - elog "monitor the config files changes and update systemd timers accordly." -} - -pkg_prerm() { - if [[ -z ${REPLACED_BY_VERSION} ]] ; then - elog "Removing symlinks from btrfsmaintenance cron tasks" - "${EROOT}"/usr/share/btrfsmaintenance/btrfsmaintenance-refresh-cron.sh uninstall || die - fi -} diff --git a/sys-fs/btrfsmaintenance/files/btrfsmaintenance-0.5.1-script-fix.patch b/sys-fs/btrfsmaintenance/files/btrfsmaintenance-0.5.1-script-fix.patch new file mode 100644 index 000000000000..f546a417feb3 --- /dev/null +++ b/sys-fs/btrfsmaintenance/files/btrfsmaintenance-0.5.1-script-fix.patch @@ -0,0 +1,12 @@ +https://github.com/kdave/btrfsmaintenance/pull/119 +--- a/btrfsmaintenance-functions ++++ b/btrfsmaintenance-functions +@@ -101,7 +101,7 @@ + else + # Flock older than 2.27 does not support --verbose option, check + # if it's available as we'd like to log the information +- if /usr/bin/flock --help 2>&1 | grep -q -- --verbose; ++ if /usr/bin/flock --help 2>&1 | grep -q -- --verbose; then + verbose="--verbose" + fi + -- cgit v1.2.3