-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Builds oracle-9.4 offline package
- Loading branch information
1 parent
4f29942
commit e2a307c
Showing
4 changed files
with
93 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
#!/bin/bash | ||
set -x | ||
set -euo pipefail | ||
|
||
# When yum operates on multiple packages, it does not, by default, return an error if a subset | ||
# of packages is not found. This makes yum return an error. | ||
echo skip_missing_names_on_install=False >> /etc/yum.conf | ||
|
||
# Check for Oracle Linux repositories | ||
ORACLE_REPOS=${ORACLE_REPOS:-"ol9_baseos_latest,ol9_appstream"} | ||
|
||
KUBERNETES_REPOS=${KUBERNETES_REPOS:-""} | ||
if [[ -n "${KUBERNETES_REPOS}" ]]; then | ||
ORACLE_REPOS="${ORACLE_REPOS},kubernetes" | ||
fi | ||
|
||
# Install required tools for repository creation | ||
yum -y install dnf-utils createrepo modulemd-tools yum-utils | ||
yum clean all | ||
TMP_DIR="$(mktemp -d repodata-XXXX)" | ||
chmod 777 -R "${TMP_DIR}" | ||
cp packages.txt "${TMP_DIR}" | ||
pushd "${TMP_DIR}" | ||
|
||
# Download package dependencies | ||
# shellcheck disable=SC2046,SC2062,SC2063,SC2035 | ||
repoquery --archlist=x86_64,noarch --resolve --requires --recursive $(< packages.txt) | grep -v *.i686 >> reqs.txt | ||
sed -i 1d reqs.txt # Remove the first line from the requirements file | ||
|
||
# Download packages and dependencies | ||
# shellcheck disable=SC2046 | ||
yumdownloader --archlist=x86_64,noarch \ | ||
--setopt=skip_missing_names_on_install=False -x \*i686 $(< reqs.txt) | ||
|
||
yumdownloader --setopt=skip_missing_names_on_install=False -x \*i686 --archlist=x86_64,noarch \ | ||
--resolve --disablerepo=* --enablerepo="${ORACLE_REPOS}" \ | ||
$(< packages.txt) | ||
|
||
# Clean up package and requirements files | ||
rm packages.txt reqs.txt | ||
|
||
# Create repository metadata and module information | ||
createrepo -v . | ||
repo2module . --module-name offline | ||
createrepo_mod . | ||
|
||
# Package the repository into a tarball with proper permissions | ||
# shellcheck disable=SC1083,SC2035 | ||
tar -czf {{ .OutputDirectory }}/{{ .KubernetesVersion }}_oracle_9.4_x86_64{{ .FipsSuffix }}.tar.gz * | ||
chmod 777 {{ .OutputDirectory }}/{{ .KubernetesVersion }}_oracle_9.4_x86_64{{ .FipsSuffix }}.tar.gz | ||
|
||
# Return to the original directory and clean up | ||
popd | ||
rm -rf "${TMP_DIR}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
audit | ||
ca-certificates | ||
conntrack-tools | ||
chrony | ||
open-vm-tools | ||
python3-pip | ||
socat | ||
sysstat | ||
dnf-utils | ||
dnf-plugin-versionlock | ||
NetworkManager | ||
cloud-init | ||
cloud-utils-growpart | ||
container-selinux | ||
{{ if .FetchKubernetesRPMs -}} | ||
kubectl-{{ .KubernetesVersion }}-0 | ||
kubelet-{{ .KubernetesVersion }}-0 | ||
kubeadm-{{ .KubernetesVersion }}-0 | ||
cri-tools | ||
{{- end }} | ||
conntrack | ||
ebtables | ||
ethtool | ||
iproute | ||
iptables | ||
socat | ||
gcc | ||
libseccomp | ||
nfs-utils |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[kubernetes] | ||
name=Konvoy Kubernetes package repository | ||
baseurl=https://packages.d2iq.com/konvoy/stable/linux/repos/el/kubernetes-v{{ .KubernetesVersion }}-{{ .RepoSuffix }}/x86_64 | ||
gpgcheck=1 | ||
gpgkey=https://packages.d2iq.com/konvoy/stable/linux/repos/d2iq-sign-authority-gpg-public-key |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters