Split a package, rename an init file - Debian

This is a discussion on Split a package, rename an init file - Debian ; Hello, I'd like to split a package foo into 2 new packages : foo and foo-daemon. To do that I moved the daemon and the other obvious files with dh_install -pfoo-dameon. I used dh_installinit to install the init.d file to ...

+ Reply to Thread
Results 1 to 6 of 6

Thread: Split a package, rename an init file

  1. Split a package, rename an init file

    Hello,

    I'd like to split a package foo into 2 new packages : foo and
    foo-daemon. To do that I moved the daemon and the other obvious files
    with dh_install -pfoo-dameon. I used dh_installinit to install the
    init.d file to the foo-daemon package.

    Everything seems fine, but when I upgrade foo to the new foo+foo-daemon.
    I get 2 files in /etc/init.d/ :
    foo and foo-daemon.

    Here are my questions : what am I doing wrong ? How can I remove the
    /etc/init.d/foo unnecessary file ?

    Regards,
    Bertrand

    2 things : I'm an not on debian-devel, and in this case foo = fglrx-driver


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

  2. Re: Split a package, rename an init file

    Bertrand Marc wrote:
    > Hello,
    >
    > I'd like to split a package foo into 2 new packages : foo and
    > foo-daemon. To do that I moved the daemon and the other obvious files
    > with dh_install -pfoo-dameon. I used dh_installinit to install the
    > init.d file to the foo-daemon package.
    >
    > Here are my questions : what am I doing wrong ? How can I remove the
    > /etc/init.d/foo unnecessary file ?


    No, you can't just remove /etc/init.d/foo. It is a conffile and may be
    modified by admin. You should probably keep /etc/init.d/foo instead of
    renaming it foo-daemon.

    > 2 things : I'm an not on debian-devel, and in this case foo = fglrx-driver


    Will foo depend on foo-daemon? If yes, why are you splitting the package?

    - Adam


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

  3. Re: Split a package, rename an init file

    Thanks for your answers!

    So I guess the best way to do this is to split the package and use
    dh_installinit --name=foo

    This way I can provide the buggy binary daemon in a seperate package
    (recommended by foo), and keep the name of the conffiles.

    Do you think of something else?

    Regards,
    Bertrand


    Adam Majer a écrit :
    > Bertrand Marc wrote:
    >
    >> Hello,
    >>
    >> I'd like to split a package foo into 2 new packages : foo and
    >> foo-daemon. To do that I moved the daemon and the other obvious files
    >> with dh_install -pfoo-dameon. I used dh_installinit to install the
    >> init.d file to the foo-daemon package.
    >>
    >> Here are my questions : what am I doing wrong ? How can I remove the
    >> /etc/init.d/foo unnecessary file ?
    >>

    >
    > No, you can't just remove /etc/init.d/foo. It is a conffile and may be
    > modified by admin. You should probably keep /etc/init.d/foo instead of
    > renaming it foo-daemon.
    >
    >
    >> 2 things : I'm an not on debian-devel, and in this case foo = fglrx-driver
    >>

    >
    > Will foo depend on foo-daemon? If yes, why are you splitting the package?
    >
    > - Adam
    >
    >



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

  4. Re: Split a package, rename an init file

    In article <4829CC26.8080509@gmail.com> (gmane.linux.debian.devel.general) you wrote:
    > I'd like to split a package foo into 2 new packages : foo and
    > foo-daemon. To do that I moved the daemon and the other obvious files
    > with dh_install -pfoo-dameon. I used dh_installinit to install the
    > init.d file to the foo-daemon package.


    > Everything seems fine, but when I upgrade foo to the new foo+foo-daemon.


    dpkg does not remove orphaned conffiles.

    > I get 2 files in /etc/init.d/ :
    > foo and foo-daemon.


    > Here are my questions : what am I doing wrong ? How can I remove the
    > /etc/init.d/foo unnecessary file ?


    If it is not *really* necessary do not move the conffile from one
    package to another. If it must be, you'd need to do this in the
    maintainerscripts:

    If old conffile was not modified by the local admin, remove it,
    otherwise rename foo to foo-daemon before the package is unpacked. I
    think there is some example code using dpkg-query in wiki.d.o.
    cu andreas
    --
    `What a good friend you are to him, Dr. Maturin. His other friends are
    so grateful to you.'
    `I sew his ears on from time to time, sure'


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

  5. Re: Split a package, rename an init file

    On Tue, May 13, 2008 at 09:00:45PM +0200, Bertrand Marc wrote:
    > Thanks for your answers!
    >
    > So I guess the best way to do this is to split the package and use
    > dh_installinit --name=foo
    >
    > This way I can provide the buggy binary daemon in a seperate package
    > (recommended by foo), and keep the name of the conffiles.
    >

    I did something similar for the init script and defaults for shorewall.
    I turned shorewall into a dummy package, and then I had
    shorewall-common, shorewall-perl and shorewall-shell. The configuration
    files went into shorewall-common, but I kept the files named
    /etc/init.d/shorewall and /etc/default/shorewall.

    Regards,

    -Roberto

    --
    Roberto C. Sánchez
    http://people.connexer.com/~roberto
    http://www.connexer.com

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

    iD8DBQFIKe+V5SXWIKfIlGQRAg3TAJ91HBp0mcv+OLC7SAS6w6 qi73STawCgt5JI
    6uSt+FVis9Pl88Xgq8pHFtc=
    =Hm3U
    -----END PGP SIGNATURE-----


  6. Re: Split a package, rename an init file

    Bertrand Marc wrote:
    > Thanks for your answers!
    >
    > So I guess the best way to do this is to split the package and use
    > dh_installinit --name=foo
    >
    > This way I can provide the buggy binary daemon in a seperate package
    > (recommended by foo), and keep the name of the conffiles.
    >
    > Do you think of something else?


    So the fglrx driver works fine *without* the daemon?

    - Adam


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

+ Reply to Thread