dh-buildinfo-0.11/0000755000000000000000000000000012335754230010671 5ustar dh-buildinfo-0.11/buildinfo.html0000644000000000000000000006266607731664613013563 0ustar Build-information collecting engine

Build-information collecting engine

Improving tracability of Debian packages

A mechanism to register build-time informations inside a Debian package. Mostly, that means keeping a list of the versions of all packages used for the package build.

You may be looking for available build informations.

Note: the latest version of this document can be found at http://ydirson.free.fr/en/software/buildinfo.html.

Note: this is currently a work-in-progress thing. It needs to be used by a couple of people willing to send feedback, before thinking about promoting it to a standard Debian tool.

How is it useful ?

When I talk about this tool to encourage people to give me feedback, I often get "I don't understand its usefulness" as answer. Here is a try to clarify why I think it's useful. Please, do tell me if you feel these explanations do not convince you :)

Finding out that a package needs rebuild
What makes a binary package is a combination of the source package AND build-dependencies. Since library APIs are subject to change and bugs get fixed (in compilers, libs, etc), a package which used to build may start to FTBFS at any time because of a new version of a build-dependency, as recently demonstrated by the transition from gcc 3.2 to gcc 3.3.

It also sometimes occur that bugs in build-deps cause subtle problems in packages built with it. Debhelper comes to mind, as it eveolves quickly and is used by many packages. Being able to locate packages built with a known-broken version of a package will greatly help to improve the quality of Debian.

The current way of distributing binary packages of GPL'd software may even be read as a violation of the spirit of the GPL, in that it may not be possible to rebuild the binary package from stuff available from Debian.

This information can be used to provide a mechanism that will check whether a build-dep requires a package to be rebuilt. This probably requires that:

Blame a build-dep/build-essential/essential package for a buildd failure
When a package fails to autobuild, the only version information we get is that of packages that were not already installed on the build daemon. This excludes the toolchain, although recent buildd versions now print this particular set of version numbers, and other stuff. And the information in the buildd logs is not systematically parsable, it is mostly meant for the human eye.

An idea from Rene Engelhard is to have dh_buildinfo invoked from the very beginning of the build process (before ./configure or any other thing that could possibly fail), and to cat the output so that the information is available from the buildd logs in case of build failure. This could surely be improved by adding knowledge of the buildinfo to buildd itself. For now you can achieve this by calling dh_buildinfo generate cat before ./configure is run, and then dh_buildinfo install to install the already-generated debian/buildinfo into your packages.

Quick summaries
This info can be used to generate nifty graphs. Everyone likes nifty graphs. And tables too :)

What currently exists

See package dh-buildinfo in sarge and later. It contains:

How to use this info

Running grep '^[^ ]' on a buildinfo file will extract all lines with a package and its version. All lines starting with a space can be considered as "human use only".

Bugs/plans/ideas for the future

Sample output

This is a buildinfo file for gcompris 3.2-3 [2003/08/07]

You will notice the 2 available alternatives for the "awk" virtual package (not nice, eh...)

 *** Build information ***

 Essential packages:

base-files                               3.0.9
base-passwd                              3.5.4
bash                                     2.05b-8.1
bsdutils                                 1:2.11z-4
coreutils                                5.0-5
debianutils                              2.5.4
diff                                     2.8.1-2
dpkg                                     1.10.10
e2fsprogs                                1.33+1.34-WIP-2003.05.21-2
findutils                                4.1.20-1
grep                                     2.5.1-5
gzip                                     1.3.5-7
hostname                                 2.10
login                                    1:4.0.3-8
mount                                    2.11z-4
ncurses-base                             5.3.20030719-1
ncurses-bin                              5.3.20030719-1
perl-base                                5.8.0-18
sed                                      4.0.7-1
sysvinit                                 2.85-7
tar                                      1.13.25-5
util-linux                               2.11z-4


 Essential packages closure:

libpam-runtime                           0.76-13
  pulled by: libpam0g
libcap1                                  1:1.10-12
  pulled by: libpam-modules
gcc-3.3-base                             1:3.3.1-0rc1
  pulled by: libstdc++5
sysv-rc                                  2.85-7
  pulled by: sysvinit
libpam0g                                 0.76-13
  pulled by: libpam-modules
libdb1-compat                            2.1.3-7
  pulled by: libc6
libblkid1                                1.33+1.34-WIP-2003.05.21-2
  pulled by: e2fsprogs
libncurses5                              5.3.20030719-1
  pulled by: dselect, ncurses-bin, util-linux
libc6                                    2.3.1-17
  pulled by: base-passwd, libdb1-compat, bsdutils, coreutils, debianutils, diff, dpkg, dselect, libgcc1, libncurses5, libstdc++5, e2fsprogs, libblkid1, findutils, grep, hostname, libpam-modules, libcap1, libdb3, libpam0g, mount, ncurses-bin, perl-base, sed, tar, util-linux, slang1
dselect                                  1.10.10
  pulled by: dpkg
libstdc++5                               1:3.3.1-0rc1
  pulled by: dselect
libdb3                                   3.2.9-19
  pulled by: libpam-modules
slang1                                   1.4.5-2.1
  pulled by: util-linux
gawk                                     1:3.1.3-1
  provides: awk
  pulled by: base-files
mawk                                     1.3.3-11
  provides: awk
  pulled by: base-files
libgcc1                                  1:3.3.1-0rc1
  pulled by: dselect, libstdc++5
libpam-modules                           0.76-13
  pulled by: login


 Build-Essential packages:

libc6-dev                                2.3.1-17
libc6-dev                                2.3.1-17
  provides: libc-dev
gcc                                      3:3.3-2
g++                                      3:3.3-2
make                                     3.80-2
dpkg-dev                                 1.10.10


 Build-Essential closure:

debconf                                  1.3.4
  pulled by: binutils, debconf-english
libdb4.0                                 4.0.14-1.2
  pulled by: perl
perl-modules                             5.8.0-18
  pulled by: dpkg-dev, perl
debconf-english                          1.3.4
  pulled by: debconf
perl                                     5.8.0-18
  pulled by: perl-modules
gcc-3.3                                  1:3.3.1-0rc1
  pulled by: gcc, g++, g++-3.3, g++-3.3
cpp                                      3:3.3-2
  pulled by: gcc, g++
cpp-3.3                                  1:3.3.1-0rc1
  pulled by: gcc, cpp, gcc-3.3, gcc-3.3
binutils                                 2.14.90.0.4-0.1
  pulled by: gcc-3.3, dpkg-dev
g++-3.3                                  1:3.3.1-0rc1
  pulled by: g++, libstdc++5-3.3-dev
patch                                    2.5.9-1
  pulled by: dpkg-dev
perl                                     5.8.0-18
  provides: perl5
  pulled by: dpkg-dev
libstdc++5-3.3-dev                       1:3.3.1-0rc1
  pulled by: g++-3.3
libgdbm3                                 1.8.3-1
  pulled by: perl
cpio                                     2.5-1
  pulled by: dpkg-dev


 Declared Arch-indep Build-Dependencies:



 Arch-indep Build-Dependencies closure:



 Declared Arch-dependent Build-Dependencies:

libgnomeui-dev                           2.2.2-1
debhelper                                4.1.55
libxml2-dev                              2.5.7-1
libao-dev                                0.8.3-1.1
libvorbis-dev                            1.0.0-3
gnuchess                                 5.06-1
texinfo                                  4.6-1
texi2html                                1.66-1
dh-buildinfo                             0.5


 Arch-dependent Build-Dependencies closure:

esound-common                            0.2.29-1
  pulled by: libesd0, libesd0-dev
libgnome2-0                              2.2.3-1
  pulled by: libgnomeui-0, libbonoboui2-0, libbonoboui2-common, libgnome2-dev
defoma                                   0.11.3
  pulled by: libpango1.0-common
libxslt1                                 1.0.30-3
  pulled by: libgnome2-0
libgnomevfs2-common                      2.2.5-3
  pulled by: libgnomeui-0, libgnome2-0, libgnomevfs2-0, libgnomevfs2-common, libgnomevfs2-dev
libgconf2-dev                            2.2.1-1
  pulled by: libgnomeui-dev, libgnome2-dev, libgnomevfs2-dev
gettext                                  0.12.1-3
  pulled by: po-debconf, intltool-debian
file                                     4.02-4
  pulled by: defoma, debhelper
libgnomecanvas2-0                        2.2.1-1
  pulled by: libgnomeui-0, libbonoboui2-0, libbonoboui2-common, libgnomecanvas2-dev
zlib1g-dev                               1:1.1.4-14
  pulled by: libfreetype6-dev, libxft2-dev, libgnutls7-dev
libesd0                                  0.2.29-1
  pulled by: libgnomeui-0, libgnome2-0, libesd0-dev
dialog                                   0.9b-20030720-1
  pulled by: defoma
zlib1g-dev                               1:1.1.4-14
  provides: libz-dev
  pulled by: libfreetype6-dev, libxft2-dev, libxml2-dev
libbonobo2-dev                           2.2.3-1
  pulled by: libgnome2-dev, libbonoboui2-dev
fontconfig                               2.2.1-1
  pulled by: libfontconfig1, libpango1.0-common, libfontconfig1-dev
zlib1g                                   1:1.1.4-14
  pulled by: libgnomeui-0, bonobo-activation, libbonoboui2-0, libbonoboui2-common, gconf2, libglade2-0, libgnome2-0, libxslt1, libgnomecanvas2-0, libgnomevfs2-0, libgnutls7, libopencdk4, libgnomevfs2-common, libgnutls5, libgtk2.0-0, libgtk2.0-common, libfontconfig1, fontconfig, libfreetype6, libpng12-0, libtiff3g, libxft2, libpango1.0-0, libpango1.0-common, file, libmagic1, libxml2, zlib1g-dev, python2.2
libgcrypt1                               1.1.12-3
  pulled by: libgnomeui-0, libgnome2-0, libgnutls7, libopencdk4, libgnutls5, libgcrypt-dev
libgnomecanvas2-dev                      2.2.1-1
  pulled by: libgnomeui-dev, libbonoboui2-dev
debconf-utils                            1.3.4
  pulled by: debhelper
libgnutls7-dev                           0.8.9-2
  pulled by: libgnomevfs2-dev
libvorbis0a                              1.0.0-3
  pulled by: libvorbis-dev
libcdparanoia0                           3a9.8-9
  pulled by: libgnomevfs2-common
liborbit2                                1:2.6.2-1
  pulled by: libgnomeui-0, bonobo-activation, libbonobo-activation4, libbonobo2-0, libbonobo2-common, libbonoboui2-0, libbonoboui2-common, libgconf2-4, gconf2, libgnome2-0, libgnomevfs2-0, libgnomevfs2-common, liborbit2-dev
libvorbisenc2                            1.0.0-3
  pulled by: libvorbis-dev
libreadline4                             4.3-5
  pulled by: python2.2, gnuchess
indent                                   2.2.8-4
  pulled by: liborbit2-dev
libpopt0                                 1.7-2
  pulled by: libgnomeui-0, bonobo-activation, libbonobo-activation4, libbonobo2-common, gconf2, libgnome2-0, libgnutls7, libopencdk4, libgnutls5, liborbit2, liborbit2-dev, libpopt-dev
libgnomeui-0                             2.2.2-1
  pulled by: libgnomeui-dev
libfreetype6                             2.1.4-4
  pulled by: libgtk2.0-0, libgtk2.0-common, libfontconfig1, fontconfig, libxft2, libpango1.0-0, libpango1.0-common, xlibs, libfreetype6-dev
libjpeg62                                6b-8
  pulled by: libgnomeui-0, libgtk2.0-0, libtiff3g, libjpeg62-dev
libbonoboui2-common                      2.2.2-1
  pulled by: libbonoboui2-0
libbonobo2-common                        2.2.3-1
  pulled by: libbonobo2-0, libbonobo2-dev
libvorbisfile3                           1.0.0-3
  pulled by: libvorbis-dev
libatk1.0-0                              1.2.4-1
  pulled by: libgnomeui-0, libbonoboui2-0, libbonoboui2-common, gconf2, libglade2-0, libgnomecanvas2-0, libgtk2.0-0, libgtk2.0-common, libatk1.0-dev
libfreetype6-dev                         2.1.4-4
  pulled by: libpango1.0-dev, libxft2-dev, libfontconfig1-dev
xlibs                                    4.2.1-9
  pulled by: libgnomeui-0, libgtk2.0-0, libgtk2.0-0, libgtk2.0-common, libgtk2.0-common, libxft2, libpango1.0-0, libpango1.0-0, libpango1.0-common, libpango1.0-common, xlibs-dev
liblinc1                                 2:1.0.3-2
  pulled by: libgnomeui-0, bonobo-activation, libbonobo-activation4, libbonobo2-0, libbonobo2-common, libbonoboui2-0, libbonoboui2-common, libgconf2-4, gconf2, libgnome2-0, libgnomevfs2-0, libgnomevfs2-common, liborbit2, liblinc-dev
libgtk2.0-0                              2.2.2-1
  pulled by: libgnomeui-0, libbonoboui2-0, libbonoboui2-common, gconf2, libglade2-0, libgnomecanvas2-0, libgtk2.0-common, libgtk2.0-dev
libgnutls7                               0.8.9-2
  pulled by: libgnomevfs2-0, libgnutls7-dev
libidl0                                  0.8.2-1
  pulled by: liborbit2, liborbit2-dev
libdb4.1                                 4.1.25-4
  pulled by: python2.2
libopencdk4                              1:0.4.2-3
  pulled by: libgnutls7, libgnutls5, libopencdk-dev
libopencdk-dev                           1:0.4.2-3
  pulled by: libgnutls7-dev
libart-2.0-dev                           2.3.13-1
  pulled by: libgnomeui-dev, libgnomecanvas2-dev
libgcrypt-dev                            1.1.12-3
  pulled by: libgnutls7-dev, libopencdk-dev
html2text                                1.3.1-2
  pulled by: debhelper
libjpeg62-dev                            6b-8
  pulled by: libgnomeui-dev
build-essential                          9.4
  pulled by: dh-buildinfo
libglade2-0                              2.0.1-3
  pulled by: libgnomeui-0, libbonoboui2-common, libgnomecanvas2-0, libglade2-dev
libfontconfig1                           2.2.1-1
  pulled by: libgtk2.0-0, libgtk2.0-common, fontconfig, libxft2, libpango1.0-0, libpango1.0-common
libfam0c102                              2.6.10-1
  pulled by: libgnomevfs2-common
libgnomecanvas2-common                   2.2.1-1
  pulled by: libgnomecanvas2-0
python                                   2.2.3-3
  pulled by: python-xmlbase, python-xmlbase, python2.2
libmagic1                                4.02-4
  pulled by: file
libart-2.0-2                             2.3.13-1
  pulled by: libgnomeui-0, libbonoboui2-0, libbonoboui2-common, libgnomecanvas2-0, libart-2.0-dev
libexpat1                                1.95.6-4
  pulled by: libfontconfig1, fontconfig, python2.2-xmlbase
gnome-mime-data                          2.3.0-1
  pulled by: libgnomevfs2-common
libbonoboui2-dev                         2.2.2-1
  pulled by: libgnomeui-dev
libpango1.0-dev                          1.2.3-1
  pulled by: libgtk2.0-dev
libglade2-dev                            2.0.1-3
  pulled by: libbonoboui2-dev
python-xmlbase                           2.2.3-3
  pulled by: libglade2-dev
libgconf2-4                              2.2.1-1
  pulled by: libgnomeui-0, libbonoboui2-0, libbonoboui2-common, gconf2, libgnome2-0, libgnomevfs2-0, libgnomevfs2-common, libgconf2-dev
python2.2                                2.2.3-3
  pulled by: python, python2.2-xmlbase
libxft2-dev                              2.1.1-2
  pulled by: libpango1.0-dev
libglib2.0-0                             2.2.2-1
  pulled by: libgnomeui-0, bonobo-activation, libatk1.0-0, libbonobo-activation4, libbonobo2-0, libbonobo2-common, libbonoboui2-0, libbonoboui2-common, libgconf2-4, gconf2, libglade2-0, libgnome2-0, libgnomecanvas2-0, libgnomevfs2-0, libgnomevfs2-common, libgtk2.0-0, libgtk2.0-common, liblinc1, liborbit2, libidl0, libpango1.0-0, libpango1.0-common, liborbit2-dev, pkg-config, libglib2.0-dev
