• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login
Netgate Discussion Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login

How to setup development env for port?

Scheduled Pinned Locked Moved Development
10 Posts 2 Posters 562 Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R
    rickyzhang
    last edited by Aug 4, 2019, 1:01 PM

    I'm a Linux guy. I'm new to FreeBSD and pfSense.

    I want to patch one of broken port from pfSense. But I have no idea how to start with development env.

    I got FreeBSD 12 virtual box and ARM version SD card image.

    Are there any guide how to develop/patch port?

    1 Reply Last reply Reply Quote 0
    • J
      johnpoz LAYER 8 Global Moderator
      last edited by johnpoz Aug 4, 2019, 1:34 PM Aug 4, 2019, 1:34 PM

      https://docs.netgate.com/pfsense/en/latest/development/index.html#general-development-information

      What exactly are you looking to fix?

      An intelligent man is sometimes forced to be drunk to spend time with his fools
      If you get confused: Listen to the Music Play
      Please don't Chat/PM me for help, unless mod related
      SG-4860 24.11 | Lab VMs 2.7.2, 24.11

      1 Reply Last reply Reply Quote 0
      • R
        rickyzhang
        last edited by Aug 4, 2019, 1:38 PM

        I already read that. But I want a guide how to setup build tools like GCC, compile port and etc.

        1 Reply Last reply Reply Quote 0
        • J
          johnpoz LAYER 8 Global Moderator
          last edited by johnpoz Aug 4, 2019, 3:17 PM Aug 4, 2019, 3:14 PM

          You would do it pretty much the same way you would do it on linux..
          https://www.freebsd.org/doc/en_US.ISO8859-1/books/developers-handbook/

          Fire up freebsd version that version of pfsense is using, install the build tools. Compile what your looking to compile - last time I did this was a fix to the TTL for dhcp client..

          wow that was back in 2012 ;)
          https://forum.netgate.com/topic/47131/change-ttl-value-of-dhcp-requests

          An intelligent man is sometimes forced to be drunk to spend time with his fools
          If you get confused: Listen to the Music Play
          Please don't Chat/PM me for help, unless mod related
          SG-4860 24.11 | Lab VMs 2.7.2, 24.11

          1 Reply Last reply Reply Quote 0
          • R
            rickyzhang
            last edited by Aug 4, 2019, 6:35 PM

            Thanks for your link. I found the FreeBSD port doc as well.

            https://www.freebsd.org/doc/en/books/porters-handbook/

            My obstacle is the following:

            1. Should I use pfSense or FreeBSD as development env?

            2. Should I use amd64 to cross compile or use FreeBSD ARM image to do native compile in qemu emulation?

            1 Reply Last reply Reply Quote 0
            • J
              johnpoz LAYER 8 Global Moderator
              last edited by Aug 4, 2019, 6:36 PM

              you would use freebsd, which is what pfsense runs on..

              An intelligent man is sometimes forced to be drunk to spend time with his fools
              If you get confused: Listen to the Music Play
              Please don't Chat/PM me for help, unless mod related
              SG-4860 24.11 | Lab VMs 2.7.2, 24.11

              1 Reply Last reply Reply Quote 0
              • R
                rickyzhang
                last edited by Aug 4, 2019, 6:57 PM

                Thanks for your advice. I will get FreeBSD VM image version matching with pfSense.

                But how do I hook up my FreeBSD VM to pfSense patched port from https://github.com/pfsense/FreeBSD-ports?

                The FreeBSD port documentation doesn't explain how to replace their port with others.

                1 Reply Last reply Reply Quote 0
                • J
                  johnpoz LAYER 8 Global Moderator
                  last edited by Aug 4, 2019, 8:44 PM

                  What are you trying to fix??

                  An intelligent man is sometimes forced to be drunk to spend time with his fools
                  If you get confused: Listen to the Music Play
                  Please don't Chat/PM me for help, unless mod related
                  SG-4860 24.11 | Lab VMs 2.7.2, 24.11

                  1 Reply Last reply Reply Quote 0
                  • R
                    rickyzhang
                    last edited by Aug 4, 2019, 9:16 PM

                    It is a stupid SQL syntax issue. It is a showstopper to log alert to MariaDB. The bug has been fixed two years ago in Barnyard2 Git repo. But it seems that it may be not in FreeBSD.

                    1 Reply Last reply Reply Quote 0
                    • J
                      johnpoz LAYER 8 Global Moderator
                      last edited by johnpoz Aug 4, 2019, 9:35 PM Aug 4, 2019, 9:28 PM

                      Trying to think who maintains the stuff for snort.. This is related to that I take it..

                      Prob be easier to just post up the "fix" and who maintains the package/port for pfsense could include it if they agree with the fix, etc.

                      You might notice that my fix was for a like 1 person ;) But did submit it to freebsd, and it got finally pushed down.

                      edit: Ah I see @bmeeks is already in your other thread - yeah that would be "the guy" to help for sure!!

                      An intelligent man is sometimes forced to be drunk to spend time with his fools
                      If you get confused: Listen to the Music Play
                      Please don't Chat/PM me for help, unless mod related
                      SG-4860 24.11 | Lab VMs 2.7.2, 24.11

                      1 Reply Last reply Reply Quote 1
                      10 out of 10
                      • First post
                        10/10
                        Last post
                      Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
                        This community forum collects and processes your personal information.
                        consent.not_received