Replace package with more recent version?

I am building OpenWrt from scratch. Currently running openwrt-19.07 snapshots. Not the more current master snapshots.

However, the master snapshots contain one package (jool) in an updated version that I want to use in the openwrt-19.07 branch. I know I can manually copy over the Makefile to my current package feed, but I am afraid that a ./scripts/feeds update -a would reset it.

I have manually added makefiles for inexistent packages or from packages that are included in the OpenWrt base. I have also added manual package feeds for inexistent packages. But I have never replaced an existing package in a feed. So, what is the best practice to update just this single package before building OpenWrt, especially thinking in git terms?

EDIT: I don't know how I didn't find it, but this thread describes pretty much what needs to be done:

Basically you just update the feed via force ./scripts/feeds install -f -p <feedname> -a, see me external feed + help. This will always override the existing samba4 package, with my own dev version from the feed. You can just create your own package feed on github and add it the same way, than just put all feed update commands in a script.

3 Likes

Just go into the feeds/packages/net/jool directory, replace the Makefile with the updated on, then just git add Makefile and git commit (assuming this is the only change you've made to this point). Set the commit message to something like jool: update to latest version and it'll be part of your local repo and will merge when you do a scripts/feeds update.

At that point, if you want to push it to a remote repo that you are maintaining for your custom OpenWrt, you can.. just add a git remote URL to the feeds/packages directory and push it.. (example: https://github.com/Itus-Shield/packages/tree/rustup / https://github.com/Itus-Shield/packages/commit/7dcffd5300627b13210ee599faf9f5093ec483cd is one of my repos that I use for bringing up/changing packages)

If you include a package or update a package beyond the master/main branch, you can then do a pull request to have it included. (doesn't apply in this case, since your just updating the Makefile locally, but for future you might have something that could be upstream'ed and included for everyone)

You could also just cherry-pick the latest change to the jool package directly (accomplishes the same thing as updating the Makefile, but is more complicated if you aren't familar with git)

The package looks like it was downgraded.. https://github.com/openwrt/packages/commit/df891a50c5a3b836dcc7c996686fb337858ad494

1 Like

Yes, in the snapshots for current development branch. But I am on 19.07-snapshot, and the 19.07 branch uses jool-3.x, which has a severe performance issue that was fixed with the release of jool-4. So 4.0.9 is fine for my purpose (and actually the older 3.x shouldn't be used at all anymore, but 4.x also included some major changes, so it's not fully backwards compatible).

Then you can just grab the Makefile (and any patches and files directories) and replace it.. then just create the commit as I suggested, which will make it a part of your local repo. You will eventually get a merge conflict, but not unless they change the jool package upstream :slight_smile:

1 Like