From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 013DD138331 for ; Fri, 26 Jan 2018 21:23:13 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 6068CE09F4; Fri, 26 Jan 2018 21:23:12 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 2CF1AE09F2 for ; Fri, 26 Jan 2018 21:23:12 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 38D01335C36 for ; Fri, 26 Jan 2018 21:23:11 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id B52AD1C8 for ; Fri, 26 Jan 2018 21:23:09 +0000 (UTC) From: "Patrice Clement" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Patrice Clement" Message-ID: <1517001776.5c4a40cc25a571ebf4610f440d72ba4ee81d1a8b.monsieurp@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-fs/btrfsmaintenance/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-fs/btrfsmaintenance/Manifest sys-fs/btrfsmaintenance/btrfsmaintenance-0.4.ebuild sys-fs/btrfsmaintenance/metadata.xml X-VCS-Directories: sys-fs/btrfsmaintenance/ X-VCS-Committer: monsieurp X-VCS-Committer-Name: Patrice Clement X-VCS-Revision: 5c4a40cc25a571ebf4610f440d72ba4ee81d1a8b X-VCS-Branch: master Date: Fri, 26 Jan 2018 21:23:09 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 4d34aa80-bd9a-46d0-a2e9-592ac6230e58 X-Archives-Hash: f94f8addeda46f30828c0102358e6090 commit: 5c4a40cc25a571ebf4610f440d72ba4ee81d1a8b Author: Luigi 'Comio' Mantellini gmail com> AuthorDate: Thu Jan 25 18:38:12 2018 +0000 Commit: Patrice Clement gentoo org> CommitDate: Fri Jan 26 21:22:56 2018 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5c4a40cc sys-fs/btrfsmaintenance: version bump to 0.4 and add systemd support. Closes: https://bugs.gentoo.org/645660 Closes: https://bugs.gentoo.org/643166 Closes: https://github.com/gentoo/gentoo/pull/6955 sys-fs/btrfsmaintenance/Manifest | 1 + .../btrfsmaintenance/btrfsmaintenance-0.4.ebuild | 62 ++++++++++++++++++++++ sys-fs/btrfsmaintenance/metadata.xml | 5 ++ 3 files changed, 68 insertions(+) diff --git a/sys-fs/btrfsmaintenance/Manifest b/sys-fs/btrfsmaintenance/Manifest index 82d8d13de79..fa600713611 100644 --- a/sys-fs/btrfsmaintenance/Manifest +++ b/sys-fs/btrfsmaintenance/Manifest @@ -1 +1,2 @@ DIST btrfsmaintenance-0.3.1.tar.gz 19698 BLAKE2B f792d7e55dd738b4be2f18aa4047c8b2c092244b71c50e32cf881a7862b14a2d897a170515388fcee40a89763c4c91d357ca3ceb559e372ca3c673d0b1d3aec2 SHA512 89be6da3d6bb3f85f645ac899f173d19cb787e938dd2fc91be16b3202a6784ca33dc4a4d9f9ee78ac6a96468dbaa4f4dc7a2f2e6998d550ea44d7af24198dbfb +DIST btrfsmaintenance-0.4.tar.gz 21622 BLAKE2B 844d467b7712093370c1d6391e26d5046deb84cee6fd60b5774743415c75ad00a1e27c0be21004c260680b72b5615dcfd01b84f1eba3d57f7c9c5d22b6750d8d SHA512 2d19e82c03b291d157dc5f763dcb094330fd1a4aaee6215dbe576a5da44f71f4adee55fd06c60409e4699ac671d2fc73628f202f4f68270910eeba782f0ad153 diff --git a/sys-fs/btrfsmaintenance/btrfsmaintenance-0.4.ebuild b/sys-fs/btrfsmaintenance/btrfsmaintenance-0.4.ebuild new file mode 100644 index 00000000000..8c4208008be --- /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 1aba136c273..46342cb51b3 100644 --- a/sys-fs/btrfsmaintenance/metadata.xml +++ b/sys-fs/btrfsmaintenance/metadata.xml @@ -12,4 +12,9 @@ kdave/btrfsmaintenance + + + Enable systemd services and timers instead of cron timers + +