Building OPNsense dvd image from custom source

Started by ashold7, September 09, 2020, 12:39:43 AM

Previous topic - Next topic
Hello,
I want to try out noctarius' ds-lite support. He has changed 9 files:https://github.com/opnsense/core/pull/4335/commits/1e5e9b1416bdce11e12eac137c57e0c7dd121599

I have read the tools readme section: https://github.com/opnsense/tools

I want to build a dvd image with the modified files and not from the official source. How do I achieve this?

Thank you in advance,
ashold7


@mimugmail Hacker  ;)

@ashold7 checkout the sources and modify them like you need them then use the "make dvd" from tools. All this needs be done on a opnsense with all the development tools installed or a freebsd system. More details: https://docs.opnsense.org/develop.html
Twitter: banym
Mastodon: banym@bsd.network
Blog: https://www.banym.de

Quote from: banym on September 09, 2020, 08:22:47 AM
@mimugmail Hacker  ;)

No  8)

Quote from: banym on September 09, 2020, 08:22:47 AM
@ashold7 checkout the sources and modify them like you need them then use the "make dvd" from tools. All this needs be done on a opnsense with all the development tools installed or a freebsd system. More details: https://docs.opnsense.org/develop.html

No 8) Building a DVD should be done on a FreeBSD 12.1 and then go on with the steps described in tools.
On a Firewall itself you could als do this via CLI:

opnsense-update -t opnsense-devel
opnsense-code core
cd /usr/core
... do you changes ..
make upgrade

Quote
opnsense-update -t opnsense-devel
opnsense-code core
cd /usr/core
... do you changes ..
make upgrade

But wouldn't that not only modify the current machine he is working on? Not sure what he plans to do with the DVD image. Sounds like he needs the image to multiply the modified version?

Twitter: banym
Mastodon: banym@bsd.network
Blog: https://www.banym.de

QuoteI want to try out noctarius' ds-lite support.

The super-brave can also do this:


