Package Details: btrfsmaintenance 0.5.2-1

Git Clone URL: https://aur.archlinux.org/btrfsmaintenance.git (read-only, click to copy)
Package Base: btrfsmaintenance
Description: Btrfs maintenance scripts
Upstream URL: https://github.com/kdave/btrfsmaintenance
Keywords: btrfs
Licenses: GPL-2.0-or-later
Submitter: ImNtReal
Maintainer: willemw
Last Packager: willemw
Votes: 31
Popularity: 2.18
First Submitted: 2016-05-26 14:10 (UTC)
Last Updated: 2024-07-06 06:41 (UTC)

Dependencies (1)

Required by (2)

Sources (1)

Latest Comments

1 2 3 Next › Last »

willemw commented on 2024-06-13 12:42 (UTC)

A conflict only needs to be defined in other btrfsmaintenance- packages, not again the other way around in this package. This package does not need to know anything about other btrfsmaintenance- packages.

See the guidelines https://wiki.archlinux.org/title/PKGBUILD#conflicts: "you do not need to specify all those conflicting package names in your conflicts array".

dataprolet commented on 2024-06-13 12:24 (UTC)

Please update, here's a working PKGBUILD: https://git.dataprolet.de/dataprolet/PKGBUILDs/src/branch/main/btrfsmaintenance/PKGBUILD

Also, the conflicts=("${pkgname}-git") is correct.

willemw commented on 2022-04-07 07:18 (UTC)

The conflicts=("${pkgname}-git") is still there. Maybe someone forgot to remove it?

calebmckay commented on 2021-11-10 04:27 (UTC)

@qubidt, I have published the changes from your diff. Thank you for the feedback and help.

willemw commented on 2021-11-09 13:35 (UTC)

It was a comment for the current package. Installing the .path for as non-executable is just cleaner.

qubidt commented on 2021-11-09 13:23 (UTC)

In the diff I posted the .path file is not executable (although I don't think this matters much either way as far as systemd is concerned). It's installed with 644 permissions like the .service and .timer files

willemw commented on 2021-11-09 12:59 (UTC)

The .path file should not be executable.

qubidt commented on 2021-11-09 12:11 (UTC)

@willemw no, path units need to be enabled/started just like service/timer units, it won't be enabled unless done so explicitly by the user (as per the Arch standard). see:

https://www.redhat.com/sysadmin/introduction-path-units

willemw commented on 2021-11-09 11:57 (UTC)

@qubidt: Yes, it removes the config file. Thanks.

Have not checked it (yet), but putting the .path file in /usr/lib/systemd/system, wouldn't that enable the auto-refresh feature by default (i.e. trigger the corresponding btrfsmaintenance-refresh.service)? Shouldn't it be up to the user to decide how and when to refresh?

qubidt commented on 2021-11-09 11:21 (UTC)

@willemw that paragraph applies only to files in the backup= array. You can test this by creating a new package with a modified sysconfig.btrfsmaintenance and installing it. Your changes in /etc/default/btrfsmaintenance will be overwritten.

Also, that wouldn't address the case where you remove the package without --nosave. /etc/default/btrfsmaintenance will be incorrectly removed along with the package files

Another issue is the .path systemd unit file isn't being installed to the correct place. Diff with my changes to address both:

diff --git a/PKGBUILD b/PKGBUILD
index c4f77c0..32316e6 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -5,22 +5,28 @@

 pkgname=btrfsmaintenance
 pkgver=0.5
-pkgrel=1
+pkgrel=2
 pkgdesc='btrfs maintenance scripts'
 arch=('any')
 url='https://github.com/kdave/btrfsmaintenance'
 license=('GPL2')
 depends=('bash')
 conflicts=("${pkgname}-git")
+backup=(etc/default/btrfsmaintenance)
 source=("https://github.com/kdave/btrfsmaintenance/archive/v${pkgver}.tar.gz")
 sha256sums=('0de747e630155ecbc438dfac23ffee00cb3f2ee4d01bb67724ef81826709cacb')

+prepare() {
+  cd "${srcdir}/${pkgname}-${pkgver}"
+  sed -E -i 's|/etc/sysconfig/|/etc/default/|' btrfsmaintenance-refresh.path
+}
+
 package() {
-   cd "${srcdir}/${pkgname}-${pkgver}"
+  cd "${srcdir}/${pkgname}-${pkgver}"
   install -Dm644 sysconfig.btrfsmaintenance "$pkgdir/etc/default/btrfsmaintenance"
   install -dm755 "$pkgdir/"{usr/lib/systemd/system,usr/share/btrfsmaintenance}
-  install -Dm755 btrfs-*.sh btrfsmaintenance-{functions,refresh-cron.sh,refresh.path} README.md "$pkgdir/usr/share/btrfsmaintenance"
-  install -Dm644 *.service *.timer "$pkgdir/usr/lib/systemd/system"
+  install -Dm755 btrfs-*.sh btrfsmaintenance-{functions,refresh-cron.sh} README.md "$pkgdir/usr/share/btrfsmaintenance"
+  install -Dm644 *.service *.timer *.path "$pkgdir/usr/lib/systemd/system"
 }

 # vim:set ts=2 sw=2 et: