forked from sig_core/toolkit
Add needed features (0.4.0)
* Add --disable-gpg-check switch to sync scripts * Add --disable-repo-gpg-check switch to sync scripts * Add datestamp for future image use
This commit is contained in:
parent
77264a3195
commit
6c20ee5a43
@ -26,6 +26,8 @@ parser.add_argument('--refresh-treeinfo', action='store_true')
|
|||||||
# I am aware this is confusing, I want podman to be the default option
|
# I am aware this is confusing, I want podman to be the default option
|
||||||
parser.add_argument('--simple', action='store_false')
|
parser.add_argument('--simple', action='store_false')
|
||||||
parser.add_argument('--logger', type=str)
|
parser.add_argument('--logger', type=str)
|
||||||
|
parser.add_argument('--disable-gpg-check', action='store_false')
|
||||||
|
parser.add_argument('--disable-repo-gpg-check', action='store_false')
|
||||||
|
|
||||||
# Parse them
|
# Parse them
|
||||||
results = parser.parse_args()
|
results = parser.parse_args()
|
||||||
@ -54,6 +56,8 @@ a = RepoSync(
|
|||||||
logger=results.logger,
|
logger=results.logger,
|
||||||
refresh_extra_files=results.refresh_extra_files,
|
refresh_extra_files=results.refresh_extra_files,
|
||||||
refresh_treeinfo=results.refresh_treeinfo,
|
refresh_treeinfo=results.refresh_treeinfo,
|
||||||
|
gpg_check=results.disable_gpg_check,
|
||||||
|
repo_gpg_check=results.disable_repo_gpg_check,
|
||||||
)
|
)
|
||||||
|
|
||||||
def run():
|
def run():
|
||||||
|
@ -29,6 +29,8 @@ parser.add_argument('--refresh-extra-files', action='store_true')
|
|||||||
# I am aware this is confusing, I want podman to be the default option
|
# I am aware this is confusing, I want podman to be the default option
|
||||||
parser.add_argument('--simple', action='store_false')
|
parser.add_argument('--simple', action='store_false')
|
||||||
parser.add_argument('--logger', type=str)
|
parser.add_argument('--logger', type=str)
|
||||||
|
parser.add_argument('--disable-gpg-check', action='store_false')
|
||||||
|
parser.add_argument('--disable-repo-gpg-check', action='store_false')
|
||||||
|
|
||||||
# Parse them
|
# Parse them
|
||||||
results = parser.parse_args()
|
results = parser.parse_args()
|
||||||
@ -56,7 +58,9 @@ a = SigRepoSync(
|
|||||||
fullrun=results.full_run,
|
fullrun=results.full_run,
|
||||||
nofail=results.no_fail,
|
nofail=results.no_fail,
|
||||||
refresh_extra_files=results.refresh_extra_files,
|
refresh_extra_files=results.refresh_extra_files,
|
||||||
logger=results.logger
|
logger=results.logger,
|
||||||
|
gpg_check=results.disable_gpg_check,
|
||||||
|
repo_gpg_check=results.disable_repo_gpg_check,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@ -3,24 +3,24 @@
|
|||||||
name={{repo.name}}
|
name={{repo.name}}
|
||||||
baseurl={{ repo.baseurl }}
|
baseurl={{ repo.baseurl }}
|
||||||
enabled=1
|
enabled=1
|
||||||
gpgcheck=1
|
gpgcheck={{ gpg_check }}
|
||||||
repo_gpgcheck=1
|
repo_gpgcheck={{ repo_gpg_check }}
|
||||||
gpgkey={{ repo.gpgkey }}
|
gpgkey={{ repo.gpgkey }}
|
||||||
|
|
||||||
[{{ repo.name }}-debug]
|
[{{ repo.name }}-debug]
|
||||||
name={{repo.name}}
|
name={{repo.name}}
|
||||||
baseurl={{ repo.baseurl }}-debug
|
baseurl={{ repo.baseurl }}-debug
|
||||||
enabled=1
|
enabled=1
|
||||||
gpgcheck=1
|
gpgcheck={{ gpg_check }}
|
||||||
repo_gpgcheck=1
|
repo_gpgcheck={{ repo_gpg_check }}
|
||||||
gpgkey={{ repo.gpgkey }}
|
gpgkey={{ repo.gpgkey }}
|
||||||
|
|
||||||
[{{ repo.name }}-source]
|
[{{ repo.name }}-source]
|
||||||
name={{repo.name}}
|
name={{repo.name}}
|
||||||
baseurl={{ repo.srcbaseurl }}
|
baseurl={{ repo.srcbaseurl }}
|
||||||
enabled=1
|
enabled=1
|
||||||
gpgcheck=1
|
gpgcheck={{ gpg_check }}
|
||||||
repo_gpgcheck=1
|
repo_gpgcheck={{ repo_gpg_check }}
|
||||||
gpgkey={{ repo.gpgkey }}
|
gpgkey={{ repo.gpgkey }}
|
||||||
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
@ -57,6 +57,8 @@ class RepoSync:
|
|||||||
fullrun: bool = False,
|
fullrun: bool = False,
|
||||||
nofail: bool = False,
|
nofail: bool = False,
|
||||||
gpgkey: str = 'stable',
|
gpgkey: str = 'stable',
|
||||||
|
gpg_check: bool = True,
|
||||||
|
repo_gpg_check: bool = True,
|
||||||
rlmode: str = 'stable',
|
rlmode: str = 'stable',
|
||||||
just_pull_everything: bool = False,
|
just_pull_everything: bool = False,
|
||||||
logger=None
|
logger=None
|
||||||
@ -103,6 +105,8 @@ class RepoSync:
|
|||||||
self.extra_files = rlvars['extra_files']
|
self.extra_files = rlvars['extra_files']
|
||||||
self.gpgkey = gpgkey
|
self.gpgkey = gpgkey
|
||||||
self.checksum = rlvars['checksum']
|
self.checksum = rlvars['checksum']
|
||||||
|
self.gpg_check = gpg_check
|
||||||
|
self.repo_gpg_check = repo_gpg_check
|
||||||
|
|
||||||
self.compose_id = '{}-{}-{}'.format(
|
self.compose_id = '{}-{}-{}'.format(
|
||||||
config['shortname'],
|
config['shortname'],
|
||||||
@ -241,6 +245,8 @@ class RepoSync:
|
|||||||
self.hashed,
|
self.hashed,
|
||||||
self.extra_files,
|
self.extra_files,
|
||||||
self.gpgkey,
|
self.gpgkey,
|
||||||
|
self.gpg_check,
|
||||||
|
self.repo_gpg_check,
|
||||||
self.tmplenv,
|
self.tmplenv,
|
||||||
self.log
|
self.log
|
||||||
)
|
)
|
||||||
@ -1486,6 +1492,8 @@ class SigRepoSync:
|
|||||||
fullrun: bool = False,
|
fullrun: bool = False,
|
||||||
nofail: bool = False,
|
nofail: bool = False,
|
||||||
gpgkey: str = 'stable',
|
gpgkey: str = 'stable',
|
||||||
|
gpg_check: bool = True,
|
||||||
|
repo_gpg_check: bool = True,
|
||||||
logger=None
|
logger=None
|
||||||
):
|
):
|
||||||
self.nofail = nofail
|
self.nofail = nofail
|
||||||
@ -1516,6 +1524,8 @@ class SigRepoSync:
|
|||||||
self.fullversion = rlvars['revision']
|
self.fullversion = rlvars['revision']
|
||||||
self.sigrepo = repo
|
self.sigrepo = repo
|
||||||
self.checksum = rlvars['checksum']
|
self.checksum = rlvars['checksum']
|
||||||
|
self.gpg_check = gpg_check
|
||||||
|
self.repo_gpg_check = repo_gpg_check
|
||||||
|
|
||||||
# Relevant major version items
|
# Relevant major version items
|
||||||
self.sigvars = sigvars
|
self.sigvars = sigvars
|
||||||
@ -1672,6 +1682,8 @@ class SigRepoSync:
|
|||||||
self.hashed,
|
self.hashed,
|
||||||
self.extra_files,
|
self.extra_files,
|
||||||
self.gpgkey,
|
self.gpgkey,
|
||||||
|
self.gpg_check,
|
||||||
|
self.repo_gpg_check,
|
||||||
self.tmplenv,
|
self.tmplenv,
|
||||||
self.log
|
self.log
|
||||||
)
|
)
|
||||||
|
@ -61,6 +61,8 @@ class IsoBuild:
|
|||||||
extra_iso_mode: str = 'local',
|
extra_iso_mode: str = 'local',
|
||||||
compose_dir_is_here: bool = False,
|
compose_dir_is_here: bool = False,
|
||||||
hashed: bool = False,
|
hashed: bool = False,
|
||||||
|
updated_image: bool = False,
|
||||||
|
image_increment: str = '0',
|
||||||
image=None,
|
image=None,
|
||||||
logger=None
|
logger=None
|
||||||
):
|
):
|
||||||
@ -93,6 +95,10 @@ class IsoBuild:
|
|||||||
self.checksum = rlvars['checksum']
|
self.checksum = rlvars['checksum']
|
||||||
self.profile = rlvars['profile']
|
self.profile = rlvars['profile']
|
||||||
self.hashed = hashed
|
self.hashed = hashed
|
||||||
|
self.updated_image = updated_image
|
||||||
|
self.updated_image_increment = "." + image_increment
|
||||||
|
self.updated_image_date = (time.strftime("%Y%m%d", time.localtime())
|
||||||
|
+ self.updated_image_increment)
|
||||||
|
|
||||||
# Relevant major version items
|
# Relevant major version items
|
||||||
self.arch = arch
|
self.arch = arch
|
||||||
@ -809,6 +815,10 @@ class IsoBuild:
|
|||||||
if self.release_candidate:
|
if self.release_candidate:
|
||||||
rclevel = '-' + self.rclvl
|
rclevel = '-' + self.rclvl
|
||||||
|
|
||||||
|
datestamp = ''
|
||||||
|
if self.updated_image:
|
||||||
|
datestamp = '-' + self.updated_image_date.copy()
|
||||||
|
|
||||||
volid = '{}-{}-{}{}-{}-{}'.format(
|
volid = '{}-{}-{}{}-{}-{}'.format(
|
||||||
self.shortname,
|
self.shortname,
|
||||||
self.major_version,
|
self.major_version,
|
||||||
|
@ -411,6 +411,8 @@ class Shared:
|
|||||||
hashed,
|
hashed,
|
||||||
extra_files,
|
extra_files,
|
||||||
gpgkey,
|
gpgkey,
|
||||||
|
gpg_check,
|
||||||
|
repo_gpg_check,
|
||||||
templates,
|
templates,
|
||||||
logger,
|
logger,
|
||||||
dest_path='/var/tmp'
|
dest_path='/var/tmp'
|
||||||
@ -468,7 +470,11 @@ class Shared:
|
|||||||
repolist.append(repodata)
|
repolist.append(repodata)
|
||||||
|
|
||||||
template = templates.get_template('repoconfig.tmpl')
|
template = templates.get_template('repoconfig.tmpl')
|
||||||
output = template.render(repos=repolist)
|
output = template.render(
|
||||||
|
repos=repolist,
|
||||||
|
gpg_check=gpg_check,
|
||||||
|
repo_gpg_check=repo_gpg_check
|
||||||
|
)
|
||||||
config_file.write(output)
|
config_file.write(output)
|
||||||
|
|
||||||
config_file.close()
|
config_file.close()
|
||||||
|
Loading…
Reference in New Issue
Block a user