Permalink
...
Comparing changes
Open a pull request
15
contributors
This comparison is big! We’re only showing the most recent
250
commits
Commits on May 31, 2017
Commits on Jun 01, 2017
Commits on Jun 22, 2017
Commits on Jun 26, 2017
Commits on Jun 27, 2017
Commits on Jun 28, 2017
Commits on Jun 29, 2017
Commits on Jun 30, 2017
Commits on Jul 01, 2017
Commits on Jul 03, 2017
Commits on Jul 04, 2017
Commits on Jul 07, 2017
Commits on Jul 08, 2017
Commits on Jul 12, 2017
Commits on Jul 17, 2017
Commits on Jul 20, 2017
Commits on Jul 26, 2017
Commits on Jul 27, 2017
Commits on Aug 04, 2017
Commits on Aug 12, 2017
Commits on Aug 17, 2017
Commits on Aug 24, 2017
Commits on Sep 01, 2017
Commits on Sep 04, 2017
Commits on Sep 09, 2017
Commits on Sep 10, 2017
Commits on Sep 11, 2017
Commits on Sep 13, 2017
Commits on Sep 24, 2017
Commits on Sep 26, 2017
Commits on Oct 05, 2017
Commits on Oct 08, 2017
Commits on Oct 20, 2017
Commits on Oct 22, 2017
Commits on Oct 23, 2017
Commits on Oct 25, 2017
Commits on Oct 26, 2017
Commits on Oct 27, 2017
Commits on Oct 28, 2017
Commits on Oct 29, 2017
Commits on Nov 05, 2017
Commits on Nov 12, 2017
Commits on Nov 15, 2017
Commits on Nov 19, 2017
Commits on Nov 20, 2017
Commits on Nov 22, 2017
Commits on Dec 13, 2017
Commits on Dec 14, 2017
Commits on Dec 24, 2017
Commits on Jan 01, 2018
Commits on Jan 02, 2018
Commits on Jan 03, 2018
Unified
Split
Showing
385 changed files
with
14,380 additions
and 7,770 deletions.
View
25
.clang-format
| @@ -0,0 +1,25 @@ | ||
| +Language: Cpp | ||
| +# BasedOnStyle | ||
| + | ||
| +TabWidth: 8 | ||
| +UseTab: Always | ||
| +IndentWidth: 3 | ||
| +ContinuationIndentWidth: 3 | ||
| +ColumnLimit: 0 | ||
| +BreakBeforeBraces: Allman | ||
| +AccessModifierOffset: 0 | ||
| +IncludeCategories: | ||
| + - Regex: 'apti18n.h' | ||
| + Priority: 9999 | ||
| + - Regex: 'apt-[^/]*/' | ||
| + Priority: 20 | ||
| + - Regex: '^"' | ||
| + Priority: 10 | ||
| + - Regex: 'config.h' | ||
| + Priority: 0 | ||
| + - Regex: '(zlib|bzlib|lzma|lz4frame|gtest/gtest|db|gnutls/.*)\.h' | ||
| + Priority: 30 | ||
| + - Regex: '\.h' | ||
| + Priority: 100 | ||
| + - Regex: '.*' | ||
| + Priority: 99 |
View
5
.gitignore
| @@ -51,6 +51,9 @@ docbook-text-style.xsl | ||
| **/methods/file | ||
| **/methods/copy | ||
| +**/methods/curl | ||
| +**/methods/curl+http | ||
| +**/methods/curl+https | ||
| **/methods/store | ||
| **/methods/gpgv | ||
| **/methods/cdrom | ||
| @@ -99,7 +102,9 @@ Makefile | ||
| /debian/*.log | ||
| /debian/*.substvars | ||
| /debian/*.debhelper | ||
| +/debian/debhelper-build-stamp | ||
| /debian/files | ||
| +/debian/tmp/ | ||
| /debian/apt/ | ||
| /debian/apt-doc/ | ||
| /debian/apt-utils/ | ||
View
37
.travis.yml
| @@ -1,33 +1,20 @@ | ||
| language: cpp | ||
| cache: ccache | ||
| sudo: required | ||
| -dist: trusty | ||
| +services: | ||
| + - docker | ||
| env: | ||
| - - TEST_SUITE=user CMAKE_FLAGS= | ||
| - - TEST_SUITE=root CMAKE_FLAGS=-DWITH_DOC=OFF | ||
| -before_install: | ||
| - - sudo add-apt-repository 'deb http://archive.ubuntu.com/ubuntu/ wily main universe' -y | ||
| - - sudo add-apt-repository 'deb http://archive.ubuntu.com/ubuntu/ xenial main' -y | ||
| - - | | ||
| - sudo sh -c '/bin/echo -e "Package: *\nPin: release n=wily\nPin-Priority: 1" > /etc/apt/preferences.d/wily' | ||
| - sudo sh -c '/bin/echo -e "Package: *\nPin: release n=xenial\nPin-Priority: 1" > /etc/apt/preferences.d/xenial' | ||
| - - sudo apt-get update -qq | ||
| + - USER=travis CMAKE_FLAGS= | ||
| + - USER=root CMAKE_FLAGS=-DWITH_DOC=OFF | ||
| install: | ||
| - - sudo apt-get -qq -y -t wily install gettext liblz4-dev python3-apt | ||
| - - sudo apt-get -qq -y -t xenial install cmake ninja-build | ||
| - - sudo ./prepare-release travis-ci | ||
| + - sed -i -e "s#1000#$(id -u)#g" Dockerfile | ||
| + - docker build --tag=apt-ci . | ||
| before_script: | ||
| - - ( mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Coverage -G Ninja $CMAKE_FLAGS .. ) | ||
| - - ninja -C build | ||
| + - docker run --rm -w $PWD -v $HOME/.ccache:$HOME/.ccache -v $PWD:$PWD --user=travis apt-ci sh -e -c "mkdir build && cd build && env PATH=/usr/lib/ccache:\$PATH cmake -DCMAKE_BUILD_TYPE=Coverage -G Ninja $CMAKE_FLAGS .." | ||
| + - docker run --rm -w $PWD -v $HOME/.ccache:$HOME/.ccache -v $PWD:$PWD --user=travis apt-ci ninja -C build | ||
| script: | ||
| - - CTEST_OUTPUT_ON_FAILURE=1 ninja -C build test | ||
| - - DESTDIR=$PWD/rootdir chronic ninja -C build install | ||
| - - test "$TEST_SUITE" != "user" || ./test/integration/run-tests -qq | ||
| - - sudo adduser --force-badname --system --home /nonexistent --no-create-home --quiet _apt || true | ||
| - - sudo chmod go+x /home/travis | ||
| - - sudo chmod -R go+rwX /home/travis/build | ||
| - - test "$TEST_SUITE" != "root" || sudo ./test/integration/run-tests -qq | ||
| + - docker run --rm -w $PWD -v $PWD:$PWD --user=travis apt-ci env CTEST_OUTPUT_ON_FAILURE=1 ninja -C build test | ||
| + - docker run --rm -w $PWD -v $PWD:$PWD --user=travis apt-ci env DESTDIR=$PWD/rootdir chronic ninja -C build install | ||
| + - docker run --rm -w $PWD -v $PWD:$PWD --user=$USER --tmpfs /tmp:suid,exec apt-ci unbuffer ./test/integration/run-tests -qq -j 4 | ||
| after_script: | ||
| - - cd build | ||
| - - gcov -r $(find -name '*.gcno') | ||
| - - bash <(curl -s https://codecov.io/bash) | ||
| + - docker run --rm -w $PWD/build -v $PWD:$PWD --user=$USER `bash <(curl -s https://codecov.io/env)` apt-ci bash -c 'bash <(curl -s https://codecov.io/bash)' |
View
31
CMake/Documentation.cmake
| @@ -89,12 +89,18 @@ endfunction() | ||
| # Process one document | ||
| function(po4a_one stamp_out out full_document language deps) | ||
| path_join(full_path "${CMAKE_CURRENT_SOURCE_DIR}" "${full_document}") | ||
| - po4a_components(document _ section ext "${full_document}") | ||
| + if (full_document MATCHES "\.ent$") | ||
| + set(dest "${language}/${full_document}") | ||
| + set(full_dest "${dest}") | ||
| + else() | ||
| + po4a_components(document _ section ext "${full_document}") | ||
| - # Calculate target file name | ||
| - set(dest "${language}/${document}.${language}") | ||
| - if(section) | ||
| - set(dest "${dest}.${section}") | ||
| + # Calculate target file name | ||
| + set(dest "${language}/${document}.${language}") | ||
| + if(section) | ||
| + set(dest "${dest}.${section}") | ||
| + endif() | ||
| + set(full_dest "${dest}.${ext}") | ||
| endif() | ||
| # po4a might drop files not translated enough, so build a stamp file | ||
| @@ -106,17 +112,17 @@ function(po4a_one stamp_out out full_document language deps) | ||
| --package-name='${PROJECT_NAME}-doc' | ||
| --package-version='${PACKAGE_VERSION}' | ||
| --msgid-bugs-address='${PACKAGE_MAIL}' | ||
| - --translate-only ${dest}.${ext} | ||
| + --translate-only ${full_dest} | ||
| --srcdir ${CMAKE_CURRENT_SOURCE_DIR} | ||
| --destdir ${CMAKE_CURRENT_BINARY_DIR} | ||
| ${CMAKE_CURRENT_SOURCE_DIR}/po4a.conf | ||
| COMMAND ${CMAKE_COMMAND} -E touch ${stamp} | ||
| - COMMENT "Generating ${dest}.${ext} (or dropping it)" | ||
| + COMMENT "Generating ${full_dest} (or dropping it)" | ||
| DEPENDS ${full_document} ${deps} po/${language}.po | ||
| ) | ||
| # Return result | ||
| set(${stamp_out} ${stamp} PARENT_SCOPE) | ||
| - set(${out} ${CMAKE_CURRENT_BINARY_DIR}/${dest}.${ext} PARENT_SCOPE) | ||
| + set(${out} ${CMAKE_CURRENT_BINARY_DIR}/${full_dest} PARENT_SCOPE) | ||
| endfunction() | ||
| function(xsltproc_one) | ||
| @@ -251,7 +257,7 @@ function(add_docbook target) | ||
| set(generated "") | ||
| set(options HTML TEXT MANPAGE ALL) | ||
| set(oneValueArgs) | ||
| - set(multiValueArgs INSTALL DOCUMENTS LINGUAS DEPENDS) | ||
| + set(multiValueArgs INSTALL DOCUMENTS LINGUAS TRANSLATED_ENTITIES DEPENDS) | ||
| cmake_parse_arguments(DOC "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) | ||
| if (DOC_HTML) | ||
| @@ -264,6 +270,13 @@ function(add_docbook target) | ||
| list(APPEND formats MANPAGE) | ||
| endif() | ||
| + foreach(document ${DOC_TRANSLATED_ENTITIES}) | ||
| + foreach(lang ${DOC_LINGUAS}) | ||
| + po4a_one(po4a_stamp po4a_out ${document} "${lang}" "") | ||
| + list(APPEND DOC_DEPENDS ${po4a_stamp}) | ||
| + endforeach() | ||
| + endforeach() | ||
| + | ||
| foreach(document ${DOC_DOCUMENTS}) | ||
| foreach(lang ${DOC_LINGUAS}) | ||
| po4a_one(po4a_stamp po4a_out ${document} "${lang}" "${DOC_DEPENDS}") | ||
View
25
CMake/FindSeccomp.cmake
| @@ -0,0 +1,25 @@ | ||
| +# - Try to find SECCOMP | ||
| +# Once done, this will define | ||
| +# | ||
| +# SECCOMP_FOUND - system has SECCOMP | ||
| +# SECCOMP_INCLUDE_DIRS - the SECCOMP include directories | ||
| +# SECCOMP_LIBRARIES - the SECCOMP library | ||
| +find_package(PkgConfig) | ||
| + | ||
| +pkg_check_modules(SECCOMP_PKGCONF libseccomp) | ||
| + | ||
| +find_path(SECCOMP_INCLUDE_DIRS | ||
| + NAMES seccomp.h | ||
| + PATHS ${SECCOMP_PKGCONF_INCLUDE_DIRS} | ||
| +) | ||
| + | ||
| + | ||
| +find_library(SECCOMP_LIBRARIES | ||
| + NAMES seccomp | ||
| + PATHS ${SECCOMP_PKGCONF_LIBRARY_DIRS} | ||
| +) | ||
| + | ||
| +include(FindPackageHandleStandardArgs) | ||
| +find_package_handle_standard_args(SECCOMP DEFAULT_MSG SECCOMP_INCLUDE_DIRS SECCOMP_LIBRARIES) | ||
| + | ||
| +mark_as_advanced(SECCOMP_INCLUDE_DIRS SECCOMP_LIBRARIES) |
View
25
CMake/FindUdev.cmake
| @@ -0,0 +1,25 @@ | ||
| +# - Try to find UDEV | ||
| +# Once done, this will define | ||
| +# | ||
| +# UDEV_FOUND - system has UDEV | ||
| +# UDEV_INCLUDE_DIRS - the UDEV include directories | ||
| +# UDEV_LIBRARIES - the UDEV library | ||
| +find_package(PkgConfig) | ||
| + | ||
| +pkg_check_modules(UDEV_PKGCONF libudev) | ||
| + | ||
| +find_path(UDEV_INCLUDE_DIRS | ||
| + NAMES libudev.h | ||
| + PATHS ${UDEV_PKGCONF_INCLUDE_DIRS} | ||
| +) | ||
| + | ||
| + | ||
| +find_library(UDEV_LIBRARIES | ||
| + NAMES udev | ||
| + PATHS ${UDEV_PKGCONF_LIBRARY_DIRS} | ||
| +) | ||
| + | ||
| +include(FindPackageHandleStandardArgs) | ||
| +find_package_handle_standard_args(Udev DEFAULT_MSG UDEV_INCLUDE_DIRS UDEV_LIBRARIES) | ||
| + | ||
| +mark_as_advanced(UDEV_INCLUDE_DIRS UDEV_LIBRARIES) |
View
3
CMake/Translations.cmake
| @@ -31,6 +31,9 @@ function(apt_add_translation_domain) | ||
| get_target_property(source_dir ${target} SOURCE_DIR) | ||
| get_target_property(sources ${target} SOURCES) | ||
| foreach(source ${sources}) | ||
| + if (source MATCHES TARGET_OBJECTS) | ||
| + continue() | ||
| + endif() | ||
| path_join(file "${source_dir}" "${source}") | ||
| file(RELATIVE_PATH relfile ${PROJECT_SOURCE_DIR} ${file}) | ||
| set(files ${files} ${relfile}) | ||
View
10
CMake/config.h.in
| @@ -17,6 +17,12 @@ | ||
| /* Define if we have the lz4 library for lz4 */ | ||
| #cmakedefine HAVE_LZ4 | ||
| +/* Define if we have the udev library */ | ||
| +#cmakedefine HAVE_UDEV | ||
| + | ||
| +/* Define if we have the seccomp library */ | ||
| +#cmakedefine HAVE_SECCOMP | ||
| + | ||
| /* These two are used by the statvfs shim for glibc2.0 and bsd */ | ||
| /* Define if we have sys/vfs.h */ | ||
| #cmakedefine HAVE_VFS_H | ||
| @@ -31,9 +37,6 @@ | ||
| /* Define if we have machine/endian.h */ | ||
| #cmakedefine HAVE_MACHINE_ENDIAN_H | ||
| -/* Define if we have enabled pthread support */ | ||
| -#cmakedefine HAVE_PTHREAD | ||
| - | ||
| /* Check for getresuid() function and similar ones */ | ||
| #cmakedefine HAVE_GETRESUID | ||
| #cmakedefine HAVE_GETRESGID | ||
| @@ -71,6 +74,7 @@ | ||
| #define APT_8_CLEANER_HEADERS | ||
| #define APT_9_CLEANER_HEADERS | ||
| #define APT_10_CLEANER_HEADERS | ||
| +#define APT_15_CLEANER_HEADERS | ||
| /* unrolling is faster combined with an optimizing compiler */ | ||
| #define SHA2_UNROLL_TRANSFORM | ||
View
32
CMakeLists.txt
| @@ -32,7 +32,7 @@ include(CheckFunctionExists) | ||
| include(CheckStructHasMember) | ||
| include(GNUInstallDirs) | ||
| include(TestBigEndian) | ||
| -find_package(Threads) | ||
| +find_package(Threads REQUIRED) | ||
| find_package(LFS REQUIRED) | ||
| find_package(Iconv REQUIRED) | ||
| @@ -75,11 +75,9 @@ if (BERKELEY_DB_FOUND) | ||
| set(HAVE_BDB 1) | ||
| endif() | ||
| - | ||
| -# apt-transport-https dependencies | ||
| -find_package(CURL REQUIRED) | ||
| -if (CURL_FOUND) | ||
| - set(HAVE_CURL 1) | ||
| +find_package(GnuTLS REQUIRED) | ||
| +if (GNUTLS_FOUND) | ||
| + set(HAVE_GNUTLS 1) | ||
| endif() | ||
| # (De)Compressor libraries | ||
| @@ -89,22 +87,32 @@ if (ZLIB_FOUND) | ||
| endif() | ||
| -find_package(BZip2) | ||
| +find_package(BZip2 REQUIRED) | ||
| if (BZIP2_FOUND) | ||
| set(HAVE_BZ2 1) | ||
| endif() | ||
| -find_package(LZMA) | ||
| +find_package(LZMA REQUIRED) | ||
| if (LZMA_FOUND) | ||
| set(HAVE_LZMA 1) | ||
| endif() | ||
| -find_package(LZ4) | ||
| +find_package(LZ4 REQUIRED) | ||
| if (LZ4_FOUND) | ||
| set(HAVE_LZ4 1) | ||
| endif() | ||
| +find_package(Udev) | ||
| +if (UDEV_FOUND) | ||
| + set(HAVE_UDEV 1) | ||
| +endif() | ||
| + | ||
| +find_package(Seccomp) | ||
| +if (SECCOMP_FOUND) | ||
| + set(HAVE_SECCOMP 1) | ||
| +endif() | ||
| + | ||
| # Mount()ing and stat()ing and friends | ||
| check_symbol_exists(statfs sys/vfs.h HAVE_VFS_H) | ||
| check_include_files(sys/params.h HAVE_PARAMS_H) | ||
| @@ -132,10 +140,6 @@ test_big_endian(WORDS_BIGENDIAN) | ||
| # FreeBSD | ||
| add_definitions(-D_WITH_GETLINE=1) | ||
| -if (CMAKE_USE_PTHREADS_INIT) | ||
| - set(HAVE_PTHREAD 1) | ||
| -endif() | ||
| - | ||
| CHECK_INCLUDE_FILES(machine/endian.h HAVE_MACHINE_ENDIAN_H) | ||
| CHECK_INCLUDE_FILES(sys/endian.h HAVE_SYS_ENDIAN_H) | ||
| CHECK_INCLUDE_FILES(endian.h HAVE_ENDIAN_H) | ||
| @@ -172,7 +176,7 @@ endif() | ||
| # Configure some variables like package, version and architecture. | ||
| set(PACKAGE ${PROJECT_NAME}) | ||
| set(PACKAGE_MAIL "APT Development Team <deity@lists.debian.org>") | ||
| -set(PACKAGE_VERSION "1.4") | ||
| +set(PACKAGE_VERSION "1.6~alpha5") | ||
| if (NOT DEFINED DPKG_DATADIR) | ||
| execute_process(COMMAND ${PERL_EXECUTABLE} -MDpkg -e "print $Dpkg::DATADIR;" | ||
View
11
Dockerfile
| @@ -0,0 +1,11 @@ | ||
| +FROM debian:testing | ||
| +COPY . /tmp | ||
| +WORKDIR /tmp | ||
| +RUN sed -i s#://deb.debian.org#://cdn-fastly.deb.debian.org# /etc/apt/sources.list \ | ||
| + && apt-get update \ | ||
| + && adduser --home /home/travis travis --quiet --disabled-login --gecos "" --uid 1000 \ | ||
| + && env DEBIAN_FRONTEND=noninteractive apt-get install build-essential ccache ninja-build expect curl git -q -y \ | ||
| + && env DEBIAN_FRONTEND=noninteractive ./prepare-release travis-ci \ | ||
| + && dpkg-reconfigure ccache \ | ||
| + && rm -r /tmp/* \ | ||
| + && apt-get clean |
View
8
apt-inst/contrib/arfile.cc
| @@ -14,16 +14,16 @@ | ||
| ##################################################################### */ | ||
| /*}}}*/ | ||
| // Include Files /*{{{*/ | ||
| -#include<config.h> | ||
| +#include <config.h> | ||
| #include <apt-pkg/arfile.h> | ||
| -#include <apt-pkg/strutl.h> | ||
| -#include <apt-pkg/fileutl.h> | ||
| #include <apt-pkg/error.h> | ||
| +#include <apt-pkg/fileutl.h> | ||
| +#include <apt-pkg/strutl.h> | ||
| +#include <string> | ||
| #include <string.h> | ||
| #include <sys/types.h> | ||
| -#include <string> | ||
| #include <apti18n.h> | ||
| /*}}}*/ | ||
View
3
apt-inst/contrib/arfile.h
| @@ -15,9 +15,8 @@ | ||
| #ifndef PKGLIB_ARFILE_H | ||
| #define PKGLIB_ARFILE_H | ||
| - | ||
| -#include <string> | ||
| #include <apt-pkg/macros.h> | ||
| +#include <string> | ||
| #ifndef APT_8_CLEANER_HEADERS | ||
| #include <apt-pkg/fileutl.h> | ||
| #endif | ||
Oops, something went wrong.