From f60756b03fff98162afb364ac1620507745b4a45 Mon Sep 17 00:00:00 2001 From: jrmarino Date: Mon, 29 Apr 2013 23:22:54 -0700 Subject: [PATCH] Update for Release 3.4 (merge with previous) --- docs/howtos/HowToDPorts/index.mdwn | 42 +++++++++++++++++++++--------- 1 file changed, 29 insertions(+), 13 deletions(-) diff --git a/docs/howtos/HowToDPorts/index.mdwn b/docs/howtos/HowToDPorts/index.mdwn index 16899294..5f56067a 100644 --- a/docs/howtos/HowToDPorts/index.mdwn +++ b/docs/howtos/HowToDPorts/index.mdwn @@ -10,30 +10,46 @@ pkg is used for package management, and is usable on FreeBSD, PC-BSD, and on Dra Every port seen in DPorts is known to build on DragonFly. A port is added only after it builds successfully, using poudriere as a bulk software tool. Ports are only updated to a newer version when that newer version builds, too, so once something arrives in DPorts, it should never break from being updated at some point in the future. -## Installing binaries +## Most people want pre-built binary packages rather than building from source. -The pkg tool can be used to install packages, manage them, and so on, as mentioned previously. +The 3.4 Release of DragonFly is the first to provide official repositories. It also provides pkg and pkg.conf preinstalled with the release repository pre-selected. -To set a repository source for binary packages, edit /usr/local/pkg.conf and add a line like this: +The /usr/local/etc/pkg.conf is predefined as: - PACKAGESITE: http://URL-TO-REPOSITORY/ + PACKAGESITE: http://avalon.dragonflybsd.org/dports/${ABI}/RELEASE -Binary packages have been created for the DragonFly 3.4 release and -are available on a few mirrors. Use one of these URLs in pkg.conf: +The user would first run "pkg update" to download the inventory from the PACKAGES. From there the user can browse the repository, install packages, etc. "pkg help" and "man pkg" has a wealth of information and much of the FreeBSD handbook is pertinent: [http://www.freebsd.org/doc/en/books/handbook/pkgng-intro.html](5.5 Using pkgng for Binary Package Management). + +The RELEASE repository is static, but the LATEST repository is periodically updated. If bleeding edge is what you want, change pkg.conf to reflect that: + + PACKAGESITE: http://avalon.dragonflybsd.org/dports/${ABI}/LATEST + +DragonFly 3.5 users can also use pre-build binary packages, but they will need to override the ABI in pkg.conf: + + ABI: dragonfly:3.4:x86:32 # for i386 platform + ABI: dragonfly:3.4:x86:64 # for x86-64 platform + +There are already a few mirrors available which can be set in pkg.conf * North America: http://avalon.dragonflybsd.org/dports/${ABI}/LATEST * Europe: http://pkg.wolfpond.org/${ABI}/LATEST * Europe: http://mirrors.ircam.fr/pub/DragonFlyBSD-dports/${ABI}/LATEST -Replace LATEST by RELEASE if you want to use the first packages created for the release, without any subsequent update. +## Building DPorts from source + +The average user will probably not build packages from source. However, it's easy to do and it can be done even when packages have already been pre-installed on the system. Common reasons to build from source are: -## Installing DPorts +* The port is new and there's no pre-binary available yet +* The pre-built binaries use the default options and the user needs a package built with a different set of options +* Testing FreeBSD port in order to patch them and submit to dports +* The user just prefers building from source -To use DPorts, you need two things: +### Installing DPorts tree -*First thing:* DragonFly 3.3 or later,. +DragonFly 3.3 or later is the minimum version that can build dports from source. -*Second thing:* You need to rename /usr/pkg so that your existing pkgsrc binary programs don’t get accidentally used while working with DPorts, causing confusion. If anything goes wrong with DPorts when you are installing it and you want to go back, remove all the DPorts packages and rename /usr/pkg back to normal. (Don’t confuse pkg, the management tool, with /usr/pkg, the normal installation directory for pkgsrc. ) For the installation of the base port files: +It's probable that pkgsrc binaries are already installed. It is necessary to +rename /usr/pkg so that the existing pkgsrc binary programs don’t get accidentally used while building DPorts, causing breakage. If anything goes wrong with DPorts when you are installing it, you can go back by removing all the DPorts packages with "pkg delete -ay" and renaming /usr/pkg back to normal. (Don’t confuse pkg, the management tool, with /usr/pkg, the normal installation directory for pkgsrc. ) For the installation of the base port files: cd /usr make dports-create-shallow @@ -45,7 +61,7 @@ If you’ve already renamed your /usr/pkg directory, git won’t be in your path Downloading via git is fastest, so if you do need to use the tarball via make dports-download, build devel/git, delete /usr/dports, and then pull it again with make dports-create-shallow. This all comes from [John Marino’s Github site for DPorts](https://github.com/jrmarino/DPorts/#readme). -## Managing DPorts +### Managing DPorts DPorts doesn’t use pkg_info, pkg_add, and the other tools traditionally seen on DragonFly for pkgsrc. Instead, package management is done with pkg. Use pkg info, pkg install, pkg remove, and pkg update to list, install, delete, and upgrade various packages on your system. Packages built from source or downloaded as prebuilt binaries are managed the same way, using these tools. @@ -53,7 +69,7 @@ See some of the [other](https://mebsd.com/make-build-your-freebsd-word/pkgng-fir Since DPorts doesn’t update a package until it gets a successful build, and installations are of successfully built binary packages, upgrades with prebuilt packages should always succeed. Since they’re binary, they should be fast. There’s a lot of ‘shoulds’ in this sentence, but these are reasonable suppositions. -## Building from source +### Building Building from source works similar to ports and pkgsrc: cd into the appropriate program's directory, and type 'make'. 'make install' to install the software, 'make clean' to clean up work files, and so on. Use 'make config-recursive' if you want to set all the port's options, and the options of its dependencies, immediately instead of during the build. -- 2.41.0