Hello community,

here is the log from the commit of package rpm for openSUSE:Factory checked in 
at 2015-10-28 17:14:48
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rpm (Old)
 and      /work/SRC/openSUSE:Factory/.rpm.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "rpm"

Changes:
--------
rpm-python.changes: same change
--- /work/SRC/openSUSE:Factory/rpm/rpm.changes  2015-10-06 13:22:47.000000000 
+0200
+++ /work/SRC/openSUSE:Factory/.rpm.new/rpm.changes     2015-10-28 
17:14:49.000000000 +0100
@@ -1,0 +2,12 @@
+Sat Oct 17 10:34:53 UTC 2015 - [email protected]
+
+- %install_info_delete: only delete if package is removed
+
+-------------------------------------------------------------------
+Thu Oct  1 14:35:04 UTC 2015 - [email protected]
+
+- Add nfs-blocksize-free.patch:
+  * Blocksize of NFS shouldn't be used directly
+- Fixes bsc#894610 and bsc#829717
+
+-------------------------------------------------------------------

New:
----
  nfs-blocksize-free.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
rpm-python.spec: same change
++++++ rpm.spec ++++++
--- /var/tmp/diff_new_pack.ogRq65/_old  2015-10-28 17:14:52.000000000 +0100
+++ /var/tmp/diff_new_pack.ogRq65/_new  2015-10-28 17:14:52.000000000 +0100
@@ -132,6 +132,7 @@
 Patch95:        fixsizeforbigendian.diff
 Patch96:        modalias-no-kgraft.diff
 Patch97:        rpm-4.12.0.1-lua-5.3.patch
+Patch98:        nfs-blocksize-free.patch
 Patch6464:      auto-config-update-aarch64-ppc64le.diff
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 #
@@ -226,6 +227,7 @@
 %patch                               -P 85                  
 %patch             -P 92 -P 93 -P 94 -P 95 -P 96
 %patch97 -p1
+%patch98 -p1
 
 %ifarch aarch64 ppc64le
 %patch6464

++++++ nfs-blocksize-free.patch ++++++
>From 07f6674286467f82adf0d370b8d12d72aee6817c Mon Sep 17 00:00:00 2001
From: Fabian Vogt <[email protected]>
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 <[email protected]>
---
 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 <inttypes.h>
 
+#include <linux/magic.h>       /* NFS_SUPER_MAGIC */
+
 #include <rpm/rpmlib.h>                /* rpmMachineScore, rpmReadPackageFile 
*/
 #include <rpm/rpmmacro.h>      /* XXX for rpmExpand */
 #include <rpm/rpmlog.h>
@@ -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

++++++ rpm-suse_macros ++++++
--- /var/tmp/diff_new_pack.ogRq65/_old  2015-10-28 17:14:52.000000000 +0100
+++ /var/tmp/diff_new_pack.ogRq65/_new  2015-10-28 17:14:52.000000000 +0100
@@ -237,6 +237,7 @@
 
 %run_ldconfig /sbin/ldconfig
 
+# for %post
 %install_info(:-:) \
     ALL_ARGS=(%{**}) \
     NUM_ARGS=${#ALL_ARGS[@]} \
@@ -246,12 +247,12 @@
        fi \
     fi ; 
 
+# for %preun
 %install_info_delete(:-:) \
-    ALL_ARGS=(%{**}) \
-    NUM_ARGS=${#ALL_ARGS[@]} \
+    test -n "$FIRST_ARG" || FIRST_ARG=$1 \
     if test -x /sbin/install-info ; then \
-       if ! test -e "${ALL_ARGS[$((NUM_ARGS-1))]}" ; then \
-           /sbin/install-info --quiet --delete "${ALL_ARGS[@]}" \
+       if [ "$FIRST_ARG" = 0 ]; then \
+           /sbin/install-info --quiet --delete %{**} \
        fi ; \
     fi ; 
 


Reply via email to