Skip to content

Using external gpg provider during mirror create possible regression. #1070

@itcsoft54

Description

@itcsoft54

Using this repository : deb http://repo.aptly.info/ nightly main (because of this PR Add support for zst compression #1050 )

When i used aptly create mirror return and write error :

aptly mirror create -filter-with-deps -architectures="amd64" "focal-main" "http://archive.ubuntu.com/ubuntu/" "focal" "main"
Downloading http://archive.ubuntu.com/ubuntu/dists/focal/InRelease...
Success downloading http://archive.ubuntu.com/ubuntu/dists/focal/InRelease
Downloading http://archive.ubuntu.com/ubuntu/dists/focal/Release...
Success downloading http://archive.ubuntu.com/ubuntu/dists/focal/Release
Downloading http://archive.ubuntu.com/ubuntu/dists/focal/Release.gpg...
Success downloading http://archive.ubuntu.com/ubuntu/dists/focal/Release.gpg
ERROR: unable to fetch mirror: write /tmp/aptly-gpg2594473547: copy_file_range: no such file or directory

Detailed Description

Step to reproduce :

Using this Dockerfile

#####  DOCKER APTLY_BASE
ARG TAG_BASE=latest
ARG DEBIAN_CODENAME='buster'

FROM debian:${DEBIAN_CODENAME}-slim as dck_aptly_base

LABEL description="Docker Aptly Base Image"

## Install Applications
RUN apt-get update \
    && apt-get -y --no-install-recommends install \
    bzip2 \
    graphviz \
    wget \
    gpg \
    gnupg \
    gpgv1 \
    gnupg1 \
    dnsutils \
    xz-utils \
    dirmngr

# Get out of Dockerfile if frequently change
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys EE727D4449467F0E && \
    echo "deb http://repo.aptly.info/ nightly main" > /etc/apt/sources.list.d/aptly.list && \
    apt-get update \
    && apt-get -y --no-install-recommends install \
    aptly \
    patch \
    ed \
    && rm -rf /var/lib/apt/lists/*

COPY /src/docker-entrypoint.sh /

ENTRYPOINT ["/docker-entrypoint.sh"]
CMD ["/usr/bin/aptly"]

Then build with :

docker build --build-arg TAG_BASE=building -t dck_aptly_base:building_tmp -f /path/to/docker/file/Dockerfile /path/to/source/of/dck_aptly

When run :

# docker run -it --entrypoint=/bin/bash dck_aptly_base:building 
root@6be10caaaf56:/# gpg --no-default-keyring --keyring /usr/share/keyrings/debian-archive-keyring.gpg --export | gpg --no-default-keyring --keyring trustedkeys.gpg --import
g
root@6be10caaaf56:/# aptly mirror create -filter-with-deps -architectures="amd64" "focal-main" "http://archive.ubuntu.com/ubuntu/" "focal" "main"
Downloading http://archive.ubuntu.com/ubuntu/dists/focal/InRelease...
Success downloading http://archive.ubuntu.com/ubuntu/dists/focal/InRelease
Downloading http://archive.ubuntu.com/ubuntu/dists/focal/Release...
Success downloading http://archive.ubuntu.com/ubuntu/dists/focal/Release
Downloading http://archive.ubuntu.com/ubuntu/dists/focal/Release.gpg...
Success downloading http://archive.ubuntu.com/ubuntu/dists/focal/Release.gpg
ERROR: unable to fetch mirror: write /tmp/aptly-gpg2594473547: copy_file_range: no such file or directory

Context

  • Working with 1.4.0.
  • broken in aptly version: '1.4.0+179+g0a179886' using external provider
    -> working using : -gpg-provider=internal additionnal parameter
    -> doesn't work using : -gpg-provider=gpg or -gpg-provider=gpg2 additionnal parameter

default is like using -gpg-provider=gpg parameter

Your Environment

debian buster
podman 3.0.1 or docker in rootless
using overlayfs
aptly version: '1.4.0+179+g0a179886'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions