External package creation and compilation

How we can create an external package for vyos and embed it into vyos iso?
As of now i am making a deb package and placing it into to packages folder and putting it’s entry into scripts/build-submodule scripts, after that only package name is visible in iso but no files are visible in the iso.
How those files will be visible in the iso?


I just share my experience, but please note it may not be recommended by official.

My case is to use nginx to replace nginx-light in buildup since I need to use recompiled nginx version with specific parameters, it’s just a little bit more complicated since vyos-1x depend on nginx-light, I need to change the dependency and recompile vyos-1x too. Here is my procedure:

# get source code
git submodule update --init packages/vyos-1x
cd package/vyos-1x
git checkout crux
# note: since project vyos-1x is not sync with project vyos-build, normally, vyos-1x will have newer commits, so for as much as close to release version, we must reset vyos-1x to commit which is prior to release date
git reset --hard <commit prior to reease date>

# modify dependency 
vi packages/vyos-1x/debian/control
nginx-light -> nginx

# start build package
docker run --rm -it -v $(pwd):/vyos -w /vyos/packages/vyos-1x \
             vyos/vyos-builder \
             dpkg-buildpackage -uc -us -tc -b

# deb package will be generated under directory packages/, and build process will take it prior to repository

# Besides, for building right dependency, must replace "nginx-light" with "nginx" in other places
vi data/live-build-config/package-lists/vyos-utils.list.chroot
nginx-light -> nginx

# The most important thing is to place your own nginx deb package under directory packages/, otherwise, build system just pick default nginx package which also is conflict with our own package
mv nginx_1.15.12-1_jessie_amd64.deb build-vyos/packages/

Then start your build iso.

best regards.

Thank you so much, I tried the same and able to successfully compile custom package… :blush: