Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[POC] [WIP] IPU 9 -> 10: Initial preparation: upgrade paths and leapp packages def #1169

Draft
wants to merge 36 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
6c196cc
IPU 9 -> 10: Initial preparation: upgrade paths and leapp packages def
pirat89 Jan 23, 2024
87dca83
Packaging: Introduce builds for EL 9 for IPU 9 -> 10
pirat89 Apr 2, 2024
054ed27
Packit: add epel-9-x86_64 buildroot
pirat89 Apr 2, 2024
13cb2df
IPU 9 -> 10: Add RHEL 10 certs (intel only now)
pirat89 Apr 19, 2024
5f07cf4
squash! IPU 9 -> 10: Initial preparation: upgrade paths and leapp pac…
pirat89 Apr 19, 2024
912a6d2
IPU 9 -> 10: Add Python path for el 10 (py 3.12)
pirat89 Apr 19, 2024
f9f405f
DROP_COMMIT_BEFORE_MERGE: artificial repomap 9 -> 10
pirat89 Apr 19, 2024
6c261cb
IPU 9 -> 10: Specify default PESIDS for el10
pirat89 Apr 19, 2024
7d8626b
IPU 9 -> 10: Set gpg-pubkeys to be obsoleted
pirat89 Apr 19, 2024
b659a26
DROP_COMMIT_BEFORE_MERGE: drop some actions around certs
pirat89 Apr 19, 2024
8e86920
[TMP] - Handle RPM DB migration
Rezney Apr 20, 2024
ab578e3
squash! Packaging: Introduce builds for EL 9 for IPU 9 -> 10
pirat89 Apr 22, 2024
2eb1bbb
TMP: temp to_remove entry for testing
Rezney Apr 22, 2024
a1e6022
[TMP] - Official key
Rezney May 14, 2024
4f8337a
[TMP] - remove also "openssl-fips-provider-so"
Rezney May 23, 2024
510eb2e
Update PES data
Rezney May 30, 2024
f2852fe
Skip "directory-hash" files
Rezney Jun 6, 2024
15470c5
Install "util-linux" into the target container
Rezney Jun 7, 2024
a1bcbb7
Stop removing the "openssl-fips-provider" pkgs
Rezney Jun 11, 2024
96051d5
Add RHEL9 container for linting and testing
matejmatuska Jun 24, 2024
a0edea1
Move RPM DB migration to a separate actor
matejmatuska Jun 26, 2024
d175f0f
fixup! IPU 9 -> 10: Specify default PESIDS for el10
matejmatuska Jun 26, 2024
80b7bbc
Fix tests
matejmatuska Jun 26, 2024
02f1c6a
Add comment header to RPM-GPG-KEY-redhat-release
matejmatuska Jun 27, 2024
4ac4da4
Add build container for RHEL 9
matejmatuska Jun 27, 2024
55bc1eb
migraterpmdb: Also rebuild the DB after migration
matejmatuska Jun 27, 2024
6c0476d
Followup on 7d8626b - no keys will be obosoleted
matejmatuska Jun 27, 2024
6c4080e
Revert "migraterpmdb: Also rebuild the DB after migration"
matejmatuska Jun 27, 2024
df04b12
Add 9to10 to GH unit test action
matejmatuska Jun 27, 2024
8dd6283
Rebuild RPM DB during the upgrade beginning 8to9 IPU
matejmatuska Jun 27, 2024
c964c52
Fix or TODO some version specific actions in actors
matejmatuska Jun 28, 2024
6e875e7
Fix LEAPP_IPU_IN_PROGRESS set to 9to1 on 9to10
matejmatuska Jun 28, 2024
0e24ae2
Add RHEL 10.0 Beta prod certs
matejmatuska Jul 1, 2024
4f1959a
fixup! Add RHEL9 container for linting and testing
matejmatuska Jul 1, 2024
a3580e0
fixup! Fix or TODO some version specific actions in actors
matejmatuska Jul 1, 2024
8261889
fixup! Fix or TODO some version specific actions in actors
matejmatuska Jul 1, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 15 additions & 4 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,29 @@ jobs:
fail-fast: false
matrix:
scenarios:
# 9to10
- name: Run unit tests for el9toel10 and common repositories on python 3.12
python: python3.12
repos: 'el9toel10,common'
container: ubi9
- name: Run unit tests for el9toel10 and common repositories on python 3.9
python: python3.9
repos: 'el9toel10,common'
container: ubi9
# 8to9
- name: Run unit tests for el8toel9 and common repositories on python 3.9
python: python3.9
repos: 'el8toel9,common'
container: ubi9
- name: Run unit tests for el8toel9 and common repositories on python 3.6
python: python3.6
repos: 'el8toel9,common'
container: ubi8
# 7to8
- name: Run unit tests for el7toel8 and common repositories on python 3.6
python: python3.6
repos: 'el7toel8,common'
container: ubi8
- name: Run unit tests for el8toel9 and common repositories on python 3.6
python: python3.6
repos: 'el8toel9,common'
container: ubi8
- name: Run unit tests for el7toel8 and common repositories on python 2.7
python: python2.7
repos: 'el7toel8,common'
Expand Down
3 changes: 3 additions & 0 deletions .packit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ jobs:
targets:
- epel-7-x86_64
- epel-8-x86_64
- epel-9-x86_64
actions:
create-archive:
- bash -c "rm -f packaging/deps-pkgs.tar.gz"
Expand All @@ -54,6 +55,7 @@ jobs:
targets:
- epel-7-x86_64
- epel-8-x86_64
- epel-9-x86_64
actions:
create-archive:
- bash -c "rm -f packaging/deps-pkgs.tar.gz"
Expand All @@ -73,6 +75,7 @@ jobs:
targets:
- epel-7-x86_64
- epel-8-x86_64
- epel-9-x86_64
actions:
create-archive:
- bash -c "rm -f packaging/deps-pkgs.tar.gz"
Expand Down
45 changes: 34 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ help:
@echo " packaging"
@echo " srpm create the SRPM"
@echo " build_container create the RPM in container"
@echo " - set BUILD_CONTAINER to el7 or el8"
@echo " - set BUILD_CONTAINER to el7, el8 or el9"
@echo " - don't run more than one build at the same time"
@echo " since containers operate on the same files!"
@echo " copr_build create the COPR build using the COPR TOKEN"
Expand Down Expand Up @@ -164,7 +164,7 @@ help:
@echo " PR=7 SUFFIX='my_additional_suffix' make <target>"
@echo " MR=6 COPR_CONFIG='path/to/the/config/copr/file' make <target>"
@echo " ACTOR=<actor> TEST_LIBS=y make test"
@echo " BUILD_CONTAINER=rhel7 make build_container"
@echo " BUILD_CONTAINER=el7 make build_container"
@echo " TEST_CONTAINER=f34 make test_container"
@echo " CONTAINER_TOOL=docker TEST_CONTAINER=rhel7 make test_container_no_lint"
@echo ""
Expand All @@ -189,8 +189,9 @@ source: prepare
@git archive --prefix "$(PKGNAME)-$(VERSION)/" -o "packaging/sources/$(PKGNAME)-$(VERSION).tar.gz" HEAD
@echo "--- PREPARE DEPS PKGS ---"
mkdir -p packaging/tmp/
@__TIMESTAMP=$(TIMESTAMP) $(MAKE) _build_subpkg
@__TIMESTAMP=$(TIMESTAMP) $(MAKE) DIST_VERSION=$$(($(DIST_VERSION) + 1)) _build_subpkg
@__TIMESTAMP=$(TIMESTAMP) $(MAKE) DIST_VERSION=7 _build_subpkg
@__TIMESTAMP=$(TIMESTAMP) $(MAKE) DIST_VERSION=8 _build_subpkg
@__TIMESTAMP=$(TIMESTAMP) $(MAKE) DIST_VERSION=9 _build_subpkg
@tar -czf packaging/sources/deps-pkgs.tar.gz -C packaging/RPMS/noarch `ls -1 packaging/RPMS/noarch | grep -o "[^/]*rpm$$"`
@rm -f packaging/RPMS/noarch/*.rpm

Expand Down Expand Up @@ -257,12 +258,15 @@ build_container:
el8) \
CONT_FILE="utils/container-builds/Containerfile.ubi8"; \
;; \
el9) \
CONT_FILE="utils/container-builds/Containerfile.ubi9"; \
;; \
"") \
echo "BUILD_CONTAINER must be set"; \
exit 1; \
;; \
*) \
echo "Available containers are el7, el8"; \
echo "Available containers are el7, el8, el9"; \
exit 1; \
;; \
esac && \
Expand Down Expand Up @@ -304,12 +308,20 @@ install-deps:
$(VENVNAME)/bin/pip install -I "git+https://github.com/oamg/leapp.git@refs/pull/$(REQ_LEAPP_PR)/head"; \
fi
$(_PYTHON_VENV) utils/install_actor_deps.py --actor=$(ACTOR) --repos="$(TEST_PATHS)"

install-deps-fedora:
@# Check the necessary rpms are installed for py3 (and py2 below)
if ! rpm -q git findutils python3-virtualenv gcc; then \
if ! dnf install -y git findutils python3-virtualenv gcc; then \
if ! rpm -q git findutils gcc; then \
if ! dnf install -y git findutils gcc; then \
echo 'Please install the following rpms via the command: ' \
'sudo dnf install -y git findutils python3-virtualenv gcc'; \
'sudo dnf install -y git findutils gcc'; \
exit 1; \
fi; \
fi
if ! command -v virtualenv; then \
if ! (dnf install -y python3-virtualenv || pip install virtualenv); then \
echo 'Please install the following packages via the command: ' \
'sudo dnf install -y python3-virtualenv or pip install virtualenv'; \
exit 1; \
fi; \
fi
Expand Down Expand Up @@ -389,11 +401,14 @@ _test_container_ipu:
el8toel9) \
export REPOSITORIES="common,el8toel9"; \
;; \
el9toel10) \
export REPOSITORIES="common,el9toel10"; \
;; \
"") \
echo "TEST_CONT_IPU must be set"; exit 1; \
;; \
*) \
echo "Only supported TEST_CONT_IPUs are el7toel8, el8toel9"; exit 1; \
echo "Only supported TEST_CONT_IPUs are el7toel8, el8toel9, el9toel10"; exit 1; \
;; \
esac && \
$(_CONTAINER_TOOL) exec -w /repocopy $$_CONT_NAME make clean && \
Expand Down Expand Up @@ -428,6 +443,10 @@ test_container:
export CONT_FILE="utils/container-tests/Containerfile.rhel8"; \
export _VENV="python3.6"; \
;; \
rhel9) \
export CONT_FILE="utils/container-tests/Containerfile.rhel9"; \
export _VENV="python3.9"; \
;; \
*) \
echo "Error: Available containers are: f34, rhel7, rhel8"; exit 1; \
;; \
Expand All @@ -449,6 +468,10 @@ test_container:
;; \
python3.9) \
TEST_CONT_IPU=el8toel9 $(MAKE) _test_container_ipu; \
TEST_CONT_IPU=el9toel10 $(MAKE) _test_container_ipu; \
;; \
python3.12) \
TEST_CONT_IPU=el9toel10 $(MAKE) _test_container_ipu; \
;; \
*) \
TEST_CONT_IPU=el8toel9 $(MAKE) _test_container_ipu; \
Expand All @@ -473,7 +496,7 @@ test_container_all_no_lint:
# clean all testing and building containers and their images
clean_containers:
@for i in "leapp-repo-tests-f34" "leapp-repo-tests-rhel7" "leapp-repo-tests-rhel8" \
"leapp-repo-build-el7" "leapp-repo-build-el8"; do \
"leapp-repo-tests-rhel9" "leapp-repo-build-el7" "leapp-repo-build-el8"; do \
$(_CONTAINER_TOOL) kill "$$i-cont" || :; \
$(_CONTAINER_TOOL) rm "$$i-cont" || :; \
$(_CONTAINER_TOOL) rmi "$$i" || :; \
Expand All @@ -484,7 +507,7 @@ fast_lint:
FILES_TO_LINT="$$(git diff --name-only $(MASTER_BRANCH) --diff-filter AMR | grep '\.py$$')"; \
if [[ -n "$$FILES_TO_LINT" ]]; then \
pylint -j 0 $$FILES_TO_LINT $(PYLINT_ARGS) && \
flake8 $$FILES_TO_LINT $(FLAKE8_ARG); \
flake8 $$FILES_TO_LINT $(FLAKE8_ARGS); \
LINT_EXIT_CODE="$$?"; \
if [[ "$$LINT_EXIT_CODE" != "0" ]]; then \
exit $$LINT_EXIT_CODE; \
Expand Down
2 changes: 1 addition & 1 deletion commands/command_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def check_version(version):
"""
if not re.match(VERSION_REGEX, version):
raise CommandError('Unexpected format of target version: {}'.format(version))
return version.split('.')[0]
return version.split('.')


def get_major_version(version):
Expand Down
Loading
Loading