Packages with empty directories - Debian

This is a discussion on Packages with empty directories - Debian ; I recently noticed that many of the binary packages in Debian have unnecessary empty directories in them, so I wrote a script to find all packages with any empty directories. The results are too numerous to post on the list. ...

+ Reply to Thread
Results 1 to 16 of 16

Thread: Packages with empty directories

  1. Packages with empty directories

    I recently noticed that many of the binary packages in Debian have unnecessary
    empty directories in them, so I wrote a script to find all packages with any
    empty directories. The results are too numerous to post on the list. The
    list by maintainer/uploader is at
    http://people.debian.org/~schepler/empty-dirs-maint.txt
    and the full list of empty directories found is at
    http://people.debian.org/~schepler/empty-dirs.txt .

    Obviously, a lot of these will be false positives, so I definitely won't file
    mass bugs based on this list without checking the full details first.
    --
    Daniel Schepler


    --
    To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
    with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

  2. Re: Packages with empty directories

    On 21/11/2007, Daniel Schepler wrote:
    > Obviously, a lot of these will be false positives, so I definitely
    > won't file mass bugs based on this list without checking the full
    > details first.


    Maybe suggesting a lintian check would be a good idea?

    Cheers,

    --
    Cyril Brulebois

    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.6 (GNU/Linux)

    iD8DBQBHQ6VveGfVPHR5Nd0RAucyAKCSmXxbZeZDUD1ZPhobQV 1MNPDk6ACfecy2
    IKpmS2HOKE+BCoX1sZSf3+U=
    =Bn/i
    -----END PGP SIGNATURE-----


  3. Re: Packages with empty directories

    On Tuesday 20 November 2007 10:26:39 pm Cyril Brulebois wrote:
    > On 21/11/2007, Daniel Schepler wrote:
    > > Obviously, a lot of these will be false positives, so I definitely
    > > won't file mass bugs based on this list without checking the full
    > > details first.

    >
    > Maybe suggesting a lintian check would be a good idea?
    >
    > Cheers,


    It would be hard to write a check without numerous false positives. Under
    those circumstances I think they would be classified as "I:" messages, which
    hardly anybody would see anyway. I suppose it would be possible to write a
    check for empty /usr/sbin, /usr/bin, /etc, ... in packages != base-files, but
    that would miss a lot of cases.
    --
    Daniel Schepler


    --
    To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
    with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

  4. Re: Packages with empty directories

    Daniel Schepler schrieb:
    > I recently noticed that many of the binary packages in Debian have unnecessary
    > empty directories in them, so I wrote a script to find all packages with any
    > empty directories. The results are too numerous to post on the list. The
    > list by maintainer/uploader is at
    > http://people.debian.org/~schepler/empty-dirs-maint.txt
    > and the full list of empty directories found is at
    > http://people.debian.org/~schepler/empty-dirs.txt .
    >
    > Obviously, a lot of these will be false positives, so I definitely won't file
    > mass bugs based on this list without checking the full details first.


    All of my packages listed there are false positives. What I noticed
    though, are a lot of packages, shipping empty /usr/sbin, /usr/bin/,
    /usr/lib/ or /usr/include directories.
    This directories, very likely, come from dh-make *.dirs templates.
    Imo these template files are wrong and should be cleaned up.
    There is no point in creating directories for /usr/bin etc. if "make
    install" will create them automatically when installing the
    binaries/libs/headers.
    Imho *.dirs files should only be used for directories which aren't
    automatically created by "make install".

    Cheers,
    Michael

    --
    Why is it that all of the instruments seeking intelligent life in the
    universe are pointed away from Earth?


    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.6 (GNU/Linux)
    Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

    iD8DBQFHQ6/oh7PER70FhVQRAigrAKCkBl7DO7wKLD2YzecqHLVCm3vP4ACfd 6Uc
    6Lb9U7Nu88x7s0HrGrDBV/g=
    =voYD
    -----END PGP SIGNATURE-----


  5. Re: Packages with empty directories

    Daniel Schepler schrieb:
    > On Tuesday 20 November 2007 10:26:39 pm Cyril Brulebois wrote:
    >> On 21/11/2007, Daniel Schepler wrote:
    >>> Obviously, a lot of these will be false positives, so I definitely
    >>> won't file mass bugs based on this list without checking the full
    >>> details first.

    >> Maybe suggesting a lintian check would be a good idea?
    >>
    >> Cheers,

    >
    > It would be hard to write a check without numerous false positives. Under
    > those circumstances I think they would be classified as "I:" messages, which
    > hardly anybody would see anyway. I suppose it would be possible to write a
    > check for empty /usr/sbin, /usr/bin, /etc, ... in packages != base-files, but
    > that would miss a lot of cases.


    Imho adding a lintian check for empty /usr/bin, /usr/sbin, /usr/lib and
    /usr/include directories (as created by dh-make) would be a good start.

    Cheers,
    Michael

    --
    Why is it that all of the instruments seeking intelligent life in the
    universe are pointed away from Earth?


    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.6 (GNU/Linux)
    Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

    iD8DBQFHQ7IBh7PER70FhVQRAjXvAJ4nEXa7W+HnunXyxSDWi7 pbP9omMACfVrup
    Z6GZC5iDr4tgw4PHkPsvhCA=
    =lzf9
    -----END PGP SIGNATURE-----


  6. Re: Packages with empty directories

    Hi

    On Tue, 20 Nov 2007 21:55:30 -0500
    Daniel Schepler wrote:

    > I recently noticed that many of the binary packages in Debian have unnecessary
    > empty directories in them,


    How do you detect that the directory is "unnecessary"? It can be for
    example used for storing data in /var.

    > so I wrote a script to find all packages with any
    > empty directories. The results are too numerous to post on the list. The
    > list by maintainer/uploader is at
    > http://people.debian.org/~schepler/empty-dirs-maint.txt
    > and the full list of empty directories found is at
    > http://people.debian.org/~schepler/empty-dirs.txt .
    >
    > Obviously, a lot of these will be false positives, so I definitely won't file
    > mass bugs based on this list without checking the full details first.


    I just checked my packages and all pure python modules using pycentral
    have empty /usr/lib. This will be probably very usual cause of these
    problems, just filed a bug for it. For the rest empty directories are
    intentional, so false positives.

    --
    Michal Čihař | http://cihar.com | http://blog.cihar.com

    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.6 (GNU/Linux)

    iD8DBQFHQ7Ir3DVS6DbnVgQRAiX7AKDn5Rh22ZmEfI2g5ToW7b GjB4K9bQCgxYGR
    UOQI0s8wRHantswEKMVuIXM=
    =wAXP
    -----END PGP SIGNATURE-----


  7. Re: Packages with empty directories

    Daniel Schepler wrote:
    > Obviously, a lot of these will be false positives, so I definitely won't file
    > mass bugs based on this list without checking the full details first.



    Using python-support also creates false-positives. python-support relies
    on having /usr/share/python-support/packagename/ available, even if
    there're no arch independent modules in the package. If I remember right
    python-support uses the directory to be able to clean up
    /var/lib/python-support if necessary - or something like that.


    --
    Bernd Zeimetz



    --
    To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
    with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

  8. Re: Packages with empty directories

    Am Mittwoch, den 21.11.2007, 05:11 +0100 schrieb Michael Biebl:
    > All of my packages listed there are false positives. What I noticed
    > though, are a lot of packages, shipping empty /usr/sbin, /usr/bin/,
    > /usr/lib/ or /usr/include directories.
    > This directories, very likely, come from dh-make *.dirs templates.
    > Imo these template files are wrong and should be cleaned up.


    gromacs-openmpi is false positive. The empty /usr/bin results from bugs
    451991/452047.

    Best regards
    Manuel

    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.6 (GNU/Linux)

    iD8DBQBHQ+xN8WlhyMyNeVcRAh//AJ0dRjQyNbdAlEO9z0mISWiX7nzQzgCeLtC8
    QiuZRiyhN/cKv1Og29BnB5U=
    =aWRO
    -----END PGP SIGNATURE-----


  9. Re: Packages with empty directories

    Hi,

    Le mercredi 21 novembre 2007 05:20 +0100, Michael Biebl a crit :
    > Imho adding a lintian check for empty /usr/bin, /usr/sbin, /usr/lib and
    > /usr/include directories (as created by dh-make) would be a good start.


    Maybe we could check for empty directories except for a number of common
    false positives (like the python-support directories or /var/games), and
    for the rest, grep in the maintainer scripts.

    --
    .''`.
    : :' : We are debian.org. Lower your prices, surrender your code.
    `. `' We will add your hardware and software distinctiveness to
    `- our own. Resistance is futile.

    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.6 (GNU/Linux)

    iD8DBQBHQ/WcrSla4ddfhTMRAphlAJ9hwJalRq8cCsXc2S6IGca1Xh8BQwCg 961L
    EzBDYYgS3dVm3hCi9Zt2S30=
    =G22N
    -----END PGP SIGNATURE-----


  10. Re: Packages with empty directories

    * Josselin Mouette [071121 10:08]:
    > Maybe we could check for empty directories except for a number of common
    > false positives (like the python-support directories or /var/games), and
    > for the rest, grep in the maintainer scripts.


    And menu-methods (which cause a lot of false-positives on that list),
    and possible many more...

    Hochachtungsvoll,
    Bernhard R. Link


    --
    To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
    with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

  11. Re: Packages with empty directories

    Josselin Mouette wrote:
    > Maybe we could check for empty directories except for a number of common
    > false positives (like the python-support directories or /var/games), and
    > for the rest, grep in the maintainer scripts.
    >


    zope-common needs /var/lib/zope and the Zope packages come with somthing
    matched by /var/lib/zope[0-9.]+

    --
    Bernd Zeimetz



    --
    To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
    with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

  12. Re: Packages with empty directories

    On Tuesday 20 November 2007 11:20:17 pm Michael Biebl wrote:
    > Imho adding a lintian check for empty /usr/bin, /usr/sbin, /usr/lib and
    > /usr/include directories (as created by dh-make) would be a good start.


    I wrote a lintian check implementing the conservative approach, and submitted
    a patch as bug #452316. It lists empty directories matching directories from
    base-files, as well as any empty subdirectories of
    /usr/include, /usr/share/man, and some others where they clearly make no
    sense.
    --
    Daniel Schepler


    --
    To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
    with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

  13. Bug#452316: Packages with empty directories

    Daniel Schepler wrote:
    > On Tuesday 20 November 2007 11:20:17 pm Michael Biebl wrote:
    >> Imho adding a lintian check for empty /usr/bin, /usr/sbin, /usr/lib and
    >> /usr/include directories (as created by dh-make) would be a good start.

    >
    > I wrote a lintian check implementing the conservative approach, and submitted
    > a patch as bug #452316. It lists empty directories matching directories from
    > base-files, as well as any empty subdirectories of
    > /usr/include, /usr/share/man, and some others where they clearly make no
    > sense.


    The only problem with the patch is that /usr/lib/perl5/ is often
    included just by creating a perl package. I've tried to get rid of it
    but it *is* created during 'make install' by use ExtUtils::MakeMaker;
    but it is not necessarily used by package files. Another problem is that
    the creation of the directory often doesn't show up in the build log - I
    can force it by running make install without sudo or a prefix:

    Warning: You do not have permissions to install into
    /usr/local/lib/perl/5.8.8 at /usr/share/perl/5.8/ExtUtils/Install.pm
    line 114.
    mkdir /usr/local/share/perl/5.8.8/XML: Permission denied at
    /usr/share/perl/5.8/ExtUtils/Install.pm line 176

    It seems that ExtUtils::MakeMaker insists on using both /usr/lib/perl5
    and /usr/share/perl5 whether the module itself uses them or not.

    Maybe someone from the Debian Perl group can show me where I'm going
    wrong or maybe CDBS can check for empty directories but everytime I
    remove debian/tmp/usr/lib/perl5, it gets recreated, despite not having
    any mention of it in the package files.

    --


    Neil Williams
    =============
    http://www.data-freedom.org/
    http://www.nosoftwarepatents.com/
    http://www.linux.codehelp.co.uk/



    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.6 (GNU/Linux)
    Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

    iD8DBQFHRML1iAEJSii8s+MRAm8DAJ96TC9XbyvAq8F6FOx9MM 8OR1zShgCfbK/h
    8sohsbu/R2yEyJ6LNhynGpk=
    =illp
    -----END PGP SIGNATURE-----


  14. Bug#452316: Packages with empty directories

    Neil Williams writes:

    > The only problem with the patch is that /usr/lib/perl5/ is often
    > included just by creating a perl package. I've tried to get rid of it
    > but it *is* created during 'make install' by use ExtUtils::MakeMaker;
    > but it is not necessarily used by package files. Another problem is that
    > the creation of the directory often doesn't show up in the build log - I
    > can force it by running make install without sudo or a prefix:
    >
    > Warning: You do not have permissions to install into
    > /usr/local/lib/perl/5.8.8 at /usr/share/perl/5.8/ExtUtils/Install.pm
    > line 114.
    > mkdir /usr/local/share/perl/5.8.8/XML: Permission denied at
    > /usr/share/perl/5.8/ExtUtils/Install.pm line 176
    >
    > It seems that ExtUtils::MakeMaker insists on using both /usr/lib/perl5
    > and /usr/share/perl5 whether the module itself uses them or not.


    Currently you have to remove the empty directory yourself in debian/rules
    after running make install. It's one of the standard things that we do
    for Perl packages. It would be nice to fix ExtUtils::MakeMaker to not
    create it in the first place, but so far as I know, no one has written a
    patch.

    --
    Russ Allbery (rra@debian.org)



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

  15. Re: Packages with empty directories

    Le mercredi 21 novembre 2007 14:08 -0500, Daniel Schepler a crit :
    > Some of the common false positives are /var/lib/ or /etc/, or
    > subdirectories under one of those. Since often doesn't match the
    > binary package name exactly, I don't see any easy way to detect these cases.


    What I'm suggesting is to grep for them in maintainer scripts. Any empty
    directory created in /etc and which isn't used in the maintainer scripts
    is likely to be a mistake.

    OTOH, subdirectories of /var/lib, /var/log and /var/cache look like good
    candidates for exclusion.

    --
    .''`.
    : :' : We are debian.org. Lower your prices, surrender your code.
    `. `' We will add your hardware and software distinctiveness to
    `- our own. Resistance is futile.

    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.6 (GNU/Linux)

    iD8DBQBHRW5GrSla4ddfhTMRAmEMAKDm0DpIv2/YDekOxN8F1oAAMWZxJgCeO0+Y
    NC+gaiA0HV4UA2D1C104zJE=
    =tY3k
    -----END PGP SIGNATURE-----


  16. Re: Packages with empty directories

    On Thu, Nov 22, 2007 at 12:55:50PM +0100, Josselin Mouette wrote:

    > What I'm suggesting is to grep for them in maintainer scripts. Any empty
    > directory created in /etc and which isn't used in the maintainer scripts
    > is likely to be a mistake.


    You'd need to check binaries as well - quite a few things use conf.d
    style configuration.

    --
    "You grabbed my hand and we fell into it, like a daydream - or a fever."

    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.6 (GNU/Linux)

    iQCVAwUBR0XVFw2erOLNe+68AQKMqQP+IrbIHg1o/GPvORc8aLeL4+ncWZwXUOV5
    yDgcguITy3Mca+SA2kbYczw4JMMDX7jT+td3XImp/Nk+0KIANsBps+s+CJXIu7yq
    AvKSQDRc2s506Kp/Rz27z2m5d7BTSuK0tVBbBpwh/PdUgON0mBFai09JyoRUXKF0
    AdDckP0xz98=
    =b2iU
    -----END PGP SIGNATURE-----


+ Reply to Thread