Re: [Rpm-maint] [rpm-software-management/rpm] Size check is too strict (#1232)

2021-01-15 Thread Florian Festi
We are not looking deeper into this. Closing as I don't really see anything 
wrong with rpm's behaviour.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/1232#issuecomment-760945858___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Size check is too strict (#1232)

2021-01-15 Thread Florian Festi
Closed #1232.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/1232#event-4211188833___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Size check is too strict (#1232)

2020-07-10 Thread Florian Festi
Double checking the code the unchanged files should not be counted when 
`%_minimize_writes` is enabled. So it obviously isn't in this test case.

The question here is why the installation with `--ignoresize` passes without an 
error. I wonder if there is some trickery going on on the FS level to not 
actually using all those blocks filled with zeros. From an rpm POV this should 
not work and rpm is expected to actually use twice as much space unless 
`%_minimize_writes` is enabled.

Not sure if this is really worth further exploring...

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/1232#issuecomment-656739157___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Size check is too strict (#1232)

2020-05-19 Thread Panu Matilainen
Yeah, upgrades temporarily needing twice the disk-space is to be expected and 
not a bug.
That `%_minimize_writes` actually affects disk-space consumption estimation is 
an interesting side-effect that I hadn't even thought of until now, but of 
course it does. 4.16 will auto-enable this if non-rotational disk(s) is 
detected, but in 4.15 it'll need to be manually enabled. There's nothing wrong 
with enabling it on rotational disks if minimizing space consumption is 
important, it'll just have different performance characteristics.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/1232#issuecomment-631258061___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Size check is too strict (#1232)

2020-05-19 Thread Florian Festi
Well, normally rpm saves the new file to disk first and then moves it over the 
old file. So it actually does need this space.
The latest version has some optimization for SSDs where files that are 
unchanged are only checksummed. This may be why you don't see an error message 
here.


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/1232#issuecomment-630793756___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


[Rpm-maint] [rpm-software-management/rpm] Size check is too strict (#1232)

2020-05-19 Thread Miroslav Suchý
With VM in OpenStack or in AWS, it happens quite often that the rpm tells me:
 ```
installing package FOO needs 220MB on the / filesystem
```
It quite often happens to me with `linux-firmware` which is big and needs 
nearly 300 MB unpacked, which is on 3GB of cloud image a lot.

This statement is nearly always false because it is counted with a worse case 
scenario, where all files in the new package are different. Which is rarely 
true. Usually, it is quite opposite - very few files changes. In such cases the 
calculation is incorrect.

Here is a reproducer:

1) download packages from http://miroslav.suchy.cz/fedora/rpm-size-reproducer/
Both packages install two files in `/var/tmp/`. Both install 
`/var/tmp/big-file` which is 830 MB big (made out of zeros, so the compressed 
rpm is very small). Version one contains /var/tmp/one.txt and version two 
contains /var/tmp/two.txt. Both are small text files with different content.
2) 
```
sudo rpm -Uvh /home/mirek/rpmbuild/RPMS/x86_64/big-file-1-1.x86_64.rpm
Verifying...  # [100%]
Preparing...  # [100%]
Updating / installing...
   1:big-file-1-1 # [100%]
```
3) Now run something like:
```
dd if=/dev/zero of=/var/tmp/foo1
```
tune this so you do not consume whole disk space, and leave few hundred of free 
space. In my case:
```
$ df -h /var/tmp/
Filesystem   Size  Used Avail Use% Mounted on
/dev/mapper/fedora-root   50G   47G  197M 100% /
```
4) Now try to upgrade:
```
$ sudo rpm -Uvh /home/mirek/rpmbuild/RPMS/x86_64/big-file-2-1.x86_64.rpm 
Verifying...  # [100%]
Preparing...  # [100%]
installing package big-file-2-1.x86_64 needs 674MB on the / filesystem
```
This is obviously incorrect as `/var/tmp/big-file` does not change. Definitely 
not the size.

5)  Let's try to ignore size-check:
```
$ sudo rpm -Uvh /home/mirek/rpmbuild/RPMS/x86_64/big-file-2-1.x86_64.rpm 
--ignoresize
Verifying...  # [100%]
Preparing...  # [100%]
Updating / installing...
   1:big-file-2-1 # [ 50%]
Cleaning up / removing...
   2:big-file-1-1 # [100%]
```

Version: `rpm-4.15.1-3.fc32.1.x86_64`


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/1232___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint