23307 changed files with 1081880 additions and 542068 deletions
@ -0,0 +1,32 @@
|
||||
# This file contains a list of commits that are not likely what you |
||||
# are looking for in a blame, such as mass reformatting or renaming. |
||||
# You can set this file as a default ignore file for blame by running |
||||
# the following command. |
||||
# |
||||
# $ git config blame.ignoreRevsFile .git-blame-ignore-revs |
||||
# |
||||
# To temporarily not use this file add |
||||
# --ignore-revs-file="" |
||||
# to your blame command. |
||||
# |
||||
# The ignoreRevsFile can't be set globally due to blame failing if the file isn't present. |
||||
# To not have to set the option in every repository it is needed in, |
||||
# save the following script in your path with the name "git-bblame" |
||||
# now you can run |
||||
# $ git bblame $FILE |
||||
# to use the .git-blame-ignore-revs file if it is present. |
||||
# |
||||
# #!/usr/bin/env bash |
||||
# repo_root=$(git rev-parse --show-toplevel) |
||||
# if [[ -e $repo_root/.git-blame-ignore-revs ]]; then |
||||
# git blame --ignore-revs-file="$repo_root/.git-blame-ignore-revs" $@ |
||||
# else |
||||
# git blame $@ |
||||
# fi |
||||
|
||||
|
||||
# nixos/modules/rename: Sort alphabetically |
||||
1f71224fe86605ef4cd23ed327b3da7882dad382 |
||||
|
||||
# nixos: fix module paths in rename.nix |
||||
d08ede042b74b8199dc748323768227b88efcf7c |
@ -1,64 +0,0 @@
|
||||
# How to contribute |
||||
|
||||
Note: contributing implies licensing those contributions |
||||
under the terms of [COPYING](../COPYING), which is an MIT-like license. |
||||
|
||||
## Opening issues |
||||
|
||||
* Make sure you have a [GitHub account](https://github.com/signup/free) |
||||
* Make sure there is no open issue on the topic |
||||
* [Submit a new issue](https://github.com/NixOS/nixpkgs/issues/new/choose) by choosing the kind of topic and fill out the template |
||||
|
||||
## Submitting changes |
||||
|
||||
* Format the commit messages in the following way: |
||||
|
||||
``` |
||||
(pkg-name | nixos/<module>): (from -> to | init at version | refactor | etc) |
||||
|
||||
(Motivation for change. Additional information.) |
||||
``` |
||||
|
||||
For consistency, there should not be a period at the end of the commit message's summary line (the first line of the commit message). |
||||
|
||||
Examples: |
||||
|
||||
* nginx: init at 2.0.1 |
||||
* firefox: 54.0.1 -> 55.0 |
||||
* nixos/hydra: add bazBaz option |
||||
|
||||
Dual baz behavior is needed to do foo. |
||||
* nixos/nginx: refactor config generation |
||||
|
||||
The old config generation system used impure shell scripts and could break in specific circumstances (see #1234). |
||||
|
||||
* `meta.description` should: |
||||
* Be capitalized. |
||||
* Not start with the package name. |
||||
* Not have a period at the end. |
||||
* `meta.license` must be set and fit the upstream license. |
||||
* If there is no upstream license, `meta.license` should default to `lib.licenses.unfree`. |
||||
* `meta.maintainers` must be set. |
||||
|
||||
See the nixpkgs manual for more details on [standard meta-attributes](https://nixos.org/nixpkgs/manual/#sec-standard-meta-attributes) and on how to [submit changes to nixpkgs](https://nixos.org/nixpkgs/manual/#chap-submitting-changes). |
||||
|
||||
## Writing good commit messages |
||||
|
||||
In addition to writing properly formatted commit messages, it's important to include relevant information so other developers can later understand *why* a change was made. While this information usually can be found by digging code, mailing list/Discourse archives, pull request discussions or upstream changes, it may require a lot of work. |
||||
|
||||
For package version upgrades and such a one-line commit message is usually sufficient. |
||||
|
||||
## Backporting changes |
||||
|
||||
Follow these steps to backport a change into a release branch in compliance with the [commit policy](https://nixos.org/nixpkgs/manual/#submitting-changes-stable-release-branches). |
||||
|
||||
1. Take note of the commits in which the change was introduced into `master` branch. |
||||
2. Check out the target _release branch_, e.g. `release-20.09`. Do not use a _channel branch_ like `nixos-20.09` or `nixpkgs-20.09`. |
||||
3. Create a branch for your change, e.g. `git checkout -b backport`. |
||||
4. When the reason to backport is not obvious from the original commit message, use `git cherry-pick -xe <original commit>` and add a reason. Otherwise use `git cherry-pick -x <original commit>`. That's fine for minor version updates that only include security and bug fixes, commits that fixes an otherwise broken package or similar. Please also ensure the commits exists on the master branch; in the case of squashed or rebased merges, the commit hash will change and the new commits can be found in the merge message at the bottom of the master pull request. |
||||
5. Push to GitHub and open a backport pull request. Make sure to select the release branch (e.g. `release-20.09`) as the target branch of the pull request, and link to the pull request in which the original change was comitted to `master`. The pull request title should be the commit title with the release version as prefix, e.g. `[20.09]`. |
||||
6. When the backport pull request is merged and you have the necessary privileges you can also replace the label `9.needs: port to stable` with `8.has: port to stable` on the original pull request. This way maintainers can keep track of missing backports easier. |
||||
|
||||
## Reviewing contributions |
||||
|
||||
See the nixpkgs manual for more details on how to [Review contributions](https://nixos.org/nixpkgs/manual/#chap-reviewing-contributions). |
@ -0,0 +1,34 @@
|
||||
--- |
||||
name: Build failure |
||||
about: Create a report to help us improve |
||||
title: '' |
||||
labels: '0.kind: build failure' |
||||
assignees: '' |
||||
|
||||
--- |
||||
|
||||
### Steps To Reproduce |
||||
Steps to reproduce the behavior: |
||||
1. build *X* |
||||
|
||||
### Build log |
||||
``` |
||||
log here if short otherwise a link to a gist |
||||
``` |
||||
|
||||
### Additional context |
||||
Add any other context about the problem here. |
||||
|
||||
### Notify maintainers |
||||
<!-- |
||||
Please @ people who are in the `meta.maintainers` list of the offending package or module. |
||||
If in doubt, check `git blame` for whoever last touched something. |
||||
--> |
||||
|
||||
### Metadata |
||||
Please run `nix-shell -p nix-info --run "nix-info -m"` and paste the result. |
||||
|
||||
```console |
||||
[user@system:~]$ nix-shell -p nix-info --run "nix-info -m" |
||||
output here |
||||
``` |
@ -0,0 +1,35 @@
|
||||
name: Backport |
||||
on: |
||||
pull_request_target: |
||||
types: [closed, labeled] |
||||
|
||||
# WARNING: |
||||
# When extending this action, be aware that $GITHUB_TOKEN allows write access to |
||||
# the GitHub repository. This means that it should not evaluate user input in a |
||||
# way that allows code injection. |
||||
|
||||
jobs: |
||||
backport: |
||||
name: Backport Pull Request |
||||
if: github.repository_owner == 'NixOS' && github.event.pull_request.merged == true && (github.event_name != 'labeled' || startsWith('backport', github.event.label.name)) |
||||
runs-on: ubuntu-latest |
||||
steps: |
||||
- uses: actions/checkout@v3 |
||||
with: |
||||
# required to find all branches |
||||
fetch-depth: 0 |
||||
ref: ${{ github.event.pull_request.head.sha }} |
||||
- name: Create backport PRs |
||||
# should be kept in sync with `version` |
||||
uses: zeebe-io/backport-action@v0.0.5 |
||||
with: |
||||
# Config README: https://github.com/zeebe-io/backport-action#backport-action |
||||
github_token: ${{ secrets.GITHUB_TOKEN }} |
||||
github_workspace: ${{ github.workspace }} |
||||
# should be kept in sync with `uses` |
||||
version: v0.0.5 |
||||
pull_description: |- |
||||
Bot-based backport to `${target_branch}`, triggered by a label in #${pull_number}. |
||||
|
||||
* [ ] Before merging, ensure that this backport complies with the [Criteria for Backporting](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md#criteria-for-backporting-changes). |
||||
* Even as a non-commiter, if you find that it does not comply, leave a comment. |
@ -0,0 +1,26 @@
|
||||
name: Basic evaluation checks |
||||
|
||||
on: |
||||
workflow_dispatch |
||||
# pull_request: |
||||
# branches: |
||||
# - master |
||||
# - release-** |
||||
# push: |
||||
# branches: |
||||
# - master |
||||
# - release-** |
||||
jobs: |
||||
tests: |
||||
runs-on: ubuntu-latest |
||||
# we don't limit this action to only NixOS repo since the checks are cheap and useful developer feedback |
||||
steps: |
||||
- uses: actions/checkout@v3 |
||||
- uses: cachix/install-nix-action@v17 |
||||
- uses: cachix/cachix-action@v10 |
||||
with: |
||||
# This cache is for the nixpkgs repo checks and should not be trusted or used elsewhere. |
||||
name: nixpkgs-ci |
||||
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}' |
||||
# explicit list of supportedSystems is needed until aarch64-darwin becomes part of the trunk jobset |
||||
- run: nix-build pkgs/top-level/release.nix -A tarball.nixpkgs-basic-release-checks --arg supportedSystems '[ "aarch64-darwin" "aarch64-linux" "x86_64-linux" "x86_64-darwin" ]' |
@ -1,41 +0,0 @@
|
||||
name: "merge staging(-next)" |
||||
|
||||
on: |
||||
schedule: |
||||
# * is a special character in YAML so you have to quote this string |
||||
# Merge every 6 hours |
||||
- cron: '0 */6 * * *' |
||||
|
||||
jobs: |
||||
sync-branch: |
||||
if: github.repository == 'NixOS/nixpkgs' |
||||
runs-on: ubuntu-latest |
||||
steps: |
||||
- uses: actions/checkout@v2 |
||||
|
||||
- name: Merge master into staging-next |
||||
id: staging_next |
||||
uses: devmasx/merge-branch@v1.3.1 |
||||
with: |
||||
type: now |
||||
from_branch: master |
||||
target_branch: staging-next |
||||
github_token: ${{ secrets.GITHUB_TOKEN }} |
||||
|
||||
- name: Merge staging-next into staging |
||||
id: staging |
||||
uses: devmasx/merge-branch@v1.3.1 |
||||
with: |
||||
type: now |
||||
from_branch: staging-next |
||||
target_branch: staging |
||||
github_token: ${{ secrets.GITHUB_TOKEN }} |
||||
|
||||
- name: Comment on failure |
||||
uses: peter-evans/create-or-update-comment@v1 |
||||
if: ${{ failure() }} |
||||
with: |
||||
issue-number: 105153 |
||||
body: | |
||||
An automatic merge${{ (steps.staging_next.outcome == 'failure' && ' from master to staging-next') || ((steps.staging.outcome == 'failure' && ' from staging-next to staging') || '') }} [failed](https://github.com/NixOS/nixpkgs/actions/runs/${{ github.run_id }}). |
||||
|
@ -0,0 +1,26 @@
|
||||
name: NixOS manual checks |
||||
|
||||
permissions: read-all |
||||
|
||||
on: |
||||
pull_request_target: |
||||
branches-ignore: |
||||
- 'release-**' |
||||
paths: |
||||
- 'nixos/**/*.xml' |
||||
- 'nixos/**/*.md' |
||||
|
||||
jobs: |
||||
tests: |
||||
runs-on: ubuntu-latest |
||||
if: github.repository_owner == 'NixOS' |
||||
steps: |
||||
- uses: actions/checkout@v3 |
||||
with: |
||||
# pull_request_target checks out the base branch by default |
||||
ref: refs/pull/${{ github.event.pull_request.number }}/merge |
||||
- uses: cachix/install-nix-action@v17 |
||||
- name: Check DocBook files generated from Markdown are consistent |
||||
run: | |
||||
nixos/doc/manual/md-to-db.sh |
||||
git diff --exit-code |
@ -0,0 +1,21 @@
|
||||
name: "No channel PR" |
||||
|
||||
on: |
||||
pull_request: |
||||
branches: |
||||
- 'nixos-**' |
||||
- 'nixpkgs-**' |
||||
|
||||
jobs: |
||||
fail: |
||||
name: "This PR is is targeting a channel branch" |
||||
runs-on: ubuntu-latest |
||||
steps: |
||||
- run: | |
||||
cat <<EOF |
||||
The nixos-* and nixpkgs-* branches are pushed to by the channel |
||||
release script and should not be merged into directly. |
||||
|
||||
Please target the equivalent release-* branch or master instead. |
||||
EOF |
||||
exit 1 |
@ -0,0 +1,57 @@
|
||||
# This action periodically merges base branches into staging branches. |
||||
# This is done to |
||||
# * prevent conflicts or rather resolve them early |
||||
# * make all potential breakage happen on the staging branch |
||||
# * and make sure that all major rebuilds happen before the staging |
||||
# branch getโs merged back into its base branch. |
||||
|
||||
name: "Periodic Merges (24h)" |
||||
|
||||
|
||||
on: |
||||
schedule: |
||||
# * is a special character in YAML so you have to quote this string |
||||
# Merge every 24 hours |
||||
- cron: '0 0 * * *' |
||||
|
||||
jobs: |
||||
periodic-merge: |
||||
if: github.repository_owner == 'NixOS' |
||||
runs-on: ubuntu-latest |
||||
strategy: |
||||
# don't fail fast, so that all pairs are tried |
||||
fail-fast: false |
||||
# certain branches need to be merged in order, like master->staging-next->staging |
||||
# and disabling parallelism ensures the order of the pairs below. |
||||
max-parallel: 1 |
||||
matrix: |
||||
pairs: |
||||
- from: master |
||||
into: haskell-updates |
||||
- from: release-21.11 |
||||
into: staging-next-21.11 |
||||
- from: staging-next-21.11 |
||||
into: staging-21.11 |
||||
- from: release-22.05 |
||||
into: staging-next-22.05 |
||||
- from: staging-next-22.05 |
||||
into: staging-22.05 |
||||
name: ${{ matrix.pairs.from }} โ ${{ matrix.pairs.into }} |
||||
steps: |
||||
- uses: actions/checkout@v3 |
||||
|
||||
- name: ${{ matrix.pairs.from }} โ ${{ matrix.pairs.into }} |
||||
uses: devmasx/merge-branch@1.4.0 |
||||
with: |
||||
type: now |
||||
from_branch: ${{ matrix.pairs.from }} |
||||
target_branch: ${{ matrix.pairs.into }} |
||||
github_token: ${{ secrets.GITHUB_TOKEN }} |
||||
|
||||
- name: Comment on failure |
||||
uses: peter-evans/create-or-update-comment@v2 |
||||
if: ${{ failure() }} |
||||
with: |
||||
issue-number: 105153 |
||||
body: | |
||||
Periodic merge from `${{ matrix.pairs.from }}` into `${{ matrix.pairs.into }}` has [failed](https://github.com/NixOS/nixpkgs/actions/runs/${{ github.run_id }}). |
@ -0,0 +1,51 @@
|
||||
# This action periodically merges base branches into staging branches. |
||||
# This is done to |
||||
# * prevent conflicts or rather resolve them early |
||||
# * make all potential breakage happen on the staging branch |
||||
# * and make sure that all major rebuilds happen before the staging |
||||
# branch getโs merged back into its base branch. |
||||
|
||||
name: "Periodic Merges (6h)" |
||||
|
||||
|
||||
on: |
||||
schedule: |
||||
# * is a special character in YAML so you have to quote this string |
||||
# Merge every 6 hours |
||||
- cron: '0 */6 * * *' |
||||
|
||||
jobs: |
||||
periodic-merge: |
||||
if: github.repository_owner == 'NixOS' |
||||
runs-on: ubuntu-latest |
||||
strategy: |
||||
# don't fail fast, so that all pairs are tried |
||||
fail-fast: false |
||||
# certain branches need to be merged in order, like master->staging-next->staging |
||||
# and disabling parallelism ensures the order of the pairs below. |
||||
max-parallel: 1 |
||||
matrix: |
||||
pairs: |
||||
- from: master |
||||
into: staging-next |
||||
- from: staging-next |
||||
into: staging |
||||
name: ${{ matrix.pairs.from }} โ ${{ matrix.pairs.into }} |
||||
steps: |
||||
- uses: actions/checkout@v3 |
||||
|
||||
- name: ${{ matrix.pairs.from }} โ ${{ matrix.pairs.into }} |
||||
uses: devmasx/merge-branch@1.4.0 |
||||
with: |
||||
type: now |
||||
from_branch: ${{ matrix.pairs.from }} |
||||
target_branch: ${{ matrix.pairs.into }} |
||||
github_token: ${{ secrets.GITHUB_TOKEN }} |
||||
|
||||
- name: Comment on failure |
||||
uses: peter-evans/create-or-update-comment@v2 |
||||
if: ${{ failure() }} |
||||
with: |
||||
issue-number: 105153 |
||||
body: | |
||||
Periodic merge from `${{ matrix.pairs.from }}` into `${{ matrix.pairs.into }}` has [failed](https://github.com/NixOS/nixpkgs/actions/runs/${{ github.run_id }}). |
@ -1,134 +0,0 @@
|
||||
on: |
||||
issue_comment: |
||||
types: |
||||
- created |
||||
|
||||
# This action allows people with write access to the repo to rebase a PRs base branch |
||||
# by commenting `/rebase ${branch}` on the PR while avoiding CODEOWNER notifications. |
||||
|
||||
jobs: |
||||
rebase: |
||||
runs-on: ubuntu-latest |
||||
if: github.repository_owner == 'NixOS' && github.event.issue.pull_request != '' && contains(github.event.comment.body, '/rebase') |
||||
steps: |
||||
- uses: peter-evans/create-or-update-comment@v1 |
||||
with: |
||||
comment-id: ${{ github.event.comment.id }} |
||||
reactions: eyes |
||||
- uses: scherermichael-oss/action-has-permission@1.0.6 |
||||
id: check-write-access |
||||
with: |
||||
required-permission: write |
||||
env: |
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
||||
- name: check permissions |
||||
run: | |
||||
echo "Commenter doesn't have write access to the repo" |
||||
exit 1 |
||||
if: "! steps.check-write-access.outputs.has-permission" |
||||
- name: setup |
||||
run: | |
||||
curl "https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.issue.number }}" 2>/dev/null >pr.json |
||||
cat <<EOF >>"$GITHUB_ENV" |
||||
CAN_MODIFY=$(jq -r '.maintainer_can_modify' pr.json) |
||||
COMMITS=$(jq -r '.commits' pr.json) |
||||
CURRENT_BASE=$(jq -r '.base.ref' pr.json) |
||||
PR_BRANCH=$(jq -r '.head.ref' pr.json) |
||||
COMMENT_BRANCH=$(echo ${{ github.event.comment.body }} | awk "/^\/rebase / {print \$2}") |
||||
PULL_REQUEST=${{ github.event.issue.number }} |
||||
EOF |
||||
rm pr.json |
||||
- name: check branch |
||||
env: |
||||
PERMANENT_BRANCHES: "haskell-updates|master|nixos|nixpkgs|python-unstable|release|staging" |
||||
VALID_BRANCHES: "haskell-updates|master|python-unstable|release-20.09|staging|staging-20.09|staging-next" |
||||
run: | |
||||
message() { |
||||
cat <<EOF |
||||
Can't rebase $PR_BRANCH from $CURRENT_BASE onto $COMMENT_BRANCH (PR:$PULL_REQUEST COMMITS:$COMMITS) |
||||
EOF |
||||
} |
||||
if ! [[ "$COMMENT_BRANCH" =~ ^($VALID_BRANCHES)$ ]]; then |
||||
cat <<EOF |
||||
Check that the branch from the comment is valid: |
||||
|
||||
$(message) |
||||
|
||||
This action can only rebase onto these branches: |
||||
|
||||
$VALID_BRANCHES |
||||
|
||||
\`/rebase \${branch}\` must be at the start of the line |
||||
EOF |
||||
exit 1 |
||||
fi |
||||
if [[ "$COMMENT_BRANCH" == "$CURRENT_BASE" ]]; then |
||||
cat <<EOF |
||||
Check that the branch from the comment isn't the current base branch: |
||||
|
||||
$(message) |
||||
EOF |
||||
exit 1 |
||||
fi |
||||
if [[ "$COMMENT_BRANCH" == "$PR_BRANCH" ]]; then |
||||
cat <<EOF |
||||
Check that the branch from the comment isn't the current branch: |
||||
|
||||
$(message) |
||||
EOF |
||||
exit 1 |
||||
fi |
||||
if [[ "$PR_BRANCH" =~ ^($PERMANENT_BRANCHES) ]]; then |
||||
cat <<EOF |
||||
Check that the PR branch isn't a permanent branch: |
||||
|
||||
$(message) |
||||
EOF |
||||
exit 1 |
||||
fi |
||||
if [[ "$CAN_MODIFY" != "true" ]]; then |
||||
cat <<EOF |
||||
Check that maintainers can edit the PR branch: |
||||
|
||||
$(message) |
||||
EOF |
||||
exit 1 |
||||
fi |
||||
- uses: actions/checkout@v2 |
||||
with: |
||||
fetch-depth: 0 |
||||
- name: rebase pull request |
||||
env: |
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
||||
run: | |
||||
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" |
||||
git config --global user.name "github-actions[bot]" |
||||
git fetch origin |
||||
gh pr checkout "$PULL_REQUEST" |
||||
git rebase \ |
||||
--onto="$(git merge-base origin/"$CURRENT_BASE" origin/"$COMMENT_BRANCH")" \ |
||||
"HEAD~$COMMITS" |
||||
git push --force |
||||
curl \ |
||||
-X POST \ |
||||
-H "Accept: application/vnd.github.v3+json" \ |
||||
-H "Authorization: token $GITHUB_TOKEN" \ |
||||
-d "{ \"base\": \"$COMMENT_BRANCH\" }" \ |
||||
"https://api.github.com/repos/${{ github.repository }}/pulls/$PULL_REQUEST" |
||||
curl \ |
||||
-X PATCH \ |
||||
-H "Accept: application/vnd.github.v3+json" \ |
||||
-H "Authorization: token $GITHUB_TOKEN" \ |
||||
-d '{ "state": "closed" }' \ |
||||
"https://api.github.com/repos/${{ github.repository }}/pulls/$PULL_REQUEST" |
||||
- uses: peter-evans/create-or-update-comment@v1 |
||||
with: |
||||
issue-number: ${{ github.event.issue.number }} |
||||
body: | |
||||
Rebased, please reopen the pull request to restart CI |
||||
- uses: peter-evans/create-or-update-comment@v1 |
||||
if: failure() |
||||
with: |
||||
issue-number: ${{ github.event.issue.number }} |
||||
body: | |
||||
[Failed to rebase](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}) |
@ -0,0 +1,48 @@
|
||||
name: "Update terraform-providers" |
||||
|
||||
on: |
||||
schedule: |
||||
- cron: "14 3 * * 1" |
||||
workflow_dispatch: |
||||
|
||||
jobs: |
||||
tf-providers: |
||||
if: github.repository_owner == 'NixOS' && github.ref == 'refs/heads/master' # ensure workflow_dispatch only runs on master |
||||
runs-on: ubuntu-latest |
||||
steps: |
||||
- uses: actions/checkout@v3 |
||||
- uses: cachix/install-nix-action@v17 |
||||
- name: setup |
||||
id: setup |
||||
run: | |
||||
echo ::set-output name=title::"terraform-providers: update $(date -u +"%Y-%m-%d")" |
||||
- name: update terraform-providers |
||||
run: | |
||||
git config user.email "41898282+github-actions[bot]@users.noreply.github.com" |
||||
git config user.name "github-actions[bot]" |
||||
pushd pkgs/applications/networking/cluster/terraform-providers |
||||
./update-all-providers --no-build |
||||
git commit -m "${{ steps.setup.outputs.title }}" providers.json |
||||
popd |
||||
- name: create PR |
||||
uses: peter-evans/create-pull-request@v4 |
||||
with: |
||||
body: | |
||||
Automatic update by [update-terraform-providers](https://github.com/NixOS/nixpkgs/blob/master/.github/workflows/update-terraform-providers.yml) action. |
||||
|
||||
Check that all providers build with: |
||||
``` |
||||
@ofborg build terraform-full |
||||
``` |
||||
branch: terraform-providers-update |
||||
delete-branch: false |
||||
labels: "2.status: work-in-progress" |
||||
title: ${{ steps.setup.outputs.title }} |
||||
token: ${{ secrets.GITHUB_TOKEN }} |
||||
- name: comment on failure |
||||
uses: peter-evans/create-or-update-comment@v2 |
||||
if: ${{ failure() }} |
||||
with: |
||||
issue-number: 153416 |
||||
body: | |
||||
Automatic update of terraform providers [failed](https://github.com/NixOS/nixpkgs/actions/runs/${{ github.run_id }}). |
@ -0,0 +1,134 @@
|
||||
# How to contribute |
||||
|
||||
Note: contributing implies licensing those contributions |
||||
under the terms of [COPYING](COPYING), which is an MIT-like license. |
||||
|
||||
## Opening issues |
||||
|
||||
* Make sure you have a [GitHub account](https://github.com/signup/free) |
||||
* Make sure there is no open issue on the topic |
||||
* [Submit a new issue](https://github.com/NixOS/nixpkgs/issues/new/choose) by choosing the kind of topic and fill out the template |
||||
|
||||
## Submitting changes |
||||
|
||||
Read the ["Submitting changes"](https://nixos.org/nixpkgs/manual/#chap-submitting-changes) section of the nixpkgs manual. It explains how to write, test, and iterate on your change, and which branch to base your pull request against. |
||||
|
||||
Below is a short excerpt of some points in there: |
||||
|
||||
* Format the commit messages in the following way: |
||||
|
||||
``` |
||||
(pkg-name | nixos/<module>): (from -> to | init at version | refactor | etc) |
||||
|
||||
(Motivation for change. Link to release notes. Additional information.) |
||||
``` |
||||
|
||||
For consistency, there should not be a period at the end of the commit message's summary line (the first line of the commit message). |
||||
|
||||
Examples: |
||||
|
||||
* nginx: init at 2.0.1 |
||||
* firefox: 54.0.1 -> 55.0 |
||||
https://www.mozilla.org/en-US/firefox/55.0/releasenotes/ |
||||
* nixos/hydra: add bazBaz option |
||||
|
||||
Dual baz behavior is needed to do foo. |
||||
* nixos/nginx: refactor config generation |
||||
|
||||
The old config generation system used impure shell scripts and could break in specific circumstances (see #1234). |
||||
|
||||
* `meta.description` should: |
||||
* Be capitalized. |
||||
* Not start with the package name. |
||||
* Not have a period at the end. |
||||
* `meta.license` must be set and fit the upstream license. |
||||
* If there is no upstream license, `meta.license` should default to `lib.licenses.unfree`. |
||||
* `meta.maintainers` must be set. |
||||
|
||||
See the nixpkgs manual for more details on [standard meta-attributes](https://nixos.org/nixpkgs/manual/#sec-standard-meta-attributes). |
||||
|
||||
## Writing good commit messages |
||||
|
||||
In addition to writing properly formatted commit messages, it's important to include relevant information so other developers can later understand *why* a change was made. While this information usually can be found by digging code, mailing list/Discourse archives, pull request discussions or upstream changes, it may require a lot of work. |
||||
|
||||
For package version upgrades and such a one-line commit message is usually sufficient. |
||||
|
||||
## Rebasing between branches (i.e. from master to staging) |
||||
|
||||
From time to time, changes between branches must be rebased, for example, if the |
||||
number of new rebuilds they would cause is too large for the target branch. When |
||||
rebasing, care must be taken to include only the intended changes, otherwise |
||||
many CODEOWNERS will be inadvertently requested for review. To achieve this, |
||||
rebasing should not be performed directly on the target branch, but on the merge |
||||
base between the current and target branch. |
||||
|
||||
In the following example, we see a rebase from `master` onto the merge base |
||||
between `master` and `staging`, so that a change can eventually be retargeted to |
||||
`staging`. The example uses `upstream` as the remote for `NixOS/nixpkgs.git` |
||||
while the `origin` remote is used for the remote you are pushing to. |
||||
|
||||
|
||||
```console |
||||
# Find the common base between two branches |
||||
common=$(git merge-base upstream/master upstream/staging) |
||||
# Find the common base between your feature branch and master |
||||
commits=$(git merge-base $(git branch --show-current) upstream/master) |
||||
# Rebase all commits onto the common base |
||||
git rebase --onto=$common $commits |
||||
# Force push your changes |
||||
git push origin $(git branch --show-current) --force-with-lease |