summaryrefslogtreecommitdiff
path: root/sys-fs/btrfsmaintenance
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-01-27 18:07:28 +0000
committerV3n3RiX <venerix@redcorelinux.org>2018-01-27 18:07:28 +0000
commit67f76a858f1ac826bd8a550d756d9ec6e340ed4f (patch)
tree45f4ada6be05bc180a14e017c9d5c6b58a0eec6e /sys-fs/btrfsmaintenance
parent38b7258d086dd5e263c3bbe3880c8c956676bc71 (diff)
gentoo resync : 27.01.2018
Diffstat (limited to 'sys-fs/btrfsmaintenance')
-rw-r--r--sys-fs/btrfsmaintenance/Manifest4
-rw-r--r--sys-fs/btrfsmaintenance/btrfsmaintenance-0.4.ebuild62
-rw-r--r--sys-fs/btrfsmaintenance/metadata.xml5
3 files changed, 70 insertions, 1 deletions
diff --git a/sys-fs/btrfsmaintenance/Manifest b/sys-fs/btrfsmaintenance/Manifest
index 0ea6f9af03df..b18cbc8520e9 100644
--- a/sys-fs/btrfsmaintenance/Manifest
+++ b/sys-fs/btrfsmaintenance/Manifest
@@ -1,3 +1,5 @@
DIST btrfsmaintenance-0.3.1.tar.gz 19698 BLAKE2B f792d7e55dd738b4be2f18aa4047c8b2c092244b71c50e32cf881a7862b14a2d897a170515388fcee40a89763c4c91d357ca3ceb559e372ca3c673d0b1d3aec2 SHA512 89be6da3d6bb3f85f645ac899f173d19cb787e938dd2fc91be16b3202a6784ca33dc4a4d9f9ee78ac6a96468dbaa4f4dc7a2f2e6998d550ea44d7af24198dbfb
+DIST btrfsmaintenance-0.4.tar.gz 21622 BLAKE2B 844d467b7712093370c1d6391e26d5046deb84cee6fd60b5774743415c75ad00a1e27c0be21004c260680b72b5615dcfd01b84f1eba3d57f7c9c5d22b6750d8d SHA512 2d19e82c03b291d157dc5f763dcb094330fd1a4aaee6215dbe576a5da44f71f4adee55fd06c60409e4699ac671d2fc73628f202f4f68270910eeba782f0ad153
EBUILD btrfsmaintenance-0.3.1.ebuild 1381 BLAKE2B c3dcf441fb735792133f6dca9a5bdf5d2cb76d03fc46540a2ac87ea0211b83027249706c6eb55494aaab223ac222c0e3dfd65d09cfa169c37b950436daa46a59 SHA512 f681469cc0db852d21625736f3ecca7cd745c2dae6ef3d2d1b7ca1a4cf51645e904346ab18ce0d19abcd5b372aa40d42822629c9e113dd7fee856e7481b5c2c6
-MISC metadata.xml 454 BLAKE2B 944720aeb7738b0eba992a1800cd7ed7dfb359cad9e71bdef39161a8d9f6f9ba5306d8574c81216ea0f88a2a92ff8e9b85619bc24d7ad021e5da6d7752b9e98d SHA512 d23ea714ccb28d7f7266fc12c89bafb4b673025e285d1ca6faddaf74b99b39f54aefb043848e2812db5c28ef950ff86ba075d1afac51c0ce23c8c7c9691eb96e
+EBUILD btrfsmaintenance-0.4.ebuild 2054 BLAKE2B 8fdfc67a107f525d827226b556684c3d6ee461b1c412a8c662571991ef9373e1a6c72dd1b86da7e340176b42a54bb1bd25b0b67235a0cd8ab570541c143e755e SHA512 1d84d447b4eb7a47a695b6b8458da137f356779297c65be0ca82b81445c69f1a2a49fe5e3d7df9dce8f82bd75d50fe08086e5de0e07d2fd577e93923162e0ab9
+MISC metadata.xml 564 BLAKE2B a54366a1b7a22e5b6f7ba8814ebcc75e4fb6185a5ce49f021bc2dec51277f31f82cafd4cf2de29918b97aa9276485bdc0dcf42d21e65d71636d3ab6ea4bf78da SHA512 6affb15730bb1ec7d8601c46ac5ea9f48b603d36825b364831459025764080641f51644af6c838d0e6de9edca766236662d068ee5893ba811687c4a1d7585bdc
diff --git a/sys-fs/btrfsmaintenance/btrfsmaintenance-0.4.ebuild b/sys-fs/btrfsmaintenance/btrfsmaintenance-0.4.ebuild
new file mode 100644
index 000000000000..8c4208008be5
--- /dev/null
+++ b/sys-fs/btrfsmaintenance/btrfsmaintenance-0.4.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+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 ~x86"
+IUSE="systemd"
+
+RDEPEND="systemd? ( sys-apps/systemd )
+ sys-fs/btrfs-progs
+ 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.*"
+ default
+}
+
+src_install() {
+ dodoc README.md CONTRIBUTING.md btrfsmaintenance.changes
+ insinto /etc/default
+ newins sysconfig.btrfsmaintenance btrfsmaintenance
+ insinto /usr/share/btrfsmaintenance
+ doins btrfsmaintenance-functions
+ exeinto /usr/share/btrfsmaintenance
+ doexe btrfs*.sh
+ systemd_dounit *.service
+ systemd_dounit *.timer
+ systemd_dounit *.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/metadata.xml b/sys-fs/btrfsmaintenance/metadata.xml
index 1aba136c2736..46342cb51b38 100644
--- a/sys-fs/btrfsmaintenance/metadata.xml
+++ b/sys-fs/btrfsmaintenance/metadata.xml
@@ -12,4 +12,9 @@
<upstream>
<remote-id type="github">kdave/btrfsmaintenance</remote-id>
</upstream>
+ <use>
+ <flag name="systemd">
+ Enable systemd services and timers instead of cron timers
+ </flag>
+ </use>
</pkgmetadata>