root@OPNsense:~ # opnsense-patch 1e5e9b1
Fetched 1e5e9b1 via https://github.com/opnsense/core
Hmm...  Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|From 1e5e9b1416bdce11e12eac137c57e0c7dd121599 Mon Sep 17 00:00:00 2001
|From: "Christoph Engelbert (noctarius)" <me@noctarius.com>
|Date: Tue, 8 Sep 2020 22:23:33 +0200
|Subject: [PATCH] Updated version of the DS-lite patch with UI to configure the
| DS-lite parameters, such as AFTR address and DHCPv6 retrieval of the address
| if available. The patch is not tested yet and only updated to the current
| source base, which is very different from what it was in 2018.
|
|---
| src/etc/inc/dslite.php                        | 93 +++++++++++++++++++
| src/etc/inc/interfaces.inc                    | 16 +++-
| src/etc/inc/system.inc                        |  2 +-
| src/etc/rc.newwanipv6                         | 26 ++++++
| .../app/library/OPNsense/Routing/Gateways.php |  4 +
| .../conf/actions.d/actions_interface.conf     |  2 +-
| src/www/interfaces.php                        | 71 +++++++++++++-
| src/www/status_interfaces.php                 | 18 +++-
| .../widgets/widgets/interface_list.widget.php |  8 +-
| 9 files changed, 233 insertions(+), 7 deletions(-)
| create mode 100644 src/etc/inc/dslite.php
|
|diff --git a/src/etc/inc/dslite.php b/src/etc/inc/dslite.php
|new file mode 100644
|index 0000000000..8af7b5faee
|--- /dev/null
|+++ b/src/etc/inc/dslite.php
--------------------------
(Creating file etc/inc/dslite.php...)
Patching file etc/inc/dslite.php using Plan A...
Empty context always matches.
Hunk #1 succeeded at 1.
Hmm...  The next patch looks like a unified diff to me...
The text leading up to this was:
--------------------------
|diff --git a/src/etc/inc/interfaces.inc b/src/etc/inc/interfaces.inc
|index b7e25bbd69..d060ed1413 100644
|--- a/src/etc/inc/interfaces.inc
|+++ b/src/etc/inc/interfaces.inc
--------------------------
Patching file etc/inc/interfaces.inc using Plan A...
Hunk #1 succeeded at 31.
Hunk #2 succeeded at 2963.
Hunk #3 succeeded at 3064.
Hunk #4 succeeded at 4165.
Hmm...  The next patch looks like a unified diff to me...
The text leading up to this was:
--------------------------
|diff --git a/src/etc/inc/system.inc b/src/etc/inc/system.inc
|index 2d25dc6802..1f30c4734e 100644
|--- a/src/etc/inc/system.inc
|+++ b/src/etc/inc/system.inc
--------------------------
Patching file etc/inc/system.inc using Plan A...
Hunk #1 succeeded at 443.
Hmm...  The next patch looks like a unified diff to me...
The text leading up to this was:
--------------------------
|diff --git a/src/etc/rc.newwanipv6 b/src/etc/rc.newwanipv6
|index d8e92a20dc..58bc302ecc 100755
|--- a/src/etc/rc.newwanipv6
|+++ b/src/etc/rc.newwanipv6
--------------------------
Patching file etc/rc.newwanipv6 using Plan A...
Hunk #1 succeeded at 38.
Hunk #2 succeeded at 63.
Hunk #3 succeeded at 95.
Hunk #4 succeeded at 148.
Hmm...  The next patch looks like a unified diff to me...
The text leading up to this was:
--------------------------
|diff --git a/src/opnsense/mvc/app/library/OPNsense/Routing/Gateways.php b/src/opnsense/mvc/app/library/OPNsense/Routing/Gateways.php
|index dd2567238c..a9e0eb8b88 100644
|--- a/src/opnsense/mvc/app/library/OPNsense/Routing/Gateways.php
|+++ b/src/opnsense/mvc/app/library/OPNsense/Routing/Gateways.php
--------------------------
Patching file opnsense/mvc/app/library/OPNsense/Routing/Gateways.php using Plan A...
Hunk #1 succeeded at 265.
Hmm...  The next patch looks like a unified diff to me...
The text leading up to this was:
--------------------------
|diff --git a/src/opnsense/service/conf/actions.d/actions_interface.conf b/src/opnsense/service/conf/actions.d/actions_interface.conf
|index c481e5b249..2188f68a59 100644
|--- a/src/opnsense/service/conf/actions.d/actions_interface.conf
|+++ b/src/opnsense/service/conf/actions.d/actions_interface.conf
--------------------------
Patching file opnsense/service/conf/actions.d/actions_interface.conf using Plan A...
Hunk #1 succeeded at 13.
Hmm...  The next patch looks like a unified diff to me...
The text leading up to this was:
--------------------------
|diff --git a/src/www/interfaces.php b/src/www/interfaces.php
|index b2a9e2951d..5df9fa7e1c 100644
|--- a/src/www/interfaces.php
|+++ b/src/www/interfaces.php
--------------------------
Patching file www/interfaces.php using Plan A...
Hunk #1 succeeded at 388.
Hunk #2 succeeded at 705.
Hunk #3 succeeded at 936.
Hunk #4 succeeded at 1162.
Hunk #5 succeeded at 1450.
Hunk #6 succeeded at 1857.
Hunk #7 succeeded at 2238.
Hmm...  The next patch looks like a unified diff to me...
The text leading up to this was:
--------------------------
|diff --git a/src/www/status_interfaces.php b/src/www/status_interfaces.php
|index 4c6dd04724..8c3710283b 100644
|--- a/src/www/status_interfaces.php
|+++ b/src/www/status_interfaces.php
--------------------------
Patching file www/status_interfaces.php using Plan A...
Hunk #1 succeeded at 289.
Hmm...  The next patch looks like a unified diff to me...
The text leading up to this was:
--------------------------
|diff --git a/src/www/widgets/widgets/interface_list.widget.php b/src/www/widgets/widgets/interface_list.widget.php
|index bddb4819f3..b202e99b85 100644
|--- a/src/www/widgets/widgets/interface_list.widget.php
|+++ b/src/www/widgets/widgets/interface_list.widget.php
--------------------------
Patching file www/widgets/widgets/interface_list.widget.php using Plan A...
Hunk #1 succeeded at 163.
done
All patches have been applied successfully.  Have a nice day.