ntk/apt.git
10 years agosome more coverity fixes
Michael Vogt [Mon, 12 Aug 2013 15:24:15 +0000 (17:24 +0200)]
some more coverity fixes

10 years agomemset() pkgTagSections data to make coverity happy
Michael Vogt [Tue, 6 Aug 2013 07:13:27 +0000 (09:13 +0200)]
memset() pkgTagSections data to make coverity happy

10 years agoMerge remote-tracking branch 'upstream/debian/sid' into bugfix/coverity
Michael Vogt [Mon, 5 Aug 2013 20:51:30 +0000 (22:51 +0200)]
Merge remote-tracking branch 'upstream/debian/sid' into bugfix/coverity

10 years agofix some unitialized data members
Michael Vogt [Mon, 5 Aug 2013 20:40:28 +0000 (22:40 +0200)]
fix some unitialized data members

10 years agoVietnamese translation update. Closes: #718615
Christian PERRIER [Sat, 3 Aug 2013 14:07:13 +0000 (16:07 +0200)]
Vietnamese translation update. Closes: #718615

10 years agoprefer native arch over higher priority for providers
Colin Watson [Thu, 1 Aug 2013 11:19:43 +0000 (13:19 +0200)]
prefer native arch over higher priority for providers

The rational from the buglog:
> The problem here is that the Priority field in one of the Packages files
> is incorrect due to a mishap with reprepro configuration, […] the
> amd64 version is Priority: standard but the arm64 version is Priority:
> optional (and has a stray "optional: interpreters" field).
> […]
> However, Priority is a rather weak property of a package because it's
> typically applied via overrides, and it's easy for maintainers of
> third-party repositories to misconfigure them so that overrides aren't
> applied correctly.  It shouldn't be ranked ahead of choosing packages
> from the native architecture.  In this case, I have no user-mode
> emulation for arm64 set up, so choosing m4:arm64 simply won't work.

This effectly makes the priority the least interesting data point in
chosing a provider, which is in line with the other checks we have
already order above priority in the past and also has a certain appeal by
the soft irony it provides.

Closes: #718482

10 years agounset LANGUAGE for showing [Y/n] answer hints
David Kalnischkies [Thu, 1 Aug 2013 10:58:20 +0000 (12:58 +0200)]
unset LANGUAGE for showing [Y/n] answer hints

nl_langinfo is used to acquire the YESEXPR of the language used,
but it will return the one from LC_MESSAGES, which might be different
from the language chosen for display of the question (based on LANGUAGE)
so this commit removes the [Y/n] help text from the questions itself and
moves it to the prompt creation in which the usage of LC_MESSAGES is
forced for it, so that the helptext shown actually represents the
characters accepted as input for the question.

There is still room for problems of course starting with an untranslated
"[Y/n]" but a translated YESEXPR or the problem that the question is
asked in a completely different language which might have a conflicting
definition of [Y/n] input or the user simple ignores the helptext and
assumes that an answer matching the question language is accepted, but
the mayority of users will never have this problem to begin with, so we
should be fine (or at least a bit finer than before).

Closes nothing really, but should at least help a bit with bugs like
deb:194614, deb:471102, lp:1205578, and countless others.

10 years agoMerge remote-tracking branch 'mvo/bugfix/coverity' into debian/sid
Michael Vogt [Sun, 28 Jul 2013 07:25:57 +0000 (09:25 +0200)]
Merge remote-tracking branch 'mvo/bugfix/coverity' into debian/sid

10 years agorun "doxygen -u" to update doxygen config
David Kalnischkies [Fri, 26 Jul 2013 22:28:10 +0000 (00:28 +0200)]
run "doxygen -u" to update doxygen config

Git-Dch: Ignore

10 years agoupdate the symbol files to reflect current state
David Kalnischkies [Fri, 26 Jul 2013 21:56:28 +0000 (23:56 +0200)]
update the symbol files to reflect current state

10 years agoexclude config.{sub,guess} from source package
David Kalnischkies [Fri, 26 Jul 2013 20:37:43 +0000 (22:37 +0200)]
exclude config.{sub,guess} from source package

Lintian complains about these links in the source package as they leave
the source directory and as they are autogenerated there isn't that much
sense in shipping them, we can just recreate them before calling
configure.

10 years agofix another missing va_end()
Michael Vogt [Fri, 26 Jul 2013 20:18:36 +0000 (22:18 +0200)]
fix another missing va_end()

10 years agofix missing va_end()
Michael Vogt [Fri, 26 Jul 2013 20:12:36 +0000 (22:12 +0200)]
fix missing va_end()

10 years agofix some coverity chroot() releated warnings
Michael Vogt [Fri, 26 Jul 2013 20:10:05 +0000 (22:10 +0200)]
fix some coverity chroot() releated warnings

10 years agoreenable automatic parallel build of APT
David Kalnischkies [Fri, 26 Jul 2013 18:37:34 +0000 (20:37 +0200)]
reenable automatic parallel build of APT

It works for a while now in manual tests, now lets see how it will
perform if enabled for all by default automatically.

10 years agoimplement debian/rules build-{arch,indep} as required by policy 3.9.4
David Kalnischkies [Fri, 26 Jul 2013 17:13:55 +0000 (19:13 +0200)]
implement debian/rules build-{arch,indep} as required by policy 3.9.4

10 years agocorrect management-typo in description found by lintian
David Kalnischkies [Fri, 26 Jul 2013 16:36:50 +0000 (18:36 +0200)]
correct management-typo in description found by lintian

10 years agoadd missing Turkish (tr) to po/LINGUAS
David Kalnischkies [Fri, 26 Jul 2013 16:01:33 +0000 (18:01 +0200)]
add missing Turkish (tr) to po/LINGUAS

And while at it ensure that this can't happen again by letting the build
fail in case a po file is available but the language isn't mentioned in
the LINGUAS file (not even as a disabled language).

10 years agoadd missing test make
Michael Vogt [Fri, 26 Jul 2013 15:31:24 +0000 (17:31 +0200)]
add missing test make

10 years agoremove ALL_LINGUAS as it is overruled by po/LINGUAS
David Kalnischkies [Fri, 26 Jul 2013 12:38:18 +0000 (14:38 +0200)]
remove ALL_LINGUAS as it is overruled by po/LINGUAS

The list shows that it is ignored as some translations which are shipped
are not included here, so remove this source of possible confusion.

Git-Dch: Ignore

10 years agomake autoconf happy by "mv configure.{in,ac}"
David Kalnischkies [Fri, 26 Jul 2013 12:12:29 +0000 (14:12 +0200)]
make autoconf happy by "mv configure.{in,ac}"

Git-Dch: Ignore

10 years agoensure that FileFd::Size returns 0 in error cases
David Kalnischkies [Fri, 26 Jul 2013 10:20:50 +0000 (12:20 +0200)]
ensure that FileFd::Size returns 0 in error cases

10 years agoproper cleanup varargs in _error (uncovered by Coverity)
David Kalnischkies [Fri, 26 Jul 2013 10:04:55 +0000 (12:04 +0200)]
proper cleanup varargs in _error (uncovered by Coverity)

Git-Dch: Ignore

10 years agouse FileFd::Write instead of fwrite for errors
David Kalnischkies [Fri, 26 Jul 2013 09:42:02 +0000 (11:42 +0200)]
use FileFd::Write instead of fwrite for errors

Using the static FileFd::Write method gives us error messages for free
so we use it here to avoid failing silently (with a fail silent error).

Git-Dch: Ignore

10 years agoadd missing "make test" for travis
Michael Vogt [Fri, 26 Jul 2013 09:22:30 +0000 (11:22 +0200)]
add missing "make test" for travis

10 years agoupdate changelog for upload 0.9.9.4
Michael Vogt [Fri, 26 Jul 2013 07:58:55 +0000 (09:58 +0200)]
update changelog for upload

10 years agorequest absolute URIs from proxies again (0.9.9.3 regession)
David Kalnischkies [Fri, 26 Jul 2013 07:22:52 +0000 (09:22 +0200)]
request absolute URIs from proxies again (0.9.9.3 regession)

Commit 2b9c9b7f28b18f6ae3e422020e8934872b06c9f3 not only removes
keep-alive, but also changes the request URI send to proxies which are
required to be absolute URIs rather than the usual absolute paths.

Closes: 717891

