Comments (10)
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.
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 1And 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.
+1
from apt-mirror.
+1
from apt-mirror.
+1
from apt-mirror.
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.
+1 for this issue? Any fix so that I can deploy apt-mirror package? Thank you.
from apt-mirror.
Any news on that ? This breaks apt-mirror for deb http://security.debian.org/debian-security buster/updates main
too
from apt-mirror.
I have the same problem as @Eijebong . This is old bug. Is this project alive ?
from apt-mirror.
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)
- Issue with index files and icons...
- New maintainer HOT 1
- Some packages are not downloaded HOT 4
- apt-mirror silently fails with incorrect uris HOT 1
- Errors: Can't copy - SHA256 are identical (not copied) HOT 2
- local repo check HOT 1
- Is there a way to mirror appstream catalog metadata with the help of apt-mirror (Ubuntu) ?
- Failed to fetch http://x.x.x.x/ubuntu/mirror/archive.ubuntu.com/ubuntu/dists/jammy/main/cnf/Commands-amd64 HOT 25
- [Resolved]The planned task for apt-mirror was not executed on Ubuntu 20.04.6 LTS? HOT 17
- Does not complete the interrupted download. HOT 10
- apt-file requires Contents-all.gz file that apt-mirror does not fetch from source HOT 2
- Feature request: mirror.list.d for including additional mirror entries
- New Mozilla apt repo does not work with apt-mirror HOT 5
- Mirroring microsoft repositories seems to not work HOT 4
- Apt Mirror Warning HOT 1
- "Delta"-sync after initial full pull of repos? HOT 1
- Release files not downloading HOT 1
- Need to manage a local APT package mirror with custom tags using.
- Apt-mirror outbound traffic is high HOT 2
- apt-mirror can't deal with inRelease file having space after `<Hash_Algorithm>:` HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from apt-mirror.