• Re: Installing a debian file

    From tomas@tuxteam.de@21:1/5 to Michael on Thu Jan 30 15:40:02 2025
    On Thu, Jan 30, 2025 at 02:22:44PM +0000, Michael wrote:
    I installed a debian file (db1'say) using dpkg -i and an executable file
    (ex1 say) was created.

    Later another debian file (db2) was installed, overwriting the executable ex1.

    This shouldn't happen in a correctly built Debian package.

    There is actually a mechanism dedicated to the case whether one
    package wants to override files from another:

    https://www.debian.org/doc/debian-policy/ap-pkg-diversions.html

    So the way you describe it, there must be something wrong with your
    packages "db1" and "db2".

    Cheers
    --
    t

    -----BEGIN PGP SIGNATURE-----

    iF0EABECAB0WIQRp53liolZD6iXhAoIFyCz1etHaRgUCZ5uM5QAKCRAFyCz1etHa RjtXAJ4qIORVhg4FxdMyQMips7Dbird+cQCfQpRMPTZQzXWPV7GgwREHbvfLnSM=
    =fq26
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Andrew M.A. Cater@21:1/5 to Michael on Thu Jan 30 16:10:02 2025
    On Thu, Jan 30, 2025 at 02:22:44PM +0000, Michael wrote:
    I installed a debian file (db1'say) using dpkg -i and an executable file
    (ex1 say) was created.


    Hi Michael,

    Can we have some specifics? Version of Debian, name of executables,
    whether one came from outside main Debian repository, please.

    As an aside - if you install a random package with dpkg -i, I'm not
    sure how that might affect the package database if other packages
    have been installed using apt, for example.

    Much better to use apt - at this stage of development, dpkg really is
    *very* low-level and not expected as a normal user-level command.

    As Tomas has written, Debian is usually fairly careful to make
    packages work well with each other so that they don't conflict and
    certainly don't overwrite each others' configuration without serious
    warnings.

    Later another debian file (db2) was installed, overwriting the executable ex1.

    I now wish to overwrite ex1 with the data in db1, so I tried to install db1 again, but nothing seemed to happen.


    *Exactly* what do you want to do? Can you explain in more detail what
    you want the end result to be? If you want to install one program, use it
    to write some data and then want to use another program instead, consider saving off the data to a file and importing that into the second program.

    "Nothing seemed to happen" - did you use any of the package management
    tools to check which packages appeared to install and which configuration
    files were present?

    Did nothing happen because db1 had already been installed ?


    Without further and better information, nobody can know.
    If you've got two programs which appear to conflict, it is quite useful
    to uninstall both of them and purge the config files before trying to
    install one of them again:.

    apt remove [packagename1] ; apt purge [packagename1]

    apt remove [packagename2] ; apt purge [packagename2]

    Do I need to completely uninstall db1 by using

    dpkg --purge db1

    before I can install db1 again and overwrite ex1 with data from db1 ?

    Yes, possibly, but we need more information.

    The FAQ for this mailing list requests that people give us details on packages, commands that they've run and output and results for a reason: unfortunately, we can't sit on your shoulder and observe exactly what's going on and what
    you see :)

    All the very best, as ever,

    Andy
    (amacater@debian.org)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From tomas@tuxteam.de@21:1/5 to Michael on Thu Jan 30 17:30:01 2025
    On Thu, Jan 30, 2025 at 04:14:00PM +0000, Michael wrote:
    Thanks very much for your help and suggestions.

    I am running Debian 12 on a desktop.

    My aim is to set up and use a TOTP authenticator app called Ente Auth.

    I ran, as root :-

    dpkg -i ente-auth-v4.2.8-x86_64.deb

    [...]

    dpkg -i ente-auth-v4.3.1-x86_64.deb

    I don't know who packaged this, but at least they don't seem to
    know how to make a Debian package. The names seem to suggest
    different versions of the "same" package, but as far as Debian
    is concerned, they are just totally different packages.

    See here [1] for how Debian packages are supposed to be named.
    In short, <package>_<version>_<architecture>.deb, separated
    by underscores.

    Possibly, ente-auth_v4.2.8_x86_64.deb might be a good package
    name (but we don't know what on earth is *in* those things, that
    might be as wrong as the name!)

    A newer version will replace the older version's files. In your
    case, if you try to install the second one...

    This should overwrite the previous executable enteauth.

    ...and it tries to overwrite files installed by the first one,
    you *should* have got an error message from dpkg. Did you?

    Cheers

    [1] https://www.debian.org/doc/manuals/debian-faq/pkg-basics.en.html#pkgname
    --
    t

    -----BEGIN PGP SIGNATURE-----

    iF0EABECAB0WIQRp53liolZD6iXhAoIFyCz1etHaRgUCZ5uoJgAKCRAFyCz1etHa RgOiAJ4/lunQmsF4i3zs7faQsqPINchChQCfROFXPpT5rLnTGwtjWxyMjuK/OpY=
    =pHT4
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Greg Wooledge@21:1/5 to David Wright on Thu Jan 30 20:30:02 2025
    On Thu, Jan 30, 2025 at 11:01:02 -0600, David Wright wrote:
    On Thu 30 Jan 2025 at 16:14:00 (+0000), Michael wrote:
    So I downloaded the new .deb file and installed it (again using root) :-

    dpkg -i ente-auth-v4.3.1-x86_64.deb

    I would purge the old package (first backing up any of /your/
    files involved). I think the package is called enteauth.

    Eeek! If the package name isn't "ente-auth-v4.3.1" then they've
    seriously messed around with expectations. Granted, we already saw
    that with the "x86_64" instead of "amd64" as the arch.

    At this point, it would be a really good idea to *confirm* the name of
    the package. "dpkg -l ente\*" or similar should suffice.

    Once you know the name of the package, then you can decide how to
    proceed.

    * If the package name really is "enteauth" or "ente-auth" without a
    version number inside it, then installing the second .deb package
    should have replaced the original.

    * If the packge name is "ente-auth-v4.3.1" or similar, with a version
    number in it, then you may have *both* versions installed at the
    same time, either conflicting with each other, or not. In that case,
    the best thing to do at this point would be to purge both, and then
    install whichever one you want.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From tomas@tuxteam.de@21:1/5 to Michael on Thu Jan 30 20:40:01 2025
    On Thu, Jan 30, 2025 at 04:42:02PM +0000, Michael wrote:
    The deb names may be unconventional but the executables worked (at least v4.2.8 worked).

    They are IMHO wrong, since they quite probably will end up as *different packages* instead of as *different versions of a package*.

    If you just install one, you won't notice a difference; if you install
    one "over" the other (and this is what you are doing!), you will.

    Cheers
    --
    t

    -----BEGIN PGP SIGNATURE-----

    iF0EABECAB0WIQRp53liolZD6iXhAoIFyCz1etHaRgUCZ5vTugAKCRAFyCz1etHa RmZyAJ0ZoeZyfIS014Lcvu+T4+9g8FRlJwCfVy2qrQL1Nd0uRLJZ2Yb2rn6yNUQ=
    =cvCs
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From David Wright@21:1/5 to Michael on Thu Jan 30 20:20:01 2025
    On Thu 30 Jan 2025 at 16:14:00 (+0000), Michael wrote:
    I ran, as root :-

    dpkg -i ente-auth-v4.2.8-x86_64.deb

    Running apt install path-to/ente-auth-v4.2.8-x86_64.deb
    will check for dependencies etc. (You must include the path.)
    It will also log a record of what was installed or removed
    on the system, ie APT records history, whereas dpkg lives
    entirely in the present.

    So I downloaded the new .deb file and installed it (again using root) :-

    dpkg -i ente-auth-v4.3.1-x86_64.deb

    I would purge the old package (first backing up any of /your/
    files involved). I think the package is called enteauth.

    # apt -s purge enteauth

    Test it first with the -s (simulate).

    Unfortunately I did not think to run any Debian package commands to check
    on the status of the v4.2.8 or v4.3.1 files.

    It's never too late. Do it now.

    $ dpkg -l | less

    and search for ente in the first instance. You'll get
    plenty of false hits, of course.

    My latest thought is to uninstall the v4.2.8 data by running as root :-

    dpkg --purge ente-auth-v4.2.8-x86_64.deb

    You use the package name here, not the .deb filename.

    and then reinstall the v4.2.8 deb file by again running as root :-

    dpkg -i ente-auth-v4.2.8-x86_64.deb

    to recreate the executable enteauth for v4.2.8

    As above, use apt (and again, you can first test it with -s).

    Disclaimer: the above is just Debian technicalities.
    I don't know anything about what the package does.

    Cheers,
    David.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From David Wright@21:1/5 to Greg Wooledge on Thu Jan 30 22:20:01 2025
    On Thu 30 Jan 2025 at 14:27:28 (-0500), Greg Wooledge wrote:
    On Thu, Jan 30, 2025 at 11:01:02 -0600, David Wright wrote:
    On Thu 30 Jan 2025 at 16:14:00 (+0000), Michael wrote:
    So I downloaded the new .deb file and installed it (again using root) :-

    dpkg -i ente-auth-v4.3.1-x86_64.deb

    I would purge the old package (first backing up any of /your/
    files involved). I think the package is called enteauth.

    Eeek! If the package name isn't "ente-auth-v4.3.1" then they've
    seriously messed around with expectations. Granted, we already saw
    that with the "x86_64" instead of "amd64" as the arch.

    At this point, it would be a really good idea to *confirm* the name of
    the package. "dpkg -l ente\*" or similar should suffice.

    Once you know the name of the package, then you can decide how to
    proceed.

    Rather than risk installing the download, I merely did:

    $ ls -Glg ente-auth-v4.3.2-x86_64.deb
    -rw-r--r-- 1 16583244 Jan 28 04:56 ente-auth-v4.3.2-x86_64.deb
    $ md5sum ente-auth-v4.3.2-x86_64.deb
    1428236e1468fc9547b2dacb96a2f5cb ente-auth-v4.3.2-x86_64.deb
    $ ar x ente-auth-v4.3.2-x86_64.deb control.tar.xz
    $ tar -x -f control.tar.xz -J ./control
    $ cat control
    Maintainer: Ente.io Developers <auth@ente.io>
    Package: enteauth
    Version: 4.3.2
    Section: x11
    Priority: optional
    Architecture: amd64
    Essential: no
    Installed-Size: 36000
    Description: ente two-factor authenticator
    Depends: libsqlite3-0, libsodium23, libsecret-1-0, libappindicator3-1 | libayatana-appindicator3-1, gir1.2-appindicator3-0.1 | gir1.2-ayatanaappindicator3-0.1, libayatana-ido3-0.4-0
    $

    AFAICT, ente-auth-v4.2.8-x86_64.deb is no longer downloadable.

    * If the package name really is "enteauth" or "ente-auth" without a
    version number inside it, then installing the second .deb package
    should have replaced the original.

    I assumed the upgrade process may have worked, just not the resulting
    binary. OTOH, downgrading it would have required forcing, so that
    didn't happen.

    * If the packge name is "ente-auth-v4.3.1" or similar, with a version
    number in it, then you may have *both* versions installed at the
    same time, either conflicting with each other, or not. In that case,
    the best thing to do at this point would be to purge both, and then
    install whichever one you want.

    Cheers,
    David.

    [my posts have been taking 2-3 hours today to be sent anywhere.]

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