Package compilation (xl2tpd + own patch)


I have a patch to xl2tpd which adds sub-address attribute to outgoing call. It is required by Allied Telesis router working as LNS.

I try to download TO SDK, fork original package and compile my package.

Anyone has or could write step by step tutorial?

My first problem is getting package feed to make version devel-20151125-2. Makefile I download creates:

We already have a draft of a guide for SDK usage, hopefully it should appear in our docs soon.

I’m not sure if I understand you correctly, but the of package name is constructed as $(PKG_NAME)_$(PKG_VERSION)-$(PKG_RELEASE). If you add a patch or change the build process somehow, you should just bump the PKG_RELEASE. You can find more information about creating packages in the official OpenWrt wiki.

Also, xl2tpd is maintained in the upstream packages repository, so if you want to make it available for other users, you should submit a PR to the openwrt/packages GH repository.

Thank you for your support.

Although my last try of whole project compilation failed with:
–2016-12-01 21:29:46--
Resolving (…, 2001:1488:ac15:ff80::101
Connecting to (||:443… connected.
HTTP request sent, awaiting response… 404 Not Found

I was able to compile xl2tp with my patch and PKG_RELEASE=3. (All dependences was satisfied)

I have created my own repo with this package, but I’m unable to sign it with my pub key. When I try to verify signed Packages file I get:
root@turris:/tmp# signify -V -P /etc/opkg/keys/ -x Packages.gz.sig -m Packages.gz
root@turris:/tmp# opkg-key verify Packages.gz.sig Packages.gz || echo error

I use

My patch is intended for use with Allied Telesis routers and it may crash in other environments since adding sub-address isn’t configurable yet.

My xl2tpd - devel-20151125-3 package is installed via my repository (signed) but it is automatically replaced after some hours by xl2tpd - devel-20151125-2 from turris repository.
How to prohibit openwrt from removing my package?

Thanks in advance

Does that mean that you got you verification working?

If so I suspect that you added your repository just as another feed for opkg. But this is not read by updater. So updater knows only one version and installs that version (if you are interested in why it doest this I wrote post about it here on forum some time ago: Updater is removing local packages - #17 by cynerd - SW bugs discussion - Turris forum).

Anyway when you want to use additional repository with updater, you must add that repository to updater configuration. See Sign in · GitLab

I hope this helps.