• how to remove old conffile when switching to ucf

    From PICCA Frederic-Emmanuel@21:1/5 to All on Wed May 28 10:10:01 2025
    Hello, I am updating the jupyterhub package in order to switch to ucf for the configuration part.

    when I install the new packages, I get these error message (sorry for the french).

    it means, I can not remove non empty directory

    picca@page:~/debian/python-team/packages/jupyterhub$ sudo debi ../jupyterhub_5.2.1+ds1-4_multi.changes
    (Lecture de la base de données... 467901 fichiers et répertoires déjà installés.)
    Préparation du dépaquetage de jupyterhub_5.2.1+ds1-4_all.deb ...
    Dépaquetage de jupyterhub (5.2.1+ds1-4) sur (5.2.1+ds1-3) ...
    dpkg: avertissement: impossible de supprimer l'ancien répertoire « /etc/jupyterhub/config/jupyterhub_config.d » : Le dossier n'est pas vide
    dpkg: avertissement: impossible de supprimer l'ancien répertoire « /etc/jupyterhub/config » : Le dossier n'est pas vide
    dpkg: avertissement: impossible de supprimer l'ancien répertoire « /etc/jupyterhub » : Le dossier n'est pas vide
    Paramétrage de jupyterhub (5.2.1+ds1-4) ...
    Replacing config file /etc/jupyterhub/jupyterhub_config.py with new version Traitement des actions différées (« triggers ») pour man-db (2.13.1-1) ...

    In fact these directory contain the conf file of the previous package.

    /etc/jupyterhub/config/jupyterhub_config.d/50-use-configurable-http-proxy.py /etc/jupyterhub/config/jupyterhub_config.d/config.yaml /var/lib/dpkg/info/jupyterhub.conffiles (END)


    what is the right way to remove this during the upgrade ?


    thanks for your help

    Fred

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lorenzo@21:1/5 to All on Wed May 28 11:00:01 2025
    Hi,

    On Wed, 28 May 2025 09:45:37 +0200 (CEST)
    PICCA Frederic-Emmanuel <[email protected]>
    wrote:

    Hello, I am updating the jupyterhub package in order to switch to ucf
    for the configuration part.

    I'm not sure what that means exactly: are you installing some files
    below /usr/ to then deploy as conffile with ucf below /etc, but in a
    different path than /etc/jupyterhub/config/jupyterhub_config.d/
    ?


    when I install the new packages, I get these error message (sorry for
    the french).

    it means, I can not remove non empty directory


    In fact these directory contain the conf file of the previous package.

    /etc/jupyterhub/config/jupyterhub_config.d/50-use-configurable-http-proxy.py /etc/jupyterhub/config/jupyterhub_config.d/config.yaml /var/lib/dpkg/info/jupyterhub.conffiles (END)


    what is the right way to remove this during the upgrade ?

    There is dpkg-maintscript-helper, maybe it helps https://manpages.debian.org/unstable/dpkg/dpkg-maintscript-helper.1.en.html

    Lorenzo



    thanks for your help

    Fred


    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From PICCA Frederic-Emmanuel@21:1/5 to All on Wed May 28 11:40:01 2025
    Ok, with rm_conffile I have no more old config file, but the empty directory are remaining.

    I need to do something else in order to remove the now obsolète directory ?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From PICCA Frederic-Emmanuel@21:1/5 to All on Wed May 28 11:20:01 2025
    ----- Le 28 Mai 25, à 10:49, Lorenzo [email protected] a écrit :

    Hi,

    On Wed, 28 May 2025 09:45:37 +0200 (CEST)
    PICCA Frederic-Emmanuel <[email protected]> wrote:

    Hello, I am updating the jupyterhub package in order to switch to ucf
    for the configuration part.

    I'm not sure what that means exactly: are you installing some files
    below /usr/ to then deploy as conffile with ucf below /etc, but in a different path than /etc/jupyterhub/config/jupyterhub_config.d/
    ?


    In fact the previous packages had different config file which was not working at all... (very old system not taking into account anymore).
    So I need to remove them completly and install the new config file.

    There is dpkg-maintscript-helper, maybe it helps https://manpages.debian.org/unstable/dpkg/dpkg-maintscript-helper.1.en.html


    Thanks a lot

    Fred

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From PICCA Frederic-Emmanuel@21:1/5 to All on Wed May 28 15:30:01 2025
    I'm not sure what that means exactly: are you installing some files
    below /usr/ to then deploy as conffile with ucf below /etc, but in a different path than /etc/jupyterhub/config/jupyterhub_config.d/
    ?

    I think I forgot to answer this question...

    In a previous package the /etc/jupyterhub/jupyterhub_config.py was generated during the preinst script.
    two more useless configuration files were distributes in the package

    /etc/jupyterhub/config/jupyterhub_config.d/<file1> /etc/jupyterhub/config/jupyterhub_config.d/<file2>


    Now I generate the default configure file during the build put it under /usr/share/jupyterhub/jupytherhub_config.py and manage it via ucf.

    remove the useless <file1> and <file2> via the rm_conffile.

    but at the end, piuparts tell me that

    2m59.4s INFO: Warning: Package purging left files on system:
    /etc/jupyterhub/ owned by: jupyterhub
    /etc/jupyterhub/config/ not owned
    /etc/jupyterhub/config/jupyterhub_config.d/ not owned
    2m59.4s INFO: PASS: Installation, upgrade and purging tests.

    /etc/jupyterhub comes from debian/dirs in order to avoid failure during the ucf config file generation.

    So now I need the right way to remove

    /etc/jupyterhub/config/jupyterhub_config.d/

    and

    /etc/jupyterhub/config/

    Is it clearer ?

    Cheers

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)