aboutsummaryrefslogtreecommitdiffstats
path: root/main/busybox
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2016-06-23 10:37:11 +0200
committerNatanael Copa <ncopa@alpinelinux.org>2016-06-23 10:44:14 +0200
commitec5a425f1186566350587d75cafec32802f64f7d (patch)
treecdda97f4b18a2294b8efd604fe63475ef486fe52 /main/busybox
parentfb21b91dd10da357b7f883813ded055442daaa7c (diff)
downloadaports-ec5a425f1186566350587d75cafec32802f64f7d.tar.bz2
aports-ec5a425f1186566350587d75cafec32802f64f7d.tar.xz
main/busybox: fix df size reports
upstream bug: https://bugs.busybox.net/show_bug.cgi?id=9046
Diffstat (limited to 'main/busybox')
-rw-r--r--main/busybox/0001-df-use-f_frsize-instead-of-f_bsize-for-correct-sizes.patch71
-rw-r--r--main/busybox/APKBUILD6
2 files changed, 76 insertions, 1 deletions
diff --git a/main/busybox/0001-df-use-f_frsize-instead-of-f_bsize-for-correct-sizes.patch b/main/busybox/0001-df-use-f_frsize-instead-of-f_bsize-for-correct-sizes.patch
new file mode 100644
index 0000000000..4726bf99d7
--- /dev/null
+++ b/main/busybox/0001-df-use-f_frsize-instead-of-f_bsize-for-correct-sizes.patch
@@ -0,0 +1,71 @@
+From 5e48c741b536ae813995957634592474424cde48 Mon Sep 17 00:00:00 2001
+From: Natanael Copa <ncopa@alpinelinux.org>
+Date: Thu, 23 Jun 2016 10:08:23 +0200
+Subject: [PATCH] df: use f_frsize instead of f_bsize for correct sizes
+
+Use the correct field f_frsize instead of f_bsize.
+
+The statfs f_bsize is the "Optimal transfer block size" while the
+f_frsize is the "Fragment size (since Linux 2.6)". On some FUSE
+filesystems those may differ.
+
+Fixes bug 9046
+
+URL: https://bugs.busybox.net/show_bug.cgi?id=9046
+Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
+---
+ coreutils/df.c | 20 ++++++++++----------
+ 1 file changed, 10 insertions(+), 10 deletions(-)
+
+diff --git a/coreutils/df.c b/coreutils/df.c
+index d79c11a..06b2920 100644
+--- a/coreutils/df.c
++++ b/coreutils/df.c
+@@ -188,7 +188,7 @@ int df_main(int argc UNUSED_PARAM, char **argv)
+ if (opt & OPT_INODE) {
+ s.f_blocks = s.f_files;
+ s.f_bavail = s.f_bfree = s.f_ffree;
+- s.f_bsize = 1;
++ s.f_frsize = 1;
+
+ if (df_disp_hr)
+ df_disp_hr = 1;
+@@ -246,26 +246,26 @@ int df_main(int argc UNUSED_PARAM, char **argv)
+
+ #if ENABLE_FEATURE_HUMAN_READABLE
+ printf(" %9s ",
+- /* f_blocks x f_bsize / df_disp_hr, show one fractional,
++ /* f_blocks x f_frsize / df_disp_hr, show one fractional,
+ * use suffixes if df_disp_hr == 0 */
+- make_human_readable_str(s.f_blocks, s.f_bsize, df_disp_hr));
++ make_human_readable_str(s.f_blocks, s.f_frsize, df_disp_hr));
+
+ printf(" %9s " + 1,
+- /* EXPR x f_bsize / df_disp_hr, show one fractional,
++ /* EXPR x f_frsize / df_disp_hr, show one fractional,
+ * use suffixes if df_disp_hr == 0 */
+ make_human_readable_str((s.f_blocks - s.f_bfree),
+- s.f_bsize, df_disp_hr));
++ s.f_frsize, df_disp_hr));
+
+ printf("%9s %3u%% %s\n",
+- /* f_bavail x f_bsize / df_disp_hr, show one fractional,
++ /* f_bavail x f_frsize / df_disp_hr, show one fractional,
+ * use suffixes if df_disp_hr == 0 */
+- make_human_readable_str(s.f_bavail, s.f_bsize, df_disp_hr),
++ make_human_readable_str(s.f_bavail, s.f_frsize, df_disp_hr),
+ blocks_percent_used, mount_point);
+ #else
+ printf(" %9lu %9lu %9lu %3u%% %s\n",
+- kscale(s.f_blocks, s.f_bsize),
+- kscale(s.f_blocks - s.f_bfree, s.f_bsize),
+- kscale(s.f_bavail, s.f_bsize),
++ kscale(s.f_blocks, s.f_frsize),
++ kscale(s.f_blocks - s.f_bfree, s.f_frsize),
++ kscale(s.f_bavail, s.f_frsize),
+ blocks_percent_used, mount_point);
+ #endif
+ }
+--
+2.9.0
+
diff --git a/main/busybox/APKBUILD b/main/busybox/APKBUILD
index 423f5aa586..97234ebc0a 100644
--- a/main/busybox/APKBUILD
+++ b/main/busybox/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=busybox
pkgver=1.24.2
-pkgrel=8
+pkgrel=9
pkgdesc="Size optimized toolbox of many common UNIX utilities"
url=http://busybox.net
arch="all"
@@ -54,6 +54,7 @@ source="http://busybox.net/downloads/$pkgname-$pkgver.tar.bz2
0001-ash-fix-error-during-recursive-processing-of-here-do.patch
0001-libbb-fix-time-parsing-of-CC-YY-MMDDhhmm-.SS.patch
+ 0001-df-use-f_frsize-instead-of-f_bsize-for-correct-sizes.patch
acpid.logrotate
busyboxconfig
@@ -198,6 +199,7 @@ f5adc07a1937c4ee36e231f32799515e 4005-ntpd-do-not-use-a-peer-more-than-once-say
5f03ee6f3e93bbc6aedff0777b227810 0001-ash-backport-fix-for-here-document-issues.patch
a4d1cf64fd1835a284ccc6dbc78e3ce0 0001-ash-fix-error-during-recursive-processing-of-here-do.patch
ab539a54dcd1c23eb0963e17e768fef7 0001-libbb-fix-time-parsing-of-CC-YY-MMDDhhmm-.SS.patch
+d77da40a3c1291ab82513fb59c517e38 0001-df-use-f_frsize-instead-of-f_bsize-for-correct-sizes.patch
4046b78ee6a25259954797d73b94f4bd acpid.logrotate
ab4a2e1385566b01002e526614dd38c2 busyboxconfig
befaac2c59c380e36a452b3f1c1d4a3a glibc.patch"
@@ -233,6 +235,7 @@ c4dca6fcef3de0ed5beb1716a3fd229dd29996a90da95eec898a13e0d9d85041 4007-ntpd-post
f712ce190ce86084d56977e125d1561615394f3d9b840e926537868260e19d79 0001-ash-backport-fix-for-here-document-issues.patch
1d3f8f7b6d0972f8e56437fce8efbafe70e2d869fbe82f06eba11e0103fce224 0001-ash-fix-error-during-recursive-processing-of-here-do.patch
97dfec94c94f00b628a702ad81b235414af611e011bfc26c29be46c67063c101 0001-libbb-fix-time-parsing-of-CC-YY-MMDDhhmm-.SS.patch
+8dba75a5de5c808760e9439ad38b35f643a2442e9e5aca4b40b918cfc66ac255 0001-df-use-f_frsize-instead-of-f_bsize-for-correct-sizes.patch
f7cbeb5a5a47395ad30454ce8262abcd3e91c33ef803c2ae31a9258d7142dd48 acpid.logrotate
a129ededc4c5ec3d0385e4da50a87e81f348ecc7541a2105dd98f0c8543a3a2f busyboxconfig
c604ef791c31d35a8c5ee4558d21428a46f37a6d762c4a7e29864f4037fc44a0 glibc.patch"
@@ -268,6 +271,7 @@ e27e4d07cc1d13d8eb8e04ab282fa89bf7511c2ed1cdeb35721e6dbe14756c20486a462bf5f5b5ca
d55cab6ed08434e2a278edf1be6171b921bcaee47598988e4de6b390a01569e10394c54d5d4a27e6eba251ce68df5cc1ece358be32a9c31bdf1f7e9147cf5180 0001-ash-backport-fix-for-here-document-issues.patch
c14a632f9477c13ea99b24a73c81c9c44ead8b536970acd758e739b43a6260860039674341192ce7bb20a9204ee7d93dcd9541e526f2437d4d2d88637b400867 0001-ash-fix-error-during-recursive-processing-of-here-do.patch
6fc77e0edcbb61a64c179b0259e0634a82362ac0ca9a77f305eb75f6a89a10395e8a37cbcef925821b428c00237a0a3575af2c3ef194933f52ad55b0eb0dd6f2 0001-libbb-fix-time-parsing-of-CC-YY-MMDDhhmm-.SS.patch
+a42d4b992b3ba3b33a605d7f919c574783034b99cd046fd394c040948360daef7f9fb5717994c5326187a185ee9f357b36f405e960ab632c2f59f5b9fba402f7 0001-df-use-f_frsize-instead-of-f_bsize-for-correct-sizes.patch
dadb4c953ebc755b88ee95c1489feb0c2d352f6e44abc716166024e6eea11ab9d10c84fad62c081775834d205cb04aa1be3c994676c88f4284495c54b9188e8b acpid.logrotate
580a6e15d6517641951bb1648c406cee2a82fab353552a60d37f29e5f58da664437d99d5bd313d88e260a92735c32886ffc1cad98f901bb27d1f5027fdce37d7 busyboxconfig
1d2739379dab1deb3eae7cffd4845300eb7d30f7343b4a1209b21a5680860d55080ad45fdefe098b249ce3040c01951fa7f0a79cd447b2d7b260eb000099d9dc glibc.patch"