How to create a custom package repository

Since (the updater-ng version) is uninstalling any custom-installed packages, it gets a little tricky to install your own packages on the Turris (Omnia) router. You can avoid uninstallations by creating your own repository, like this:

EDIT: Current version of updater does not uninstall custom installed packages, so creating a repository is not necessary anymore. Anyway, the howto here can be still used so you have a better track of what custom packages have you installed.

  1. Create directory where you put the packages. I use /root/repo.

  2. Put there any packages (.ipk files) you want.

  3. Put the file into the same directory.

  4. Create a wrapper script and make it executable:

    cat > <<EOF

    cd "$DIR"
    sh ./ . | gzip > Packages.gz

    chmod +x

  5. Run the wrapper script whenever you change packages in the directory.

  6. Put respository definiton into the file /etc/updater/user.lua, together with install commands for your packages:

    cat /etc/updater/user.lua

    Repository “local” "file:///root/repo"
    Install “myownpackage”

  7. Run It should notice the new repository and install all requested packages.


In my case it was not necessery.
Following @cynerd directions I just reinstalled all local ipks after update.
And that’s all. Updater does not remove them.

OK, I somehow missed that local packages are going to get some support in updater. So the howto was actually valid until today. :wink:

I wanted to comment on the missing “cd” in the :smile: …but looked again and you changed already

I moved the current “user.lua” to user.lua.bak and made a new user.lua with those lines. I put the kmod-ath9k-htc*.ipk file in the /root/repo folder, and this is the output…

WARN:Script revision-specific not found, but ignoring its absence as requested
WARN:Script serial-specific not found, but ignoring its absence as requested
inconsistent: Package kmod-ath9k-htc requires package ath9k-htc-firmware that is not available.

Well i guess… just to have to remove all the changes back to normal :)…if it is not necessary anymore.

No, the cd was there all the time, see the changelog of the post.

This should work. Please double check the repository definition in user.lua and check that the package is in the index file (# gunzip < /root/repo/Packages.gz).

@Ondrej_Caletka, i meant to say “$Dir”

I thought this script meant for something else…to keep current local packages, did not know the firmware file or everything with it were downloaded to the *Packages.gz". Well doesn’t matter, just have to configure it again.

Path obcviously changed from 3.9

Put respository definiton into the file /etc/updater/conf.d/user.lua, together with install commands for your packages:

cat /etc/updater/conf.d/user.lua

Repository “local” "file:///root/repo"
Install “myownpackage”

I followed this instructions but how to get rid of this :

WARN:Script file:///usr/share/updater/localrepo/localrepo.lua not found, but ignoring its absence as requested
WARN:Morpher is obsoleted! You have used morpher syntax with function: Repositor

I tried to summarize this area:

WARN:Script file:///usr/share/updater/localrepo/localrepo.lua not found I believe this was bug in 3.9 and should be fixed in 3.9.1

No that is not a bug. That means that you are not using localrepo. If you don’t use localrepo then it won’t create that file and updater informs you that it doesn’t exists. If you don’t expect it to be there then you can ignore it. If you expect to use localrepo then there is something wrong because updater doesn’t found it.

Bug in 3.9 was that this file wasn’t created even if you used localrepo. So yes this message is manifestation of 3.9 bug but if you see it it doesn’t mean that you encountered bug.

is there any way to add custom repository on web server?

Repository("", "")

to /etc/updater/conf.d/user.lua creates errors:

Index is broken (missing): No OCSP response received
unreachable: No OCSP response received

Is this about web server configuration? Or should I add somewhere links to SSL keys?
Thans in advance.

OK, it works with:

Repository("", "", { verification = "none" })

But, how to setup verification?

You don’t have ocsp stamping enabled on you server. Either enable it on you server or disable ocsp (Repository("..", "...", {ocsp = false})) (reference

Thank you,
after enabling OCSP stapling on server it works with:

Repository("", "", { verification = "cert" })