10 years agobuild tree first
Michael Vogt [Fri, 26 Jul 2013 05:20:23 +0000 (07:20 +0200)]
build tree first

10 years agomake setup in travis.yml a bit more verbose
Michael Vogt [Fri, 26 Jul 2013 05:10:21 +0000 (07:10 +0200)]
make setup in travis.yml a bit more verbose

10 years agopick up Translation-* even if only compressed available
David Kalnischkies [Thu, 25 Jul 2013 16:51:16 +0000 (18:51 +0200)]
pick up Translation-* even if only compressed available

On CD-ROMs Translation-* files are only in compressed form included in
the Release file. This used to work while we had no record of
Translation-* files in the Release file at all as APT would have just
guessed the (compressed) filename and accepted it (unchecked), but now
that it checks for the presents of entries and if it finds records it
expects the uncompressed to be verifiable.

This commit relaxes this requirement again to fix the regression.
We are still secure "enough" as we can validate the compressed file we have
downloaded, so we don't loose anything by not requiring a hashsum for
the uncompressed files to double-check them.

Closes: 717665

10 years agofix travis.yml
Michael Vogt [Thu, 25 Jul 2013 19:06:40 +0000 (21:06 +0200)]
fix travis.yml

10 years agoadd missing "free(buffer) for allocated buffer
Michael Vogt [Thu, 25 Jul 2013 18:55:18 +0000 (20:55 +0200)]
add missing "free(buffer) for allocated buffer

10 years agofix potential GetLock() fd leak
Michael Vogt [Thu, 25 Jul 2013 18:55:02 +0000 (20:55 +0200)]
fix potential GetLock() fd leak

10 years agodelete targets data
Michael Vogt [Thu, 25 Jul 2013 18:46:08 +0000 (20:46 +0200)]
delete targets data

10 years agofix resource leak when verification fails
Michael Vogt [Thu, 25 Jul 2013 18:45:53 +0000 (20:45 +0200)]
fix resource leak when verification fails

10 years agoapt-pkg/indexcopy.cc: check for pending errors before calling fdopen()
Michael Vogt [Thu, 25 Jul 2013 18:41:03 +0000 (20:41 +0200)]
apt-pkg/indexcopy.cc: check for pending errors before calling fdopen()

10 years agocall fdopen() after FileFd was checked
Michael Vogt [Thu, 25 Jul 2013 18:36:23 +0000 (20:36 +0200)]
call fdopen() after FileFd was checked

10 years agoadd .travis.yml
Michael Vogt [Thu, 25 Jul 2013 18:30:59 +0000 (20:30 +0200)]
add .travis.yml

10 years agofix resource leak (thanks coverity)
Michael Vogt [Thu, 25 Jul 2013 18:26:11 +0000 (20:26 +0200)]
fix resource leak (thanks coverity)

10 years agorework the code in cdromutl.cc to make coverity (more) happy
Michael Vogt [Thu, 25 Jul 2013 18:22:43 +0000 (20:22 +0200)]
rework the code in cdromutl.cc to make coverity (more) happy

10 years agofix off-by-one error in HttpMethod::​AutoDetectProxy()
Michael Vogt [Thu, 25 Jul 2013 18:16:31 +0000 (20:16 +0200)]
fix off-by-one error in HttpMethod::​AutoDetectProxy()

10 years agofix off-by-one error and do not use magic constant of 100 when checking StackPost
Michael Vogt [Thu, 25 Jul 2013 18:14:59 +0000 (20:14 +0200)]
fix off-by-one error and do not use magic constant of 100 when checking StackPost

10 years agoalways "delete d" in FileFd::~FileFd to coverity happy
Michael Vogt [Thu, 25 Jul 2013 18:14:31 +0000 (20:14 +0200)]
always "delete d" in FileFd::~FileFd to coverity happy

10 years agoskip all Description fields in apt-cache, not just first (Closes: 717254) 0.9.9.3
Michael Vogt [Thu, 25 Jul 2013 15:15:18 +0000 (17:15 +0200)]
skip all Description fields in apt-cache, not just first (Closes: 717254)

* skip all Description fields in apt-cache, not just first (Closes: 717254)
* fix 'apt-cache search' crash with missing description (Closes: 647590)

