From fdb6c3fe4aba20e464be050201df070d0e14a3fb Mon Sep 17 00:00:00 2001 From: Andrew Anglin Date: Mon, 4 Nov 2024 14:19:44 -0500 Subject: [PATCH 01/71] Added in the check for the version for the manpage * Added in the the check to see if the manpages should be generated or not * Changed the generate_manpage.yml file so that it sets up the action as needed, and removed some of the things not needed --- .github/workflows/build-rpm.yml | 4 ++++ .github/workflows/generate_manpage.yml | 16 ++------------ scripts/manpage_generation.sh | 29 +++++++++++++------------- 3 files changed, 20 insertions(+), 29 deletions(-) diff --git a/.github/workflows/build-rpm.yml b/.github/workflows/build-rpm.yml index b7e7790763..840bbdcf09 100644 --- a/.github/workflows/build-rpm.yml +++ b/.github/workflows/build-rpm.yml @@ -61,6 +61,10 @@ jobs: convert2rhel/__init__.py retention-days: 1 + - name: Trigger Manpage Generation + run: | + oamg/convert2rhel/.github/workflows/generate_manpage.yml@main + build_rpms: needs: - setup_version diff --git a/.github/workflows/generate_manpage.yml b/.github/workflows/generate_manpage.yml index 66e8e27a3c..7e0fba8002 100644 --- a/.github/workflows/generate_manpage.yml +++ b/.github/workflows/generate_manpage.yml @@ -12,22 +12,10 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v4 - - - name: Setup Python - uses: actions/setup-python@v5 with: - python-version: 3.10.13 - - - name: Install dependencies - run: | - pip install argparse-manpage six pexpect - - - name: Install python3-rpm and python3-dnf package with apt-get - run: | - sudo apt-get update - sudo apt-get install -y python3-rpm python3-dnf + fetch-depth: 0 - - name: Generate Manpages + - name: Run version check script run: | chmod +x scripts/manpage_generation.sh bash scripts/manpage_generation.sh diff --git a/scripts/manpage_generation.sh b/scripts/manpage_generation.sh index ff3677c75e..95350b30a7 100755 --- a/scripts/manpage_generation.sh +++ b/scripts/manpage_generation.sh @@ -1,19 +1,18 @@ #!/bin/bash -# Directory to store the generated manpages -MANPAGE_DIR="man" +# Extract the current version from the spec file in the PR branch +CURRENT_VER=$(grep -oP '^Version:\s+\K\S+' packaging/convert2rhel.spec) +echo "Current version from PR: $CURRENT_VER" -echo Generating manpages +# Fetch the version from the main branch +MAIN_VER=$(git show origin/main:packaging/convert2rhel.spec | grep -oP '^Version:\s+\K\S+') +echo "Version from main branch: $MAIN_VER" -VER=$(grep -oP '^Version:\s+\K\S+' packaging/convert2rhel.spec) - -echo Generating for version $VER -# Generate a file with convert2rhel synopsis for argparse-manpage -/usr/bin/python -c 'from convert2rhel import toolopts; print("[synopsis]\n."+toolopts.CLI.usage())' > man/synopsis - -/usr/bin/python -m pip install argparse-manpage six pexpect - -# Generate the manpage using argparse-manpage -PYTHONPATH=. /usr/bin/python /home/runner/.local/bin/argparse-manpage --pyfile man/__init__.py --function get_parser --manual-title="General Commands Manual" --description="Automates the conversion of Red Hat Enterprise Linux derivative distributions to Red Hat Enterprise Linux." --project-name "convert2rhel $VER" --prog="convert2rhel" --include man/distribution --include man/synopsis > "$MANPAGE_DIR/convert2rhel.8" - -git status +# Compare versions +if [ "$CURRENT_VER" != "$MAIN_VER" ]; then + echo "Version has changed. Please update the manpages." + exit 1 +else + echo "Version is up-to-date." + exit 0 +fi From 8605004d5a97df64ca0695f07fe3faa954c99624 Mon Sep 17 00:00:00 2001 From: Andrew Anglin Date: Fri, 8 Nov 2024 20:32:03 -0500 Subject: [PATCH 02/71] Added in a check to see if the manpages --- .github/workflows/build-rpm.yml | 4 ---- scripts/manpage_generation.sh | 19 ++++++++++++++++++- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-rpm.yml b/.github/workflows/build-rpm.yml index 840bbdcf09..b7e7790763 100644 --- a/.github/workflows/build-rpm.yml +++ b/.github/workflows/build-rpm.yml @@ -61,10 +61,6 @@ jobs: convert2rhel/__init__.py retention-days: 1 - - name: Trigger Manpage Generation - run: | - oamg/convert2rhel/.github/workflows/generate_manpage.yml@main - build_rpms: needs: - setup_version diff --git a/scripts/manpage_generation.sh b/scripts/manpage_generation.sh index 95350b30a7..97b4ba46fe 100755 --- a/scripts/manpage_generation.sh +++ b/scripts/manpage_generation.sh @@ -1,5 +1,8 @@ #!/bin/bash +# Directory to store the generated manpages +MANPAGE_DIR="man" + # Extract the current version from the spec file in the PR branch CURRENT_VER=$(grep -oP '^Version:\s+\K\S+' packaging/convert2rhel.spec) echo "Current version from PR: $CURRENT_VER" @@ -11,7 +14,21 @@ echo "Version from main branch: $MAIN_VER" # Compare versions if [ "$CURRENT_VER" != "$MAIN_VER" ]; then echo "Version has changed. Please update the manpages." - exit 1 + + # Generate a file with convert2rhel synopsis for argparse-manpage + python -c 'from convert2rhel import toolopts; print("[synopsis]\n."+toolopts.CLI.usage())' > man/synopsis + + # Generate the manpage using argparse-manpage + PYTHONPATH=. argparse-manpage --pyfile man/__init__.py --function get_parser --manual-title="General Commands Manual" --description="Automates the conversion of Red Hat Enterprise Linux derivative distributions to Red Hat Enterprise Linux." --project-name "convert2rhel $VER" --prog="convert2rhel" --include man/distribution --include man/synopsis > "$MANPAGE_DIR/convert2rhel.8" + + # Check for differences in the generated manpage + if ! git diff --quiet HEAD -- "$MANPAGE_DIR/convert2rhel.8"; then + echo "Manpages are outdated. Please update them." + exit 1 + else + echo "Manpages are up-to-date." + exit 0 + fi else echo "Version is up-to-date." exit 0 From 2cf6892f8bed33e4f80862b08dc169ea3e9713a2 Mon Sep 17 00:00:00 2001 From: Andrew Anglin Date: Mon, 11 Nov 2024 15:07:51 -0500 Subject: [PATCH 03/71] removed the check for the version * The main thing we should check here is to make sure the manpages needed to be updated so we don't need to see the version as it would be too late and we want this to happen on all PRs --- scripts/manpage_generation.sh | 37 ++++++++++++++--------------------- 1 file changed, 15 insertions(+), 22 deletions(-) diff --git a/scripts/manpage_generation.sh b/scripts/manpage_generation.sh index 97b4ba46fe..8b1b5766fd 100755 --- a/scripts/manpage_generation.sh +++ b/scripts/manpage_generation.sh @@ -3,33 +3,26 @@ # Directory to store the generated manpages MANPAGE_DIR="man" -# Extract the current version from the spec file in the PR branch -CURRENT_VER=$(grep -oP '^Version:\s+\K\S+' packaging/convert2rhel.spec) -echo "Current version from PR: $CURRENT_VER" +# Ensure the manpage directory exists +mkdir -p "$MANPAGE_DIR" -# Fetch the version from the main branch -MAIN_VER=$(git show origin/main:packaging/convert2rhel.spec | grep -oP '^Version:\s+\K\S+') -echo "Version from main branch: $MAIN_VER" +echo "Generating manpages" -# Compare versions -if [ "$CURRENT_VER" != "$MAIN_VER" ]; then - echo "Version has changed. Please update the manpages." +# Generate a file with convert2rhel synopsis for argparse-manpage +python -c 'from convert2rhel import toolopts; print("[synopsis]\n."+toolopts.CLI.usage())' > "$MANPAGE_DIR/synopsis" - # Generate a file with convert2rhel synopsis for argparse-manpage - python -c 'from convert2rhel import toolopts; print("[synopsis]\n."+toolopts.CLI.usage())' > man/synopsis +# Extract the current version from the spec file +CURRENT_VER=$(grep -oP '^Version:\s+\K\S+' packaging/convert2rhel.spec) +echo "Current version: $CURRENT_VER" - # Generate the manpage using argparse-manpage - PYTHONPATH=. argparse-manpage --pyfile man/__init__.py --function get_parser --manual-title="General Commands Manual" --description="Automates the conversion of Red Hat Enterprise Linux derivative distributions to Red Hat Enterprise Linux." --project-name "convert2rhel $VER" --prog="convert2rhel" --include man/distribution --include man/synopsis > "$MANPAGE_DIR/convert2rhel.8" +# Generate the manpage using argparse-manpage +PYTHONPATH=. argparse-manpage --pyfile man/__init__.py --function get_parser --manual-title="General Commands Manual" --description="Automates the conversion of Red Hat Enterprise Linux derivative distributions to Red Hat Enterprise Linux." --project-name "convert2rhel $CURRENT_VER" --prog="convert2rhel" --include man/distribution --include man/synopsis > "$MANPAGE_DIR/convert2rhel.8" - # Check for differences in the generated manpage - if ! git diff --quiet HEAD -- "$MANPAGE_DIR/convert2rhel.8"; then - echo "Manpages are outdated. Please update them." - exit 1 - else - echo "Manpages are up-to-date." - exit 0 - fi +# Check for differences in the generated manpage +if ! git diff --quiet HEAD -- "$MANPAGE_DIR/convert2rhel.8"; then + echo "Manpages are outdated. Please update them." + exit 1 else - echo "Version is up-to-date." + echo "Manpages are up-to-date." exit 0 fi From d750568efab7ea3787b64b031106e286a9c54ce0 Mon Sep 17 00:00:00 2001 From: Andrew Anglin Date: Tue, 12 Nov 2024 15:21:48 -0500 Subject: [PATCH 04/71] Fixed the action * on the last commit some of the set up for the action was removed and now it is back * added in the manpage generation command back to the manpage_generation.sh script --- .github/workflows/generate_manpage.yml | 16 +- man/convert2rhel.8 | 318 ------------------------- scripts/manpage_generation.sh | 2 +- 3 files changed, 15 insertions(+), 321 deletions(-) diff --git a/.github/workflows/generate_manpage.yml b/.github/workflows/generate_manpage.yml index 7e0fba8002..66e8e27a3c 100644 --- a/.github/workflows/generate_manpage.yml +++ b/.github/workflows/generate_manpage.yml @@ -12,10 +12,22 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v4 + + - name: Setup Python + uses: actions/setup-python@v5 with: - fetch-depth: 0 + python-version: 3.10.13 + + - name: Install dependencies + run: | + pip install argparse-manpage six pexpect + + - name: Install python3-rpm and python3-dnf package with apt-get + run: | + sudo apt-get update + sudo apt-get install -y python3-rpm python3-dnf - - name: Run version check script + - name: Generate Manpages run: | chmod +x scripts/manpage_generation.sh bash scripts/manpage_generation.sh diff --git a/man/convert2rhel.8 b/man/convert2rhel.8 index f98421e2df..e69de29bb2 100644 --- a/man/convert2rhel.8 +++ b/man/convert2rhel.8 @@ -1,318 +0,0 @@ -.TH CONVERT2RHEL "1" "2024\-03\-04" "convert2rhel 1.7.1" "General Commands Manual" -.SH NAME -convert2rhel \- Automates the conversion of Red Hat Enterprise Linux derivative distributions to Red Hat Enterprise Linux. -.SH SYNOPSIS -. - convert2rhel [--version] [-h] - convert2rhel [-u username] [-p password | -c conf_file_path] [--pool pool_id | -a] [--disablerepo repoid] [--enablerepo repoid] [--serverurl url] [--no-rpm-va] [--els] [--eus] [--debug] [--restart] [-y] - convert2rhel [--no-rhsm] [--disablerepo repoid] [--enablerepo repoid] [--no-rpm-va] [--els] [--eus] [--debug] [--restart] [-y] - convert2rhel [-k activation_key | -c conf_file_path] [-o organization] [--pool pool_id | -a] [--disablerepo repoid] [--enablerepo repoid] [--serverurl url] [--no-rpm-va] [--els] [--eus] [--debug] [--restart] [-y] -.SH DESCRIPTION -The Convert2RHEL utility automates converting Red Hat Enterprise Linux derivative distributions to Red Hat Enterprise Linux. The whole conversion procedure is performed on the running RHEL derivative OS installation and a restart is needed at the end of the conversion to boot into the RHEL kernel. The utility replaces the original OS packages with the RHEL ones. Available are conversions of CentOS Linux 7/8, Oracle Linux 7/8, Scientific Linux 7, Alma Linux 8, and Rocky Linux 8 to the respective major version of RHEL. - -.SH OPTIONS -.TP -\fB\-\-version\fR -Show convert2rhel version and exit. - -.TP -\fB\-\-debug\fR -Print traceback in case of an abnormal exit and messages that could help find -an issue. - -.SH -SUBCOMMANDS -.TP -\fBconvert2rhel\fR \fI\,analyze\/\fR -Run all Convert2RHEL initial checks up until the Point of no Return (PONR) and generate a report with the findings. A rollback is initiated after the checks to put the system back in the original state. -.TP -\fBconvert2rhel\fR \fI\,convert\/\fR -Convert the system. If no subcommand is given, 'convert' is used as a default. - -.SH COMMAND \fI\,'convert2rhel analyze'\/\fR -usage: - convert2rhel [\-\-version] [\-h] - convert2rhel analyze [\-u username] [\-p password | \-c conf_file_path] [\-\-pool pool_id | \-a] [\-\-disablerepo repoid] [\-\-enablerepo repoid] [\-\-serverurl url] [\-\-no\-rpm\-va] [\-\-els] [\-\-eus] [\-\-debug] [\-\-restart] [\-y] - convert2rhel analyze [\-\-no\-rhsm] [\-\-disablerepo repoid] [\-\-enablerepo repoid] [\-\-no\-rpm\-va] [\-\-els] [\-\-eus] [\-\-debug] [\-\-restart] [\-y] - convert2rhel analyze [\-k activation_key | \-c conf_file_path] [\-o organization] [\-\-pool pool_id | \-a] [\-\-disablerepo repoid] [\-\-enablerepo repoid] [\-\-serverurl url] [\-\-no\-rpm\-va] [\-\-els] [\-\-eus] [\-\-debug] [\-\-restart] [\-y] - -.SH OPTIONS \fI\,'convert2rhel analyze'\/\fR -.TP -\fB\-\-version\fR -Show convert2rhel version and exit. - -.TP -\fB\-\-debug\fR -Print traceback in case of an abnormal exit and messages that could help find -an issue. - -.TP -\fB\-\-no\-rpm\-va\fR -Skip gathering changed rpm files using 'rpm \-Va'. By default it's performed -before and after the conversion with the output stored in log files rpm_va.log -and rpm_va_after_conversion.log. At the end of the conversion, these logs are -compared to show you what rpm files have been affected by the conversion. -Cannot be used with analyze subcommand. The environment variable -CONVERT2RHEL_INCOMPLETE_ROLLBACK needs to be set to 1 to use this -argument. - -.TP -\fB\-\-els\fR -Utilize Extended Lifecycle Support (els) repositories. Necessary for RHEL 7 -servers to land on a system patched with the latest security errata. - -.TP -\fB\-\-eus\fR -Automatically recognize the system as eus, utilizing eus repos. 8.6 systems do -not require this option as they are recognized as eus automatically. This -option is meant for 8.8+ systems. - -.TP -\fB\-\-enablerepo\fR \fI\,repoidglob\/\fR -Enable specific repositories by ID or glob. For more repositories to enable, -use this option multiple times. If you don't use the \-\-no\-rhsm option, you can -use this option to override the default RHEL repoids that convert2rhel enables -through subscription\-manager. - -.TP -\fB\-\-disablerepo\fR \fI\,repoidglob\/\fR -Disable specific repositories by ID or glob. For more repositories to disable, -use this option multiple times. This option defaults to all repositories -('*'). - -.TP -\fB\-r\fR, \fB\-\-restart\fR -Restart the system when it is successfully converted to RHEL to boot the new -RHEL kernel. It has no effect when used with the 'analyze' subcommand. - -.TP -\fB\-y\fR -Answer yes to all yes/no questions the tool asks. - -.SH SUBSCRIPTION MANAGER OPTIONS \fI\,'convert2rhel analyze'\/\fR -The following options are specific to using subscription\-manager. - -.TP -\fB\-u\fR \fI\,USERNAME\/\fR, \fB\-\-username\fR \fI\,USERNAME\/\fR -Username for the subscription\-manager. If neither \-\-username nor \-\-activation\- -key option is used, the user is asked to enter the username. - -.TP -\fB\-p\fR \fI\,PASSWORD\/\fR, \fB\-\-password\fR \fI\,PASSWORD\/\fR -Password for the subscription\-manager. If \-\-password, \-\-config\-file or -\-\-activationkey are not used, the user is asked to enter the password. We -recommend using the \-\-config\-file option instead to prevent leaking the -password through a list of running processes. - -.TP -\fB\-f\fR \fI\,PASSWORD_FROM_FILE\/\fR, \fB\-\-password\-from\-file\fR \fI\,PASSWORD_FROM_FILE\/\fR -File containing password for the subscription\-manager in the plain text form. -It's an alternative to the \-\-password option. Deprecated, use \-\-config\-file -instead. - -.TP -\fB\-k\fR \fI\,ACTIVATIONKEY\/\fR, \fB\-\-activationkey\fR \fI\,ACTIVATIONKEY\/\fR -Activation key used for the system registration by the subscription\-manager. -It requires to have the \-\-org option specified. We recommend using the -\-\-config\-file option instead to prevent leaking the activation key through a -list of running processes. - -.TP -\fB\-o\fR \fI\,ORG\/\fR, \fB\-\-org\fR \fI\,ORG\/\fR -Organization with which the system will be registered by the subscription\- -manager. A list of available organizations is possible to obtain by running -'subscription\-manager orgs'. From the listed pairs Name:Key, use the Key here. - -.TP -\fB\-c\fR \fI\,CONFIG_FILE\/\fR, \fB\-\-config\-file\fR \fI\,CONFIG_FILE\/\fR -The configuration file is an optional way to safely pass either a user -password or an activation key to the subscription\-manager to register the -system. This is more secure than passing these values through the -\-\-activationkey or \-\-password option, which might leak the values through a -list of running processes. You can edit the pre\-installed configuration file -template at /etc/convert2rhel.ini or create a new configuration file at -~/.convert2rhel.ini. The convert2rhel utility loads the configuration from -either of those locations, the latter having preference over the former. -Alternatively, you can specify a path to the configuration file using the -\-\-config\-file option to override other configurations. - -.TP -\fB\-a\fR, \fB\-\-auto\-attach\fR -Automatically attach compatible subscriptions to the system. - -.TP -\fB\-\-pool\fR \fI\,POOL\/\fR -Subscription pool ID. A list of the available subscriptions is possible to -obtain by running 'subscription\-manager list \-\-available'. If no pool ID is -provided, the \-\-auto option is used - -.TP -\fB\-\-serverurl\fR \fI\,SERVERURL\/\fR -Hostname of the subscription service to be used when registering the system -with subscription\-manager. The default is the Customer Portal Subscription -Management service (subscription.rhsm.redhat.com). It is not to be used to -specify a Satellite server. For that, read the product documentation at -https://access.redhat.com/. - -.TP -\fB\-\-keep\-rhsm\fR -Deprecated. This option has no effect. Convert2rhel will now use whatever -subscription\-manager packages are present on the system. - -.SH ALTERNATIVE INSTALLATION OPTIONS \fI\,'convert2rhel analyze'\/\fR -The following options are required if you do not intend on using subscription\-manager. - -.TP -\fB\-\-disable\-submgr\fR -Replaced by \-\-no\-rhsm. Both options have the same effect. - -.TP -\fB\-\-no\-rhsm\fR -Do not use the subscription\-manager, use custom repositories instead. See -\-\-enablerepo/\-\-disablerepo options. Without this option, the subscription\- -manager is used to access RHEL repositories by default. Using this option -requires to have the \-\-enablerepo specified. - -.SH COMMAND \fI\,'convert2rhel convert'\/\fR -usage: - convert2rhel [\-\-version] [\-h] - convert2rhel convert [\-u username] [\-p password | \-c conf_file_path] [\-\-pool pool_id | \-a] [\-\-disablerepo repoid] [\-\-enablerepo repoid] [\-\-serverurl url] [\-\-no\-rpm\-va] [\-\-els] [\-\-eus] [\-\-debug] [\-\-restart] [\-y] - convert2rhel convert [\-\-no\-rhsm] [\-\-disablerepo repoid] [\-\-enablerepo repoid] [\-\-no\-rpm\-va] [\-\-els] [\-\-eus] [\-\-debug] [\-\-restart] [\-y] - convert2rhel convert [\-k activation_key | \-c conf_file_path] [\-o organization] [\-\-pool pool_id | \-a] [\-\-disablerepo repoid] [\-\-enablerepo repoid] [\-\-serverurl url] [\-\-no\-rpm\-va] [\-\-els] [\-\-eus] [\-\-debug] [\-\-restart] [\-y] - -.SH OPTIONS \fI\,'convert2rhel convert'\/\fR -.TP -\fB\-\-version\fR -Show convert2rhel version and exit. - -.TP -\fB\-\-debug\fR -Print traceback in case of an abnormal exit and messages that could help find -an issue. - -.TP -\fB\-\-no\-rpm\-va\fR -Skip gathering changed rpm files using 'rpm \-Va'. By default it's performed -before and after the conversion with the output stored in log files rpm_va.log -and rpm_va_after_conversion.log. At the end of the conversion, these logs are -compared to show you what rpm files have been affected by the conversion. -Cannot be used with analyze subcommand. The environment variable -CONVERT2RHEL_INCOMPLETE_ROLLBACK needs to be set to 1 to use this -argument. - -.TP -\fB\-\-els\fR -Utilize Extended Lifecycle Support (els) repositories. Necessary for RHEL 7 -servers to land on a system patched with the latest security errata. - -.TP -\fB\-\-eus\fR -Automatically recognize the system as eus, utilizing eus repos. 8.6 systems do -not require this option as they are recognized as eus automatically. This -option is meant for 8.8+ systems. - -.TP -\fB\-\-enablerepo\fR \fI\,repoidglob\/\fR -Enable specific repositories by ID or glob. For more repositories to enable, -use this option multiple times. If you don't use the \-\-no\-rhsm option, you can -use this option to override the default RHEL repoids that convert2rhel enables -through subscription\-manager. - -.TP -\fB\-\-disablerepo\fR \fI\,repoidglob\/\fR -Disable specific repositories by ID or glob. For more repositories to disable, -use this option multiple times. This option defaults to all repositories -('*'). - -.TP -\fB\-r\fR, \fB\-\-restart\fR -Restart the system when it is successfully converted to RHEL to boot the new -RHEL kernel. It has no effect when used with the 'analyze' subcommand. - -.TP -\fB\-y\fR -Answer yes to all yes/no questions the tool asks. - -.SH SUBSCRIPTION MANAGER OPTIONS \fI\,'convert2rhel convert'\/\fR -The following options are specific to using subscription\-manager. - -.TP -\fB\-u\fR \fI\,USERNAME\/\fR, \fB\-\-username\fR \fI\,USERNAME\/\fR -Username for the subscription\-manager. If neither \-\-username nor \-\-activation\- -key option is used, the user is asked to enter the username. - -.TP -\fB\-p\fR \fI\,PASSWORD\/\fR, \fB\-\-password\fR \fI\,PASSWORD\/\fR -Password for the subscription\-manager. If \-\-password, \-\-config\-file or -\-\-activationkey are not used, the user is asked to enter the password. We -recommend using the \-\-config\-file option instead to prevent leaking the -password through a list of running processes. - -.TP -\fB\-f\fR \fI\,PASSWORD_FROM_FILE\/\fR, \fB\-\-password\-from\-file\fR \fI\,PASSWORD_FROM_FILE\/\fR -File containing password for the subscription\-manager in the plain text form. -It's an alternative to the \-\-password option. Deprecated, use \-\-config\-file -instead. - -.TP -\fB\-k\fR \fI\,ACTIVATIONKEY\/\fR, \fB\-\-activationkey\fR \fI\,ACTIVATIONKEY\/\fR -Activation key used for the system registration by the subscription\-manager. -It requires to have the \-\-org option specified. We recommend using the -\-\-config\-file option instead to prevent leaking the activation key through a -list of running processes. - -.TP -\fB\-o\fR \fI\,ORG\/\fR, \fB\-\-org\fR \fI\,ORG\/\fR -Organization with which the system will be registered by the subscription\- -manager. A list of available organizations is possible to obtain by running -'subscription\-manager orgs'. From the listed pairs Name:Key, use the Key here. - -.TP -\fB\-c\fR \fI\,CONFIG_FILE\/\fR, \fB\-\-config\-file\fR \fI\,CONFIG_FILE\/\fR -The configuration file is an optional way to safely pass either a user -password or an activation key to the subscription\-manager to register the -system. This is more secure than passing these values through the -\-\-activationkey or \-\-password option, which might leak the values through a -list of running processes. You can edit the pre\-installed configuration file -template at /etc/convert2rhel.ini or create a new configuration file at -~/.convert2rhel.ini. The convert2rhel utility loads the configuration from -either of those locations, the latter having preference over the former. -Alternatively, you can specify a path to the configuration file using the -\-\-config\-file option to override other configurations. - -.TP -\fB\-a\fR, \fB\-\-auto\-attach\fR -Automatically attach compatible subscriptions to the system. - -.TP -\fB\-\-pool\fR \fI\,POOL\/\fR -Subscription pool ID. A list of the available subscriptions is possible to -obtain by running 'subscription\-manager list \-\-available'. If no pool ID is -provided, the \-\-auto option is used - -.TP -\fB\-\-serverurl\fR \fI\,SERVERURL\/\fR -Hostname of the subscription service to be used when registering the system -with subscription\-manager. The default is the Customer Portal Subscription -Management service (subscription.rhsm.redhat.com). It is not to be used to -specify a Satellite server. For that, read the product documentation at -https://access.redhat.com/. - -.TP -\fB\-\-keep\-rhsm\fR -Deprecated. This option has no effect. Convert2rhel will now use whatever -subscription\-manager packages are present on the system. - -.SH ALTERNATIVE INSTALLATION OPTIONS \fI\,'convert2rhel convert'\/\fR -The following options are required if you do not intend on using subscription\-manager. - -.TP -\fB\-\-disable\-submgr\fR -Replaced by \-\-no\-rhsm. Both options have the same effect. - -.TP -\fB\-\-no\-rhsm\fR -Do not use the subscription\-manager, use custom repositories instead. See -\-\-enablerepo/\-\-disablerepo options. Without this option, the subscription\- -manager is used to access RHEL repositories by default. Using this option -requires to have the \-\-enablerepo specified. diff --git a/scripts/manpage_generation.sh b/scripts/manpage_generation.sh index 8b1b5766fd..3f6646b825 100755 --- a/scripts/manpage_generation.sh +++ b/scripts/manpage_generation.sh @@ -16,7 +16,7 @@ CURRENT_VER=$(grep -oP '^Version:\s+\K\S+' packaging/convert2rhel.spec) echo "Current version: $CURRENT_VER" # Generate the manpage using argparse-manpage -PYTHONPATH=. argparse-manpage --pyfile man/__init__.py --function get_parser --manual-title="General Commands Manual" --description="Automates the conversion of Red Hat Enterprise Linux derivative distributions to Red Hat Enterprise Linux." --project-name "convert2rhel $CURRENT_VER" --prog="convert2rhel" --include man/distribution --include man/synopsis > "$MANPAGE_DIR/convert2rhel.8" +PYTHONPATH=. /usr/bin/python /home/runner/.local/bin/argparse-manpage --pyfile man/__init__.py --function get_parser --manual-title="General Commands Manual" --description="Automates the conversion of Red Hat Enterprise Linux derivative distributions to Red Hat Enterprise Linux." --project-name "convert2rhel $VER" --prog="convert2rhel" --include man/distribution --include man/synopsis > "$MANPAGE_DIR/convert2rhel.8" # Check for differences in the generated manpage if ! git diff --quiet HEAD -- "$MANPAGE_DIR/convert2rhel.8"; then From fe287822a4b1616fa51b6c19c7b696ef0cc394ad Mon Sep 17 00:00:00 2001 From: Andrew Anglin Date: Wed, 20 Nov 2024 10:53:50 -0500 Subject: [PATCH 05/71] Added rpm to the other dependencies being installed --- .github/workflows/generate_manpage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/generate_manpage.yml b/.github/workflows/generate_manpage.yml index 66e8e27a3c..14f249ef82 100644 --- a/.github/workflows/generate_manpage.yml +++ b/.github/workflows/generate_manpage.yml @@ -20,7 +20,7 @@ jobs: - name: Install dependencies run: | - pip install argparse-manpage six pexpect + pip install argparse-manpage six pexpect rpm - name: Install python3-rpm and python3-dnf package with apt-get run: | From 674ad99e638a967460eb66a5d05539d21e62c6d5 Mon Sep 17 00:00:00 2001 From: Andrew Anglin Date: Wed, 20 Nov 2024 11:31:26 -0500 Subject: [PATCH 06/71] edited the command for generating the manpages --- scripts/manpage_generation.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/manpage_generation.sh b/scripts/manpage_generation.sh index 3f6646b825..953f4df594 100755 --- a/scripts/manpage_generation.sh +++ b/scripts/manpage_generation.sh @@ -16,7 +16,8 @@ CURRENT_VER=$(grep -oP '^Version:\s+\K\S+' packaging/convert2rhel.spec) echo "Current version: $CURRENT_VER" # Generate the manpage using argparse-manpage -PYTHONPATH=. /usr/bin/python /home/runner/.local/bin/argparse-manpage --pyfile man/__init__.py --function get_parser --manual-title="General Commands Manual" --description="Automates the conversion of Red Hat Enterprise Linux derivative distributions to Red Hat Enterprise Linux." --project-name "convert2rhel $VER" --prog="convert2rhel" --include man/distribution --include man/synopsis > "$MANPAGE_DIR/convert2rhel.8" +PYTHONPATH=. argparse-manpage --pyfile man/__init__.py --function get_parser --manual-title="General Commands Manual" --description="Automates the conversion of Red Hat Enterprise Linux derivative distributions to Red Hat Enterprise Linux." --project-name "convert2rhel $CURRENT_VER" --prog="convert2rhel" --include man/distribution --include man/synopsis > "$MANPAGE_DIR/convert2rhel.8" + # Check for differences in the generated manpage if ! git diff --quiet HEAD -- "$MANPAGE_DIR/convert2rhel.8"; then From 773de3ca500bb4dbaf440ddb613727c30ed63235 Mon Sep 17 00:00:00 2001 From: Andrew Anglin Date: Wed, 20 Nov 2024 20:42:57 -0500 Subject: [PATCH 07/71] changed how cli calls the attribues from rpm.py * How cli.py was calling the atributes from rpm for the pre and post RPM_VA_LOG_FILENAME was causing an error whenever I tried to run the GitHub action and the manpage command locally so to fix it I imported the the vars directly into cli.py --- convert2rhel/cli.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/convert2rhel/cli.py b/convert2rhel/cli.py index 3ae5251b86..6f74bf87c6 100644 --- a/convert2rhel/cli.py +++ b/convert2rhel/cli.py @@ -25,6 +25,7 @@ from convert2rhel import __version__, utils from convert2rhel.toolopts import tool_opts from convert2rhel.toolopts.config import CliConfig, FileConfig +from convert2rhel.utils.rpm import PRE_RPM_VA_LOG_FILENAME, POST_RPM_VA_LOG_FILENAME loggerinst = logging.getLogger(__name__) @@ -134,7 +135,7 @@ def _register_options(self): " to show you what rpm files have been affected by the conversion." " Cannot be used with analyze subcommand." " The incomplete_rollback option needs to be set to true in the /etc/convert2rhel.ini config file to" - " use this argument.".format(utils.rpm.PRE_RPM_VA_LOG_FILENAME, utils.rpm.POST_RPM_VA_LOG_FILENAME), + " use this argument.".format((PRE_RPM_VA_LOG_FILENAME, POST_RPM_VA_LOG_FILENAME), ) self._shared_options_parser.add_argument( "--eus", From c0c1754e3017dae8f1a32549c83c5b71ece27ee8 Mon Sep 17 00:00:00 2001 From: Andrew Anglin Date: Sun, 24 Nov 2024 04:17:36 -0500 Subject: [PATCH 08/71] added in the config files in the action --- .github/workflows/generate_manpage.yml | 45 ++-- man/convert2rhel.8 | 284 +++++++++++++++++++++++++ 2 files changed, 310 insertions(+), 19 deletions(-) diff --git a/.github/workflows/generate_manpage.yml b/.github/workflows/generate_manpage.yml index 14f249ef82..0b764dd0f0 100644 --- a/.github/workflows/generate_manpage.yml +++ b/.github/workflows/generate_manpage.yml @@ -1,33 +1,40 @@ -name: Generate Manpages +name: Update Manpages on: + push: + branches: + - main pull_request: branches: - main jobs: - generate-manpages: + update-manpages: runs-on: ubuntu-latest steps: - - name: Checkout code - uses: actions/checkout@v4 + - name: Checkout code + uses: actions/checkout@v4 - - name: Setup Python - uses: actions/setup-python@v5 - with: - python-version: 3.10.13 + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.12' - - name: Install dependencies - run: | - pip install argparse-manpage six pexpect rpm + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install pexpect + pip install argparse-manpage - - name: Install python3-rpm and python3-dnf package with apt-get - run: | - sudo apt-get update - sudo apt-get install -y python3-rpm python3-dnf + - name: Create and set permissions for config files + run: | + mkdir -p ~/.convert2rhel + echo "# Configuration content" > ~/.convert2rhel.ini + sudo cp ~/.convert2rhel.ini /etc/convert2rhel.ini + chmod 0600 ~/.convert2rhel.ini + sudo chmod 0600 /etc/convert2rhel.ini - - name: Generate Manpages - run: | - chmod +x scripts/manpage_generation.sh - bash scripts/manpage_generation.sh + - name: Generate manpages + run: | + PYTHONPATH=$(pwd) argparse-manpage --pyfile man/__init__.py --function get_parser --manual-title="General Commands Manual" --description="Automates the conversion of Red Hat Enterprise Linux derivative distributions to Red Hat Enterprise Linux." --project-name "convert2rhel 2.1.0" --prog="convert2rhel" --include man/distribution --include man/synopsis > "man/convert2rhel.8" diff --git a/man/convert2rhel.8 b/man/convert2rhel.8 index e69de29bb2..f170d4f889 100644 --- a/man/convert2rhel.8 +++ b/man/convert2rhel.8 @@ -0,0 +1,284 @@ +.TH CONVERT2RHEL "1" "2024\-11\-24" "convert2rhel 2.1.0" "General Commands Manual" +.SH NAME +convert2rhel \- Automates the conversion of Red Hat Enterprise Linux derivative distributions to Red Hat Enterprise Linux. +.SH SYNOPSIS +. + convert2rhel [--version] [-h] + convert2rhel [-u username] [-p password | -c conf_file_path] [--pool pool_id | -a] [--disablerepo repoid] [--enablerepo repoid] [--serverurl url] [--no-rpm-va] [--els] [--eus] [--debug] [--restart] [-y] + convert2rhel [--no-rhsm] [--disablerepo repoid] [--enablerepo repoid] [--no-rpm-va] [--els ] [--eus] [--debug] [--restart] [-y] + convert2rhel [-k activation_key | -c conf_file_path] [-o organization] [--pool pool_id | -a] [--disablerepo repoid] [--enablerepo repoid] [--serverurl url] [--no-rpm-va] [--els] [--eus] [--debug] [--restart] [-y] +.SH DESCRIPTION +The Convert2RHEL utility automates converting Red Hat Enterprise Linux derivative distributions to Red Hat Enterprise Linux. The whole conversion procedure is performed on the running RHEL derivative OS installation and a restart is needed at the end of the conversion to boot into the RHEL kernel. The utility replaces the original OS packages with the RHEL ones. Available are conversions of CentOS Linux 7/8, Oracle Linux 7/8, Scientific Linux 7, Alma Linux 8, and Rocky Linux 8 to the respective major version of RHEL. + +.SH OPTIONS +.TP +\fB\-\-version\fR +Show convert2rhel version and exit. + +.TP +\fB\-\-debug\fR +Print traceback in case of an abnormal exit and messages that could help find +an issue. + +.SH +SUBCOMMANDS +.TP +\fBconvert2rhel\fR \fI\,analyze\/\fR +Run all Convert2RHEL initial checks up until the Point of no Return (PONR) and generate a report with the findings. A rollback is initiated after the checks to put the system back in the original state. +.TP +\fBconvert2rhel\fR \fI\,convert\/\fR +Convert the system. If no subcommand is given, 'convert' is used as a default. + +.SH COMMAND \fI\,'convert2rhel analyze'\/\fR +usage: + convert2rhel [\-\-version] [\-h] + convert2rhel analyze [\-u username] [\-p password | \-c conf_file_path] [\-\-pool pool_id | \-a] [\-\-disablerepo repoid] [\-\-enablerepo repoid] [\-\-serverurl url] [\-\-no\-rpm\-va] [\-\-eus] [\-\-els] [\-\-debug] [\-\-restart] [\-y] + convert2rhel analyze [\-\-no\-rhsm] [\-\-disablerepo repoid] [\-\-enablerepo repoid] [\-\-no\-rpm\-va] [\-\-eus] [\-\-els] [\-\-debug] [\-\-restart] [\-y] + convert2rhel analyze [\-k activation_key | \-c conf_file_path] [\-o organization] [\-\-pool pool_id | \-a] [\-\-disablerepo repoid] [\-\-enablerepo repoid] [\-\-serverurl url] [\-\-no\-rpm\-va] [\-\-eus] [\-\-els] [\-\-debug] [\-\-restart] [\-y] + +.SH OPTIONS \fI\,'convert2rhel analyze'\/\fR +.TP +\fB\-\-version\fR +Show convert2rhel version and exit. + +.TP +\fB\-\-debug\fR +Print traceback in case of an abnormal exit and messages that could help find +an issue. + +.TP +\fB\-\-no\-rpm\-va\fR +Skip gathering changed rpm files using 'rpm \-Va'. By default it's performed +before and after the conversion with the output stored in log files rpm_va.log +and rpm_va_after_conversion.log. At the end of the conversion, these logs are +compared to show you what rpm files have been affected by the conversion. +Cannot be used with analyze subcommand. The environment variable +CONVERT2RHEL_INCOMPLETE_ROLLBACK needs to be set to 1 to use this argument. + +.TP +\fB\-\-eus\fR +Explicitly recognize the system as eus, utilizing eus repos. This option is +meant for el8.8+ systems. + +.TP +\fB\-\-els\fR +Explicitly recognize the system as els, utilizing els repos. This option is +meant for el7 systems. + +.TP +\fB\-\-enablerepo\fR \fI\,repoidglob\/\fR +Enable specific repositories by ID or glob. For more repositories to enable, +use this option multiple times. If you don't use the \-\-no\-rhsm option, you can +use this option to override the default RHEL repoids that convert2rhel enables +through subscription\-manager. + +.TP +\fB\-\-disablerepo\fR \fI\,repoidglob\/\fR +Disable specific repositories by ID or glob. For more repositories to disable, +use this option multiple times. This option defaults to all repositories +('*'). + +.TP +\fB\-r\fR, \fB\-\-restart\fR +Restart the system when it is successfully converted to RHEL to boot the new +RHEL kernel. It has no effect when used with the 'analyze' subcommand. + +.TP +\fB\-y\fR +Answer yes to all yes/no questions the tool asks. + +.SH SUBSCRIPTION MANAGER OPTIONS \fI\,'convert2rhel analyze'\/\fR +The following options are specific to using subscription\-manager. + +.TP +\fB\-u\fR \fI\,USERNAME\/\fR, \fB\-\-username\fR \fI\,USERNAME\/\fR +Username for the subscription\-manager. If neither \-\-username nor \-\-activation\- +key option is used, the user is asked to enter the username. + +.TP +\fB\-p\fR \fI\,PASSWORD\/\fR, \fB\-\-password\fR \fI\,PASSWORD\/\fR +Password for the subscription\-manager. If \-\-password, \-\-config\-file or +\-\-activationkey are not used, the user is asked to enter the password. We +recommend using the \-\-config\-file option instead to prevent leaking the +password through a list of running processes. + +.TP +\fB\-k\fR \fI\,ACTIVATION_KEY\/\fR, \fB\-\-activationkey\fR \fI\,ACTIVATION_KEY\/\fR +Activation key used for the system registration by the subscription\-manager. +It requires to have the \-\-org option specified. We recommend using the +\-\-config\-file option instead to prevent leaking the activation key through a +list of running processes. + +.TP +\fB\-o\fR \fI\,ORG\/\fR, \fB\-\-org\fR \fI\,ORG\/\fR +Organization with which the system will be registered by the subscription\- +manager. A list of available organizations is possible to obtain by running +'subscription\-manager orgs'. From the listed pairs Name:Key, use the Key here. + +.TP +\fB\-c\fR \fI\,CONFIG_FILE\/\fR, \fB\-\-config\-file\fR \fI\,CONFIG_FILE\/\fR +The configuration file is an optional way to safely pass either a user +password or an activation key to the subscription\-manager to register the +system. This is more secure than passing these values through the +\-\-activationkey or \-\-password option, which might leak the values through a +list of running processes. You can edit the pre\-installed configuration file +template at /etc/convert2rhel.ini or create a new configuration file at +~/.convert2rhel.ini. The convert2rhel utility loads the configuration from +either of those locations, the latter having preference over the former. +Alternatively, you can specify a path to the configuration file using the +\-\-config\-file option to override other configurations. + +.TP +\fB\-a\fR, \fB\-\-auto\-attach\fR +Automatically attach compatible subscriptions to the system. + +.TP +\fB\-\-pool\fR \fI\,POOL\/\fR +Subscription pool ID. A list of the available subscriptions is possible to +obtain by running 'subscription\-manager list \-\-available'. If no pool ID is +provided, the \-\-auto option is used + +.TP +\fB\-\-serverurl\fR \fI\,SERVERURL\/\fR +Hostname of the subscription service to be used when registering the system +with subscription\-manager. The default is the Customer Portal Subscription +Management service (subscription.rhsm.redhat.com). It is not to be used to +specify a Satellite server. For that, read the product documentation at +https://access.redhat.com/. + +.SH ALTERNATIVE INSTALLATION OPTIONS \fI\,'convert2rhel analyze'\/\fR +The following options are required if you do not intend on using subscription\-manager. + +.TP +\fB\-\-no\-rhsm\fR +Do not use the subscription\-manager, use custom repositories instead. See +\-\-enablerepo/\-\-disablerepo options. Without this option, the subscription\- +manager is used to access RHEL repositories by default. Using this option +requires to have the \-\-enablerepo specified. + +.SH COMMAND \fI\,'convert2rhel convert'\/\fR +usage: + convert2rhel [\-\-version] [\-h] + convert2rhel convert [\-u username] [\-p password | \-c conf_file_path] [\-\-pool pool_id | \-a] [\-\-disablerepo repoid] [\-\-enablerepo repoid] [\-\-serverurl url] [\-\-no\-rpm\-va] [\-\-eus] [\-\-els] [\-\-debug] [\-\-restart] [\-y] + convert2rhel convert [\-\-no\-rhsm] [\-\-disablerepo repoid] [\-\-enablerepo repoid] [\-\-no\-rpm\-va] [\-\-eus] [\-\-els] [\-\-debug] [\-\-restart] [\-y] + convert2rhel convert [\-k activation_key | \-c conf_file_path] [\-o organization] [\-\-pool pool_id | \-a] [\-\-disablerepo repoid] [\-\-enablerepo repoid] [\-\-serverurl url] [\-\-no\-rpm\-va] [\-\-eus] [\-\-els] [\-\-debug] [\-\-restart] [\-y] + +.SH OPTIONS \fI\,'convert2rhel convert'\/\fR +.TP +\fB\-\-version\fR +Show convert2rhel version and exit. + +.TP +\fB\-\-debug\fR +Print traceback in case of an abnormal exit and messages that could help find +an issue. + +.TP +\fB\-\-no\-rpm\-va\fR +Skip gathering changed rpm files using 'rpm \-Va'. By default it's performed +before and after the conversion with the output stored in log files rpm_va.log +and rpm_va_after_conversion.log. At the end of the conversion, these logs are +compared to show you what rpm files have been affected by the conversion. +Cannot be used with analyze subcommand. The environment variable +CONVERT2RHEL_INCOMPLETE_ROLLBACK needs to be set to 1 to use this argument. + +.TP +\fB\-\-eus\fR +Explicitly recognize the system as eus, utilizing eus repos. This option is +meant for el8.8+ systems. + +.TP +\fB\-\-els\fR +Explicitly recognize the system as els, utilizing els repos. This option is +meant for el7 systems. + +.TP +\fB\-\-enablerepo\fR \fI\,repoidglob\/\fR +Enable specific repositories by ID or glob. For more repositories to enable, +use this option multiple times. If you don't use the \-\-no\-rhsm option, you can +use this option to override the default RHEL repoids that convert2rhel enables +through subscription\-manager. + +.TP +\fB\-\-disablerepo\fR \fI\,repoidglob\/\fR +Disable specific repositories by ID or glob. For more repositories to disable, +use this option multiple times. This option defaults to all repositories +('*'). + +.TP +\fB\-r\fR, \fB\-\-restart\fR +Restart the system when it is successfully converted to RHEL to boot the new +RHEL kernel. It has no effect when used with the 'analyze' subcommand. + +.TP +\fB\-y\fR +Answer yes to all yes/no questions the tool asks. + +.SH SUBSCRIPTION MANAGER OPTIONS \fI\,'convert2rhel convert'\/\fR +The following options are specific to using subscription\-manager. + +.TP +\fB\-u\fR \fI\,USERNAME\/\fR, \fB\-\-username\fR \fI\,USERNAME\/\fR +Username for the subscription\-manager. If neither \-\-username nor \-\-activation\- +key option is used, the user is asked to enter the username. + +.TP +\fB\-p\fR \fI\,PASSWORD\/\fR, \fB\-\-password\fR \fI\,PASSWORD\/\fR +Password for the subscription\-manager. If \-\-password, \-\-config\-file or +\-\-activationkey are not used, the user is asked to enter the password. We +recommend using the \-\-config\-file option instead to prevent leaking the +password through a list of running processes. + +.TP +\fB\-k\fR \fI\,ACTIVATION_KEY\/\fR, \fB\-\-activationkey\fR \fI\,ACTIVATION_KEY\/\fR +Activation key used for the system registration by the subscription\-manager. +It requires to have the \-\-org option specified. We recommend using the +\-\-config\-file option instead to prevent leaking the activation key through a +list of running processes. + +.TP +\fB\-o\fR \fI\,ORG\/\fR, \fB\-\-org\fR \fI\,ORG\/\fR +Organization with which the system will be registered by the subscription\- +manager. A list of available organizations is possible to obtain by running +'subscription\-manager orgs'. From the listed pairs Name:Key, use the Key here. + +.TP +\fB\-c\fR \fI\,CONFIG_FILE\/\fR, \fB\-\-config\-file\fR \fI\,CONFIG_FILE\/\fR +The configuration file is an optional way to safely pass either a user +password or an activation key to the subscription\-manager to register the +system. This is more secure than passing these values through the +\-\-activationkey or \-\-password option, which might leak the values through a +list of running processes. You can edit the pre\-installed configuration file +template at /etc/convert2rhel.ini or create a new configuration file at +~/.convert2rhel.ini. The convert2rhel utility loads the configuration from +either of those locations, the latter having preference over the former. +Alternatively, you can specify a path to the configuration file using the +\-\-config\-file option to override other configurations. + +.TP +\fB\-a\fR, \fB\-\-auto\-attach\fR +Automatically attach compatible subscriptions to the system. + +.TP +\fB\-\-pool\fR \fI\,POOL\/\fR +Subscription pool ID. A list of the available subscriptions is possible to +obtain by running 'subscription\-manager list \-\-available'. If no pool ID is +provided, the \-\-auto option is used + +.TP +\fB\-\-serverurl\fR \fI\,SERVERURL\/\fR +Hostname of the subscription service to be used when registering the system +with subscription\-manager. The default is the Customer Portal Subscription +Management service (subscription.rhsm.redhat.com). It is not to be used to +specify a Satellite server. For that, read the product documentation at +https://access.redhat.com/. + +.SH ALTERNATIVE INSTALLATION OPTIONS \fI\,'convert2rhel convert'\/\fR +The following options are required if you do not intend on using subscription\-manager. + +.TP +\fB\-\-no\-rhsm\fR +Do not use the subscription\-manager, use custom repositories instead. See +\-\-enablerepo/\-\-disablerepo options. Without this option, the subscription\- +manager is used to access RHEL repositories by default. Using this option +requires to have the \-\-enablerepo specified. From 1400d376391576f2313e5da09ecc5f045a7c40d3 Mon Sep 17 00:00:00 2001 From: Andrew Anglin Date: Sun, 24 Nov 2024 04:20:50 -0500 Subject: [PATCH 09/71] added in the installation of rpm to the action --- .github/workflows/generate_manpage.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/generate_manpage.yml b/.github/workflows/generate_manpage.yml index 0b764dd0f0..cb6690abb5 100644 --- a/.github/workflows/generate_manpage.yml +++ b/.github/workflows/generate_manpage.yml @@ -26,6 +26,7 @@ jobs: python -m pip install --upgrade pip pip install pexpect pip install argparse-manpage + pip install rpm - name: Create and set permissions for config files run: | From 148906c8f45b485ac4042cea136953257c32239a Mon Sep 17 00:00:00 2001 From: Andrew Anglin Date: Sun, 24 Nov 2024 04:23:37 -0500 Subject: [PATCH 10/71] used the rpm-py-install to get rpm --- .github/workflows/generate_manpage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/generate_manpage.yml b/.github/workflows/generate_manpage.yml index cb6690abb5..e656b1b5a6 100644 --- a/.github/workflows/generate_manpage.yml +++ b/.github/workflows/generate_manpage.yml @@ -26,7 +26,7 @@ jobs: python -m pip install --upgrade pip pip install pexpect pip install argparse-manpage - pip install rpm + pip install rpm-py-installer - name: Create and set permissions for config files run: | From f30d20ee6d4b27fe7da60fd2fb19f681f6387508 Mon Sep 17 00:00:00 2001 From: Andrew Anglin Date: Sun, 24 Nov 2024 04:26:50 -0500 Subject: [PATCH 11/71] change to using spt-get for rpm --- .github/workflows/generate_manpage.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/generate_manpage.yml b/.github/workflows/generate_manpage.yml index e656b1b5a6..6c87f06519 100644 --- a/.github/workflows/generate_manpage.yml +++ b/.github/workflows/generate_manpage.yml @@ -26,7 +26,8 @@ jobs: python -m pip install --upgrade pip pip install pexpect pip install argparse-manpage - pip install rpm-py-installer + sudo apt-get update + sudo apt-get install -y rpm python3-rpm - name: Create and set permissions for config files run: | From 6ea158ede0c49700f66737d373ee3b612712d8d0 Mon Sep 17 00:00:00 2001 From: Andrew Anglin Date: Sun, 24 Nov 2024 04:49:50 -0500 Subject: [PATCH 12/71] draft looking to see if rpm and python-rpm are installed --- .github/workflows/generate_manpage.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/generate_manpage.yml b/.github/workflows/generate_manpage.yml index 6c87f06519..e46b0a5bc7 100644 --- a/.github/workflows/generate_manpage.yml +++ b/.github/workflows/generate_manpage.yml @@ -23,11 +23,13 @@ jobs: - name: Install dependencies run: | + sudo apt-get update + sudo apt-get install -y rpm + sudo apt-get install -y python3-rpm + sudo apt-get install -y build-essential libpopt-dev python -m pip install --upgrade pip pip install pexpect pip install argparse-manpage - sudo apt-get update - sudo apt-get install -y rpm python3-rpm - name: Create and set permissions for config files run: | From 1350c418130a26c609eaad0239dd49cb1c80406c Mon Sep 17 00:00:00 2001 From: Andrew Anglin Date: Sun, 24 Nov 2024 05:04:13 -0500 Subject: [PATCH 13/71] added the use of a podman container --- .github/workflows/generate_manpage.yml | 26 +++++---------------- Containerfiles/manpage_check.Containerfile | 27 ++++++++++++++++++++++ 2 files changed, 33 insertions(+), 20 deletions(-) create mode 100644 Containerfiles/manpage_check.Containerfile diff --git a/.github/workflows/generate_manpage.yml b/.github/workflows/generate_manpage.yml index e46b0a5bc7..f18fef4d38 100644 --- a/.github/workflows/generate_manpage.yml +++ b/.github/workflows/generate_manpage.yml @@ -16,29 +16,15 @@ jobs: - name: Checkout code uses: actions/checkout@v4 - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: '3.12' - - - name: Install dependencies + - name: Install Podman run: | sudo apt-get update - sudo apt-get install -y rpm - sudo apt-get install -y python3-rpm - sudo apt-get install -y build-essential libpopt-dev - python -m pip install --upgrade pip - pip install pexpect - pip install argparse-manpage + sudo apt-get -y install podman - - name: Create and set permissions for config files + - name: Build Podman image run: | - mkdir -p ~/.convert2rhel - echo "# Configuration content" > ~/.convert2rhel.ini - sudo cp ~/.convert2rhel.ini /etc/convert2rhel.ini - chmod 0600 ~/.convert2rhel.ini - sudo chmod 0600 /etc/convert2rhel.ini + podman build -t convert2rhel-manpages -f Containerfile . - - name: Generate manpages + - name: Run Podman container run: | - PYTHONPATH=$(pwd) argparse-manpage --pyfile man/__init__.py --function get_parser --manual-title="General Commands Manual" --description="Automates the conversion of Red Hat Enterprise Linux derivative distributions to Red Hat Enterprise Linux." --project-name "convert2rhel 2.1.0" --prog="convert2rhel" --include man/distribution --include man/synopsis > "man/convert2rhel.8" + podman run --rm convert2rhel-manpages diff --git a/Containerfiles/manpage_check.Containerfile b/Containerfiles/manpage_check.Containerfile new file mode 100644 index 0000000000..07156bb670 --- /dev/null +++ b/Containerfiles/manpage_check.Containerfile @@ -0,0 +1,27 @@ +# Use the latest Ubuntu image as the base +FROM ubuntu:latest + +# Install system dependencies +RUN apt-get update && apt-get install -y \ + python3 \ + python3-pip \ + rpm \ + python3-rpm \ + build-essential \ + libpopt-dev + +# Install Python packages +RUN python3 -m pip install --upgrade pip +RUN pip3 install pexpect argparse-manpage + +# Set the working directory +WORKDIR /app + +# Copy the project files into the container +COPY . /app + +# Set up entrypoint to run manpage_generation.sh +COPY manpage_generation.sh /app/ +RUN chmod +x /app/manpage_generation.sh + +ENTRYPOINT ["/app/manpage_generation.sh"] From 52e85d05f6b6b8c7d5807a083c555b9d70992e22 Mon Sep 17 00:00:00 2001 From: Andrew Anglin Date: Sun, 24 Nov 2024 05:07:41 -0500 Subject: [PATCH 14/71] added the right name for the container file --- .github/workflows/generate_manpage.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/generate_manpage.yml b/.github/workflows/generate_manpage.yml index f18fef4d38..f2687a5d36 100644 --- a/.github/workflows/generate_manpage.yml +++ b/.github/workflows/generate_manpage.yml @@ -23,8 +23,8 @@ jobs: - name: Build Podman image run: | - podman build -t convert2rhel-manpages -f Containerfile . + podman build -t manpage_check -f Containerfile . - name: Run Podman container run: | - podman run --rm convert2rhel-manpages + podman run --rm manpage_check From b8dbd5b2de6f547d453c39d8ff9a86984b52e346 Mon Sep 17 00:00:00 2001 From: Andrew Anglin Date: Sun, 24 Nov 2024 05:12:10 -0500 Subject: [PATCH 15/71] fixed the containerfiles dir spelling in the action --- .github/workflows/generate_manpage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/generate_manpage.yml b/.github/workflows/generate_manpage.yml index f2687a5d36..d627ccff88 100644 --- a/.github/workflows/generate_manpage.yml +++ b/.github/workflows/generate_manpage.yml @@ -23,7 +23,7 @@ jobs: - name: Build Podman image run: | - podman build -t manpage_check -f Containerfile . + podman build -t manpage_check -f Containerfiles . - name: Run Podman container run: | From 39e6fd775afb585cb739a5ebfb39ff76a9313189 Mon Sep 17 00:00:00 2001 From: Andrew Anglin Date: Sun, 24 Nov 2024 05:19:34 -0500 Subject: [PATCH 16/71] draft specfied the container file path --- .github/workflows/generate_manpage.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/generate_manpage.yml b/.github/workflows/generate_manpage.yml index d627ccff88..e7228ed1bf 100644 --- a/.github/workflows/generate_manpage.yml +++ b/.github/workflows/generate_manpage.yml @@ -23,8 +23,8 @@ jobs: - name: Build Podman image run: | - podman build -t manpage_check -f Containerfiles . + podman build -t convert2rhel-manpages -f Containerfiles/manpage_check.Containerfile . - name: Run Podman container run: | - podman run --rm manpage_check + podman run --rm convert2rhel-manpages From 2c92f8ab98ec178562b89ffee1b3454fd5587a1d Mon Sep 17 00:00:00 2001 From: Andrew Anglin Date: Sun, 24 Nov 2024 05:28:59 -0500 Subject: [PATCH 17/71] draft added in a virtual enviorment to the container --- Containerfiles/manpage_check.Containerfile | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Containerfiles/manpage_check.Containerfile b/Containerfiles/manpage_check.Containerfile index 07156bb670..63fa714d70 100644 --- a/Containerfiles/manpage_check.Containerfile +++ b/Containerfiles/manpage_check.Containerfile @@ -4,15 +4,19 @@ FROM ubuntu:latest # Install system dependencies RUN apt-get update && apt-get install -y \ python3 \ - python3-pip \ + python3-venv \ rpm \ python3-rpm \ build-essential \ libpopt-dev -# Install Python packages -RUN python3 -m pip install --upgrade pip -RUN pip3 install pexpect argparse-manpage +# Create and activate a virtual environment +RUN python3 -m venv /venv +ENV PATH="/venv/bin:$PATH" + +# Install Python packages in the virtual environment +RUN pip install --upgrade pip +RUN pip install pexpect argparse-manpage # Set the working directory WORKDIR /app From 424f1de2fb792719f9d25425c37659213a4c6185 Mon Sep 17 00:00:00 2001 From: Andrew Anglin Date: Sun, 24 Nov 2024 05:35:55 -0500 Subject: [PATCH 18/71] draft set the path for the manpage_generation.sh file --- Containerfiles/manpage_check.Containerfile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Containerfiles/manpage_check.Containerfile b/Containerfiles/manpage_check.Containerfile index 63fa714d70..93fd4887e0 100644 --- a/Containerfiles/manpage_check.Containerfile +++ b/Containerfiles/manpage_check.Containerfile @@ -24,8 +24,11 @@ WORKDIR /app # Copy the project files into the container COPY . /app -# Set up entrypoint to run manpage_generation.sh -COPY manpage_generation.sh /app/ +# Copy manpage_generation.sh from the scripts directory into the container +COPY scripts/manpage_generation.sh /app/ + +# Ensure the script is executable RUN chmod +x /app/manpage_generation.sh +# Set up entrypoint to run manpage_generation.sh ENTRYPOINT ["/app/manpage_generation.sh"] From 6665577287daf68ebcbf8363a5f84eb258d714c8 Mon Sep 17 00:00:00 2001 From: Andrew Anglin Date: Sun, 24 Nov 2024 05:43:57 -0500 Subject: [PATCH 19/71] draft added in git and libpopt-dev in the install --- Containerfiles/manpage_check.Containerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Containerfiles/manpage_check.Containerfile b/Containerfiles/manpage_check.Containerfile index 93fd4887e0..91cbc9f865 100644 --- a/Containerfiles/manpage_check.Containerfile +++ b/Containerfiles/manpage_check.Containerfile @@ -8,7 +8,8 @@ RUN apt-get update && apt-get install -y \ rpm \ python3-rpm \ build-essential \ - libpopt-dev + libpopt-dev \ + git # Create and activate a virtual environment RUN python3 -m venv /venv From 3ee77a902dc90b97160afd9138eac7c1f5aea210 Mon Sep 17 00:00:00 2001 From: Andrew Anglin Date: Sun, 24 Nov 2024 05:49:52 -0500 Subject: [PATCH 20/71] draft installing rpm in the virtual env --- Containerfiles/manpage_check.Containerfile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Containerfiles/manpage_check.Containerfile b/Containerfiles/manpage_check.Containerfile index 91cbc9f865..ee68cc3c26 100644 --- a/Containerfiles/manpage_check.Containerfile +++ b/Containerfiles/manpage_check.Containerfile @@ -6,7 +6,7 @@ RUN apt-get update && apt-get install -y \ python3 \ python3-venv \ rpm \ - python3-rpm \ + librpm-dev \ build-essential \ libpopt-dev \ git @@ -19,6 +19,10 @@ ENV PATH="/venv/bin:$PATH" RUN pip install --upgrade pip RUN pip install pexpect argparse-manpage +# Install rpm-python bindings using pip within the virtual environment +RUN pip install rpm-py-installer +RUN rpm_py_installer --install-latest + # Set the working directory WORKDIR /app From 5746eae1f4c0b0caaa93f95f82f2d63d6834769f Mon Sep 17 00:00:00 2001 From: Andrew Anglin Date: Sun, 24 Nov 2024 05:57:44 -0500 Subject: [PATCH 21/71] draft install python dev headers --- Containerfiles/manpage_check.Containerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Containerfiles/manpage_check.Containerfile b/Containerfiles/manpage_check.Containerfile index ee68cc3c26..5b14203399 100644 --- a/Containerfiles/manpage_check.Containerfile +++ b/Containerfiles/manpage_check.Containerfile @@ -5,6 +5,7 @@ FROM ubuntu:latest RUN apt-get update && apt-get install -y \ python3 \ python3-venv \ + python3-dev \ rpm \ librpm-dev \ build-essential \ From da0033fc354024e041bbe9be215e7bfe2b6e31c6 Mon Sep 17 00:00:00 2001 From: Andrew Anglin Date: Sun, 24 Nov 2024 06:02:13 -0500 Subject: [PATCH 22/71] removing the rpm_py_installer --- Containerfiles/manpage_check.Containerfile | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Containerfiles/manpage_check.Containerfile b/Containerfiles/manpage_check.Containerfile index 5b14203399..c6a5237701 100644 --- a/Containerfiles/manpage_check.Containerfile +++ b/Containerfiles/manpage_check.Containerfile @@ -20,10 +20,6 @@ ENV PATH="/venv/bin:$PATH" RUN pip install --upgrade pip RUN pip install pexpect argparse-manpage -# Install rpm-python bindings using pip within the virtual environment -RUN pip install rpm-py-installer -RUN rpm_py_installer --install-latest - # Set the working directory WORKDIR /app From 752aeb439fdb791247c840283471873299832dbf Mon Sep 17 00:00:00 2001 From: Andrew Anglin Date: Sun, 24 Nov 2024 06:08:11 -0500 Subject: [PATCH 23/71] draft install python3-rpm system wide --- Containerfiles/manpage_check.Containerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Containerfiles/manpage_check.Containerfile b/Containerfiles/manpage_check.Containerfile index c6a5237701..da3f3578dd 100644 --- a/Containerfiles/manpage_check.Containerfile +++ b/Containerfiles/manpage_check.Containerfile @@ -7,6 +7,7 @@ RUN apt-get update && apt-get install -y \ python3-venv \ python3-dev \ rpm \ + python3-rpm \ librpm-dev \ build-essential \ libpopt-dev \ From a2d3579dddd56c4a65f65fff935b12adfc428a44 Mon Sep 17 00:00:00 2001 From: Andrew Anglin Date: Sun, 24 Nov 2024 06:12:11 -0500 Subject: [PATCH 24/71] draft using a pre-configured base image --- Containerfiles/manpage_check.Containerfile | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/Containerfiles/manpage_check.Containerfile b/Containerfiles/manpage_check.Containerfile index da3f3578dd..8b7942943d 100644 --- a/Containerfiles/manpage_check.Containerfile +++ b/Containerfiles/manpage_check.Containerfile @@ -1,17 +1,14 @@ -# Use the latest Ubuntu image as the base -FROM ubuntu:latest +# Use a pre-configured image that includes rpm-python +FROM quay.io/fedora/fedora:latest # Install system dependencies -RUN apt-get update && apt-get install -y \ +RUN dnf install -y \ python3 \ + python3-pip \ python3-venv \ - python3-dev \ - rpm \ - python3-rpm \ - librpm-dev \ - build-essential \ - libpopt-dev \ - git + rpm-devel \ + git \ + && dnf clean all # Create and activate a virtual environment RUN python3 -m venv /venv From 001fbde39f7a4173caf23fd2246c23b6a4cc0e3e Mon Sep 17 00:00:00 2001 From: Andrew Anglin Date: Sun, 24 Nov 2024 06:21:07 -0500 Subject: [PATCH 25/71] draft changed out the virtual env being installed --- Containerfiles/manpage_check.Containerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Containerfiles/manpage_check.Containerfile b/Containerfiles/manpage_check.Containerfile index 8b7942943d..30088ec246 100644 --- a/Containerfiles/manpage_check.Containerfile +++ b/Containerfiles/manpage_check.Containerfile @@ -1,11 +1,11 @@ -# Use a pre-configured image that includes rpm-python +# Use the latest Fedora image as the base FROM quay.io/fedora/fedora:latest # Install system dependencies RUN dnf install -y \ python3 \ python3-pip \ - python3-venv \ + python3-virtualenv \ rpm-devel \ git \ && dnf clean all From 512bff3c54ade621c95ffa577dfe222e16d1952c Mon Sep 17 00:00:00 2001 From: Andrew Anglin Date: Sun, 24 Nov 2024 06:25:43 -0500 Subject: [PATCH 26/71] draft more installations for rpm --- Containerfiles/manpage_check.Containerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Containerfiles/manpage_check.Containerfile b/Containerfiles/manpage_check.Containerfile index 30088ec246..7dd33ab60e 100644 --- a/Containerfiles/manpage_check.Containerfile +++ b/Containerfiles/manpage_check.Containerfile @@ -6,7 +6,9 @@ RUN dnf install -y \ python3 \ python3-pip \ python3-virtualenv \ + python3-devel \ rpm-devel \ + rpm-python \ git \ && dnf clean all From e7b219f799cc2c2450e88771eeb7088a86e8f780 Mon Sep 17 00:00:00 2001 From: Andrew Anglin Date: Mon, 25 Nov 2024 03:57:48 -0500 Subject: [PATCH 27/71] removed the virtual envorment --- Containerfiles/manpage_check.Containerfile | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/Containerfiles/manpage_check.Containerfile b/Containerfiles/manpage_check.Containerfile index 7dd33ab60e..fde17e072a 100644 --- a/Containerfiles/manpage_check.Containerfile +++ b/Containerfiles/manpage_check.Containerfile @@ -5,20 +5,15 @@ FROM quay.io/fedora/fedora:latest RUN dnf install -y \ python3 \ python3-pip \ - python3-virtualenv \ python3-devel \ rpm-devel \ rpm-python \ git \ && dnf clean all -# Create and activate a virtual environment -RUN python3 -m venv /venv -ENV PATH="/venv/bin:$PATH" - -# Install Python packages in the virtual environment -RUN pip install --upgrade pip -RUN pip install pexpect argparse-manpage +# Install Python packages +RUN pip3 install --upgrade pip +RUN pip3 install pexpect argparse-manpage # Set the working directory WORKDIR /app From 6b772ee9683a01bfe9fe20a20d0776c289a1dc07 Mon Sep 17 00:00:00 2001 From: Andrew Anglin Date: Mon, 25 Nov 2024 04:02:18 -0500 Subject: [PATCH 28/71] changed from using rpm-python to python3-rpm --- Containerfiles/manpage_check.Containerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Containerfiles/manpage_check.Containerfile b/Containerfiles/manpage_check.Containerfile index fde17e072a..ace410cf8e 100644 --- a/Containerfiles/manpage_check.Containerfile +++ b/Containerfiles/manpage_check.Containerfile @@ -7,7 +7,7 @@ RUN dnf install -y \ python3-pip \ python3-devel \ rpm-devel \ - rpm-python \ + python3-rpm \ git \ && dnf clean all From 5e95a96373c9dff7be882ea4bff22a05c851e4a8 Mon Sep 17 00:00:00 2001 From: Andrew Anglin Date: Mon, 25 Nov 2024 04:05:37 -0500 Subject: [PATCH 29/71] added in six into the packages to be installed --- Containerfiles/manpage_check.Containerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Containerfiles/manpage_check.Containerfile b/Containerfiles/manpage_check.Containerfile index ace410cf8e..82e18cc1e0 100644 --- a/Containerfiles/manpage_check.Containerfile +++ b/Containerfiles/manpage_check.Containerfile @@ -13,7 +13,7 @@ RUN dnf install -y \ # Install Python packages RUN pip3 install --upgrade pip -RUN pip3 install pexpect argparse-manpage +RUN pip3 install pexpect argparse-manpage six # Set the working directory WORKDIR /app From 46750a717045120a0b1a15abc433dd4a57316128 Mon Sep 17 00:00:00 2001 From: Andrew Anglin Date: Mon, 25 Nov 2024 04:25:07 -0500 Subject: [PATCH 30/71] Added in getting the current config file into the container --- Containerfiles/manpage_check.Containerfile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Containerfiles/manpage_check.Containerfile b/Containerfiles/manpage_check.Containerfile index 82e18cc1e0..58ae50b3f6 100644 --- a/Containerfiles/manpage_check.Containerfile +++ b/Containerfiles/manpage_check.Containerfile @@ -13,7 +13,7 @@ RUN dnf install -y \ # Install Python packages RUN pip3 install --upgrade pip -RUN pip3 install pexpect argparse-manpage six +RUN pip3 install pexpect argparse-manpage # Set the working directory WORKDIR /app @@ -21,6 +21,9 @@ WORKDIR /app # Copy the project files into the container COPY . /app +# Copy the existing configuration file into the container +COPY /path/to/existing/config.ini /etc/convert2rhel/config.ini + # Copy manpage_generation.sh from the scripts directory into the container COPY scripts/manpage_generation.sh /app/ From 88f95851dada583fefc0183e3614b05226ab1746 Mon Sep 17 00:00:00 2001 From: Andrew Anglin Date: Mon, 25 Nov 2024 04:28:07 -0500 Subject: [PATCH 31/71] added in a check to see if the config file is there --- scripts/manpage_generation.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/scripts/manpage_generation.sh b/scripts/manpage_generation.sh index 953f4df594..a2e2405a47 100755 --- a/scripts/manpage_generation.sh +++ b/scripts/manpage_generation.sh @@ -8,6 +8,15 @@ mkdir -p "$MANPAGE_DIR" echo "Generating manpages" +# Check if the configuration file exists +CONFIG_FILE="/path/to/existing/config.ini" +if [ -f "$CONFIG_FILE" ]; then + echo "Configuration file found: $CONFIG_FILE" +else + echo "Configuration file not found: $CONFIG_FILE" + exit 1 +fi + # Generate a file with convert2rhel synopsis for argparse-manpage python -c 'from convert2rhel import toolopts; print("[synopsis]\n."+toolopts.CLI.usage())' > "$MANPAGE_DIR/synopsis" @@ -18,7 +27,6 @@ echo "Current version: $CURRENT_VER" # Generate the manpage using argparse-manpage PYTHONPATH=. argparse-manpage --pyfile man/__init__.py --function get_parser --manual-title="General Commands Manual" --description="Automates the conversion of Red Hat Enterprise Linux derivative distributions to Red Hat Enterprise Linux." --project-name "convert2rhel $CURRENT_VER" --prog="convert2rhel" --include man/distribution --include man/synopsis > "$MANPAGE_DIR/convert2rhel.8" - # Check for differences in the generated manpage if ! git diff --quiet HEAD -- "$MANPAGE_DIR/convert2rhel.8"; then echo "Manpages are outdated. Please update them." From 890a422eb2d3bd2c5c75805257c133edd072677d Mon Sep 17 00:00:00 2001 From: Andrew Anglin Date: Mon, 25 Nov 2024 04:33:42 -0500 Subject: [PATCH 32/71] added in the path for the config file --- Containerfiles/manpage_check.Containerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Containerfiles/manpage_check.Containerfile b/Containerfiles/manpage_check.Containerfile index 58ae50b3f6..7c167907c4 100644 --- a/Containerfiles/manpage_check.Containerfile +++ b/Containerfiles/manpage_check.Containerfile @@ -22,7 +22,7 @@ WORKDIR /app COPY . /app # Copy the existing configuration file into the container -COPY /path/to/existing/config.ini /etc/convert2rhel/config.ini +COPY config/config.ini /etc/convert2rhel/config.ini # Copy manpage_generation.sh from the scripts directory into the container COPY scripts/manpage_generation.sh /app/ From 7bc90144e4819e67c90557e4cd28ad843b4c5b50 Mon Sep 17 00:00:00 2001 From: Andrew Anglin Date: Mon, 25 Nov 2024 04:37:35 -0500 Subject: [PATCH 33/71] edited the config.ini files path --- Containerfiles/manpage_check.Containerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Containerfiles/manpage_check.Containerfile b/Containerfiles/manpage_check.Containerfile index 7c167907c4..f05793750b 100644 --- a/Containerfiles/manpage_check.Containerfile +++ b/Containerfiles/manpage_check.Containerfile @@ -22,7 +22,7 @@ WORKDIR /app COPY . /app # Copy the existing configuration file into the container -COPY config/config.ini /etc/convert2rhel/config.ini +COPY /home/runner/work/convert2rhel/convert2rhel/config/config.ini /etc/convert2rhel/config.ini # Copy manpage_generation.sh from the scripts directory into the container COPY scripts/manpage_generation.sh /app/ From 5168edbc270ce7e02d412e6a542ce1b27a77adc7 Mon Sep 17 00:00:00 2001 From: Andrew Anglin Date: Mon, 25 Nov 2024 04:47:39 -0500 Subject: [PATCH 34/71] another fix for the path --- Containerfiles/manpage_check.Containerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Containerfiles/manpage_check.Containerfile b/Containerfiles/manpage_check.Containerfile index f05793750b..7c167907c4 100644 --- a/Containerfiles/manpage_check.Containerfile +++ b/Containerfiles/manpage_check.Containerfile @@ -22,7 +22,7 @@ WORKDIR /app COPY . /app # Copy the existing configuration file into the container -COPY /home/runner/work/convert2rhel/convert2rhel/config/config.ini /etc/convert2rhel/config.ini +COPY config/config.ini /etc/convert2rhel/config.ini # Copy manpage_generation.sh from the scripts directory into the container COPY scripts/manpage_generation.sh /app/ From 1ceefafe6dd0e81f020d39abb3fe75cb88a457cb Mon Sep 17 00:00:00 2001 From: Andrew Anglin Date: Mon, 25 Nov 2024 06:29:13 -0500 Subject: [PATCH 35/71] draft change the path --- Containerfiles/manpage_check.Containerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Containerfiles/manpage_check.Containerfile b/Containerfiles/manpage_check.Containerfile index 7c167907c4..aa7a009106 100644 --- a/Containerfiles/manpage_check.Containerfile +++ b/Containerfiles/manpage_check.Containerfile @@ -21,8 +21,8 @@ WORKDIR /app # Copy the project files into the container COPY . /app -# Copy the existing configuration file into the container -COPY config/config.ini /etc/convert2rhel/config.ini +# Copy the convert2rhel.ini configuration file into the container +COPY config/convert2rhel.ini /etc/convert2rhel/convert2rhel.ini # Copy manpage_generation.sh from the scripts directory into the container COPY scripts/manpage_generation.sh /app/ From 8fcf22d0fa6407a755a8b3fcc7d06e769bb07452 Mon Sep 17 00:00:00 2001 From: Andrew Anglin Date: Mon, 25 Nov 2024 06:37:36 -0500 Subject: [PATCH 36/71] draft removed the check for the ini file --- scripts/manpage_generation.sh | 9 --------- 1 file changed, 9 deletions(-) diff --git a/scripts/manpage_generation.sh b/scripts/manpage_generation.sh index a2e2405a47..8b1b5766fd 100755 --- a/scripts/manpage_generation.sh +++ b/scripts/manpage_generation.sh @@ -8,15 +8,6 @@ mkdir -p "$MANPAGE_DIR" echo "Generating manpages" -# Check if the configuration file exists -CONFIG_FILE="/path/to/existing/config.ini" -if [ -f "$CONFIG_FILE" ]; then - echo "Configuration file found: $CONFIG_FILE" -else - echo "Configuration file not found: $CONFIG_FILE" - exit 1 -fi - # Generate a file with convert2rhel synopsis for argparse-manpage python -c 'from convert2rhel import toolopts; print("[synopsis]\n."+toolopts.CLI.usage())' > "$MANPAGE_DIR/synopsis" From 89924ca6c1718b67f5565a427c01cb5fd0306815 Mon Sep 17 00:00:00 2001 From: Andrew Anglin Date: Mon, 25 Nov 2024 06:41:42 -0500 Subject: [PATCH 37/71] draft readded back the install for six --- Containerfiles/manpage_check.Containerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Containerfiles/manpage_check.Containerfile b/Containerfiles/manpage_check.Containerfile index aa7a009106..a37f59f641 100644 --- a/Containerfiles/manpage_check.Containerfile +++ b/Containerfiles/manpage_check.Containerfile @@ -13,7 +13,7 @@ RUN dnf install -y \ # Install Python packages RUN pip3 install --upgrade pip -RUN pip3 install pexpect argparse-manpage +RUN pip3 install pexpect argparse-manpage six # Set the working directory WORKDIR /app From 71e912d3dffa2187c8ca5f64a196dc25e8e5c5b0 Mon Sep 17 00:00:00 2001 From: Andrew Anglin Date: Mon, 25 Nov 2024 13:15:52 -0500 Subject: [PATCH 38/71] draft fix the import for utils.py --- convert2rhel/utils/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/convert2rhel/utils/__init__.py b/convert2rhel/utils/__init__.py index 6d23a3fef0..1fd61c4f6c 100644 --- a/convert2rhel/utils/__init__.py +++ b/convert2rhel/utils/__init__.py @@ -40,7 +40,7 @@ from convert2rhel import exceptions, i18n from convert2rhel.logger import root_logger -from convert2rhel.toolopts import tool_opts +from convert2rhel.toolopts.__init__ import tool_opts logger = root_logger.getChild(__name__) From d4d9c913741241b8e47b2d6d976a1bc14669acea Mon Sep 17 00:00:00 2001 From: Andrew Anglin Date: Mon, 25 Nov 2024 15:52:13 -0500 Subject: [PATCH 39/71] fixed the imprort for tool_opts in cli.py --- convert2rhel/cli.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/convert2rhel/cli.py b/convert2rhel/cli.py index 6f74bf87c6..13b6932897 100644 --- a/convert2rhel/cli.py +++ b/convert2rhel/cli.py @@ -23,7 +23,7 @@ import sys from convert2rhel import __version__, utils -from convert2rhel.toolopts import tool_opts +from convert2rhel.toolopts.__init__ import tool_opts from convert2rhel.toolopts.config import CliConfig, FileConfig from convert2rhel.utils.rpm import PRE_RPM_VA_LOG_FILENAME, POST_RPM_VA_LOG_FILENAME From bf98f7032d29c21743fe1578329aee746faceb45 Mon Sep 17 00:00:00 2001 From: Andrew Anglin Date: Mon, 25 Nov 2024 16:26:37 -0500 Subject: [PATCH 40/71] draft check to see the path for the config file --- convert2rhel/toolopts/config.py | 1 + 1 file changed, 1 insertion(+) diff --git a/convert2rhel/toolopts/config.py b/convert2rhel/toolopts/config.py index 8c6cac6635..7d75bd9c65 100644 --- a/convert2rhel/toolopts/config.py +++ b/convert2rhel/toolopts/config.py @@ -133,6 +133,7 @@ def options_from_config_files(self): # (meaning that the user entered something through the `-c` option), we # will use only that, as it has a higher priority over the rest paths = [os.path.expanduser(path) for path in self._config_files if os.path.exists(os.path.expanduser(path))] + print(paths) if not paths: raise FileNotFoundError("No such file or directory: {}".format(", ".join(paths))) From 27c5eecfe69d26934affd86b1ffbf2e8b36254f8 Mon Sep 17 00:00:00 2001 From: Andrew Anglin Date: Tue, 26 Nov 2024 17:17:06 -0500 Subject: [PATCH 41/71] draft changed to do all of the work in the action --- .github/workflows/generate_manpage.yml | 46 ++++++++++++++++++++++---- 1 file changed, 39 insertions(+), 7 deletions(-) diff --git a/.github/workflows/generate_manpage.yml b/.github/workflows/generate_manpage.yml index e7228ed1bf..1f7d0d59a5 100644 --- a/.github/workflows/generate_manpage.yml +++ b/.github/workflows/generate_manpage.yml @@ -16,15 +16,47 @@ jobs: - name: Checkout code uses: actions/checkout@v4 - - name: Install Podman + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: '3.x' + + - name: Install dependencies run: | sudo apt-get update - sudo apt-get -y install podman + sudo apt-get install -y python3-pip python3-venv rpm rpm-python + python3 -m venv venv + source venv/bin/activate + pip install --upgrade pip + pip install pexpect argparse-manpage - - name: Build Podman image + - name: Generate manpages run: | - podman build -t convert2rhel-manpages -f Containerfiles/manpage_check.Containerfile . + set -e - - name: Run Podman container - run: | - podman run --rm convert2rhel-manpages + # Directory to store the generated manpages + MANPAGE_DIR='man' + + # Ensure the manpage directory exists + mkdir -p "$MANPAGE_DIR" + + echo 'Generating manpages' + + # Generate a file with convert2rhel synopsis for argparse-manpage + python -c 'from convert2rhel import toolopts; print("[synopsis]\n."+toolopts.CLI.usage())' > "$MANPAGE_DIR/synopsis" + + # Extract the current version from the spec file + CURRENT_VER=$(grep -oP '^Version:\s+\K\S+' packaging/convert2rhel.spec) + echo 'Current version: $CURRENT_VER' + + # Generate the manpage using argparse-manpage + PYTHONPATH=. argparse-manpage --pyfile man/__init__.py --function get_parser --manual-title='General Commands Manual' --description='Automates the conversion of Red Hat Enterprise Linux derivative distributions to Red Hat Enterprise Linux.' --project-name 'convert2rhel $CURRENT_VER' --prog='convert2rhel' --include man/distribution --include man/synopsis > "$MANPAGE_DIR/convert2rhel.8" + + # Check for differences in the generated manpage + if ! git diff --quiet HEAD -- "$MANPAGE_DIR/convert2rhel.8"; then + echo 'Manpages are outdated. Please update them.' + exit 1 + else + echo 'Manpages are up-to-date.' + exit 0 + fi From d4dadff2273669def3a66d219233abd716ba0c3e Mon Sep 17 00:00:00 2001 From: Andrew Anglin Date: Tue, 26 Nov 2024 17:19:16 -0500 Subject: [PATCH 42/71] removed the installation of rpm-python --- .github/workflows/generate_manpage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/generate_manpage.yml b/.github/workflows/generate_manpage.yml index 1f7d0d59a5..7ae87bb923 100644 --- a/.github/workflows/generate_manpage.yml +++ b/.github/workflows/generate_manpage.yml @@ -24,7 +24,7 @@ jobs: - name: Install dependencies run: | sudo apt-get update - sudo apt-get install -y python3-pip python3-venv rpm rpm-python + sudo apt-get install -y python3-pip python3-venv rpm python3 -m venv venv source venv/bin/activate pip install --upgrade pip From b0e632757fc407c46ceded01aa86b64d5d730d50 Mon Sep 17 00:00:00 2001 From: Andrew Anglin Date: Tue, 26 Nov 2024 17:28:19 -0500 Subject: [PATCH 43/71] Removed the virtual enviorment as its not needed --- .github/workflows/generate_manpage.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/generate_manpage.yml b/.github/workflows/generate_manpage.yml index 7ae87bb923..8cb1a1f5b6 100644 --- a/.github/workflows/generate_manpage.yml +++ b/.github/workflows/generate_manpage.yml @@ -24,9 +24,7 @@ jobs: - name: Install dependencies run: | sudo apt-get update - sudo apt-get install -y python3-pip python3-venv rpm - python3 -m venv venv - source venv/bin/activate + sudo apt-get install -y python3-pip rpm pip install --upgrade pip pip install pexpect argparse-manpage @@ -59,4 +57,3 @@ jobs: else echo 'Manpages are up-to-date.' exit 0 - fi From 632ee69fced90cbee9d4b66170b9c1c036e32cfa Mon Sep 17 00:00:00 2001 From: Andrew Anglin Date: Tue, 26 Nov 2024 17:50:09 -0500 Subject: [PATCH 44/71] added in a check to see if pexpect is in the action --- .github/workflows/generate_manpage.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/generate_manpage.yml b/.github/workflows/generate_manpage.yml index 8cb1a1f5b6..024a21bd74 100644 --- a/.github/workflows/generate_manpage.yml +++ b/.github/workflows/generate_manpage.yml @@ -28,6 +28,11 @@ jobs: pip install --upgrade pip pip install pexpect argparse-manpage + - name: Verify Python Path + run: | + python -c "import sys; print(sys.path)" + python -c "import pexpect; print('pexpect module is available.')" + - name: Generate manpages run: | set -e @@ -57,3 +62,4 @@ jobs: else echo 'Manpages are up-to-date.' exit 0 + fi From 7dbc24d5eef618360305e1c33784bb4903fe1b97 Mon Sep 17 00:00:00 2001 From: Andrew Anglin Date: Tue, 26 Nov 2024 18:01:31 -0500 Subject: [PATCH 45/71] added in the verification for rpm --- .github/workflows/generate_manpage.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/generate_manpage.yml b/.github/workflows/generate_manpage.yml index 024a21bd74..2f4ed9ab63 100644 --- a/.github/workflows/generate_manpage.yml +++ b/.github/workflows/generate_manpage.yml @@ -24,7 +24,7 @@ jobs: - name: Install dependencies run: | sudo apt-get update - sudo apt-get install -y python3-pip rpm + sudo apt-get install -y python3-pip rpm rpm-python rpm-python3 rpm-devel pip install --upgrade pip pip install pexpect argparse-manpage @@ -32,6 +32,7 @@ jobs: run: | python -c "import sys; print(sys.path)" python -c "import pexpect; print('pexpect module is available.')" + python -c "import rpm; print('rpm module is available.')" - name: Generate manpages run: | From e5325dacf3e65e07865fb9c3dcdb3f84eec0c4e1 Mon Sep 17 00:00:00 2001 From: Andrew Anglin Date: Tue, 26 Nov 2024 18:32:03 -0500 Subject: [PATCH 46/71] added universe repo as it has the packages --- .github/workflows/generate_manpage.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/generate_manpage.yml b/.github/workflows/generate_manpage.yml index 2f4ed9ab63..0c5b730008 100644 --- a/.github/workflows/generate_manpage.yml +++ b/.github/workflows/generate_manpage.yml @@ -21,9 +21,13 @@ jobs: with: python-version: '3.x' - - name: Install dependencies + - name: Add Universe Repository run: | + sudo add-apt-repository universe sudo apt-get update + + - name: Install dependencies + run: | sudo apt-get install -y python3-pip rpm rpm-python rpm-python3 rpm-devel pip install --upgrade pip pip install pexpect argparse-manpage From 859773d610ebfd9b185dd6d65cf8a30eb72b22e7 Mon Sep 17 00:00:00 2001 From: Andrew Anglin Date: Tue, 26 Nov 2024 18:50:00 -0500 Subject: [PATCH 47/71] changed to use python3-rpm --- .github/workflows/generate_manpage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/generate_manpage.yml b/.github/workflows/generate_manpage.yml index 0c5b730008..58cbb68281 100644 --- a/.github/workflows/generate_manpage.yml +++ b/.github/workflows/generate_manpage.yml @@ -28,7 +28,7 @@ jobs: - name: Install dependencies run: | - sudo apt-get install -y python3-pip rpm rpm-python rpm-python3 rpm-devel + sudo apt-get install -y python3-pip rpm python3-rpm pip install --upgrade pip pip install pexpect argparse-manpage From d6fb1a7bef23564a4d2bca2e076c427c1cd09d86 Mon Sep 17 00:00:00 2001 From: Andrew Anglin Date: Tue, 26 Nov 2024 19:05:14 -0500 Subject: [PATCH 48/71] added a manuel install of rpm and python bindings --- .github/workflows/generate_manpage.yml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/generate_manpage.yml b/.github/workflows/generate_manpage.yml index 58cbb68281..3a4601ae72 100644 --- a/.github/workflows/generate_manpage.yml +++ b/.github/workflows/generate_manpage.yml @@ -21,16 +21,20 @@ jobs: with: python-version: '3.x' - - name: Add Universe Repository - run: | - sudo add-apt-repository universe - sudo apt-get update - - name: Install dependencies run: | - sudo apt-get install -y python3-pip rpm python3-rpm + sudo apt-get update + sudo apt-get install -y python3-pip rpm pip install --upgrade pip pip install pexpect argparse-manpage + wget http://ftp.rpm.org/releases/rpm-4.14.x/rpm-4.14.2.tar.bz2 + tar -xjf rpm-4.14.2.tar.bz2 + cd rpm-4.14.2 + ./configure --disable-nls --enable-python + make + sudo make install + cd python + python3 setup.py install - name: Verify Python Path run: | From 419689dae551d1d9720dc5157e042b23434dcf67 Mon Sep 17 00:00:00 2001 From: Andrew Anglin Date: Tue, 26 Nov 2024 19:20:52 -0500 Subject: [PATCH 49/71] added in the install NSPR and NSS development --- .github/workflows/generate_manpage.yml | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/.github/workflows/generate_manpage.yml b/.github/workflows/generate_manpage.yml index 3a4601ae72..4c2ec97514 100644 --- a/.github/workflows/generate_manpage.yml +++ b/.github/workflows/generate_manpage.yml @@ -23,18 +23,7 @@ jobs: - name: Install dependencies run: | - sudo apt-get update - sudo apt-get install -y python3-pip rpm - pip install --upgrade pip - pip install pexpect argparse-manpage - wget http://ftp.rpm.org/releases/rpm-4.14.x/rpm-4.14.2.tar.bz2 - tar -xjf rpm-4.14.2.tar.bz2 - cd rpm-4.14.2 - ./configure --disable-nls --enable-python - make - sudo make install - cd python - python3 setup.py install + sudo apt-get update sudo apt-get install -y python3-pip rpm libnspr4-dev libnss3-dev pip install --upgrade pip pip install pexpect argparse-manpage wget http://ftp.rpm.org/releases/rpm-4.14.x/rpm-4.14.2.tar.bz2 tar -xjf rpm-4.14.2.tar.bz2 cd rpm-4.14.2 ./configure --disable-nls --enable-python make sudo make install cd python python3 setup.py install - name: Verify Python Path run: | From 3efe1d61add3556dc5f4885f737b04883ad3307f Mon Sep 17 00:00:00 2001 From: Andrew Anglin Date: Tue, 26 Nov 2024 19:29:25 -0500 Subject: [PATCH 50/71] seperated commands to make sure they run properly --- .github/workflows/generate_manpage.yml | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/.github/workflows/generate_manpage.yml b/.github/workflows/generate_manpage.yml index 4c2ec97514..8c1e2f3d32 100644 --- a/.github/workflows/generate_manpage.yml +++ b/.github/workflows/generate_manpage.yml @@ -21,9 +21,27 @@ jobs: with: python-version: '3.x' + - name: Add Universe Repository + run: | + sudo add-apt-repository universe + sudo apt-get update + - name: Install dependencies run: | - sudo apt-get update sudo apt-get install -y python3-pip rpm libnspr4-dev libnss3-dev pip install --upgrade pip pip install pexpect argparse-manpage wget http://ftp.rpm.org/releases/rpm-4.14.x/rpm-4.14.2.tar.bz2 tar -xjf rpm-4.14.2.tar.bz2 cd rpm-4.14.2 ./configure --disable-nls --enable-python make sudo make install cd python python3 setup.py install + sudo apt-get install -y python3-pip rpm libnspr4-dev libnss3-dev + pip install --upgrade pip + pip install pexpect argparse-manpage + + - name: Download and install RPM + run: | + wget http://ftp.rpm.org/releases/rpm-4.14.x/rpm-4.14.2.tar.bz2 + tar -xjf rpm-4.14.2.tar.bz2 + cd rpm-4.14.2 + ./configure --disable-nls --enable-python + make + sudo make install + cd python + python3 setup.py install - name: Verify Python Path run: | From 045404abfafe23bb55db06657338d94c32e83d21 Mon Sep 17 00:00:00 2001 From: Andrew Anglin Date: Tue, 26 Nov 2024 19:35:27 -0500 Subject: [PATCH 51/71] added in the installation of libnpipt-dev --- .github/workflows/generate_manpage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/generate_manpage.yml b/.github/workflows/generate_manpage.yml index 8c1e2f3d32..a1580458d2 100644 --- a/.github/workflows/generate_manpage.yml +++ b/.github/workflows/generate_manpage.yml @@ -28,7 +28,7 @@ jobs: - name: Install dependencies run: | - sudo apt-get install -y python3-pip rpm libnspr4-dev libnss3-dev + sudo apt-get install -y python3-pip rpm libnspr4-dev libnss3-dev libpopt-dev pip install --upgrade pip pip install pexpect argparse-manpage From 184b95f570c79cec5730e15e02aa794b22f83c00 Mon Sep 17 00:00:00 2001 From: Andrew Anglin Date: Tue, 26 Nov 2024 19:50:36 -0500 Subject: [PATCH 52/71] added in libarchive-dev to get the rest of the packages --- .github/workflows/generate_manpage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/generate_manpage.yml b/.github/workflows/generate_manpage.yml index a1580458d2..68d71a299a 100644 --- a/.github/workflows/generate_manpage.yml +++ b/.github/workflows/generate_manpage.yml @@ -28,7 +28,7 @@ jobs: - name: Install dependencies run: | - sudo apt-get install -y python3-pip rpm libnspr4-dev libnss3-dev libpopt-dev + sudo apt-get install -y python3-pip rpm libnspr4-dev libnss3-dev libpopt-dev libarchive-dev pip install --upgrade pip pip install pexpect argparse-manpage From 5c8ace01e9d77038811e0c1db7b24bf704559c41 Mon Sep 17 00:00:00 2001 From: Andrew Anglin Date: Tue, 26 Nov 2024 19:54:41 -0500 Subject: [PATCH 53/71] added in libdb-dev for db.h --- .github/workflows/generate_manpage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/generate_manpage.yml b/.github/workflows/generate_manpage.yml index 68d71a299a..0bfac58820 100644 --- a/.github/workflows/generate_manpage.yml +++ b/.github/workflows/generate_manpage.yml @@ -28,7 +28,7 @@ jobs: - name: Install dependencies run: | - sudo apt-get install -y python3-pip rpm libnspr4-dev libnss3-dev libpopt-dev libarchive-dev + sudo apt-get install -y python3-pip rpm libnspr4-dev libnss3-dev libpopt-dev libarchive-dev libdb-dev pip install --upgrade pip pip install pexpect argparse-manpage From f702d2e1102a99b4b4a28da12c38e68c22b488b3 Mon Sep 17 00:00:00 2001 From: Andrew Anglin Date: Tue, 26 Nov 2024 19:58:50 -0500 Subject: [PATCH 54/71] set an updated version of python for 3.10 --- .github/workflows/generate_manpage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/generate_manpage.yml b/.github/workflows/generate_manpage.yml index 0bfac58820..c1b0489fc8 100644 --- a/.github/workflows/generate_manpage.yml +++ b/.github/workflows/generate_manpage.yml @@ -19,7 +19,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v2 with: - python-version: '3.x' + python-version: '3.10' - name: Add Universe Repository run: | From cd67883b5080518dcbd6af7b050ace42347e51f1 Mon Sep 17 00:00:00 2001 From: Andrew Anglin Date: Tue, 26 Nov 2024 20:03:22 -0500 Subject: [PATCH 55/71] added in setting the env vars per the action --- .github/workflows/generate_manpage.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/generate_manpage.yml b/.github/workflows/generate_manpage.yml index c1b0489fc8..b547f693e2 100644 --- a/.github/workflows/generate_manpage.yml +++ b/.github/workflows/generate_manpage.yml @@ -37,6 +37,9 @@ jobs: wget http://ftp.rpm.org/releases/rpm-4.14.x/rpm-4.14.2.tar.bz2 tar -xjf rpm-4.14.2.tar.bz2 cd rpm-4.14.2 + export PKG_CONFIG_PATH=/opt/hostedtoolcache/Python/3.10.0/x64/lib/pkgconfig + export PYTHON_CFLAGS="-I/opt/hostedtoolcache/Python/3.10.0/x64/include/python3.10" + export PYTHON_LIBS="-L/opt/hostedtoolcache/Python/3.10.0/x64/lib -lpython3.10" ./configure --disable-nls --enable-python make sudo make install From 874e81ac904ab6317531aa3c2b2dd7616029889d Mon Sep 17 00:00:00 2001 From: Andrew Anglin Date: Wed, 27 Nov 2024 09:00:32 -0500 Subject: [PATCH 56/71] added to the installations a way to disable lua --- .github/workflows/generate_manpage.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/generate_manpage.yml b/.github/workflows/generate_manpage.yml index b547f693e2..bf0ba697d7 100644 --- a/.github/workflows/generate_manpage.yml +++ b/.github/workflows/generate_manpage.yml @@ -19,7 +19,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v2 with: - python-version: '3.10' + python-version: '3.10' # Use Python 3.10 - name: Add Universe Repository run: | @@ -37,10 +37,10 @@ jobs: wget http://ftp.rpm.org/releases/rpm-4.14.x/rpm-4.14.2.tar.bz2 tar -xjf rpm-4.14.2.tar.bz2 cd rpm-4.14.2 - export PKG_CONFIG_PATH=/opt/hostedtoolcache/Python/3.10.0/x64/lib/pkgconfig - export PYTHON_CFLAGS="-I/opt/hostedtoolcache/Python/3.10.0/x64/include/python3.10" - export PYTHON_LIBS="-L/opt/hostedtoolcache/Python/3.10.0/x64/lib -lpython3.10" - ./configure --disable-nls --enable-python + export PKG_CONFIG_PATH=/opt/hostedtoolcache/Python/3.10.15/x64/lib/pkgconfig + export PYTHON_CFLAGS="-I/opt/hostedtoolcache/Python/3.10.15/x64/include/python3.10" + export PYTHON_LIBS="-L/opt/hostedtoolcache/Python/3.10.15/x64/lib -lpython3.10" + ./configure --disable-nls --enable-python --without-lua make sudo make install cd python From 37af56b840bb37f83813feb7aea936eb8017ca59 Mon Sep 17 00:00:00 2001 From: Andrew Anglin Date: Wed, 27 Nov 2024 09:25:05 -0500 Subject: [PATCH 57/71] drafr added the download for all the depencies for rpm --- .github/workflows/generate_manpage.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/generate_manpage.yml b/.github/workflows/generate_manpage.yml index bf0ba697d7..0d296ebe3a 100644 --- a/.github/workflows/generate_manpage.yml +++ b/.github/workflows/generate_manpage.yml @@ -19,7 +19,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v2 with: - python-version: '3.10' # Use Python 3.10 + python-version: '3.10' - name: Add Universe Repository run: | @@ -28,7 +28,8 @@ jobs: - name: Install dependencies run: | - sudo apt-get install -y python3-pip rpm libnspr4-dev libnss3-dev libpopt-dev libarchive-dev libdb-dev + sudo apt-get install -y python3-pip rpm libnspr4-dev libnss3-dev libpopt-dev libarchive-dev libdb-dev \ + autoconf automake bison flex gettext libtool pkg-config pip install --upgrade pip pip install pexpect argparse-manpage @@ -45,6 +46,7 @@ jobs: sudo make install cd python python3 setup.py install + sudo ldconfig - name: Verify Python Path run: | From b07b9461f0c67b0b76eb0f0cdfb95ad6bac739f5 Mon Sep 17 00:00:00 2001 From: Andrew Anglin Date: Wed, 27 Nov 2024 09:28:38 -0500 Subject: [PATCH 58/71] added in the install for six --- .github/workflows/generate_manpage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/generate_manpage.yml b/.github/workflows/generate_manpage.yml index 0d296ebe3a..a5e3622e34 100644 --- a/.github/workflows/generate_manpage.yml +++ b/.github/workflows/generate_manpage.yml @@ -31,7 +31,7 @@ jobs: sudo apt-get install -y python3-pip rpm libnspr4-dev libnss3-dev libpopt-dev libarchive-dev libdb-dev \ autoconf automake bison flex gettext libtool pkg-config pip install --upgrade pip - pip install pexpect argparse-manpage + pip install pexpect argparse-manpage six - name: Download and install RPM run: | From 92a478de6ac864508c7b22847da0c327a7fd05f9 Mon Sep 17 00:00:00 2001 From: Andrew Anglin Date: Wed, 27 Nov 2024 09:45:58 -0500 Subject: [PATCH 59/71] removed an extra "()" on line 138 --- convert2rhel/cli.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/convert2rhel/cli.py b/convert2rhel/cli.py index 13b6932897..959317b7f4 100644 --- a/convert2rhel/cli.py +++ b/convert2rhel/cli.py @@ -135,7 +135,7 @@ def _register_options(self): " to show you what rpm files have been affected by the conversion." " Cannot be used with analyze subcommand." " The incomplete_rollback option needs to be set to true in the /etc/convert2rhel.ini config file to" - " use this argument.".format((PRE_RPM_VA_LOG_FILENAME, POST_RPM_VA_LOG_FILENAME), + " use this argument.".format(PRE_RPM_VA_LOG_FILENAME, POST_RPM_VA_LOG_FILENAME), ) self._shared_options_parser.add_argument( "--eus", From 084e04ccf0573eec4bc5fa7df770d56f08297ceb Mon Sep 17 00:00:00 2001 From: Andrew Anglin Date: Wed, 27 Nov 2024 09:57:07 -0500 Subject: [PATCH 60/71] fixed the path for cli in the action --- .github/workflows/generate_manpage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/generate_manpage.yml b/.github/workflows/generate_manpage.yml index a5e3622e34..c015922a02 100644 --- a/.github/workflows/generate_manpage.yml +++ b/.github/workflows/generate_manpage.yml @@ -67,7 +67,7 @@ jobs: echo 'Generating manpages' # Generate a file with convert2rhel synopsis for argparse-manpage - python -c 'from convert2rhel import toolopts; print("[synopsis]\n."+toolopts.CLI.usage())' > "$MANPAGE_DIR/synopsis" + python -c 'from convert2rhel import toolopts; print("[synopsis]\n."+toolopts.cli.usage())' > "$MANPAGE_DIR/synopsis" # Extract the current version from the spec file CURRENT_VER=$(grep -oP '^Version:\s+\K\S+' packaging/convert2rhel.spec) From c1fac743f12eb0b4a555609ef38706db387de9a9 Mon Sep 17 00:00:00 2001 From: Andrew Anglin Date: Wed, 27 Nov 2024 10:01:00 -0500 Subject: [PATCH 61/71] fix the import for cli --- .github/workflows/generate_manpage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/generate_manpage.yml b/.github/workflows/generate_manpage.yml index c015922a02..761161ca1c 100644 --- a/.github/workflows/generate_manpage.yml +++ b/.github/workflows/generate_manpage.yml @@ -67,7 +67,7 @@ jobs: echo 'Generating manpages' # Generate a file with convert2rhel synopsis for argparse-manpage - python -c 'from convert2rhel import toolopts; print("[synopsis]\n."+toolopts.cli.usage())' > "$MANPAGE_DIR/synopsis" + python -c 'from convert2rhel import cli; print("[synopsis]\n."+cli.usage())' > "$MANPAGE_DIR/synopsis" # Extract the current version from the spec file CURRENT_VER=$(grep -oP '^Version:\s+\K\S+' packaging/convert2rhel.spec) From 5dd979aca1550ba4cc9a1f65ca288e127c2d98b3 Mon Sep 17 00:00:00 2001 From: Andrew Anglin Date: Wed, 27 Nov 2024 10:04:03 -0500 Subject: [PATCH 62/71] fixed the use of the class for cli --- .github/workflows/generate_manpage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/generate_manpage.yml b/.github/workflows/generate_manpage.yml index 761161ca1c..0bd7af2fab 100644 --- a/.github/workflows/generate_manpage.yml +++ b/.github/workflows/generate_manpage.yml @@ -67,7 +67,7 @@ jobs: echo 'Generating manpages' # Generate a file with convert2rhel synopsis for argparse-manpage - python -c 'from convert2rhel import cli; print("[synopsis]\n."+cli.usage())' > "$MANPAGE_DIR/synopsis" + python -c 'from convert2rhel import cli; print("[synopsis]\n."+CLI.usage())' > "$MANPAGE_DIR/synopsis" # Extract the current version from the spec file CURRENT_VER=$(grep -oP '^Version:\s+\K\S+' packaging/convert2rhel.spec) From 0794325010f26f5008a8b961d194146680807951 Mon Sep 17 00:00:00 2001 From: Andrew Anglin Date: Wed, 27 Nov 2024 11:50:55 -0500 Subject: [PATCH 63/71] reveted the recent change for the cli path --- .github/workflows/generate_manpage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/generate_manpage.yml b/.github/workflows/generate_manpage.yml index 0bd7af2fab..761161ca1c 100644 --- a/.github/workflows/generate_manpage.yml +++ b/.github/workflows/generate_manpage.yml @@ -67,7 +67,7 @@ jobs: echo 'Generating manpages' # Generate a file with convert2rhel synopsis for argparse-manpage - python -c 'from convert2rhel import cli; print("[synopsis]\n."+CLI.usage())' > "$MANPAGE_DIR/synopsis" + python -c 'from convert2rhel import cli; print("[synopsis]\n."+cli.usage())' > "$MANPAGE_DIR/synopsis" # Extract the current version from the spec file CURRENT_VER=$(grep -oP '^Version:\s+\K\S+' packaging/convert2rhel.spec) From 22b6c57a94c2ac240f4791db938646f4244d16e3 Mon Sep 17 00:00:00 2001 From: Andrew Anglin Date: Wed, 27 Nov 2024 12:08:57 -0500 Subject: [PATCH 64/71] added some debug messages to fix the issue --- .github/workflows/generate_manpage.yml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/generate_manpage.yml b/.github/workflows/generate_manpage.yml index 761161ca1c..b0f93f9abb 100644 --- a/.github/workflows/generate_manpage.yml +++ b/.github/workflows/generate_manpage.yml @@ -19,7 +19,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v2 with: - python-version: '3.10' + python-version: '3.10' # Use Python 3.10 - name: Add Universe Repository run: | @@ -31,7 +31,7 @@ jobs: sudo apt-get install -y python3-pip rpm libnspr4-dev libnss3-dev libpopt-dev libarchive-dev libdb-dev \ autoconf automake bison flex gettext libtool pkg-config pip install --upgrade pip - pip install pexpect argparse-manpage six + pip install pexpect argparse-manpage - name: Download and install RPM run: | @@ -46,13 +46,13 @@ jobs: sudo make install cd python python3 setup.py install - sudo ldconfig + sudo ldconfig # Update library path - name: Verify Python Path run: | python -c "import sys; print(sys.path)" python -c "import pexpect; print('pexpect module is available.')" - python -c "import rpm; print('rpm module is available.')" + python -c "import convert2rhel.cli as cli; print(dir(cli)); print(cli.CLI)" || exit 1 - name: Generate manpages run: | @@ -66,8 +66,11 @@ jobs: echo 'Generating manpages' + # Add debug statements + python -c 'import convert2rhel.cli as cli; print(dir(cli)); print(cli.CLI)' || exit 1 + # Generate a file with convert2rhel synopsis for argparse-manpage - python -c 'from convert2rhel import cli; print("[synopsis]\n."+cli.usage())' > "$MANPAGE_DIR/synopsis" + python -c 'from convert2rhel.cli import CLI; print("[synopsis]\n."+CLI.usage())' > "$MANPAGE_DIR/synopsis" # Extract the current version from the spec file CURRENT_VER=$(grep -oP '^Version:\s+\K\S+' packaging/convert2rhel.spec) @@ -83,4 +86,3 @@ jobs: else echo 'Manpages are up-to-date.' exit 0 - fi From 15052d9d5bc6a1223222e072a36a36e0eb15ae1c Mon Sep 17 00:00:00 2001 From: Andrew Anglin Date: Wed, 27 Nov 2024 12:59:15 -0500 Subject: [PATCH 65/71] added in six --- .github/workflows/generate_manpage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/generate_manpage.yml b/.github/workflows/generate_manpage.yml index b0f93f9abb..551fa1d89f 100644 --- a/.github/workflows/generate_manpage.yml +++ b/.github/workflows/generate_manpage.yml @@ -31,7 +31,7 @@ jobs: sudo apt-get install -y python3-pip rpm libnspr4-dev libnss3-dev libpopt-dev libarchive-dev libdb-dev \ autoconf automake bison flex gettext libtool pkg-config pip install --upgrade pip - pip install pexpect argparse-manpage + pip install pexpect argparse-manpage six - name: Download and install RPM run: | From 82a8924f90fc00b684e60080d59a882456675844 Mon Sep 17 00:00:00 2001 From: Andrew Anglin Date: Wed, 27 Nov 2024 13:02:21 -0500 Subject: [PATCH 66/71] reverted back to old commit --- .github/workflows/generate_manpage.yml | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/workflows/generate_manpage.yml b/.github/workflows/generate_manpage.yml index 551fa1d89f..761161ca1c 100644 --- a/.github/workflows/generate_manpage.yml +++ b/.github/workflows/generate_manpage.yml @@ -19,7 +19,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v2 with: - python-version: '3.10' # Use Python 3.10 + python-version: '3.10' - name: Add Universe Repository run: | @@ -46,13 +46,13 @@ jobs: sudo make install cd python python3 setup.py install - sudo ldconfig # Update library path + sudo ldconfig - name: Verify Python Path run: | python -c "import sys; print(sys.path)" python -c "import pexpect; print('pexpect module is available.')" - python -c "import convert2rhel.cli as cli; print(dir(cli)); print(cli.CLI)" || exit 1 + python -c "import rpm; print('rpm module is available.')" - name: Generate manpages run: | @@ -66,11 +66,8 @@ jobs: echo 'Generating manpages' - # Add debug statements - python -c 'import convert2rhel.cli as cli; print(dir(cli)); print(cli.CLI)' || exit 1 - # Generate a file with convert2rhel synopsis for argparse-manpage - python -c 'from convert2rhel.cli import CLI; print("[synopsis]\n."+CLI.usage())' > "$MANPAGE_DIR/synopsis" + python -c 'from convert2rhel import cli; print("[synopsis]\n."+cli.usage())' > "$MANPAGE_DIR/synopsis" # Extract the current version from the spec file CURRENT_VER=$(grep -oP '^Version:\s+\K\S+' packaging/convert2rhel.spec) @@ -86,3 +83,4 @@ jobs: else echo 'Manpages are up-to-date.' exit 0 + fi From b5f7d7a6d8c84d0c9a0bf3566f88d4e7103f59c5 Mon Sep 17 00:00:00 2001 From: Andrew Anglin Date: Wed, 27 Nov 2024 20:48:30 -0500 Subject: [PATCH 67/71] added in some debug statments --- .github/workflows/generate_manpage.yml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/generate_manpage.yml b/.github/workflows/generate_manpage.yml index 761161ca1c..b0f93f9abb 100644 --- a/.github/workflows/generate_manpage.yml +++ b/.github/workflows/generate_manpage.yml @@ -19,7 +19,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v2 with: - python-version: '3.10' + python-version: '3.10' # Use Python 3.10 - name: Add Universe Repository run: | @@ -31,7 +31,7 @@ jobs: sudo apt-get install -y python3-pip rpm libnspr4-dev libnss3-dev libpopt-dev libarchive-dev libdb-dev \ autoconf automake bison flex gettext libtool pkg-config pip install --upgrade pip - pip install pexpect argparse-manpage six + pip install pexpect argparse-manpage - name: Download and install RPM run: | @@ -46,13 +46,13 @@ jobs: sudo make install cd python python3 setup.py install - sudo ldconfig + sudo ldconfig # Update library path - name: Verify Python Path run: | python -c "import sys; print(sys.path)" python -c "import pexpect; print('pexpect module is available.')" - python -c "import rpm; print('rpm module is available.')" + python -c "import convert2rhel.cli as cli; print(dir(cli)); print(cli.CLI)" || exit 1 - name: Generate manpages run: | @@ -66,8 +66,11 @@ jobs: echo 'Generating manpages' + # Add debug statements + python -c 'import convert2rhel.cli as cli; print(dir(cli)); print(cli.CLI)' || exit 1 + # Generate a file with convert2rhel synopsis for argparse-manpage - python -c 'from convert2rhel import cli; print("[synopsis]\n."+cli.usage())' > "$MANPAGE_DIR/synopsis" + python -c 'from convert2rhel.cli import CLI; print("[synopsis]\n."+CLI.usage())' > "$MANPAGE_DIR/synopsis" # Extract the current version from the spec file CURRENT_VER=$(grep -oP '^Version:\s+\K\S+' packaging/convert2rhel.spec) @@ -83,4 +86,3 @@ jobs: else echo 'Manpages are up-to-date.' exit 0 - fi From 3a26cb095b6a70d88d2fb7e1b91a759905cc0a53 Mon Sep 17 00:00:00 2001 From: Andrew Anglin Date: Wed, 27 Nov 2024 21:00:17 -0500 Subject: [PATCH 68/71] added the install for six --- .github/workflows/generate_manpage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/generate_manpage.yml b/.github/workflows/generate_manpage.yml index b0f93f9abb..551fa1d89f 100644 --- a/.github/workflows/generate_manpage.yml +++ b/.github/workflows/generate_manpage.yml @@ -31,7 +31,7 @@ jobs: sudo apt-get install -y python3-pip rpm libnspr4-dev libnss3-dev libpopt-dev libarchive-dev libdb-dev \ autoconf automake bison flex gettext libtool pkg-config pip install --upgrade pip - pip install pexpect argparse-manpage + pip install pexpect argparse-manpage six - name: Download and install RPM run: | From e88f0dc0732de994b6204fd99a5b6dd43e7f7e2d Mon Sep 17 00:00:00 2001 From: Andrew Anglin Date: Wed, 27 Nov 2024 21:06:14 -0500 Subject: [PATCH 69/71] reverted back a bit * reveted back a bit because the action is failing with some old errors that were already fixed --- .github/workflows/generate_manpage.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/generate_manpage.yml b/.github/workflows/generate_manpage.yml index 551fa1d89f..43c604a4cd 100644 --- a/.github/workflows/generate_manpage.yml +++ b/.github/workflows/generate_manpage.yml @@ -19,7 +19,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v2 with: - python-version: '3.10' # Use Python 3.10 + python-version: '3.10' - name: Add Universe Repository run: | @@ -46,12 +46,16 @@ jobs: sudo make install cd python python3 setup.py install - sudo ldconfig # Update library path + sudo ldconfig - name: Verify Python Path run: | python -c "import sys; print(sys.path)" python -c "import pexpect; print('pexpect module is available.')" + python -c "import rpm; print('rpm module is available.')" + + - name: Debug CLI Attribute + run: | python -c "import convert2rhel.cli as cli; print(dir(cli)); print(cli.CLI)" || exit 1 - name: Generate manpages @@ -86,3 +90,4 @@ jobs: else echo 'Manpages are up-to-date.' exit 0 + fi From 33bd3a9996cd505d84df0914a8b6b8fbbf9d1062 Mon Sep 17 00:00:00 2001 From: Andrew Anglin Date: Tue, 3 Dec 2024 11:36:48 -0500 Subject: [PATCH 70/71] makes a balnk convert2rhel.ini file --- .github/workflows/generate_manpage.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/generate_manpage.yml b/.github/workflows/generate_manpage.yml index 43c604a4cd..6eb2e049a1 100644 --- a/.github/workflows/generate_manpage.yml +++ b/.github/workflows/generate_manpage.yml @@ -33,6 +33,11 @@ jobs: pip install --upgrade pip pip install pexpect argparse-manpage six + - name: Create /etc/convert2rhel.ini + run: | + sudo mkdir -p /etc + sudo touch /etc/convert2rhel.ini + - name: Download and install RPM run: | wget http://ftp.rpm.org/releases/rpm-4.14.x/rpm-4.14.2.tar.bz2 From a63333b04fe72079d77b30d7b6df6e8d6b813565 Mon Sep 17 00:00:00 2001 From: Andrew Anglin Date: Tue, 3 Dec 2024 12:16:37 -0500 Subject: [PATCH 71/71] added placeholder stuff in the convert2rhel.ini --- .github/workflows/generate_manpage.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/generate_manpage.yml b/.github/workflows/generate_manpage.yml index 6eb2e049a1..62a8798bd2 100644 --- a/.github/workflows/generate_manpage.yml +++ b/.github/workflows/generate_manpage.yml @@ -36,7 +36,12 @@ jobs: - name: Create /etc/convert2rhel.ini run: | sudo mkdir -p /etc - sudo touch /etc/convert2rhel.ini + sudo bash -c 'cat < /etc/convert2rhel.ini + [main] + subscription_manager = placeholder_value + host_metering = placeholder_value + inhibitor_overrides = placeholder_value + EOF' - name: Download and install RPM run: |