One vs. many -src packages for my project? - Debian

This is a discussion on One vs. many -src packages for my project? - Debian ; I have an odd packaging situation, and was hoping someone could tell me the best practice for this situation... I've been asked to take an existing project and package it for use with APT. The project consists of many libraries ...

+ Reply to Thread
Results 1 to 4 of 4

Thread: One vs. many -src packages for my project?

  1. One vs. many -src packages for my project?

    I have an odd packaging situation, and was hoping someone could tell
    me the best practice for this situation...

    I've been asked to take an existing project and package it for use
    with APT. The project consists of many libraries and applications.

    I was thinking to produce a different source package for each library
    and application.

    My concern is that our makefiles are hierarchial: each library and app
    has its own makefile, but those makefiles pull in some "utility"
    makefiles at the higher level:

    myproj/make-functions1.mk
    myproj/make-functions2.mk
    myproj/Makefile <-- just calls 'make' on each subdirectory's makefile
    myproj/libraryA/Makefile <-- uses ../make-functions{1,2}.mk
    myproj/libraryB/Makefile <-- uses ../make-functions{1,2}.mk
    myproj/appC/Makefile <-- uses ../make-functions{1,2}.mk

    So there's some overlap: both "libraryA-src.deb" and
    "libraryB-src.deb" need to have "make-funtions{1,2}.mk" installed as
    well.

    I could create Yet Another Source Package, "myproject-common-src.deb",
    that contains *only* those files that are in common. I.e., it would
    only contain "make-functions{1,2}.mk" and perhaps the top-level
    Makefile. Then package like "libraryA-src.deb" could have a package
    dependency on myproject-common-src.deb.

    Is this just too goofy of an approach? Should I bit the bullet and
    make the whole entire project contains just three packages?
    (myproject.deb, myproject-dev.deb, and myproject-src.deb) ?

    Thanks,
    Christian


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

  2. Re: One vs. many -src packages for my project?

    On Mon, Jun 18, 2007 at 04:28:09PM -0400, Christian Convey wrote:
    > I could create Yet Another Source Package, "myproject-common-src.deb",
    > that contains *only* those files that are in common. I.e., it would
    > only contain "make-functions{1,2}.mk" and perhaps the top-level
    > Makefile. Then package like "libraryA-src.deb" could have a package
    > dependency on myproject-common-src.deb.


    You could also just copy the file to the different source packages
    when releasing the source, no? Or are they so big and are there so
    many packages that will use them?

    > Is this just too goofy of an approach? Should I bit the bullet and
    > make the whole entire project contains just three packages?
    > (myproject.deb, myproject-dev.deb, and myproject-src.deb) ?


    The biggest problem of this approach (IMHO) is that you only can
    update them all at once. You need to increase the version number of
    every binary package built from the source even though only one of
    them might really have been changed. So it is generally a good idea
    to modularize ones source packages (see e.g. X.org)

    Gruesse,
    --
    Frank Lichtenheld
    www: http://www.djpig.de/


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

  3. Re: One vs. many -src packages for my project?

    On 6/18/07, Frank Lichtenheld wrote:
    > On Mon, Jun 18, 2007 at 04:28:09PM -0400, Christian Convey wrote:
    > > I could create Yet Another Source Package, "myproject-common-src.deb",
    > > that contains *only* those files that are in common. I.e., it would
    > > only contain "make-functions{1,2}.mk" and perhaps the top-level
    > > Makefile. Then package like "libraryA-src.deb" could have a package
    > > dependency on myproject-common-src.deb.

    >
    > You could also just copy the file to the different source packages
    > when releasing the source, no? Or are they so big and are there so
    > many packages that will use them?


    I'm not dealing with very big sets of files at all. But they're
    broken out into 21 libraries and 18 application programs. So if I
    package them separately it's a whole lot of writing of control files,
    changelogs, etc.

    Are you suggesting that each subproject (libraryA, libraryB, etc.)
    has, in its own source directory, a clone of the file
    "make-functions{1,2}.mk" ?

    I guess that would be somewhat OK, but it makes me a little
    uncomfortable to clone files like that. I wouldn't want to do that in
    my own svn repository, because I don't want to maintain multiple
    copies of what should be an identical file.

    I guess I could keep just one copy in svn, and have my debian
    packaging scripts copy it out to each subdirectory just prior to
    packaging. But then I'd also have to, at packaging time, modify each
    sub-project's Makefile so that it looked for make-functions1.mk in the
    current directory rather than the parent directory. So now I'm
    starting to look at a build process for my packaged source code that's
    a little different than the process for building the code when I get
    it right out of svn. And that seems kind of like a bad idea.

    >
    > > Is this just too goofy of an approach? Should I bit the bullet and
    > > make the whole entire project contains just three packages?
    > > (myproject.deb, myproject-dev.deb, and myproject-src.deb) ?

    >
    > The biggest problem of this approach (IMHO) is that you only can
    > update them all at once. You need to increase the version number of
    > every binary package built from the source even though only one of
    > them might really have been changed. So it is generally a good idea
    > to modularize ones source packages (see e.g. X.org)
    >


    My thinking was, "If there's not much overhead associated with having
    a bunch of little packages, then do it, because it offers independent
    versioning. Otherwise just lump them all together in a big package."


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

  4. Re: One vs. many -src packages for my project?

    Em Seg, 2007-06-18 *s 18:05 -0400, Christian Convey escreveu:
    > On 6/18/07, Frank Lichtenheld wrote:
    > > On Mon, Jun 18, 2007 at 04:28:09PM -0400, Christian Convey wrote:
    > > > I could create Yet Another Source Package, "myproject-common-src.deb",
    > > > that contains *only* those files that are in common. I.e., it would
    > > > only contain "make-functions{1,2}.mk" and perhaps the top-level
    > > > Makefile. Then package like "libraryA-src.deb" could have a package
    > > > dependency on myproject-common-src.deb.

    > >
    > > You could also just copy the file to the different source packages
    > > when releasing the source, no? Or are they so big and are there so
    > > many packages that will use them?

    >
    > I'm not dealing with very big sets of files at all. But they're
    > broken out into 21 libraries and 18 application programs. So if I
    > package them separately it's a whole lot of writing of control files,
    > changelogs, etc.
    >
    > Are you suggesting that each subproject (libraryA, libraryB, etc.)
    > has, in its own source directory, a clone of the file
    > "make-functions{1,2}.mk" ?
    >
    > I guess that would be somewhat OK, but it makes me a little
    > uncomfortable to clone files like that. I wouldn't want to do that in
    > my own svn repository, because I don't want to maintain multiple
    > copies of what should be an identical file.


    I think that making a small binary package with these makefiles and
    build-depending on them would be reasonable if you're making these
    packages for internal usage (I don't think the ftpmasters would like a
    package with two makefiles...)

    You would have to patch the sources to search for them in the right
    place, which is ok IMHO.

    --
    Gustavo R. Montesino
    http://grmontesino.blogspot.com


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

+ Reply to Thread