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

    Creating pfSense 2.0 Developers ISO on FreeBSD Beta 8.1

    Scheduled Pinned Locked Moved Development
    70 Posts 6 Posters 44.6k 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.
    • jimpJ
      jimp Rebel Alliance Developer Netgate
      last edited by

      If you start with an ISO for 8.1-RC then it should be OK - but you still must install the source and such anyhow, and IIRC you need the files that a buildworld/buildkernel makes anyhow, so it really doesn't matter where you start as long as you end up with a recent RELENG_8_1 world, kernel, sources, etc.

      Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

      Need help fast? Netgate Global Support!

      Do not Chat/PM for help!

      1 Reply Last reply Reply Quote 0
      • T
        trijames
        last edited by

        HI Jimp,

        thanks again for the updated procedures - that seems to be getting me further.
        Unfortunately, I'm still having an issue:
        when I try to apply kernel patches - I get the following error:
        WARNING!  Rejected patches found!  Please fix before building!

        /usr/pfSensesrc/src/contrib/pf/pfctl/parse.y.rej
        /usr/pfSensesrc/src/sbin/ipfw/ipfw2.c.rej
        /usr/pfSensesrc/src/sys/contrib/pf/net/pf.c.rej
        …. (omitted for e-z reading)
        /usr/pfSensesrc/src/usr.bin/netstat/unix.c.rej
        ####################################
        Something went wrong, check errors!
        ####################################

        Did I screw up somewhere?  or is this a known problem.
        Sorry If I'm not too familiar with this build process - I'm doing it for the first time and trying to do it as systematic and logical as possible.
        How do I go about fixing this error?

        regards
        Trijames

        1 Reply Last reply Reply Quote 0
        • jimpJ
          jimp Rebel Alliance Developer Netgate
          last edited by

          That doesn't look familiar, but rejected patches are usually a sign that your source tree doesn't match up with what is expected, or that something was updated upstream (in FreeBSD) and the patches on pfSense may need adjusted.

          What settings did you use when you set the version to build?

          The contents of /home/pfsense/tools/builder-scripts/pfsense-build.conf would help.

          Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

          Need help fast? Netgate Global Support!

          Do not Chat/PM for help!

          1 Reply Last reply Reply Quote 0
          • T
            trijames
            last edited by

            Hi Jimp,

            thanks. 
            just fyi… I ended up using freebsd 8.1 RC1 as my base.
            Then i run through the steps as outlined.
            The version I set is RELENG_8_1...
            But it seems that my FREEBSD_BRANCH is 8_0 as shown below...
            Is there something wrong with that?

            Here's my pfsense-build.conf below.

            export PFSENSE_VERSION=2.0-BETA3
            export FREEBSD_VERSION=8
            export FREEBSD_BRANCH=RELENG_8_0
            export PFSENSETAG=HEAD
            export PFSPATCHFILE=/usr/home/pfsense/tools/builder_scripts/../builder_scripts/patches.RELENG_8_1
            export PFSPATCHDIR=/usr/home/pfsense/tools/builder_scripts/../patches/RELENG_8_1
            export SUPFILE=/usr/home/pfsense/tools/builder_scripts/../builder_scripts/RELENG_8-supfile
            export CUSTOM_COPY_LIST=/usr/home/pfsense/tools/builder_scripts/../builder_scripts/copy.list.RELENG_8_0
            export OVERRIDE_FREEBSD_CVSUP_HOST=cvsup4.us.freebsd.org
            export BASE_DIR=/usr/home/pfsense/tools/builder_scripts/../..
            export BUILDER_TOOLS=/usr/home/pfsense/tools/builder_scripts/..
            export BUILDER_SCRIPTS=/usr/home/pfsense/tools/builder_scripts
            export PFSPORTSFILE=buildports.RELENG_2_0
            freebsd81rc1386#

            1 Reply Last reply Reply Quote 0
            • jimpJ
              jimp Rebel Alliance Developer Netgate
              last edited by

              No that all looks right. Some things are named 8_0 and haven't been renamed to 8_1 yet, but they work for any 8, not just 8_0.

              Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

              Need help fast? Netgate Global Support!

              Do not Chat/PM for help!

              1 Reply Last reply Reply Quote 0
              • T
                trijames
                last edited by

                hi Jimp,

                interesting… I wonder why it's not working...
                here's the full text of the error I'm getting during apply-kernel-patches.sh
                If you have any ideas - I'm more than happy to try it out...

                Setting CVSUp host to cvsup4.us.freebsd.org
                Removing needed files listed in patches.RELENG_8_1 HEAD
                Obtaining FreeBSD sources RELENG_8-supfile...Done!
                Removing old patch rejects...
                Applying patches, please wait...Hunk #1 failed at 1637.
                Hunk #2 failed at 1669.
                2 out of 2 hunks failed--saving rejects to sys/net/if.c.rej
                Hunk #1 failed at 875.
                1 out of 1 hunks failed--saving rejects to sys/net/if_var.h.rej
                Hunk #1 failed at 519.
                Hunk #2 failed at 686.
                Hunk #3 failed at 797.
                3 out of 3 hunks failed--saving rejects to sys/net/route.c.rej
                Hunk #1 failed at 55.
                Hunk #2 failed at 674.
                2 out of 2 hunks failed--saving rejects to sys/net/rtsock.c.rej
                Hunk #1 failed at 1379.
                1 out of 1 hunks failed--saving rejects to sys/netinet/in.c.rej
                Hunk #1 failed at 590.
                Hunk #2 failed at 707.
                2 out of 2 hunks failed--saving rejects to sys/netinet/in_pcb.c.rej
                Hunk #1 failed at 230.
                1 out of 1 hunks failed--saving rejects to sys/netinet/ip_options.c.rej
                Hunk #1 failed at 247.
                1 out of 1 hunks failed--saving rejects to sys/netinet/ip_output.c.rej
                Done!
                Finding patch rejects...

                WARNING!  Rejected patches found!  Please fix before building!

                /usr/pfSensesrc/src/sys/net/if.c.rej
                /usr/pfSensesrc/src/sys/net/if_var.h.rej
                /usr/pfSensesrc/src/sys/net/route.c.rej
                /usr/pfSensesrc/src/sys/net/rtsock.c.rej
                /usr/pfSensesrc/src/sys/netinet/in.c.rej
                /usr/pfSensesrc/src/sys/netinet/in_pcb.c.rej
                /usr/pfSensesrc/src/sys/netinet/ip_options.c.rej
                /usr/pfSensesrc/src/sys/netinet/ip_output.c.rej

                ####################################
                Something went wrong, check errors!
                ####################################

                1 Reply Last reply Reply Quote 0
                • T
                  trijames
                  last edited by

                  Hi Jimp,

                  in case it helps - here's exactly the steps I'm doing:

                  1.) install freebsd 8.1 RC1

                  2.) update the kernel source with csup
                  2a.) copy the supfile to the /etc

                  cp /usr/share/examples/cvsup/standard-supfile /etc/supfile

                  2b.) edit the supfile

                  vi /etc/supfile

                  2c.) add the csup server
                  host=CHANGE_THIS.FreeBSD.org
                  Change to:
                  host=cvsup4.us.FreeBSD.org
                  2d.) run csup
                  #> csup /etc/supfile

                  3.) build the kernel

                  cd /usr/src

                  make buildworld

                  make buildkernel

                  make installkernel

                  shutdown -r now

                  4.) boot into single user mode

                  boot -s from the boot loader prompt

                  adjkerntz -i

                  mount -a -t ufs

                  mergemaster -p

                  cd /usr/src

                  make installworld

                  mergemaster

                  reboot

                  5.) update the ports directory using csup

                  rm -fr /usr/ports/*

                  csup -L 2 /etc/supfile

                  6.) configure make (step 1 from devwiki.pfsense/org/DevelopersBootStrapAndevIso)

                  echo "WITHOUT_X11=yo" >> /etc/make.conf

                  mkdir -p /home/pfsense/pfSenseGITREPO /home/pfsense/installer /usr/pfSensesrc

                  7.) grab ports and build GIT

                  portsnap fetch extract

                  cd /usr/ports/textproc/expat2 && make depends install

                  cd /usr/ports/devel/git && make depends install

                  (take the standard default settings from the menu's)

                  cd /usr/ports/sysutils/fastest_cvsup/ && make depends install

                  (take the standard default settings from the menu's)

                  rehash

                  8.) continue on with the GIT repo checkouts

                  cd /home/pfsense && git clone http://gitweb.pfsense.org/pfsense-tools/mainline.git tools

                  cd /home/pfsense && git clone http://gitweb.pfsense.org/freesbie2/mainline.git freesbie2

                  cd /home/pfsense/tools/builder_scripts && chmod a+rx *.sh

                  9.) now do the pfsense stuff

                  cd /home/pfsense/tools/builder_scripts

                  ./set_version.sh RELENG_8_1 cvsup4.us.freebsd.org

                  ./apply_kernel_patches.sh

                  (here's where I get the reject errors…)

                  (the rest I don't get to because of the above errors)

                  cd /home/pfsense/tools/pfPorts/php5; make all install clean

                  cd /home/pfsense/tools/pfPorts/php5-pfSense-module/; make all install clean

                  cd /usr/ports/devel/readline/; make all install clean

                  10 now create the ISO

                  cd/ home/pfsense/tools/builder_scripts

                  ./build_iso.sh

                  1 Reply Last reply Reply Quote 0
                  • T
                    trijames
                    last edited by

                    Hi Jimp,

                    one more thing - I'm building this as a VM… could that be the cause?

                    regards
                    TJ

                    1 Reply Last reply Reply Quote 0
                    • jimpJ
                      jimp Rebel Alliance Developer Netgate
                      last edited by

                      VM is fine, nothing wrong with that.

                      Just checked on our main snapshot builder and the patches are failing there, too, so it must be an upstream update that happened.

                      EDIT: I restarted the build and it worked. Try updating the sources, git repos, etc, and then make another attempt.

                      Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

                      Need help fast? Netgate Global Support!

                      Do not Chat/PM for help!

                      1 Reply Last reply Reply Quote 0
                      • T
                        trijames
                        last edited by

                        Hi Jimp,

                        ok I guess that's good news - and will get fixed soon. 
                        What I notice is that the errors are all related to the tcp stack
                        ip.c
                        route.c
                        rtsock.c
                        etc…

                        So, would seem to me that something has changed there.
                        What does it mean when these are "rejects"?  Is it basically a 'diff' that found between the freebsd baseline and pfrsense baseline?

                        regards
                        TJ

                        1 Reply Last reply Reply Quote 0
                        • T
                          trijames
                          last edited by

                          Oh - I just saw your updated EDIT…
                          Ok - I'll try to update and see if that works...
                          Which source should I update?  kernel? or pfsense? or both?

                          regards
                          TJ

                          1 Reply Last reply Reply Quote 0
                          • jimpJ
                            jimp Rebel Alliance Developer Netgate
                            last edited by

                            Try this:

                            # cd/ home/pfsense/tools/builder_scripts
                            # ./update_git_repos.sh
                            # ./build_iso.sh
                            
                            

                            Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

                            Need help fast? Netgate Global Support!

                            Do not Chat/PM for help!

                            1 Reply Last reply Reply Quote 0
                            • T
                              trijames
                              last edited by

                              Jimp,

                              not sure if I understand…
                              Just in case - I want to check my thinking:
                              1.) should I not do the following:
                                # ./apply_kernel_patches.sh
                                # cd /home/pfsense/tools/pfPorts/php5; make all install clean
                                # cd /home/pfsense/tools/pfPorts/php5-pfSense-module/; make all install clean
                                # cd /usr/ports/devel/readline/; make all install clean

                              So even though apply_kernel_patches.sh failed - I should instead do update_git_repos.sh?
                              And also skip the rest?  Is that right?

                              Or should I still do the above steps and then also do the update_git_repos.sh?

                              regards
                              TJ

                              1 Reply Last reply Reply Quote 0
                              • jimpJ
                                jimp Rebel Alliance Developer Netgate
                                last edited by

                                Whatever you do, do update_git_repos.sh first. I'd just try to build the iso first and see what happens. It should do some of that automatically, but if it fails, then fall back to doing those steps (apply patches, build those ports, etc)

                                Though you can compile those ports whether or not the kernel patches apply

                                Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

                                Need help fast? Netgate Global Support!

                                Do not Chat/PM for help!

                                1 Reply Last reply Reply Quote 0
                                • T
                                  trijames
                                  last edited by

                                  ah ok - excellent.  I'll give that a try.

                                  1 Reply Last reply Reply Quote 0
                                  • jimpJ
                                    jimp Rebel Alliance Developer Netgate
                                    last edited by

                                    That didn't work. I had to adjust the supfile to have a date, and go back a few days. If you update_git_repos.sh again and then redo the build it should succeed.

                                    Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

                                    Need help fast? Netgate Global Support!

                                    Do not Chat/PM for help!

                                    1 Reply Last reply Reply Quote 0
                                    • T
                                      trijames
                                      last edited by

                                      Jimp,

                                      does it matter which which shell I use to run these?
                                      I just saw a warning about ksh as below in the build_iso.sh

                                      "the O_NONBLOCK symbol with a syntax error.  This is apparently a
                                      sh error.  Rerunning Configure with ksh apparently fixes the
                                      error, then please read the section "64 bit data in perl 5.6.0 and 5.6.1"

                                      (I'm building the i386 version)

                                      regards
                                      TJ

                                      1 Reply Last reply Reply Quote 0
                                      • T
                                        trijames
                                        last edited by

                                        Hi Jimp,

                                        I am getting the following errors when running build_iso.sh - but it continues to run…
                                        Did I forget a step?

                                        ERROR Building dnsmasq
                                        ERROR Building php5-curl
                                        ERROR Building php5-mhash
                                        ERROR Building php5-pcre
                                        ERROR Building php5-pfSense-module
                                        ERROR Building php5-readline
                                        ERROR Building syslog-ng
                                        ERROR Building 3gstat_um175
                                        ERROR Building wrapalixresetbutton

                                        1 Reply Last reply Reply Quote 0
                                        • T
                                          trijames
                                          last edited by

                                          Hi Jimp,

                                          one more post …

                                          at the end of build_iso.sh - I still get the error.
                                          (sorry about all the posts...)

                                          WARNING!  Rejected patches found!  Please fix before building!

                                          /usr/pfSensesrc/src/sys/net/if.c.rej
                                          /usr/pfSensesrc/src/sys/net/if_var.h.rej
                                          /usr/pfSensesrc/src/sys/net/route.c.rej
                                          /usr/pfSensesrc/src/sys/net/rtsock.c.rej
                                          /usr/pfSensesrc/src/sys/netinet/in.c.rej
                                          /usr/pfSensesrc/src/sys/netinet/in_pcb.c.rej
                                          /usr/pfSensesrc/src/sys/netinet/ip_options.c.rej
                                          /usr/pfSensesrc/src/sys/netinet/ip_output.c.rej

                                          1 Reply Last reply Reply Quote 0
                                          • jimpJ
                                            jimp Rebel Alliance Developer Netgate
                                            last edited by

                                            Not sure what is up with those port building errors, especially the wrapalixresetbutton port as that is very simple and should not fail. You might try to make that one by hand to see what the actual error is:

                                            # cd tools/pfPorts/wrapalixresetbutton/; make all
                                            

                                            As for those rejects, they may be leftover from when they did fail. You might need to run:

                                            # ./clean_build.sh
                                            

                                            Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

                                            Need help fast? Netgate Global Support!

                                            Do not Chat/PM for help!

                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post
                                            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.