ntk/apt.git
9 years agoapt-key del: Ignore case when checking if a keyid exists in a keyring. debian/sid
Nathan Kennedy [Thu, 9 Apr 2015 04:40:07 +0000 (00:40 -0400)]
apt-key del: Ignore case when checking if a keyid exists in a keyring.
Fail if keyid is not found in any keyring. Add integration tests.

Closes: 781696

9 years agoHttpsMethod::Fetch(): Zero the FetchResult object when leaving due to 404
Robert Edmonds [Sun, 22 Mar 2015 04:12:45 +0000 (00:12 -0400)]
HttpsMethod::Fetch(): Zero the FetchResult object when leaving due to 404

9 years agoFix crash in pkgDPkgPM::WriteApportReport(() (LP: #1436626)
Michael Vogt [Tue, 7 Apr 2015 10:20:56 +0000 (12:20 +0200)]
Fix crash in pkgDPkgPM::WriteApportReport(() (LP: #1436626)

9 years agotest/integration/test-apt-download-progress: fix test failure on fast hardware
Michael Vogt [Fri, 20 Mar 2015 16:38:51 +0000 (17:38 +0100)]
test/integration/test-apt-download-progress: fix test failure on fast hardware

9 years agoreleasing package apt version 1.0.9.7 1.0.9.7
Michael Vogt [Mon, 23 Feb 2015 11:56:42 +0000 (12:56 +0100)]
releasing package apt version 1.0.9.7

9 years agoFix crash in the apt-transport-https when Owner is NULL
Tomasz Buchert [Sun, 15 Feb 2015 23:57:29 +0000 (00:57 +0100)]
Fix crash in the apt-transport-https when Owner is NULL

Do not crash in ServerState::HeaderLine if there is no Owner.

Closes: #778375

9 years agoreleasing package apt version 1.0.9.6
Michael Vogt [Fri, 16 Jan 2015 11:57:54 +0000 (12:57 +0100)]
releasing package apt version 1.0.9.6

9 years agoprepare 1.0.9.6 1.0.9.6
Michael Vogt [Fri, 16 Jan 2015 09:38:46 +0000 (04:38 -0500)]
prepare 1.0.9.6

9 years agoaward points for positive dependencies again
David Kalnischkies [Sat, 10 Jan 2015 11:31:18 +0000 (12:31 +0100)]
award points for positive dependencies again

Commit 9ec748ff103840c4c65471ca00d3b72984131ce4 from Feb 23 last year
adds a version check after 8daf68e366fa9fa2794ae667f51562663856237c
added 8 days earlier negative points for breaks/conflicts with the
intended that only dependencies which are satisfied propagate points
(aka: old conflicts do not).

The implementation was needlessly complex and flawed through preventing
positive dependencies from gaining points like they did before these
commits making library transitions harder instead of simpler. It worked
out anyhow most of the time out of pure 'luck' (and other ways of
gaining points) or got miss attributed to being a temporary hick-up.

Closes: 774924

9 years ago128 KiB DSC files ought to be enough for everyone
David Kalnischkies [Fri, 9 Jan 2015 00:03:31 +0000 (01:03 +0100)]
128 KiB DSC files ought to be enough for everyone

Your mileage may vary, but don't worry: There is more than one way to
do it, but our one size fits all is not a bigger hammer, but an entire
roundhouse kick! So brace yourself for the tl;dr: The limit is gone.*

Beware: This fixes also the problem that a double newline is
unconditionally added 'later' which is an overcommitment in case
the dsc filesize is limit-2 <= x <= limit.

* limited to numbers fitting into an unsigned long long.

Closes: 774893

9 years agoAdd regression test for the previous commit
Michael Vogt [Tue, 6 Jan 2015 09:54:24 +0000 (10:54 +0100)]
Add regression test for the previous commit

The issue was that https.cc never called URIStart(), one way to
detect this is that no download progress is generated without
this call. The test now checks for this and as a side-effect will
also ensure that we do not break download progress reporting and
Acquire::{http,https}::Dl-Limit accidently.

9 years agoFix missing URIStart() for https downloads
Michael Vogt [Mon, 5 Jan 2015 09:27:53 +0000 (10:27 +0100)]
Fix missing URIStart() for https downloads

Add a explicit ReceivedData to HttpsMethod that indicates when
we got data from the connection so that we can send URISTart()
to the parent.

This is needed because URIStart got moved in f9b4f12d from
the progress_callback to write_data() and it only checks for
Res.Size. In the old code if progress_callback is called by
libcurl (and sets Res.Size) before write_data is called then
URIStart() is never send. Making this a explicit ReceivedData
variable fixes this issue.

9 years agorelease 1.0.9.5 1.0.9.5
David Kalnischkies [Tue, 23 Dec 2014 13:11:13 +0000 (14:11 +0100)]
release 1.0.9.5

9 years agotighten filtering of kernel images in apt.auto-removal
James McCoy [Wed, 10 Dec 2014 15:16:02 +0000 (10:16 -0500)]
tighten filtering of kernel images in apt.auto-removal

The current filtering matches the names of the image metapackages on the
i386 architecture:

$ dpkg-query -l | awk '/^ii[ ]+(linux|kfreebsd|gnumach)-image-[0-9]/ && $2 !~ /-dbg$/ { print $2 }'
linux-image-3.16.0-4-586
linux-image-586

This results in an extra image package being removed from
APT::NeverAutoRemove, losing the intended effect of keeping the {current,
previous, latest} set of images installed.

Requiring a “.” in the package name tightens the matched package names
to those that are installing a specific version of the image, thus
eliding the meta-packages.

Closes: 772732

9 years agopass-through stdin fd instead of content if not a terminal
David Kalnischkies [Mon, 22 Dec 2014 22:14:08 +0000 (23:14 +0100)]
pass-through stdin fd instead of content if not a terminal

Commit 299aea924ccef428219ed6f1a026c122678429e6 fixes the problem of
not logging terminal in case stdin & stdout are not a terminal. The
problem is that we are then trying to pass-through stdin content by
reading from the apt-process stdin and writing it to the stdin of the
child (dpkg), which works great for users who can control themselves,
but pipes and co are a bit less forgiving causing us to pass everything
to the first child process, which if the sending part of the pipe is
e.g. 'yes' we will never see the end of it (as the pipe is full at some
point and further writing blocks).

There is a simple solution for that of course: If stdin isn't a terminal,
we us the apt-process stdin as stdin for the child directly (We don't do
this if it is a terminal to be able to save the typed input in the log).

Closes: 773061

9 years agoalways run 'dpkg --configure -a' at the end of our dpkg callings
David Kalnischkies [Tue, 18 Nov 2014 18:53:56 +0000 (19:53 +0100)]
always run 'dpkg --configure -a' at the end of our dpkg callings

dpkg checks now for dependencies before running triggers, so that
packages can now end up in trigger states (especially those we are not
touching at all with our calls) after apt is done running.

The solution to this is trivial: Just tell dpkg to configure everything
after we have (supposely) configured everything already. In the worst
case this means dpkg will have to run a bunch of triggers, usually it
will just do nothing though.

The code to make this happen was already available, so we just flip a
config option here to cause it to be run. This way we can keep
pretending that triggers are an implementation detail of dpkg.
--triggers-only would supposely work as well, but --configure is more
robust in regards to future changes to dpkg and something we will
hopefully make use of in future versions anyway (as it was planed at the
time this and related options were implemented).

Note that dpkg currently has a workaround implemented to allow upgrades
to jessie to be clean, so that the test works before and after. Also
note that test (compared to the one in the bug) drops the await test as
its is considered a loop by dpkg now.

Closes: 769609

9 years agodo not make PTY slave the controlling terminal
David Kalnischkies [Wed, 10 Dec 2014 21:26:59 +0000 (22:26 +0100)]
do not make PTY slave the controlling terminal

If we have no controlling terminal opening a terminal will make this
terminal our controller, which is a serious problem if this happens to
be the pseudo terminal we created to run dpkg in as we will close this
terminal at the end hanging ourself up in the process…

The offending open is the one we do to have at least one slave fd open
all the time, but for good measure, we apply the flag also to the slave
fd opening in the child process as we set the controlling terminal
explicitely here.

This is a regression from 150bdc9ca5d656f9fba94d37c5f4f183b02bd746 with
the slight twist that this usecase was silently broken before in that it
wasn't logging the output in term.log (as a pseudo terminal wasn't
created).

Closes: 772641

9 years agodispose http(s) 416 error page as non-content
David Kalnischkies [Sat, 29 Nov 2014 16:59:52 +0000 (17:59 +0100)]
dispose http(s) 416 error page as non-content

Real webservers (like apache) actually send an error page with a 416
response, but our client didn't expect it leaving the page on the socket
to be parsed as response for the next request (http) or as file content
(https), which isn't what we want at all… Symptom is a "Bad header line"
as html usually doesn't parse that well to an http-header.

This manifests itself e.g. if we have a complete file (or larger) in
partial/ which isn't discarded by If-Range as the server doesn't support
it (or it is just newer, think: mirror rotation).
It is a sort-of regression of 78c72d0ce22e00b194251445aae306df357d5c1a,
which removed the filesize - 1 trick, but this had its own problems…

To properly test this our webserver gains the ability to reply with
transfer-encoding: chunked as most real webservers will use it to send
the dynamically generated error pages.

(The tests and their binary helpers had to be slightly modified to
apply, but the patch to fix the issue itself is unchanged.)

Closes: 768797

9 years agoThai program translation update
Theppitak Karoonboonyanan [Mon, 22 Dec 2014 11:42:17 +0000 (12:42 +0100)]
Thai program translation update

Closes: 772913

9 years agoJapanese program translation update
Kenshi Muto [Mon, 22 Dec 2014 11:39:24 +0000 (12:39 +0100)]
Japanese program translation update

Closes: 772678

9 years agoChinese (simplified) program translation update
Zhou Mo [Mon, 22 Dec 2014 11:36:25 +0000 (12:36 +0100)]
Chinese (simplified) program translation update

Closes: 771982

9 years agoFrench manpages translation update
Jean-Pierre Giraud [Mon, 22 Dec 2014 11:30:32 +0000 (12:30 +0100)]
French manpages translation update

Closes: 771967

9 years agorelease 1.0.9.4 1.0.9.4
David Kalnischkies [Wed, 3 Dec 2014 13:51:07 +0000 (14:51 +0100)]
release 1.0.9.4

9 years agoSpanish program translation update
Manuel "Venturi" Porras Peralta [Wed, 3 Dec 2014 11:09:21 +0000 (12:09 +0100)]
Spanish program translation update

Closes: 771815

9 years agosupport long keyids in "apt-key del" instead of ignoring them
James McCoy [Fri, 28 Nov 2014 13:21:06 +0000 (14:21 +0100)]
support long keyids in "apt-key del" instead of ignoring them

apt-key given a long keyid reports just "OK" all the time, but doesn't
delete the mentioned key as it doesn't find the key.

Note: In debian/experimental this was closed with
29f1b977100aeb6d6ebd38923eeb7a623e264ffe which just added the testcase
as the rewrite of apt-key had fixed this as well.

Closes: 754436

9 years agofix PTY interaction on linux and kfreebsd
David Kalnischkies [Mon, 17 Nov 2014 23:59:39 +0000 (00:59 +0100)]
fix PTY interaction on linux and kfreebsd

We run dpkg on its own pty, so we can log its output and have our own
output around it (like the progress bar), while also allowing debconf
and configfile prompts to happen.

In commit 223ae57d468fdcac451209a095047a07a5698212 we changed to
constantly reopening the slave for kfreebsd. This has the sideeffect
though that in some cases slave and master will lose their connection on
linux, so that no output is passed along anymore. We fix this by having
always an fd referencing the slave open (linux), but we don't use it
(kfreebsd).

Failing to get our PTY up and running has many (bad) consequences
including (not limited to, nor all at ones or in any case) garbled ouput,
no output, no logging, a (partial) mixture of the previous items, …
This commit is therefore also reshuffling quiet a bit of the creation
code to get especially the output part up and running on linux and the
logging for kfreebsd.

Note that the testcase tries to cover some cases, but this is an
interactivity issue so only interactive usage can really be a good test.

Closes: 765687

9 years agoclose leaking slave fd after setting up pty magic
David Kalnischkies [Mon, 17 Nov 2014 14:06:35 +0000 (15:06 +0100)]
close leaking slave fd after setting up pty magic

The fd moves out of scope here anyway, so we should close it properly
instead of leaking it which will tickle down to dpkg maintainer scripts.

Closes: 767774

9 years agoJapanese program translation update
Kenshi Muto [Fri, 28 Nov 2014 12:46:07 +0000 (13:46 +0100)]
Japanese program translation update

Closes: 763033

9 years agoTurkish program translation update
Mert Dirik [Fri, 28 Nov 2014 12:43:43 +0000 (13:43 +0100)]
Turkish program translation update

Closes: 763379

9 years agoCzech program translation update
Miroslav Kure [Fri, 28 Nov 2014 12:39:57 +0000 (13:39 +0100)]
Czech program translation update

Closes: 764055

9 years agoChinese (simplified) program translation update
Zhou Mo [Fri, 28 Nov 2014 12:30:39 +0000 (13:30 +0100)]
Chinese (simplified) program translation update

Closes: 766170

9 years agoFrench program translation update
Julien Patriarca [Fri, 28 Nov 2014 12:24:32 +0000 (13:24 +0100)]
French program translation update

Closes: 766755

9 years agoDutch program translation update
Frans Spiesschaert [Fri, 28 Nov 2014 12:20:40 +0000 (13:20 +0100)]
Dutch program translation update

Closes: 771039

9 years agochange codenames to jessie as stable POV in docs
David Kalnischkies [Mon, 10 Nov 2014 16:21:57 +0000 (17:21 +0100)]
change codenames to jessie as stable POV in docs

9 years agoreenable support for -s (and co) in apt-get source
David Kalnischkies [Sat, 18 Oct 2014 12:44:41 +0000 (14:44 +0200)]
reenable support for -s (and co) in apt-get source

The conversion to accept only relevant options for commands has
forgotten another one, so adding it again even through the usecase might
very well be equally good served by --print-uris.

Closes: 742578

9 years agoallow options between command and -- on commandline
David Kalnischkies [Sat, 27 Sep 2014 23:25:21 +0000 (01:25 +0200)]
allow options between command and -- on commandline

This used to work before we implemented a stricter commandline parser
and e.g. the dd-schroot-cmd command constructs commandlines like this.

Reported-By: Helmut Grohne
9 years agodeprecate the Section member from package struct
David Kalnischkies [Fri, 13 Jun 2014 06:35:32 +0000 (08:35 +0200)]
deprecate the Section member from package struct

A version belongs to a section and has hence a section member of its
own. A package on the other hand can have multiple versions from
different sections. This was "solved" by using the section which was
parsed first as order of sources.list defines, but that is obviously a
horribly unpredictable thing.

Users are way better of with the Section() as returned by the version
they are dealing with. It is likely the same for all versions of a
package, but in the few cases it isn't, it is important (like packages
moving from main/* to contrib/* or into oldlibs …).

Backport of 7a66977 which actually instantly removes the member.

9 years agouse 'best' hash for source authentication
David Kalnischkies [Sun, 18 Aug 2013 21:27:24 +0000 (23:27 +0200)]
use 'best' hash for source authentication

Collect all hashes we can get from the source record and put them into a
HashStringList so that 'apt-get source' can use it instead of using
always the MD5sum.

We therefore also deprecate the MD5 struct member in favor of the list.

While at it, the parsing of the Files is enhanced so that records which
miss "Files" (aka MD5 checksums) are still searched for other checksums
as they include just as much data, just not with a nice and catchy name.

This is a cherry-pick of 1262d35 with some dirty tricks to preserve ABI.

LP: 1098738

9 years agoadd a simple container for HashStrings
David Kalnischkies [Sun, 18 Aug 2013 21:17:05 +0000 (23:17 +0200)]
add a simple container for HashStrings

APT supports more than just one HashString and even allows to enforce
the usage of a specific hash. This class is intended to help with
storage and passing around of the HashStrings.

The cherry-pick here the un-const-ification of HashType() compared to
f4c3850ea335545e297504941dc8c7a8f1c83358. The point of this commit is
adding infrastructure for the next one. All by itself, it just adds new
symbols.

Git-Dch: Ignore

9 years agoFix incorrect comparison between signed/unsigned
Michael Vogt [Thu, 23 Oct 2014 18:32:01 +0000 (14:32 -0400)]
Fix incorrect comparison between signed/unsigned

Git-Dch: ignore

9 years agoUse sysconf(_SC_ARG_MAX) to find the size of Dpkg::MaxArgBytes
Michael Vogt [Thu, 23 Oct 2014 18:19:32 +0000 (14:19 -0400)]
Use sysconf(_SC_ARG_MAX) to find the size of Dpkg::MaxArgBytes

Instead of hardcoding Dpkg::MaxArgBytes find out about it using
the sysconf(_SC_ARG_MAX) call.

9 years agodoc/examples/configure-index: make "Dpkg::Max{Arg,ArgBytes} match reality
Michael Vogt [Wed, 22 Oct 2014 21:54:08 +0000 (17:54 -0400)]
doc/examples/configure-index: make "Dpkg::Max{Arg,ArgBytes} match reality

Git-Dch: ignore

9 years agoreleasing package apt version 1.0.9.3 1.0.9.3
Michael Vogt [Wed, 15 Oct 2014 17:55:49 +0000 (19:55 +0200)]
releasing package apt version 1.0.9.3

9 years agodon't cleanup cdrom files in apt-get update
David Kalnischkies [Wed, 15 Oct 2014 13:56:53 +0000 (15:56 +0200)]
don't cleanup cdrom files in apt-get update

Regression from merging 801745284905e7962aa77a9f37a6b4e7fcdc19d0 and
b0f4b486e6850c5f98520ccf19da71d0ed748ae4. While fine by itself, merged
the part fixing the filename is skipped if a cdrom source is
encountered, so that our list-cleanup removes what seems to be orphaned
files.

Closes: 765458

9 years agoUpdate Status field values handling
Guillem Jover [Mon, 1 Sep 2014 14:09:48 +0000 (16:09 +0200)]
Update Status field values handling

Remove long obsolete (hold, hold-reinstreq, removal-failed) or just
wrong (post-inst-failed vs postinst-failed) values, that have been
autoconverted by dpkg at run-time to their new equivalents, so there
should not be any such instance in any recent system (removal-failed
since dpkg 1.1.4 in Apr 1996, hold and hold-reinstreq since dpkg
1.2.0 in May 1996). dpkg even stopped doing the mapping in 1.15.4
and 1.15.8 respectively.

At the same time sort the list in the same order as they appear in
the dpkg code.

9 years agomethods/rsh.cc: replace strcat with std::string
Michael Vogt [Wed, 8 Oct 2014 09:35:48 +0000 (11:35 +0200)]
methods/rsh.cc: replace strcat with std::string

Instead of using strcat use a C++ std::string to avoid overflowing
this buffer. Thanks to David Garfield

Closes: #76442

9 years agoadd CVE-2014-7206 to 1.0.9.2
Michael Vogt [Wed, 8 Oct 2014 09:12:45 +0000 (11:12 +0200)]
add CVE-2014-7206 to 1.0.9.2

9 years agoimplement the updated build profile spec
josch [Tue, 19 Aug 2014 08:29:29 +0000 (10:29 +0200)]
implement the updated build profile spec

9 years agoreleasing package apt version 1.0.9.2 1.0.9.2
Michael Vogt [Thu, 2 Oct 2014 20:07:25 +0000 (22:07 +0200)]
releasing package apt version 1.0.9.2

9 years agoapt-get: Create the temporary downloaded changelog inside tmpdir
Guillem Jover [Thu, 2 Oct 2014 15:48:13 +0000 (17:48 +0200)]
apt-get: Create the temporary downloaded changelog inside tmpdir

The code is creating a secure temporary directory, but then creates
the changelog alongside the tmpdir in the same base directory. This
defeats the secure tmpdir creation, making the filename predictable.

Inject a '/' between the tmpdir and the changelog filename.

9 years agodebian/rules: add hardening=+all
Michael Vogt [Wed, 1 Oct 2014 06:22:26 +0000 (08:22 +0200)]
debian/rules: add hardening=+all

Because of dpkg-buildflags we already get most of the hardening
features, +all adds -fPIE and ld -z now

Thanks: Simon Ruderich, Markus Waldeck

9 years agoSet STRIP_FROM_PATH for doxygen
Trần Ngọc Quân [Sun, 28 Sep 2014 08:33:19 +0000 (15:33 +0700)]
Set STRIP_FROM_PATH for doxygen

Signed-off-by: Trần Ngọc Quân <vnwildman@gmail.com>
9 years agoMerge remote-tracking branch 'donkult/feature/generalize-gzipindex' into debian/sid
Michael Vogt [Fri, 26 Sep 2014 16:09:32 +0000 (18:09 +0200)]
Merge remote-tracking branch 'donkult/feature/generalize-gzipindex' into debian/sid

9 years agorewrite compressed indexes test to check with all compressors
David Kalnischkies [Thu, 25 Sep 2014 09:52:41 +0000 (11:52 +0200)]
rewrite compressed indexes test to check with all compressors

Git-Dch: Ignore

9 years agoEnsure that iTFRewritePackageOrder is "MD5sum" to match apt-ftparchive
Michael Vogt [Sun, 21 Sep 2014 19:40:10 +0000 (21:40 +0200)]
Ensure that iTFRewritePackageOrder is "MD5sum" to match apt-ftparchive

The iTFRewritePackageOrder is used in indexcopy to copy and normalize
cdrom Packages files. This change will ensure that there is no
"normalization" that changes MD5sum -> MD5Sum which alters the hash
of the Packages file on disk (oh the irony).

9 years agoFix regression for cdrom: sources from latest security update
Michael Vogt [Sun, 21 Sep 2014 19:23:04 +0000 (21:23 +0200)]
Fix regression for cdrom: sources from latest security update

Skip a reverify for cdrom: sources. The reverify step is actually
harmful here because the apt-cdrom add code uses the indexcopy.cc
which will "normalize" the Packages file from the cdrom when it
writes it to the local disk. This leads to changing the "MD5sum"
field (notice the lower case "s") on the cdrom Packages file to
a "MD5Sum" field on the local file in /var/lib/apt/lists. Which
of course alters the hash and makes apt fail to reverify the file.

9 years agogeneralize Acquire::GzipIndex
Michael Vogt [Sun, 21 Sep 2014 08:18:03 +0000 (10:18 +0200)]
generalize Acquire::GzipIndex

9 years agorelax grep to support newer curl output format
David Kalnischkies [Fri, 19 Sep 2014 22:12:13 +0000 (00:12 +0200)]
relax grep to support newer curl output format

Git-Dch: Ignore

9 years agodisable timestamps in the footer of docs by doxygen
Jérémy Bobbio [Fri, 19 Sep 2014 21:03:55 +0000 (23:03 +0200)]
disable timestamps in the footer of docs by doxygen

The default being 'yes', but this spoils the effort of reproducible
builds for no real gain. (https://wiki.debian.org/ReproducibleBuilds)

9 years agoGerman program translation update
Holger Wansing [Fri, 19 Sep 2014 20:32:14 +0000 (22:32 +0200)]
German program translation update

Closes: 762223

9 years agoFix regression when copy: is used for a relative path
Michael Vogt [Fri, 19 Sep 2014 14:41:55 +0000 (16:41 +0200)]
Fix regression when copy: is used for a relative path

When we do a ReverifyAfterIMS() we use the copy: method to
verify the hashes again. If the user uses -o Dir=./something/relative
this fails because we use the URI class in copy.cc that strips
away the leading relative part. By not using URI this is fixed.

Closes: #762160

9 years agotest/integration/test-apt-update-file: improve test
Michael Vogt [Fri, 19 Sep 2014 14:41:50 +0000 (16:41 +0200)]
test/integration/test-apt-update-file: improve test

9 years ago./pre-release pre-export
Michael Vogt [Thu, 18 Sep 2014 05:59:01 +0000 (07:59 +0200)]
./pre-release pre-export

9 years agoreleasing package apt version 1.0.9.1 1.0.9.1
Michael Vogt [Wed, 17 Sep 2014 20:05:51 +0000 (22:05 +0200)]
releasing package apt version 1.0.9.1

9 years agoMerge remote-tracking branch 'vnwildman/debian/sid' into debian/sid
Michael Vogt [Wed, 17 Sep 2014 20:04:30 +0000 (22:04 +0200)]
Merge remote-tracking branch 'vnwildman/debian/sid' into debian/sid

9 years agoimprove test for commit daff4a
Michael Vogt [Wed, 17 Sep 2014 15:48:27 +0000 (17:48 +0200)]
improve test for commit daff4a

9 years agoFix regression for file:/// uris from CVE-2014-0487
Michael Vogt [Wed, 17 Sep 2014 12:57:05 +0000 (14:57 +0200)]
Fix regression for file:/// uris from CVE-2014-0487

Do not run ReverifyAfterIMS() for local file URIs as this will
causes apt to mess around in the file:/// uri space. This is
wrong in itself, but it will also cause a incorrect verification
failure when the archive and the lists directory are on different
partitions as rename().

9 years agoprepare 1.0.9.1
Michael Vogt [Tue, 16 Sep 2014 18:53:35 +0000 (20:53 +0200)]
prepare 1.0.9.1

9 years agomerge previous upload
Michael Vogt [Tue, 16 Sep 2014 18:51:19 +0000 (20:51 +0200)]
merge previous upload

9 years agoSECURITY UPDATE for CVE-2014-{0488,0487,0489}
Michael Vogt [Tue, 16 Sep 2014 18:23:43 +0000 (20:23 +0200)]
SECURITY UPDATE for CVE-2014-{0488,0487,0489}

incorrect invalidating of unauthenticated data (CVE-2014-0488)
incorect verification of 304 reply (CVE-2014-0487)
incorrect verification of Acquire::Gzip indexes (CVE-2014-0489)

9 years agoadd a 'coverage' command to generate reports
David Kalnischkies [Sun, 14 Sep 2014 20:48:01 +0000 (22:48 +0200)]
add a 'coverage' command to generate reports

Builds, runs and generates everything needed to have a coverage report
at the end for apt. The report isn't perfect as most childs apt forks do
not have a regular exit and so data is never written for them, which
results in e.g. most methods to have zero coverage reported.

Git-Dch: Ignore

9 years agoTurkish program translation update
Mert Dirik [Sun, 14 Sep 2014 21:04:03 +0000 (23:04 +0200)]
Turkish program translation update

Closes: 761394

9 years agoUpdated German documentation translation
Chris Leick [Sun, 14 Sep 2014 12:48:10 +0000 (14:48 +0200)]
Updated German documentation translation

9 years agol10n: vi.po (636t): Update program translation
Trần Ngọc Quân [Fri, 12 Sep 2014 07:13:36 +0000 (14:13 +0700)]
l10n: vi.po (636t): Update program translation

Signed-off-by: Trần Ngọc Quân <vnwildman@gmail.com>
9 years agoAllow override of Proxy-Auto-Detect by the users configuration
Michael Vogt [Fri, 12 Sep 2014 09:44:11 +0000 (11:44 +0200)]
Allow override of Proxy-Auto-Detect by the users configuration

Only run the Proxy-Auto-Detect code if there is not already
a host specific configuration.

Closes: 759264

9 years agoprepare 1.0.8 1.0.8
Michael Vogt [Tue, 9 Sep 2014 18:10:41 +0000 (20:10 +0200)]
prepare 1.0.8

9 years agodebian/gbp.conf: use export-dir
Michael Vogt [Tue, 9 Sep 2014 18:50:34 +0000 (20:50 +0200)]
debian/gbp.conf: use export-dir

9 years agodon't call pager in non-terminals for changelog
David Kalnischkies [Tue, 9 Sep 2014 11:52:32 +0000 (13:52 +0200)]
don't call pager in non-terminals for changelog

Most pagers are nice and default to running non-interactively if they
aren't connected to a terminal and we relied on that. On ci.debian.net
the configured pager is printing a header out of nowhere though, so if
we are printing to a non-terminal we call "cat" instead.

In the rework we also "remove" the dependency on sensible-utils in sofar
as we call some alternatives if calling the utils fail.

This seems to be the last problem preventing a "PASS" status on
ci.debian.net, so we close the associated bugreport.

Closes: 755040

9 years agorework PTY magic to fix stair-stepping on kfreebsd
David Kalnischkies [Mon, 8 Sep 2014 19:05:11 +0000 (21:05 +0200)]
rework PTY magic to fix stair-stepping on kfreebsd

A pty slave we have got from openpty can only be used for one dpkg
child, if we give it to a second child on kfreebsd setting TIOCSCTTY
fails causing the output to be stair-stepped from now on.

By switching the code to creating a master and opening a new slave in
the child for each child we can fix this glitch, so that at least the
master remains stable.

Closes: 759684

9 years agofix progress report for upgrade and reinstall
David Kalnischkies [Mon, 8 Sep 2014 15:14:17 +0000 (17:14 +0200)]
fix progress report for upgrade and reinstall

APT treats upgrades like installs and dpkg is very similar in this, but
prints still a slightly different processing message indicating that it
is really an upgrade which we hadn't parsed so far, but this wasn't
really visible as we quickly moved on to a 'known' state.

More problematic was the reinstall case as apt hadn't recognized this
for the package name detection, so that reinstalls had no progress since
we introduced MultiArch.

9 years agofix and non-silent fail dpkg-overwrite error test
David Kalnischkies [Sun, 7 Sep 2014 20:08:01 +0000 (22:08 +0200)]
fix and non-silent fail dpkg-overwrite error test

Commit cbcdd3ee9d86379d1b3a44e41ae8b17dc23111d0 removes the space at the
end of the debfile name dpkg send to us and we previously had included
in the pmerror message we printed on the statusfd.

Git-Dch: Ignore

9 years agostrip everything spacey in APT::String::Strip
David Kalnischkies [Sun, 7 Sep 2014 19:27:57 +0000 (21:27 +0200)]
strip everything spacey in APT::String::Strip

Git-Dch: Ignore

9 years agodetect terminal output with 'test -t' in tests
David Kalnischkies [Sun, 7 Sep 2014 17:30:33 +0000 (19:30 +0200)]
detect terminal output with 'test -t' in tests

Instead of trying to inspect /proc and the fds inside we use "test -t 1"
instead as this is available and working on kfreebsd as well – not that
something breaks if we wouldn't, but we like color.

Git-Dch: Ignore

9 years agodo use an 'unknown' arch-specification in test
David Kalnischkies [Sun, 7 Sep 2014 17:28:21 +0000 (19:28 +0200)]
do use an 'unknown' arch-specification in test

Using 'kfreebsd' here makes the test fail on a kfreebsd system
(obviously), so we just use something totally madeup in the hope that
this is less like to conflict in the future.

Git-Dch: Ignore

9 years agomake GetLocalitySortedVersionSet more generic
David Kalnischkies [Tue, 2 Sep 2014 16:20:49 +0000 (18:20 +0200)]
make GetLocalitySortedVersionSet more generic

No reason in and of by itself at the moment, but prepares for the goal
of having 'apt search' and 'apt-cache search' using the same code now
that they at least support the same stuff. The 'apt' code is just a
multitude slower at the moment…

Git-Dch: Ignore

9 years agoimplement --full in apt search
David Kalnischkies [Tue, 2 Sep 2014 12:32:48 +0000 (14:32 +0200)]
implement --full in apt search

9 years agouse a format string in ListSingleVersion
David Kalnischkies [Mon, 1 Sep 2014 19:43:15 +0000 (21:43 +0200)]
use a format string in ListSingleVersion

The method already deals with a format string, but had an else path
doing a hardcoded format as well. This is changed now to use the same
code for both - the format in the second case is still fixed though.

Git-Dch: Ignore

9 years agoskip version if we already have this package as search-result
David Kalnischkies [Mon, 1 Sep 2014 17:09:40 +0000 (19:09 +0200)]
skip version if we already have this package as search-result

Git-Dch: Ignore

9 years agosupport regular expressions in 'apt search'
David Kalnischkies [Sat, 30 Aug 2014 09:29:45 +0000 (11:29 +0200)]
support regular expressions in 'apt search'

apt-cache search supported this since ever and in the code for apt was a
fixme indicating this should be added here as well, so here we go.

9 years agoImprove Debug::Acquire::http debug output
Michael Vogt [Fri, 5 Sep 2014 14:24:32 +0000 (16:24 +0200)]
Improve Debug::Acquire::http debug output

Prefix all answers with the URL that the answer is for. This
helps when debugging and pipeline is enabled.

9 years agoEnsure we have a Policy in CacheFile.BuildDepCache()
Michael Vogt [Fri, 5 Sep 2014 10:50:15 +0000 (12:50 +0200)]
Ensure we have a Policy in CacheFile.BuildDepCache()

This partly reverts d059cc2 and fixes bug #753297 in a more
general way by ensuring that CacheFile.BuildDepCache() builds
a pkgPolicy if there isn't one already.

9 years agoFix incorrect upgradable listing in "apt list" (thanks to Michael Musenbrock)
Michael Vogt [Fri, 5 Sep 2014 10:03:28 +0000 (12:03 +0200)]
Fix incorrect upgradable listing in "apt list" (thanks to Michael Musenbrock)

The "apt list" command was using only the pkgDepCache but not the
pkgPolicy to figure out if a package is upgradable. This lead to
incorrect display of upgradable package when the user used the
policy to pin-down packages. Thanks to Michael Musenbrock for the
initial patch.

Closes: #753297

9 years agotest/integration/test-ubuntu-bug-346386-apt-get-update-paywall: use downloadfile()
Michael Vogt [Wed, 3 Sep 2014 14:54:16 +0000 (16:54 +0200)]
test/integration/test-ubuntu-bug-346386-apt-get-update-paywall: use downloadfile()

9 years agoRun autopkgtest tests with "env -i" to avoid pollution from the host env
Michael Vogt [Tue, 2 Sep 2014 15:30:45 +0000 (17:30 +0200)]
Run autopkgtest tests with "env -i" to avoid pollution from the host env

Closes: #759655

9 years agoMake Packages & Sources generation optional, during Generate call
Dimitri John Ledkov [Fri, 18 Jul 2014 15:06:34 +0000 (16:06 +0100)]
Make Packages & Sources generation optional, during Generate call

refactor a bit, extract code out of Generate() into
DoGenerate{PackagesAndSources,Contents}, add new
APT::FTPArchive::ContentsOnly option to allow skipping the generation
of Package/Source files (if they are generated e.g. by some db outside
of apt-ftparchives control)

9 years agoUse heap to allocate PatternMatch to avoid potential stack overflow
Michael Vogt [Tue, 2 Sep 2014 15:06:52 +0000 (17:06 +0200)]
Use heap to allocate PatternMatch to avoid potential stack overflow

When apt-cache search with many args (> 130) is given the allocation
of PatternMatch on the stack may fail resulting in a segmentation
fault. By using the heap the max size is much bigger and we also
get a bad_alloc expection instead of a segfault (which we can catch
*if* this ever becomes a pratical problem). No test for the crash
as its not reproducable with the MALLOC_ settings in framework.

Closes: 759612

9 years ago* apt-pkg/deb/dpkgpm.cc:
Michael Vogt [Tue, 2 Sep 2014 15:24:24 +0000 (17:24 +0200)]
* apt-pkg/deb/dpkgpm.cc:
    - update string matching for dpkg I/O errors. (LP: #1363257)
    - properly parse the dpkg status line so that package name is properly set
      and an apport report is created. Thanks to Anders Kaseorg for the patch.
      (LP: #1353171)

9 years agoAdd testcase for apt list --all-versions
Michael Vogt [Tue, 2 Sep 2014 14:36:32 +0000 (16:36 +0200)]
Add testcase for apt list --all-versions

Dch-Ignore: true

9 years agoAvoid yielding blank lines with APT::Cmd::use-format=true
Andreas Oberritter [Tue, 2 Sep 2014 14:34:05 +0000 (16:34 +0200)]
Avoid yielding blank lines with APT::Cmd::use-format=true

9 years agoMake Proxy-Auto-Detect check for each host
Michael Vogt [Tue, 2 Sep 2014 13:50:19 +0000 (15:50 +0200)]
Make Proxy-Auto-Detect check for each host

When doing Acquire::http{,s}::Proxy-Auto-Detect, run the auto-detect
command for each host instead of only once. This should make using
"proxy" from libproxy-tools feasible which can then be used for PAC
style or other proxy configurations.

Closes: #759264