{"id":241,"date":"2016-07-21T15:41:03","date_gmt":"2016-07-21T15:41:03","guid":{"rendered":"http:\/\/blog.ignoranthack.me\/?p=241"},"modified":"2016-07-21T15:41:03","modified_gmt":"2016-07-21T15:41:03","slug":"sometimes-less-is-more-checkout-individual-freebsd-ports-for-testing","status":"publish","type":"post","link":"http:\/\/blog.ignoranthack.me\/?p=241","title":{"rendered":"Sometimes less is more.  Checkout individual #FreeBSD ports for testing."},"content":{"rendered":"<p>I needed to test a single FreeBSD port today for a specific release.\u00a0 The FreeBSD project maintains a series of reference build machines for this type of work, but normally I maintain an entire ports tree checkout for this type of work.<\/p>\n<p>The FreeBSD ports tree has 20k+ individual software packages maintained in it, and I was not in the mood to checkout all of that onto a host for the purpose of validating a build of QEMU on FreeBSD 10.<\/p>\n<p>Turns out, if you pay attention, you can indeed do some individual checkouts of things in a sparse fashion and get results that are useful.\u00a0 Your mileage may vary here depending on the needed dependencies, but this should be a useful hint to getting started.<\/p>\n<p>I will only address how to do this with Subversion, but I&#8217;m sure that the folks who use git will have no trouble seeing how to duplicate this scenario.<\/p>\n<ul>\n<li>svn co &#8211;depth files svn+ssh:\/\/repo.freebsd.org\/ports\/head fbsd_ports<\/li>\n<li>cd fbsd_ports<\/li>\n<li>svn co svn+ssh:\/\/repo.freebsd.org\/ports\/head\/Mk<\/li>\n<li>svn co svn+ssh:\/\/repo.freebsd.org\/ports\/head\/Templates<\/li>\n<li>svn co &#8211;depth files svn+ssh:\/\/repo.freebsd.org\/ports\/head\/lang<\/li>\n<li>cd lang<\/li>\n<li>svn co svn+ssh:\/\/repo.freebsd.org\/ports\/head\/lang\/perl5.20<\/li>\n<li>svn co svn+ssh:\/\/repo.freebsd.org\/ports\/head\/lang\/python27<\/li>\n<li>cd ..<\/li>\n<li>svn co &#8211;depth files svn+ssh:\/\/repo.freebsd.org\/ports\/head\/emulators<\/li>\n<li>cd emulators<\/li>\n<li>svn co svn+ssh:\/\/repo.freebsd.org\/ports\/head\/emulators\/qemu-user-static<\/li>\n<li>svn co svn+ssh:\/\/repo.freebsd.org\/ports\/head\/emulators\/qemu-sbruno<\/li>\n<\/ul>\n<p>My goal, was to build qemu-user-static for FreeBSD 10.\u00a0 There&#8217;s a bunch of dependencies here, so I&#8217;ll try and unwind them a bit.<\/p>\n<p>In order to build any port, you need the files contained in the top of tree.\u00a0 The support Makefiles in Mk\/ and Templates\/ are required to do a lot of things and may or may not be used as short cuts\/helpers in the Makefiles of individual ports.<\/p>\n<p>The Makefile of any directory that you traverse to get to your port will need to exist (emulators\/Makefile for example)<\/p>\n<p>The lang\/perl and lang\/python ports are needed here as there is some pollution in the Makefiles that requires something to be parsed during builds.\u00a0 This probably shouldn&#8217;t be there, but is beyond the scope of what I wanted to get done this morning.<\/p>\n<p>Checking out the individual ports into their proper locations and setting PORTSDIR in your environment to your new directory structure (\/home\/sbruno\/fbsd_ports) will now allow you to use your new checkout in some fashion to build.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I needed to test a single FreeBSD port today for a specific release.\u00a0 The FreeBSD project maintains a series of reference build machines for this type of work, but normally I maintain an entire ports tree checkout for this type of work. The FreeBSD ports tree has 20k+ individual software packages maintained in it, and [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"ngg_post_thumbnail":0,"_share_on_mastodon":"0"},"categories":[2],"tags":[],"share_on_mastodon":{"url":"","error":""},"_links":{"self":[{"href":"http:\/\/blog.ignoranthack.me\/index.php?rest_route=\/wp\/v2\/posts\/241"}],"collection":[{"href":"http:\/\/blog.ignoranthack.me\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/blog.ignoranthack.me\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/blog.ignoranthack.me\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/blog.ignoranthack.me\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=241"}],"version-history":[{"count":1,"href":"http:\/\/blog.ignoranthack.me\/index.php?rest_route=\/wp\/v2\/posts\/241\/revisions"}],"predecessor-version":[{"id":242,"href":"http:\/\/blog.ignoranthack.me\/index.php?rest_route=\/wp\/v2\/posts\/241\/revisions\/242"}],"wp:attachment":[{"href":"http:\/\/blog.ignoranthack.me\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=241"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/blog.ignoranthack.me\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=241"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/blog.ignoranthack.me\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=241"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}