OPNsense Forum

English Forums => Development and Code Review => Topic started by: miac60 on February 17, 2016, 08:22:31 am

Title: Release build
Post by: miac60 on February 17, 2016, 08:22:31 am
Hi.
I try to build release version of OPNsense from sources.
Are this steps correct?

cd /usr
rm -rf src ports plugins tools core
git clone https://github.com/opnsense/plugins
git clone https://github.com/opnsense/ports
git clone https://github.com/opnsense/tools
git clone https://github.com/opnsense/core
git clone https://github.com/opnsense/src

cd /usr/plugins && git checkout -f 16.1.1
cd /usr/core && git checkout -f 16.1.1
cd /usr/src && git checkout -f 16.1.1
cd /usr/ports && git checkout -f 16.1.1
cd /usr/tools && git checkout -f 16.1.1
make release VERSION=16.1.1
Title: Re: Release build
Post by: franco on February 17, 2016, 09:02:21 am
Hi there,

Mostly. :) git has an issue with tags vs. commits so you can't easily put two tags on the same commit. That means some directories don't have 16.1.1 tags like the plugins.git, which is still on 16.1.

When you have the git repositories cloned just make sure these are done to avoid handling actual tags:

# cd /usr/core && git checkout stable/16.1 && git pull
# cd /usr/src && git checkout stable/16.1 && git pull
# cd /usr/plugins && git pull
# cd /usr/tools && git pull
# cd /usr/tools && git pull

After that, the release is built in this way:

# make everything TYPE=opnsense

Note that the "release" target is for packing up a major release in an archive along with checkums and thus requires a VERSION argument it uses to verify the integrity, so that might fail in your case.

Out of lack of a proper way of pinning down commits for each version (short of git-submodule which I personally despise), the building of an exact 16.1.x is a manual effort, but it gets easier when you know what changed in the actual repositories and/or just using the previous tag.


Hope that helps,
Franco
Title: Re: Release build
Post by: miac60 on February 17, 2016, 09:35:24 am
Thank you for answer! I gonna try this!