Need help with error message on pFsense 2.1 package builder system
-
I have created two virtual machine environments for binary package development and testing for pfSense. I followed the process for setting these up as outlined in the DevelopersBootstrapAndDevIso article on the Development Wiki. One setup is FreeBSD 8.1 for the 2.0.x pfSense series, and the other setup is a FreeBSD 8.3 install for use with 2.1 pfSense platforms.
My 2.0.x builder platform works fine. I can build ISO images, and I can also successfully build binary packages (such as Snort) and produce the *.tbz files using the script /home/pfsense/tools/builder_scripts/rebuild_package_binaries.php. I did have to deviate a bit from that Wiki document by installing PHP in order to get the builder script to work. Another step I had to do that was not well documented was run the checkout_pfsense_sources.sh script in the builder_scripts directory. Until I did that step, the script would die complaining of unknown functions due to missing include files.
Now on to my problem. I followed the same steps to configure my 2.1 builder environment. I can also successfully build an ISO over there, but when I try to run the script rebuild_package_binaries_pbi.php to make PBI-compliant binary packages, I get the following error:
cd: can't cd to /cf/conf/backup Config.xml is corrupted and is 0 bytes. Could not restore a previous backup.
Anyone have a suggestion, tip or solution to this error?
Thanks
Bill
-
You shouldn't have to build PHP by hand, you should be running "./build_pfPorts.sh" before doing anything else, which will build PHP and all of the other required packages.
A package builder is really just an ISO builder. If you can get it to produce an ISO image, then it should also make packages. It's probably trying to do a chroot into some directory it expects to be populated with a built pfSense image.
When in doubt, I blow away the ports on the builder and redo them.
portsnap fetch extract find /usr/ports -type d -name work -exec rm -rf {} \; pkg_delete \* rehash cd /usr/ports/ports-mgmt/portupgrade/ && make config-recursive install clean rehash portinstall --config textproc/expat2 devel/git sysutils/fastest_cvsup sysutils/screen devel/subversion net/rsync rehash rm /tmp/pfSense_do_not_build_pfPorts cd /home/pfsense/tools/builder_scripts/ ./update_git_repos.sh && ./clean_build.sh && ./apply_kernel_patches.sh ./build_pfPorts.sh rehash
-
Thanks jimp. I will give that a try. I was mistakenly thinking I should be able to build an individual package without having to build all of them first.
I assume, though, that once I build them "all" once, that I can then probably come back and build just an individual port using the PHP script so long as I don't clean them out. If this assumption is incorrect, then let me know.
Bill
-
Yeah that's fine, once they're built you don't have to build them again. The PBI builds are isolated
The first PBI build run will take a while since it has to rebuild its own world and such for PBIs but after that it's not too long.
The first run should look something like this:
/home/pfsense/tools/builder_scripts/rebuild_package_binaries_pbi.php -x/home/pfsense/packages/pkg_config.8.xml.amd64 -sRELENG_8_3 -p"snort"
Subsequent runs can use this to shorten the run a bit (skip kernel patches and skip make includes):
/home/pfsense/tools/builder_scripts/rebuild_package_binaries_pbi.php -x/home/pfsense/packages/pkg_config.8.xml.amd64 -sRELENG_8_3 -P -I -p"snort"
Leave off the .amd64 if you're on an i386 builder of course.
-
I understand now. Thanks for the help. I'll just revert as you suggested above and start over the "right way" this time. Quite easy to do since it's all virtual machines. VMware snapshots are nice!
Bill
-
Yep, they do make things easy.
also make sure to watch the spacing on the command I put in above, some options are quite picky about where spaces are/are not (PHP's getopt is a bit weird sometimes)