From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-fs/btrfsmaintenance/
Date: Fri, 31 May 2024 20:11:33 +0000 (UTC) [thread overview]
Message-ID: <1717186233.8a79adc77a1ad51a55ecd7db6ecae15ad884f8f4.sam@gentoo> (raw)
commit: 8a79adc77a1ad51a55ecd7db6ecae15ad884f8f4
Author: Martin Dummer <martin.dummer <AT> gmx <DOT> net>
AuthorDate: Fri May 31 19:51:54 2024 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri May 31 20:10:33 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8a79adc7
sys-fs/btrfsmaintenance: add 0.5.1
Signed-off-by: Martin Dummer <martin.dummer <AT> gmx.net>
Closes: https://github.com/gentoo/gentoo/pull/36930
Signed-off-by: Sam James <sam <AT> gentoo.org>
sys-fs/btrfsmaintenance/Manifest | 1 +
.../btrfsmaintenance/btrfsmaintenance-0.5.1.ebuild | 65 ++++++++++++++++++++++
2 files changed, 66 insertions(+)
diff --git a/sys-fs/btrfsmaintenance/Manifest b/sys-fs/btrfsmaintenance/Manifest
index c515387a7724..0ffc19e8d126 100644
--- a/sys-fs/btrfsmaintenance/Manifest
+++ b/sys-fs/btrfsmaintenance/Manifest
@@ -1 +1,2 @@
+DIST btrfsmaintenance-0.5.1.tar.gz 26835 BLAKE2B 22cbde3208c7652bc341014785e61d5904b0696cb864edb9ff1563fc277cde14cfa990895a85a98071bdb9b7e4562d0ea9b981a23d1a6511dfda7390ac110f22 SHA512 9ac40c166ff2692373d28107bc4956e78d76090fefb21b8305feb3f936d98a7f94f1bc62b36529a882dbf93083402c48ac94c30a05eab7bd1f9eda13d410ef41
DIST btrfsmaintenance-0.5.tar.gz 24602 BLAKE2B 313c904aa53fc237472256ae74c9eafaf2305b437e280b6bb9c79c2bbaffb6b273304e57d096a911e658fa41fe80308f2a7ad76ded62d79a7f72439163b36444 SHA512 fadab1cf33992c42d476649fd017ac4ae26d6bf6a814dc49d0b7b38e04861474c4e54e6ebe429a83e662b8e5c7be7f460b551c65788d960e2f8f0c7512deef41
diff --git a/sys-fs/btrfsmaintenance/btrfsmaintenance-0.5.1.ebuild b/sys-fs/btrfsmaintenance/btrfsmaintenance-0.5.1.ebuild
new file mode 100644
index 000000000000..82b7ba58cf41
--- /dev/null
+++ b/sys-fs/btrfsmaintenance/btrfsmaintenance-0.5.1.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
+}
next reply other threads:[~2024-05-31 20:11 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-31 20:11 Sam James [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-11-01 6:42 [gentoo-commits] repo/gentoo:master commit in: sys-fs/btrfsmaintenance/ Joonas Niilola
2024-11-01 5:41 Sam James
2024-10-31 19:30 Arthur Zamarin
2024-09-19 18:57 Arthur Zamarin
2024-09-18 18:13 Sam James
2024-09-18 18:13 Sam James
2024-08-26 7:24 Sam James
2024-08-25 23:54 Conrad Kostecki
2024-08-25 23:54 Conrad Kostecki
2024-05-31 20:11 Sam James
2023-12-02 9:24 Arthur Zamarin
2023-11-18 2:29 Sam James
2022-12-26 20:00 Georgy Yakovlev
2022-12-26 20:00 Georgy Yakovlev
2022-01-11 2:23 Georgy Yakovlev
2020-08-14 8:20 Joonas Niilola
2020-02-08 16:25 David Seifert
2019-06-30 17:05 Mike Gilbert
2019-05-20 11:24 Mikle Kolyada
2019-05-16 23:56 Thomas Deutschmann
2018-10-12 3:42 Georgy Yakovlev
2018-07-09 14:48 Mikle Kolyada
2018-07-09 1:29 Thomas Deutschmann
2018-07-08 16:16 Andreas Sturmlechner
2018-04-21 21:58 Michał Górny
2018-04-14 18:57 Mikle Kolyada
2018-04-11 20:43 Thomas Deutschmann
2018-01-26 21:23 Patrice Clement
2017-12-16 8:20 Tobias Klausmann
2017-10-15 22:08 Thomas Deutschmann
2017-07-19 9:38 Michał Górny
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1717186233.8a79adc77a1ad51a55ecd7db6ecae15ad884f8f4.sam@gentoo \
--to=sam@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox