I am looking into packaging for Debian, when it comes to writing the instructions on how to build a piece of software it seems it is not as straightforward as for other package formats, so I began by looking into a package already made, rebuilding Bash (tried others afterwards).
I think I followed the appropriate steps: dpkg-dev and devscripts are installed, source repos enabled, package source checked out (apt source bash) and its build dependencies too (apt build-dep bash). I used the --no-sign flag for dpkg-buildpackage because I am just looking into things for the moment. Build was successful and I have deb archives I can install, but APT regards them as downgrades (in capital letters). How come? What am I missing?
Code: Select all
$ apt list --installed | grep bash
bash-completion/oldstable,now 1:2.11-2 all [installed]
bash/oldstable,now 5.1-2+deb11u1 amd64 [installed]
$ apt-cache madison bash
bash | 5.1-2+deb11u1 | http://mirror.nl.leaseweb.net/debian bullsege/main amd64 Packages
bash | 5.1-2+deb11u1 | http://mirror.nl.leaseweb.net/debian bullseye/main Sources
$ dpkg-deb -I bash_5.1-2+deb11u1_amd64.deb
new Debian package, version 2.0.
[... trimmed ...]
Package: bash
Version: 5.1-2+deb11u1
[... trimmed ...]
$ apt install ./bash_5.1-2+deb11u1_amd64.deb
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Note, selecting 'bash' instead of './bash_5.1-2+deb11u1_amd64.deb'
Suggested packages:
bash-doc
The following packages will be DOWNGRADED:
bash
0 upgraded, 0 newly installed, 1 downgraded, 0 to remove and 2 not upgraded.
[... trimmed ...]
That build was performed as root, but I have also tried as an unprivileged user using fakeroot. Even setting up a trivial local repo, ensuring it had more priority than the official ones and install from there, in case the trigger was the package not belonging to a repo, leads to APT not seeing it as a reinstallation but a downgrade.