Bug#793499: debian-policy: The Installed-Size algorithm is out-of-date

2023-09-12 Thread Russ Allbery
Guillem Jover  writes:

> How about the attached patch, based on the text in deb-substvars(5)?

This looks great, thank you.  Seconded.

> From 024d94daeb0ab0e7c447868a1b8f9ff953850404 Mon Sep 17 00:00:00 2001
> From: Guillem Jover 
> Date: Tue, 12 Sep 2023 22:47:27 +0200
> Subject: [PATCH] Update Installed-Size algorithm used by dpkg since 1.18.0

> The previous algorithm relied entirely on du(1) computing the used
> size, but depended on the filesystem in use on the build system.

> The new algorithm used by dpkg since 1.18.0 (implemented in
> commit 9ed7d4d47b73ffe67e1f7d31f899a1dfd43d490b), guarantees a
> constant and reproducible size regardless of the build system
> filesystem being used. Although it is still an approximation of
> the actual size that the package will use on the installed system.

> Closes: #793499
> ---
>  policy/ch-controlfields.rst | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)

> diff --git a/policy/ch-controlfields.rst b/policy/ch-controlfields.rst
> index 45776ea..2871658 100644
> --- a/policy/ch-controlfields.rst
> +++ b/policy/ch-controlfields.rst
> @@ -939,8 +939,9 @@ space required to install the named package. Actual 
> installed size may
>  vary based on block size, file system properties, or actions taken by
>  package maintainer scripts.
>  
> -The disk space is given as the integer value of the estimated installed
> -size in bytes, divided by 1024 and rounded up.
> +The disk space is given as the accumulated size of each regular file and
> +symlink rounded to 1 KiB used units, and a baseline of 1 KiB for any other
> +filesystem object type.
>  
>  .. _s-f-Files:

-- 
Russ Allbery (r...@debian.org)  



Bug#793499: debian-policy: The Installed-Size algorithm is out-of-date

2023-09-12 Thread Guillem Jover
Hi!

On Fri, 2015-07-24 at 18:04:41 +0200, Guillem Jover wrote:
> Package: debian-policy
> Version: 3.9.7.0
> Severity: wishlist

> As discussed in the debian-policy list, the Installed-Size algorithm
> as implemented in dpkg-gencontrol changed due to #650077. So the
> current wording is out-of-sync. Please see the thread starting at
> ,
> with the current implementation
> .

How about the attached patch, based on the text in deb-substvars(5)?

Thanks,
Guillem
From 024d94daeb0ab0e7c447868a1b8f9ff953850404 Mon Sep 17 00:00:00 2001
From: Guillem Jover 
Date: Tue, 12 Sep 2023 22:47:27 +0200
Subject: [PATCH] Update Installed-Size algorithm used by dpkg since 1.18.0

The previous algorithm relied entirely on du(1) computing the used
size, but depended on the filesystem in use on the build system.

The new algorithm used by dpkg since 1.18.0 (implemented in
commit 9ed7d4d47b73ffe67e1f7d31f899a1dfd43d490b), guarantees a
constant and reproducible size regardless of the build system
filesystem being used. Although it is still an approximation of
the actual size that the package will use on the installed system.

Closes: #793499
---
 policy/ch-controlfields.rst | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/policy/ch-controlfields.rst b/policy/ch-controlfields.rst
index 45776ea..2871658 100644
--- a/policy/ch-controlfields.rst
+++ b/policy/ch-controlfields.rst
@@ -939,8 +939,9 @@ space required to install the named package. Actual installed size may
 vary based on block size, file system properties, or actions taken by
 package maintainer scripts.
 
-The disk space is given as the integer value of the estimated installed
-size in bytes, divided by 1024 and rounded up.
+The disk space is given as the accumulated size of each regular file and
+symlink rounded to 1 KiB used units, and a baseline of 1 KiB for any other
+filesystem object type.
 
 .. _s-f-Files:
 
-- 
2.40.1



Bug#793499: debian-policy: The Installed-Size algorithm is out-of-date

2015-07-24 Thread Guillem Jover
Package: debian-policy
Version: 3.9.7.0
Severity: wishlist

Hi!

As discussed in the debian-policy list, the Installed-Size algorithm
as implemented in dpkg-gencontrol changed due to #650077. So the
current wording is out-of-sync. Please see the thread starting at
https://lists.debian.org/debian-policy/2011/11/msg00079.html,
with the current implementation
https://lists.debian.org/debian-policy/2015/01/msg00044.html.

Thanks,
Guillem


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org