Debian Bookworm install - lsb-release package dependency

Bug #2038664 reported by Josh Stompro
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Evergreen
Confirmed
Medium
Unassigned

Bug Description

EG 3.11

The lsb-release package which provides the lsb_release command wasn't installed by default on a couple of Debian Bookworm systems.

Symptom that I noticed was an apt update error.

Ign:4 http://apt.postgresql.org/pub/repos/apt -pgdg InRelease
Err:5 http://apt.postgresql.org/pub/repos/apt -pgdg Release
  404 Not Found [IP: 217.196.149.55 80]
Reading package lists... Done

My /etc/apt/sources.list.d/pgdb.list looked like
deb [signed-by=/etc/apt/trusted.gpg.d/pgdg.asc] http://apt.postgresql.org/pub/repos/apt/ -pgdg main

Missing the release codename before -pgdb.

So without lsb_release being available, the Makefile.debian script fails to setup the apt repo corretly.

 fgrep -r 'RELEASE_CODENAME' *
extras/install/Makefile.debian:RELEASE_CODENAME=$(shell lsb_release -cs)
extras/install/Makefile.debian: echo "deb [signed-by=/etc/apt/trusted.gpg.d/pgdg.asc] http://apt.postgresql.org/pub/repos/apt/ $(RELEASE_CODENAME)-pgdg main" \

I'll try and test this with a fresh bookworm install sometime to confirm it.

The fix will be to add lsb-release as a dependency package for Bookworm.
Josh

Galen Charlton (gmc)
Changed in evergreen:
status: New → Confirmed
importance: Undecided → Medium
tags: added: install-upgrade
Revision history for this message
Jason Stephenson (jstephenson) wrote :

Debian dropped support for LSB in 2015: https://wiki.debian.org/DebianLsb

The document above says to install the lsb package. When I try to do so on Bookworm, I get the following:

Package lsb is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

lsb_release is installed on my test Debian Bookworm VM. I don't remember if I had to install it manually or not.

lsb_release only partially works on Debian Bookworm:

$ lsb_release
No LSB modules are available.

$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 12 (bookworm)
Release: 12
Codename: bookworm

$ lsb_release -cs
No LSB modules are available.
bookworm

There is a package named 'lsb-base.' Installing it does not help.

That said, installing the lsb-release package should work. Just note that LSB support on Debian Bookworm is broken/gone. It may work well enough for our purposes, but it may stop working in future Debian releases.

Aside:
This is bad news for people using certain printer drivers. I've had to install lsb on Ubuntu to get certain Epson drivers to work. I wonder if those printers will work in the absence of a functioning lsb package?

Revision history for this message
Galen Charlton (gmc) wrote :

It looks like checking /etc/os-release may be a good substitute, at least for distributions that ship systemd.

Revision history for this message
Jeff Godin (jgodin) wrote :

The lsb-release package is available on Bookworm, and will be installed by default (even on a fresh install) in some scenarios, including where the Debian installer (using hw-detect) identifies your install as running on a VMware hypervisor, and installs open-vm-tools (which pulls in the lsb-release package by requiring it).

While the lsb_release command outputs the "No LSB modules are available." message in more places as of Bookworm, it only outputs the message if stdout is a terminal, thus our usage appears to be unaffected.

I think that Josh's suggestion of ensuring that the lsb-release package is installed is very reasonable.

If we need to switch/simplify, I think Galen's on the right path with using the os-release file.

/usr/lib/os-release and the symlink /etc/os-release are provided by base-files, and are present in all Debian releases that we currently support.

our two uses of lsb_release are:

Open-ILS/src/edi_translator/install-ubuntu.sh:UBUNTU_RELEASE=$(lsb_release -sc)
Open-ILS/src/extras/install/Makefile.debian:RELEASE_CODENAME=$(shell lsb_release -cs)

It may be as simple as changing "lsb_release -sc" and "lsb_release -cs" to ". /usr/lib/os-release; echo $VERSION_CODENAME"?

(I haven't tested that within the Makefile environment)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.