summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'feature/methods'David Kalnischkies2016-08-1131-439/+1028
|\
| * http: auto-configure for local Tor proxy if called as 'tor'David Kalnischkies2016-08-114-0/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | With apts http transport supporting socks5h proxies and all the work in terms of configuration of methods based on the name it is called with it becomes surprisingly easy to implement Tor support equally (and perhaps even a bit exceeding) what is available currently in apt-transport-tor. How this will turn out to be handled packaging wise we will see in https://lists.debian.org/deity/2016/08/msg00012.html , but until this is resolved we can add the needed support without actively enabling it for now, so that this can be tested better.
| * block direct connections to .onion domains (RFC7687)David Kalnischkies2016-08-112-1/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Doing a direct connect to an .onion address (if you don't happen to use it as a local domain, which you shouldn't) is bound to fail and does leak the information that you do use Tor and which hidden service you wanted to connect to to a DNS server. Worse, if the DNS is poisoned and actually resolves tricking a user into believing the setup would work correctly… This does block also the usage of wrappers like torsocks with apt, but with native support available and advertised in the error message this shouldn't really be an issue. Inspired-by: https://bugzilla.mozilla.org/show_bug.cgi?id=1228457
| * allow methods to be disabled and redirected via configDavid Kalnischkies2016-08-105-44/+58
| | | | | | | | | | | | | | | | | | | | To prevent accidents like adding http-sources while using tor+http it can make sense to allow disabling methods. It might even make sense to allow "redirections" and adding "symlinked" methods via configuration. This could e.g. allow using different options for certain sources by adding and configuring a "virtual" new method which picks up the config based on the name it was called with like e.g. http does if called as tor+http.
| * implement socks5h proxy support for http methodDavid Kalnischkies2016-08-105-23/+318
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Socks support is a requested feature in sofar that the internet is actually believing Acquire::socks::Proxy would exist. It doesn't and this commit isn't adding it as that isn't how our configuration works, but it allows Acquire::http::Proxy="socks5h://…". The HTTPS method was changed already to support socks proxies (all versions) via curl. This commit implements only SOCKS5 (RFC1928) with no auth or pass&user auth (RFC1929), but not GSSAPI which is required by the RFC. The 'h' in the protocol name further indicates that DNS resolution is delegated to the socks proxy rather than performed locally. The implementation works and was tested with Tor as socks proxy for which implementing socks5h only can actually be considered a feature. Closes: 744934
| * implement generic config fallback for methodsDavid Kalnischkies2016-08-1018-205/+303
| | | | | | | | | | | | | | | | | | | | The https method implemented for a long while now a hardcoded fallback to the same options in http, which, while it works, is rather inflexible if we want to allow the methods to use another name to change their behavior slightly, like apt-transport-tor does to https – most of the diff being s#https#tor#g which then fails to do the full circle fallthrough tor -> https -> http for https sources. With this config infrastructure this could be implemented now.
| * use the same redirection handling for http and httpsDavid Kalnischkies2016-08-107-101/+102
| | | | | | | | | | | | | | | | cURL which backs our https implementation can handle redirects on its own, but by dealing with them on our own we gain finer control over which redirections will be performed (we don't like https → http) and by whom so that redirections to other hosts correctly spawn a new https method dealing with these instead of letting the current one deal with it.
| * detect redirection loops in acquire instead of workersDavid Kalnischkies2016-08-1010-65/+129
| | | | | | | | | | | | | | Having the detection handled in specific (http) workers means that a redirection loop over different hostnames isn't detected. Its also not a good idea have this implement in each method independently even if it would work
| * fail on unsupported http/https proxy settingsDavid Kalnischkies2016-08-104-6/+45
| | | | | | | | Closes: #623443
| * suggest transport-packages based on established nameschemeDavid Kalnischkies2016-08-101-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | apt-transports not shipped in apt directly are usually named apt-transport-% with % being what is in the name of the transport. tor additional introduced aliases via %+something, which isn't a bad idea, so be strip the +something part from the method name before suggesting the installation of an apt-transport-% package. This avoids us the maintainance of a list of existing transports creating a two class system of known and unknown transports which would be quite arbitrary and is unfriendly to backports.
| * support all socks-proxy known to curl in https methodDavid Kalnischkies2016-08-101-1/+12
| |
* | allow user@host (aka: no password) in URI parsingDavid Kalnischkies2016-08-102-7/+21
| | | | | | | | If the URI had no password the username was ignored
* | fix programmatic typo in apt-key manpageDavid Kalnischkies2016-08-101-1/+1
|/ | | | | Reported-By: Johannes 'josch' Schauer on IRC Gbp-Dch: Ignore
* Do not set the binary dir in run-tests, it breaks stuffJulian Andres Klode2016-08-101-6/+0
| | | | | | | This breaks -j and does all sort of other weird stuff I did not notice in the previous (non-parallel) runs. Gbp-Dch: ignore
* Fix some indentation issues in README.mdJulian Andres Klode2016-08-101-3/+3
|
* Merge branch 'cmake'Julian Andres Klode2016-08-10120-3126/+1595
|\
| * test: Automatically discover CMake build directoryJulian Andres Klode2016-08-102-1/+27
| | | | | | | | | | | | | | Look at the project root, and all directories directly below it and pick the directory with the newest CMakeCache.txt file. Gbp-Dch: ignore
| * Update gitignore for cmakeJulian Andres Klode2016-08-101-23/+88
| | | | | | | | | | | | | | We cannot be sure if you are not running the build tree, so this is a bit ugly. Gbp-Dch: ignore
| * Get rid of the old buildsystemJulian Andres Klode2016-08-1043-2732/+0
| | | | | | | | Bye, bye, old friend.
| * Add statvfs.h.in to CMake directoryJulian Andres Klode2016-08-102-1/+14
| | | | | | | | Gbp-Dch: ignore
| * Merge README.cmake into README.mdJulian Andres Klode2016-08-102-37/+15
| | | | | | | | Gbp-Dch: ignore
| * apt-private: Do not include apti18n.h in headersJulian Andres Klode2016-08-102-4/+0
| | | | | | | | This causes build failures when turning translations off.
| * prepare-release: Switch over to CMake, set version in CMakeLists.txtJulian Andres Klode2016-08-102-11/+12
| | | | | | | | | | | | | | | | | | Teach the prepare-release script about the version new locations and also set the version in CMakeLists, as that is better than reading it from the changelog: CMake would not rerun automatically otherwise if the version changed. Gbp-Dch: ignore
| * CMake: Rewrite existing Documentation support and add doxygenJulian Andres Klode2016-08-107-117/+346
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This can now build all documentation. It should also be fairly reusable for other projects, as long as they follow the same naming scheme for the po4a output files and set the PACKAGE_* variables used here. We could have done all translations in a single call to po4a like the makefile based buildsystem does. While that would have made the output slightly nicer, this solution offers a huge performance gain because it can translate the documents in parallel, which also means that the xsltproc stage does not have to wait for all translations to be done first. You might think that the add_custom_command() should list the actual output files as BYPRODUCTS. This is not true however: Because the files are not always generated, Ninja will think missing byproducts mean that the target is out of date - which is not what we want. Finally, also add the missing doxygen support. Note that the packaging script cleans up some md5 and map files created by doxygen, otherwise it is fairly boring.
| * CMake: Misc: Extract command path_join() from TranslationsJulian Andres Klode2016-08-102-14/+11
| | | | | | | | | | | | | | This abstracts the joining of paths a bit better than having basically the same code twice in the Translations module. Gbp-Dch: ignore
| * CMake: Check for ptsname_r() againJulian Andres Klode2016-08-103-1/+5
| | | | | | | | | | | | | | | | This was dropped in autotools as I found no use of the HAVE_PTSNAME_R macro. Turns out it was typoed as HAVE_PTS_NAME_R. Fix the #ifdef and add checks to CMake for it. Closes: #833674
| * CMake: Allow building without dpkgJulian Andres Klode2016-08-101-4/+8
| | | | | | | | | | | | | | | | It's not entirely clear if that is useful, but it cannot hurt. We need to check what is missing to build on foreign systems without dpkg. Gbp-Dch: ignore
| * CMake: Bump minimum required version to 3.4.0Julian Andres Klode2016-08-102-2/+2
| | | | | | | | | | The SOURCE_DIR property is used for the translation building and was introduced in cmake 3.4
| * debian: make autopkgtest run with CMake build dirJulian Andres Klode2016-08-101-5/+6
| |
| * CMake: Add unit testsJulian Andres Klode2016-08-107-9/+34
| | | | | | | | | | | | | | | | Add support for our GTest based unit tests. By default, CMake will look in /usr/src/gtest for the external GTest project, but this can be overriden by defining GTEST_ROOT when invoking cmake. Gbp-Dch: ignore
| * CMake: Translations: Build .pot in po binary dir, not project oneJulian Andres Klode2016-08-101-17/+17
| | | | | | | | | | | | This was cluttering up things all over the place. Gbp-Dch: ignore
| * CMake: Translations: Allow excluding languages from translationJulian Andres Klode2016-08-102-5/+30
| | | | | | | | | | | | This seems to be needed for the hebrew translations. Gbp-Dch: ignore
| * CMake: Translations: Avoid rebuilding .mo if .pot did not changeJulian Andres Klode2016-08-101-4/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the witness/byproducts approach to build the translations. A byproduct of a command is like an output, but may be older than the input. Here, we generate a normal template with headers in the normal way as a witness (and for Launchpad translations), but we also generate a .pot-tmp0 template file without a header that gets copied to a .pot-tmp byproduct only if it changed. This way, the .pot-tmp is only updated if an actual string translation changed. We also create a custom target for the .pot file that we'll depend on later in the overall target creating the mo files to ensure that the template is build before we try to build mo files. Then we make the msgmerge depend on the .pot-tmp instead of the .pot file, which means that msgmerge and msgfmt only get re-run if a string change occured. Gbp-Dch: ignore
| * CMake: Translations: Add a statistics targetJulian Andres Klode2016-08-102-0/+16
| | | | | | | | | | | | This is really useful stuff to have. Gbp-Dch: ignore
| * CMake: Translations: Build apt-all.pot and update .po filesJulian Andres Klode2016-08-103-3/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | Merge all the per-domain templates into one template file using msgcomm, stripping any line numbers in the input files, and sorting the output per file. This should create reasonably stable .pot and .po files that do not change just because files move around. It should also be resilient against some line changes, as long as one translated line is not moved before/after another translated line. Gbp-Dch: ignore
| * CMake: Translations: Add support for shell scriptsJulian Andres Klode2016-08-103-25/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rework the arguments to apt_add_translation_domain so a user can specify TARGETS and SCRIPTS, the latter being Shell scripts. For each language (TARGETS being C++, SCRIPTS being Shell), a separate template is generated via xgettext. Those templates are then merged together by using msgcomm. In case there are no Shell scripts in the translation domain, msgcomm will receive /dev/null instead of a shell translation template. This also reintroduces line numbers, as msgcomm would otherwise re-order the merged files not only by filename, but also by message string. It's unclear why it does that, it could just leave strings within a file alone. In contrast to the old build system, we use xgettext for shell scripts instead of bash --dump-strings, as it's just easier to use the same tool for everything. We also create valid headers.
| * CMake: Translations: Write a .po file before writing a .mo fileJulian Andres Klode2016-08-101-3/+6
| | | | | | | | | | | | This makes debugging things easier. Gbp-Dch: ignore
| * CMake: Translations: Pass some additional arguments to commandsJulian Andres Klode2016-08-101-1/+2
| | | | | | | | | | | | | | | | This gets rid of the line numbers, adds the plural keyword, and makes msgfmt print statistics, so we know how well translated we are. Gbp-Dch: ignore
| * CMake: Translations: Make po templates depend on input filesJulian Andres Klode2016-08-101-0/+3
| | | | | | | | | | | | | | I wondered why the template was not rebuilt after I changed a file, now I have the answer. Gbp-Dch: ignore
| * CMake: Set PACKAGE_MAIL variableJulian Andres Klode2016-08-102-2/+3
| | | | | | | | | | | | | | This is needed in a lot of places. Also adjust config.h.in to use it instead of the bare email address. Gbp-Dch: ignore
| * CMake: po: Add mirror methodJulian Andres Klode2016-08-101-1/+3
| | | | | | | | I forgot this one, sorry
| * CMake: Improve handling of vendor filesJulian Andres Klode2016-08-102-8/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | First of all, instead of creating the files at configure time, generate the files using normal target. This has the huge advantage that they are rebuilt if their input changes. While we are at it, also add dependencies on the vendor entity files. This also fixes the path to the vendor script, which was given relatively before, which obviously won't work when running from inside a deeper subdirectory. To speed things up, pass the --vendor option to getinfo, so we do not have to find out the current vendor in getinfo all over again. Gbp-Dch: ignore
| * CMake: Cache CURRENT_VENDOR and make it configurableJulian Andres Klode2016-08-101-4/+8
| | | | | | | | | | | | | | | | | | | | Cache the current vendor, so we do not have to rerun getinfo when reconfiguring stuff. This also has the nice effect of making the vendor configurable, so you can manually specify it on a platform that might not have dpkg (not that building without dpkg works yet). Gbp-Dch: ignore
| * vendor/getinfo: Accept --vendor VENDOR optionJulian Andres Klode2016-08-101-4/+9
| | | | | | | | | | | | | | | | This can be used to query a field for a specific vendor. It also speeds up things a lot if we can cache the current vendor in cmake and pass it to further getinfo invocations. Gbp-Dch: ignore
| * CMake: Use find_package() for curl instead of pkg_check_modules()Julian Andres Klode2016-08-101-1/+1
| | | | | | | | | | | | No need to involve pkg-config when CMake has builtin support Gbp-Dch: ignore
| * releasing package apt version 1.3~pre3+cmake21.3_pre3+cmake2Julian Andres Klode2016-08-0618-18/+24
| |
| * Build-depend on pkg-configJulian Andres Klode2016-08-061-1/+1
| |
| * releasing package apt version 1.3~pre3+cmake11.3_pre3+cmake1Julian Andres Klode2016-08-069-7/+36
| |
| * CMake: Adjust abicheck locationsJulian Andres Klode2016-08-062-2/+3
| | | | | | | | | | | | Look in build/apt-pkg and build/apt-inst instead of build/bin. Gbp-Dch: ignore
| * CMake: debian: Switch packaging over to CMake and dh 9Julian Andres Klode2016-08-0623-376/+102
| | | | | | | | | | | | | | | | | | | | | | This new packaging is much easier to read, although the duplication in the install files is a bit annoying. We should probably also get rid of the movefiles for solvers, planners, and https method; but then we have to keep track of which methods exist in the apt package. Another disadvantage is that building only the documentation packages also requires building the code, as there's no way to turn off code building in the project.