[ANNOUNCE] dh_splitpackage 0.2.2

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[ANNOUNCE] dh_splitpackage 0.2.2

Zygmunt Krynicki-4
Hello everyone.

I'd like to announce a new version of dh_splitpackage.

This version improves documentation to a point where it's rather easy to
get started and use this helper while packaging. A new manual page has
been created with tool description documentation of all the command line
options, configuration file schema, pattern matching extensions and many
examples.

Some additional changes to the actual script made it possible to build
and work on Ubuntu Lucid 10.04 LTS. An Ubuntu PPA with this script is
now available at [1]. In addition to this, a launchpad project has been
registered to simplify development [2]. Finally the source tarball for
the release has been uploaded to pypi [3].

(a copy of the initial announcement)

I wrote dh_splitpackage, a helper script that unambiguously splits the
files of a binary package into multiple packages based on a
configuration file.

The configuration file may point the primary package (the one that gets
leftover files by default) as well as any number of additional packages
with any number of inclusion and exclusion patterns.

The new script can be called instead of dh_install (assuming all the
files you are interested in are already in debian/tmp/) or afterwards.

The biggest advantage compared to existing tools is clear and
not-that-error-prone classification of files to packages. Any file that
would be classified to more than one package (hitting patterns in both
files) is clearly reported and prevents the package from building
properly.  In addition running the script displays each file from
debian/tmp and the package it was classified to.

Using this script could greatly simplify many packages that currently
rely on numerous *.install files and custom dh_install overrides in
debian/rules.

Best regards
Zygmunt Krynicki

[1]: https://launchpad.net/~zkrynicki/+archive/dh-splitpackage
[2]: http://launchpad.net/dh-splitpackage
[3]: http://pypi.python.org/pypi/dh_splitpackage/

--
ubuntu-devel mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel
Reply | Threaded
Open this post in threaded view
|

Re: [ANNOUNCE] dh_splitpackage 0.2.2

Benjamin Drung-4
Am Samstag, den 04.06.2011, 20:46 +0200 schrieb Zygmunt Krynicki:
> The new script can be called instead of dh_install (assuming all the
> files you are interested in are already in debian/tmp/) or afterwards.

I looked at the man page of dh_splitpackage and compared it to
"dh_install --fail-missing". I found three differences. Please let me
know if there were more.

1. dh_splitpackage complains if a file ends up in more than one binary
package. Having the same file in two binary package leads to a conflict
if you want to install both binary packages. IMO dh_install should do
this check too.

2. dh_splitpackage put files in the primary package if no other install
destination is specified. I would love to see a command line option for
dh_install that does the same. For example, I want to call "dh_install
--put-everything-else-in=vlc-nox" for the daily builds of vlc.

3. dh_splitpackage supports more pattern than dh_install. To name them:
** for matching all directories, [] to match as specific set of
characters. I could live without that, but ** would be nice sometimes.

I think that dh_install could be improved to support all three points
above.

The features of dh_splitpackage are great, but the configuration format
(JSON) seems to be too complex for this use case.

--
Benjamin Drung
Debian & Ubuntu Developer

--
ubuntu-devel mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel

signature.asc (853 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [ANNOUNCE] dh_splitpackage 0.2.2

Zygmunt Krynicki-4
W dniu 04.06.2011 21:59, Benjamin Drung pisze:
> Am Samstag, den 04.06.2011, 20:46 +0200 schrieb Zygmunt Krynicki:
>> The new script can be called instead of dh_install (assuming all the
>> files you are interested in are already in debian/tmp/) or afterwards.
>
> I looked at the man page of dh_splitpackage and compared it to
> "dh_install --fail-missing". I found three differences. Please let me
> know if there were more.

There are two more differences:

1) dh_install is much more generic, dh_splitpackage cannot install files
from source directory. Only from debian/tmp. This is by design to keep
the same experience for developers and to focus the tool on only one thing.

2) dh_install reads multiple configuration files and is also used
directly in custom deban/rules overrides. dh_splitpackage is usable in
only one way, via a configuration file. The intent for this is the same
as above, to simplify the developer experience. It also limits the
number of configuration files that you need to create to one per source
package.

> 1. dh_splitpackage complains if a file ends up in more than one binary
> package. Having the same file in two binary package leads to a conflict
> if you want to install both binary packages. IMO dh_install should do
> this check too.
>
> 2. dh_splitpackage put files in the primary package if no other install
> destination is specified. I would love to see a command line option for
> dh_install that does the same. For example, I want to call "dh_install
> --put-everything-else-in=vlc-nox" for the daily builds of vlc.

It only does this when explicitly requested by setting primary_package
in the configuration file. By default it just silently ignores those
files (silently as in not breaking the build, the build log indicates
this when printing pathname classification).

I can see it would be sensible to warn the packager that primary_package
was not specified and some pathnames were not classified. I'll add this
to next release.

> 3. dh_splitpackage supports more pattern than dh_install. To name them:
> ** for matching all directories, [] to match as specific set of
> characters. I could live without that, but ** would be nice sometimes.
>
> I think that dh_install could be improved to support all three points
> above.

I would like to see that as well. I asked debhelper maintainer to have a
look at my helper and see what we can do.

> The features of dh_splitpackage are great, but the configuration format
> (JSON) seems to be too complex for this use case.

JSON was my initial attempt as I love it very much and is the best
general-purpose tree-like format that is still very easy to work with.
After looking at the examples I wrote I still like it but I see the
problem it could pose to packagers.

I could augment/replace the JSON format with a simple ini-style format.
Fortunately the configuration is very simple and could be mapped almost
directly.

$ cat debian/splitpackage
# Global configuration goes first.
# Here you can set the primary package
primary_package=libfoo

# Hypothetical new option that warns the packager
# when files are left unclassified. Possible options:
# ignore, fail.
leftover_files=ignore

# Classifiers for libfoo-dev. Pick up all the header files,
# libtool files, and static libraries
[libfoo-dev]
include=**/*.h
include=**/*.la
include=**/*.a
# Just for demonstration, never pick any shared objects
exclude=**/*.so

[libfoo]
# Everything is automatically
# assigned by default thanks to
# primary_package in the global
# section.

Best regards
Zygmunt Krynicki

--
ubuntu-devel mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel