Sisyphus repositório
Última atualização: 1 outubro 2023 | SRPMs: 18631 | Visitas: 37917337
en ru br
ALT Linux repositórios
S:1.0.8-alt4

Group :: Sistema/Kernel e hardware
RPM: bcache-tools

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs e FR  Repocop 

Patch: bcache-tools-1.0.8-alt.patch
Download


 .gear/bcache-status-20140220.tar.gz | Bin 0 -> 3779 bytes
 .gear/bcache-status-python3.patch   |   8 +++
 .gear/bcache-status-rootgc.patch    |  17 ++++++
 .gear/bcache-status.8               |  45 ++++++++++++++
 .gear/bcache-tools.spec             | 115 ++++++++++++++++++++++++++++++++++++
 .gear/rules                         |   6 ++
 .gear/tags/list                     |   1 +
 .gitignore                          |   1 -
 bcache.c                            |   2 +-
 configure                           |   1 +
 10 files changed, 194 insertions(+), 2 deletions(-)
diff --git a/.gear/bcache-status-20140220.tar.gz b/.gear/bcache-status-20140220.tar.gz
new file mode 100644
index 0000000..52caada
--- /dev/null
+++ b/.gear/bcache-status-20140220.tar.gz
@@ -0,0 +1,20 @@
+Yis6__&Yތ؉ql@"$H-N!mv>X]xxޞx{TpG_}փEЊ0Uol6RjIXA?|qs#msFl&xolnC-[mU׼j_
G|4mp8`~Qۛ1abI/7]vkrDaw]߱"~e%{̆,<fqd6g(&LЇ|iІk>=|BN8bs9u#6v=wS85g]6R Q$q!;^@CZb p!}y_cgsG@;~$X4.WpVc7[N<yLB>ågsi0Lyp%'^$xr%P}??{;{.E܏ӣ÷pq\?z>;?<9zή>\/X"T0cm(#bz'G+6w2.(q/BD\l{掙-9tA`uZlz ı;(F}v=AcE	j$?}sVc룟wu]wۮUtq|a= H*4#;vذK5>ݭpk(O˙{hy"NBzIYo2f*WR` ?׽yaKƑ0ƽ"l׻H $eYg>0]4X`x0j^NkO'`c֚,48,n
+Xbg0f?y.F<N
L77vַ+ٛ
+čDpYFH7R@"VI/'z2'IG  :޲
+s_`֭Xdooou[?zd
qPS
+Ʈ	fhczîhnWZQ
+F<`UV @T<J
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,h*1܉qARj6,-(uY2&L>']p+؛C6EI5ޫ8IA&4y?6YhFzWej+k7
`H
đ:m +H4^Q*>Ĉ2CesvuyɈ K12X[#<UىRa,"-Nj3TuV.TRBjeHh&>QT׍Cw2!=e~X;\5?|o,n>a;:p~-l'xUv׾Mmӷm[/sտڪڪڪڪڪڪڪڪڪڪڪڪڿMP
\ No newline at end of file
diff --git a/.gear/bcache-status-python3.patch b/.gear/bcache-status-python3.patch
new file mode 100644
index 0000000..0cb08cc
--- /dev/null
+++ b/.gear/bcache-status-python3.patch
@@ -0,0 +1,8 @@
+--- bcache-tools-1.0.8/bcache-status.orig	2015-06-20 08:56:22.343589706 +0200
++++ bcache-tools-1.0.8/bcache-status	2015-06-20 08:56:39.971692433 +0200
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ #
+ # Dumb script to dump (some) of bcache status
+ # Copyright 2014 Darrick J. Wong. All rights reserved.
diff --git a/.gear/bcache-status-rootgc.patch b/.gear/bcache-status-rootgc.patch
new file mode 100644
index 0000000..a88b47d
--- /dev/null
+++ b/.gear/bcache-status-rootgc.patch
@@ -0,0 +1,17 @@
+--- bcache-tools-1.0.8.bcache-status.orig	2016-08-04 15:03:50.095602401 +0200
++++ bcache-tools-1.0.8/bcache-status	2016-08-04 14:31:24.507542579 +0200
+@@ -337,8 +337,12 @@
+ 			continue
+ 
+ 		if run_gc:
+-			with open('%s%s/internal/trigger_gc' % (SYSFS_BCACHE_PATH, cache), 'w') as fd:
+-				fd.write('1\n')
++			try:
++				with open('%s%s/internal/trigger_gc' % (SYSFS_BCACHE_PATH, cache), 'w') as fd:
++					fd.write('1\n')
++			except PermissionError as e:
++				print ('You need root permissions for the --gc option')
++				sys.exit(1)
+ 
+ 		dump_bcache('%s%s' % (SYSFS_BCACHE_PATH, cache), stats, print_subdevices, uuid_map.get(cache, '?'))
+ 
diff --git a/.gear/bcache-status.8 b/.gear/bcache-status.8
new file mode 100644
index 0000000..442c7fd
--- /dev/null
+++ b/.gear/bcache-status.8
@@ -0,0 +1,45 @@
+.TH bcache-status 8
+.SH NAME
+bcache-status \- Display useful bcache statistics
+.SH SYNOPSIS
+.B bcache-status
+[\fB \--help\fR ]
+[\fB \-f\fR ]
+[\fB \-h\fR ]
+[\fB \-d\fR ]
+[\fB \-t\fR ]
+[\fB \-a\fR ]
+[\fB \-r\fR ]
+[\fB \-s\fR ]
+[\fB \-g\fR ]
+.SH DESCRIPTION
+This command displays useful bcache statistics in a convenient way.
+.SH OPTIONS
+.TP
+.BR \---help
+Print help message and exit.
+.TP
+.BR \-f,\ --five-minute
+Print the last five minutes of stats.
+.TP
+.BR \-h,\ --hour
+Print the last hour of stats.
+.TP
+.BR \-d,\ --day
+Print the last day of stats.
+.TP
+.BR \-t,\ --total
+Print total stats.
+.TP
+.BR \-a,\ --all
+Print all stats.
+.TP
+.BR \-r,\ --reset-stats
+Reset stats after printing them.
+.TP
+.BR \-s,\ --sub-status
+Print subdevice status.
+.TP
+.BR \-g,\ --gc
+Invoke GC before printing status (root only).
+
diff --git a/.gear/bcache-tools.spec b/.gear/bcache-tools.spec
new file mode 100644
index 0000000..5e5d81b
--- /dev/null
+++ b/.gear/bcache-tools.spec
@@ -0,0 +1,115 @@
+%global _udevlibdir /lib/udev
+
+Summary: Tools for Linux kernel block layer cache
+Name: bcache-tools
+Version: 1.0.8
+Epoch: 1
+Release: alt4
+License: GPLv2
+Group: System/Kernel and hardware
+Url: http://bcache.evilpiepirate.org/
+
+Source0: %name.tar
+# This part is a prerelease version obtained by https://gist.github.com/djwong/6343451:
+# git clone https://gist.github.com/6343451.git
+# cd 6343451/
+# git archive --format=tar --prefix=bcache-status-20140220/ 6d278f9886ab5f64bd896080b1b543ba7ef6c7a6 | gzip > ../bcache-status-20140220.tar.gz
+# see also http://article.gmane.org/gmane.linux.kernel.bcache.devel/1951
+Source1: bcache-status-20140220.tar.gz
+# bcache status not provided as a true package, so this is a self maintained
+# man page for it
+# http://article.gmane.org/gmane.linux.kernel.bcache.devel/1946
+Source2: bcache-status.8
+
+Patch0: %name-%version-alt.patch
+# Fix BZ#1360951 - this fix is python 3 only
+Patch1: bcache-status-rootgc.patch
+# Fix bcache-status shebang
+Patch2: bcache-status-python3.patch
+
+BuildRequires(pre): rpm-build-python3
+BuildRequires: libuuid-devel libblkid-devel
+
+%description
+Bcache is a Linux kernel block layer cache. It allows one or more fast disk
+drives such as flash-based solid state drives (SSDs) to act as a cache for
+one or more slower hard disk drives.
+This package contains the utilities for manipulating bcache.
+
+%package -n bcache-status
+Summary: Display useful bcache statistics
+Group: System/Kernel and hardware
+Requires: %name
+BuildArch: noarch
+%description -n bcache-status
+Display useful bcache statistics
+
+%prep
+%setup -n %name
+%patch0 -p1
+
+tar xzf %SOURCE1 --strip-components=1
+cp %SOURCE2 .
+chmod +x configure
+%patch1 -p1 -b .rootgc
+%patch2 -p1
+
+%build
+%configure
+%make_build
+
+%install
+mkdir -p \
+    %buildroot%_sbindir \
+    %buildroot%_man8dir \
+    %buildroot%_udevlibdir \
+    %buildroot%_udevrulesdir
+
+%makeinstall_std \
+    UDEVLIBDIR=%_udevlibdir \
+    MANDIR=%_mandir
+
+install -p  -m 755 bcache-status %buildroot%_sbindir/bcache-status
+
+%files
+%_udevrulesdir/*
+%_man8dir/bcache-super-show.8.*
+%_man8dir/make-bcache.8.*
+%_man8dir/probe-bcache.8.*
+%_udevlibdir/bcache-register
+%_udevlibdir/probe-bcache
+%_sbindir/bcache-super-show
+%_sbindir/make-bcache
+%doc README COPYING
+
+%files -n bcache-status
+%_sbindir/bcache-status
+%_man8dir/bcache-status.8.*
+
+%changelog
+* Thu May 20 2021 Slava Aseev <ptrnine@altlinux.org> 1:1.0.8-alt4
+- Fix FTBFS due to missing rpm-build-python3
+
+* Mon Jun 15 2020 Nikita Ermakov <arei@altlinux.org> 1:1.0.8-alt3
+- Reorganize repo a little bit:
+  + Move patches to the .gear/ subdirectory.
+  + Remove bcache-status{,.8} as it is not needed.
+  + Move bcache-status-20140220.tar.gz to .gear/ subdirectory.
+  + Replace a patch, with man pages for the bcache-status, with a file.
+  + Update .gear/rules.
+
+* Mon Sep 04 2017 Lenar Shakirov <snejok@altlinux.ru> 1:1.0.8-alt2
+- External bcache-status added (peeped from Fedora)
+
+* Mon Aug 22 2016 Alexei Takaseev <taf@altlinux.org> 1:1.0.8-alt1
+- 1.0.8
+- fix build with gcc5
+
+* Thu Jan 23 2014 Terechkov Evgenii <evg@altlinux.org> 1:0.9-alt1
+- 0.9
+
+* Fri Nov  8 2013 Terechkov Evgenii <evg@altlinux.org> 0-alt1.20131108
+- git-20131108
+
+* Mon Sep  9 2013 Terechkov Evgenii <evg@altlinux.org> 0-alt1.20130907
+- Initial build for ALT Linux Sisyphus
diff --git a/.gear/rules b/.gear/rules
new file mode 100644
index 0000000..fc068b8
--- /dev/null
+++ b/.gear/rules
@@ -0,0 +1,6 @@
+tar: v@version@:. name=@name@
+diff: v@version@:. . name=@name@-@version@-alt.patch
+spec: .gear/bcache-tools.spec
+copy: .gear/*.patch
+copy: .gear/*.tar.gz
+copy: .gear/bcache-status.8
diff --git a/.gear/tags/list b/.gear/tags/list
new file mode 100644
index 0000000..73b20dc
--- /dev/null
+++ b/.gear/tags/list
@@ -0,0 +1 @@
+a73679b22c333763597d39c72112ef5a53f55419 v1.0.8
diff --git a/.gitignore b/.gitignore
index 7a8fe1a..6492833 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,5 +3,4 @@
 /bcache-register
 /make-bcache
 /probe-bcache
-.*
 /*.o
diff --git a/bcache.c b/bcache.c
index 8f37445..8b4b986 100644
--- a/bcache.c
+++ b/bcache.c
@@ -115,7 +115,7 @@ static const uint64_t crc_table[256] = {
 	0x9AFCE626CE85B507ULL
 };
 
-inline uint64_t crc64(const void *_data, size_t len)
+uint64_t crc64(const void *_data, size_t len)
 {
 	uint64_t crc = 0xFFFFFFFFFFFFFFFFULL;
 	const unsigned char *data = _data;
diff --git a/configure b/configure
new file mode 100644
index 0000000..1a24852
--- /dev/null
+++ b/configure
@@ -0,0 +1 @@
+#!/bin/sh
 
projeto & código: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
mantenedor atual: Michael Shigorin
mantenedor da tradução: Fernando Martini aka fmartini © 2009