Michael Vogt [Wed, 4 Jun 2014 10:39:36 +0000 (12:39 +0200)]
Add compat mode for old (32bit FileSize) CacheDB (LP: #
1274466)
Michael Vogt [Wed, 28 May 2014 08:00:52 +0000 (10:00 +0200)]
Fix warning about uninitialized variable
Reported-By: clang++ -Werror
Michael Vogt [Wed, 28 May 2014 07:24:58 +0000 (09:24 +0200)]
Fix uninitialized value
Reported-By: scan-build
Michael Vogt [Tue, 27 May 2014 21:42:10 +0000 (23:42 +0200)]
use free() instead of delete[] in debSrcRecordParser::~debSrcRecordParser
The Buffer was allocated using strndup() so we need to free it using
free() instead of delete[]
Michael Vogt [Tue, 27 May 2014 15:49:53 +0000 (17:49 +0200)]
Do not try to cast a pkgDepCache::Policy to a pkgCache
Fix incorrect cast in pkgDepCache::Policy::GetCandidateVer()
Reported-By: clang -fsanitize=address -fno-omit-frame-pointer
Michael Vogt [Tue, 27 May 2014 14:25:43 +0000 (16:25 +0200)]
use free() instead of delete() when realloc is used
ContentsExtract::~ContentsExtract() needs to use free() because
Data got allocated via realloc()
Reported-By: clang -fsanitize=address -fno-omit-frame-pointer
Michael Vogt [Tue, 27 May 2014 12:09:48 +0000 (14:09 +0200)]
Merge remote-tracking branch 'upstream/debian/sid' into debian/sid
Michael Vogt [Thu, 15 May 2014 12:37:33 +0000 (14:37 +0200)]
Never parse Version/Architecture tags in a Translation-$lang file
Version/Architecture information in a Translation-$lang file is
not allowed, so don't try to parse it. This is a fix for a bugreport
where a Translation-en file contained the content of the regular
Packages file (probably due to local FS corruption). This lead to
strange error messages on file download.
Thanks to Thomas Reusch for the report.
Michael Vogt [Thu, 8 May 2014 09:51:09 +0000 (11:51 +0200)]
Merge remote-tracking branch 'mvo/feature/apt-ftparchive-srccache2' into debian/sid
Michael Vogt [Thu, 8 May 2014 09:46:29 +0000 (11:46 +0200)]
fix regression from commit
215b0faf
Michael Vogt [Wed, 7 May 2014 19:03:45 +0000 (21:03 +0200)]
show progress in run-tests
Michael Vogt [Wed, 7 May 2014 16:10:01 +0000 (18:10 +0200)]
Merge remote-tracking branch 'mvo/feature/apt-ftparchive-srccache2' into debian/sid
Michael Vogt [Wed, 7 May 2014 16:09:11 +0000 (18:09 +0200)]
Merge remote-tracking branch 'donkult/debian/sid' into debian/sid
Michael Vogt [Mon, 5 May 2014 14:26:12 +0000 (16:26 +0200)]
prepare release 1.0.3
Michael Vogt [Mon, 5 May 2014 14:24:52 +0000 (16:24 +0200)]
Revert "add bash completion for the "apt" command"
This reverts commit
697c9314c8ba24f3e393b5de11a3fad7adae4bfc.
Conflicts:
debian/rules
Michael Vogt [Mon, 5 May 2014 14:03:03 +0000 (16:03 +0200)]
Merge remote-tracking branch 'upstream/debian/sid' into debian/sid
Michael Vogt [Wed, 30 Apr 2014 15:04:29 +0000 (17:04 +0200)]
Only do openpty() if both stdin/stdout are terminals
Closes: 746434
David Kalnischkies [Mon, 28 Apr 2014 15:36:54 +0000 (17:36 +0200)]
initialize Verify in second pkgAcqIndex constructor
gcc reports in testcase ./test-bug-596498-trusted-unsigned-repo:
apt-pkg/acquire-item.cc:1059:7: runtime error: load of value 234, which
is not a valid value for type 'bool'
This happens as the bool Verify is initialized only in one of the two
constructors of the pkgAcqIndex class. It isn't a problem through as the
verification controlled by this flag is optional and used to fail early
on garbage files (like network portal pages) instead of later on in the
hashsum verification or while parsing (the then untrusted) file.
Reported-By: gcc-4.9 -fsanitize=undefined
Michael Vogt [Mon, 28 Apr 2014 11:41:33 +0000 (13:41 +0200)]
Fix missing ScreenWidth check in apt.cc
Michael Vogt [Mon, 28 Apr 2014 10:57:01 +0000 (12:57 +0200)]
debian/apt-doc.docs: remove README.MultiArch
Trần Ngọc Quân [Mon, 28 Apr 2014 02:27:44 +0000 (09:27 +0700)]
l10n: vi.po: Update one new string
Signed-off-by: Trần Ngọc Quân <vnwildman@gmail.com>
David Kalnischkies [Sat, 26 Apr 2014 11:31:41 +0000 (13:31 +0200)]
allow vendors to install configuration files
Vendors like ubuntu need to change some options, so giving them
a way to do this less painfully avoids reducing differences.
Adam Conrad [Sat, 26 Apr 2014 08:24:40 +0000 (10:24 +0200)]
fix FileFd::Size bitswap on big-endian architectures
gzip only gives us 32bit of size, storing it in a 64bit container and
doing a 32bit flip on it has therefore unintended results.
So we just go with a exact size container and let the flipping be handled
by eglibc provided le32toh removing our #ifdef machinery.
Closes: 745866
David Kalnischkies [Thu, 24 Apr 2014 08:49:41 +0000 (10:49 +0200)]
enforce LFS for partial files in https range requests
David Kalnischkies [Thu, 24 Apr 2014 08:33:57 +0000 (10:33 +0200)]
remove unused duplicated acqprogress.{cc,h} files
Those files are in apt-private and used from there.
Git-Dch: Ignore
David Kalnischkies [Thu, 24 Apr 2014 08:20:45 +0000 (10:20 +0200)]
build http request in a stringstream
beside reducing code a bit, it avoids oddball problems while building
the string and doesn't trigger static analyse warnings.
David Kalnischkies [Tue, 22 Apr 2014 17:02:53 +0000 (19:02 +0200)]
remove outdated README.MultiArch
Debian wheezy shipped MultiArch to the masses and the predictions
remained true in sofar as little changes in apt itself and many
other frontends were needed compared to the fallout if done differently.
The info included is this file is therefore no longer current and adds
no useful information anymore, so we can drop it for good.
David Kalnischkies [Tue, 22 Apr 2014 16:59:22 +0000 (18:59 +0200)]
add a README for vendor information
Mahyuddin Ramli [Tue, 22 Apr 2014 15:32:37 +0000 (17:32 +0200)]
add vendor information for BlankOn
Modified by commiter to not publicily export the codename (as the
manpages do not use it that way) and removing the included additional
derives logic as it was not working (the link always exists at that
point) and isn't needed as we do the special casing for debian mainly
because it would shallow all distributions otherwise.
(similar, but not that strong for ubuntu)
Closes: 743595
David Kalnischkies [Mon, 21 Apr 2014 11:26:55 +0000 (13:26 +0200)]
handle pkgnames shorter than modifiers
The bugreport highlights the problem with an empty package name. We fix
this by 'ignoring' these so that it behaves just like "apt-get install".
The deeper problem is that modifier strings can be longer than a package
name in which case the comparison doesn't make sense, so don't compare
then. Was not noticed so far as all modifiers are of length 1, so the
only package name shorter than this is in fact the empty package name.
Closes: 744940
John Ogness [Mon, 21 Apr 2014 09:54:34 +0000 (11:54 +0200)]
properly undo CD-ROM mount in all error cases
In bug #740673 various issues in the CD-ROM handling code were
identified, while most the issues ended up being fixed in another way,
the unmounting of the CD-ROM in error cases was not tackled so far.
(The patch was modified by the commiter to apply)
Michael Vogt [Fri, 25 Apr 2014 16:18:28 +0000 (18:18 +0200)]
provide support for debian/apt.conf.$(lsb_release -i -s) vendor specific config files
Michael Vogt [Fri, 25 Apr 2014 13:16:46 +0000 (15:16 +0200)]
add bash completion for the "apt" command
Michael Vogt [Fri, 25 Apr 2014 12:41:35 +0000 (14:41 +0200)]
reduce delta from ubuntu
Michael Vogt [Fri, 25 Apr 2014 11:16:18 +0000 (13:16 +0200)]
prepare release 1.0.2
Michael Vogt [Tue, 22 Apr 2014 14:21:05 +0000 (16:21 +0200)]
Merge remote-tracking branch 'upstream/debian/sid' into debian/sid
James McCoy [Mon, 21 Apr 2014 20:35:28 +0000 (16:35 -0400)]
Consistently use Dpkg::Progress* in documentation
Closes: 745452
Theppitak Karoonboonyanan [Tue, 22 Apr 2014 13:21:38 +0000 (15:21 +0200)]
Updated Thai program translation (closes: #745120)
Michael Vogt [Tue, 22 Apr 2014 13:19:17 +0000 (15:19 +0200)]
Merge remote-tracking branch 'donkult/debian/sid' into debian/sid
Michael Vogt [Tue, 22 Apr 2014 13:14:03 +0000 (15:14 +0200)]
Fix option name DPkg::Progress-Fancy in apt.8 manpage (LP: #
1310506)
Michael Vogt [Tue, 22 Apr 2014 13:10:19 +0000 (15:10 +0200)]
apt-private/acqprogress.cc: fix output when ctrl-c is hit during apt update (LP: #
1310548, closes: #744297)
David Kalnischkies [Wed, 16 Apr 2014 20:47:25 +0000 (22:47 +0200)]
support dist-upgrade options in full-upgrade
dist-upgrade is supposed to be an alias for full-upgrade in apt, but
dist-upgrade was the only command recognized of the two in the option
and flags recognition code.
David Kalnischkies [Wed, 16 Apr 2014 20:06:22 +0000 (22:06 +0200)]
extract travis installs from build-depends automatically
I forgot to add libgtest-dev to the list of packages to install on
travis, so this slightly hacky oneliner might prevent us from having
the same problem again if we happen to change dependencies again.
Git-Dch: Ignore
David Kalnischkies [Wed, 16 Apr 2014 15:09:37 +0000 (17:09 +0200)]
use Google C++ Testing Framework for libapt tests
My commit
45df0ad2 from 26. Nov 2009 had a little remark:
"The commit also includes a very very simple testapp."
This was never intended to be permanent, but as usually…
The commit adds the needed make magic to compile gtest statically
as it is required and links it against a small runner. All previous
testcase binaries are reimplemented in gtest and combined in this
runner. While most code is a 1:1 translation some had to be rewritten
like compareversion_test.cc, but the coverage remains the same.
David Kalnischkies [Tue, 15 Apr 2014 08:21:52 +0000 (10:21 +0200)]
clear HitEof flag in FileFd::Seek
fseek and co do this to their eof-flags and it is more logic this way as
we will usually seek away from the end (e.g. to re-read the file).
The commit also improves the testcase further and adds a test for the
binary compressor codepath (as gz, bzip2 and xz are handled by
libraries) via the use of 'rev' as a 'compressor'.
Michael Vogt [Wed, 16 Apr 2014 11:15:55 +0000 (13:15 +0200)]
apt-private/acqprogress.cc: reset color in apt update
David Kalnischkies [Mon, 14 Apr 2014 15:12:09 +0000 (17:12 +0200)]
force fancy progressbar redraw on window size change
We always reacted on the size change, but the bar is only redraw if the
precentage changes, which can take quiet a while in big upgrades, so
with a bit of refactoring we can now call for a redraw immediate to fix
this.
This refactor also helps in avoiding obscure pitfalls clangs static
analyser was complaining about (namely failure of ioctl resulting in
garbage values in the struct).
David Kalnischkies [Sun, 13 Apr 2014 19:40:35 +0000 (21:40 +0200)]
compile with absolute paths to allow lcov use
Instructing gcc (or clang) to prepare for capturing coverage data is
easy: Just build with: CXXFLAGS=--coverage
The hard part is that our buildsystem uses relative paths and so
confuses the hell out of lcov as it assumes this way that all our *.cc
files are in the same directory… by changing to absolute paths in the
compile rules we solve this problem.
Still not perfect as it refers to build/include files for most headers
and our forking/threading code isn't properly captured, but good enough
to see red reports for now:
CXXFLAGS=--coverage make
make test
./test/integration/run-tests -q
lcov --no-external --directory . --capture --output-file apt.info
genhtml --output-directory ./coverage/ apt.info
Git-Dch: Ignore
Trần Ngọc Quân [Fri, 11 Apr 2014 18:19:40 +0000 (20:19 +0200)]
l10n: vi.po (624t): Update translation
Signed-off-by: Michael Vogt <mvo@debian.org>
Michael Vogt [Fri, 11 Apr 2014 12:40:08 +0000 (14:40 +0200)]
Merge remote-tracking branch 'mvo/feature/helpful-apt-list' into debian/sid
Conflicts:
test/integration/test-apt-cli-list
Michael Vogt [Fri, 11 Apr 2014 12:39:28 +0000 (14:39 +0200)]
Merge remote-tracking branch 'mvo/bugfix/apt-list-rc-pkgs' into debian/sid
David Kalnischkies [Fri, 11 Apr 2014 11:33:31 +0000 (13:33 +0200)]
consider priorities only for downloadable pkgs in resolver
A package which can't be downloaded anymore is very likely dropped from
a release and can therefore no longer be 'standard' (or similar). We
therefore do not grant points for them anymore and demote them to
prio:extra instead which helps other packages breaking them away even if
they have a lower priority.
The testcase was initially created by Michael Vogt and just amended.
David Kalnischkies [Fri, 11 Apr 2014 09:29:31 +0000 (11:29 +0200)]
extend FileFd test behond basic permission tests
We now do Open, Write and Read (the later multiple ways) for each
permission and each compressor we have configured to cover more cases
and especially ensure that compressors do not change our premissions.
This test is also to be credited for discovering the skippos-fix.
Git-Dch: Ignore
David Kalnischkies [Fri, 11 Apr 2014 09:22:10 +0000 (11:22 +0200)]
deal with umask only if we really need to for mkstemp
As the comment actually says: open() does the umask dance by itself, so
we don't need to do it for it. We have to do it after mkstemp in Atomic
though, so move it into the if.
Also removes the "micro-optimisation" "FilePermissions == 600" as it
doesn't trigger at the moment anyway as 600 != 0600.
David Kalnischkies [Fri, 11 Apr 2014 09:18:58 +0000 (11:18 +0200)]
don't double-count seeks in FileFd::Skip for bzip/xz
FileFd::Read already deals with the increase of the skipposition so that
we as the caller in FileFd::Skip really shouldn't increase it, too.
David Kalnischkies [Fri, 11 Apr 2014 09:16:04 +0000 (11:16 +0200)]
do not create an (additional) empty compressor
FileFd code knows how to deal with such a compressor, so it isn't a
problem, but it is absolutely not needed as we already have an
(matching) identity compressor with '.' earlier in the list.
Git-Dch: Ignore
David Kalnischkies [Sun, 23 Mar 2014 13:09:12 +0000 (14:09 +0100)]
be able to run abicheck from any directory
Git-Dch: Ignore
David Kalnischkies [Sun, 23 Mar 2014 12:17:24 +0000 (13:17 +0100)]
use wildcard to get files in our library makefiles
The explicit listing is a pain every time you want to add a file to the
list and serves no propose as we list all files there anyway, so this is
not only easier but also documents this fact.
Git-Dch: Ignore
Michael Vogt [Thu, 10 Apr 2014 11:53:28 +0000 (13:53 +0200)]
fix test-failure in adt
Michael Vogt [Thu, 10 Apr 2014 07:49:25 +0000 (09:49 +0200)]
prepare 1.0.1 release
Josef Vitu [Thu, 10 Apr 2014 07:33:14 +0000 (09:33 +0200)]
apt: Minor typo in 'apt' man page (closes: #743657)
Michael Vogt [Thu, 10 Apr 2014 07:15:03 +0000 (09:15 +0200)]
Merge remote-tracking branch 'mvo/bugfix/lp1304657-perms' into debian/sid
Michael Vogt [Thu, 10 Apr 2014 07:14:57 +0000 (09:14 +0200)]
Merge remote-tracking branch 'mvo/bugfix/apt-search-case' into debian/sid
Michael Vogt [Thu, 10 Apr 2014 07:11:57 +0000 (09:11 +0200)]
improve umask/fchmod code readability
Michael Vogt [Wed, 9 Apr 2014 08:24:47 +0000 (10:24 +0200)]
Rename FileFd::Open() Perms to AccessMode
Bug lp:#
1304657 was caused by confusion around the name Perms.
The new name AccessMode should make it clear that its not the
literal file permissions but instead the AccessMode passed to
open() (i.e. the umask needs to be applied)
Michael Vogt [Wed, 9 Apr 2014 08:12:10 +0000 (10:12 +0200)]
Fix insecure file permissions when using FileFd with OpenMode::Atomic
Commit
7335eebea6dd43581d4650a8818b06383ab89901 introduced a bug
that caused FileFd to create insecure permissions when FileFd::Atomic
is used. This commit fixes the permissions and adds a test.
The bug is most likely caused by the confusing "Perm" parameter
that is passed to Open() - its not the file permissions but intead
the "mode" part of open/creat.
Michael Vogt [Wed, 9 Apr 2014 14:23:14 +0000 (16:23 +0200)]
Notice the user about "apt list -a" when only a single hit if found
If the user is using "apt list pattern" and there is only a single
hit, notice about "--all-versions" as this is what the user may
be interessted in
Michael Vogt [Wed, 9 Apr 2014 13:28:00 +0000 (15:28 +0200)]
Fix possible race when stunnel/aptwebserver create their PID files
This patch should fix spurious test failures in jenkins or travis
that are caused by a race condition in the {stunnel,aptwebserver}.pid
file creation
Michael Vogt [Tue, 8 Apr 2014 07:04:15 +0000 (09:04 +0200)]
fix apt list output for pkgs in dpkg ^rc state
Packages in the "deinstall ok config-file" have no candidate or
instaleld version. So they must be special cased in the apt list
generation.
Michael Vogt [Tue, 8 Apr 2014 06:31:14 +0000 (08:31 +0200)]
Merge branch 'bugfix/apt-search-case' into debian/sid
Michael Vogt [Mon, 7 Apr 2014 14:40:12 +0000 (16:40 +0200)]
make apt search case-insensitive by default
Julian Andres Klode [Mon, 7 Apr 2014 09:11:06 +0000 (11:11 +0200)]
Add versioned openjdk-6-jdk breaks
This helps if people did unclean upgrades from squeeze, namely to
jessie directly.
Julian Andres Klode [Mon, 7 Apr 2014 09:01:07 +0000 (11:01 +0200)]
Version the Breaks/Replaces for sun-java{5,6}-jdk (LP: #
1302736)
This is a *hack* to work around unofficial packages for Java 7
and 8 that wrongly provide the Java 5 and 6 packages.
Closes: #743616
Michael Vogt [Mon, 7 Apr 2014 07:41:20 +0000 (09:41 +0200)]
ensure "--db" also works with the new srcpkgdb
Michael Vogt [Fri, 4 Apr 2014 15:21:40 +0000 (17:21 +0200)]
refactor _InitQuery()
Michael Vogt [Fri, 4 Apr 2014 15:09:43 +0000 (17:09 +0200)]
ensure clean works
Michael Vogt [Fri, 4 Apr 2014 14:15:26 +0000 (16:15 +0200)]
refactor to make OpenFile/OpenDebFile more robust
Michael Vogt [Fri, 4 Apr 2014 13:36:42 +0000 (15:36 +0200)]
add test for binary cachedb and contents generation
Michael Vogt [Fri, 4 Apr 2014 12:30:17 +0000 (14:30 +0200)]
Implement CacheDB for source packages in apt-ftparchive
Michael Vogt [Fri, 4 Apr 2014 10:16:22 +0000 (12:16 +0200)]
Fix crash in "apt list" when a sources.list file is unreable
Closes: 743413
Michael Vogt [Tue, 1 Apr 2014 13:50:00 +0000 (15:50 +0200)]
releasing package apt version 1.0
Michael Vogt [Tue, 1 Apr 2014 13:37:23 +0000 (15:37 +0200)]
add sun-java{5,6}-jdk to breaks/replaces as that provided a "apt" binary as well
Michael Vogt [Tue, 1 Apr 2014 12:44:24 +0000 (14:44 +0200)]
install "apt" binary by default
Michael Vogt [Tue, 1 Apr 2014 12:25:33 +0000 (14:25 +0200)]
prepare release
Michael Vogt [Tue, 1 Apr 2014 12:24:17 +0000 (14:24 +0200)]
remove no longer needed apt.7 page
Michael Vogt [Tue, 1 Apr 2014 12:10:34 +0000 (14:10 +0200)]
fix small apt.8.xml issues
Michael Vogt [Tue, 1 Apr 2014 12:02:16 +0000 (14:02 +0200)]
refresh po/pot and unfuzzy apt-extracttemplate change
Trần Ngọc Quân [Fri, 28 Mar 2014 07:52:34 +0000 (14:52 +0700)]
debian: Add default compress option to xz
Signed-off-by: Trần Ngọc Quân <vnwildman@gmail.com>
Trần Ngọc Quân [Fri, 28 Mar 2014 07:50:29 +0000 (14:50 +0700)]
l10n: vi.po (623t): Update Vietnamese translation
Signed-off-by: Trần Ngọc Quân <vnwildman@gmail.com>
Michael Vogt [Tue, 1 Apr 2014 10:44:08 +0000 (12:44 +0200)]
Merge remote-tracking branch 'mvo/feature/apt-manpage' into debian/sid
Conflicts:
cmdline/apt.cc
Michael Vogt [Tue, 1 Apr 2014 10:33:00 +0000 (12:33 +0200)]
add "full-upgrade" to the apt.5.xml documentation
Michael Vogt [Tue, 1 Apr 2014 10:28:56 +0000 (12:28 +0200)]
Merge remote-tracking branch 'upstream/debian/sid' into feature/apt-manpage
Conflicts:
cmdline/apt.cc
Michael Vogt [Tue, 1 Apr 2014 10:21:46 +0000 (12:21 +0200)]
Merge remote-tracking branch 'mvo/feature/more-fancy-progress' into debian/sid
Michael Vogt [Tue, 1 Apr 2014 10:21:34 +0000 (12:21 +0200)]
enable DPkg::Progress-Fancy by default
Michael Vogt [Tue, 1 Apr 2014 10:21:10 +0000 (12:21 +0200)]
Merge remote-tracking branch 'mvo/debian/sid' into debian/sid
Michael Vogt [Tue, 1 Apr 2014 10:17:17 +0000 (12:17 +0200)]
do not crash on SIGPIPE in pkgDPkgPM::RunScriptsWithPkgs()
If a external command closes the PIPE unexpectedly, do not crash
in pkgDPkgPM::RunScriptsWithPkgs but ignore the SIGPIPE.
Michael Vogt [Tue, 1 Apr 2014 09:30:00 +0000 (11:30 +0200)]
Add new Debug::RunScripts option
This debug option will display all scripts that are run
by apts RunScripts and RunScriptsWithPkgs helpers.
Michael Vogt [Thu, 27 Mar 2014 14:20:49 +0000 (15:20 +0100)]
Merge branch 'debian/sid' into feature/more-fancy-progress
Michael Vogt [Thu, 27 Mar 2014 14:19:29 +0000 (15:19 +0100)]
Merge remote-tracking branch 'upstream/debian/sid' into debian/sid
Michael Vogt [Thu, 27 Mar 2014 09:14:30 +0000 (10:14 +0100)]
Use mkstemp() in apt-extracttemplaes (closes: #741627)
Use mkstemp() in apt-extractemplates and add a integrationtest
for apt-extracttemplates too. Thanks to Steve Kemp for the report.