skip to Main Content

I have a staging, and a production server setup on Bitbucket Pipelines running a yaml script with the following;

          image: samueldebruyn/debian-git
          name: Staging - Upload FTP
          script:
            - apt-get update
            - apt-get -qq install git-ftp
            - git ftp push --user $FTP_USERNAME --passwd $FTP_PASSWORD -v ftp://$FTP_HOST/$FTP_STAGING_PATH
            - echo "Completed upload"

This script has been working great, and widely used in same format online for others using pipelines.

I submitted to my staging server literally 5-10 minutes before Debian 11 was released with successful builds, then post Debian 11 Release all subsequent releases Ive pushed to staging, or production result in a failure build with the following error…

Ign:1 http://security.debian.org/debian-security stable/updates InRelease
Get:2 http://deb.debian.org/debian stable InRelease [113 kB]
Err:3 http://security.debian.org/debian-security stable/updates Release
  404  Not Found [IP: 151.101.250.132 80]
Get:4 http://deb.debian.org/debian stable-updates InRelease [40.1 kB]
Get:5 http://deb.debian.org/debian stable/main amd64 Packages [8178 kB]
Reading package lists...
E: The repository 'http://security.debian.org/debian-security stable/updates Release' does not have a Release file.

Am I missing something, or did Debian 11 just break a lot of pipelines?!

or is samueldebruyn/debian-git out of date now?

4

Answers


  1. Chosen as BEST ANSWER

    I was able to locate a docker image that has the changes required to pass builds. For those that run into this issue and need a quick fix until Sam gets his docker image updated see

    bitnami/git


  2. TL;DR; The stable images on docker hub have not yet been regenerated for Debian 11, but the security repo changed layout. The next rebuild of the stable docker image should be Debian 11 based and that should fix the problem.

    — Details —

    It seems the stable and stable-slim tags are currently a bit broken at docker hub.

    For Debian 10 and older, the repo uses the subdirectory structure {RELEASE}/updates to contain the security updates;

    > docker run -it --rm debian:buster-slim egrep '(/se.*security)' /etc/apt/sources.list
    deb http://security.debian.org/debian-security buster/updates main
    

    For Debian 11, it instead uses a directory called {RELEASE}-security

    > docker run -it --rm debian:bullseye-slim egrep '(/se.*security)' /etc/apt/sources.list
    deb http://security.debian.org/debian-security bullseye-security main
    

    The problem with stable is that the image is still Debian 10 and expects stable/updates while the repo now uses the Debian 11 style stable-security. When the image pulls the security updates, it fails since the directory no longer exists with the new structure.

    > docker run -it --rm debian:stable-slim egrep '(/se.*security)' /etc/apt/sources.list
    deb http://security.debian.org/debian-security stable/updates main
    

    Since the next build of the stable image should be Debian 11 based, the problem should sort itself out soon enough, but if you want to use the failing docker file until a new build is available, use buster-slim or bullseye-slim (both of which work well) instead of stable-slim.

    Login or Signup to reply.
  3. Adding

    sudo sed -i 's/stable/updates/stable-security/g' /etc/apt/sources.list
    

    to the docker file before ‘apt-get update’ addresses the issue and should be benign once the image is fixed (though should be reverted)

    e.g.

    FROM debian:stable-slim
    
    RUN 
      sed -i 's/stable/updates/stable-security/g' /etc/apt/sources.list && 
      apt-get update && 
      ...
    
    Login or Signup to reply.
  4. Replace the docker image to the following on your bitbucket-pipelines.yml

    image: bitnami/git
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search