I needed to install a version of sendmail from testing a while back to
test it.
On Mon, May 27, 2024 at 10:19:48AM -0400, Greg Wooledge wrote:
On Mon, May 27, 2024 at 09:56:54AM -0400, Michael Grant wrote:
I needed to install a version of sendmail from testing a while back to test it.
Your subject header says "bookworm stable". You don't install binary packages from testing on a stable system. You use backports instead.
ugh no, wait, I may be using the wrong terminology. I'm not wanting
to install special packages and definitely don't need to build my own.
What I want to do is get the system back to just using the packages
from stable rather than testing. Only those few packages before
things get worse in the next update. There's not many.
What's the best way to get back to running just the bookworm stableserver openssl sasl2-bin sendmail sendmail-base sendmail-bin sendmail-cf sensible-mda zstd
packages? I tried what I thought was the obvious way to fix this by
running:
# apt install -t=bookworm db-util db5.3-util libc-bin libc-dev-bin libc-devtools libc-l10n libc6 libc6-dev libdb5.3t64 libmilter1.0.1 libsasl2-2 libsasl2-modules libsasl2-modules-db libssl3t64 libzstd1 locales openssh-client openssh-server openssh-sftp-
I needed to install a version of sendmail from testing a while back to
test it.
# apt install -t=bookworm db-util db5.3-util libc-bin libc-dev-bin
From my experiences this doing so is still faster, than to setup a new system.
# apt install -t=bookworm db-util db5.3-util libc-bin libc-dev-bin
I can never remember exactly what `-t` really does, but I suspect you'll
need things like
apt install libc-bin/bookworm
# apt install -t=bookworm db-util db5.3-util libc-bin libc-dev-bin
I can never remember exactly what `-t` really does, but I suspect you'll
need things like
apt install libc-bin/bookworm
To install a single backported (or other release) package,
apt-get install packagename/releasename
and to install a backported package plus dependencies which
are also from that specific release, use
apt-get -t releasename packagename
[ … ]
so I thought I'd try the same process with db5.3, but removing db5.3
wants to remove a slew of packages:
# apt reinstall -s libdb5.3/bookworm
...
Selected version '5.3.28+dfsg2-1' (Debian:12.5/stable [amd64]) for 'libdb5.3' The following packages were automatically installed and are no longer required:
acl apache2-data apache2-utils augeas-lenses avahi-daemon clamav-base colord-data git-man gnupg-l10n gnupg-utils gpg-wks-server guile-3.0-libs ipp-usb libapr1 libaprutil1
libaprutil1-dbd-sqlite3 libaugeas0 libavahi-core7 libcolorhug2 libdaemon0 libexif12 libgphoto2-l10n libgphoto2-port12 libgudev-1.0-0 libgusb2 libhashkit2 libieee1284-3 libldap-common
liblua5.3-0 libnspr4 libnss-mdns libnss3 libopendbx1 libopendbx1-sqlite3 libopendkim11 libpoppler-glib8 libpoppler126 libpython2-stdlib libpython3.11 librbl1 librtmp1 libsane-common
libsnmp-base libsnmp40 libssh2-1 libvbr2 mailutils-common python2 python2-minimal python3-augeas sane-airscan update-inetd usb.ids
Use 'apt autoremove' to remove them
Is there some way to get apt to reinstall a package such that it does
not think it has to uninstall things which depend on it because it's
being immediatly reinstalled?
# apt install -t=bookworm db-util db5.3-util libc-bin libc-dev-bin
I can never remember exactly what `-t` really does, but I suspect you'll >> need things like
apt install libc-bin/bookworm
To install a single backported (or other release) package,
apt-get install packagename/releasename
and to install a backported package plus dependencies which
are also from that specific release, use
apt-get -t releasename packagename
But that's not the whole story of what `-t` does since the above does
not explain why his attempt to use `-t` to downgrade some packages
resulted in `apt` saying "<blabla> is already the newest version".
# apt install -t=bookworm db-util db5.3-util libc-bin libc-dev-bin
I can never remember exactly what `-t` really does, but I suspect you'll >>> need things like
apt install libc-bin/bookworm
To install a single backported (or other release) package,
apt-get install packagename/releasename
and to install a backported package plus dependencies which
are also from that specific release, use
apt-get -t releasename packagename
But that's not the whole story of what `-t` does since the above does
not explain why his attempt to use `-t` to downgrade some packages
resulted in `apt` saying "<blabla> is already the newest version".
so I thought I'd try the same process with db5.3, but removing db5.3
wants to remove a slew of packages:
# apt reinstall -s libdb5.3/bookworm
...
Selected version '5.3.28+dfsg2-1' (Debian:12.5/stable [amd64]) for 'libdb5.3' The following packages were automatically installed and are no longer required:
acl apache2-data apache2-utils augeas-lenses avahi-daemon clamav-base colord-data git-man gnupg-l10n gnupg-utils gpg-wks-server guile-3.0-libs ipp-usb libapr1 libaprutil1
libaprutil1-dbd-sqlite3 libaugeas0 libavahi-core7 libcolorhug2 libdaemon0 libexif12 libgphoto2-l10n libgphoto2-port12 libgudev-1.0-0 libgusb2 libhashkit2 libieee1284-3 libldap-common
liblua5.3-0 libnspr4 libnss-mdns libnss3 libopendbx1 libopendbx1-sqlite3 libopendkim11 libpoppler-glib8 libpoppler126 libpython2-stdlib libpython3.11 librbl1 librtmp1 libsane-common
libsnmp-base libsnmp40 libssh2-1 libvbr2 mailutils-common python2 python2-minimal python3-augeas sane-airscan update-inetd usb.ids
Use 'apt autoremove' to remove them
On 5/27/24 20:02, Stefan Monnier wrote:
# apt install -t=bookworm db-util db5.3-util libc-bin libc-dev-bin
I can never remember exactly what `-t` really does, but I suspect you'll
need things like
apt install libc-bin/bookworm
To install a single backported (or other release) package,
apt-get install packagename/releasename
and to install a backported package plus dependencies which
are also from that specific release, use
apt-get -t releasename packagename
But that's not the whole story of what `-t` does since the above does
not explain why his attempt to use `-t` to downgrade some packages
resulted in `apt` saying "<blabla> is already the newest version".
Sometimes '-t' works for me, and does what I expect, and sometimes
it doesn't.
So I generelly use now the explicit version:
apt install libc-bin=2.36-9+deb12u7
# apt install -t=bookworm db-util db5.3-util libc-bin libc-dev-bin
I can never remember exactly what `-t` really does, but I suspect you'll >> need things like
apt install libc-bin/bookworm
To install a single backported (or other release) package,
apt-get install packagename/releasename
and to install a backported package plus dependencies which
are also from that specific release, use
apt-get -t releasename packagename
But that's not the whole story of what `-t` does since the above does
not explain why his attempt to use `-t` to downgrade some packages
resulted in `apt` saying "<blabla> is already the newest version".
The following packages will be REMOVED:
[...] libdb5.3t64 [...]
So what did it say after that?
Is there some way to get apt to reinstall a package such that it does
not think it has to uninstall things which depend on it because it's
being immediatly reinstalled?
That is the idea behind reinstall, though downgrading is always
a test of its ability to succeed.
On Tue, May 28, 2024 at 06:59:50AM -0400, Greg Wooledge wrote:
On Tue, May 28, 2024 at 06:10:11AM -0400, Michael Grant wrote:
The following packages will be REMOVED:
[...] libdb5.3t64 [...]
You've *clearly* still got testing packages installed.
YES. As I originally said, I created this mess by installing sendmail
from testing. And then, a month or so later, I did an
apt-get upgrade (to do updates, not a full upgrade) which pulled in
some more things from testing. I'm trying to get back to all being
from stable.
On Mon, May 27, 2024 at 02:02:47PM -0400, Stefan Monnier wrote:
ISTR that "apt-get install <package>=<version>" will unconditionally
install <version> of <package>, if necessary pulling in dependencies.
But I've never tried it :-)
On Mon, May 27, 2024 at 12:59:34PM -0500, David Wright wrote:
So what did it say after that?
Sorry, here's the entire output of one of the tries:
[bottom /etc/mail #1168] apt install libdb5.3/bookworm db5.3-util/bookworm db-util/bookworm
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Selected version '5.3.28+dfsg2-1' (Debian:12.5/stable [amd64]) for 'libdb5.3' Selected version '5.3.28+dfsg2-1' (Debian:12.5/stable [amd64]) for 'db5.3-util'
Selected version '5.3.2' (Debian:12.5/stable [all]) for 'db-util'
The following packages were automatically installed and are no longer required:
acl apache2-data apache2-utils augeas-lenses avahi-daemon clamav-base colord-data git-man gnupg-l10n gnupg-utils gpg-wks-server guile-3.0-libs ipp-usb libapr1 libaprutil1
libaprutil1-dbd-sqlite3 libaugeas0 libavahi-core7 libcolorhug2 libdaemon0 libexif12 libgphoto2-l10n libgphoto2-port12 libgudev-1.0-0 libgusb2 libhashkit2 libieee1284-3 libldap-common
liblua5.3-0 libnspr4 libnss-mdns libnss3 libopendbx1 libopendbx1-sqlite3 libopendkim11 libpoppler-glib8 libpoppler126 libpython2-stdlib libpython3.11 librbl1 librtmp1 libsane-common
libsnmp-base libsnmp40 libssh2-1 libvbr2 mailutils-common python2 python2-minimal python3-augeas sane-airscan update-inetd usb.ids
Use 'apt autoremove' to remove them.
The following additional packages will be installed:
php8.2-fpm
Suggested packages:
php-pear
The following packages will be REMOVED:
apache2 apache2-bin clamav clamav-daemon clamav-freshclam clamav-milter clamav-unofficial-sigs clamdscan colord curl dirmngr git gnupg gnupg2 gpg-wks-client libapache2-mod-php8.2
libapache2-mod-ruid2 libaprutil1-ldap libclamav11 libcurl3-gnutls libcurl4 libdb5.3t64 libgphoto2-6 libldap-2.5-0 libmailutils9 libmemcached11 libpq5 libsane1 libsasl2-2
libsasl2-modules-db mailutils mongo-tools opendkim opendkim-tools python-apt python3-certbot-apache python3-debianbts python3-pycurl python3-pysimplesoap python3-reportbug reportbug
sane-utils sasl2-bin sendmail sendmail-bin sensible-mda
The following NEW packages will be installed:
libdb5.3 php8.2-fpm
The following packages will be DOWNGRADED:
db-util db5.3-util
0 upgraded, 2 newly installed, 2 downgraded, 46 to remove and 0 not upgraded. Need to get 1,743 kB/2,507 kB of archives.
After this operation, 234 MB disk space will be freed.
Do you want to continue? [Y/n] n
Abort.
Is there some way to get apt to reinstall a package such that it does
not think it has to uninstall things which depend on it because it's
being immediatly reinstalled?
That is the idea behind reinstall, though downgrading is always
a test of its ability to succeed.
What it says it's going to do is actually remove those 46 packages and
not reinstall them. I believe it! Clearly apt is unwinding the dependencies. It seems like it's not taking into account the
downgraded libdb5.3 is a valid dependency for all the things it's
about to uninstall so it doesn't need to uninstall those things. I
thought it should do that, but for some reason, it's not doing that
for me.
So, which part are you confused about? Did you think there was some
easy way to FIX a frankendebian? Are you confused because you keep
thinking "there must be some single apt command that will do all the
work for me"?
There's not. You get to do all the work by hand.
You will most likely need to remove the testing versions of these packages (apache2, git and so on) and then install the bookworm versions afterward.
The things to watch out for are config files (hence your backup), and
any crazy dependency situations. In the ideal case, you'll simply be
able to remove all the packages that aren't libs, then downgrade the
libs, then reinstall the packages. And make sure you have sensible
config files. If you get stuck, there's always the big hammer
(dpkg --force-depends and so on).
If/when it breaks, you get to reinstall from scratch.
This is why we tell people DO NOT MIX BINARY PACKAGES FROM MULTIPLE
RELEASES.
You will most likely need to remove the testing versions of these packages (apache2, git and so on) and then install the bookworm versions afterward.
Those dependent packages (most if not all) are not from testing.
apache2, perl, they are all installed from bookworm or
bookworm-security.
That db5.3 from testing is uninstalled and reinstalling from stable is causing these other packages from stable to be uninstalled. I find
that confusing.
But what about libc6? That one really worries me.
# apt remove -s libc6
# apt remove -s libc6
DO NOT do this.
Downgrade it. DO NOT remove it and then hope to reinstall it later.
Removing libc6 will break everything.
You seem to be flailing, so let me spell this out as explicitly as
possible. When I say "downgrade a library package", I mean:
1) Download the .deb file for the bookworm(-security) version of the
library package.
2) Run "dpkg -i libc6_whatever.deb".
3) When you inevitably get dependency conflicts, download the additional
library packages that need to be downgraded at the same time, and add
them to the list.
4) dpkg -i libc6_whatever.deb libwhomever.deb ....
5) Repeat until it works.
6) Helpful post-mess cleanup commands include "dpkg --configure -a" and
"apt-get -f install". (Yes, that last one has install with no package
names.)
Apt is NOT built for downgrading. If you happen to get any positive
results from an apt command that involves downgrading, you can consider
that a pleasant surprise. Usually you need to invoke dpkg directly.
So once I've done this dpkg -i to install a package, I can do that
without removing the old one first?
And, once I've hammered a package into place with dpkg, in the future,
will apt take it into account as a dependency of things already
installed even though apt itself didn't install or rather downgrade
the package itself?
| Sysop: | Keyop |
|---|---|
| Location: | Huddersfield, West Yorkshire, UK |
| Users: | 715 |
| Nodes: | 16 (3 / 13) |
| Uptime: | 28:40:36 |
| Calls: | 12,107 |
| Calls today: | 7 |
| Files: | 15,006 |
| Messages: | 6,518,234 |