Skip to content

Instantly share code, notes, and snippets.

@SvenRoederer
Created December 9, 2018 18:20
Show Gist options
  • Save SvenRoederer/5acfba06874652820c244a5ee15c45ef to your computer and use it in GitHub Desktop.
Save SvenRoederer/5acfba06874652820c244a5ee15c45ef to your computer and use it in GitHub Desktop.
small story, how to easily fix the conflict of branch "for-Hedy-1.0.c_change_uplink" after merging "Hedy-1.0.x_backport-tunneldigger"
after I found the offending commit, I just did:
> rebase -i 1d4eda3d4^
this gave
> pick 1d4eda3d4 update links to https
pick 2e16cca9e network-defaults: setup a ffuplink related options by default
pick 0be1dcd4b uplinks: do not setup ffberlin-uplink anymore
pick 3a26d3b1d network: use create_ffuplink() for initial setup of ffuplink-interface
pick f91b6e775 add numeric index for openvpn-related uplink packages
pick 98c783483 openvpn-defaults: move initial setup from uplink-packages
pick b3fabcd3a openvpn-files: use create_ffuplink()
pick 5bb624b46 uplink-tunnelberlin: recreate ffuplink-interface on changed uplink-type
pick 310222f33 openvpn-files: restore previous state of openvpn.ffuplink
pick b87356d5f uplink-vpn03: changes to make it reconfigurable
pick ba77e2727 uplink-notunnel: changes to make it reconfigurable
pick 934b91c04 uplink-notunnel: fix recreating ffuplink-interface
pick d58a7ebeb uplink-notunnel: ensure correct setup of br-wan ifnames
# Rebase von 7f4c31887..d58a7ebeb auf 7f4c31887 (13 Kommandos)
adding the offending relvant commit 5bca8e3670ecd8587cf6cb4468ded67b39000ac9 gave
> pick 1d4eda3d4 update links to https
p 5bca8e3670ecd8587cf6cb4468ded67b39000ac9
pick 2e16cca9e network-defaults: setup a ffuplink related options by default
pick 0be1dcd4b uplinks: do not setup ffberlin-uplink anymore
pick 3a26d3b1d network: use create_ffuplink() for initial setup of ffuplink-interface
pick f91b6e775 add numeric index for openvpn-related uplink packages
pick 98c783483 openvpn-defaults: move initial setup from uplink-packages
pick b3fabcd3a openvpn-files: use create_ffuplink()
pick 5bb624b46 uplink-tunnelberlin: recreate ffuplink-interface on changed uplink-type
pick 310222f33 openvpn-files: restore previous state of openvpn.ffuplink
pick b87356d5f uplink-vpn03: changes to make it reconfigurable
pick ba77e2727 uplink-notunnel: changes to make it reconfigurable
pick 934b91c04 uplink-notunnel: fix recreating ffuplink-interface
pick d58a7ebeb uplink-notunnel: ensure correct setup of br-wan ifnames
# Rebase von 7f4c31887..d58a7ebeb auf 7f4c31887 (13 Kommandos)
after applying the conflict came up by:
```
error: Konnte ba77e2727... (uplink-notunnel: changes to make it reconfigurable) nicht anwenden
Wenn Sie das Problem aufgelöst haben, führen Sie "git rebase --continue" aus.
Falls Sie diesen Patch auslassen möchten, führen Sie stattdessen "git rebase --skip" aus.
Um den ursprünglichen Branch wiederherzustellen und den Rebase abzubrechen,
führen Sie "git rebase --abort" aus.
Konnte ba77e2727b80190464625d9260f44a81f05f1316... (uplink-notunnel: changes to make it reconfigurable) nicht anwenden
sven@build:/mnt/hosts/build/src/openwrt/packages_sven/freifunk-berlin-firmware-packages/uplinks/freifunk-berlin-uplink-no-tunnel$ git status
interaktives Rebase im Gange; auf 7f4c31887
Zuletzt ausgeführte Befehle (12 Befehle ausgeführt):
pick b87356d5f uplink-vpn03: changes to make it reconfigurable
pick ba77e2727 uplink-notunnel: changes to make it reconfigurable
(mehr Informationen in Datei .git/rebase-merge/done)
Nächste auszuführende Befehle (2 Befehle verbleibend):
pick 934b91c04 uplink-notunnel: fix recreating ffuplink-interface
pick d58a7ebeb uplink-notunnel: ensure correct setup of br-wan ifnames
(benutzen Sie "git rebase --edit-todo" zum Ansehen und Bearbeiten)
Sie sind gerade beim Rebase von Branch 'for-Hedy-1.0.x_change_uplink' auf '7f4c31887'.
(beheben Sie die Konflikte und führen Sie dann "git rebase --continue" aus)
(benutzen Sie "git rebase --skip", um diesen Patch auszulassen)
(benutzen Sie "git rebase --abort", um den ursprünglichen Branch auszuchecken)
Nicht zusammengeführte Pfade:
(benutzen Sie "git reset HEAD <Datei>..." zum Entfernen aus der Staging-Area)
(benutzen Sie "git add/rm <Datei>...", um die Auflösung zu markieren)
von beiden geändert: uci-defaults/freifunk-berlin-z95_notunnel
Unversionierte Dateien:
(benutzen Sie "git add <Datei>...", um die Änderungen zum Commit vorzumerken)
../../luci_srcdiet.mk
../../srcdiet.patch
../../test/
keine Änderungen zum Commit vorgemerkt (benutzen Sie "git add" und/oder "git commit -a")
```
looking in the conflicting file showed:
```
ci commit ffberlin-uplink
. /lib/functions/guard.sh
guard "notunnel"
uci delete network.ffuplink_dev
uci set network.ffuplink_dev=device
uci set network.ffuplink_dev.type=veth
uci set network.ffuplink_dev.name=ffuplink
uci set network.ffuplink_dev.peer_name=ffuplink_wan
<<<<<<< HEAD
# Create a static macaddr starting with "fe" for ffuplink devices
# See the website https://www.itwissen.info/MAC-Adresse-MAC-address.html
macaddr="fe"
for byte in 2 3 4 5 6; do
macaddr=$macaddr`dd if=/dev/urandom bs=1 count=1 2> /dev/null | hexdump -e '1/1 ":%02x"'`
done
uci set network.ffuplink_dev.macaddr=$macaddr
# add ffuplink_dev to br-wan
=======
# add ffuplink_dev to br-wan if not there
>>>>>>> ba77e2727... uplink-notunnel: changes to make it reconfigurable
uci set network.wan.ifname="$(uci get network.wan.ifname) ffuplink_wan"
uci commit network.ffuplink_dev
create_ffuplink
uci set network.ffuplink.proto=dhcp
uci commit network.ffuplink
```
Which is quite easy to solve. a final "git add freifunk-berlin-z95_notunnel" and "git rebase --continue", and all was solved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment