Skip to content
This repository has been archived by the owner on Dec 12, 2022. It is now read-only.

Commit

Permalink
Merge branch 'Debian:main' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
landfillbaby committed Apr 21, 2022
2 parents 71cc2ba + 7278226 commit 3e726c1
Show file tree
Hide file tree
Showing 87 changed files with 2,777 additions and 1,365 deletions.
26 changes: 18 additions & 8 deletions .mailmap
Original file line number Diff line number Diff line change
@@ -1,18 +1,28 @@
# Unify user identities
Christian Perrier <bubulle@debian.org>
<ian@davenant.greenend.org.uk> <ian@anarres>
<ian@davenant.greenend.org.uk> <ian@liberator>
# Aliases
<mvo@ubuntu.com> <michael.vogt@ubuntu.com>

# Use real mail addresses
<ijackson@chiark.greenend.org.uk> <ian@anarres>
<ijackson@chiark.greenend.org.uk> <ian@liberator>
<jackyf@debian.org> <jackyf@1501-debian>
Michael Vogt <mvo@debian.org> <egon@debian-vm>
<mvo@debian.org> <egon@bottom>
<mvo@debian.org> <egon@debian-devbox>
<mvo@debian.org> <egon@pop>
<mvo@debian.org> <egon@tas>
<michael.vogt@ubuntu.com> <mvo@ubuntu.com>
# Name changes
Peter Krefting <peterk@debian.org>
# Email as user name

# Very broken names
Christian Perrier <bubulle@debian.org> bubulle@debian.org <>
Julian Andres Klode <jak@debian.org> jak@debian.org <>
Loïc Minier <lool@dooz.org> lool@dooz.org <>
Martin Pitt <martin@piware.de> martin@piware.de <>

# Spell names properly
Christian Perrier <bubulle@debian.org>
Joe Hansen <joedalton2@yahoo.dk>
Johannes Schauer Marin Rodrigues <j.schauer@email.de>
Johannes Schauer Marin Rodrigues <josch@debian.org>
Johannes Schauer Marin Rodrigues <josch@mister-muffin.de>
Michael Vogt <mvo@debian.org>
Peter Krefting <peterk@debian.org>
Trần Ngọc Quân <vnwildman@gmail.com>
3 changes: 0 additions & 3 deletions CMake/config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,3 @@

/* Group of the root user */
#cmakedefine ROOT_GROUP "${ROOT_GROUP}"

/* unrolling is faster combined with an optimizing compiler */
#define SHA2_UNROLL_TRANSFORM
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,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 "2.3.14")
set(PACKAGE_VERSION "2.4.5")
string(REGEX MATCH "^[0-9.]+" PROJECT_VERSION ${PACKAGE_VERSION})

if (NOT DEFINED DPKG_DATADIR)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ APT is maintained in git, the official repository being located at
[https://salsa.debian.org/apt-team/apt](https://salsa.debian.org/apt-team/apt),
but also available at other locations like [GitHub](https://github.com/Debian/apt).

The default branch is `master`, other branches targeted at different
The default branch is `main`, other branches targeted at different
derivatives and releases being used as needed. Various topic branches in
different stages of completion might be branched of from those, which you
are encouraged to do as well.
Expand Down
15 changes: 1 addition & 14 deletions apt-pkg/algorithms.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1514,9 +1514,6 @@ std::string GetProtectedKernelsRegex(pkgCache *cache, bool ReturnRemove)
// needs to be initialized to 0s, might not be set up.
utsname uts{};
std::string bootedVersion;
std::string lastInstalledVersion;

std::string lastInstalledUname = _config->Find("APT::LastInstalledKernel");

// Get currently booted version, but only when not on reproducible build.
if (getenv("SOURCE_DATE_EPOCH") == 0)
Expand Down Expand Up @@ -1548,8 +1545,6 @@ std::string GetProtectedKernelsRegex(pkgCache *cache, bool ReturnRemove)

if (pkgUname == uts.release)
bootedVersion = pkgVersion;
if (pkgUname == lastInstalledUname)
lastInstalledVersion = pkgVersion;
}

if (version2unames.size() == 0)
Expand All @@ -1567,19 +1562,13 @@ std::string GetProtectedKernelsRegex(pkgCache *cache, bool ReturnRemove)
std::clog << "Keeping booted kernel " << bootedVersion << std::endl;
keep.insert(bootedVersion);
}
if (not lastInstalledVersion.empty())
{
if (Debug)
std::clog << "Keeping installed kernel " << lastInstalledVersion << std::endl;
keep.insert(lastInstalledVersion);
}
if (latest != version2unames.rend())
{
if (Debug)
std::clog << "Keeping latest kernel " << latest->first << std::endl;
keep.insert(latest->first);
}
if (keep.size() < 3 && previous != version2unames.rend())
if (keep.size() < 2 && previous != version2unames.rend())
{
if (Debug)
std::clog << "Keeping previous kernel " << previous->first << std::endl;
Expand All @@ -1596,8 +1585,6 @@ std::string GetProtectedKernelsRegex(pkgCache *cache, bool ReturnRemove)
for (auto &pattern : _config->FindVector("APT::VersionedKernelPackages"))
{
// Legacy compatibility: Always protected the booted uname and last installed uname
if (not lastInstalledUname.empty())
ss << "|^" << pattern << "-" << escapeSpecial(lastInstalledUname) << "$";
if (*uts.release)
ss << "|^" << pattern << "-" << escapeSpecial(uts.release) << "$";
for (auto const &kernel : version2unames)
Expand Down
2 changes: 1 addition & 1 deletion apt-pkg/depcache.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2056,7 +2056,7 @@ bool pkgDepCache::SetCandidateRelease(pkgCache::VerIterator TargetVer,
if (itsFine == false)
{
// change the candidate
Changed.push_back(make_pair(V, TargetVer));
Changed.emplace_back(V, TargetVer);
if (SetCandidateRelease(V, TargetRel, Changed) == false)
{
if (stillOr == false)
Expand Down
1 change: 1 addition & 0 deletions apt-pkg/tagfile-keys.list
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ SHA512
Size
Source
Standards-Version
Static-Built-Using
Status
Subarchitecture
Suggests
Expand Down
1 change: 1 addition & 0 deletions apt-pkg/tagfile-order.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ static const char *iTFRewritePackageOrder[] = {
"Package_Revision", // Obsolete (warning in dpkg)
"Kernel-Version", // Used only by d-i
"Built-Using",
"Static-Built-Using",
"Built-For-Profiles",
"Auto-Built-Package",
"Multi-Arch",
Expand Down
3 changes: 2 additions & 1 deletion apt-private/private-cacheset.cc
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,8 @@ APT::VersionSet CacheSetHelperAPTGet::tryVirtualPackage(pkgCacheFile &Cache, pkg
{
case RELEASE:
for (auto File = V.FileList(); not File.end(); ++File)
if (lastmatcher == File.File().Archive() || lastmatcher == File.File().Codename())
if ((File.File().Archive() != nullptr && lastmatcher == File.File().Archive()) ||
(File.File().Codename() != nullptr && lastmatcher == File.File().Codename()))
{
verset.push_back(V);
break;
Expand Down
2 changes: 1 addition & 1 deletion apt-private/private-source.cc
Original file line number Diff line number Diff line change
Expand Up @@ -740,7 +740,7 @@ bool DoBuildDep(CommandLine &CmdL)
break;
}
}
std::string const pseudo = "command line argument";
std::string const pseudo = "satisfy:command-line";
WriteBuildDependencyPackage(buildDepsPkgFile, pseudo, pseudoArch, BuildDeps);
pseudoPkgs.emplace_back(pseudo, pseudoArch, "");
}
Expand Down
3 changes: 3 additions & 0 deletions cmdline/apt-key.in
Original file line number Diff line number Diff line change
Expand Up @@ -645,6 +645,9 @@ if [ -z "$TRUSTEDFILE" ]; then
TRUSTEDFILE="/etc/apt/trusted.gpg"
eval $(apt-config shell TRUSTEDFILE Apt::GPGV::TrustedKeyring)
eval $(apt-config shell TRUSTEDFILE Dir::Etc::Trusted/f)
if [ "$APT_KEY_NO_LEGACY_KEYRING" ]; then
TRUSTEDFILE="/dev/null"
fi
fi

command="$1"
Expand Down
46 changes: 26 additions & 20 deletions completions/bash/apt
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ _apt()
"list"
"search"
"show" "showsrc"
"install" "remove" "purge" "autoremove" "autopurge"
"install" "reinstall" "remove" "purge" "autoremove" "autopurge"
"update"
"upgrade" "full-upgrade" "dist-upgrade"
"edit-sources"
Expand All @@ -52,8 +52,8 @@ _apt()
"policy")

local command i
for (( i=0; i < ${#words[@]}-1; i++ )); do
if [[ ${COMMANDS[@]} =~ ${words[i]} ]]; then
for (( i=1; i < ${#words[@]}; i++ )); do
if [[ " ${COMMANDS[*]} " == *" ${words[i]} "* ]]; then
command=${words[i]}
break
fi
Expand All @@ -67,10 +67,11 @@ _apt()
;;
esac

# supported options per command
if [[ "$cur" == -* ]]; then
case $command in
install|remove|purge|upgrade|dist-upgrade|full-upgrade|autoremove)
# When the cursor (cword) is before the command word (i), only suggest
# options but not package or file names:
if [[ $cur == -* || ( -v command && $cword -le $i ) ]]; then
case ${command-} in
install|reinstall|remove|purge|upgrade|dist-upgrade|full-upgrade|autoremove|autopurge)
COMPREPLY=( $( compgen -W '--show-progress
--fix-broken --purge --verbose-versions --auto-remove
-s --simulate --dry-run
Expand Down Expand Up @@ -167,12 +168,14 @@ _apt()
return 0
;;
esac

return
fi

# specific command arguments
if [[ -n $command ]]; then
if [[ -v command ]]; then
case $command in
remove|purge|autoremove)
remove|purge|autoremove|autopurge)
if [[ -f /etc/debian_version ]]; then
# Debian system
COMPREPLY=( $( \
Expand All @@ -188,18 +191,23 @@ _apt()
2> /dev/null ) )
return 0
;;
install)
COMPREPLY=( $( apt-cache --no-generate pkgnames "$cur" \
2> /dev/null ) )
if [[ "$cur" == ./* || "$cur" == /* ]]; then
install|reinstall)
if [[ "$cur" == .* || "$cur" == /* || "$cur" == ~* ]]; then
_filedir "deb"
else
COMPREPLY=( $( apt-cache --no-generate pkgnames "$cur" \
2> /dev/null ) )
fi
return 0
;;
source|build-dep|showsrc|policy)
COMPREPLY=( $( apt-cache --no-generate pkgnames "$cur" \
2> /dev/null ) $( apt-cache dumpavail | \
command grep "^Source: $cur" | sort -u | cut -f2 -d" " ) )
if [[ "$command" == build-dep && ( "$cur" == .* || "$cur" == /* || "$cur" == ~* ) ]]; then
_filedir "dsc"
else
COMPREPLY=( $( apt-cache --no-generate pkgnames "$cur" \
2> /dev/null ) $( apt-cache dumpavail | \
command grep "^Source: $cur" | sort -u | cut -f2 -d" " ) )
fi
return 0
;;
edit-sources)
Expand All @@ -213,10 +221,8 @@ _apt()
return 0
;;
esac
fi

# no command yet, show what commands we have
if [ "$command" = "" ]; then
else
# no command yet, show what commands we have
COMPREPLY=( $( compgen -W '${COMMANDS[@]}' -- "$cur" ) )
fi

Expand Down
8 changes: 8 additions & 0 deletions debian/NEWS
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
apt (2.4.0) unstable; urgency=medium

GPG verification now first tries only the trusted.gpg.d keys, before
then falling back to the legacy trusted.gpg keyring and issuing a
warning to migrate keys if verification succeeded in the fallback.

-- Julian Andres Klode <jak@debian.org> Tue, 22 Feb 2022 20:01:00 +0100

apt (2.3.12) unstable; urgency=medium

The solver will no longer try to remove Essential or Protected packages,
Expand Down
16 changes: 0 additions & 16 deletions debian/apt.auto-removal.sh

This file was deleted.

20 changes: 8 additions & 12 deletions debian/apt.bug-script
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
#!/bin/bash -e

# reportbug #169495
if [ -z "$YESNO" ]; then
YESNO=$"yYnN"
fi
#!/bin/bash
set -e

cat <<EOF
I can automatically include various information about your apt configuration in
Expand All @@ -14,20 +10,20 @@ EOF
yesno "May I include your apt configuration (/etc/apt/apt.conf et al)? [Y/n] " yep

if [ "$REPLY" = "yep" ]; then
echo -e "\n-- apt-config dump --\n" >&3
printf "\n-- apt-config dump --\n\n" >&3
apt-config dump >&3 2>&1
fi

for config in /etc/apt/preferences /etc/apt/preferences.d/* /etc/apt/sources.list /etc/apt/sources.list.d/* ; do
if [ -f $config ]; then
if [ -f "$config" ]; then
yesno "May I include your $config configuration file? [Y/n] " yep
if [ "$REPLY" = "yep" ]; then
echo -e "\n-- $config --\n" >&3
cat $config >&3
printf "\n-- %s --\n\n" "$config" >&3
cat "$config" >&3
else
echo -e "\n-- ($config present, but not submitted) --\n" >&3
printf "\n-- (%s present, but not submitted) --\n\n" "$config" >&3
fi
else
echo -e "\n-- (no $config present) --\n" >&3
printf "\n-- (no %s present) --\n\n" "$config" >&3
fi
done
1 change: 1 addition & 0 deletions debian/apt.dirs
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
etc/kernel/postinst.d
usr/share/bug/apt
etc/apt/keyrings
1 change: 1 addition & 0 deletions debian/apt.maintscript
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
rm_conffile /etc/apt/apt.conf.d/20changelog 1.2.4~
# we use a systemd timer unit now
rm_conffile /etc/cron.daily/apt 1.2.10~
rm_conffile /etc/kernel/postinst.d/apt-auto-removal 2.4.5~
5 changes: 5 additions & 0 deletions debian/apt.postinst
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,9 @@ if [ "$1" = 'configure' ]; then
--no-create-home --quiet _apt || true
fi

if [ "$1" = "configure" ] && [ -n "$2" ] && dpkg --compare-versions -- "$2" le-nl "2.4.5~"; then
rm -f /etc/apt/apt.conf.d/01autoremove-kernels
fi


#DEBHELPER#
6 changes: 6 additions & 0 deletions debian/apt.systemd.daily
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@
# Values here are the default.
# Create /etc/apt/apt.conf.d/10periodic file to set your preference.
#
# All of the n-days interval options also accept the suffixes
# s for seconds, m for minutes, h for hours, d for days or
# the "always" value to do the action for every job run,
# which can be used with systemd OnCalendar overrides to
# define custom schedules for the apt update/upgrade jobs.
#
# Dir "/";
# - RootDir for all configuration files
#
Expand Down
Loading

0 comments on commit 3e726c1

Please sign in to comment.