Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Release Engineering
Public
toolkit
Commits
acf737fc
Verified
Commit
acf737fc
authored
Nov 10, 2021
by
Louis Abel
📺
Browse files
add treeinfo modder for kickstart directory
parent
dfd6b06c
Pipeline
#99
passed with stage
in 31 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
sync/common_8
View file @
acf737fc
...
@@ -114,5 +114,43 @@ EOF
...
@@ -114,5 +114,43 @@ EOF
/bin/cp "${TREEINFO_VAR}" "${PRISTINE_TREE}"
/bin/cp "${TREEINFO_VAR}" "${PRISTINE_TREE}"
}
}
function treeinfoModderKickstart() {
BaseOSArch="${1}"
TREEINFO_VAR="${STAGING_ROOT}/${RELEASE_DIR}/BaseOS/${BaseOSArch}/os/.treeinfo"
PRISTINE_TREE="${STAGING_ROOT}/${RELEASE_DIR}/BaseOS/${BaseOSArch}/os/.treeinfo-pristine"
test -f "${TREEINFO_VAR}"
treeinfo_retval=$?
test -x /usr/bin/python3
python_retval=$?
# There is an awk way to do this, but it was easier to implement python and
# cat heredoc together. It felt cleaner. This was a trick I had used in a
# previous life when I had to admin Solaris systems, and I needed a way to
# add a solaris 10 system into FreeIPA (it was not fun, let me tell you). But
# the take away is I learned something kind of on the fly and well, it worked.
# Emails should have stamps.
if [ "$treeinfo_retval" -eq 0 ] && [ "$python_retval" -eq 0 ]; then
cat <<EOF | /usr/bin/python3
from configparser import ConfigParser
config = ConfigParser()
config.read('${TREEINFO_VAR}')
config.set('tree', 'variants', 'BaseOS,AppStream')
config.add_section('variant-AppStream')
config.set('variant-AppStream', 'id', 'AppStream')
config.set('variant-AppStream', 'name', 'AppStream')
config.set('variant-AppStream', 'type', 'variant')
config.set('variant-AppStream', 'uid', 'AppStream')
config.set('variant-AppStream', 'packages', '../../../AppStream/${BaseOSArch}/kickstart/Packages')
config.set('variant-AppStream', 'repository', '../../../AppStream/${BaseOSArch}/kickstart/')
with open('${TREEINFO_VAR}', 'w') as configfile:
config.write(configfile)
EOF
else
echo "${TREEINFO_VAR}, or python3 does not exist on this system."
fi
/bin/cp "${TREEINFO_VAR}" "${PRISTINE_TREE}"
}
export -f treeinfoFixer
export -f treeinfoFixer
export -f treeinfoModder
export -f treeinfoModder
export -f treeinfoModderKickstart
sync/minor-release-sync-to-staging.sh
View file @
acf737fc
...
@@ -73,6 +73,7 @@ done
...
@@ -73,6 +73,7 @@ done
for
ARCH
in
"
${
ARCHES
[@]
}
"
;
do
for
ARCH
in
"
${
ARCHES
[@]
}
"
;
do
echo
"Ensuring treeinfo is correct"
echo
"Ensuring treeinfo is correct"
treeinfoModder
"
${
ARCH
}
"
treeinfoModder
"
${
ARCH
}
"
treeinfoModderKickstart
"
${
ARCH
}
"
done
done
# sign all repos
# sign all repos
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment