Commit 54085fd5 authored by Lorenzo "Palinuro" Faletra's avatar Lorenzo "Palinuro" Faletra
Browse files

Import Debian version 2.2.1+parrot1

apt (2.2.1+parrot1) rolling; urgency=medium
.
  * Import new Debian release.
  * Patch methods/basehttp.c to allow https-to-http redirects.
.
apt (2.2.1) unstable; urgency=medium
.
  [ Julian Andres Klode ]
  * Do not require force-loopbreak on Protected packages (Closes: #983014)
  * Branch of as 2.2.y for bullseye
  * configuration: Add missing #include <array>
  * Remove .travis.yml, we are using GitLab CI these days
  * RunScripts: Do not reset SIGQUIT and SIGINT to SIG_DFL (LP: #1898026)
  * regression fix: do require force-loopbreak for Conflicts
.
  [ Алексей Шилин ]
  * Russian translation update (Closes: #983348)
parent 02f3c1d8
Pipeline #2374 failed with stages
image: debian:unstable
image: debian:bullseye
variables:
DEBIAN_FRONTEND: noninteractive
CCACHE_DIR: $CI_PROJECT_DIR/.ccache
......@@ -23,7 +23,7 @@ test as root:
- unbuffer ./test/integration/run-tests -q -j 4
test as user:
image: i386/debian:unstable
image: i386/debian:bullseye
stage: test
script:
- adduser --home /home/travis travis --quiet --disabled-login --gecos "" --uid 1000
......
language: cpp
cache: ccache
sudo: required
services:
- docker
env:
global:
- DEBIAN_FRONTEND=noninteractive
matrix:
- USER=travis CMAKE_FLAGS=
- USER=root CMAKE_FLAGS=-DWITH_DOC=OFF
install:
- sed -i -e "s#1000#$(id -u)#g" Dockerfile
- docker build --tag=apt-ci .
before_script:
- 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:
- 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:
- 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)'
......@@ -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.2.0")
set(PACKAGE_VERSION "2.2.1")
string(REGEX MATCH "^[0-9.]+" PROJECT_VERSION ${PACKAGE_VERSION})
if (NOT DEFINED DPKG_DATADIR)
......
......@@ -31,6 +31,7 @@
#include <string.h>
#include <algorithm>
#include <array>
#include <fstream>
#include <iterator>
#include <numeric>
......
......@@ -140,10 +140,6 @@ bool RunScripts(const char *Cnf)
return _error->Errno("waitpid","Couldn't wait for subprocess");
}
// Restore sig int/quit
signal(SIGQUIT,SIG_DFL);
signal(SIGINT,SIG_DFL);
// Check for an error code.
if (WIFEXITED(Status) == 0 || WEXITSTATUS(Status) != 0)
{
......
......@@ -1824,6 +1824,9 @@ bool pkgDPkgPM::Go(APT::Progress::PackageManager *progress)
case Item::Install:
ADDARGC("--unpack");
ADDARGC("--auto-deconfigure");
// dpkg < 1.20.8 needs --force-remove-protected to deconfigure protected packages
if (dpkgProtectedField)
ADDARGC("--force-remove-protected");
break;
}
......
......@@ -652,9 +652,11 @@ bool pkgPackageManager::EarlyRemove(PkgIterator Pkg, DepIterator const * const D
// Essential packages get special treatment
bool IsEssential = false;
if ((Pkg->Flags & pkgCache::Flag::Essential) != 0 ||
(Pkg->Flags & pkgCache::Flag::Important) != 0)
if ((Pkg->Flags & pkgCache::Flag::Essential) != 0)
IsEssential = true;
bool IsProtected = false;
if ((Pkg->Flags & pkgCache::Flag::Important) != 0)
IsProtected = true;
/* Check for packages that are the dependents of essential packages and
promote them too */
......@@ -662,14 +664,17 @@ bool pkgPackageManager::EarlyRemove(PkgIterator Pkg, DepIterator const * const D
{
for (pkgCache::DepIterator D = Pkg.RevDependsList(); D.end() == false &&
IsEssential == false; ++D)
if (D->Type == pkgCache::Dep::Depends || D->Type == pkgCache::Dep::PreDepends)
if ((D.ParentPkg()->Flags & pkgCache::Flag::Essential) != 0 ||
(D.ParentPkg()->Flags & pkgCache::Flag::Important) != 0)
if (D->Type == pkgCache::Dep::Depends || D->Type == pkgCache::Dep::PreDepends) {
if ((D.ParentPkg()->Flags & pkgCache::Flag::Essential) != 0)
IsEssential = true;
if ((D.ParentPkg()->Flags & pkgCache::Flag::Important) != 0)
IsProtected = true;
}
}
if (IsEssential == true)
{
// FIXME: Unify messaging with Protected below.
if (_config->FindB("APT::Force-LoopBreak",false) == false)
return _error->Error(_("This installation run will require temporarily "
"removing the essential package %s due to a "
......@@ -680,6 +685,16 @@ bool pkgPackageManager::EarlyRemove(PkgIterator Pkg, DepIterator const * const D
// dpkg will auto-deconfigure it, no need for the big remove hammer
else if (Dep != NULL && (*Dep)->Type == pkgCache::Dep::DpkgBreaks)
return true;
else if (IsProtected == true)
{
// FIXME: Message should talk about Protected, not Essential, and unified.
if (_config->FindB("APT::Force-LoopBreak",false) == false)
return _error->Error(_("This installation run will require temporarily "
"removing the essential package %s due to a "
"Conflicts/Pre-Depends loop. This is often bad, "
"but if you really want to do it, activate the "
"APT::Force-LoopBreak option."),Pkg.FullName().c_str());
}
bool Res = SmartRemove(Pkg);
if (Cache[Pkg].Delete() == false)
......
apt (2.2.1+parrot1) rolling; urgency=medium
* Import new Debian release.
* Patch methods/basehttp.c to allow https-to-http redirects.
-- Lorenzo "Palinuro" Faletra <palinuro@parrotsec.org> Tue, 16 Mar 2021 00:21:20 +0100
apt (2.2.1) unstable; urgency=medium
[ Julian Andres Klode ]
* Do not require force-loopbreak on Protected packages (Closes: #983014)
* Branch of as 2.2.y for bullseye
* configuration: Add missing #include <array>
* Remove .travis.yml, we are using GitLab CI these days
* RunScripts: Do not reset SIGQUIT and SIGINT to SIG_DFL (LP: #1898026)
* regression fix: do require force-loopbreak for Conflicts
[ Алексей Шилин ]
* Russian translation update (Closes: #983348)
-- Julian Andres Klode <jak@debian.org> Mon, 01 Mar 2021 22:27:55 +0100
apt (2.2.0+parrot1) rolling; urgency=medium
* Import new Debian release.
......
......@@ -3,7 +3,7 @@
;preexport = ./prepare-release pre-export
prebuild = ./prepare-release pre-build
postbuild = ./prepare-release post-build
debian-branch = master
debian-branch = 2.2.y
debian-tag = %(version)s
export-dir = ../build-area
sign-tags = True
......
......@@ -274,7 +274,7 @@
">
<!-- this will be updated by 'prepare-release' -->
<!ENTITY apt-product-version "2.2.0">
<!ENTITY apt-product-version "2.2.1">
<!-- (Code)names for various things used all over the place -->
<!ENTITY debian-oldstable-codename "buster">
......
......@@ -5,9 +5,9 @@
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: apt-doc 2.2.0\n"
"Project-Id-Version: apt-doc 2.2.1\n"
"Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n"
"POT-Creation-Date: 2021-02-18 20:35+0100\n"
"POT-Creation-Date: 2021-03-01 22:28+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
......
......@@ -5,9 +5,9 @@
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: apt 2.2.0\n"
"Project-Id-Version: apt 2.2.1\n"
"Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n"
"POT-Creation-Date: 2021-02-18 20:35+0100\n"
"POT-Creation-Date: 2021-03-01 22:28+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
......
......@@ -9,14 +9,14 @@
# Yuri Kozlov <kozlov.y@gmail.com>, 2004, 2005, 2006, 2007, 2008.
# Yuri Kozlov <yuray@komyakino.ru>, 2009, 2010, 2012, 2015, 2016.
# Lev Lamberov <dogsleg@debian.org>, 2018.
# Алексей Шилин <rootlexx@mail.ru>, 2017-2020.
# Алексей Шилин <rootlexx@mail.ru>, 2017-2021.
#
msgid ""
msgstr ""
"Project-Id-Version: apt 2.0.0\n"
"Project-Id-Version: apt 2.2.0\n"
"Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n"
"POT-Creation-Date: 2021-02-09 10:45+0100\n"
"PO-Revision-Date: 2020-03-09 22:43+0300\n"
"POT-Creation-Date: 2021-02-24 17:18+0100\n"
"PO-Revision-Date: 2021-02-22 20:02+0300\n"
"Last-Translator: Алексей Шилин <rootlexx@mail.ru>\n"
"Language-Team: русский <debian-l10n-russian@lists.debian.org>\n"
"Language: ru\n"
......@@ -698,10 +698,9 @@ msgid "Tar checksum failed, archive corrupted"
msgstr "Неправильная контрольная сумма Tar — архив повреждён"
#: apt-pkg/contrib/extracttar.cc
#, fuzzy, c-format
#| msgid "Unknown TAR header type %u, member %s"
#, c-format
msgid "Unknown TAR header type %u"
msgstr "Неизвестный тип %u, элемент %s в заголовке TAR"
msgstr "Неизвестный тип %u в заголовке TAR"
#: apt-pkg/contrib/fileutl.cc
#, c-format
......@@ -2399,7 +2398,7 @@ msgstr " Таблица версий:"
#: apt-private/private-show.cc
msgid "phased"
msgstr ""
msgstr "поэтапно"
#: apt-private/private-source.cc
#, c-format
......@@ -3002,7 +3001,7 @@ msgstr "сбросить привилегии перед выполнением
#: cmdline/apt-helper.cc
msgid "analyse a pattern"
msgstr ""
msgstr "проанализировать шаблон поиска"
#: cmdline/apt-internal-planner.cc
msgid ""
......@@ -3968,7 +3967,6 @@ msgstr "Соединение закрыто преждевременно"
msgid "Empty files can't be valid archives"
msgstr "Пустые файлы не могут быть допустимыми архивами"
#, c-format
#~ msgid "Line %u too long in source list %s."
#~ msgstr "Строка %u в списке источников %s слишком длинная."
......
......@@ -18,37 +18,98 @@ Breaks: sysvinit-core'
buildsimplenativepackage 'systemd-sysv' 'native' '2~break' 'sid-break' 'Breaks: sysvinit (<< 2), sysvinit-core'
# one more time, with Protected
insertinstalledpackage 'protected-sysvinit' 'native' '1' 'Protected: yes'
buildsimplenativepackage 'protected-sysvinit' 'native' '2' 'sid' 'Pre-Depends: protected-sysvinit-core | protected-systemd-sysv
Protected: yes'
buildsimplenativepackage 'protected-sysvinit-core' 'native' '2' 'sid'
buildsimplenativepackage 'protected-systemd-sysv' 'native' '2~conflict' 'sid-conflict' 'Conflicts: protected-sysvinit (<< 2)
Breaks: protected-sysvinit-core'
buildsimplenativepackage 'protected-systemd-sysv' 'native' '2~break' 'sid-break' 'Breaks: protected-sysvinit (<< 2), protected-sysvinit-core'
setupaptarchive
cp -a rootdir/var/lib/dpkg/status dpkg.status.backup
testforcebreak() {
package="sid-$1"
prefix="$2"
cp -a dpkg.status.backup rootdir/var/lib/dpkg/status
rm -f rootdir/var/lib/apt/extended_states
testfailureequal "Reading package lists...
Building dependency tree...
The following additional packages will be installed:
sysvinit
${prefix}sysvinit
The following NEW packages will be installed:
systemd-sysv
${prefix}systemd-sysv
The following packages will be upgraded:
sysvinit
1 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
E: This installation run will require temporarily removing the essential package sysvinit:$(getarchitecture 'native') due to a Conflicts/Pre-Depends loop. This is often bad, but if you really want to do it, activate the APT::Force-LoopBreak option.
E: Internal Error, Could not early remove sysvinit:$(dpkg --print-architecture) (2)" aptget install systemd-sysv -t "$1" -s
${prefix}sysvinit
1 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
E: This installation run will require temporarily removing the essential package ${prefix}sysvinit:$(getarchitecture 'native') due to a Conflicts/Pre-Depends loop. This is often bad, but if you really want to do it, activate the APT::Force-LoopBreak option.
E: Internal Error, Could not early remove ${prefix}sysvinit:$(dpkg --print-architecture) (2)" aptget install ${prefix}systemd-sysv -t "$package" -s
# ensure that really nothing happens
testfailure aptget install systemd-sysv -y -t "$1"
testdpkginstalled 'sysvinit'
testdpkgnotinstalled 'systemd-sysv'
testfailure aptget install ${prefix}systemd-sysv -y -t "$package"
testdpkginstalled "${prefix}sysvinit"
testdpkgnotinstalled "${prefix}systemd-sysv"
# with enough force however …
cp -a dpkg.status.backup rootdir/var/lib/dpkg/status
testsuccess aptget install systemd-sysv -y -t "$1" -o APT::Force-LoopBreak=1 -o Debug::pkgDpkgPm=1
testsuccess aptget install ${prefix}systemd-sysv -y -t "$package" -o APT::Force-LoopBreak=1 -o Debug::pkgDpkgPm=1
cp rootdir/tmp/testsuccess.output apt.output
testsuccess grep -- '--force-remove-essential --remove sysvinit' apt.output
testsuccess aptget install systemd-sysv -y -t "$1" -o APT::Force-LoopBreak=1
testdpkginstalled 'sysvinit' 'systemd-sysv'
if [ "$prefix" = "protected-" ]; then
testsuccess grep -- "--force-remove-protected --remove ${prefix}sysvinit" apt.output
else
testsuccess grep -- "--force-remove-essential --remove ${prefix}sysvinit" apt.output
fi
testsuccess aptget install ${prefix}systemd-sysv -y -t "$package" -o APT::Force-LoopBreak=1
testdpkginstalled "${prefix}sysvinit" "${prefix}systemd-sysv"
}
testforcebreak 'conflict'
testforcebreak 'break'
testnoforcebreak() {
cp -a dpkg.status.backup rootdir/var/lib/dpkg/status
rm -f rootdir/var/lib/apt/extended_states
testequalor2 "Reading package lists...
Building dependency tree...
The following additional packages will be installed:
protected-sysvinit
The following NEW packages will be installed:
protected-systemd-sysv
The following packages will be upgraded:
protected-sysvinit
1 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
Inst protected-systemd-sysv (2~$1 sid-$1 [$(getarchitecture 'native')]) [protected-systemd-sysv:$(getarchitecture 'native') on protected-sysvinit:$(getarchitecture 'native')] []
Conf protected-systemd-sysv:$(getarchitecture 'native') broken
Breaks:protected-sysvinit:$(getarchitecture 'native')
[]
Inst protected-sysvinit [1] (2 sid [$(getarchitecture 'native')])
Conf protected-sysvinit (2 sid [$(getarchitecture 'native')])
E: Conf Broken protected-systemd-sysv:$(getarchitecture 'native')" "Reading package lists...
Building dependency tree...
The following additional packages will be installed:
protected-sysvinit
The following NEW packages will be installed:
protected-systemd-sysv
The following packages will be upgraded:
protected-sysvinit
1 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
Remv protected-sysvinit [1]
Inst protected-systemd-sysv (2~conflict sid-conflict [$(getarchitecture 'native')])
Conf protected-systemd-sysv (2~conflict sid-conflict [$(getarchitecture 'native')])
Inst protected-sysvinit [1] (2 sid [$(getarchitecture 'native')])
Conf protected-sysvinit (2 sid [$(getarchitecture 'native')])" aptget install protected-systemd-sysv -t "sid-$1" -s
# we check with 'real' packages here as the simulation reports a 'Conf broken'
cp -a dpkg.status.backup rootdir/var/lib/dpkg/status
testsuccess aptget install protected-systemd-sysv -y -t "sid-$1"
testdpkginstalled 'protected-sysvinit' 'protected-systemd-sysv'
}
testforcebreak 'sid-conflict'
testforcebreak 'sid-break'
testforcebreak 'conflict' 'protected-'
testnoforcebreak 'break'
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment