1
0
intel-media-ffmpeg/templates/rhel/20-local-file-intel-repo.in
James Ketrenos 7a5ceab2e2 Add local file repo
Signed-off-by: James Ketrenos <james.p.ketrenos@intel.com>
2020-11-04 14:34:36 -08:00

54 lines
1.6 KiB
Plaintext
Executable File

# Update and install curl, tar, createrepo-c, and gzip as
# they aren't in the base OS image and are needed
# for creating a local filesystem repo
#
# Adapted from https://agama.jf.intel.com/drivers/dg1/suse/local
# Prerequisites
#
RUN dnf install -y \
curl \
tar \
createrepo_c \
gzip
# Make /repos/${BUILD} directory
#
WORKDIR /repos/${BUILD}
# Download ${BUILD} artifacts
#
# ARTIFACTORY_PATH is set by scripts/build-dockerfile.sh based on the value of
# BUILD. For example, agama-ci-releases_20.4 becomes agama-ci-releases/20.4
#
# sh (the shell interpreter of Docker) does not support subsitution so
# this can't be done within the Dockerfile itself.
#
# Since we're already making special variables, scripts/build-dockerfile.sh
# will also set ARTIFACTORY_RELEASE based on the OS_RELEASE name if Ubuntu
# is being used (eg., 20.04 for focal, etc)
#
RUN curl -s --noproxy '*' -L \
https://gfx-assets-build.fm.intel.com/artifactory/api/archive/download/agama-builds/ci/${ARTIFACTORY_PATH}/${BUILD}/artifacts/linux/${OS_DISTRO}/${ARTIFACTORY_RELEASE}?archiveType=tgz \
| tar -xvz --warning=no-timestamp
# Eventually the repodata should be part of the artifacts;
# Currently, however, the published repodata has invalid
# sha256 sums for the RPMs
RUN rm -rf /repos/${BUILD}/repodata
# Turn /repos/${BUILD} into a local package repository
#
RUN createrepo /repos/${BUILD}
# Add the local package repository to the system
RUN { \
echo "[intel-graphics-local]" ; \
echo "name=intel-graphics-local" ; \
echo "baseurl=file:///repos/${BUILD}" ; \
echo "enabled=1" ; \
echo "gpgcheck=0" ; \
} > /etc/yum.repos.d/intel-graphics-local.repo