Accepting request 587598 from filesystems

- update to version 0.4.1 (forwarded request 587597 from dsterba)

OBS-URL: https://build.opensuse.org/request/show/587598
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/btrfsmaintenance?expand=0&rev=17
This commit is contained in:
Dominique Leuenberger 2018-03-16 09:44:46 +00:00 committed by Git OBS Bridge
commit 1ffb4d927d
5 changed files with 16 additions and 48 deletions

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:85c18bf8b7148b60a375d6b890400a10c5bea6b5e74594b3747d2121dadb73b9
size 17714

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:46fb835cf45ed27f9fb957d49c4569bbff0a346a60f437f46bf130f1bd394092
size 17511

View File

@ -1,3 +1,13 @@
-------------------------------------------------------------------
Thu Mar 15 00:00:00 CET 2018 - dsterba@suse.cz
- update to version 0.4.1
- defrag plugin: python2 and 3 compatibility
- defrag plugin: target extent size lowered to 32MiB (#43)
- shell compatibility fixes
- systemd unit type fixes
- Removed patch: python3-support-bsc1070322.diff (upstream)
-------------------------------------------------------------------
Mon Mar 12 13:39:23 CET 2018 - kukuk@suse.de

View File

@ -22,14 +22,13 @@
%endif
Name: btrfsmaintenance
Version: 0.4
Version: 0.4.1
Release: 0
Summary: Scripts for btrfs periodic maintenance tasks
License: GPL-2.0-only
Group: System/Base
Url: https://github.com/kdave/btrfsmaintenance
Source0: %{name}-%{version}.tar.bz2
Patch0: python3-support-bsc1070322.diff
BuildRequires: systemd
Requires: btrfsprogs
Requires: python3-zypp-plugin
@ -40,11 +39,11 @@ BuildArch: noarch
%description
Scripts for btrfs maintenance tasks like periodic scrub, balance, trim or defrag
on selected mountpoints or directories.
on selected mountpoints or directories. Hints for periodic snapshot tuning (eg.
for snapper).
%prep
%setup -q
%patch0 -p1
%build

View File

@ -1,41 +0,0 @@
Index: btrfsmaintenance-0.4/btrfs-defrag-plugin.py
===================================================================
--- btrfsmaintenance-0.4.orig/btrfs-defrag-plugin.py
+++ btrfsmaintenance-0.4/btrfs-defrag-plugin.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
# This plugin defragments rpm files after update.
#
@@ -17,14 +17,19 @@
# contiguous space, the bigger the extent is, the worse and the extent
# size hint is not reached anyway
-from sys import stderr
+import sys
+if sys.version_info[0] >= 3:
+ from builtins import str
+ popen_kwargs = { 'encoding': 'ascii' }
+else:
+ popen_kwargs = { }
from zypp_plugin import Plugin
import subprocess
DEBUG=False
EXTENT_SIZE=64*1024*1024
LOGFILE='/tmp/btrfs-defrag-plugin.log'
-PATH=subprocess.check_output(["rpm", "--eval", "%_dbpath"]).strip()
+PATH=subprocess.check_output(["rpm", "--eval", "%_dbpath"], **popen_kwargs).strip()
def dbg(args):
if not DEBUG: return
@@ -34,7 +39,7 @@ def dbg(args):
f.close()
def qx(args):
- out=subprocess.Popen(args, shell=True, stdout=subprocess.PIPE).stdout
+ out=subprocess.Popen(args, shell=True, stdout=subprocess.PIPE, **popen_kwargs).stdout
outstr="".join(out.readlines())
out.close()
return outstr