From 1d092a7246c8ba0a9ef6342471627e48f129ab92cbd09c9d0fa954dbc04a3518 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Schr=C3=B6der?= Date: Thu, 21 Apr 2016 13:25:02 +0000 Subject: [PATCH] del OBS-URL: https://build.opensuse.org/package/show/Base:System/rpm?expand=0&rev=368 --- nfs-blocksize-free.patch | 54 ---------------------------------------- 1 file changed, 54 deletions(-) delete mode 100644 nfs-blocksize-free.patch diff --git a/nfs-blocksize-free.patch b/nfs-blocksize-free.patch deleted file mode 100644 index 40add01..0000000 --- a/nfs-blocksize-free.patch +++ /dev/null @@ -1,54 +0,0 @@ -From 07f6674286467f82adf0d370b8d12d72aee6817c Mon Sep 17 00:00:00 2001 -From: Fabian Vogt -Date: Mon, 28 Sep 2015 18:21:19 +0200 -Subject: [PATCH] Blocksize of NFS shouldn't be used directly - -RPM uses the blocksize to calculate whether an RPM -can be installed on the system. For NFS this fails -for e.g. glibc-locale as it has many small files, -which rpm counts as one block. As huge NFS block -sizes (>= 1MiB) are common, this makes glibc-locale -roughly 7 GiB in installed size. - -As a workaround, if the NFS block size is > 4096, -assume 4096 and scale the count of free blocks -accordingly. - -See also RH bug 847960 - -Signed-off-by: Fabian Vogt ---- - lib/transaction.c | 10 ++++++++++ - 1 file changed, 10 insertions(+) - -diff --git a/lib/transaction.c b/lib/transaction.c -index 8167640..d8d8820 100644 ---- a/lib/transaction.c -+++ b/lib/transaction.c -@@ -6,6 +6,8 @@ - - #include - -+#include /* NFS_SUPER_MAGIC */ -+ - #include /* rpmMachineScore, rpmReadPackageFile */ - #include /* XXX for rpmExpand */ - #include -@@ -137,6 +139,14 @@ static rpmDiskSpaceInfo rpmtsCreateDSI(const rpmts ts, dev_t dev, - /* XXX assigning negative value to unsigned type */ - dsi->iavail = !(sfb.f_ffree == 0 && sfb.f_files == 0) - ? sfb.f_ffree : -1; -+ -+ /* We can't tell the block size of a network file system. -+ * sfb.f_bsize would be the network layer's block size. */ -+ if(sfb.f_type == NFS_SUPER_MAGIC && dsi->bsize > 4096) { -+ int64_t old_bsize = dsi->bsize; -+ dsi->bsize = 4096; /* Assume 4k block size */ -+ dsi->bavail *= old_bsize / dsi->bsize; -+ } - - /* Find mount point belonging to this device number */ - resolved_path = realpath(dirName, mntPoint); --- -2.5.2 -