Control: tag -1 moreinfo

Hi,

Julian Andres Klode <j...@debian.org> (2017-07-04):
> This release fixes several smaller bugs in the network connection.
> Apart from the changes in the changelog, there also are some changes
> to our travis CI integration and the test suite to make CI more
> reliable (by fixing coverage errors messing up our tests), more future
> proof (by using docker instead of mixing travis' ubuntu trusty with
> wily and xenial packages...), and the CI now runs on stretch, so
> that's good too :)
> 
> All fixes are straight cherry-picks from unstable, just the travis
> stuff had some changes (one less variant to build and stretch isntead
> of testing), but that does not affect us.

apt will need to migrate to testing before we could tentatively accept
anything from stretch-new; but we're not there yet.

> Let me know if this is good to go.
> 
> apt (1.4.7) stretch; urgency=medium

I'll let Adam comment on whether it's OK for this specific case not to
use +debXuY versioning, since you seem to be going for 1.4.x series in
stretch.

>   * New microrelease fixing issues in http method (LP: #1702326)
> => I'll also upload this to Ubuntu, that's just a tag for them, it
>    also helps summarizing the main part of the upload

This isn't much informative: I have no idea what issues you're fixing,
or how. Users won't know, either.

>   [ Robert Luberda ]
>   * fix a "critical" typo in old changelog entry (Closes: 866358)
> 
> => Remove a letter, and works around a bug in apt-listchanges.

Having a quick glance at the BTS, severity:minor isn't exactly what
we're considering for proposed-updates. Having correct bug meta data
would help (from reading the bug report, working around the issue might
be an idea, but fixing apt-listchanges in stable as well might be
better).

>   [ David Kalnischkies ]
>   * use port from SRV record instead of initial port
> => Might have picked the wrong port
> 
>   [ Julian Andres Klode ]
>   * Reset failure reason when connection was successful
> => Some failures were only treated as warnings, not errors

No bug reports with details for those?

>   * debian/gbp.conf: Set debian-branch to 1.4.y
> => Building ...
> 
>   * http: A response with Content-Length: 0 has no content
> 
> => Downloading failed if server responded with Content-Length: 0, as
>    APT was waiting for content to read.

No bug report with details?

> diff -Nru apt-1.4.6/Dockerfile apt-1.4.7/Dockerfile
> --- apt-1.4.6/Dockerfile      1970-01-01 01:00:00.000000000 +0100
> +++ apt-1.4.7/Dockerfile      2017-07-04 17:11:59.000000000 +0200
> @@ -0,0 +1,11 @@
> +FROM debian:stretch
> +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

Not documented in changelog. Not sure this addition belongs to stable
anyway.

> diff -Nru apt-1.4.6/methods/basehttp.cc apt-1.4.7/methods/basehttp.cc
> --- apt-1.4.6/methods/basehttp.cc     2017-06-01 10:50:26.000000000 +0200
> +++ apt-1.4.7/methods/basehttp.cc     2017-07-04 17:11:59.000000000 +0200
> @@ -146,6 +146,9 @@
>  
>     if (stringcasecmp(Tag,"Content-Length:") == 0)
>     {
> +      auto ContentLength = strtoull(Val.c_str(), NULL, 10);
> +      if (ContentLength == 0)
> +      return true;
>        if (Encoding == Closes)
>        Encoding = Stream;
>        HaveContent = true;
> @@ -154,7 +157,7 @@
>        if (Result == 416 || (Result >= 300 && Result < 400))
>        DownloadSizePtr = &JunkSize;
>  
> -      *DownloadSizePtr = strtoull(Val.c_str(), NULL, 10);
> +      *DownloadSizePtr = ContentLength;
>        if (*DownloadSizePtr >= std::numeric_limits<unsigned long long>::max())
>        return _error->Errno("HeaderLine", _("The HTTP server sent an invalid 
> Content-Length header"));
>        else if (*DownloadSizePtr == 0)
> diff -Nru apt-1.4.6/methods/connect.cc apt-1.4.7/methods/connect.cc
> --- apt-1.4.6/methods/connect.cc      2017-06-01 10:50:26.000000000 +0200
> +++ apt-1.4.7/methods/connect.cc      2017-07-04 17:11:59.000000000 +0200
> @@ -144,7 +144,9 @@
>        return _error->Errno("connect",_("Could not connect to %s:%s 
> (%s)."),Host.c_str(),
>                          Service,Name);
>     }
> -   
> +
> +   Owner->SetFailReason("");
> +
>     return true;
>  }
>                                                                       /*}}}*/
> @@ -312,12 +314,15 @@
>     size_t stackSize = 0;
>     // try to connect in the priority order of the srv records
>     std::string initialHost{std::move(Host)};
> +   auto const initialPort = Port;
>     while(SrvRecords.empty() == false)
>     {
>        _error->PushToStack();
>        ++stackSize;
>        // PopFromSrvRecs will also remove the server
> -      Host = PopFromSrvRecs(SrvRecords).target;
> +      auto Srv = PopFromSrvRecs(SrvRecords);
> +      Host = Srv.target;
> +      Port = Srv.port;
>        auto const ret = ConnectToHostname(Host, Port, Service, DefPort, Fd, 
> TimeOut, Owner);
>        if (ret)
>        {
> @@ -327,6 +332,7 @@
>        }
>     }
>     Host = std::move(initialHost);
> +   Port = initialPort;
>  
>     // we have no (good) SrvRecords for this host, connect right away
>     _error->PushToStack();
> diff -Nru apt-1.4.6/test/integration/framework 
> apt-1.4.7/test/integration/framework
> --- apt-1.4.6/test/integration/framework      2017-06-01 10:50:26.000000000 
> +0200
> +++ apt-1.4.7/test/integration/framework      2017-07-04 17:11:59.000000000 
> +0200
> @@ -1428,12 +1428,12 @@
>       local TMPFILE2="${TMPWORKINGDIRECTORY}/rootdir/tmp/checkdiff.2.tmp"
>       touch "$TMPFILE1" "$TMPFILE2"
>       if [ "$1" != '-' ]; then
> -             sed -e '/^profiling:/ d' < "$1" >"$TMPFILE1"
> +             sed -e '/^profiling:/ d' -e 
> '/\.\.\.profiling:/{N;s#\.\.\.profiling:.*\n#...#g}' < "$1" >"$TMPFILE1"
>       else
>               TMPFILE1='-'
>       fi
>       if [ "$2" != '-' ]; then
> -             sed -e '/^profiling:/ d' < "$2" >"$TMPFILE2"
> +             sed -e '/^profiling:/ d' -e 
> '/\.\.\.profiling:/{N;s#\.\.\.profiling:.*\n#...#g}' < "$2" >"$TMPFILE2"
>       else
>               TMPFILE2='-'
>       fi

Not documented.

> diff -Nru apt-1.4.6/test/integration/test-bug-738785-switch-protocol 
> apt-1.4.7/test/integration/test-bug-738785-switch-protocol
> --- apt-1.4.6/test/integration/test-bug-738785-switch-protocol        
> 2017-06-01 10:50:26.000000000 +0200
> +++ apt-1.4.7/test/integration/test-bug-738785-switch-protocol        
> 2017-07-04 17:11:59.000000000 +0200
> @@ -47,4 +47,4 @@
>  # check that downgrades from https to http are not allowed
>  webserverconfig 'aptwebserver::support::http' 'true'
>  sed -i -e "s#:${APTHTTPPORT}/redirectme#:${APTHTTPSPORT}/downgrademe#" -e 
> 's# http:# https:#' rootdir/etc/apt/sources.list.d/*
> -testfailure aptget update --allow-insecure-repositories -o 
> Acquire::https::Timeout=1
> +testfailure aptget update --allow-insecure-repositories -o 
> Acquire::https::Timeout=1 -o Debug::pkgAcquire::Worker=1 -o 
> Debug::Acquire::https=1
> diff -Nru apt-1.4.6/.travis.yml apt-1.4.7/.travis.yml
> --- apt-1.4.6/.travis.yml     2017-06-01 10:50:26.000000000 +0200
> +++ apt-1.4.7/.travis.yml     2017-07-04 17:11:59.000000000 +0200
> @@ -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)'

Same comments as for Dockerfile.


KiBi.

Attachment: signature.asc
Description: Digital signature

Reply via email to