Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
21 changes: 18 additions & 3 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@
image: ubuntu:noble
image: debian:testing
variables:
DEBIAN_FRONTEND: noninteractive
CCACHE_DIR: $CI_PROJECT_DIR/.ccache
CCACHE_BASEDIR: $CI_PROJECT_DIR
APT_CMAKE_BUILD_OPTIONS: ''
DEB_BUILD_PROFILES: ''
BUILD_PRE: ':'
cache:
paths:
- .ccache
before_script:
- rm -f /etc/dpkg/dpkg.cfg.d/excludes
- apt-get update
- apt-get install --no-install-recommends -qq build-essential expect sudo ccache moreutils adduser
- adduser --home /home/travis travis --quiet --disabled-login --gecos ""
- adduser --home /home/travis travis --quiet --disabled-login --gecos "" --shell /bin/sh
- chmod 755 /root
- chmod -R o+rwX $PWD
- ./prepare-release travis-ci
- sudo -u travis mkdir -p build .ccache
- $BUILD_PRE
- sudo -u travis env -C build cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache ${APT_CMAKE_BUILD_OPTIONS} -G Ninja ..
- sudo -u travis --preserve-env=CCACHE_DIR,CCACHE_BASEDIR ninja -C build

Expand All @@ -29,8 +31,21 @@ test as root:
- CTEST_OUTPUT_ON_FAILURE=1 ninja -C build test
- unbuffer ./test/integration/run-tests -q -j 4

test solver3 and gpgv:
stage: test
variables:
APT_CMAKE_BUILD_OPTIONS: '-DWITH_DOC=OFF -DUSE_NLS=OFF'
DEB_BUILD_PROFILES: 'nodoc'
BUILD_PRE: 'rm /usr/bin/sqv'
script:
- CTEST_OUTPUT_ON_FAILURE=1 ninja -C build test
- unbuffer ./test/integration/run-tests -q -j 4 --solver 3.0 --skip solver3.broken

test as user:
image: ubuntu:noble
image:
name: debian:testing
docker:
platform: linux/i386
stage: test
script:
- apt-get install --no-install-recommends -qq libxml2-utils
Expand Down
4 changes: 3 additions & 1 deletion CMake/Documentation.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -154,14 +154,16 @@ function(xsltproc_one)
if (DOC_MANPAGE)
if (language)
set(manpage_output "${CMAKE_CURRENT_BINARY_DIR}/${language}/${document}.${section}")
set(manpage_l10npath "/${language}")
else()
set(manpage_l10npath "")
set(manpage_output "${CMAKE_CURRENT_BINARY_DIR}/${document}.${section}")
endif()
set(manpage_stylesheet "${CMAKE_CURRENT_BINARY_DIR}/manpage-style.xsl")
set(manpage_params)

install(FILES ${manpage_output}
DESTINATION ${CMAKE_INSTALL_MANDIR}/${language}/man${section}
DESTINATION ${CMAKE_INSTALL_MANDIR}${manpage_l10npath}/man${section}
OPTIONAL)
endif()
if (DOC_HTML)
Expand Down
25 changes: 0 additions & 25 deletions CMake/FindGCRYPT.cmake

This file was deleted.

2 changes: 0 additions & 2 deletions CMake/Misc.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,6 @@ function(add_version_script target)
COMMAND echo "${name} {global: *; };" > "${script}"
VERBATIM )
add_custom_target(${target}-versionscript DEPENDS "${script}")
target_link_libraries(${target} PRIVATE -Wl,-version-script="${script}")
add_dependencies(${target} ${target}-versionscript)
endfunction()

function(path_join out path1 path2)
Expand Down
5 changes: 3 additions & 2 deletions CMake/Translations.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ function(apt_add_translation_domain)
set(domain ${NLS_DOMAIN})
set(xgettext_params
--add-comments
--from-code=utf-8
--foreign
--package-name=${PROJECT_NAME}
--package-version=${PACKAGE_VERSION}
Expand Down Expand Up @@ -113,7 +114,7 @@ function(apt_add_translation_domain)
DEPENDS ${file} ${CMAKE_CURRENT_BINARY_DIR}/${domain}.pot-tmp
)
add_custom_command(OUTPUT ${outdir}/${domain}.mo
COMMAND msgfmt --statistics -o ${outdir}/${domain}.mo ${outdir}/${domain}.po
COMMAND msgfmt --check --statistics -o ${outdir}/${domain}.mo ${outdir}/${domain}.po
DEPENDS ${outdir}/${domain}.po
)

Expand Down Expand Up @@ -178,7 +179,7 @@ function(apt_add_po_statistics excluded)
add_custom_command(
TARGET statistics PRE_BUILD
COMMAND printf "%-6s " "${langcode}:"
COMMAND msgfmt --statistics -o /dev/null ${translation}
COMMAND msgfmt --check --statistics -o /dev/null ${translation}
VERBATIM
)
endforeach()
Expand Down
7 changes: 4 additions & 3 deletions CMake/config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@
/* Define if we have the timegm() function */
#cmakedefine HAVE_TIMEGM

/* Define if we have the gnutls library for TLS */
#cmakedefine HAVE_GNUTLS

/* Define if we have the zlib library for gzip */
#cmakedefine HAVE_ZLIB

Expand Down Expand Up @@ -85,3 +82,7 @@

/* Whether to check for and require merged usr if a usrmerge package is available. */
#cmakedefine REQUIRE_MERGED_USR

#cmakedefine DEFAULT_PAGER "${DEFAULT_PAGER}"
#cmakedefine PAGER_ENV "${PAGER_ENV}"
#cmakedefine SQV_EXECUTABLE "${SQV_EXECUTABLE}"
3 changes: 2 additions & 1 deletion CMake/vendor_substitute.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ file(READ ${IN} input)
foreach(variable ${VARS})
execute_process(COMMAND ${PROJECT_SOURCE_DIR}/vendor/getinfo
--vendor ${CURRENT_VENDOR} ${variable}
OUTPUT_VARIABLE value OUTPUT_STRIP_TRAILING_WHITESPACE)
OUTPUT_VARIABLE value OUTPUT_STRIP_TRAILING_WHITESPACE
COMMAND_ERROR_IS_FATAL ANY)
string(REPLACE "&${variable};" "${value}" input "${input}")
endforeach()
file(WRITE ${OUT} "${input}")
22 changes: 13 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ find_package(Iconv REQUIRED)
find_package(Perl REQUIRED)

find_program(TRIEHASH_EXECUTABLE NAMES triehash)
find_program(SQV_EXECUTABLE NAMES sqv)

if (NOT TRIEHASH_EXECUTABLE)
message(FATAL_ERROR "Could not find triehash executable")
Expand Down Expand Up @@ -85,16 +86,14 @@ add_optional_compile_options(Wdouble-promotion)
add_optional_compile_options(Wsuggest-override)
add_optional_compile_options(Werror=suggest-override)
add_optional_compile_options(Werror=return-type)
add_optional_compile_options(Wp,-D_GLIBCXX_ASSERTIONS)
# apt-ftparchive dependencies
find_package(Berkeley REQUIRED)
if (BERKELEY_FOUND)
set(HAVE_BDB 1)
endif()

find_package(GnuTLS)
if (GNUTLS_FOUND)
set(HAVE_GNUTLS 1)
endif()
find_package(OpenSSL REQUIRED)

# (De)Compressor libraries
find_package(ZLIB REQUIRED)
Expand Down Expand Up @@ -140,7 +139,6 @@ if (SECCOMP_FOUND)
set(HAVE_SECCOMP 1)
endif()

find_package(GCRYPT REQUIRED)
find_package(XXHASH REQUIRED)

# Mount()ing and stat()ing and friends
Expand Down Expand Up @@ -206,22 +204,25 @@ endif()
# Configure some variables like package, version and architecture.
set(PACKAGE ${PROJECT_NAME})
set(PACKAGE_MAIL "APT Development Team <[email protected]>")
set(PACKAGE_VERSION "2.8.0")
set(PACKAGE_VERSION "3.0.2")
string(REGEX MATCH "^[0-9.]+" PROJECT_VERSION ${PACKAGE_VERSION})

if (NOT DEFINED DPKG_DATADIR)
execute_process(COMMAND ${PERL_EXECUTABLE} -MDpkg -e "print $Dpkg::DATADIR;"
OUTPUT_VARIABLE DPKG_DATADIR_CMD OUTPUT_STRIP_TRAILING_WHITESPACE)
OUTPUT_VARIABLE DPKG_DATADIR_CMD OUTPUT_STRIP_TRAILING_WHITESPACE
COMMAND_ERROR_IS_FATAL ANY)
message(STATUS "Found dpkg data dir: ${DPKG_DATADIR_CMD}")
set(DPKG_DATADIR "${DPKG_DATADIR_CMD}" CACHE PATH "dpkg data directory")
endif()
if (NOT DEFINED COMMON_ARCH)
execute_process(COMMAND dpkg-architecture -qDEB_HOST_ARCH
OUTPUT_VARIABLE COMMON_ARCH OUTPUT_STRIP_TRAILING_WHITESPACE)
OUTPUT_VARIABLE COMMON_ARCH OUTPUT_STRIP_TRAILING_WHITESPACE
COMMAND_ERROR_IS_FATAL ANY)
endif()
if (NOT DEFINED ROOT_GROUP)
execute_process(COMMAND id -gn root
OUTPUT_VARIABLE ROOT_GROUP OUTPUT_STRIP_TRAILING_WHITESPACE)
OUTPUT_VARIABLE ROOT_GROUP OUTPUT_STRIP_TRAILING_WHITESPACE
COMMAND_ERROR_IS_FATAL ANY)
message(STATUS "Found root group: ${ROOT_GROUP}")
endif()
set(ROOT_GROUP "${ROOT_GROUP}" CACHE STRING "Group of root (e.g.: wheel or root)")
Expand All @@ -234,6 +235,9 @@ set(CONF_DIR "${CMAKE_INSTALL_FULL_SYSCONFDIR}/apt" CACHE PATH "Your /etc/apt")
set(LIBEXEC_DIR "${CMAKE_INSTALL_FULL_LIBEXECDIR}/apt" CACHE PATH "Your /usr/libexec/apt")
set(BIN_DIR "${CMAKE_INSTALL_FULL_BINDIR}")

