dir=`echo "$showsrc"| grep ^Directory:`
dir=${dir#Directory: }
+# get configuration
+eval `apt-config shell SERVER Apt::Changelog::Server`
+
+if [ -z "$SERVER" ]; then
+ echo "ERROR: You need to set Apt::Changelog::Server configuration option" >&2
+ exit 1
+fi
+
# fetch it
OUT=`mktemp -t "${pkg}.changes.XXXXXX"`
trap "rm $OUT" 0 HUP INT QUIT ILL ABRT FPE SEGV PIPE TERM
-if ! wget -q -O- http://changelogs.ubuntu.com/changelogs/$dir/${pkg}_${version}/changelog > "$OUT"
+if ! wget -q -O- ${SERVER}/$dir/${pkg}_${version}/changelog > "$OUT"
then
echo "ERROR: changelog for this version is not (yet) available; try https://launchpad.net/ubuntu/+source/$pkg/+changelog" >&2
exit 1
--- /dev/null
+// Server information for apt-changelog
+APT {
+ Changelog {
+ Server "http://changelogs.ubuntu.com/changelogs";
+ }
+}
* cmdline/apt-changelog: Filter out multiple results for a source package,
just take the latest one.
+ * cmdline/apt-changelog: Read server name from configuration
+ APT::Changelog::Server instead of hardcoding it. This allows local users
+ to point to a local changelog mirror, or make this script work for Debian.
+ * Add debian/apt.conf.changelog: Configuration for apt-changelog with the
+ server for Ubuntu (changelogs.ubuntu.com). Install it in debian/rules.
+ * doc/apt-changelog.1.xml: Document the new option.
-- Martin Pitt <martin.pitt@ubuntu.com> Fri, 12 Nov 2010 16:53:31 +0100
cp debian/apt.logrotate debian/$@/etc/logrotate.d/apt
cp share/ubuntu-archive.gpg debian/$@/usr/share/$@
cp debian/apt.conf.autoremove debian/$@/etc/apt/apt.conf.d/01autoremove
+ cp debian/apt.conf.changelog debian/$@/etc/apt/apt.conf.d/20changelog
# copy lintian override
cp share/lintian-overrides debian/$@/usr/share/lintian/overrides/apt
<refsect1><title>Description</title>
<para>
- <command>apt-changelog</command> downloads a package changelog from
- <ulink>http://changelogs.ubuntu.com</ulink> and displays it through
- <command>sensible-pager</command>.
+ <command>apt-changelog</command> downloads a package changelog and displays
+ it through <command>sensible-pager</command>. The server name and base
+ directory is defined in the <literal>APT::Changelog::Server</literal>
+ variable (e. g. <ulink>http://packages.debian.org/changelogs</ulink> for
+ Debian or <ulink>http://changelogs.ubuntu.com/changelogs</ulink> for
+ Ubuntu).
</para>
<para>