The custom .ipk file does not get included with the image built by image builder!

I made a special openvpn-openssl .ipk package ( openvpn-openssl_2.5.8-3_mipsel_24kc.ipk) and alongside with two other packages, luci-theme-argon_2.3.1_all.ipk and luci-app-argon-config_0.9_all.ipk I put them inside the pakcages folder directly after the imagebuilder main folder.

The contents of the packages folder are as follows.

Packages     
Packages.sig  
Packages.gz 
README.md 
luci-app-argon-config_0.9_all.ipk  
openvpn-openssl_2.5.8-3_mipsel_24kc.ipk
luci-theme-argon_2.3.1_all.ipk

Please note that by running make image the Pakcages signitures are generated for the provided added .ipks as follows.

CPE-ID: cpe:/a:openvpn:openvpn
Maintainer: Magnus Kroken <mkroken@gmail.com>
Architecture: mipsel_24kc
Installed-Size: 181224
Filename: openvpn-openssl_2.5.8-3_mipsel_24kc.ipk
...
Filename: luci-theme-argon_2.3.1_all.ipk
Size: 389538
SHA256sum: 827860fdf1c6c317a73593f75d442d75d5a154027ce0d1205f0c0aeb04c6ccec
Description:  Argon Theme
...
Filename: luci-app-argon-config_0.9_all.ipk
Size: 4469
SHA256sum: bd8c055b33cd01d70aea9946c0ed3b69e2ea780181783332afa086b2864affd5
Description:  LuCI page for Argon Config

That said in order to include my custom packages inside the image file I have followed the [OpenWrt Wiki] Using the Image Builder guide.

As a result, I changed the repositories.conf file as follows,

## Place your custom repositories here, they must match the architecture and version.
# src/gz %n https://downloads.openwrt.org/releases/23.05.2
src custom file:packages
## Remote package repositories
src/gz openwrt_core https://downloads.openwrt.org/releases/23.05.2/targets/ramips/mt7621/packages
src/gz openwrt_base https://downloads.openwrt.org/releases/23.05.2/packages/mipsel_24kc/base
src/gz openwrt_luci https://downloads.openwrt.org/releases/23.05.2/packages/mipsel_24kc/luci
src/gz openwrt_packages https://downloads.openwrt.org/releases/23.05.2/packages/mipsel_24kc/packages
src/gz openwrt_routing https://downloads.openwrt.org/releases/23.05.2/packages/mipsel_24kc/routing
src/gz openwrt_telephony https://downloads.openwrt.org/releases/23.05.2/packages/mipsel_24kc/telephony

## This is the local package repository, do not remove!
src imagebuilder file:packages

Please note that the third line is src custom file:pakcages and the last line is src imagebuilder file:pakcages.

I have changed and uncommented the third line in order to specify the location of the provided packages and tell the builder that they have higher priority to get included than the official one.

What I am expecting was that the image builder should include the provided custom .ipk files inside the packages folder for final image creation.

What I have observed is that the image builder fetches the openvpn-openssl.ipk from the internet and include it inside the generated image since I noticed that after flashing the router the included openvpn-openssl (openvpn-openssl_2.5.8-4) version is higher than one that I provided, it seems it ignores my openvpn package.

While the other two packages version (argon theme and argon config) are included correctly inside the image file and their versions matches with the ones that I provided, but still I am not sure whether those packages are fetched from the official openwrt website of from the local files.

Anyways, I am wondering what I have done wrong here?
Please note that I have added following to the PAKCAGES="openvpn-openssl luci-app-argon-config luci-theme-argon .. to the make image file.
I would be happy if someone explain how the local packages should be included inside the pakcages folder.

As a side note I would like to know whether I can specify which version of a certain package be included with the image?

In addition, I am wondering if the Image builder checks the custom package dependencies and if it realizes the dependencies of the custom package are not included or having version mismatch then it decides to drop the custom package with the image and instead it downloads the bundled one?

Thanks

Are the misspellings of packages intentional? As the imagebuilder won’t work if you’ve named the directories like that

AFAIK the IB always includes the newest package available. You may want to rebuild your custom openvpn-openssl_2.5.8-3_mipsel_24kc.ipk and set the version number to be higher than that in OpenWrt 23.05.2 repository.

Also, you did not need to molest the repositories.conf inside the image builder directory, AFAIR by default it has the src imagebuilder file:packages line which is sufficient for it to pick up IPK files from packages/.

1 Like

No, It was typo from my side, in fact the argon wallpapers which is not available in the official repo gets included.

I have made them required changes for packages to get included, the issue is with the packages that are custom and available on the repository too, I guess it includes the repo package not the custom one.

I'm pretty sure it includes the package with the higher version number. At least it does for me.

Today I confirmed and it includes the package with the higher version, which is totally annoying.

I think by default the make system should be cleverer than that,
First it should check whether its dependencies do match with the custom package version or not, if it is fine it should include the custom otherwise it should generate and error.

opkg needs to be small, not smart. It doesn't like multiple versions of the same package, but installing an older version of a package would not be smart either.

1 Like