]>
Commit | Line | Data |
---|---|---|
13379fb3 TL |
1 | # Why Rebuild |
2 | ||
3 | To avoid common pitfalls between switching to ifupdown2, like, for example, the removal of the | |
4 | networking units link, effectively disabling it.o | |
5 | ||
6 | # How is the Source Tracked | |
7 | ||
8 | We're using git's subtree functionality, which is basically just a convenience wrapper around the | |
9 | age old subtree merge strategy. | |
10 | ||
30cbcf17 TL |
11 | The initial addition was done with the following command: |
12 | ``` | |
13 | git subtree add -P src --squash https://salsa.debian.org/debian/ifupdown.git 0.8.36 | |
14 | ``` | |
15 | ||
13379fb3 TL |
16 | ## Subtree Rules |
17 | ||
18 | * We squash update commits to avoid making the git log explode here, one can always checkout the | |
19 | upstream repo for details. | |
20 | ||
21 | * We try to keep change in the subtree copy contained to packaging as much as possible, anything | |
22 | else should be upstreamed first, and only applied locally afterwards. | |
23 | ||
24 | * We're fine with merges, as they're required anyway. Especially d/changelog and the pre/post | |
25 | scripts will need to be adapted. Checkout upstream changes closely and ensure that our main goal | |
26 | (switching from ifupdown to ifupdown2 seamlessly) can still be achieved. | |
27 | ||
28 | # Separate Subtree Changes from Parent | |
29 | ||
30 | Quoting a tip from `man git-subtree`: | |
31 | ||
32 | > In order to keep your commit messages clean, we recommend that people split their | |
33 | > commits between the subtrees and the main project as much as possible. That is, if you | |
34 | > make a change that affects both the library and the main application, commit it in two | |
35 | > pieces. That way, when you split the library commits out later, their descriptions | |
36 | > will still make sense. But if this isn't important to you, it’s not necessary. git | |
37 | > subtree will simply leave out the non-library-related parts of the commit when it | |
38 | > splits it out into the subproject later. | |
30cbcf17 TL |
39 | |
40 | ## Pull in New Version | |
41 | ||
42 | Use something like the followign command (adapt the refspec at the end) to pull | |
43 | and merge in a new upstream revision: | |
44 | ||
45 | ``` | |
46 | git subtree pull -P src --squash https://salsa.debian.org/debian/ifupdown.git 0.8.X | |
47 | ``` | |
48 | ||
49 | Handle merge conflicts and ensure that the *build* post/pre rm scripts don't do anything that would | |
50 | interfere with switching to ifupdown2 or purging this package later. |