-
Notifications
You must be signed in to change notification settings - Fork 3.6k
babeld: Migrate from openwrt-routing #9408
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Are you sure you want all these commits per package? I honour you tutorial, just think this becomes messy... |
@aparcar I only know a small fraction of packages in openwrt-routing. From them, I have the feeling that commits affecting more than one package are rare and thus it would be still okay to duplicate them. However, one could still just move the whole openwrt-routing master into the net subdir, without caring about individual packages, and then put this on top of openwrt/packages. This should be possible with a similar tutorial like mine here. Still, with my approach one could keep together package history and the final changes required to merge them here. Anyway, still was just meant as a show-case, so I won't be offended if you don't do it like this because it's not desirable. I'm not so sure whether openwrt/packages wants to have all that crap on top of the current state anyways. |
@adrianschmutzler I would have imported all the commits & packages at once, I'll try to do an example today |
News? I'd be interested to see how it's done. Apart from that, isn't it bloat to add some 1420 commits to the master branch? Instead we could move the openwrt-routing/packages to openwrt/routing and mark it as archived. In parrallel a single (or many small) PR(s) transfer (and update) the routing.git packages? |
@aparcar see #9419 |
Since this is for illustration only and not meant to be actually merged, I will close this PR. |
@kerneis @neheb @aparcar I just need a hint on what I have to put for PKG_LICENSE_FILES. buildpr fails due to the history, where several commits have mismatch of author and Signed-off, which I would ignore. Some of the patches lack "babeld:" prefix, as they were treewide in openwrt-routing. I would personally just add the "babeld: " for those if agreed upon, which might be simple enough so one even does not have to add another Signed-off to those. I intend to use this as an example case for whether this approach is acceptable. If yes, one could work on with other targets, and merge them here step-by-step. |
I have also quickly done the same for batctl and batman-adv: Since the approach is effectively doing a rebase, merge commits are lost, but history is fully supported in GitHub. |
|
||
MAKE_FLAGS+= \ | ||
CFLAGS="$(TARGET_CFLAGS)" \ | ||
LDLIBS="" \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these really needed?
https://github.com/jech/babeld/blob/master/Makefile#L4 Needs be squashed into one commit |
@@ -197,6 +197,10 @@ start_service() { | |||
procd_close_instance |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are minor warnings from shellcheck.
@adrianschmutzler ping |
Next weekend... |
- Update maintainer email address - Wait for babel to die in init script (avoid race-condition on restart) Signed-off-by: Gabriel Kerneis <gabriel@kerneis.info>
22 May 2014: babeld-1.5.0 * Added support for an RTT-based metric -- see the description of "enable-timestamps" in the manual page. This work was done by Baptiste Jonglez with help from Matthieu Boutier.
…ments This is the first step toward fixing issue openwrt#33. This still lacks some features: - no support for "ignore" options - no backward compatibility for option names - no support for default interface options
Previously, we were using the name of the section as the interface name, but this has several drawbacks: - no "-" or other special characters are allowed in a section name, preventing some physical interface names to be specified this way (e.g. "tun-topeka" would not work) - it is harder to support default interface options (no interface name) This change is not backward compatible, but a later commit will fix that.
Signed-off-by: Christof Schulze <christof.schulze@gmx.net>
note: dependant on openwrt commit 85fabd68, adding support for null arguments.
This avoids running out of flash or RAM space if babeld logs too much. The system log is stored on RAM by default and has a controlled size. It is still possible to tell babeld to log to a file, by using the following in /etc/config/babeld: config general option log_file "/var/log/babeld.log" Signed-off-by: Baptiste Jonglez <git@bitsofnetworks.org>
This was mostly introduced by 82d9002 ("babeld: add support for dynamic config files"). Signed-off-by: Baptiste Jonglez <git@bitsofnetworks.org>
This way, "/etc/init.d/babeld reload" will detect when one of these dynamic config files has changed, and restart babeld only if that is the case. Dynamic config files where introduced by 82d9002 ("babeld: add support for dynamic config files"). Signed-off-by: Baptiste Jonglez <git@bitsofnetworks.org>
Signed-off-by: Baptiste Jonglez <git@bitsofnetworks.org>
Signed-off-by: Baptiste Jonglez <git@bitsofnetworks.org>
Also update my email address in the main MAINTAINERS file. Signed-off-by: Baptiste Jonglez <git@bitsofnetworks.org>
It makes the init script more readable. It has been more than two years since babeld 1.5.1, let's hope nobody is still using the old (undocumented) option names. Incidentally, this commit fixes support for the "conf_dir" option, introduced by ac64341 ("babeld: allow changing alternative configuration file and directory"). The default value of $OTHERCONFIGDIR was always used, because the variable was used *before* it was (possibly) redefined when parsing the UCI config. Signed-off-by: Baptiste Jonglez <git@bitsofnetworks.org>
This fixes a serious bug where IPv4 routes were not being redistributed. Signed-off-by: Baptiste Jonglez <git@bitsofnetworks.org>
24 September 2018: babeld-1.8.3 * Fixed a read-only two byte buffer overflow in the packet parser. This is a read-only overflow, and hence most probably not exploitable. * Fixed an issue with creating unreachable routes on recent kernels (4.16 and up). Thanks to Christof Schulze. * Notice interface changes faster by listening to more netlink events. Thanks to Christof Schulze. * Fixed a local interface issue when an interface has no link-local address. Thanks to Christof Schulze. Also, the init script was edited to kill babeld on stop; restart works properly now, as well. Signed-off-by: Michael Adams <unquietwiki@gmail.com>
9 November 2018: babeld-1.8.4 * Fixed a bug that discarded pipelined commands received on the local configuration interface. * Added the per-interface option rfc6126-compatible. Signed-off-by: Robert Marko <robimarko@gmail.com>
Killing anything with -9 is a bad idea. When killed this way, babeld won't be able to properly disassociate from its neighbours, withdraw its announced routes or remove routes from the kernel. This got introduced in bab933d ("babeld: Update to version 1.8.3 + fix init") with an unrelated change. The purpose of the change is unclear because stopping and restarting babeld worked fine without this change. Signed-off-by: Baptiste Jonglez <git@bitsofnetworks.org>
Changes: * Fixed a bug that caused confustion between learned routes and imported routes (thanks to Fabian Bläse). * Fixed a bug that prevented install filters from being evaluated (thanks to Killian Lufau). Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
This applies some style improvements to make this ready for migration to openwrt/packages. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
20 August 2019: babeld-1.9.1 * Fixed a crash that could happen when unicast and RTT estimation are both enabled on an interface. Thanks to Dave Taht. * Fixed compilation under BSD. Thanks to Dave Taht. 4 August 2019: babeld-1.9.0 * Reworked buffering of unicast packets to use a per-neighbour buffer rather than a single buffer per interface. This makes unicast as efficient as multicast, at the cost of slightly higher memory usage. * Added option "unicast" that allows sending most TLVs over unicast. This is necessary for the DTLS extension. * Implemented parsing of unicast Hellos. This makes it possible to interoperate with neighbours that only speak unicast (e.g. over some kinds of tunnels that only do unicast). * Implemented sending of unscheduled unicast Hellos. This makes the RTT extension work over unicast too. * Reworked the xroute data structures to use binary search and linear-time comparison. * Don't attempt to modify the rp_filter sysctl if it already has the desired value; this makes it possible to run babeld in an unpriviledged container. Thanks to Christof Schulze. * Reinstated logging of late hellos. Thanks to Dave Taht. * Don't send wildcard requests or Hellos to newish nodes. This makes acquisition of new neighbours slower, but drastically reduces noise at startup. Thanks to Teco Boot. * Remove an arbitrary limit on the number of interfaces. Thanks to Christof Schulze. * Removed class E from martian filter. Thanks to Dave Taht. * Added the ability to set the preferred source address in install filters. Thanks to Killian Lufau. * Fixed a number of read-only buffer overflows. Thanks to Leo Stefanesco. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Signed-off-by: Baptiste Jonglez <git@bitsofnetworks.org>
More example filters are provided, and new options such as "type" or "pref_src" are given as example. Signed-off-by: Baptiste Jonglez <git@bitsofnetworks.org>
I've pushed an updated version including latest patches from routing repo. Unaddressed comments:
Despite, I still do not see a conclusion on whether this should be with full history or squashed into a single commit (I personally prefer the former). |
Regarding full history or squashed, I'm in favor of the latter: Move routing.git to openwrt/routing.git and mark it as archived. Each package from routing.git could be added in a single clean commit, reducing confusion for others monitoring packages.git commits, not familiar with these new routing packages. |
BTW: Is there already any plan what happens to the stable branches (19.07, 18.06, 17.01)? Should the remain in routing (and be maintained there), or are they supposed to move, too ... |
I say remain. |
Based on the feedback I received, the majority of responses favors merging without history. I will thus close this PR, as it was meant as proof-of-concept for the opposite and I do not want to merge this without support of the package maintainers. |
@adrianschmutzler thanks for working on this! I'll soon create some PRs as well. |
This migrates the babeld package from openwrt-routing together with the package-specific history.
Migration tutorial:
This is an example for migrating a package with its folder-based history from openwrt-routing.
This can be done very quickly (about two minutes) and with a few commands:
Clone the source repo
git clone https://github.com/openwrt-routing/packages transfer
Enter source repo
cd transfer
Create branch for changes ("extract")
git checkout -b extract
Extract commits for one directory (here babeld) from extract branch; this will move its contents to the repo root!
git filter-branch --prune-empty --subdirectory-filter babeld extract
Create temporary directory
mkdir /data/tmp
Move stuff to the desired subfolder (here net/babeld)
git filter-branch -f --tree-filter 'mv * /data/tmp; mkdir -p net/babeld; mv /data/tmp/* net/babeld/' --prune-empty extract
Go to packages directory
cd ../openwrt-packages
Add remote for transfer project
git remote add transfer ../transfer
Pull in changes and rebase them to current master
Now, add your changes and create PR
git checkout -b addbabeld
...
This PR is meant as a show-case on how packages could be transferred this way. If it is disliked, just close it again and move the package by different means.