# Setup the default pager and the environment
set(DEFAULT_PAGER "pager" CACHE STRING "The default pager to use for commands that support it.")
set(PAGER_ENV "LESS=FRSXMK\\nMORE=FRX\\nLV=-c" CACHE STRING "Environment to pass to the pager. One variable per line, with escaped newlines")

# Configure our configuration headers (config.h and apti18n.h)
configure_file(CMake/config.h.in ${PROJECT_BINARY_DIR}/include/config.h)
Expand Down
43 changes: 22 additions & 21 deletions COPYING
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,8 @@ Comment:
for the project has always been GPL-2+, so we cannot be sure that contributors
meant to grant additional permissions.
.
Translation files are considered to generally be GPL-2+,
but they also include strings used by methods/rsh.cc which appears to be GPL-2.
As the translations are split into separate domains later on,
these strings are not loaded by library users outside of apt
(they are in the 'apt' translation domain).
Translation files are also considered to generally be GPL-2+,
but they might include strings used in code with other licenses.
.
The apt-pkg/contrib/fileutl.cc file states "RunScripts()" is "GPLv2".
We believe that this was not meant to exclude later versions of the GPL,
Expand Down Expand Up @@ -52,22 +49,9 @@ Copyright: 1997-1999 Jason Gunthorpe and others
2014 Anthony Towns
License: GPL-2+

Files: methods/rsh.cc
Copyright: 2000 Ben Collins <[email protected]>
License: GPL-2
Comment:
This file stated:
Licensed under the GNU General Public License v2 [no exception clauses]
.
We believe that this was intended to be not a statement against future
versions of the GPL, but meant to exclude the Qt license exception in
place in APT until that time.
.
We received permission from Ben in 2021 to relicense under GPL-2+,
contributions from Adam Heath and Daniel Hartwig may still have to
be considered GPL-2 for the time being.
.
Other contributions are GPL-2+
Files: methods/connect.c
Copyright: Copyright (c) 1996 - 2023, Daniel Stenberg, <[email protected]>, and many contributors
License: GPL-2+ and curl

Files: CMake/FindBerkeley.cmake
Copyright: 2006, Alexander Dymo, <[email protected]>
Expand Down Expand Up @@ -153,3 +137,20 @@ License: GPL-2+
Comment:
On Debian systems, the complete text of the GNU General
Public License version 2 can be found in "/usr/share/common-licenses/GPL-2".

License: curl
Permission to use, copy, modify, and distribute this software for any purpose
with or without fee is hereby granted, provided that the above copyright
notice and this permission notice appear in all copies.
.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN
NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
OR OTHER DEALINGS IN THE SOFTWARE.
.
Except as contained in this notice, the name of a copyright holder shall not
be used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization of the copyright holder.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ Included tools are:
as well as available packages
* **apt-cdrom** to use removable media as a source for packages
* **apt-config** as an interface to the configuration settings
* **apt-key** as an interface to manage authentication keys
* **apt-extracttemplates** to be used by debconf to prompt for configuration
questions before installation
* **apt-ftparchive** creates Packages and other index files
Expand Down
9 changes: 9 additions & 0 deletions abicheck/apt_build.xml.in
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,12 @@
<libs>
@build_path@/apt-pkg/
</libs>

<skip_types>
SubstVar
_ns_flagdata
</skip_types>

<defines>
#define APT_COMPILING_APT 1
</defines>
9 changes: 9 additions & 0 deletions abicheck/apt_installed.xml.in
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,12 @@
<libs>
@installed_libapt@
</libs>

<skip_types>
SubstVar
_ns_flagdata
</skip_types>

<defines>
#define APT_COMPILING_APT 1
</defines>
Loading
Loading