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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 14ECD1581FB for ; Sun, 25 Aug 2024 23:54:17 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 60E2EE2A93; Sun, 25 Aug 2024 23:54:16 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 4A89FE2A93 for ; Sun, 25 Aug 2024 23:54:16 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 8EAF8342FB4 for ; Sun, 25 Aug 2024 23:54:15 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id CA61D1F1E for ; Sun, 25 Aug 2024 23:54:12 +0000 (UTC) From: "Conrad Kostecki" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Conrad Kostecki" Message-ID: <1724630023.c4fc4ed4d9c9eef9a095123fc8bae57348f9c1fe.conikost@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.5.2.ebuild X-VCS-Directories: sys-fs/btrfsmaintenance/ X-VCS-Committer: conikost X-VCS-Committer-Name: Conrad Kostecki X-VCS-Revision: c4fc4ed4d9c9eef9a095123fc8bae57348f9c1fe X-VCS-Branch: master Date: Sun, 25 Aug 2024 23:54:12 +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-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 6a0a9097-c9f8-4c4f-980c-bf422e71a60f X-Archives-Hash: 7927f3b468ae105faaa1c32302d09dd7 commit: c4fc4ed4d9c9eef9a095123fc8bae57348f9c1fe Author: Michael Mair-Keimberger levelnine at> AuthorDate: Sun Aug 11 08:52:15 2024 +0000 Commit: Conrad Kostecki gentoo org> CommitDate: Sun Aug 25 23:53:43 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c4fc4ed4 sys-fs/btrfsmaintenance: add 0.5.2 Signed-off-by: Michael Mair-Keimberger levelnine.at> Signed-off-by: Conrad Kostecki gentoo.org> sys-fs/btrfsmaintenance/Manifest | 1 + .../btrfsmaintenance/btrfsmaintenance-0.5.2.ebuild | 65 ++++++++++++++++++++++ 2 files changed, 66 insertions(+) diff --git a/sys-fs/btrfsmaintenance/Manifest b/sys-fs/btrfsmaintenance/Manifest index 0ffc19e8d126..fb353a4999f9 100644 --- a/sys-fs/btrfsmaintenance/Manifest +++ b/sys-fs/btrfsmaintenance/Manifest @@ -1,2 +1,3 @@ DIST btrfsmaintenance-0.5.1.tar.gz 26835 BLAKE2B 22cbde3208c7652bc341014785e61d5904b0696cb864edb9ff1563fc277cde14cfa990895a85a98071bdb9b7e4562d0ea9b981a23d1a6511dfda7390ac110f22 SHA512 9ac40c166ff2692373d28107bc4956e78d76090fefb21b8305feb3f936d98a7f94f1bc62b36529a882dbf93083402c48ac94c30a05eab7bd1f9eda13d410ef41 +DIST btrfsmaintenance-0.5.2.tar.gz 27071 BLAKE2B e2585bcf911cb0cbe3847dd3d6d6054cdea84d6f2c5ab51e47ec8b75adcb2a59d5ab904500fd8875e2eed11f4ba3b165eb20626f252fce179bfeb70700448f40 SHA512 eb20ee15851841d0216f0ec68b1cfc966a7c70892544a57e71e4dbae87d96e4f7f0677d89e6352106006541f5203676fb7fe13d71071778fc31bce8e55251320 DIST btrfsmaintenance-0.5.tar.gz 24602 BLAKE2B 313c904aa53fc237472256ae74c9eafaf2305b437e280b6bb9c79c2bbaffb6b273304e57d096a911e658fa41fe80308f2a7ad76ded62d79a7f72439163b36444 SHA512 fadab1cf33992c42d476649fd017ac4ae26d6bf6a814dc49d0b7b38e04861474c4e54e6ebe429a83e662b8e5c7be7f460b551c65788d960e2f8f0c7512deef41 diff --git a/sys-fs/btrfsmaintenance/btrfsmaintenance-0.5.2.ebuild b/sys-fs/btrfsmaintenance/btrfsmaintenance-0.5.2.ebuild new file mode 100644 index 000000000000..82b7ba58cf41 --- /dev/null +++ b/sys-fs/btrfsmaintenance/btrfsmaintenance-0.5.2.ebuild @@ -0,0 +1,65 @@ +# 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 +}