unable to add PPA by its sources.list line

Bug #2037210 reported by Norbert
26
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Software Properties
Confirmed
Undecided
Unassigned
software-properties (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

Steps to reproduce:
1. Have Ubuntu 23.10 installed
2. Run

```
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv E756285F30DB2B2BB35012E219BFCAF5168D33A9
sudo add-apt-repository -y "deb http://ppa.launchpad.net/nrbrtx/vte/ubuntu jammy main"
sudo add-apt-repository -y "deb http://ppa.launchpad.net/nrbrtx/wnck/ubuntu jammy main"
```

Expected results:

* key added, two repositories are added to the relevant *.list files at /etc/apt/sources.list.d/

Actual results:

* relevant *.list files at /etc/apt/sources.list.d/ are not created, having errors instead

```
$ sudo add-apt-repository -y "deb http://ppa.launchpad.net/nrbrtx/vte/ubuntu jammy main"
Repository: 'deb http: //ppa.launchpad.net/nrbrtx/vte/ubuntu jammy main
Components:
'
Description:
This PPA contains VTE library from Ubuntu 20.04 LTS which is not affected by stupid bug https://pad.lv/1922276 . So user will be able to select all terminal output with full scroll-back in MATE Terminal and other VTE-based terminals as it is expected.

This PPA is useful for Ubuntu 22.04 LTS, Debian 11 (bullseye) and Debian 12 (bookworm).

As usual one can always remove this PPA and downgrade VTE packages by using `sudo apt-get install ppa-purge` and `sudo ppa-purge ppa:nrbrtx/vte`.
More info: https://launchpad.net/~nrbrtx/+archive/ubuntu/vte
Adding repository.
E: Malformed entry 1 in sources file /etc/apt/sources.list.d/nrbrtx-ubuntu-vte-mantic.sources (URI)
E: The list of sources could not be read.

$ sudo add-apt-repository -y "deb http://ppa.launchpad.net/nrbrtx/wnck/ubuntu jammy main"
Repository: 'deb http: //ppa.launchpad.net/nrbrtx/wnck/ubuntu jammy main
Components:
'
Description:
This PPA provides patched libwnck3 package to fix https://github.com/mate-desktop/mate-panel/issues/1230 and https://pad.lv/1947420 .
See details at https://github.com/mate-desktop/mate-panel/issues/1230#issuecomment-997422612 .

This PPA is useful for Ubuntu 22.04 LTS and Debian 12 (bookworm).

As usual one can always remove this PPA and downgrade WNCK packages by using `sudo apt-get install ppa-purge` and `sudo ppa-purge ppa:nrbrtx/wnck`.
More info: https://launchpad.net/~nrbrtx/+archive/ubuntu/wnck
Adding repository.
Found existing deb entry in /etc/apt/sources.list.d/nrbrtx-ubuntu-vte-mantic.sources
E: Malformed entry 1 in sources file /etc/apt/sources.list.d/nrbrtx-ubuntu-vte-mantic.sources (URI)
E: The list of sources could not be read.

$ sudo apt-get update
E: Malformed entry 1 in sources file /etc/apt/sources.list.d/nrbrtx-ubuntu-vte-mantic.sources (URI)
E: The list of sources could not be read.
```

ProblemType: Bug
DistroRelease: Ubuntu 23.10
Package: software-properties-common 0.99.39
ProcVersionSignature: Ubuntu 6.5.0-5.5-generic 6.5.0
Uname: Linux 6.5.0-5-generic x86_64
ApportVersion: 2.27.0-0ubuntu2
Architecture: amd64
CasperMD5CheckResult: unknown
CurrentDesktop: GNOME-Flashback
Date: Sun Sep 24 14:02:10 2023
PackageArchitecture: all
SourcePackage: software-properties
UpgradeStatus: Upgraded to mantic on 2023-04-13 (164 days ago)
modified.conffile..etc.default.apport:
 # set this to 0 to disable apport, or to 1 to enable it
 # you can temporarily override this with
 # sudo service apport start force_start=1
 enabled=0
mtime.conffile..etc.default.apport: 2023-09-24T13:25:34.901411

Revision history for this message
Norbert (nrbrtx) wrote :
Revision history for this message
Norbert (nrbrtx) wrote (last edit ):
Download full text (3.3 KiB)

The same happens with clean Docker Ubuntu Mantic image, see below:

```
$ docker run -it --rm ubuntu:mantic bash -c "export DEBIAN_FRONTEND=noninteractive; apt-get -qq update && apt-get -qq dist-upgrade > /dev/null && apt-get -qq install software-properties-common apt-utils > /dev/null; cat /etc/os-release; apt-key adv --keyserver keyserver.ubuntu.com --recv E756285F30DB2B2BB35012E219BFCAF5168D33A9; add-apt-repository -y 'deb http://ppa.launchpad.net/nrbrtx/vte/ubuntu jammy main'; add-apt-repository -y 'deb http://ppa.launchpad.net/nrbrtx/wnck/ubuntu jammy main'; apt-get update"
debconf: delaying package configuration, since apt-utils is not installed
debconf: delaying package configuration, since apt-utils is not installed
PRETTY_NAME="Ubuntu Mantic Minotaur (development branch)"
NAME="Ubuntu"
VERSION_ID="23.10"
VERSION="23.10 (Mantic Minotaur)"
VERSION_CODENAME=mantic
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=mantic
LOGO=ubuntu-logo
Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
Executing: /tmp/apt-key-gpghome.DbFMKGlJc8/gpg.1.sh --keyserver keyserver.ubuntu.com --recv E756285F30DB2B2BB35012E219BFCAF5168D33A9
gpg: key 19BFCAF5168D33A9: public key "Launchpad PPA for Norbert" imported
gpg: Total number processed: 1
gpg: imported: 1
Repository: 'deb http: //ppa.launchpad.net/nrbrtx/vte/ubuntu jammy main
Components:
'
Description:
This PPA contains VTE library from Ubuntu 20.04 LTS which is not affected by stupid bug https://pad.lv/1922276 . So user will be able to select all terminal output with full scroll-back in MATE Terminal and other VTE-based terminals as it is expected.

This PPA is useful for Ubuntu 22.04 LTS, Debian 11 (bullseye) and Debian 12 (bookworm).

As usual one can always remove this PPA and downgrade VTE packages by using `sudo apt-get install ppa-purge` and `sudo ppa-purge ppa:nrbrtx/vte`.
More info: https://launchpad.net/~nrbrtx/+archive/ubuntu/vte
Adding repository.
E: Malformed entry 1 in sources file /etc/apt/sources.list.d/nrbrtx-ubuntu-vte-mantic.sources (URI)
E: The list of sources could not be read.
Repository: 'deb http: //ppa.launchpad.net/nrbrtx/wnck/ubuntu jammy main
Components:
'
Description:
This PPA provides patched libwnck3 package to fix https://github.com/mate-desktop/mate-panel/issues/1230 and https://pad.lv/1947420 .
See details at https://github.com/mate-desktop/mate-panel/issues/1230#issuecomment-997422612 .

This PPA is useful for Ubuntu 22.04 LTS and Debian 12 (bookworm).

As usual one can always remove this PPA and downgrade WNCK packages by using `sudo apt-get install ppa-purge` and `sudo ppa-purge ppa:nrbrtx/wnck`.
More info: https://launchpad.net/~nrbrtx/+archive/ubuntu/wnck
Adding repository.
Found existing deb entry in /etc/apt/sources.list.d/nrbrtx-ubuntu-vte-mantic.sources
E: Malformed entry 1 in sources file /etc/apt/sources.list.d/nrbrtx-ubuntu-vte-mantic.sources (URI)
E: The list of sources could not be read.
E: Malforme...

Read more...

Norbert (nrbrtx)
tags: added: rls-mm-incoming
Changed in software-properties (Ubuntu):
status: New → Confirmed
Changed in software-properties:
status: New → Confirmed
Norbert (nrbrtx)
tags: added: foundations-todo
Revision history for this message
Ubuntu QA Website (ubuntuqa) wrote :

This bug has been reported on the Ubuntu ISO testing tracker.

A list of all reports related to this bug can be found here:
https://iso.qa.ubuntu.com/qatracker/reports/bugs/2037210

tags: added: iso-testing
Revision history for this message
Nick Rosbrook (enr0n) wrote :

This is a result of us moving PPA sources to deb822 for this cycle. As a workaround, please use this syntax instead:

$ apt-add-repository ppa:nrbrtx/vte

This is really much nicer than specifying the whole deb line anyways. I think we should just remove support for the "add by line" syntax since it does not make sense with deb822.

Changed in software-properties (Ubuntu):
importance: Undecided → Medium
tags: removed: rls-mm-incoming
Revision history for this message
Norbert (nrbrtx) wrote (last edit ):

@Nick Rosbrook (enr0n)

Your assumption is correct only in the case when PPA_release = distro_release.

But in my case the situation is different:
1. distro version is 23.10,
2. PPA provides packages only for 22.04 LTS.

Also please note that there are some obsolete PPAs where their owner is not available or lost the interest for maintaining the packages.

So for some packages it is impossible to run `apt-add-repository ppa:user/archive`.
So please support old behavior of add-apt-repository.

This will make possible to run the below command

```
sudo add-apt-repository -y "deb http://ppa.launchpad.net/nrbrtx/vte/ubuntu jammy main" # note that jammy!=mantic
```

on modern Ubuntu 23.10 without issues.

---

Actually it is good that third-party repository support in software-properties-common is not broken, so the following commands work without issues on 23.10:

```
sudo apt-get install software-properties-common
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv A2F683C52980AECF
sudo add-apt-repository -y "deb [arch=amd64] https://download.virtualbox.org/virtualbox/debian jammy contrib"
sudo apt-get install virtualbox-7.0
```

Revision history for this message
Norbert (nrbrtx) wrote :

Bug is not fixed in latest build of Ubuntu 24.04 LTS.
Please fix it before final LTS release. You are breaking user-experience.

Norbert (nrbrtx)
tags: added: noble
Revision history for this message
Norbert (nrbrtx) wrote :
Download full text (5.3 KiB)

Below is the output from the minimal relevant Docker container, the PPAs are not added to system:

```
$ docker run -it --rm ubuntu:noble bash -c "export DEBIAN_FRONTEND=noninteractive; apt-get -qq update && apt-get -qq dist-upgrade > /dev/null && apt-get -qq install software-properties-common apt-utils > /dev/null; cat /etc/os-release; apt-key adv --keyserver keyserver.ubuntu.com --recv E756285F30DB2B2BB35012E219BFCAF5168D33A9; add-apt-repository -y 'deb http://ppa.launchpad.net/nrbrtx/vte/ubuntu jammy main'; add-apt-repository -y 'deb http://ppa.launchpad.net/nrbrtx/wnck/ubuntu jammy main'; apt-get update ; grep -ira ppa /etc/apt; apt-cache policy"
debconf: delaying package configuration, since apt-utils is not installed
debconf: delaying package configuration, since apt-utils is not installed
PRETTY_NAME="Ubuntu Noble Numbat (development branch)"
NAME="Ubuntu"
VERSION_ID="24.04"
VERSION="24.04 (Noble Numbat)"
VERSION_CODENAME=noble
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=noble
LOGO=ubuntu-logo
Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
Executing: /tmp/apt-key-gpghome.qDnnBRGOY6/gpg.1.sh --keyserver keyserver.ubuntu.com --recv E756285F30DB2B2BB35012E219BFCAF5168D33A9
gpg: error running '/usr/bin/dirmngr': probably not installed
gpg: failed to start dirmngr '/usr/bin/dirmngr': Configuration error
gpg: can't connect to the dirmngr: Configuration error
gpg: keyserver receive failed: No dirmngr
Repository: 'deb http: //ppa.launchpad.net/nrbrtx/vte/ubuntu jammy main
Components:
'
Description:
This PPA contains VTE library from Ubuntu 20.04 LTS which is not affected by stupid bug https://pad.lv/1922276 . So user will be able to select all terminal output with full scroll-back in MATE Terminal and other VTE-based terminals as it is expected.

This PPA is useful for Ubuntu 22.04 LTS, Debian 11 (bullseye) and Debian 12 (bookworm).

As usual one can always remove this PPA and downgrade VTE packages by using `sudo apt-get install ppa-purge` and `sudo ppa-purge ppa:nrbrtx/vte`.
More info: https://launchpad.net/~nrbrtx/+archive/ubuntu/vte
Adding repository.
Found existing deb entry in /etc/apt/sources.list.d/ubuntu.sources
Hit:1 http://archive.ubuntu.com/ubuntu noble InRelease
Hit:2 http://security.ubuntu.com/ubuntu noble-security InRelease
Hit:3 http://archive.ubuntu.com/ubuntu noble-updates InRelease
Hit:4 http://archive.ubuntu.com/ubuntu noble-backports InRelease
Get:5 http://archive.ubuntu.com/ubuntu noble/main amd64 Components [665 kB]
Get:6 http://archive.ubuntu.com/ubuntu noble/universe amd64 Components [5943 kB]
Get:7 http://archive.ubuntu.com/ubuntu noble/multiverse amd64 Components [41.9 kB]
Fetched 6649 kB in 3s (2199 kB/s)
Reading package lists... Done
Repository: 'deb http: //ppa.launchpad.net/nrbrtx/wnck/ubuntu jammy main
Components:
'
Description:
This PPA provides patched libwnck3 package to fix https://github.com/mate-desktop/mate-pa...

Read more...

Nick Rosbrook (enr0n)
tags: added: rls-nn-incoming
Nick Rosbrook (enr0n)
Changed in software-properties (Ubuntu):
status: Confirmed → In Progress
tags: removed: rls-nn-incoming
Revision history for this message
Norbert (nrbrtx) wrote :

Thanks!
Just tested software-properties 0.99.46+git202403291516.f90a96b1-1334~ubuntu24.04.1 from ppa:roguescholar/daily repository. This upgrade fixes the issue.
Please merge it to Noble.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package software-properties - 0.99.46

---------------
software-properties (0.99.46) noble; urgency=medium

  * ppa: do not enable deb822 logic when input is sources.list line or URI
    (LP: #2037210)

 -- Nick Rosbrook <email address hidden> Thu, 28 Mar 2024 14:47:51 -0400

Changed in software-properties (Ubuntu):
status: In Progress → Fix Released
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.