From owner-freebsd-questions@freebsd.org Tue Dec 8 15:12:35 2015 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EDB709B9E2A for ; Tue, 8 Dec 2015 15:12:34 +0000 (UTC) (envelope-from freebsd@ravexdata.com) Received: from mail-wm0-f46.google.com (mail-wm0-f46.google.com [74.125.82.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 943EB10AF for ; Tue, 8 Dec 2015 15:12:34 +0000 (UTC) (envelope-from freebsd@ravexdata.com) Received: by wmuu63 with SMTP id u63so184811809wmu.0 for ; Tue, 08 Dec 2015 07:12:27 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:references:to:from:message-id:date :user-agent:mime-version:in-reply-to:content-type :content-transfer-encoding; bh=snXq9Yx7EuT+rP6y6MRo8BVlJNMh5gDZN7ltmtP3D2g=; b=efRHD3uXEAFbrXFWDbkj1/SAZjAfgOWfl9YWNhexAHvQ2xvcmQXiRABmlFs/E/cY+2 kNIh4iTb/7JfYRcgka9HsNASUFMSk2+TFivT1r4l0D3Wqc5b1i12Xrw49gKxtgN3oNsQ SFd55HOKSjkh8E+zlkQ9WC2lERkB6gxNb+aQqPWwg+hnzs4sDOSjHhNN99QHrEUKEzBy oOfO30sPGzDM/T3ZgRH3mVtm3MQecAkQjPHAwJhAvtyJKpj8HieELc19cCKLIUNayBqe t1EXBL+1EOfoGC+iuyWxcAcz9Dx4jZ9GqJmO3/iP7x5EMJy7+6IesyI85UzUebLOit1b ifqw== X-Gm-Message-State: ALoCoQnF0TyhE0pN3sX/2mL0bOxEbR0P2LGFiGBLUlstAwWqk4UrWN3ftPQuVWCQI1OWgPDpDxNBoMHTM57z1dUALDql500k7g== X-Received: by 10.28.126.215 with SMTP id z206mr28798629wmc.71.1449587113178; Tue, 08 Dec 2015 07:05:13 -0800 (PST) Received: from [10.31.1.6] ([104.238.169.132]) by smtp.gmail.com with ESMTPSA id z13sm3329829wjr.47.2015.12.08.07.05.11 for (version=TLSv1/SSLv3 cipher=OTHER); Tue, 08 Dec 2015 07:05:11 -0800 (PST) Subject: Re: Migrating to FreeBSD from Debian References: <86io4a6l2w.fsf@WorkBox.Home> To: freebsd-questions@freebsd.org From: Paul Stuffins Message-ID: <5666F1A3.6020905@ravexdata.com> Date: Tue, 8 Dec 2015 15:05:07 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: <86io4a6l2w.fsf@WorkBox.Home> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Dec 2015 15:12:35 -0000 On 07/12/2015 20:49, Brandon J. Wandersee wrote: > Paul Stuffins writes: > >> Hi Everybody, >> As 2016 is fast approaching I want to finally move to FreeBSD and stay with >> FreeBSD, so my question is, what is the best or most efficient way of >> upgrading all ports on a FreeBSD machine? > > Right, so since this kinda derailed quickly, I'll try to answer this > clearly and comprehensively. I moved from Arch Linux to FreeBSD myself > just over a year ago, so I'll try to iron some things out for you, since > it took me some time to sort all this out myself and I sympathize. > > The package package manager isn't drastically different from pacman or > dpkg/apt, so you should find understanding it pretty easy. Just read the > man pages and the relevant section of the Handbook for the > basics. Beyond that, though, there are some characteristics of the > packages and repository that need to be understood. First, in almost > every case a single port is built into a single package with a fairly > sane set of default options. Even in cases where multiple versions of an > application exist--such as Emacs--there is a corresponding port with a > different set of options. So if you're lucky, you'll be able to use > packages for everything you need. If there's any application built > without an option you want, you'll have to build it from the ports tree. > > This raises some caveats. For one thing, while packages are built and > the repository updated several times a week (up from just two or three > times a week when I first started--great work, folks), as of now it's > not a continuous process. This means the ports tree (which works by a > rolling-release model) is always a few hours to a couple days ahead of > what you'll find in the repository, raising the possibility of > dependency conflicts if you mix ports with precompiled packages. For > another, if you try upgrading your binary packages using `pkg update && > pkg upgrade`, pkg(8) will also replace your personally compiled ports > with the most recent default versions found in the package repository. > > There are two ways to avoid these issues. If you just have, say, two or > three ports to manage, you can use pkg-lock(8) to prevent pkg(8) from > messing with your ports. You can then upgrade your packages as usual, > and then use ports-mgmt/portmaster or ports-mgmt/portupgrade to upgrade > your ports afterward. This can be a little tedious, as (a) you'd need to > use Subversion to synchronize your local ports tree to the revision used > to build the most recent set of packages, which must be done manually; > and (b) you would need to use `pkg unlock` on your custom package before > upgrading them (but *after* upgrading your vanilla packages), and then > run `pkg lock` on them again after upgrading. So it would require > building some new habits. There are a couple sripts I've seen that are > supposed to synchronize your ports to the package repo automatically, > but last I checked they hadn't been updated for 10.2 and did not work > for -STABLE or -CURRENT. > > If you have more than a few ports to build, or don't mind waiting a few > months between package upgrades (you are a Debian user, after all), you > can just use the quarterly repository and ports tree, which are always > kept in sync and updated every three months. As of FreeBSD 10.2 the > quarterly package repository is used by default on new installs, and > fetching the quarterly ports tree with Subversion is easy enough (it's > in the same SVN repo as the main ports tree). So this is definitely the > easier way to go if you want to mix ports with packages. > > Of course, if you have lots of ports you want to customize, you might > just skip packages entirely and stick with ports. In that case, > ports-mgmt/portmaster seems to be the semi-official way of handling > things. You'd just run `portmaster -a` to upgrade all installed > ports. If there are any new options available in a new version of the > port, portmaster will prompt you to check your options interactively > before continuing. > > You could also use ports-mgmt/poudriere to build custom packages into a > locak repository; it's the same build system used for the official > package repository. Setting it up the first time takes a little work, > but it would allow you to build from either the rolling or quarterly > ports tree as you see fit, and updating is just a matter of fetching the > latest commit of whichever ports tree you're tracking and running the > build command. I use it myself, and love it. Poudriere is quicker and > more efficient than Portmaster on machines with plenty of RAM and > multi-core CPUs. > > Since the ports system and package manager are tied to each other, once > a port is installed you can perform any actions you see fit on it using > pkg(8). It's all the same at that point. And as was already mentioned, > always make sure to read /usr/ports/UPDATING (or run `pkg updating`) > before proceeding to see announcements about any special measures that > need to be taken. Hope this all helps a bit. > Hi Brandon, Thanks for your detailed answer. For the moment I have decided I will use pkg, as I only have a few things that need to be installed on this one system. Many Thanks Paul