mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-21 07:55:00 +00:00
Fixes: #2251 Fixes: #2426 - Temporarily add a bug fix for the one-line style apt sources format. Upstream submission: https://github.com/hercules-team/augeas/pull/865 . - Currently, only two options with keys arch= or trusted= are allowed. However, as documented in apt manual page[1], there are many different options possible. Apt itself parses these options in a much more generic way[2][3]. - Fixes allow parsing all the different options allowed by apt. A practical example (accepted by apt) is also provided as a test case. Tests: - Add the following line to one of the apt sources file in /etc/apt/sources.list.d: "deb [signed-by=/usr/share/keyrings/debian-archive-trixie-stable.gpg] https://deb.debian.org/debian trixie main". In augtool, print /augeas/files/etc/apt/sources.list.d//error. - With the patch, run 'make build install' and errors in augtool disappear. - In tor proxy app, enabling/disabling apt through tor works. The files in /etc/apt/ are updated as expected. Link: https://manpages.debian.org/trixie/apt/sources.list.5.en.html Link:3c9399e643/apt-pkg/sourcelist.cc (L215)Link:3c9399e643/apt-pkg/contrib/strutl.cc (L245)Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>