Skip to content
Open
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 docs/contributors/patching/make-changes-to-a-package.rst
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ Not everything here needs to be filled in. In this case, our headers might look
$ hello -u
hello, user123!
Author: Nick Rosbrook <enr0n@ubuntu.com>
Forwarded: no, Ubuntu only
Forwarded: not-needed
Last-Update: 2025-04-23
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
Expand All @@ -174,7 +174,7 @@ Our final patch should look something like:
$ hello -u
hello, user123!
Author: Nick Rosbrook <enr0n@ubuntu.com>
Forwarded: no, Ubuntu only
Forwarded: not-needed
Last-Update: 2025-04-23
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
Expand Down
8 changes: 6 additions & 2 deletions docs/contributors/patching/work-with-debian-patches.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,12 @@ Bug-[Vendor]
them if they're readily available, but you don't need to go hunting for them.

Forwarded
: Information about where you sent the patch if it hasn't been upstreamed. Only
useful for vendor-specific patches.
: Information about how the patch was sent to the upstream project in case it
was not originated from there. When present, this should be a URL proving
that the patch was forwarded (e.g., a Pull Request or a patch in a bug

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
that the patch was forwarded (e.g., a Pull Request or a patch in a bug
that the patch was forwarded (e.g., a pull request or a patch in a bug

tracker). If the patch is specific to Debian or to Ubuntu, i.e., whenever it
makes no sense to forward the patch to the upstream project, the value for
this field must be "not-needed".

Applied-Upstream
: If the patch has already been applied upstream, link to it. This is not
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,12 @@ $ debian/rules override_dh_auto_test-arch RUSTBUILD_TEST_FLAGS="src/bootstrap/ -

In order to fix certain bugs, it's likely you'll need to create your own patch at some point. It's important that this patch contains enough information for other people to understand _what_ it's doing and _why_ it's doing it.

First, ensure that [Debian](https://salsa.debian.org/rust-team/rust/-/tree/debian/experimental?ref_type=heads) has not already created an equivalent patch. If so, you can simply use their patch directly. If you need to modify the patch in any way, make sure to add `Origin: backport, <Debian VCS patch URL>` to the patch header.
First, ensure that neither the upstream project nor [Debian](https://salsa.debian.org/rust-team/rust/-/tree/debian/experimental?ref_type=heads) has already created an equivalent patch. If so, you can simply use their patch directly. In such cases, make sure to include [DEP-3](https://dep-team.pages.debian.net/deps/dep3/) headers when appropriate.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
First, ensure that neither the upstream project nor [Debian](https://salsa.debian.org/rust-team/rust/-/tree/debian/experimental?ref_type=heads) has already created an equivalent patch. If so, you can simply use their patch directly. In such cases, make sure to include [DEP-3](https://dep-team.pages.debian.net/deps/dep3/) headers when appropriate.
First, ensure that neither the upstream project nor [Debian](https://salsa.debian.org/rust-team/rust/-/tree/debian/experimental?ref_type=heads) has already created an equivalent patch. If so, use their patch directly. In such cases, make sure to include [DEP-3](https://dep-team.pages.debian.net/deps/dep3/) headers when appropriate.


Otherwise, you must create your own patch. A template {term}`DEP-3 <DEP 3>` header can be generated using the following command:

```none
$ quilt header -e --dep3 <path/to/patch>
```

For the most part, you can follow the [Debian DEP-3 patch guidelines](https://dep-team.pages.debian.net/deps/dep3/). However, there are a few extra things you must do:

- Debian developers typically don't use the `This patch header follows DEP-3 [...]` line added by `quilt`. Delete this line.
- If this patch isn't something needed to get the new Rust version to build, and you're instead updating an existing source package, add a `Bug-Ubuntu:` line linking to the Launchpad bug.
Then, follow the [Debian DEP-3 patch guidelines](https://dep-team.pages.debian.net/deps/dep3/).
Loading