Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: support of changelogs #170

Open
Un1oR opened this issue Jan 14, 2015 · 4 comments
Open

Feature Request: support of changelogs #170

Un1oR opened this issue Jan 14, 2015 · 4 comments
Labels

Comments

@Un1oR
Copy link

Un1oR commented Jan 14, 2015

Hi,
apt-get has changelog option:

changelog downloads a package changelog and displays it through sensible-pager. The server name and base directory is defined in the APT::Changelogs::Server variable (e.g. packages.debian.org/changelogs[1] for Debian or changelogs.ubuntu.com/changelogs[2] for Ubuntu).

For third party repositories apt uses this function to determine changelog URI. It would be nice to allow publishing changelogs along with packages at appropriate URIs.

@Un1oR
Copy link
Author

Un1oR commented Jan 14, 2015

But it seems there is a problem: synaptic and apt uses different algorithms to calculate changelog URI:
https://github.com/Debian/apt/blob/debian/experimental/cmdline/apt-get.cc#L1421
vs
https://github.com/linuxmint/synaptic/blob/master/common/rpackage.cc#L989
In this way I get http://my-repo-host/my-package_1.2.3.changelog for apt and
http://my-repo-host/my-package_1.2.3_amd64.changelog for synaptic.

@fpytloun
Copy link

Hello,

I would also appreciate possibility to access package changelogs.
Maybe also via REST API with possibility to show whole changelog or just it's diff between two versions. So in my use case I could easily diff packages between snapshots and show it's differences.

@smira smira added the feature label Jan 24, 2016
@jlu5
Copy link
Contributor

jlu5 commented Dec 22, 2016

AFAIK, apt has since changed the way it looks up changelogs. man apt.conf hints that the location of a changelog can be set using a "Changelogs" field in the Release file, but I'm not clear on what format it's exactly looking for.

Synaptic, on the other hand, still uses the NAME_VERSION_ARCH.changelog format. In order to generate changelogs for Synaptic, I've been running this script over the aptly public/ folder this script, which automatically writes .changelog files into the same folder as each .deb.

man apt.conf snippet:

       Changelogs::URI scope
           Acquiring changelogs can only be done if an URI is known from where to get them. Preferable the Release file indicates this in a 'Changelogs' field. If this isn't
           available the Label/Origin field of the Release file is used to check if a Acquire::Changelogs::URI::Label::LABEL or Acquire::Changelogs::URI::Origin::ORIGIN option
           exists and if so this value is taken. The value in the Release file can be overridden with Acquire::Changelogs::URI::Override::Label::LABEL or
           Acquire::Changelogs::URI::Override::Origin::ORIGIN. The value should be a normal URI to a text file, except that package specific data is replaced with the placeholder
           @CHANGEPATH@. The value for it is: 1. if the package is from a component (e.g.  main) this is the first part otherwise it is omitted, 2. the first letter of source
           package name, except if the source package name starts with 'lib' in which case it will be the first four letters. 3. The complete source package name. 4. the complete
           name again and 5. the source version. The first (if present), second, third and fourth part are separated by a slash ('/') and between the fourth and fifth part is an
           underscore ('_'). The special value 'no' is available for this option indicating that this source can't be used to acquire changelog files from. Another source will be
           tried if available in this case.

@bauen1
Copy link

bauen1 commented Jul 28, 2022

Aptitude has a hardcoded check against the Origin field, and will only show/download a changelog if it believes the repository to come from debian:

https://sources.debian.org/src/aptitude/0.8.13-4/src/generic/apt/pkg_changelog.cc/#L687-L705

A bug has already been filed in 2018 about it, but so far nothing has changed upstream: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=889924

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants
@lbolla @smira @Un1oR @fpytloun @jlu5 @bauen1 and others