Package compilation (xl2tpd + own patch)

Hi,

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:
PKG_VERSION:=devel-20151125

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-- https://api.turris.cz/mirror/libiwinfo-2016-09-21-fd9e17be0c43bd6b8df5371f0b353747bc563874.tar.xz
Resolving api.turris.cz (api.turris.cz)… 217.31.192.101, 2001:1488:ac15:ff80::101
Connecting to api.turris.cz (api.turris.cz)|217.31.192.101|: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
OK
root@turris:/tmp# opkg-key verify Packages.gz.sig Packages.gz || echo error
error

I use https://gist.github.com/hongkongkiwi/cfef6910c5c644eaebc9

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.

@sairon
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).

Anyway when you want to use additional repository with updater, you must add that repository to updater configuration. See https://gitlab.labs.nic.cz/turris/updater/blob/updater-ng/design/language.txt#L275

I hope this helps.