forked from sig_core/toolkit
add in a fix for timestamps on packages
This commit is contained in:
parent
d14309ef78
commit
90efde8477
@ -3,6 +3,7 @@ set -o pipefail
|
|||||||
{{ import_gpg_cmd }} | tee -a {{ sync_log }}
|
{{ import_gpg_cmd }} | tee -a {{ sync_log }}
|
||||||
{{ dnf_plugin_cmd }} | tee -a {{ sync_log }}
|
{{ dnf_plugin_cmd }} | tee -a {{ sync_log }}
|
||||||
sed -i 's/enabled=1/enabled=0/g' /etc/yum.repos.d/*.repo
|
sed -i 's/enabled=1/enabled=0/g' /etc/yum.repos.d/*.repo
|
||||||
|
{{ metadata_cmd }} | tee -a {{ sync_log }}
|
||||||
{{ sync_cmd }} | tee -a {{ sync_log }}
|
{{ sync_cmd }} | tee -a {{ sync_log }}
|
||||||
|
|
||||||
# Yes this is a bit hacky. Can't think of a better way to do this.
|
# Yes this is a bit hacky. Can't think of a better way to do this.
|
||||||
@ -22,4 +23,4 @@ if [ "$ret_val" -eq 0 ]; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# {{ check_cmd }} | tee -a {{ sync_log }}
|
# {{ check_cmd }} | tee -a {{ sync_log }}
|
||||||
|
@ -4,6 +4,7 @@ set -o pipefail
|
|||||||
{{ arch_force_cp }} | tee -a {{ sync_log }}
|
{{ arch_force_cp }} | tee -a {{ sync_log }}
|
||||||
{{ dnf_plugin_cmd }} | tee -a {{ sync_log }}
|
{{ dnf_plugin_cmd }} | tee -a {{ sync_log }}
|
||||||
sed -i 's/enabled=1/enabled=0/g' /etc/yum.repos.d/*.repo
|
sed -i 's/enabled=1/enabled=0/g' /etc/yum.repos.d/*.repo
|
||||||
|
{{ metadata_cmd }} | tee -a {{ sync_log }}
|
||||||
{{ sync_cmd }} | tee -a {{ sync_log }}
|
{{ sync_cmd }} | tee -a {{ sync_log }}
|
||||||
|
|
||||||
# Yes this is a bit hacky. Can't think of a better way to do this.
|
# Yes this is a bit hacky. Can't think of a better way to do this.
|
||||||
|
@ -421,6 +421,14 @@ class RepoSync:
|
|||||||
a
|
a
|
||||||
)
|
)
|
||||||
|
|
||||||
|
metadata_cmd = ("/usr/bin/dnf makecache -c {}.{} --repoid={} "
|
||||||
|
"--forcearch {} --assumeyes 2>&1").format(
|
||||||
|
self.dnf_config,
|
||||||
|
a,
|
||||||
|
r,
|
||||||
|
a
|
||||||
|
)
|
||||||
|
|
||||||
sync_cmd = ("/usr/bin/dnf reposync -c {}.{} --download-metadata "
|
sync_cmd = ("/usr/bin/dnf reposync -c {}.{} --download-metadata "
|
||||||
"--repoid={} -p {} --forcearch {} --norepopath --remote-time "
|
"--repoid={} -p {} --forcearch {} --norepopath --remote-time "
|
||||||
"--gpgcheck --assumeyes 2>&1").format(
|
"--gpgcheck --assumeyes 2>&1").format(
|
||||||
@ -431,6 +439,15 @@ class RepoSync:
|
|||||||
a
|
a
|
||||||
)
|
)
|
||||||
|
|
||||||
|
debug_metadata_cmd = ("/usr/bin/dnf makecache -c {}.{} --repoid={}-debug "
|
||||||
|
"--forcearch {} --assumeyes 2>&1").format(
|
||||||
|
self.dnf_config,
|
||||||
|
a,
|
||||||
|
r,
|
||||||
|
a
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
debug_sync_cmd = ("/usr/bin/dnf reposync -c {}.{} "
|
debug_sync_cmd = ("/usr/bin/dnf reposync -c {}.{} "
|
||||||
"--download-metadata --repoid={}-debug -p {} --forcearch {} "
|
"--download-metadata --repoid={}-debug -p {} --forcearch {} "
|
||||||
"--gpgcheck --norepopath --remote-time --assumeyes 2>&1").format(
|
"--gpgcheck --norepopath --remote-time --assumeyes 2>&1").format(
|
||||||
@ -449,6 +466,7 @@ class RepoSync:
|
|||||||
arch_force_cp=arch_force_cp,
|
arch_force_cp=arch_force_cp,
|
||||||
dnf_plugin_cmd=dnf_plugin_cmd,
|
dnf_plugin_cmd=dnf_plugin_cmd,
|
||||||
sync_cmd=sync_cmd,
|
sync_cmd=sync_cmd,
|
||||||
|
metadata_cmd=metadata_cmd,
|
||||||
sync_log=sync_log,
|
sync_log=sync_log,
|
||||||
download_path=os_sync_path
|
download_path=os_sync_path
|
||||||
)
|
)
|
||||||
@ -459,6 +477,7 @@ class RepoSync:
|
|||||||
arch_force_cp=arch_force_cp,
|
arch_force_cp=arch_force_cp,
|
||||||
dnf_plugin_cmd=dnf_plugin_cmd,
|
dnf_plugin_cmd=dnf_plugin_cmd,
|
||||||
sync_cmd=debug_sync_cmd,
|
sync_cmd=debug_sync_cmd,
|
||||||
|
metadata_cmd=debug_metadata_cmd,
|
||||||
sync_log=debug_sync_log,
|
sync_log=debug_sync_log,
|
||||||
download_path=debug_sync_path
|
download_path=debug_sync_path
|
||||||
)
|
)
|
||||||
@ -493,6 +512,14 @@ class RepoSync:
|
|||||||
'kickstart'
|
'kickstart'
|
||||||
)
|
)
|
||||||
|
|
||||||
|
ks_metadata_cmd = ("/usr/bin/dnf makecache -c {}.{} --repoid={} "
|
||||||
|
"--forcearch {} --assumeyes 2>&1").format(
|
||||||
|
self.dnf_config,
|
||||||
|
a,
|
||||||
|
r,
|
||||||
|
a
|
||||||
|
)
|
||||||
|
|
||||||
ks_sync_cmd = ("/usr/bin/dnf reposync -c {}.{} --download-metadata "
|
ks_sync_cmd = ("/usr/bin/dnf reposync -c {}.{} --download-metadata "
|
||||||
"--repoid={} -p {} --forcearch {} --norepopath "
|
"--repoid={} -p {} --forcearch {} --norepopath "
|
||||||
"--gpgcheck --assumeyes --remote-time 2>&1").format(
|
"--gpgcheck --assumeyes --remote-time 2>&1").format(
|
||||||
@ -515,6 +542,7 @@ class RepoSync:
|
|||||||
arch_force_cp=arch_force_cp,
|
arch_force_cp=arch_force_cp,
|
||||||
dnf_plugin_cmd=dnf_plugin_cmd,
|
dnf_plugin_cmd=dnf_plugin_cmd,
|
||||||
sync_cmd=ks_sync_cmd,
|
sync_cmd=ks_sync_cmd,
|
||||||
|
metadata_cmd=ks_metadata_cmd,
|
||||||
sync_log=ks_sync_log
|
sync_log=ks_sync_log
|
||||||
)
|
)
|
||||||
ks_entry_point_open = open(ks_point_sh, "w+")
|
ks_entry_point_open = open(ks_point_sh, "w+")
|
||||||
@ -544,6 +572,12 @@ class RepoSync:
|
|||||||
repo_name
|
repo_name
|
||||||
)
|
)
|
||||||
|
|
||||||
|
source_metadata_cmd = ("/usr/bin/dnf makecache -c {} --repoid={}-source "
|
||||||
|
"--assumeyes 2>&1").format(
|
||||||
|
self.dnf_config,
|
||||||
|
r
|
||||||
|
)
|
||||||
|
|
||||||
source_sync_cmd = ("/usr/bin/dnf reposync -c {} "
|
source_sync_cmd = ("/usr/bin/dnf reposync -c {} "
|
||||||
"--download-metadata --repoid={}-source -p {} "
|
"--download-metadata --repoid={}-source -p {} "
|
||||||
"--gpgcheck --norepopath --remote-time --assumeyes 2>&1").format(
|
"--gpgcheck --norepopath --remote-time --assumeyes 2>&1").format(
|
||||||
@ -557,6 +591,7 @@ class RepoSync:
|
|||||||
import_gpg_cmd=import_gpg_cmd,
|
import_gpg_cmd=import_gpg_cmd,
|
||||||
dnf_plugin_cmd=dnf_plugin_cmd,
|
dnf_plugin_cmd=dnf_plugin_cmd,
|
||||||
sync_cmd=source_sync_cmd,
|
sync_cmd=source_sync_cmd,
|
||||||
|
metadata_cmd=source_metadata_cmd,
|
||||||
sync_log=source_sync_log
|
sync_log=source_sync_log
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -421,6 +421,14 @@ class RepoSync:
|
|||||||
a
|
a
|
||||||
)
|
)
|
||||||
|
|
||||||
|
metadata_cmd = ("/usr/bin/dnf makecache -c {}.{} --repoid={} "
|
||||||
|
"--forcearch {} --assumeyes 2>&1").format(
|
||||||
|
self.dnf_config,
|
||||||
|
a,
|
||||||
|
r,
|
||||||
|
a
|
||||||
|
)
|
||||||
|
|
||||||
sync_cmd = ("/usr/bin/dnf reposync -c {}.{} --download-metadata "
|
sync_cmd = ("/usr/bin/dnf reposync -c {}.{} --download-metadata "
|
||||||
"--repoid={} -p {} --forcearch {} --norepopath --remote-time "
|
"--repoid={} -p {} --forcearch {} --norepopath --remote-time "
|
||||||
"--gpgcheck --assumeyes 2>&1").format(
|
"--gpgcheck --assumeyes 2>&1").format(
|
||||||
@ -431,6 +439,15 @@ class RepoSync:
|
|||||||
a
|
a
|
||||||
)
|
)
|
||||||
|
|
||||||
|
debug_metadata_cmd = ("/usr/bin/dnf makecache -c {}.{} --repoid={}-debug "
|
||||||
|
"--forcearch {} --assumeyes 2>&1").format(
|
||||||
|
self.dnf_config,
|
||||||
|
a,
|
||||||
|
r,
|
||||||
|
a
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
debug_sync_cmd = ("/usr/bin/dnf reposync -c {}.{} "
|
debug_sync_cmd = ("/usr/bin/dnf reposync -c {}.{} "
|
||||||
"--download-metadata --repoid={}-debug -p {} --forcearch {} "
|
"--download-metadata --repoid={}-debug -p {} --forcearch {} "
|
||||||
"--gpgcheck --norepopath --remote-time --assumeyes 2>&1").format(
|
"--gpgcheck --norepopath --remote-time --assumeyes 2>&1").format(
|
||||||
@ -449,6 +466,7 @@ class RepoSync:
|
|||||||
arch_force_cp=arch_force_cp,
|
arch_force_cp=arch_force_cp,
|
||||||
dnf_plugin_cmd=dnf_plugin_cmd,
|
dnf_plugin_cmd=dnf_plugin_cmd,
|
||||||
sync_cmd=sync_cmd,
|
sync_cmd=sync_cmd,
|
||||||
|
metadata_cmd=metadata_cmd,
|
||||||
sync_log=sync_log,
|
sync_log=sync_log,
|
||||||
download_path=os_sync_path
|
download_path=os_sync_path
|
||||||
)
|
)
|
||||||
@ -459,6 +477,7 @@ class RepoSync:
|
|||||||
arch_force_cp=arch_force_cp,
|
arch_force_cp=arch_force_cp,
|
||||||
dnf_plugin_cmd=dnf_plugin_cmd,
|
dnf_plugin_cmd=dnf_plugin_cmd,
|
||||||
sync_cmd=debug_sync_cmd,
|
sync_cmd=debug_sync_cmd,
|
||||||
|
metadata_cmd=debug_metadata_cmd,
|
||||||
sync_log=debug_sync_log,
|
sync_log=debug_sync_log,
|
||||||
download_path=debug_sync_path
|
download_path=debug_sync_path
|
||||||
)
|
)
|
||||||
@ -493,6 +512,14 @@ class RepoSync:
|
|||||||
'kickstart'
|
'kickstart'
|
||||||
)
|
)
|
||||||
|
|
||||||
|
ks_metadata_cmd = ("/usr/bin/dnf makecache -c {}.{} --repoid={} "
|
||||||
|
"--forcearch {} --assumeyes 2>&1").format(
|
||||||
|
self.dnf_config,
|
||||||
|
a,
|
||||||
|
r,
|
||||||
|
a
|
||||||
|
)
|
||||||
|
|
||||||
ks_sync_cmd = ("/usr/bin/dnf reposync -c {}.{} --download-metadata "
|
ks_sync_cmd = ("/usr/bin/dnf reposync -c {}.{} --download-metadata "
|
||||||
"--repoid={} -p {} --forcearch {} --norepopath "
|
"--repoid={} -p {} --forcearch {} --norepopath "
|
||||||
"--gpgcheck --assumeyes --remote-time 2>&1").format(
|
"--gpgcheck --assumeyes --remote-time 2>&1").format(
|
||||||
@ -515,6 +542,7 @@ class RepoSync:
|
|||||||
arch_force_cp=arch_force_cp,
|
arch_force_cp=arch_force_cp,
|
||||||
dnf_plugin_cmd=dnf_plugin_cmd,
|
dnf_plugin_cmd=dnf_plugin_cmd,
|
||||||
sync_cmd=ks_sync_cmd,
|
sync_cmd=ks_sync_cmd,
|
||||||
|
metadata_cmd=ks_metadata_cmd,
|
||||||
sync_log=ks_sync_log
|
sync_log=ks_sync_log
|
||||||
)
|
)
|
||||||
ks_entry_point_open = open(ks_point_sh, "w+")
|
ks_entry_point_open = open(ks_point_sh, "w+")
|
||||||
@ -544,6 +572,12 @@ class RepoSync:
|
|||||||
repo_name
|
repo_name
|
||||||
)
|
)
|
||||||
|
|
||||||
|
source_metadata_cmd = ("/usr/bin/dnf makecache -c {} --repoid={}-source "
|
||||||
|
"--assumeyes 2>&1").format(
|
||||||
|
self.dnf_config,
|
||||||
|
r
|
||||||
|
)
|
||||||
|
|
||||||
source_sync_cmd = ("/usr/bin/dnf reposync -c {} "
|
source_sync_cmd = ("/usr/bin/dnf reposync -c {} "
|
||||||
"--download-metadata --repoid={}-source -p {} "
|
"--download-metadata --repoid={}-source -p {} "
|
||||||
"--gpgcheck --norepopath --remote-time --assumeyes 2>&1").format(
|
"--gpgcheck --norepopath --remote-time --assumeyes 2>&1").format(
|
||||||
@ -557,6 +591,7 @@ class RepoSync:
|
|||||||
import_gpg_cmd=import_gpg_cmd,
|
import_gpg_cmd=import_gpg_cmd,
|
||||||
dnf_plugin_cmd=dnf_plugin_cmd,
|
dnf_plugin_cmd=dnf_plugin_cmd,
|
||||||
sync_cmd=source_sync_cmd,
|
sync_cmd=source_sync_cmd,
|
||||||
|
metadata_cmd=source_metadata_cmd,
|
||||||
sync_log=source_sync_log
|
sync_log=source_sync_log
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user