Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Update references from master branch to main #883

Merged
merged 1 commit into from
Sep 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/pr-welcome-msg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ jobs:
- **/packit copr-build** to submit a public copr build using packit

To launch regression testing public members of oamg organization can leave the following comment:
- **/rerun** to schedule basic regression tests using this pr build and leapp-repository\*master\* as artifacts
- **/rerun** to schedule basic regression tests using this pr build and leapp-repository\*main\* as artifacts
- **/rerun 42** to schedule basic regression tests using this pr build and leapp-repository\*PR42\* as artifacts
- **/rerun-sst** to schedule sst tests using this pr build and leapp-repository\*master\* as artifacts
- **/rerun-sst** to schedule sst tests using this pr build and leapp-repository\*main\* as artifacts
- **/rerun-sst 42** to schedule sst tests using this pr build and leapp-repository\*PR42\* as artifacts

Please [open ticket](https://url.corp.redhat.com/oamg-ci-issue) in case you experience technical problem with the CI. (RH internal only)
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/reuse-copr-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
echo "::set-output name=sha::$(git rev-parse --short HEAD)"
echo "::set-output name=ref::refs/pull/${{ steps.pr_nr.outputs.pr_nr }}/head"

- name: Get latest leapp-repository master copr build id
- name: Get latest leapp-repository main copr build id
id: get_latest_lpr_copr_build_id
if: ${{ steps.leapp_repository_pr_regex_match.outputs.match == '' }}
run: |
Expand All @@ -73,7 +73,7 @@ jobs:
EOF

pip install copr-cli
REGEX='leapp-repository.*master.*' COPR_REPO='@oamg/leapp' _COPR_CONFIG=copr_fedora.conf python ${{ github.workspace }}/utils/get_latest_copr_build > latest_lpr
REGEX='leapp-repository.*main.*' COPR_REPO='@oamg/leapp' _COPR_CONFIG=copr_fedora.conf python ${{ github.workspace }}/utils/get_latest_copr_build > latest_lpr
COPR_ID=$(cat latest_lpr)
echo "::set-output name=copr_id::${COPR_ID##*/}"

Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ name: Unit Tests
on:
push:
branches:
- master
- main
pull_request:
branches:
- master
- main

jobs:
test:
Expand Down Expand Up @@ -33,9 +33,9 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: '0'
- name: Set master to origin/master
if: github.ref != 'refs/heads/master'
- name: Set main to origin/main
if: github.ref != 'refs/heads/main'
run: |
git branch -f master origin/master
git branch -f main origin/main
- name: ${{matrix.scenarios.name}}
run: script -e -c /bin/bash -c 'TERM=xterm podman build --security-opt=seccomp=unconfined -t leapp-tests -f res/container-tests/Containerfile.${{matrix.scenarios.container}} res/container-tests && PYTHON_VENV=${{matrix.scenarios.python}} REPOSITORIES=${{matrix.scenarios.repos}} podman run --security-opt=seccomp=unconfined --rm -ti -v ${PWD}:/payload --env=PYTHON_VENV --env=REPOSITORIES leapp-tests'
6 changes: 3 additions & 3 deletions .packit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ jobs:
- fedora-all-x86_64
actions:
post-upstream-clone:
# builds from PRs should have lower NVR than those from master branch
# builds from PRs should have lower NVR than those from main branch
- sed -i "s/1%{?dist}/0%{?dist}/g" packaging/leapp.spec
get-current-version:
# get version from spec file instead from git tag
- bash -c "grep -m1 '^Version:' packaging/leapp.spec | grep -om1 '[0-9].[0-9.]**'"
- job: copr_build
trigger: commit
metadata:
branch: master
branch: main
owner: "@oamg"
project: leapp
targets:
Expand All @@ -38,7 +38,7 @@ jobs:
- fedora-all-x86_64
actions:
post-upstream-clone:
# builds from master branch should have the highest NVR
# builds from main branch should have the highest NVR
- sed -i "s/1%{?dist}/100%{?dist}/g" packaging/leapp.spec
get-current-version:
# get version from spec file instead from git tag
Expand Down
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ _TEST_CONTAINER=$${TEST_CONTAINER:-rhel8}

# just to reduce number of unwanted builds mark as the upstream one when
# someone will call copr_build without additional parameters
MASTER_BRANCH=master
MASTER_BRANCH=main

# In case the PR or MR is defined or in case build is not coming from the
# MATER_BRANCH branch, N_REL=0; (so build is not update of the approved
Expand All @@ -44,14 +44,14 @@ REQUEST=`if test -n "$$PR"; then echo ".PR$${PR}"; elif test -n "$$MR"; then ech
# Examples:
# 0.201810080027Z.4078402.packaging.PR2
# 0.201810080027Z.4078402.packaging
# 0.201810080027Z.4078402.master.MR2
# 1.201810080027Z.4078402.master
# 0.201810080027Z.4078402.main.MR2
# 1.201810080027Z.4078402.main
RELEASE="$(N_REL).$(TIMESTAMP).$(SHORT_SHA).$(BRANCH)$(REQUEST)$(_SUFFIX)"

ifneq ($(shell id -u),0)
ENTER_VENV := . $(VENVNAME)/bin/activate;
else
ENTER_VENV :=
ENTER_VENV :=
endif

all: help
Expand Down
20 changes: 10 additions & 10 deletions docs/source/best-practices.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,17 @@ to a shared library function. You can introduce it in one of these two places:
writing your actor for, e.g. for an OS in-place upgrade workflow, should go to the `<Leapp repository>/libraries`
folder. In this case, we welcome your proposals under the
[leapp-repository on GitHub](https://github.com/oamg/leapp-repository).

Please note that the name of the library module in this case should be unique and contain
the actor name. For example:
`repos/system_upgrade/el7toel8/actors/vimmigrate/libraries/vimmigrate.py`


## Discover standard library functions

Before implementing functionality for your actor, browse through the available functionality provided by:

- the [Leapp Standard Library](https://github.com/oamg/leapp/tree/master/leapp/libraries/stdlib/),
- the [Leapp Standard Library](https://github.com/oamg/leapp/tree/main/leapp/libraries/stdlib/),
- the shared library of your Leapp repository (`<Leapp repository>/libraries` folder).

These libraries contain functions that may satisfy your needs. Using them can save you time, lower code complexity and
Expand All @@ -63,7 +63,7 @@ help avoiding duplicate code. Improvement proposals for the library functions ar

Sources of external functionality to be used in your actor in order of preference:

1. the [Leapp Standard Library](https://github.com/oamg/leapp/tree/master/leapp/libraries/stdlib/)
1. the [Leapp Standard Library](https://github.com/oamg/leapp/tree/main/leapp/libraries/stdlib/)
2. the [Python Standard Library](https://docs.python.org/3/library/index.html)
3. shell commands

Expand All @@ -81,13 +81,13 @@ As with the Leapp Standard Library mentioned above, it may be beneficial for you
place in the [leapp-repository](https://github.com/oamg/leapp-repository). You might be interested in the messages they
produce, for example:

- [SystemFactsActor](https://github.com/oamg/leapp-repository/blob/master/repos/system_upgrade/el7toel8/actors/systemfacts/actor.py) -
- [SystemFactsActor](https://github.com/oamg/leapp-repository/blob/main/repos/system_upgrade/el7toel8/actors/systemfacts/actor.py) -
information about kernel modules, yum repos, sysctl variables, users, firewall, SELinux, etc.
- [OSReleaseCollector](https://github.com/oamg/leapp-repository/blob/master/repos/system_upgrade/el7toel8/actors/osreleasecollector/actor.py) -
- [OSReleaseCollector](https://github.com/oamg/leapp-repository/blob/main/repos/system_upgrade/el7toel8/actors/osreleasecollector/actor.py) -
system release information
- [RpmScanner](https://github.com/oamg/leapp-repository/blob/master/repos/system_upgrade/el7toel8/actors/rpmscanner/actor.py) -
- [RpmScanner](https://github.com/oamg/leapp-repository/blob/main/repos/system_upgrade/el7toel8/actors/rpmscanner/actor.py) -
list of installed packages
- [StorageScanner](https://github.com/oamg/leapp-repository/blob/master/repos/system_upgrade/el7toel8/actors/storagescanner/actor.py) -
- [StorageScanner](https://github.com/oamg/leapp-repository/blob/main/repos/system_upgrade/el7toel8/actors/storagescanner/actor.py) -
storage information

In case you find any message of the existing actors to be incorrect, incomplete or misleading, we encourage you to
Expand Down Expand Up @@ -123,8 +123,8 @@ For more about unit testing, see the [tutorial](unit-testing).
## Do not introduce new dependencies

Ideally, actors shouldn't require any additional dependency on top of the dependencies already in the
[leapp](https://github.com/oamg/leapp/blob/master/packaging/leapp.spec) and
[leapp-repository](https://github.com/oamg/leapp-repository/blob/master/packaging/leapp-repository.spec) spec files,
[leapp](https://github.com/oamg/leapp/blob/main/packaging/leapp.spec) and
[leapp-repository](https://github.com/oamg/leapp-repository/blob/main/packaging/leapp-repository.spec) spec files,
which are, as of December 2018, just these:

- dnf
Expand Down
4 changes: 2 additions & 2 deletions docs/source/build-schema.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ All projects under the OAMG should use the same schema for names of RPM builds,
to be able to simply and fast find specific builds. The schema itself looks
like that (NVR without %{dist}):

- for builds made from the master branch:
- for builds made from the main branch:
```
<name>-<version>-100.<timestamp>.<short-hash>.<branch>
```
Expand All @@ -25,4 +25,4 @@ Where:
of a (S)RPM file; so it is suggested (not required) to to avoid dashes
in names of branches
- **number** is number of a pull-request (alternatively merge-request) to which
builds are related
builds are related
2 changes: 1 addition & 1 deletion docs/source/compatibility-with-leapp-repository.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ We rather prefer releasing new versions with changelogs and everything
when we agree it's worthwhile.

But we need a mechanism to be able to synchronize with other projects, when we
provide new functionality in the upstream (master) branch without the need
provide new functionality in the upstream (main) branch without the need
of immediate release of the new version of leapp. For these purposes the
`leapp-framework` capability is provided in the framework (python[23]-leapp) rpms.

Expand Down
6 changes: 3 additions & 3 deletions docs/source/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Before you submit your pull request, consider the following guidelines:
* Fork the repository and clone your fork.
* Make your changes in a new git branch:

``git checkout -b bug/my-fix-branch master``
``git checkout -b bug/my-fix-branch main``

* Include documentation that either describe a change to a behavior or the changed capability to an end user.
* Commit your changes with message conforming to the [Git Commit Messages](#git-commit-messages) guidelines.
Expand All @@ -39,7 +39,7 @@ Before you submit your pull request, consider the following guidelines:

``git push --set-upstream origin bug/my-fix-branch``

* When opening a pull request, select the `master` branch as a base.
* When opening a pull request, select the `main` branch as a base.
* Mark your pull request with **[WIP]** (Work In Progress) to get feedback, but prevent merging (for example,
[WIP] Update CONTRIBUTING.rst).
* If you are fixing a GitHub issue, include the issue number you are fixing, e.g. 'Closes issue #xyz'.
Expand All @@ -51,7 +51,7 @@ Before you submit your pull request, consider the following guidelines:
* Push changes to git (this will update your pull request). For that you can add a new commit or rebase your branch
and force push to your GitHub repository like this: ::

git rebase -i master
git rebase -i main
git push -f origin bug/my-fix-branch

### Merge Rules
Expand Down
8 changes: 4 additions & 4 deletions docs/source/dependencies-leapp-repository.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ this document focuses on the leapp-repository specifics only.
Currently there are two SPEC files for leapp-repository:

- The
[leapp-repository.spec](https://github.com/oamg/leapp-repository/blob/master/packaging/leapp-repository.spec)
[leapp-repository.spec](https://github.com/oamg/leapp-repository/blob/main/packaging/leapp-repository.spec)
file is used to build leapp-repository packages and their dependency
metapackage _leapp-repository-deps_ **for RHEL 7**.
- The
[leapp-el7toel8-deps.spec](https://github.com/oamg/leapp-repository/blob/master/packaging/leapp-el7toel8-deps.spec)
[leapp-el7toel8-deps.spec](https://github.com/oamg/leapp-repository/blob/main/packaging/leapp-el7toel8-deps.spec)
file is used to build dependency metapackages _leapp-deps-el8_ and
_leapp-repository-deps-el8_ **for RHEL 8** whose purpose is to replace the
RHEL 7 dependency metapackages _leapp-deps_ and _leapp-repository-deps_ during
Expand All @@ -27,10 +27,10 @@ the upgrade.
## What to do in leapp-repository when dependencies of leapp change?

Go to the section below the line `%package -n %{ldname}` in the
[leapp-el7toel8-deps.spec](https://github.com/oamg/leapp-repository/blob/master/packaging/leapp-el7toel8-deps.spec).
[leapp-el7toel8-deps.spec](https://github.com/oamg/leapp-repository/blob/main/packaging/leapp-el7toel8-deps.spec).
This section creates the RHEL 8 _leapp-deps-el8_ metapackage that replaces the
RHEL7 _leapp-deps_ metapackage. So when the leapp package dependencies change
in the [leapp.spec](https://github.com/oamg/leapp/blob/master/packaging/leapp.spec)
in the [leapp.spec](https://github.com/oamg/leapp/blob/main/packaging/leapp.spec)
together with incrementing version of the **leapp-framework-dependencies**
capability, it's necessary to:

Expand Down
2 changes: 1 addition & 1 deletion docs/source/dependencies.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ As a solution, we are using the metapackage that contains those dependencies.
## What to do when dependencies needs to be changed

It's easy to change *outer dependencies* for Leapp. Open the
[packaging/leapp.spec](https://github.com/oamg/leapp/blob/master/packaging/leapp.spec) file and change the dependencies as needed under
[packaging/leapp.spec](https://github.com/oamg/leapp/blob/main/packaging/leapp.spec) file and change the dependencies as needed under
`%package deps`. The right place is pretty highlighted (you cannot miss it):

```spec
Expand Down
2 changes: 1 addition & 1 deletion docs/source/deprecation.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ impact on your code, we introduce the deprecation process described below.

The following lists cover deprecated functionality in the leapp utility, snactor,
the leapp standard library, etc. But don't cover deprecated functionalities
from particular leapp repositories (e.g. the [elt7toel8](https://github.com/oamg/leapp-repository/tree/master/repos/system_upgrade/el7toel8) leapp repository). For
from particular leapp repositories (e.g. the [elt7toel8](https://github.com/oamg/leapp-repository/tree/main/repos/system_upgrade/el7toel8) leapp repository). For
such information, see [Deprecated functionality in the el7toel8 repository](el7toel8/deprecation.html#deprecated-functionality-in-the-el7toel8-repository).

## current upstream development <span style="font-size:0.5em; font-weight:normal">(till the next release + 6months)</span>
Expand Down
4 changes: 2 additions & 2 deletions docs/source/devenv-install.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

If you do not want to modify the framework itself, install it from
the RPM packages provided by the [Copr](https://copr.fedorainfracloud.org/coprs/g/oamg/leapp/)
build system, which automatically builds packages with every commit merged into master.
build system, which automatically builds packages with every commit merged into main.
Packages are built for EPEL and Fedora.

* On CentOS/RHEL:
Expand Down Expand Up @@ -65,7 +65,7 @@ Optional arguments:
--debug Enables debug mode

Main commands:

new-tag Create a new tag
new-model Creates a new model
run Execute the given actor
Expand Down
Loading