design implementation and operation of netbsd base system
play

Design, Implementation and Operation of NetBSD Base System Packaging - PDF document

Design, Implementation and Operation of NetBSD Base System Packaging Yuuki Enomoto Kenichi Fukamachi Abstract tarball (which extension is known as .tgz) is one of typical large archive formats. BSD UNIX dis- It is


  1. Design, Implementation and Operation of NetBSD Base System Packaging Yuuki Enomoto ∗ Ken’ichi Fukamachi † Abstract ”tarball” (which extension is known as ”.tgz”) is one of typical large archive formats. BSD UNIX dis- It is believed that UNIX operating system (OS) tributes the base system as a set of tarballs where the built on fine granular small parts is preferable to one term “base system” implies a set of programs official- built on the traditional large tarballs in order to sup- ly maintained and distributed by the project. In al- port speedy security update, easy replacement and most cases, OS base system distribution is divided by rollback of specific parts. In Linux distributions, the roles to a set of tarballs such as ”base.tgz” (manda- system are already divided into many small packages. tory for the operating system), ”comp.tgz” (compiler On the other hand, BSD Unix variants are behind tools), ”man.tgz” (manual) and so on. the curve on the base system packaging. To improve There is another classification such as the base sys- NetBSD base system granularity, we propose a frame- tem or 3rd party software. Historically BSD UNIX work for OS base system packaging. We have devel- considers that the system consists of the following oped a software “ basepkg ” by making the best use of two categories: (1) the base system built from the pkgsrc framework and operate an experimental base official source tree and (2) 3rd party software not package distribution server to evaluate our software contained on the source tree. Usually the latter 3rd in realistic environment. It is shown that replace- party software are managed as a set of small archives ment of a few OS granular parts is clearly faster and called as “package” where this “package” implies a can provide extra useful functions for NetBSD users container which consists of software, documentation, and customers. configuration files and this package’s meta data re- quired to operate in installation and de-installation. Key words: Unix, NetBSD, Open Source Software, Each package role, format and manager differs from System Management one Unix OS to another. Table 1 shows a list of OS, package format and package manager. Historically BSD Unix has been developed in its 1 Background own source tree including kernel, general command- Historically operating system (OS) has been man- aged on one source tree and the source tree set has name format manager been distributed. FreeBSD txz pkg In this quarter century, either of a large or small NetBSD tgz pkg install archive or the combination is used for OS distribu- Debian deb apt tion. Red Hat rpm yum ∗ Chitose Institute of Science and Technology, e-mail: openSUSE rpm zypper mail@e-yuuki.org † Chitose Institute of Science and Technology, e-mail: k- Table 1: List of OS, package format and the manager fukama@photon.chitose.ac.jp

  2. +COMPACT MANIFEST meta-data, JSON format s, configuration files, and manuals. “Linux” distri- a subset of +MANIFEST bution is the opposite. What we call “Linux” was +MANIFEST meta-data, JSON format released as just a kernel with a few core programs. includes the whole information Accidentally, Linux distributions needed to assemble bin/hangman binary a lot of system utilities in order to build a whole U- nix clone system. For that reason, the base system Table 2: Content of FreeBSD ports (7) package management based on a lot of small packages was hangman-0.9.2 12.txz . inevitable and a good idea for Linux distributions. Major Linux distributions such as Debian and Red Hat Enterprise Linux are already divided into many In this section, we briefly summarize both 3rd par- small packages. These OS’s can manage both its ty and base package system on FreeBSD and NetBSD own base system and third-party software through since the technical details are referenced in the latter its package manager. section. On the other hand, BSD Unix such as FreeBS- D and NetBSD have each package framework e.g. 2.1 Packages for 3rd Party Software ports (7) and pkgsrc (7), but they have been used only for third-party software management. 2.1.1 FreeBSD ports (7) However today, for users and customers, it is better that OS can be assembled on a lot of small parts We review FreeBSD ports (7) briefly since FreeB- easily added or removed. It is suitable especially for SD ports (7) system is the ancestor of NetBSD rapid security update, easy replacement and rollback pkgsrc (7). of specific parts. In this paper we call this granular FreeBSD ports (7) is 3rd party software manage- base system building “base system packaging”. ment framework for “installing from source, and To implement a granular NetBSD base system with packages, for installing from pre-built binaries”[2]. features mentioned above, we have developed a base make (1) command is used to build a package. The system packaging utility “basepkg” for NetBSD. package consists of meta-data, compiled binaries, The rest of this paper is organized as follows. In configuration files and so on. Table 2 shows the con- Chapter 2, we review idea and technique for soft- tent of “hangman” package. We can also use pkg (8) ware packaging on UNIX. In Chapter 3, we describe command to manage packages. basepkg usage and the internals to show how to write a sustainable shell program by making the best use 2.1.2 NetBSD pkgsrc (7) of pkgsrc framework. We operate a base package dis- tribution server experimentally and estimate the pro- NetBSD pkgsrc (7) is a “ framework for building cessing speed. In Chapter 4, we discuss several issues and maintaining third-party software on NetBSD and to resolve in our system. other UNIX-like systems.”[3]. Initially pkgsrc (7) was a spin-off of FreeBSD ports (7). Hence, the fun- damental usage of pkgsrc is similar to one of FreeBSD 2 Packages in BSD UNIX ports (7). Consider an example of “openssh” ( pkgsrc/ As mentioned above, BSD UNIX consists of the security/openssh ) installation. To build an base system and optional 3rd party software not dis- “openssh” package, you run in make package tributed within the base system. The 3rd party soft- pkgsrc/security/openssh directory to generate ware are called ports (7) on FreeBSD and OpenBSD, the package openssh-7.5.1nb1.tgz in pkgsrc/ and pkgsrc (7) on NetBSD. We can use pkgsrc (7) packages/All directory. The package consists of on a lot of platforms 1 . the meta-data and the program content. Figure 1 1 http://www.pkgsrc.org/#platforms shows the content of openssh-7.5.1nb1.tgz . The

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend