* [gentoo-commits] repo/gentoo:master commit in: sys-fs/btrfsmaintenance/, sys-fs/btrfsmaintenance/files/
@ 2018-07-07 21:58 Andreas Sturmlechner
0 siblings, 0 replies; 2+ messages in thread
From: Andreas Sturmlechner @ 2018-07-07 21:58 UTC (permalink / raw
To: gentoo-commits
commit: 2e18700253683a13e3ec5b2baf8b0180fda974d2
Author: Martin Dummer <martin.dummer <AT> gmx <DOT> net>
AuthorDate: Tue Jun 26 20:11:12 2018 +0000
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sat Jul 7 21:57:14 2018 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2e187002
sys-fs/btrfsmaintenance: fix btrfs-defrag.sh
this ebuild fixes missing function is_btrfs in btrfs-defrag.sh
Closes: https://bugs.gentoo.org/657756
Package-Manager: Portage-2.3.40, Repoman-2.3.9
Closes: https://github.com/gentoo/gentoo/pull/9077
.../btrfsmaintenance-0.4.1-r1.ebuild | 66 ++++++++++++++++++++++
.../btrfsmaintenance/files/fix-btrfs-defrag.patch | 12 ++++
2 files changed, 78 insertions(+)
diff --git a/sys-fs/btrfsmaintenance/btrfsmaintenance-0.4.1-r1.ebuild b/sys-fs/btrfsmaintenance/btrfsmaintenance-0.4.1-r1.ebuild
new file mode 100644
index 00000000000..3129b367eed
--- /dev/null
+++ b/sys-fs/btrfsmaintenance/btrfsmaintenance-0.4.1-r1.ebuild
@@ -0,0 +1,66 @@
+# 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="
+ sys-fs/btrfs-progs
+ virtual/cron
+ systemd? ( sys-apps/systemd )
+"
+
+PATCHES=(
+ "${FILESDIR}/fix-btrfs-defrag.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.*"
+ 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/fix-btrfs-defrag.patch b/sys-fs/btrfsmaintenance/files/fix-btrfs-defrag.patch
new file mode 100644
index 00000000000..4dc5fd6b1d9
--- /dev/null
+++ b/sys-fs/btrfsmaintenance/files/fix-btrfs-defrag.patch
@@ -0,0 +1,12 @@
+diff --git a/btrfs-defrag.sh b/btrfs-defrag.sh
+index 284abc8..5ced921 100755
+--- a/btrfs-defrag.sh
++++ b/btrfs-defrag.sh
+@@ -15,6 +15,7 @@ if [ -f /etc/default/btrfsmaintenance ] ; then
+ fi
+
+ LOGIDENTIFIER='btrfs-defrag'
++. $(dirname $(realpath "$0"))/btrfsmaintenance-functions
+
+ {
+ OIFS="$IFS"
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-fs/btrfsmaintenance/, sys-fs/btrfsmaintenance/files/
@ 2024-06-25 2:09 Sam James
0 siblings, 0 replies; 2+ messages in thread
From: Sam James @ 2024-06-25 2:09 UTC (permalink / raw
To: gentoo-commits
commit: b5a390b55e55d101008b7791524d61cfe6de8d79
Author: Martin Dummer <martin.dummer <AT> gmx <DOT> net>
AuthorDate: Mon Jun 24 20:31:06 2024 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Jun 25 02:04:17 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b5a390b5
sys-fs/btrfsmaintenance: fix syntax error in shellscript
Signed-off-by: Martin Dummer <martin.dummer <AT> gmx.net>
Closes: https://github.com/gentoo/gentoo/pull/37282
Signed-off-by: Sam James <sam <AT> gentoo.org>
...ntenance-0.5.1.ebuild => btrfsmaintenance-0.5.1-r1.ebuild} | 1 +
.../files/btrfsmaintenance-0.5.1-script-fix.patch | 11 +++++++++++
2 files changed, 12 insertions(+)
diff --git a/sys-fs/btrfsmaintenance/btrfsmaintenance-0.5.1.ebuild b/sys-fs/btrfsmaintenance/btrfsmaintenance-0.5.1-r1.ebuild
similarity index 97%
rename from sys-fs/btrfsmaintenance/btrfsmaintenance-0.5.1.ebuild
rename to sys-fs/btrfsmaintenance/btrfsmaintenance-0.5.1-r1.ebuild
index 82b7ba58cf41..e26232645159 100644
--- a/sys-fs/btrfsmaintenance/btrfsmaintenance-0.5.1.ebuild
+++ b/sys-fs/btrfsmaintenance/btrfsmaintenance-0.5.1-r1.ebuild
@@ -21,6 +21,7 @@ RDEPEND="
systemd? ( sys-apps/systemd )
!systemd? ( virtual/cron )
"
+PATCHES=( "${FILESDIR}/${P}-script-fix.patch" )
src_prepare() {
# Fix config path into watching service
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..2bd65f80f0c7
--- /dev/null
+++ b/sys-fs/btrfsmaintenance/files/btrfsmaintenance-0.5.1-script-fix.patch
@@ -0,0 +1,11 @@
+--- 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
+
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-06-25 2:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-25 2:09 [gentoo-commits] repo/gentoo:master commit in: sys-fs/btrfsmaintenance/, sys-fs/btrfsmaintenance/files/ Sam James
-- strict thread matches above, loose matches on Subject: below --
2018-07-07 21:58 Andreas Sturmlechner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox