From 6e0f3af463e9ebef053c13c3135f6ce962ca4fc8 Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Wed, 26 Dec 2018 17:37:16 -0600 Subject: Dev: ch01: initial work on fixing --- src/devel/1_preparing.xml | 104 +++++++++++++++++----------------------------- 1 file changed, 38 insertions(+), 66 deletions(-) (limited to 'src/devel/1_preparing.xml') diff --git a/src/devel/1_preparing.xml b/src/devel/1_preparing.xml index 8ca764c..8b37df8 100644 --- a/src/devel/1_preparing.xml +++ b/src/devel/1_preparing.xml @@ -1,36 +1,37 @@ Preparing Your System - Welcome to the Adélie Linux 1.0 Developer's Handbook. This handbook will teach you how to develop the software and packages that powers the Adélie Linux distribution. You may follow along at your own pace. - We'll start with installing the software and writing the configuration files necessary to perform development. -
+ + Welcome to the Adélie Linux 1.0 Developer's Handbook. This handbook will teach you how to develop the software and packages that powers the Adélie Linux distribution. You may follow along at your own pace. + We'll start with installing the software and writing the configuration files necessary to perform development. + +
Installing Development Software - In this section, you will learn: - - How to install software on Adélie Linux; - What software you will use to develop Adélie Linux; and - What task each utility in the Adélie Linux development system performs. - + + In this section, you will learn: + + How to install software on Adélie Linux; + What software you will use to develop Adélie Linux; and + What task each utility in the Adélie Linux development system performs. + + Please make sure that you are at an Adélie Linux terminal before continuing. -
+
Using <command>apk</command> to Install Software - The Alpine Package Keeper or apk package manager is the central software management tool on the Adélie Linux distribution. - For a more thorough introduction to the apk package manager, please consult the Adélie Linux 1.0 Administrator's Guide, chapter 3: "Packages". - The apk package manager automatically resolves dependencies for requested software packages, and will automatically remove or "clean up" unneeded dependencies when a software package is removed. - If a software package's files become corrupted, it can be reinstalled with the fix subcommand. - The add subcommand will add the specified package(s) to the system's list of packages, and then resolve all necessary dependent libraries and other software packages to ensure the system has the requested packages installed. - The del subcommand will remove the specified package(s) from the system's list of packages, and then remove any other libraries and software packages that are no longer required for the system's operation. For example, the command: + The apk package manager is the central software management tool on the Adélie Linux distribution. For a more thorough introduction to the apk package manager, please consult the Adélie Linux 1.0 Administrator's Guide, chapter 3: "Packages". + The apk package manager automatically resolves dependencies for requested software packages, and will automatically remove or "clean up" unneeded dependencies when a software package is removed. If a software package's files become corrupted, it can be reinstalled with the fix subcommand. + The add subcommand will add the specified package(s) to the system's list of packages, and then resolve all necessary dependent libraries and other software packages to ensure the system has the requested packages installed. The del subcommand will remove the specified package(s) from the system's list of packages, and then remove any other libraries and software packages that are no longer required for the system's operation. For example, the command: # apk add build-tools will install the build-tools package, and any packages and libraries it requires. Similarly, # apk del libressl-dev will remove the libressl-dev package, and any packages and libraries that it required and no other package on the system requires.
-
+
Installing the Adélie Linux Development System The development environment is made of two essential parts: the build-tools package, which provides the basic compiler infrastructure, including a C compiler, build system, linker, assembler, and other utilities; and the abuild package, which takes package "recipe" files with build instructions, and creates the APK package files using them. You may install these two packages by executing the following command: # apk add abuild build-tools
-
+
Components of the Adélie Linux Development System The development system uses many open-source technologies that work together to provide a responsive, cohesive, libre environment. @@ -47,10 +48,6 @@ automake (automake) The GNU package for generating Makefiles in packages that use the autoconf package. - - attr - A framework for ACLs or access control lists. - bash (bash, sh) A Unix shell mostly compliant with the POSIX standard, used by many packages for build scripts and testing. @@ -59,10 +56,6 @@ binutils (as, ld, nm, …) Low-level development utilities including assembler (as), linker (ld), and others. - - bison (yacc) - The GNU version of the yacc compiler generation command. - bzip2 (bzip2, bunzip2, bzless, …) A popular compression format, included for the ability to unpack .bz2 archives within which packages may be distributed. @@ -71,18 +64,10 @@ cmake (cmake, ctest) The CMake build system, used to build many packages, and the CTest test system, used to prove packages are functioning correctly on the local system. - + diffutils (diff, cmp) Compares two or more files together, showing the differences. Used by many test suites, and also useful for troubleshooting and generating .patch files. - - fakeroot - An environment where a package believes it is running as the root user, but is actually running as the build user. - - - flex (lex) - The GNU version of the lex lexer, used for creating parsers in many projects. - gcc (c99, c11, gcc, g++) The GNU Compiler Collection, a mostly standards-compliant C and C++ compiler. @@ -103,10 +88,6 @@ libtool (libtool) The GNU library manipulation tool, used by many packages to create shared (.so) and static (.a) library files. - - lzip (lzip) - A compression format, included for the ability to unpack .lz archives within which packages may be distributed. - make (make) The GNU version of the standard Unix make command. @@ -123,10 +104,6 @@ patch (patch) The GNU version of LarryWall's standard patchutility. - - pax-utils (dumpelf, symtree) - A collection of utilities to enable the building of packages for the PaX secure operating environment. - pkgconf (pkgconf, pkg-config) A freely licensed, mathematically proven pkg-config implementation, used by package build systems to determine the location of libraries on the system. @@ -135,10 +112,6 @@ sed (sed) The GNU version of the Unix sed command. - - sudo (sudo) - Allows a user to run a command as the root user without using the root user's password. - xz (xz, unxz) An efficient compression format, included for the ability to unpack .xz archives within which packages may be distributed. @@ -146,32 +119,31 @@
-
+
Packaging Primer - In this section, you will learn: - - How repositories and packages work in the Adélie Linux distribution; - How to use the abuild command; and - The options and commands available in abuild. - -
+ + In this section, you will learn: + + How repositories and packages work in the Adélie Linux distribution; + How to use the abuild command; and + The options and commands available in abuild. + + +
Packages and Repositories The abuild command enables you to build a package file for later installation on to one or more computers running the Adélie Linux dsitribution. A package file is a kind of archive file that contains two key parts: package metadata, and package content files. Package metadata is a collection of information used by a package manager, such as apk, to determine information about the package and the package file, including its name, version, maintainer contact information, installed size on disk, and more. The package content files are a collection of one or more files that comprise the package itself, including executables, default configuration, data files, and any other files needed for the package to work properly. In some cases it may also include templates, examples, or documentation. - All packages belong to a package repository or repo. A repository is a collection of related packages. The Adélie Linux distribution has two main repositories: the system repository, used for system software and important libraries; and the user repository, used for the majority of packages that users may be interested in. - While you are developing on your own computer, you may have as many, or as few, repositories as you like. It can use any name except the above two ('system' and 'user'). You may use a name such as mypackages, or just your username. The repository is a directory on your computer's hard disk. You may create it anywhere, but it is highly recommended that you store your repository as a subdirectory of your home directory (/home/yourname/yourrepository). - Each package you create will have its own directory inside your repository. If you use the newapkbuild command (discussed later), this will be created for you automatically. Inside this directory will be at least an APKBUILD file, which tells abuild the commands to run to build the package. It may also contain patches or other files necessary for building the package, if necessary. - Typically, the abuild command is executed inside the package's directory (for example, /home/yourname/packages/pkgname). However, by setting the APKBUILD environment variable to the absolute path on disk to an APKBUILD file, you may run abuild from any directory. + All packages belong to a package repository or repo. A repository is a collection of related packages. The Adélie Linux distribution has two main repositories: the system repository, used for system software and important libraries; and the user repository, used for the majority of packages that users may be interested in. While you are developing on your own computer, you may have as many, or as few, repositories as you like. It can use any name except the above two ('system' and 'user'). You may use a name such as mypackages, or just your username. Your repository is named after the directory where it is stored on your computer's hard disk. You may create it anywhere, but it is highly recommended that you store your repository as a subdirectory of your home directory (/home/yourname/yourrepository). + Each package you create will have its own directory inside your repository. If you use the newapkbuild command (discussed later), this will be created for you automatically. Inside this directory will be at least an APKBUILD file, which tells abuild the commands to run to build the package. It may also contain patches or other files required for building the package, if necessary. + Typically, the abuild command is executed inside the package's directory (for example, /home/yourname/mypackages/pkgname). However, by setting the APKBUILD environment variable to the absolute path on disk to an APKBUILD file, you may run abuild from any directory.
-
+
Using the <command>abuild</command> Command - Running the abuild command with no arguments in a directory containing an APKBUILD file will cause it to fetch the package's sources (if necessary), build the package, and create the package file. Passing the -r parameter to abuild will cause it to install the dependencies of the package as listed in the APKBUILD, and then build the package. Afterwards, the dependencies of the package that were not already installed on your computer are removed. - If the build concluded successfully, the directory tree created for the source code and build system are removed by default. You may configure what abuild removes when a package concludes building. - If the build fails to conclude successfully, no directories are removed by default. You may configure what abuild removes when a package fails to build. + Running the abuild command with no arguments in a directory containing an APKBUILD file will cause it to fetch the package's sources (if necessary), build the package, and create the package file. Passing the -r parameter to abuild will cause it to install the dependencies of the package as listed in the APKBUILD, and then build the package. Afterwards, the dependencies of the package that were not already installed on your computer are removed. If the build concluded successfully, the directory tree created for the source code and build system are removed by default. If the build fails to conclude successfully, no directories are removed by default. You may configure what abuild removes when a package concludes building; refer to for more information. abuild has many subcommands that you may use, for finer-grained control over the build process. You may use the abuild deps subcommand to only install the dependencies of the package, and use the abuild unpack subcommand to unpack the source archive into the directory tree where it can later be built. These and many other subcommands are described in more detail in the following section. There are additionally a number of options that you may pass to abuild, which are also described in more detail in the next section.
-
+
<command>abuild</command> Subcommands The abuild command provides many subcommands that you may use while packaging software. @@ -206,7 +178,7 @@
-
+
Configuring Your System In this section, you will learn: @@ -215,7 +187,7 @@ The directory layout used by abuild and how to create it. Please make sure that you are at an Adélie Linux terminal before continuing. -
+
Configuring <command>abuild</command> for Your Environment The abuild system reads its configuration from two files on your system, if they exist. The /etc/abuild.conf file contains system-wide configuration, used by all users on a system. -- cgit v1.2.3-60-g2f50