How to override a package in feeds

Hi ,

I need to move the openssh package from feeds folder to a local folder. I could see like even if I move the package , the build is taking the package from feeds.
How to override the package from feeds.


Can you please explain in more detail what you're trying to do?

At the most basic level, there are a bunch of symlilnks in package/feeds/packages/ which point to feeds/packages/*. You'll need to remove the symlink for openssh.

A cleaner way of doing this would be to clone the package repo from github, update your feeds.conf to point to this repo, delete the openssh package and commit the change, then do a scripts/feeds update -a followed by a scripts/feeds install -a

If you're trying to modify the openssh package though, you don't need to move it. Just modify in your cloned package repo, commit the change and then update/install with the script. Or you can just modify it directly in the relevant feeds folder

Hi ,
Thanks for the response.
I will explain in detail.

openssh package is in feeds/packages/net folder. I need to apply one patch in openssh code. I have the patch ready , and I need to commit the patch . But when I put the patch in feeds/packages/net/openssh/patches folder and go for a commit it is going to openssh branch which is an expected behaviour but I need to commit the patch locally ie in my local repo .
So I though like I need to take out the openssh package to my packages folder in order to apply the patch.
So here am trying to disable/override the openssh package in feeds with my local openssh code .
Am I right here? Is there any alternative way forward to apply the patch?
I have feeds.conf.default file , which doesnot have openssh explicitly mentioned.

Thanks in advance

There are a couple of ways of doing this. Probably the simplest way to do this is to do a scripts/feeds uninstall openssh then add the openssh Makefile to your package/network/utils folder. Then you can make changes and it should pick it up from there.

There are more involved and robust ways of doing it if you plan to make changes to many packages that involve cloning the package repo into a separate location on your drive

Yeah. I got your point.
It would be great if I could achieve the same by changing feeds.conf so that i could do a commit across for all instead of asking everyone to remove it manually.

The feeds.conf.default looks like:
src-git packages
src-git luci
src-git routing
src-git telephony

So as you mentioned :
update your feeds.conf to point to this repo

Can I mention here? Do I need to explicitly mention openssh package details?

Go to somewhere on your drive, let's say for arguments sake /opt/openwrt; it could be anywhere of course.

Do a git clone Then go to your openwrt repository. Copy the file feeds.conf.default to feeds.conf. Edit it. Replace the line for the packages feed with the following:

src-git-full packages file:///opt/openwrt/packages

Then, in your openwrt main repo, do the following:

scripts/feeds update packages
scripts feeds/install -a

Now you can make your edits. See here:

Once your patches are done, you need to push them back into your repo. You can either just copy the changed files into your package repo, add them and commit them or you can do the following (which needs to be done since the packages repo is a non-bare repo. You can't push to the current branch)

cd feeds/packages
git checkout -b <new branch>
git add <changed files>
git commit -m "openssh: commit subject"
git push -u origin <new branch>
git checkout master
git branch -D <new branch>

then go to your packages repo and merge that new branch into the master branch. Oh, and then you need to use the scripts/feeds to resync your feeds with the repo you've just updated


Thanks a lot

If your problem is solved, please consider marking this topic as [Solved]. See How to mark a topic as [Solved] for a short how-to.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.