libao2                                   0.8.3-1.1
  pulled by: libao-dev
liblzo1                                  1.08-1
  pulled by: libgnutls7, libgnutls5
libpango1.0-common                       1.2.3-1
  pulled by: libpango1.0-0
libogg0                                  1.0.0-1
  pulled by: libogg-dev, libvorbis0a, libvorbisenc2, libvorbisfile3
libaudiofile0                            0.2.3-4
  pulled by: libgnomeui-0, libesd0, libgnome2-0, libaudiofile-dev
libbonobo-activation-dev                 1:2.2.2-1
  pulled by: libbonobo2-dev, libgnomevfs2-dev
libgnome2-common                         2.2.3-1
  pulled by: libgnome2-0
libgtk2.0-dev                            2.2.2-1
  pulled by: libgnomeui-dev, libgnomecanvas2-dev, libglade2-dev
po-debconf                               0.7.1
  pulled by: debhelper
libglib2.0-dev                           2.2.2-1
  pulled by: libgnome2-dev, liborbit2-dev, liblinc-dev, libbonobo-activation-dev, libgtk2.0-dev, libpango1.0-dev, libatk1.0-dev, libgconf2-dev
libatk1.0-dev                            1.2.4-1
  pulled by: libgtk2.0-dev
gconf2                                   2.2.1-1
  pulled by: libgconf2-4, libgnome2-common, libgconf2-dev
libxml2                                  2.5.7-1
  pulled by: libgnomeui-0, bonobo-activation, libbonoboui2-0, libbonoboui2-common, gconf2, libglade2-0, libgnome2-0, libxslt1, libgnomecanvas2-0, libgnomevfs2-0, libgnomevfs2-common, libxml2-dev
pkg-config                               0.15.0-2
  pulled by: liborbit2-dev, libglib2.0-dev, libgtk2.0-dev, libpango1.0-dev, libxft2-dev, libfontconfig1-dev, libatk1.0-dev, libart-2.0-dev
libpng12-0                               1.2.5.0-4
  pulled by: libgtk2.0-0
intltool-debian                          0.26+20030525
  pulled by: po-debconf
libjpeg62-dev                            6b-8
  provides: libjpeg-dev
  pulled by: libgnomeui-dev
libbonoboui2-0                           2.2.2-1
  pulled by: libgnomeui-0, libbonoboui2-common, libbonoboui2-dev
libfontconfig1-dev                       2.2.1-1
  pulled by: libpango1.0-dev, libxft2-dev
liborbit2-dev                            1:2.6.2-1
  pulled by: libgnome2-dev, libbonobo-activation-dev, libgconf2-dev
libtiff3g                                3.5.7-2
  pulled by: libgtk2.0-0
coreutils                                5.0-5
  provides: fileutils
  pulled by: debhelper
fileutils                                5.0-5
  pulled by: debhelper
libpango1.0-0                            1.2.3-1
  pulled by: libgnomeui-0, libbonoboui2-0, libbonoboui2-common, gconf2, libglade2-0, libgnomecanvas2-0, libgtk2.0-0, libgtk2.0-common, libpango1.0-common, libpango1.0-dev
libaudiofile-dev                         0.2.3-4
  pulled by: libesd0-dev
libssl0.9.7                              0.9.7b-2
  pulled by: python2.2
libgnomevfs2-dev                         2.2.5-3
  pulled by: libgnomeui-dev, libgnome2-dev
libgnomeui-common                        2.2.2-1
  pulled by: libgnomeui-0
libgtk2.0-common                         2.2.2-1
  pulled by: libgtk2.0-0
libogg-dev                               1.0.0-1
  pulled by: libvorbis-dev
gettext-base                             0.12.1-3
  pulled by: gettext
libbonobo-activation4                    1:2.2.2-1
  pulled by: libgnomeui-0, bonobo-activation, libbonobo2-0, libbonobo2-common, libbonoboui2-0, libbonoboui2-common, libgnome2-0, libgnomevfs2-0, libgnomevfs2-common, libbonobo-activation-dev
bonobo-activation                        1:2.2.2-1
  pulled by: libgnomeui-0, libbonobo-activation4, libbonobo2-0, libbonobo2-common, libbonoboui2-0, libbonoboui2-common, libgnome2-0, libgnomevfs2-0, libgnomevfs2-common, libbonobo-activation-dev
libgnutls5                               0.8.8-2
  pulled by: libgnomeui-0, libgnome2-0
liblinc-dev                              2:1.0.3-2
  pulled by: liborbit2-dev
libtasn1-0                               0.1.2-1
  pulled by: libgnomeui-0, libgnome2-0, libgnutls7, libgnutls5, libtasn1-dev
xlibs-dev                                4.2.1-9
  pulled by: libgtk2.0-dev, libpango1.0-dev, libxft2-dev
xfree86-common                           4.2.1-9
  pulled by: xlibs
libgnome2-dev                            2.2.3-1
  pulled by: libgnomeui-dev, libbonoboui2-dev
python2.2-xmlbase                        2.2.3-3
  pulled by: python-xmlbase
libpopt-dev                              1.7-2
  pulled by: liborbit2-dev, libbonobo-activation-dev, libgconf2-dev, libopencdk-dev
libgnomevfs2-0                           2.2.5-3
  pulled by: libgnomeui-0, libbonoboui2-0, libbonoboui2-common, libgnome2-0, libgnomevfs2-common, libgnomevfs2-common, libgnomevfs2-dev
libxft2                                  2.1.1-2
  pulled by: libgtk2.0-0, libgtk2.0-common, libpango1.0-0, libpango1.0-common, libxft2-dev
libbz2-1.0                               1.0.2-1
  pulled by: libgnome2-0, libgnomevfs2-common
libtasn1-dev                             0.1.2-1
  pulled by: libgnutls7-dev
libbonobo2-0                             2.2.3-1
  pulled by: libgnomeui-0, libbonobo2-common, libbonoboui2-0, libbonoboui2-common, libgnome2-0, libgnomevfs2-common, libbonobo2-dev
libesd0-dev                              0.2.29-1
  pulled by: libgnome2-dev, libbonoboui2-dev

Other information

The first thread about this software, in october 2001.


Yann Dirson
Last modified: Tue Sep 16 21:50:35 CEST 2003 dh-buildinfo-0.11/.dh-buildinfo.prcs_aux0000644000000000000000000000212410541262146015055 0ustar ;; This file is automatically generated, editing may cause PRCS to do ;; REALLY bad things. (Created-By-Prcs-Version 1 3 3) (debian/rules 1400 1139951704 6_rules 1.5) (debian/copyright 267 1057481110 4_copyright 1.1) (stats/lib/buildinfo-nb-files.gnuplot 232 1063198995 17_buildinfo- 1.2) (debian/compat 2 1057480823 5_compat 1.1) (stats/bin/check-buildinfo 1342 1166365617 10_check-buil 1.10) (stats/bin/fetch-buildinfo 2227 1063746792 13_fetch-buil 1.8) (private/upload 325 1063197804 12_upload 1.3) (stats/check-buildinfo 779 1060110460 10_check-buil 1.2) (stats/bin/buildinfo-packagetable 6206 1166369620 14_buildinfo- 1.2.1.17) (dh_buildinfo 7809 1073568157 2_dh_buildin 1.7) (debian/changelog 2925 1139952038 7_changelog 1.15) (stats/buildinfo-nb.gnuplot 221 1060032012 11_buildinfo- 1.1) (stats/lib/buildinfo-nb.gnuplot 221 1063198978 11_buildinfo- 1.2) (BuildDeps.pm 4814 1003610400 0_BuildDeps. 1.1) (dpkg-checkbuilddeps 4005 1003445118 1_dpkg-check 1.1) (buildinfo.html 26038 1063741835 9_buildinfo. 1.23) (debian/control 895 1073567609 8_control 1.6) (Makefile.PL 174 1139951911 3_Makefile.P 1.3) dh-buildinfo-0.11/Makefile.PL0000644000000000000000000000036112335754050012643 0ustar use ExtUtils::MakeMaker; WriteMakefile( NAME => 'dh-buildinfo', VERSION => '0.10', AUTHOR => 'Yann Dirson ', EXE_FILES => [ 'dh_buildinfo' ], MAN1PODS => { 'dh_buildinfo' => 'blib/man1/dh_buildinfo.1', }, ); dh-buildinfo-0.11/private/0000755000000000000000000000000007727616154012356 5ustar dh-buildinfo-0.11/private/upload0000755000000000000000000000050507727616154013570 0ustar #!/bin/sh case "$1" in web) cp -p --update buildinfo.html ~/public_html/free/en/software/ lftp -c "open free; lcd ~/public_html/free/en/software/; cd en/software/; put buildinfo.html" ;; cron) scp -rp stats/bin stats/lib dirson@gluck.debian.org: ;; *) echo >&2 "ERROR: unknown subcommand \`$1'" esac dh-buildinfo-0.11/BuildDeps.pm0000755000000000000000000001131607364360440013111 0ustar package BuildDeps; # This function checks the build dependencies passed in as the first # parameter. If they are satisfied, returns false. If they are unsatisfied, # an list of the unsatisfied depends is returned. # # Additional parameters that must be passed: # * A reference to a hash of all "ok installed" the packages on the system, # with the hash key being the package name, and the value being the # installed version. # * A reference to a hash, where the keys are package names, and the # value is a true value iff some package installed on the system provides # that package (all installed packages provide themselves) # # Optionally, the architecture the package is to be built for can be passed # in as the 4th parameter. If not set, dpkg will be queried for the build # architecture. sub depends { return check_line(1, @_); } # This function is exactly like unmet_build_depends, except it # checks for build conflicts, and returns a list of the packages # that are installed and are conflicted with. sub conflicts { return check_line(0, @_); } # This function does all the work. The first parameter is 1 to check build # deps, and 0 to check build conflicts. sub check_line { my $build_depends=shift; my $line=shift; my %version=%{shift()}; my %providers=%{shift()}; my $dump_met=shift(); my $build_arch=shift || `dpkg --print-architecture`; chomp $build_arch; my @unmet=(); my @met=(); foreach my $dep (split(/,\s*/, $line)) { my $ok=0; my @possibles=(); my @effectives=(); ALTERNATE: foreach my $alternate (split(/\s*\|\s*/, $dep)) { my ($package, $rest)=split(/\s*(?=[\[\(])/, $alternate, 2); $package =~ s/\s*$//; # Check arch specifications. if (defined $rest && $rest=~m/\[(.*?)\]/) { my $arches=lc($1); my $seen_arch=''; foreach my $arch (split(' ', $arches)) { if ($arch eq $build_arch) { $seen_arch=1; next; } elsif ($arch eq "!$build_arch") { next ALTERNATE; } elsif ($arch =~ /!/) { # This is equivilant to # having seen the current arch, # unless the current arch # is also listed.. $seen_arch=1; } } if (! $seen_arch) { next; } } # This is a possible way to meet the dependency. # Remove the arch stuff from $alternate. $alternate=~s/\s+\[.*?\]//; push @possibles, $alternate; # Check version. if (defined $rest && $rest=~m/\(\s*([<>=]{1,2})\s*(.*?)\s*\)/) { my $relation=$1; my $version=$2; if (! exists $version{$package}) { # Not installed at all, so fail. next; } else { # Compare installed and needed # version number. system("dpkg", "--compare-versions", $version{$package}, $relation, $version); if (($? >> 8) != 0) { next; # fail } } } elsif (! defined $providers{$package}) { # It's not a versioned dependency, and # nothing provides it, so fail. next; } # If we get to here, the dependency was met. $ok=1; if ($dump_met) { # keep it # push (@effectives, @{$providers{$package}}); push (@effectives, $package); } } if (@possibles && (($build_depends && ! $ok) || (! $build_depends && $ok))) { # TODO: this could return a more complex # data structure instead to save re-parsing. push @unmet, join (" | ", @possibles); } else { push @met, @effectives; } } if ($dump_met) { return @met; } else { return @unmet; } } sub pkginfo { my $package = shift; my %version=%{shift()}; my %providers=%{shift()}; my @result; if (ref $package eq 'ARRAY') { foreach my $pkg (@{$package}) { push @result, pkginfo ($pkg, \%version, \%providers); } } else { # there is at least one provider, as I assume builddeps are satisfied foreach my $provider (@{$providers{$package}}) { my $ver = $version{$provider}; if (defined $ver) { if ($package eq $provider) { push (@result, [ $provider, $ver ]); } else { # pseudo package push (@result, [ $provider, $ver, $package ]); } } } } return @result; } sub parse_control { my $control=shift || "debian/control"; my %fields = (); open (CONTROL, $control) || die "$control: $!\n"; local $/=''; my $cdata=; close CONTROL; my $dep_regex=qr/\s*((.|\n\s+)*)\s/; # allow multi-line if ($cdata =~ /^Build-Depends:$dep_regex/mi) { $fields{'Build-Depends'} = $1; } if ($cdata =~ /^Build-Conflicts:$dep_regex/mi) { $fields{'Build-Conflicts'} = $1; } if (! $binary_only && $cdata =~ /^Build-Depends-Indep:$dep_regex/mi) { $fields{'Build-Depends-Indep'} = $1; } if (! $binary_only && $cdata =~ /^Build-Conflicts-Indep:$dep_regex/mi) { $fields{'Build-Conflicts-Indep'} = $1; } return %fields; } 1; dh-buildinfo-0.11/dpkg-checkbuilddeps0000755000000000000000000000764507363655576014551 0ustar #! /usr/bin/perl -w # GPL copyright 2001 by Joey Hess # Parts copyright 2001 by Yann Dirson my $me; BEGIN { my $mydir; ($mydir,$me) = $0=~m:(.*)/(.+):; push @INC, $mydir; } use strict; use Getopt::Long; use BuildDeps; sub usage { print STDERR < \$binary_only, '-m' => \$dump_met, '-V' => \$printversions, '-d=s' => \$dependsexpr, '-c=s' => \$conflictsexpr, '-h' => \$want_help)) { usage(); exit(2); } if ($want_help) { usage(); exit(0); } my (@met, @unmet, @conflicts); my @status=parse_status(); push @status, $dump_met, $printversions; if (defined $dependsexpr or defined $conflictsexpr) { if ($dump_met) { if (defined $dependsexpr) { push @met, BuildDeps::depends($dependsexpr, @status); } foreach my $met (@met) { printf "%-40s ", $met->[0]; # pkg name print $met->[1] if $#{$met} >= 1; # version print ' (', $met->[2], ')' if $#{$met} > 1; # virtual pkg provided print "\n"; } } else { if (defined $dependsexpr) { push @unmet, BuildDeps::depends($dependsexpr, @status); } if (defined $dependsexpr) { push @unmet, BuildDeps::conflicts($conflictsexpr, @status); } if (@unmet) { print STDERR "$me: Unmet build dependencies: "; print STDERR join(", ", @unmet), "\n"; } if (@conflicts) { print STDERR "$me: Build conflicts: "; print STDERR join(", ", @conflicts), "\n"; } exit 1 if @unmet || @conflicts; } } else { my $control=shift || "debian/control"; my %fields = BuildDeps::parse_control ($control); if ($dump_met) { if (defined $fields{'Build-Depends'}) { push @met, BuildDeps::depends($fields{'Build-Depends'}, @status); } if (! $binary_only && defined $fields{'Build-Depends-Indep'}) { push @met, BuildDeps::depends($fields{'Build-Depends-Indep'}, @status); } print join("\n", @met), "\n"; } else { if (defined $fields{'Build-Depends'}) { push @unmet, BuildDeps::depends($fields{'Build-Depends'}, @status); } if (defined $fields{'Build-Conflicts'}) { push @conflicts, BuildDeps::conflicts($fields{'Build-Conflicts'}, @status); } if (! $binary_only && defined $fields{'Build-Depends-Indep'}) { push @unmet, BuildDeps::depends($fields{'Build-Depends-Indep'}, @status); } if (! $binary_only && defined $fields{'Build-Conflicts-Indep'}) { push @conflicts, BuildDeps::conflicts($fields{'Build-Conflicts-Indep'}, @status); } if (@unmet) { print STDERR "$me: Unmet build dependencies: "; print STDERR join(", ", @unmet), "\n"; } if (@conflicts) { print STDERR "$me: Build conflicts: "; print STDERR join(", ", @conflicts), "\n"; } exit 1 if @unmet || @conflicts; } } # This part could be replaced. Silly little status file parser. # thanks to Matt Zimmerman. Returns two hash references that # are exactly what the other functions need... sub parse_status { my $status=shift || "/var/lib/dpkg/status"; my %providers; my %version; local $/ = ''; open(STATUS, "<$status") || die "$status: $!\n"; while () { next unless /^Status: .*ok installed$/m; my ($package) = /^Package: (.*)$/m; push @{$providers{$package}}, $package; ($version{$package}) = /^Version: (.*)$/m; if (/^Provides: (.*)$/m) { foreach (split(/,\s*/, $1)) { push @{$providers{$_}}, $package; } } } close STATUS; return \%version, \%providers; } dh-buildinfo-0.11/dh_buildinfo0000755000000000000000000002302312335750527013252 0ustar #!/usr/bin/perl -w =head1 NAME dh_buildinfo - register the versions of build-dependencies used to build a package =cut # TODO: # - use cleaner APIs # - list "also used by" packages after "pulled by" ? use Data::Dumper; BEGIN { my ($mydir,$me) = $0=~m:(.*)/(.+):; push @INC, $mydir; } use strict; use Debian::Debhelper::Dh_Lib; use BuildDeps; my $buildarch = Debian::Debhelper::Dh_Lib::buildarch(); =head1 SYNOPSIS B [S>] [S>] [S>] [S>] =head1 DESCRIPTION dh_buildinfo is a debhelper program that registers in a file the list of packages declared as build-time dependencies, as well as build-essential packages, together with their versions, as installed in the build machine. This will hopefully help to track packages (auto-)built with package versions which are known to be buggy, and, more generally, to find out whether a package needs to be rebuilt because of a significant change in a package it has a build-time dependency on. You will usually just run this in your package's binary rule. If you need extra control over the operation, you can specify the actions to be taken. The default actions are I I. =head1 OPTIONS =over 4 =item I Generate the list of versions of the build dependencies in use. =item I Output the list of versions to I. =item I Installs the compressed list of versions to the package's build directory, in /usr/share/doc/package/buildinfo.gz =back =cut # This part could be replaced. Silly little status file parser. # thanks to Matt Zimmerman. Returns two hash references that # are exactly what the other functions need... sub parse_status { my $status=shift || "/var/lib/dpkg/status"; my %providers; my %depends; my %version; local $/ = ''; open(STATUS, "<$status") || die "$status: $!\n"; while () { next unless /^Status: .*ok installed$/m; # do not include foreign archs next unless /^Architecture: ($buildarch|all)$/m; my ($package) = /^Package: (.*)$/m; push @{$providers{$package}}, $package; ($version{$package}) = /^Version: (.*)$/m; if (/^Provides: (.*)$/m) { foreach (split(/,\s*/, $1)) { push @{$providers{$_}}, $package; } } if (/^(?:Pre-)?Depends: (.*)$/m) { foreach (split(/,\s*/, $1)) { push @{$depends{$package}}, $_; } } } close STATUS; return \%version, \%providers, \%depends; } # for each package, the packages which cause it to be listed my %causes; # Compute the closure in the depends graph of a # list of packages # # $1: arayref - list of packages to process # $2: hashref to %depends # $3: hashref for packages to exclude from the list # (presumably already listed) # $4: internal hashref for recursion # (should be undef on external calls) sub deps_closure { my @pkgs = @{shift()}; my %depends = %{shift()}; my $excludes = shift; $excludes = {} unless defined $excludes; my $closure = shift; my $firstiteration; if (defined $closure) { $firstiteration = 0; } else { $firstiteration = 1; $closure = {}; } my @unseen; foreach my $pkg (@pkgs) { # we don't want the initial packages in the final listing $excludes->{$pkg} = 1 if $firstiteration; # if ($firstiteration or (! defined $closure->{$pkg} and ! defined $excludes->{$pkg})) { push @unseen, $pkg; } $closure->{$pkg} = 1 unless $firstiteration or defined $excludes->{$pkg}; } foreach my $unseen (@unseen) { my @unseendeps = defined $depends{$unseen} ? @{$depends{$unseen}} : (); my @cleanunseendeps; foreach my $unseendep (@unseendeps) { my @split = split /\s*\|\s*/, $unseendep; foreach my $split (@split) { $split =~ s/\s*\(.*//; push @cleanunseendeps, $split; # record cause $causes{$split}->{$unseen} = 1; } } deps_closure (\@cleanunseendeps, \%depends, $excludes, $closure); } return keys %{$closure}; } sub add_to_closure { my ($pkgs, $closurehash) = @_; foreach my $pkg (@{$pkgs}) { $closurehash->{$pkg} = 1; } } sub pkgformat { my $pkgs = shift; my $listcauses = shift; my @vers = BuildDeps::pkginfo($pkgs, @_); my $str = ''; foreach my $ver (@vers) { $str .= sprintf "%-40s %s\n", $ver->[0], $ver->[1]; $str .= sprintf (" provides: %s\n", $ver->[2]) if $#$ver >= 2; if ($listcauses) { my $pkg; if ($#$ver >= 2) { $pkg = $ver->[2]; } else { $pkg = $ver->[0]; } $str .= sprintf " pulled by: %s\n", join (', ', sort keys %{$causes{$pkg}}) if defined $causes{$pkg}; } } return $str; } my $buildinfo; sub compute_buildinfo { my @status=parse_status(); my %depends=%{pop @status}; push (@status, 1, # $dump_met ); my $excludes={}; $buildinfo = " *** Build information ***"; # # get list of essential files # # parse list file open (RAWFILE, '/usr/share/build-essential/essential-packages-list') or error("cannot read /usr/share/build-essential/essential-packages-list: $!\n"); my @essentials = ; close RAWFILE; chomp @essentials; while (shift @essentials ne '') { } ; @essentials = sort @essentials; # get output in the same format as build-essential and explicit build-deps #@essentials = BuildDeps::depends(join (', ', @essentials), @status); # closure my @essentialsclosure = deps_closure(\@essentials, \%depends, $excludes); @essentialsclosure = sort @essentialsclosure; add_to_closure(\@essentialsclosure, $excludes); # record $buildinfo .= "\n\n Essential packages:\n\n" . pkgformat (\@essentials, 0, @status) . "\n\n Essential packages closure:\n\n" . pkgformat (\@essentialsclosure, 1, @status); # # get list of build-essential files # # get a build-dep like expression from list file open (RAWFILE, "/usr/share/build-essential/list") or error("cannot read /usr/share/build-essential/list: $!\n"); my $started = 0; my $bestring; while () { chomp; last if $_ eq 'END LIST OF PACKAGES'; next if /^\s/ or $_ eq ''; if ($started) { $bestring .= ', ' if defined $bestring; $bestring .= $_; } $started = 1 if $_ eq 'BEGIN LIST OF PACKAGES'; } # have the expression parsed my @buildessentials = BuildDeps::depends($bestring, @status); @buildessentials = sort @buildessentials; # closure my @buildessentialsclosure = deps_closure(\@buildessentials, \%depends, $excludes); @buildessentialsclosure = sort @buildessentialsclosure; add_to_closure (\@buildessentialsclosure, $excludes); # record $buildinfo .= "\n\n Build-Essential packages:\n\n" . pkgformat (\@buildessentials, 0, @status) . "\n\n Build-Essential closure:\n\n" . pkgformat (\@buildessentialsclosure, 1, @status); # # get explicit arch-indep build-dependencies # my @builddepsindep; my %fields = BuildDeps::parse_control ('debian/control'); if (defined $fields{'Build-Depends-Indep'}) { @builddepsindep = BuildDeps::depends($fields{'Build-Depends-Indep'}, @status); @builddepsindep = sort @builddepsindep; } # closure my @builddepsindepclosure = deps_closure(\@builddepsindep, \%depends, $excludes); @builddepsindepclosure = sort @builddepsindepclosure; add_to_closure (\@builddepsindepclosure, $excludes); # record $buildinfo .= "\n\n Declared Arch-indep Build-Dependencies:\n\n" . pkgformat (\@builddepsindep, 0, @status) . "\n\n Arch-indep Build-Dependencies closure:\n\n" . pkgformat (\@builddepsindepclosure, 1, @status); # # get explicit build-dependencies # my @builddeps; %fields = BuildDeps::parse_control ('debian/control'); if (defined $fields{'Build-Depends'}) { @builddeps = BuildDeps::depends($fields{'Build-Depends'}, @status); @builddeps = sort @builddeps; } # closure my @builddepsclosure = deps_closure(\@builddeps, \%depends, $excludes); @builddepsclosure = sort @builddepsclosure; #add_to_closure (\@builddepsclosure, $excludes); # record $buildinfo .= "\n\n Declared Arch-dependent Build-Dependencies:\n\n" . pkgformat (\@builddeps, 0, @status) . "\n\n Arch-dependent Build-Dependencies closure:\n\n" . pkgformat (\@builddepsclosure, 1, @status); } sub generate_buildinfo { open BUILDINFO, ">debian/buildinfo"; print BUILDINFO $buildinfo; close BUILDINFO; } sub install_buildinfo { complex_doit("gzip -9nf debian/buildinfo >debian/buildinfo.gz"); foreach my $package (@{$dh{DOPACKAGES}}) { # policy forbids doc files in udebs, comply even if we're not # really a docfile next if is_udeb($package); my $tmp=tmpdir($package); my $arch=package_arch($package); # If this is a symlink, leave it alone. if ( ! -d "$tmp/usr/share/doc/$package" && ! -l "$tmp/usr/share/doc/$package") { doit("install","-g",0,"-o",0,"-d","$tmp/usr/share/doc/$package"); } if ( ! -l "$tmp/usr/share/doc/$package") { doit("install","-g",0,"-o",0,"-m0644","debian/buildinfo.gz","$tmp/usr/share/doc/$package/buildinfo_$arch.gz"); } } doit("rm","debian/buildinfo.gz"); } my @commands; sub ensure_buildinfo { if (!-r 'debian/buildinfo' and ! grep { $_ eq 'generate' } @commands) { compute_buildinfo(); generate_buildinfo(); } } # # The real work # init(); # debhelper stuff @commands = @ARGV; @commands = ('generate', 'install') unless scalar @commands; if (grep { $_ eq 'generate' } @commands) { compute_buildinfo(); generate_buildinfo(); } if (grep { $_ eq 'cat' } @commands) { ensure_buildinfo; doit ("cat","debian/buildinfo"); } if (grep { $_ eq 'install' } @commands) { ensure_buildinfo; install_buildinfo(); } dh-buildinfo-0.11/dh-buildinfo.prj0000644000000000000000000000511610541262146013752 0ustar ;; -*- Prcs -*- (Created-By-Prcs-Version 1 3 3) (Project-Description "") (Project-Version dh-buildinfo v0-dev 64) (Parent-Version dh-buildinfo v0-dev 63) (Version-Log "- write current stats in sumarry page - autoflush summary page to see progress while generating ") (New-Version-Log "") (Checkin-Time "Sun, 17 Dec 2006 16:38:14 +0100") (Checkin-Login debyann) (Populate-Ignore ("^RCS/" "^dh-buildinfo.prj.bak$" ".*~$" "^Makefile$" "^Makefile.old$" "^pm_to_blib$" "^blib/" "^debian/dh-buildinfo/" "^debian/.*.substvars$" "^debian/files$" "^debian/buildinfo$" "^build-stamp$" )) (Project-Keywords) (Files ;; This is a comment. Fill in files here. ;; For example: (prcs/checkout.cc ()) ;; Files added by populate at Sun, 06 Jul 2003 10:30:48 +0200, ;; to version 0.0(w), by dwitch: (BuildDeps.pm (dh-buildinfo/0_BuildDeps. 1.1 755)) (dpkg-checkbuilddeps (dh-buildinfo/1_dpkg-check 1.1 755)) (dh_buildinfo (dh-buildinfo/2_dh_buildin 1.7 755)) ;; Files added by populate at Sun, 06 Jul 2003 10:39:28 +0200, ;; to version v0-dev.1(w), by dwitch: (Makefile.PL (dh-buildinfo/3_Makefile.P 1.3 644)) ;; Files added by populate at Sun, 06 Jul 2003 10:46:33 +0200, ;; to version v0-dev.3(w), by dwitch: (debian/copyright (dh-buildinfo/4_copyright 1.1 644)) (debian/compat (dh-buildinfo/5_compat 1.1 644)) (debian/rules (dh-buildinfo/6_rules 1.5 755)) (debian/changelog (dh-buildinfo/7_changelog 1.15 644)) (debian/control (dh-buildinfo/8_control 1.6 644)) ;; Files added by populate at Mon, 07 Jul 2003 23:39:44 +0200, ;; to version v0-dev.7(w), by dwitch: (buildinfo.html (dh-buildinfo/9_buildinfo. 1.23 644)) ;; Files added by populate at Mon, 04 Aug 2003 23:20:49 +0200, ;; to version v0-dev.13(w), by dwitch: (stats/bin/check-buildinfo (dh-buildinfo/10_check-buil 1.10 755)) (stats/lib/buildinfo-nb.gnuplot (dh-buildinfo/11_buildinfo- 1.2 644)) ;; Files added by populate at Tue, 05 Aug 2003 21:29:43 +0200, ;; to version v0-dev.18(w), by dwitch: (private/upload (dh-buildinfo/12_upload 1.3 755)) ;; Files added by populate at Wed, 06 Aug 2003 22:43:31 +0200, ;; to version v0-dev.25(w), by dwitch: (stats/bin/fetch-buildinfo (dh-buildinfo/13_fetch-buil 1.8 755)) ;; Files added by populate at Thu, 07 Aug 2003 00:46:17 +0200, ;; to version v0-dev.26(w), by dwitch: (stats/bin/buildinfo-packagetable (dh-buildinfo/14_buildinfo- 1.2.1.17 755)) ;; Files added by populate at Thu, 14 Aug 2003 10:55:19 +0200, ;; to version v0-dev.36(w), by dwitch: (stats/lib/buildinfo-nb-files.gnuplot (dh-buildinfo/17_buildinfo- 1.2 644)) ) (Merge-Parents) (New-Merge-Parents) dh-buildinfo-0.11/debian/0000755000000000000000000000000012335754221012113 5ustar dh-buildinfo-0.11/debian/control0000644000000000000000000000163512335750124013521 0ustar Source: dh-buildinfo Section: devel Priority: optional Build-Depends-Indep: perl, build-essential (>= 7) Build-Depends: debhelper (>= 9) Maintainer: Yann Dirson Standards-Version: 3.5.1 Package: dh-buildinfo Architecture: all Multi-Arch: foreign Depends: debhelper, ${perl:Depends}, ${misc:Depends}, build-essential (>= 7) Description: Debhelper addon to track package versions used to build a package This script is designed to be run at build-time, and registers in a file the list of packages declared as build-time dependencies, as well as build-essential packages, together with their versions, as installed in the build machine. . This will hopefully help to track packages (auto-)built with package versions which are known to be buggy, and, more generally, to find out whether a package needs to be rebuilt because of a significant change in a package it has a build-time dependency on. dh-buildinfo-0.11/debian/copyright0000644000000000000000000000041307701760626014053 0ustar This is the debian package for dh-buildinfo. It was initially created by Yann Dirson using dh-make-perl. This package is covered by the GNU General Public Licence, version 2. On Debian systems, you'll find it in /usr/share/common-licenses/GPL-2 dh-buildinfo-0.11/debian/compat0000644000000000000000000000000212217615367013317 0ustar 9 dh-buildinfo-0.11/debian/changelog0000644000000000000000000001050712335754204013771 0ustar dh-buildinfo (0.11) unstable; urgency=medium * Avoid dups in "pulled by" lines, and sort contents of those for output stability. * Ignore packages of foreign architecture, we were mistakely adding a line for them * Mark as "Multi-Arch: foreign" to ease cross-compilation (From Colin Watson @ Ubuntu, Closes: #728203) * Include manpage contributed by Luis Rodrigo Gallardo Cruz (Closes: #203410). Adjusted Makefile.PL to make any changes to debian/rules useless. -- Yann Dirson Sat, 17 May 2014 23:45:30 +0200 dh-buildinfo (0.10) unstable; urgency=low * Acknowledge NMU. * Include in source the lastest buildinfo-packagetable version, with more flexible command line. * Produce stable output (Jérémy Bobbio, Closes: #722186): * sort list of packages * omit original name/timestamp from gzip file * Don't install buildinfo files inside udebs (Colin Watson, Closes: #593601). * Move debhelper from Build-Depends-Indep to Build-Depends (lintian). * Use DESTDIR instead of PREFIX at "make install" time (lintian). * Don't ignore all "make realclean" errors (lintian). * Switch from debhelper compat 4 to 9. * Switch from dh_clean -k to dh_prep. -- Yann Dirson Sun, 22 Sep 2013 18:37:02 +0200 dh-buildinfo (0.9+nmu1) unstable; urgency=low * Non-maintainer upload. * Add architecture to buildinfo file name. (closes: #620104) -- Bastian Blank Sun, 13 May 2012 09:53:56 +0000 dh-buildinfo (0.9) unstable; urgency=low * Corrected Makefile.PL and debian/rules to get a sane install procedure (Closes: #352787). -- Yann Dirson Tue, 14 Feb 2006 22:20:38 +0100 dh-buildinfo (0.8) unstable; urgency=low * Fix from Javier Fernandez-Sanguino Pen~a: * Use /usr/share/build-essential/ instead of /usr/share/doc/build-essential for location of 'list' and 'essential-package-list'. This avoids depending on stuff in /usr/share/doc/ which violates policy (Closes: #225334) * Adjusted depends line since only version 7 and above of build-essential provided both files at /usr/share/build-essential/ * Also adjusted build-depends for this. -- Yann Dirson Thu, 8 Jan 2004 14:22:42 +0100 dh-buildinfo (0.7) unstable; urgency=low * Compress buildinfo file on installation instead of relying on other programs to do that, since several packages have an uncompressed buildinfo file already. * New stat: number of stored buildinfo files. * Fixed call of fetchinfo script so that it gets effectively run in the cron job. * Fixed stat scripts not to be confused by regexp metacharacters in package names and version numbers (esp. `+' was causing much trouble. -- Yann Dirson Wed, 17 Sep 2003 09:32:59 +0200 dh-buildinfo (0.6) unstable; urgency=low * Now accepts optional command-line arguments "generate", "install", and "cat", defaulting to "generate install" to emulate previous behaviour. * Get rid of too-strict perl builddep (Jerome Warnier). * Include stats scripts in source package. * Updated doc to point to daily-generated graph showing the use of this package. * Moved TODO items from script source to HTML doc. -- Yann Dirson Fri, 8 Aug 2003 22:53:47 +0200 dh-buildinfo (0.5) unstable; urgency=low * Made all header lines start with a space, so that a simple grep can be used to extract the whole list. -- Yann Dirson Thu, 17 Jul 2003 00:06:04 +0200 dh-buildinfo (0.4) unstable; urgency=low * Added build-essential to build-deps, and temporarily added it to deps as well, until I include some pre-parsed version of the lists in there, into the package (Closes: #201473). -- Yann Dirson Wed, 16 Jul 2003 17:42:46 +0200 dh-buildinfo (0.3) unstable; urgency=low * Put the buildinfo.html webpage in the package, after updating the TODO list inside. -- Yann Dirson Mon, 7 Jul 2003 23:41:14 +0200 dh-buildinfo (0.2) unstable; urgency=low * Changed package section from perl to devel. -- Yann Dirson Mon, 7 Jul 2003 11:59:59 +0200 dh-buildinfo (0.1) unstable; urgency=low * Initial package (state of the code I wrote in october 2001). -- Yann Dirson Sun, 6 Jul 2003 10:51:57 +0200 dh-buildinfo-0.11/debian/rules0000755000000000000000000000260312335754126013200 0ustar #!/usr/bin/make -f #-*- makefile -*- # Made with the aid of dh_make, by Craig Small # Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess. # Some lines taken from debmake, by Christoph Lameter. # Uncomment this to turn on verbose mode. export DH_VERBOSE=1 PACKAGE=$(shell dh_listpackages) ifndef PERL PERL = /usr/bin/perl endif ifndef DESTDIR DESTDIR=.. endif TMP =`pwd`/debian/$(PACKAGE) build: build-stamp build-stamp: dh_testdir $(PERL) Makefile.PL INSTALLDIRS=vendor $(MAKE) OPTIMIZE="-O2 -g -Wall" touch build-stamp clean: dh_testdir dh_testroot rm -f build-stamp [ ! -f Makefile ] || $(MAKE) realclean dh_clean install: dh_testdir dh_testroot dh_prep dh_installdirs $(MAKE) install DESTDIR=$(TMP) # Build architecture-dependent files here. binary-arch: build install # We have nothing to do by default. # Build architecture-independent files here. binary-indep: build install dh_testdir dh_testroot dh_installdocs buildinfo.html ./dh_buildinfo dh_installcron dh_installman dh_installchangelogs dh_compress dh_fixperms dh_installdeb dh_perl dh_gencontrol dh_md5sums dh_builddeb --destdir=$(DESTDIR) source diff: @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false binary: binary-indep binary-arch .PHONY: build clean binary-indep binary-arch binary dh-buildinfo-0.11/stats/0000755000000000000000000000000007714161341012027 5ustar dh-buildinfo-0.11/stats/bin/0000755000000000000000000000000010541261524012573 5ustar dh-buildinfo-0.11/stats/bin/buildinfo-packagetable0000755000000000000000000001407610541261524017105 0ustar #!/usr/bin/perl -w # (c) 2003,2006 Yann Dirson # Covered by the GNU GPL, version 2. # When given command-line arguments, only generates pages for the # given packages. When run without arguments, generates pages for all # packages in database, and regenerates the index. use strict; use IO::Handle; my $htmlroot = "/home/dirson/public_html/buildinfo"; my $npkg = current_stat('stats/buildinfo'); my $nfiles = current_stat('stats/buildinfo-nb-files'); chdir "data/buildinfo"; my %categs = ('arch' => 'Architecture-dependant build-deps', 'arch-closure' => 'Architecture-dependant closure', 'indep' => 'Architecture-independant build-deps', 'indep-closure' => 'Architecture-independant build-deps closure', 'b-ess' => 'Build-essential packages', 'b-ess-closure' => 'Build-essential closure', 'ess' => 'Essential packages', 'ess-closure' => 'Essential closure'); if (@ARGV) { ## for each package on command-line foreach my $package (@ARGV) { handle_package($package); } } else { mkdir $htmlroot unless -d $htmlroot; open (SUMMARY, ">$htmlroot/index.html"); SUMMARY->autoflush(1); print SUMMARY < Build informations

