Use self-contained config file for DNF with repos defined
With self-contained configuration, the repository definitions will be predictable based on the target architecture and avoid leaking anything from the host.
This commit is contained in:
parent
b59ebbab15
commit
9d2fe5306d
@ -108,7 +108,8 @@ function createchroot()
|
||||
# enabling extra Mageia repositories
|
||||
function genusemirroroptions()
|
||||
{
|
||||
DNF_MIRROROPTS="--nogpgcheck --releasever=${MAGEIA_VERSION}"
|
||||
DNF_CONFIGPATH="$(dirname $(realpath "$0"))/mageia4arm-dnf.conf"
|
||||
DNF_MIRROROPTS="--config=${DNF_CONFIGPATH} --forcearch=${ARM_VERSION} --nogpgcheck --releasever=${MAGEIA_VERSION}"
|
||||
if [ ! -z "${MIRROR}" ]; then
|
||||
DNF_MIRROROPTS="${DNF_MIRROROPTS} --disablerepo=\* --repofrompath=mgarel,${MIRROR}/media/core/release/ --repofrompath=mgaup,${MIRROR}/media/core/updates/ --enablerepo=mgarel --enablerepo=mgaup"
|
||||
if [ ${NONFREE} -eq 1 ]; then
|
||||
@ -217,22 +218,22 @@ function installbasesystem()
|
||||
fi
|
||||
|
||||
title "installing basesystem"
|
||||
/usr/bin/dnf --installroot="${BUILD_PATH}" --setopt=ignorearch=True ${DNF_MIRROROPTS} --assumeyes install shadow-utils basesystem-minimal
|
||||
/usr/bin/dnf --installroot="${BUILD_PATH}" ${DNF_MIRROROPTS} --assumeyes install shadow-utils basesystem-minimal
|
||||
if [ ${?} -ne 0 ]; then
|
||||
error "line ${LINENO} error installing shadow-utils or basesystem-minimal : exiting"
|
||||
exit ${ERR_1}
|
||||
fi
|
||||
#/usr/bin/dnf --installroot="${BUILD_PATH}" --setopt=ignorearch=True ${DNF_MIRROROPTS} --assumeyes install basesystem-minimal
|
||||
#/usr/bin/dnf --installroot="${BUILD_PATH}" ${DNF_MIRROROPTS} --assumeyes install basesystem-minimal
|
||||
#if [ ${?} -ne 0 ]; then
|
||||
# error "line ${LINENO} error installing basesystem-minimal : exiting"
|
||||
# exit ${ERR_1}
|
||||
#fi
|
||||
/usr/bin/dnf --installroot="${BUILD_PATH}" --setopt=ignorearch=True ${DNF_MIRROROPTS} --assumeyes install dnf dnf-plugins-core locales u-boot
|
||||
/usr/bin/dnf --installroot="${BUILD_PATH}" ${DNF_MIRROROPTS} --assumeyes install dnf dnf-plugins-core locales u-boot
|
||||
if [ ${?} -ne 0 ]; then
|
||||
error "line ${LINENO} error installing dnf or locales : exiting"
|
||||
exit ${ERR_1}
|
||||
fi
|
||||
/usr/bin/dnf --installroot="${BUILD_PATH}" --setopt=ignorearch=True ${DNF_MIRROROPTS} --assumeyes install urpmi
|
||||
/usr/bin/dnf --installroot="${BUILD_PATH}" ${DNF_MIRROROPTS} --assumeyes install urpmi
|
||||
if [ ${?} -ne 0 ]; then
|
||||
error "line ${LINENO} error installing urpmi : exiting"
|
||||
exit ${ERR_1}
|
||||
|
37
mageia4arm-dnf.conf
Normal file
37
mageia4arm-dnf.conf
Normal file
@ -0,0 +1,37 @@
|
||||
# mageia4arm dnf configuration
|
||||
[main]
|
||||
keepcache=1
|
||||
debuglevel=2
|
||||
reposdir=/dev/null
|
||||
logfile=/var/log/mga4arm-dnf.log
|
||||
retries=20
|
||||
obsoletes=1
|
||||
syslog_ident=mageia4arm
|
||||
syslog_device=
|
||||
metadata_expire=0
|
||||
best=1
|
||||
protected_packages=
|
||||
|
||||
# repos
|
||||
|
||||
[mageia-$arch]
|
||||
name=Mageia $releasever - $arch
|
||||
#baseurl=http://mirrors.kernel.org/mageia/distrib/$releasever/$arch/media/core/release/
|
||||
#metalink=https://mirrors.mageia.org/metalink?distrib=mageia-$releasever&arch=$arch@§ion=core&repo=release
|
||||
mirrorlist=https://www.mageia.org/mirrorlist/?release=$releasever&arch=$arch§ion=core&repo=release
|
||||
fastestmirror=1
|
||||
gpgcheck=1
|
||||
gpgkey=file:///usr/share/distribution-gpg-keys/mageia/RPM-GPG-KEY-Mageia
|
||||
enabled=1
|
||||
skip_if_unavailable=False
|
||||
|
||||
[updates-$arch]
|
||||
name=Mageia $releasever - $arch - Updates
|
||||
#baseurl=http://mirrors.kernel.org/mageia/distrib/$releasever/$arch/media/core/updates/
|
||||
#metalink=https://mirrors.mageia.org/metalink?distrib=mageia-$releasever&arch=$arch@§ion=core&repo=updates
|
||||
mirrorlist=https://www.mageia.org/mirrorlist/?release=$releasever&arch=$arch§ion=core&repo=updates
|
||||
fastestmirror=1
|
||||
gpgcheck=1
|
||||
gpgkey=file:///usr/share/distribution-gpg-keys/mageia/RPM-GPG-KEY-Mageia
|
||||
enabled=1
|
||||
skip_if_unavailable=False
|
Reference in New Issue
Block a user