From b8cca6cef14716987bbf7ef8f6edcbfc1688cc4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9e=20Ravier?= Date: Fri, 7 May 2021 16:38:16 +0200 Subject: [PATCH] *: rename master branch to main --- .cci.jenkinsfile | 4 +-- .github/ISSUE_TEMPLATE/release-checklist.md | 4 +-- .github/workflows/release.yml | 2 +- .github/workflows/tests.yml | 4 +-- .packit.yaml | 2 +- README.md | 4 +-- ci/ci-commitmessage-submodules.sh | 2 +- docs/CONTRIBUTING.md | 2 +- docs/_config.yml | 2 +- docs/adapting-existing.md | 2 +- docs/contributing-tutorial.md | 34 ++++++++++----------- docs/index.md | 4 +-- docs/repo.md | 2 +- docs/repository-management.md | 2 +- 14 files changed, 35 insertions(+), 35 deletions(-) diff --git a/.cci.jenkinsfile b/.cci.jenkinsfile index 33bc115e..12d9988a 100644 --- a/.cci.jenkinsfile +++ b/.cci.jenkinsfile @@ -57,9 +57,9 @@ codestyle: { buildPod(runAsUser:0) { checkout scm shwrap(""" - # Jenkins by default only fetches the branch it's testing. Explicitly fetch master + # Jenkins by default only fetches the branch it's testing. Explicitly fetch main # for ci-commitmessage-submodules.sh - git fetch origin +refs/heads/master:refs/remotes/origin/master + git fetch origin +refs/heads/main:refs/remotes/origin/main ci/ci-commitmessage-submodules.sh """) } diff --git a/.github/ISSUE_TEMPLATE/release-checklist.md b/.github/ISSUE_TEMPLATE/release-checklist.md index 3b02847f..ff290222 100644 --- a/.github/ISSUE_TEMPLATE/release-checklist.md +++ b/.github/ISSUE_TEMPLATE/release-checklist.md @@ -18,7 +18,7 @@ This guide requires: - Prepare local environment: - [ ] `git remote get-url --push origin` - [ ] validate that the output above points to `git@github.com:ostreedev/ostree.git` - - [ ] `git checkout master && git pull` + - [ ] `git checkout main && git pull` - [ ] `git clean -fd` - [ ] `RELEASE_VER=yyyy.n` (matching `package_version` in `configure.ac`) - [ ] `git checkout -b release-${RELEASE_VER}` @@ -56,7 +56,7 @@ This guide requires: - Clean up: - [ ] `git clean -fd` - - [ ] `git checkout master` + - [ ] `git checkout main` - [ ] `git pull` - [ ] `git push origin :release-${RELEASE_VER}` - [ ] `git branch -d release-${RELEASE_VER}` diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 77a5bda3..399b6637 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,7 +3,7 @@ name: Release on: pull_request: - branches: [master] + branches: [main] paths: - 'configure.ac' diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 6a867d2c..70233b8e 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -2,9 +2,9 @@ name: Rust on: push: - branches: [master] + branches: [main] pull_request: - branches: [master] + branches: [main] env: CARGO_TERM_COLOR: always diff --git a/.packit.yaml b/.packit.yaml index 1f2e8128..857d6ec4 100644 --- a/.packit.yaml +++ b/.packit.yaml @@ -3,7 +3,7 @@ jobs: - job: production_build trigger: commit metadata: - branch: master + branch: main targets: f34-coreos-continuous specfile_path: ostree.spec actions: diff --git a/README.md b/README.md index fcde7015..7074dbbc 100644 --- a/README.md +++ b/README.md @@ -130,7 +130,7 @@ However, in order to build from a git clone, you must update the submodules. If you're packaging OSTree and want a tarball, I recommend using a "recursive git archive" script. There are several available online; -[this code](https://github.com/ostreedev/ostree/blob/master/packaging/Makefile.dist-packaging#L11) +[this code](https://github.com/ostreedev/ostree/blob/main/packaging/Makefile.dist-packaging#L11) in OSTree is an example. Once you have a git clone or recursive archive, building is the @@ -157,7 +157,7 @@ See [Contributing](CONTRIBUTING.md). ## Licensing The licensing for the *code* of libostree can be canonically found in the individual files; -and the overall status in the [COPYING](https://github.com/ostreedev/ostree/blob/master/COPYING) +and the overall status in the [COPYING](https://github.com/ostreedev/ostree/blob/main/COPYING) file in the source. Currently, that's LGPLv2+. This also covers the man pages and API docs. The license for the manual documentation in the `doc/` directory is: diff --git a/ci/ci-commitmessage-submodules.sh b/ci/ci-commitmessage-submodules.sh index edc0d780..ebc18022 100755 --- a/ci/ci-commitmessage-submodules.sh +++ b/ci/ci-commitmessage-submodules.sh @@ -40,7 +40,7 @@ gitdir=$(realpath $(pwd)) # require a newer git, we could use `git worktree`. cp -a ${gitdir} ${tmpd}/workdir cd ${tmpd}/workdir -git log --pretty=oneline origin/master..$HEAD | while read logline; do +git log --pretty=oneline origin/main..$HEAD | while read logline; do commit=$(echo ${logline} | cut -f 1 -d ' ') # For merge commits, just check that they're empty (i.e. no conflict # resolution was needed). Otherwise, let's just error out. Conflicts should diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index 03797a25..f7d7a5ca 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -72,7 +72,7 @@ For more information see [How to Write a Git Commit Message](https://chris.beams **Editing a Committed Message:** -To edit the message from the most recent commit run `git commit --amend`. To change older commits on the branch use `git rebase -i`. For a successful rebase have the branch track `upstream master`. Once the changes have been made and saved, run `git push --force origin `. +To edit the message from the most recent commit run `git commit --amend`. To change older commits on the branch use `git rebase -i`. For a successful rebase have the branch track `upstream main`. Once the changes have been made and saved, run `git push --force origin `. ## Running the test suite diff --git a/docs/_config.yml b/docs/_config.yml index e28f6506..836b22d8 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -28,7 +28,7 @@ last_edit_time_format: "%b %e %Y at %I:%M %p" gh_edit_link: true gh_edit_link_text: "Edit this page on GitHub" gh_edit_repository: "https://github.com/ostreedev/ostree" -gh_edit_branch: "master" +gh_edit_branch: "main" gh_edit_source: docs gh_edit_view_mode: "tree" diff --git a/docs/adapting-existing.md b/docs/adapting-existing.md index cc4b76d2..b9a157a4 100644 --- a/docs/adapting-existing.md +++ b/docs/adapting-existing.md @@ -92,7 +92,7 @@ After these steps, systemd switches root. If you are not using dracut or systemd, using OSTree should still be possible, but you will have to write the integration code. See the existing sources in -[src/switchroot](https://github.com/ostreedev/ostree/tree/master/src/switchroot) +[src/switchroot](https://github.com/ostreedev/ostree/tree/main/src/switchroot) as a reference. Patches to support other initramfs technologies and init systems, if diff --git a/docs/contributing-tutorial.md b/docs/contributing-tutorial.md index bb656f0e..a9e8d670 100644 --- a/docs/contributing-tutorial.md +++ b/docs/contributing-tutorial.md @@ -17,14 +17,14 @@ Fork https://github.com/ostreedev/ostree, then run the following commands. ```bash $ git clone https://github.com//ostree && cd ostree $ git remote add upstream https://github.com/ostreedev/ostree -$ git checkout master -$ git fetch upstream && git branch --set-upstream-to=upstream/master master +$ git checkout main +$ git fetch upstream && git branch --set-upstream-to=upstream/main main ``` -Make a branch from master for your patch. +Make a branch from main for your patch. ```bash $ git checkout -b -$ git branch --set-upstream-to=upstream/master +$ git branch --set-upstream-to=upstream/main ``` ## Building OSTree @@ -55,7 +55,7 @@ apt-get install build-essential && \ apt-get build-dep ostree ``` -[build.sh](https://github.com/ostreedev/ostree/blob/master/ci/build.sh) will have a list of packages needed to build ostree. +[build.sh](https://github.com/ostreedev/ostree/blob/main/ci/build.sh) will have a list of packages needed to build ostree. ### OSTree Build Commands @@ -120,7 +120,7 @@ RUN dnf update -y && \ dnf -y builddep ostree && \ dnf clean all -# clone ostree and update master branch +# clone ostree and update main branch COPY ostree-git.sh / RUN ../ostree-git.sh @@ -142,7 +142,7 @@ Save the following bash scripts in the same directory as the Dockerfile. Then ch #!/bin/bash # ostree-git.sh -# Clone ostree and update master branch +# Clone ostree and update main branch set -euo pipefail @@ -153,10 +153,10 @@ USERNAME="" git clone https://github.com/$USERNAME/ostree.git cd ostree -# Add upstream as remote and update master branch -git checkout master +# Add upstream as remote and update main branch +git checkout main git remote add upstream https://github.com/ostreedev/ostree.git -git pull --rebase upstream master +git pull --rebase upstream main ``` ```bash @@ -407,13 +407,13 @@ Tests for OSTree are done by shell scripting, by running OSTree commands and exa After you have committed your changes and tested, you are ready to submit your patch! -You should make sure your commits are placed on top of the latest changes from `upstream/master`: +You should make sure your commits are placed on top of the latest changes from `upstream/main`: ```bash -$ git pull --rebase upstream master +$ git pull --rebase upstream main ``` -To submit your patch, open a pull request from your forked repository. Most often, you'll be merging into `ostree:master` from `:`. +To submit your patch, open a pull request from your forked repository. Most often, you'll be merging into `ostree:main` from `:`. If some of your changes are complete and you would like feedback, you may also open a pull request that has WIP (Work In Progress) in the title. @@ -423,13 +423,13 @@ See [CONTRIBUTING.md](CONTRIBUTING.md#submitting-patches) for information on squ ### Returning Workflow -When returning to work on a patch, it is recommended to update your fork with the latest changes in the upstream master branch. +When returning to work on a patch, it is recommended to update your fork with the latest changes in the upstream main branch. If creating a new branch: ```bash -$ git checkout master -$ git pull upstream master +$ git checkout main +$ git pull upstream main $ git checkout -b ``` @@ -437,5 +437,5 @@ If continuing on a branch already created: ```bash $ git checkout -$ git pull --rebase upstream master +$ git pull --rebase upstream main ``` diff --git a/docs/index.md b/docs/index.md index 57e9439f..d5235ed6 100644 --- a/docs/index.md +++ b/docs/index.md @@ -127,7 +127,7 @@ However, in order to build from a git clone, you must update the submodules. If you're packaging OSTree and want a tarball, I recommend using a "recursive git archive" script. There are several available online; -[this code](https://github.com/ostreedev/ostree/blob/master/packaging/Makefile.dist-packaging#L11) +[this code](https://github.com/ostreedev/ostree/blob/main/packaging/Makefile.dist-packaging#L11) in OSTree is an example. Once you have a git clone or recursive archive, building is the @@ -148,7 +148,7 @@ See [Contributing](docs/CONTRIBUTING.md). ## Licensing The licensing for the *code* of libostree can be canonically found in the individual files; -and the overall status in the [COPYING](https://github.com/ostreedev/ostree/blob/master/COPYING) +and the overall status in the [COPYING](https://github.com/ostreedev/ostree/blob/main/COPYING) file in the source. Currently, that's LGPLv2+. This also covers the man pages and API docs. The license for the manual documentation in the `doc/` directory is: diff --git a/docs/repo.md b/docs/repo.md index 9b254b12..0269934e 100644 --- a/docs/repo.md +++ b/docs/repo.md @@ -121,7 +121,7 @@ Like git, OSTree uses the terminology "references" (abbreviated commits. See the [Git Documentation](https://git-scm.com/book/en/v2/Git-Internals-Git-References) for information on how git uses them. Unlike git though, it doesn't -usually make sense to have a "master" branch. There is a convention +usually make sense to have a "main" branch. There is a convention for references in OSTree that looks like this: `exampleos/buildmaster/x86_64-runtime` and `exampleos/buildmaster/x86_64-devel-debug`. These two refs point to diff --git a/docs/repository-management.md b/docs/repository-management.md index ace150ad..7dda781d 100644 --- a/docs/repository-management.md +++ b/docs/repository-management.md @@ -117,7 +117,7 @@ log links to build logs, etc.), but we're reusing the *content* from the `buildm commit `aec070645fe53` that passed the smoketests. For a more sophisticated implementation of this model, see the -[do-release-tags](https://github.com/ostreedev/ostree-releng-scripts/blob/master/do-release-tags) +[do-release-tags](https://github.com/ostreedev/ostree-releng-scripts/blob/main/do-release-tags) script, which includes support for things like propagating version numbers across commit promotion.