Score:0

Debmirror error

kz flag

I followed the guide for setting up debmirror from https://help.ubuntu.com/community/Debmirror . I changed the files to go to an external drive and set it to download Focal and Hirsute. Debmirror completes without errors but I get an error when I try to point a computer to it but get an error when I try apt-get update.

Error message:
The repository 'http://192.168.1.42/ubuntu hirsute Release' does not have a Release file.Updating from such a repository can't be done securely, and is therefore disabled by default.See apt-secure(8) manpage for repository creation and user configuration details.

Where am I going wrong?


Files download to here

/mnt/USBHDD/mirrors/ubuntu_repository
├── dists
│   ├── focal
│   ├── focal-security
│   ├── focal-updates
│   ├── hirsute
│   ├── hirsute-security
│   └── hirsute-updates
├── pool
│   ├── main
│   ├── multiverse
│   ├── restricted
│   └── universe
└── project
    └── trace

For Apache I symlinked to /var/www/ubuntu Tree looks the same as above.

Here is my sh script

#!/bin/bash

# Arch=         -a      # Architecture. For Ubuntu can be i386, powerpc or amd64.
# sparc, only starts in dapper, it is only the later models of sparc.
# For multiple  architecture, use ",". like "i386,amd64"

arch=amd64,i386

# Minimum Ubuntu system requires main, restricted
# Section=      -s      # Section (One of the following - main/restricted/universe/multiverse).
# You can add extra file with $Section/debian-installer. ex: main/debian-installer,universe/debian-installer,multiverse/debian-installer,restricted/debian-installer


section=main,restricted,universe,multiverse

# Release=      -d      # Release of the system (, focal ), and the -updates and -security ( -backports can be added if desired)
# List of updated releases in: https://wiki.ubuntu.com/Releases
# List of sort codenames used: http://archive.ubuntu.com/ubuntu/dists/

release=focal,focal-security,focal-updates,hirsute,hirsute-security,hirsute-updates

# Server=       -h      # Server name, minus the protocol and the path at the end
# CHANGE "*" to equal the mirror you want to create your mirror from. au. in Australia  ca. in Canada.
# This can be found in your own /etc/apt/sources.list file, assuming you have Ubuntu installed.

server=archive.ubuntu.com

# Dir=          -r      # Path from the main server, so http://my.web.server/$dir, Server dependant

inPath=/ubuntu

# Proto=        --method=       # Protocol to use for transfer (http, ftp, hftp, rsync)
# Choose one - http is most usual the service, and the service must be available on the server you point at.
# For some "rsync" may be faster.

proto=rsync

# Outpath=              # Directory to store the mirror in
# Make this a full path to where you want to mirror the material.

outPath=/mnt/USBHDD/mirrors/ubuntu_repository

# The --nosource option only downloads debs and not deb-src's
# The --progress option shows files as they are downloaded
# --source \ in the place of --no-source \ if you want sources also.
# --nocleanup  Do not clean up the local mirror after mirroring is complete. Use this option to keep older repository

# Start script

debmirror       -a $arch \
                --no-source \
                --check-gpg \
                --checksums \
                -s $section \
                -h $server \
                -d $release \
                -r $inPath \
ChanganAuto avatar
us flag
Probably you should carefully read again the part about "GPG keyring file" and check what you actually did instead.
trekkiejonny avatar
kz flag
All needed keys have been imported to local trustedkeys.gpg. Also tried it with export GNUPGHOME=/mnt/USBHDD/mirrors/ Both instances debmirror has no problems but still get the repository errors from apt-get update.
trekkiejonny avatar
kz flag
@ChanganAuto I have redone everything verbatim from the guide. I used symlinks to point directories to the external HDD. Repository error still persists. I am at a loss of what else to do. Is the release file being removed some how with cleanup?
Score:1
kz flag

After much web surfing I found the answer to my question.
The problem was with Apache's default location.

Guide has it listed as /var/www/ubuntu

Should be /var/www/html/ubuntu

After making that change my mirror is working.

Missing piece to the puzzle was located at:
Created apt-mirror but cannot browse to it from localhost/ubuntu
Props to Arronical

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.