EPEL7 repo created on CentOS 8 repo server

Issues related to applications and software problems and general support
Post Reply
User avatar
warron.french
Posts: 616
Joined: 2014/03/27 20:21:58

EPEL7 repo created on CentOS 8 repo server

Post by warron.french » 2020/05/23 04:13:39

Is there a way to collect EPEL7 packages on to a CentOS 8 server that I am using as a Repo Server?

I have figured out how to get a web server built on CentOS8. I have gotten the CentOS7 packages from the repositories of base, centosplus, extras and updates download to /var/www/html/centos/7/ using the reposync command on the CentOS8 server.

I installed the epel-release package on a separate CentOS7 system, then copied the epel.repo file over to /etc/yum.repos.d of the CentOS7 server onto the CentOS8 server.
Thanks,
War

User avatar
warron.french
Posts: 616
Joined: 2014/03/27 20:21:58

Re: EPEL7 repo created on CentOS 8 repo server

Post by warron.french » 2020/05/26 17:38:13

When attempting to use reposync I experienced errors that are exactly the same. The output is here:

Code: Select all

[root@grim-repo:/var/www/html/centos/7]# reposync  --delete -m --repo=Epel7       --download-metadata  --destdir /var/www/html/centos/7/
Extra Packages for Enterprise Linux 7 - x86_64                                                                         0.0  B/s |   0  B     00:00
Failed to download metadata for repo 'Epel7'
Error: Failed to download metadata for repo 'Epel7'

Code: Select all

[root@grim-repo:/var/www/html/centos/7]# reposync -p /var/www/html/centos/7/  --download-metadata  --repo=Epel7
Extra Packages for Enterprise Linux 7 - x86_64                                                                         0.0  B/s |   0  B     00:00
Failed to download metadata for repo 'Epel7'
Error: Failed to download metadata for repo 'Epel7'
This is a copy of my relevant repo file (CentOS7-Epel.repo) for Epel7 (yes, I created it based on the original).

Code: Select all

[Epel7]
name=Extra Packages for Enterprise Linux 7 - x86_64
baseurl=http://download.fedoraproject.org/pub/epel/7/x86_64
metalink=https://mirrors.fedoraproject.org/metalink?repo=epel-7&arch=x86_64
failovermethod=priority
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7

[Epel7-debuginfo]
name=Extra Packages for Enterprise Linux 7 - x86_64 - Debug
#baseurl=http://download.fedoraproject.org/pub/epel/7/x86_64/debug
metalink=https://mirrors.fedoraproject.org/metalink?repo=epel-debug-7&arch=x86_64
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
gpgcheck=1

[Epel7-source]
name=Extra Packages for Enterprise Linux 7 - x86_64 - Source
#baseurl=http://download.fedoraproject.org/pub/epel/7/SRPMS
metalink=https://mirrors.fedoraproject.org/metalink?repo=epel-source-7&arch=x86_64
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
gpgcheck=1
I also followed the steps in this link for some hope. https://www.thegeekdiary.com/failed-to- ... repo_name/
Thanks,
War

User avatar
warron.french
Posts: 616
Joined: 2014/03/27 20:21:58

Re: EPEL7 repo created on CentOS 8 repo server

Post by warron.french » 2020/05/29 17:44:23

@psjr2 Is this related to the post titled "Make a mirror repo : unable to mirror EPEL" under CentOS 7 - Software Support?
Thanks,
War

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: EPEL7 repo created on CentOS 8 repo server

Post by TrevorH » 2020/05/29 18:26:59

You can certainly mirror el7 repos on el8 if you use rsync. I suspect you can do it with reposync too if you coerce it enough.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

User avatar
warron.french
Posts: 616
Joined: 2014/03/27 20:21:58

Re: EPEL7 repo created on CentOS 8 repo server

Post by warron.french » 2020/05/29 20:14:37

TrevorH wrote:
2020/05/29 18:26:59
You can certainly mirror el7 repos on el8 if you use rsync. I suspect you can do it with reposync too if you coerce it enough.
Would this include Epel for CentOS 7?

