Your message dated Sun, 08 Mar 2009 22:17:14 +0000
with message-id <[email protected]>
and subject line Bug#511095: fixed in sbuild 0.58.0-1
has caused the Debian Bug report #511095,
regarding unportable use of sysinfo()
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
511095: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=511095
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: sbuild
Severity: normal
Hi,
buildd-mail-wrapper.c relies on unportable sysinfo() call that is only
available on Linux. I investigated what would be necessary for this
program to use getloadavg() instead:
waittime = (info.loads[0] >> (SI_LOAD_SHIFT-2))*6 + 20;
what we have here is info.loads[0] which internally represents a fixed
point real number. SI_LOAD_SHIFT is the number of bits it needs to be
shifted to obtain its integer part. By substracting 2 we get to keep two
extra bits, which amount to the top-most 1/4th of the non-integer part.
info.loads[0] is actually the same as the first double returned by
getloadavg(), only represented differently, so we can obtain the same
value with:
waittime = (((int) loadavg) << 2) /* integer part */
| (int) (fmod (loadavg, 1) * 4); /* non-integer part,
multipled by 4 */
I made a few tests with the attached program, and both methods obtain
exactly the same result.
-- System Information:
Debian Release: 5.0
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.18-6-amd64 (SMP w/2 CPU cores)
Locale: LANG=ca_AD.UTF-8, LC_CTYPE=ca_AD.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
#include <stdio.h>
#include <math.h>
#include <sys/sysinfo.h>
main ()
{
struct sysinfo info;
double loadavg;
sysinfo( &info );
getloadavg (&loadavg, 1);
printf ("waittime1 = %d\n", (int) (info.loads[0] >> (SI_LOAD_SHIFT - 2)));
printf ("waittime2 = %d\n", ((int) loadavg) << 2 | (int) (fmod (loadavg, 1) * 4));
}
--- End Message ---
--- Begin Message ---
Source: sbuild
Source-Version: 0.58.0-1
We believe that the bug you reported is fixed in the latest version of
sbuild, which is due to be installed in the Debian FTP archive:
sbuild_0.58.0-1.diff.gz
to pool/main/s/sbuild/sbuild_0.58.0-1.diff.gz
sbuild_0.58.0-1.dsc
to pool/main/s/sbuild/sbuild_0.58.0-1.dsc
sbuild_0.58.0-1_all.deb
to pool/main/s/sbuild/sbuild_0.58.0-1_all.deb
sbuild_0.58.0.orig.tar.gz
to pool/main/s/sbuild/sbuild_0.58.0.orig.tar.gz
wanna-build_0.58.0-1_all.deb
to pool/main/s/sbuild/wanna-build_0.58.0-1_all.deb
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Roger Leigh <[email protected]> (supplier of updated sbuild package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Format: 1.8
Date: Sun, 08 Mar 2009 21:53:54 +0000
Source: sbuild
Binary: sbuild wanna-build
Architecture: source all
Version: 0.58.0-1
Distribution: unstable
Urgency: low
Maintainer: Roger Leigh <[email protected]>
Changed-By: Roger Leigh <[email protected]>
Description:
sbuild - Tool for building Debian binary packages from Debian sources
wanna-build - Database to track building of Debian binary packages from Debian
Closes: 505747 511095 511314
Changes:
sbuild (0.58.0-1) unstable; urgency=low
.
[ Roger Leigh ]
* New release.
* debian/rules:
- Clean up old unused code.
- Correct patching of config.status and config.guess.
- Add functional binary-arch target.
- Use dh_prep in place of dh_clean -k.
- Don't configure with --with-postgresql (debversion code moved
to postgresql-debversion).
* debian/compat: Update to debhelper version 7.
* debian/control:
- Build-Depend on debhelper 7.
- wanna-build recommends postgresql-8.3-debversion.
* debian/NEWS: Document incompatible changes from previous versions.
* debian/sbuild.docs: New file. Add NEWS.
* debian/wanna-build.docs: New file. Add NEWS.
* buildd-mail-wrapper: Use more portable BSD getloadavg in place of
Linux-specific sysinfo. Thanks to Robert Millan for this
patch (Closes: #511095).
* wanna-build: --help output now documents --create-db, since --help
now displays the full manual page (Closes: #511314).
.
[ Kees Cook ]
* lib/Sbuild.pm: always perform version checks on provided packages
(Closes: #505747).
Checksums-Sha1:
ebdf94a37d9cd21422e8b9b2a4730e2d0e206053 1235 sbuild_0.58.0-1.dsc
6643f38ee035437577d4111a729b1b233ff26cbc 434469 sbuild_0.58.0.orig.tar.gz
60a0d2df6ba96bec0df95821d5ac3245d05ae059 20 sbuild_0.58.0-1.diff.gz
69c6e837e4e125b490ca2de5642a89c4d9417a84 199668 sbuild_0.58.0-1_all.deb
f7c07eac409ff14f841156d4df69c17f02d72a8d 163292 wanna-build_0.58.0-1_all.deb
Checksums-Sha256:
acd5d77dcd149f3d34a8871da4af1f3d2280341a43a0579e0f2d5bdd9b675579 1235
sbuild_0.58.0-1.dsc
93e4d2e2f0d6b8849cb6e15789a253c641d7e22bd28c5d17e4d57aa11feb389d 434469
sbuild_0.58.0.orig.tar.gz
1fefaccc976a2e0270bc3b2f0b74d230f9e15aede7234f8b5cc1459d308c9e10 20
sbuild_0.58.0-1.diff.gz
f7b30d2db6de7934d4762f0f75d76cac43384ff61b911d1896619c35f4b447d1 199668
sbuild_0.58.0-1_all.deb
e0f46d47447a24c5be507f2dd1db0c4439620037f5a21f0f804d596171b53f9d 163292
wanna-build_0.58.0-1_all.deb
Files:
8bd0c59391cbd9cbd695a03e752e8659 1235 devel extra sbuild_0.58.0-1.dsc
68ea7773f41768bb511d4a79e2448dd6 434469 devel extra sbuild_0.58.0.orig.tar.gz
ebad90e4a6074719ec557c4f01b62bdb 20 devel extra sbuild_0.58.0-1.diff.gz
3246575b69ba7d842a36624a20bbb8be 199668 devel extra sbuild_0.58.0-1_all.deb
6f8fb56fceaa25650eaa00fb8098792c 163292 devel extra
wanna-build_0.58.0-1_all.deb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
iEYEARECAAYFAkm0P+oACgkQVcFcaSW/uEheMACgqusPLiSo0/RXsKB0ICUw2ZKw
cAgAoKEYYWQfn+7SZjKoV6HV2kFdvENR
=LG/c
-----END PGP SIGNATURE-----
--- End Message ---