10 years agoMerge remote-tracking branch 'donkult/debian/sid' into debian/sid
Michael Vogt [Thu, 25 Jul 2013 15:13:10 +0000 (17:13 +0200)]
Merge remote-tracking branch 'donkult/debian/sid' into debian/sid

10 years agoMerge remote-tracking branch 'upstream/debian/sid'
Michael Vogt [Wed, 24 Jul 2013 20:06:18 +0000 (22:06 +0200)]
Merge remote-tracking branch 'upstream/debian/sid'

10 years agodebian/apt.postinst:
Michael Vogt [Tue, 23 Jul 2013 18:09:05 +0000 (20:09 +0200)]
debian/apt.postinst:

* debian/apt.postinst:
  - run /etc/kernel/postinst.d/apt-auto-removal once on upgrade
    to ensure that the correct auto-removal list is generated
    (closes: #717615)

10 years agodebian/apt.auto-removal.sh:
Michael Vogt [Tue, 23 Jul 2013 17:55:14 +0000 (19:55 +0200)]
debian/apt.auto-removal.sh:

* debian/apt.auto-removal.sh:
  - do not include debug symbol packages for the kernel in the
    blacklist (closes: #717616)

10 years agoremove double list include
Michael Vogt [Tue, 23 Jul 2013 13:00:53 +0000 (15:00 +0200)]
remove double list include

10 years agofix 'apt-cache search' crash with missing description
David Kalnischkies [Thu, 18 Jul 2013 17:22:29 +0000 (19:22 +0200)]
fix 'apt-cache search' crash with missing description

Beside the earlier fixed 'apt-cache show', 'showpkg' and 'search' deal
with descriptions. 'showpkg' was fixed by fixing the cache generation
for 'show', but 'search' still segfaulted.

On the upside, it doesn't segfault any longer, on the downside, if a
package has no description at all (aka: not in the Packages file and not
in a Translation-* file) the package can't be found with 'search', even
if we search only by name. That is a shortcoming in the code, but fixing
it means rewriting it completely for dubious gain at best.

So this commit just skips packages without a description and is done.

Closes: 647590

10 years agoskip all Description fields in apt-cache, not just first
David Kalnischkies [Thu, 18 Jul 2013 14:52:31 +0000 (16:52 +0200)]
skip all Description fields in apt-cache, not just first

Given a Packages file like:
[…]
Description: foo bar baz
 moo moo moo
Multi-Arch: foreign
Description-md5: 97e204a9f4ad8c681dbd54ec7c505251
[…]

We have to display the Multi-Arch flag field as well as the fields
after the Description-md5, but not this field itself, as we already
have one printed alongside the Description we display.

Closes: 717254

10 years agoMerge remote-tracking branch 'geissert/proxy-keep-alive' into debian/sid
Michael Vogt [Wed, 17 Jul 2013 14:18:05 +0000 (16:18 +0200)]
Merge remote-tracking branch 'geissert/proxy-keep-alive' into debian/sid

10 years agofix if-clause to generate hook-info for 'rc' packages (Closes: 717006) 0.9.9.2
Michael Vogt [Wed, 17 Jul 2013 12:56:47 +0000 (14:56 +0200)]
fix if-clause to generate hook-info for 'rc' packages (Closes: 717006)

10 years agoMerge remote-tracking branch 'donkult/debian/sid' into debian/sid
Michael Vogt [Wed, 17 Jul 2013 12:55:13 +0000 (14:55 +0200)]
Merge remote-tracking branch 'donkult/debian/sid' into debian/sid

10 years agofix if-clause to generate hook-info for 'rc' packages
David Kalnischkies [Tue, 16 Jul 2013 21:15:55 +0000 (23:15 +0200)]
fix if-clause to generate hook-info for 'rc' packages

The code incorrectly skips printing of current version information,
if the package has no current version (for APT, but for dpkg as it is
the case for packages which are removed but not purged) by using an
unintended "else if" rather than an "if".

Closes: 717006

10 years agoVietnamese updated by Tran Ngoc Quan. Closes: #717016
Christian PERRIER [Tue, 16 Jul 2013 05:14:05 +0000 (07:14 +0200)]
Vietnamese updated by Tran Ngoc Quan. Closes: #717016

10 years agoDo not send a connection: keep-alive, at all
Raphael Geissert [Sun, 14 Jul 2013 16:38:03 +0000 (18:38 +0200)]
Do not send a connection: keep-alive, at all

10 years agoupdate changelog 0.9.9.1
Michael Vogt [Thu, 11 Jul 2013 18:44:52 +0000 (20:44 +0200)]
update changelog

10 years agoprevent MarkInstall of unsynced Multi-Arch:same siblings
David Kalnischkies [Wed, 10 Jul 2013 11:06:05 +0000 (13:06 +0200)]
prevent MarkInstall of unsynced Multi-Arch:same siblings

Multi-Arch: same packages can be co-installed, but need to have the same
version for all installed packages (aka "siblings"). Otherwise the
unsynced versions will fight against each other and the auto-install as
wel as the problem resolver will later have to decide between holding the
packages or to remove one of the siblings (usually a foreign) taking a
bunch of packages (like the entire foreign setup) with them.

The idea here is now to be more pro-active: MarkInstall will fail for
a package if the siblings aren't synced, so we don't allow a situation
in which a resolver has to decide if to hold or to remove-upgrade under
the assumption that the remove-upgrade decision is always wrong and
doesn't deserve to be explored (expect valid out-of-syncs of course).

Thats a pretty bold move to take for a library which is used by
different solvers so this check is done in IsInstallOk and can be
overridden if front-ends want to.

10 years agoimplement arch+= and arch-= for sources.list
David Kalnischkies [Fri, 28 Jun 2013 18:42:18 +0000 (20:42 +0200)]
implement arch+= and arch-= for sources.list

Default is to acquire all architectures from APT::Architectures which
can be changed by arch=, but this isn't very flexible if you want
"mostly" the default as you have to hardcode the architectures then,
so arch-= and arch+= can be used to add/remove architectures from the
default set.

On a machine with 'amd64' and 'i386' configured the lines:
 deb [arch+=armel] http://example.org/debian wheezy rocks
 deb [arch-=amd64] http://example.org/debian jessie rocks
will result in the download of:
 wheezy Packages for 'amd64', 'i386' and 'armel'
 jessie Packages for 'i386'

10 years agoVersion 3 for DPkg::Pre-Install-Pkgs with MultiArch info
David Kalnischkies [Wed, 26 Jun 2013 15:37:57 +0000 (17:37 +0200)]
Version 3 for DPkg::Pre-Install-Pkgs with MultiArch info

Adds on top of Version 2 to all displayed version numbers the
architecture as well as the MultiArch flag for consumption by the hooks.

Most of the time the architecture will be the same for both versions
displayed, but packages might change from "all" to "any" (or back)
between versions so we can't display the architecture for packages.

Pseudo-Format for Version 3:
<name> <version> <arch> <m-a-flag> <compare> <version> <arch> <m-a-flag>

Examples:
stuff - - none < 1 amd64 none **CONFIGURE**
libsame 1 i386 same < 2 i386 same **CONFIGURE**
stuff 2 i386 none > 1 i386 none **CONFIGURE**
libsame 2 i386 same > - - none **REMOVE**
toolkit 1 all foreign > - - none **REMOVE**

Closes: #712116

10 years agodebian/apt.auto-removal.sh: merge the remaining bits
Michael Vogt [Thu, 11 Jul 2013 05:52:34 +0000 (07:52 +0200)]
debian/apt.auto-removal.sh: merge the remaining bits

10 years ago* Fix up two things in debian/apt.auto-removal.sh:
Adam Conrad [Tue, 6 Nov 2012 22:54:31 +0000 (15:54 -0700)]
* Fix up two things in debian/apt.auto-removal.sh:
  - Use exact matches with $-terminated regexes, so we don't get
    confusion between similarly-named kernel flavours.
  - Keep linux-backports-modules in sync with installed kernels.
Conflicts:
configure.in
debian/changelog
doc/apt-verbatim.ent

10 years agoget dpkg from apt-config as well and add robustness against missing/failing apt-confi...
Michael Vogt [Mon, 5 Nov 2012 09:27:17 +0000 (10:27 +0100)]
get dpkg from apt-config as well and add robustness against missing/failing apt-config (for paranoia)
Conflicts:
debian/apt.auto-removal.sh

10 years agoMake sure we always have at least two kernels marked not for removal
Steve Langasek [Sat, 3 Nov 2012 07:28:54 +0000 (08:28 +0100)]
Make sure we always have at least two kernels marked not for removal

10 years agocherry pick 39a07ec8f2c612a5af234c7713571362f7ca90b4
Steve Langasek [Fri, 2 Nov 2012 23:39:19 +0000 (00:39 +0100)]
cherry pick 39a07ec8f2c612a5af234c7713571362f7ca90b4

10 years agoapt-pkg/packagemanager.cc:
Michael Vogt [Wed, 10 Jul 2013 14:41:14 +0000 (16:41 +0200)]
apt-pkg/packagemanager.cc:

* apt-pkg/packagemanager.cc:
  - increate APT::pkgPackageManager::MaxLoopCount to 5000

10 years agodebian/rules:
Michael Vogt [Fri, 5 Jul 2013 14:41:06 +0000 (16:41 +0200)]
debian/rules:

* debian/rules:
  - call dh_clean in clean (closes: #714980)

10 years agoreleasing version 0.9.9 0.9.9
Michael Vogt [Tue, 2 Jul 2013 06:58:43 +0000 (08:58 +0200)]
releasing version 0.9.9

10 years agofix format string error
Michael Vogt [Tue, 2 Jul 2013 06:45:03 +0000 (08:45 +0200)]
fix format string error

10 years agoupdate changelog
Michael Vogt [Tue, 2 Jul 2013 06:34:34 +0000 (08:34 +0200)]
update changelog

10 years agoMerge remote-tracking branch 'mvo/bugfix/bts-712433' into debian/sid
Michael Vogt [Tue, 2 Jul 2013 06:32:53 +0000 (08:32 +0200)]
Merge remote-tracking branch 'mvo/bugfix/bts-712433' into debian/sid

10 years agoMerge remote-tracking branch 'donkult/debian/sid' into debian/sid
Michael Vogt [Tue, 2 Jul 2013 06:32:34 +0000 (08:32 +0200)]
Merge remote-tracking branch 'donkult/debian/sid' into debian/sid

Conflicts:
debian/changelog

10 years agoupdate changelog
Michael Vogt [Tue, 2 Jul 2013 06:27:56 +0000 (08:27 +0200)]
update changelog

10 years agomake starting debug output of pkgProblemResolver proper english
Michael Vogt [Fri, 28 Jun 2013 05:37:55 +0000 (07:37 +0200)]
make starting debug output of pkgProblemResolver proper english

10 years agouse just one line for the debug output (thanks to donkult for the review)
Michael Vogt [Thu, 27 Jun 2013 08:27:29 +0000 (10:27 +0200)]
use just one line for the debug output (thanks to donkult for the review)

10 years agowhen doing MarkInstall() packages may also get removed, so show them in the debug...
Michael Vogt [Thu, 27 Jun 2013 05:26:39 +0000 (07:26 +0200)]
when doing MarkInstall() packages may also get removed, so show them in the debug output of Debug::pkgDepCache::AutoInstall=true

10 years agoshow broken count when starting the resolver
Michael Vogt [Thu, 27 Jun 2013 05:25:53 +0000 (07:25 +0200)]
show broken count when starting the resolver

10 years agomake update-po
Michael Vogt [Wed, 26 Jun 2013 05:38:02 +0000 (07:38 +0200)]
make update-po

10 years ago"mount path"->"mount point" and also make the warning a error when no CD-ROM is found
Michael Vogt [Wed, 26 Jun 2013 05:35:16 +0000 (07:35 +0200)]
"mount path"->"mount point" and also make the warning a error when no CD-ROM is found

10 years agosimple fork and pidfile aptwebserver
David Kalnischkies [Mon, 24 Jun 2013 14:34:38 +0000 (16:34 +0200)]
simple fork and pidfile aptwebserver

Forking only after being ready to accept clients avoids running races
with the tests which sometimes failed on the first 'apt-get update'
(or similar) with the previous background-start and hope for the best…

The commit fixes also some oversight output-order changes in regards to
Description-md5 and (I-M-S) race conditions in various tests.

Git-Dch: Ignore

10 years agodelete Memb on read-error in arfile
Niels Thykier [Mon, 24 Jun 2013 11:22:54 +0000 (13:22 +0200)]
delete Memb on read-error in arfile

Git-Dch: Ignore

10 years agofix SHA2* cleanups to zero-out the complete context
David Kalnischkies [Mon, 24 Jun 2013 10:51:29 +0000 (12:51 +0200)]
fix SHA2* cleanups to zero-out the complete context

GCC 4.8 is now clever enough to warn about:

contrib/sha2_internal.cc: In function ‘char* SHA256_End(SHA256_CTX*, char*)’:
contrib/sha2_internal.cc:656:31: warning: argument to ‘sizeof’ in ‘void*
memset(void*, int, size_t)’ call is the same expression as the destination;
did you mean to dereference it? [-Wsizeof-pointer-memaccess]
   MEMSET_BZERO(context, sizeof(context));

So fix it as suggested. Its interesting though that the SHA2*
calculation as far as we need it works even without zeroing out.

Git-Dch: Ignore

10 years agodo not modify DepIterator as we might check again
David Kalnischkies [Mon, 24 Jun 2013 10:29:48 +0000 (12:29 +0200)]
do not modify DepIterator as we might check again

fixup for 42d51f333e8ef522fed02cdfc48663488d56c3a3

The for-loop iterating over the DepIterators which need configuration
can (and will be in 'complicated' situations) run multiple times, so we
can't just GlobOr on the DepIterator as it modifies it, so that the next
iteration over the list ends up checking another dependency leading us
into a 'Internal error, packages left unconfigured. foopkg' maybe or we
are 'lucky' and calculate a solution which might break down the line

Git-Dch: Ignore

10 years agoImprove the apt-cdrom output when no CD-ROM can be auto-detected
Michael Vogt [Sat, 22 Jun 2013 08:03:24 +0000 (10:03 +0200)]
Improve the apt-cdrom output when no CD-ROM can be auto-detected
(closes: #712433)

10 years agofix syntax error in the configure-index
David Kalnischkies [Thu, 20 Jun 2013 18:21:58 +0000 (20:21 +0200)]
fix syntax error in the configure-index

The file isn't supposed to be a valid config file, but it should
show valid syntax non-the-less.

Git-Dch: Ignore

10 years agotrigger NODATA error for invalid InRelease files
David Kalnischkies [Mon, 17 Jun 2013 09:23:13 +0000 (11:23 +0200)]
trigger NODATA error for invalid InRelease files

With the selfgrown splitting we got the problem of not recovering
from networks which just reply with invalid data like those sending
us login pages to authenticate with the network (e.g. hotels) back.

The good thing about the InRelease file is that we know that it must
be clearsigned (a Release file might or might not have a detached sig)
so if we get a file but are unable to split it something is seriously
wrong, so there is not much point in trying further.

The Acquire system already looks out for a NODATA error from gpgv,
so this adds a new error message sent to the acquire system in case
the splitting we do now ourselves failed including this magic word.

Closes: #712486

10 years agotests: accept an explaination for msgfail
David Kalnischkies [Sun, 16 Jun 2013 21:23:28 +0000 (23:23 +0200)]
tests: accept an explaination for msgfail

Git-Dch: Ignore

10 years agosimple URI rewrite rules config for webserver
David Kalnischkies [Sat, 15 Jun 2013 21:58:12 +0000 (23:58 +0200)]
simple URI rewrite rules config for webserver

we have a test which required traditionally lighttpd to be executed
as it requires a webserver supporting some kind of URI rewriting.
Now with some lines of code our own webserver can do this and the
testcase can be enabled by default. This test hinted at the bug fixed
in the previous commit, so having more tests which can easily be run
is a good thing.

Git-Dch: Ignore

10 years agodo not redownload unchanged InRelease files
David Kalnischkies [Sat, 15 Jun 2013 21:47:07 +0000 (23:47 +0200)]
do not redownload unchanged InRelease files

Before we download the 'new' InRelease file the old file will be moved
out of the way with the name 'foobar_InRelease.reverify', so if no
partial file for the 'new' file exists take the modification time from
this reverify file, so that if we get an IMS hit for the InRelease file
we can move back the reverify file as new file rather than downloading
the 'new' file even though we already have it.

We do the same for Release files and this happened to work until the
reverify renaming was corrected for InRelease files.

10 years agoadd directory listing to the webserver
David Kalnischkies [Sat, 15 Jun 2013 14:45:12 +0000 (16:45 +0200)]
add directory listing to the webserver

Git-Dch: Ignore

10 years agoadd a simple webserver for our testcases
David Kalnischkies [Sat, 15 Jun 2013 13:45:22 +0000 (15:45 +0200)]
add a simple webserver for our testcases

APT needs to acquire data in a secure fashion over an inherently
unsecure way, known as the internet, while communicating with
unreliable partners, known as webservers and proxies.

For your integration tests we so far relied on 'normal' webservers,
but all of them have certain quirks and none is able to provide us
with all quirks which can be observed in the wild and we therefore
have to test with, so this webserver isn't trying to be fast, secure
or feature complete, but to provide all the quirks we need in a
consistent way.

This webserver also makes the APT project self-contained, as it is now
able to generate, serve as well as acquire package indexes. ;)

Git-Dch: Ignore

10 years agosupport \n and \r\n line endings in ReadMessages
David Kalnischkies [Sat, 15 Jun 2013 08:35:04 +0000 (10:35 +0200)]
support \n and \r\n line endings in ReadMessages

10 years agotry defaults if auto-detection failed in apt-cdrom
David Kalnischkies [Sun, 16 Jun 2013 16:28:45 +0000 (18:28 +0200)]
try defaults if auto-detection failed in apt-cdrom

The default is to ask udev for location and mountpoints of CD-ROMs,
but the old way of specifying the mountpoint is still available and
is tried now in case udev doesn't find any CD-ROM.

It probably fails, too, but we get a bunch of error messages this
way and the user can get an idea of how to make his setup work even
if udev can't be convienced to return something useful.

Closes: #712433

10 years agohandle missing "Description" in apt-cache show
David Kalnischkies [Sun, 16 Jun 2013 13:42:31 +0000 (15:42 +0200)]
handle missing "Description" in apt-cache show

do not blindly assume that all packages stanzas have a "Description:"
field in 'apt-cache show' as well as in the cache creation itself.

We instead assume now that if the stanza has a Description, it will not
be the first field as we look out for "\nDescription" to take care of
MD5sum as well as (maybe ignored) translated Descriptions embedded in
the package stanza.

Closes: #712435

10 years agofix file location for configure-index.gz in apt.conf(5)
David Kalnischkies [Thu, 13 Jun 2013 11:52:18 +0000 (13:52 +0200)]
fix file location for configure-index.gz in apt.conf(5)

Closes: #711921

11 years agotests: add an interactive 'test' with multiple cdroms
David Kalnischkies [Sun, 9 Jun 2013 20:13:20 +0000 (22:13 +0200)]
tests: add an interactive 'test' with multiple cdroms

Can't be used as a test as is, but shows how to build multiple
CD-ROMs for tests and can be used to reproduce debbug #711456.

Git-Dch: Ignore

11 years agoensure state-dir exists before coyping cdrom files
David Kalnischkies [Sun, 9 Jun 2013 16:58:34 +0000 (18:58 +0200)]
ensure state-dir exists before coyping cdrom files

We do the same in the acquire system which handles the 'normal'
downloads, so do it here as well even though its unlikely anyone
will ever notice (beside testcases of course …)

11 years agofail in CopyFile if the FileFds have error flag set
David Kalnischkies [Sun, 9 Jun 2013 16:33:48 +0000 (18:33 +0200)]
fail in CopyFile if the FileFds have error flag set

Testing for global PendingErrors in users of CopyFile is incorrect
in so far as unrelated errors will prevent us from copying perfectly
fine files and checking for the validity of the files is just better
in CopyFiles as it already checks if files are at least opened.

Add also a higher-level error message to the error stack if it fails.

11 years agostop building l10n if strings are unchanged
David Kalnischkies [Fri, 31 May 2013 16:19:09 +0000 (18:19 +0200)]
stop building l10n if strings are unchanged

The buildsystem tried to build l10n for test applications which never
produced the output it expected causing it to try building it all the
time.