Thanks.
Thanks,
War

User avatar
jlehtone
Posts: 4523
Joined: 2007/12/11 08:17:33
Location: Finland

Re: EPEL7 repo created on CentOS 8 repo server

Post by jlehtone » 2020/05/29 21:08:38

warron.french wrote:
2020/05/29 20:14:37
TrevorH wrote:
2020/05/29 18:26:59
You can certainly mirror el7 repos on el8 if you use rsync.
Would this include Epel for CentOS 7?
Why not? The server simply copies files. It does not know, nor care what those files are.

You can select a mirror to rsync from from that metalink URL or from https://admin.fedoraproject.org/mirrormanager/

User avatar
warron.french
Posts: 616
Joined: 2014/03/27 20:21:58

Re: EPEL7 repo created on CentOS 8 repo server

Post by warron.french » 2020/05/31 03:48:53

jlehtone thanks for the feedback.

I am trying this right now:

Code: Select all

rsync  -rv  rsync://dfw.mirror.rackspace.com/epel/7/x86_64/{Packages,repodata}      /var/www/html/Epel7/ 
Does this seem like an appropriate way to go about this? Is this an optimized command? I have no experience with rsync so I am grabbing at straws.

Also, my concern right now is whether the rsync command is working or not, because it grabbed two files from the Packages/0/ directory on that Url - the second being 0ad-data-0.0.22-1.el7.noarch.rpm, and my web browser indicates there is a third file in that path 0install-2.11-1.el7.x86_64.rpm and nothing else is happening so far after 4 minutes.

Maybe my internet connection is being flaky (it is possible actually) but I only seem to have problems reposync'ing Epel7 and no other repos so far.
Thanks,
War

User avatar
jlehtone
Posts: 4523
Joined: 2007/12/11 08:17:33
Location: Finland

Re: EPEL7 repo created on CentOS 8 repo server

Post by jlehtone » 2020/05/31 09:30:48

warron.french wrote:
2020/05/31 03:48:53
Maybe my internet connection is being flaky (it is possible actually) but I only seem to have problems reposync'ing Epel7 and no other repos so far.
Could be, or the chosen mirror site has issues.

I have a cron job. (I don't mirror EPEL though.)
The script has two modes. If I run it explicitly:

Code: Select all

/etc/cron.daily/my-mirrorupdate.sh v
then it is verbose. When cron runs it, rsync is quiet and use of bandwidth is limited.

Code: Select all

$ cat /etc/cron.daily/my-mirrorupdate.sh
#!/bin/bash

LOCKFILE=/var/lock/my-mirrorupdate.lock

# the lockfile is not meant to be perfect, it's just in case the
# two maintain cron scripts get run close to each other to keep
# them from stepping on each other's toes.
[ -f $LOCKFILE ] && exit 0

trap "{ rm -f $LOCKFILE ; exit 255; }" EXIT
touch $LOCKFILE

########## mirror repositories

if [[ -n $1 ]]
  then RSYNC="/usr/bin/rsync -av --no-g --no-o --delete --delay-updates --progress"
  else RSYNC="/usr/bin/rsync -aq --no-g --no-o --delete --delay-updates --bwlimit=1024"
fi

#
# CentOS
#
MIRROR=rsync://rsync.nic.funet.fi/ftp/pub/mirrors/centos.org

VERS=8.1.1911
SOURCE=${MIRROR}/${VERS}
DEST=/mnt/mirrors2/centos.org/${VERS}

for R in BaseOS AppStream PowerTools extras fasttrack cr
do
  ${RSYNC} --exclude="SRPMS/" ${SOURCE}/${R}/x86_64/os/ ${DEST}/${R}/x86_64/os/
done

#
exit 0

User avatar
warron.french
Posts: 616
Joined: 2014/03/27 20:21:58

Re: EPEL7 repo created on CentOS 8 repo server

Post by warron.french » 2020/06/01 13:58:40

Thanks jlehtone,
I am reviewing what you posted and wrapping my head around it now.

Much appreciated.
Thanks,
War

Post Reply