Giter Site home page Giter Site logo

Comments (10)

dev-rowbot avatar dev-rowbot commented on September 23, 2024 2

This may not be the greatest fix but I think you could also just disable Acquire-By-Hash for your local mirror.

For example, in /etc/apt/mirror.list add:

set postmirror_script $var_path/postmirror.sh
set run_postmirror 1

And create an executable script called postmirror.sh in the apt mirror $var_path:

MIRROR_PATH="/path/to/apt/mirror/re.archive.ubuntu.com"

find $MIRROR_PATH -type f -name "Release" | xargs sed -i 's/Acquire-By-Hash: yes/Acquire-By-Hash: no/g'
find $MIRROR_PATH -type f -name "InRelease" | xargs sed -i 's/Acquire-By-Hash: yes/Acquire-By-Hash: no/g'

from apt-mirror.

SadPencil avatar SadPencil commented on September 23, 2024 1

This may not be the greatest fix but I think you could also just disable Acquire-By-Hash for your local mirror.

For example, in /etc/apt/mirror.list add:

set postmirror_script $var_path/postmirror.sh
set run_postmirror 1

And create an executable script called postmirror.sh in the apt mirror $var_path:

MIRROR_PATH="/path/to/apt/mirror/re.archive.ubuntu.com"

find $MIRROR_PATH -type f -name "Release" | xargs sed -i 's/Acquire-By-Hash: yes/Acquire-By-Hash: no/g'
find $MIRROR_PATH -type f -name "InRelease" | xargs sed -i 's/Acquire-By-Hash: yes/Acquire-By-Hash: no/g'

Disagreed. You break the signature by this way.

from apt-mirror.

smartwang avatar smartwang commented on September 23, 2024

+1

from apt-mirror.

gbjtv avatar gbjtv commented on September 23, 2024

+1

from apt-mirror.

modoojunko avatar modoojunko commented on September 23, 2024

+1

from apt-mirror.

Kunzol avatar Kunzol commented on September 23, 2024

You can use this lines of code in postmirror.sh
Change "MIRROR" to exactly the mirror you use in the "mirror.list" file.

MIRROR="http://archive.ubuntu.com/ubuntu"
find ${MIRROR#*//}/dists -type f -regex ".*/xenial.*/Release" -printf "%h\n" \
        | xargs -I REPLY \
        wget --timestamping --recursive --no-parent --exclude --no-verbose --execute robots=off --reject "index.html*" --level 1 \
                "http://REPLY/by-hash/SHA256/"
find ${MIRROR#*//}/dists -type d -regex ".*/xenial.*/i18n" -printf "%h\n" \
    | xargs -I REPLY \
    wget --timestamping --recursive --no-parent --exclude --no-verbose --execute robots=off --reject "index.html*" \
                "http://REPLY/dep11/"

The first find checks for the "Release" files. In this directories the "by-hash" directories are located.

The second find does the same, but searches for "i18n". In the same directory the "dep11" directories are located. It gets the whole dep11 directory including the by-hash. If you just want to download the "by-hash" inside "dep11", modify the line accordingly.

Make sure you have "skip-clean" lines in the "mirror.list" file, otherwise the "clean.sh" will remove this directories again.

from apt-mirror.

hungpr0 avatar hungpr0 commented on September 23, 2024

+1 for this issue? Any fix so that I can deploy apt-mirror package? Thank you.

from apt-mirror.

Eijebong avatar Eijebong commented on September 23, 2024

Any news on that ? This breaks apt-mirror for deb http://security.debian.org/debian-security buster/updates main too

from apt-mirror.

czyzo avatar czyzo commented on September 23, 2024

I have the same problem as @Eijebong . This is old bug. Is this project alive ?

from apt-mirror.

liedekef avatar liedekef commented on September 23, 2024

I have created a modified version that downloads the by-hash/SHA256 files. I'll post it later on to github.
Edit: see pull request #131

from apt-mirror.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.