How do I find the repo a specific file belongs to?

Hi,

I've been searching for the repository that init.d/dropbear belongs to., but I can't find it. I feel like a moron :blush:

So, how does one accomplish this?

1 Like

I think you're asking which package the file /etc/init.d/dropbear belong to ?

its right there in the name ..dropbear

info can be found here https://openwrt.org/packages/pkgdata/dropbear
package src's here https://github.com/openwrt/openwrt/tree/openwrt-22.03/package/network/services/dropbear

(24.10) https://github.com/openwrt/openwrt/blob/openwrt-24.10/package/network/services/dropbear/files/dropbear.init

That much was clear.

Github search did not like my search query dropbear. Once I added the '.' it popped up as dropbear.init.

One of my better moments in life :wink:

In the src, the dropbear init file is named dropbear.init ... so you were in fact in the right place :stuck_out_tongue_winking_eye:

Just for note, the init files are renamed during install, dropbear init is renamed to dropbear and installed into the /etc/init.d/ directory during installation

2 Likes

If you're on a snapshot, apk does this too:

apk info --who-owns /etc/init.d/dropbear

If on a stable release, with opkg:

opkg search /etc/init.d/dropbear
2 Likes

now thats handy ..ty

And the PR17256 that goes along with it. I just don't like RSA.

Nice! And you can also do list on the package and find out the repo:

$ apk list dropbear
dropbear-2024.86-r1 x86_64 {feeds/base/network/services/dropbear} (MIT) [installed]

which, with a little interpolation (base means openwrt/openwrt repo), gets us to the package source at
https://github.com/openwrt/openwrt/tree/main/package/network/services/dropbear

I don't think the original repo location is retained anywhere in the opkg info, unless someone puts it in a metadata comment...

1 Like