Build informations

Build informations are currently generated using the dh_buildinfo script from the dh-buildinfo package. This is a temporary measure, as doing so for the whole archive would add much too much size to it. The best known idea till now would be to have them uploaded together with .changes file, and archived on buildd.debian.org.

dh_buildinfo also has a homepage.

some graphs

Note that there were a number of bugs in the fetching script, which caused a number of buildinfo files to be missed, and that those bugfixes are reflected in the graphs.

extracted data

    EOH ; ## for each package in the database (we have chdir'd into data/buildinfo) foreach my $package (<*>) { handle_package($package); } print SUMMARY "
\n"; close SUMMARY; } ## extract last count from a stat file sub current_stat { my $file=shift; open FILE, $file; my @v; while () { @v = split(/\s/, $_); }; close FILE; return $v[1]; } ## the main stuff sub handle_package { my $package=shift; my $packagedir="$htmlroot/$package"; ## read data for every version of the package my %data = (); foreach my $datafile (<$package/*>) { $datafile =~ m|^\Q$package/${package}\E_(.*)_(.*)$| or next; my ($vers,$arch) = ($1,$2); $data{$vers} = { archs => {} } unless defined $data{$vers}; $data{$vers}->{archs}->{$arch} = {}; open DATA, $datafile; my $categ = 'ess'; foreach my $dataline () { if ($dataline =~ '^ Essential packages closure:') { $categ = 'ess-closure'; next; } if ($dataline =~ '^ Build-Essential packages:') { $categ = 'b-ess'; next; } if ($dataline =~ '^ Build-Essential closure:') { $categ = 'b-ess-closure'; next; } if ($dataline =~ '^ Declared Arch-indep Build-Dependencies:') { $categ = 'indep'; next; } if ($dataline =~ '^ Arch-indep Build-Dependencies closure:') { $categ = 'indep-closure'; next; } if ($dataline =~ '^ Declared Arch-dependent Build-Dependencies:') { $categ = 'arch'; next; } if ($dataline =~ '^ Arch-dependent Build-Dependencies closure:') { $categ = 'arch-closure'; next; } next if $dataline =~ /^ /; my ($deppkg,$depvers) = split (/\s+/, $dataline); $data{$vers}->{archs}->{$arch}->{$deppkg} = $depvers; push (@{$data{$vers}->{packages}->{$categ}}, $deppkg) unless grep { $_ eq $deppkg } @{$data{$vers}->{packages}->{$categ}}; } close DATA; } ## present the data my $datasize = keys %data; if ($datasize == 0) { unless (@ARGV) { print SUMMARY "
  • $package"; if (-r "$package/ERROR") { open (ERROR, "<$package/ERROR"); print SUMMARY ' (', , ')'; close ERROR; } print SUMMARY "\n"; } } else { unless (@ARGV) { print SUMMARY "
  • $package ($datasize)"; if (-r "$package/WARNING") { open (WARNING, "<$package/WARNING"); print SUMMARY ' (', , ')'; close WARNING; } } mkdir $packagedir unless -d $packagedir; unlink "$packagedir/data"; symlink "../../../data/buildinfo/$package", "$packagedir/data"; open (PKGSUMMARY, ">$packagedir/index.html"); print PKGSUMMARY < Build informations for $package

    Build informations for $package

      EOH ; ## print out an index of all available versions print PKGSUMMARY "

      ", scalar keys %data, " versions:

      \n
        \n"; foreach my $vers (sort keys %data) { print PKGSUMMARY "
      • $vers
      • \n"; } print PKGSUMMARY "
      \n"; ## format details for every version foreach my $vers (sort keys %data) { print PKGSUMMARY "

      $package $vers

      \n"; # list is hardcoded to force ordering foreach my $categ ('arch', 'arch-closure', 'indep', 'indep-closure', 'b-ess', 'b-ess-closure', 'ess', 'ess-closure') { print PKGSUMMARY '

      ', $categs{$categ}, "

      \n"; print PKGSUMMARY "\n\n"; foreach my $arch (keys %{$data{$vers}->{archs}}) { print PKGSUMMARY "\n"; } print PKGSUMMARY "
      "; foreach my $deppkg (@{$data{$vers}->{packages}->{$categ}}) { print PKGSUMMARY "$deppkg"; } print PKGSUMMARY "
      $arch"; foreach my $deppkg (@{$data{$vers}->{packages}->{$categ}}) { if (defined $data{$vers}->{archs}->{$arch}->{$deppkg}) { print PKGSUMMARY "$data{$vers}->{archs}->{$arch}->{$deppkg}"; } else { print PKGSUMMARY "N/A"; } } print PKGSUMMARY "
      \n"; } } } } dh-buildinfo-0.11/stats/bin/fetch-buildinfo0000755000000000000000000000426307731676350015606 0ustar #! /usr/bin/perl -w # Get buildinfo files from deb archives of all packages declaring a # builddep on dh-buildinfo. # FIXME: we only get the buildinfo from a .deb of the same name as the # source package. 1) we should look at the "Binary" field instead. # 2) this doesn't work when this package has a symlink as docdir, we # could cycle through values of the "Binary" field. use strict; # Usage: (cd /org/ftp.debian.org/ftp && /home/dirson/bin/fetch-buildinfo dists/sid/*/source/Sources.gz) my $buildinfodir = '/home/dirson/data/buildinfo'; sub error { my ($pkg, $msg, $file) = @_; $file = 'ERROR' unless defined $file; mkdir "$buildinfodir/$pkg" unless -d "$buildinfodir/$pkg"; open (ERROR, ">$buildinfodir/$pkg/$file") or die "cannot create $buildinfodir/$pkg/$file: $!"; print ERROR "$msg\n"; close ERROR; } for my $sourcesfile (@ARGV) { open SOURCES, "zcat $sourcesfile | grep-dctrl -FBuild-depends,Build-depends-indep -sPackage,Binary,Version,Directory dh-buildinfo |"; local $/ = "\n\n"; PACKAGE: while () { m/Package: (.+)\nBinary: (.+)\nVersion: ((.+:)?(.+))\nDirectory: (.+)/m; my ($pkg, $binaries, $fullvers, undef, $vers, $dir) = ($1, $2, $3, $4, $5, $6); my @binaries = split /,\s*/, $binaries; # print "$pkg $vers $dir\n"; my $found; BINARY: foreach my $binary (@binaries) { FILE: foreach my $archfile (<$dir/${binary}_${vers}_*.deb>) { $archfile =~ m|\Q$dir/${binary}_${vers}\E_(.*)\.deb|; my $arch = $1; my $resultfile = "$buildinfodir/${pkg}/${pkg}_${vers}_$arch"; mkdir "$buildinfodir/${pkg}"; system ("dpkg --fsys-tarfile $archfile | tar Oxf - ./usr/share/doc/*/buildinfo.gz 2>/dev/null | gzip -dc 2>/dev/null > $resultfile"); # don't read debs for other archs if the 1st one fails if (-z $resultfile) { system ("dpkg --fsys-tarfile $archfile | tar Oxf - ./usr/share/doc/*/buildinfo 2>/dev/null > $resultfile"); if (-z $resultfile) { unlink $resultfile; next BINARY; } else { error ($pkg, "buildinfo not compressed", 'WARNING'); $found = 1; } } else { $found = 1; } } last BINARY if $found; } error ($pkg, "no buildinfo in any binary packages") unless $found; } } dh-buildinfo-0.11/stats/bin/check-buildinfo0000755000000000000000000000247610541251661015561 0ustar #!/bin/sh # (c) 2003 Yann Dirson # Covered by the GNU GPL, version 2. # This script is intended to be run as a daily cron job. It expects # to find the Sources.gz files in a fixed place, and the gnuplot # script in ~/lib/. # It registers the number of packages with build-time dep on dh-buildinfo # It is used to generate http://people.debian.org/~dirson/buildinfo-npkg.eps # It also fetches buildinfo files from debs in the archive, and produces # http://people.debian.org/~dirson/buildinfo.html ## output files usersfile=stats/buildinfo-users outfile=stats/buildinfo ## processing date=$(date --iso) zcat /org/ftp.debian.org/ftp/dists/sid/*/source/Sources.gz | grep-dctrl --field=Build-depends,Build-depends-indep \ --show-field=Package --no-field-names \ dh-buildinfo > ${usersfile} # store and graph number of packages using dh-buildinfo echo $date $(cat ${usersfile} | wc -l) >> ${outfile} gnuplot lib/buildinfo-nb.gnuplot ## fetch buildinfo files (cd /org/ftp.debian.org/ftp && /home/dirson/bin/fetch-buildinfo dists/sid/*/source/Sources.gz) ## generate summary tables ./bin/buildinfo-packagetable ## store and graph number of buildinfo files echo $date $(find data/buildinfo -type f -not -name ERROR -not -name WARNING | wc -l) >>stats/buildinfo-nb-files gnuplot lib/buildinfo-nb-files.gnuplot dh-buildinfo-0.11/stats/lib/0000755000000000000000000000000007727620423012602 5ustar dh-buildinfo-0.11/stats/lib/buildinfo-nb.gnuplot0000644000000000000000000000033507727620402016562 0ustar #!/usr/bin/env gnuplot set timefmt "%Y-%m-%d" set xdata time set format x "%m/%d" set data style linespoints set term postscript eps color set output "public_html/buildinfo/npkg.eps" plot "stats/buildinfo" using 1:2 dh-buildinfo-0.11/stats/lib/buildinfo-nb-files.gnuplot0000644000000000000000000000035007727620423017662 0ustar #!/usr/bin/env gnuplot set timefmt "%Y-%m-%d" set xdata time set format x "%m/%d" set data style linespoints set term postscript eps color set output "public_html/buildinfo/nfiles.eps" plot "stats/buildinfo-nb-files" using 1:2