Creating custom repository

I'm wondering how hard is it to create a custom repository/feed for LEDE project?

Specifically I have the following questions:

  1. How does Packages.sig get created? Is it required for the opkg (or Image Builder) to properly download/install packages?
  2. Packages.manifest, Packages and Packages.gz -- why the need for 3 copies of the same file and, more importantly, how can I have it generated on a Linux host from the set of ipk files?


The answer to most of your questions can be found from the source code (see line 81 onward):;a=blob;f=package/Makefile;h=ac8faecef29bcc7f150b2686d8d3c592e507c9eb;hb=HEAD#l81

Those files are usually generated at the end of the build run for each of the package feeds repos.

I guess that you might copy compiled ipks to a new dir and then repeat the commands needed for generating the index and signing it (using your build key)

As the signing is done with the same build key that you use to build your firmware (and packages), the firmwares compiled by you will already contain the same key in opkg settings, so the firmware will accept the signed package list.

Thank you Hannu!

I'm not trying to have the packages compiled as part of the firmware build process, I'm just using SDK to build packages separately from the firmware.

I've had to compile mkhash and move it to $PATH, other than that code from the script worked just fine and created all 3 of the Package files.

OK, I figured out the signatures for creating Packages.sig and adding signature to the live LEDE install.

How can the .pub file be added to the image builder/SDK so that other people can use the repo I created in their custom builds?

Not sure as I have never tried that, but I assume that you/they need download the key from you and place it to the same place where the other built-in keys are. That is how it would work with opkg at the router. But I am not sure how SDK or IB do things. Either the official/accepted keys are in a directory and this approach works, or it just uses the keyring package that includes all keys and then things are more difficult.

Looks like the signatures/keys are not required when adding repo to image builder.