COMP 3000 2011 Report II:PC-BSD: Difference between revisions

From Soma-notes
Qliu1 (talk | contribs)
Qliu1 (talk | contribs)
 
(114 intermediate revisions by 2 users not shown)
Line 2: Line 2:


== Software Packaging ==
== Software Packaging ==
=== Package Format and Utilities ===
PC-BSD's package management system takes a different approach to install software from many other Unix-like operating systems. Instead of using the FreeBSD ports<ref>FreeBSD ports. http://en.wikipedia.org/wiki/FreeBSD_ports Retrieved Dec 7, 2011.</ref> tree directly, PC-BSD uses files with the .pbi<ref>PBI Package Management. http://www.pcbsd.org/about/pc-bsd-project/package-management Retrieved Nov 16, 2011.</ref> file-name extension which, when double-clicked, bring up an installation wizard program. PBI (PC-BSD Installer or Push-Button Installer) is Binary Packaging format. This distribution uses a wide variety of graphic utilities<ref>PC-BSD Utilities. http://www.pcbsd.org/about/pc-bsd-project/utilities Retrieved Nov 16, 2011.</ref> to supply a front-end to useful FreeBSD features, such as Software Management Utility, Virtual Environment Utility, Backup Utility, Ports Jails Utility and so on. In the distribution, the package management relies on pkg tool, which is also used in FreeBSD, and Software Manager.


This distribution is PC-BSD. Linux package formats are the different file formats used to package software for various Linux distributions. Here in PC-BSD, it mainly uses Binary Packaging format -- pbi<ref>http://en.wikipedia.org/wiki/List_of_software_package_management_systems#PC-BSD</ref>. This distribution uses lots of graphic utilities<ref>http://www.pcbsd.org/about/pc-bsd-project/utilities</ref> to provide front-end to useful FreeBSD features, such as Software Management Utility, Virtual Environment Utility, Backup Utility, Ports Jails Utility and so on.
=== List Installed Packages ===
In command line, it will use "pkg_info" or "pkg_info | less" to get a list of installed packages. The first command will print the whole list of packages at once, while the second one will print the first page of the package list and you can use keyboard to look back and forth in the list.


In the distribution, it use we can use pkg management utilities<ref>http://wiki.pcbsd.org/index.php/Ports_Jail</ref> to manage packages.In command line, it will use "pkg_info" to get a list of installed packagers, "pkg_add" to add packages, and "pkg_delete" to remove packages. In PC-BSD 9.0, it will use PBI manager<ref>http://wiki.pcbsd.org/index.php/PBI_Manager</ref>, which will use "pbi_info", "pbi_add", "pbi_delete" instead. The PC-BSD repository<ref>http://en.wikipedia.org/wiki/PC-BSD#Package_management</ref> is http://www.pbidir.com/. The software catalog can found from there.  
=== Add and Remove Packages ===
"pkg_add" is for installing packages, and "pkg_delete" is for removing packages. In PC-BSD 9.0, it will use PBI manager<ref>PBI Manager. http://wiki.pcbsd.org/index.php/PBI_Manager Retrieved Nov 16, 2011.</ref>, which will use "pbi_info", "pbi_add", "pbi_delete" instead. Packages can be added by using "pkg_add -r -v {pacakge-name}" or "pbi_add -r PBINAME":
  # pkg_add -v -r vim      or  # pbi_add -r alpine
We can also set the environment variable PACKAGEROOT to specify an alternate location for pkg_add to fetch from:
  # export PACKAGEROOT=ftp://ftp3.FreeBSD.org
  # pkg_add -v -r vim


Because PC-BSD provides Graphic tools for desktop user, there is utility Software Management to do some thing like pkg management.
Packages can be deleted by using "pkg_delete {package-name}" or "pbi_delete {package-name}". Package name and version can be found by "pkg_info" or "pbi_info":
'''Here it is:'''
  # pkg_info | grep ntop          or    # pbi_info | grep ntop
  # ntop-4.0.1_1-i386                  # ntop-4.0.1_1-i386 
  # pkg_delete ntop-4.0.1_1-i386        # pbi_delete ntop-4.0.1_1-i386


There is utility called Software Management (in PC-BSD version 8.2), which can get a list of installed packages, except for system packages installed during installation of this distribution, like this picture:
=== Software Catelog ===
The PC-BSD repository<ref>Package Management in PC-BSD. http://en.wikipedia.org/wiki/PC-BSD#Package_management Retrieved Nov 16, 2011.</ref> is http://www.pbidir.com/. The software catalog is organized in alphabetical order of package categories as shown in the following picture:


[[File:software_management.png|400px]]
[[File:software_catalog.png|300px]]


=== Software Management ===
PC-BSD offers many graphic tools for a desktop user, and is equipped with a utility called Software Management (in PC-BSD version 8.2), which can get a list of installed packages. In this utility, only the packages installed after system installations will be displayed, as in the following picture:


PC-BSD is aim to give user easy used install/remove package experience like Windows or Mac OS. The applications are installed from a simple downloaded file with graphic prompts. Software Management is also a very useful utility to find desired software and install them by clicking the link. Remove is also a simply mouse click operation. There is a website browser in the Software Management and search engine for keyword search and different catalogs for selections.
[[File:software_management.png|300px]]


[[File:software_browser.png|400px]]


PC-BSD aims to give the user a simple experience of installing or removing packages, like software management in Windows or Mac OS. Software Manager is also very useful in finding desired software and installing them effortlessly, by clicking a specific link. Removing a package is also a simple mouse-click operation. There is also a software browser inside the Software Manager and a search engine for package searching and different catalogs for selections.


After made decision, it can downloaded the software by clicking the download link. And it will automatically download and install the packages/software.
[[File:software_browser.png|300px]]


[[File:install_software.png|400px]]


Following the user's decision, the software can be downloaded by clicking the download link. After that it will automatically download and install the packages/software.


There is also a remove button under "Installed Software" menu. Simply choose the package needed to remove, and click remove.
[[File:install_software.png|300px]]


The software catalog for this distribution can be found in the Software Browser of Software Management. There are many selections: Archives, Astronomy, Audio, Benchmarks, Biology, CAD, Communications, Databases, Desktop Utilities, Development, E-Mail, Editors, Educational, Emulators, File Transfer & Utilities, Finance, Games, Graphics, IRC, Japanese, Java, Languages, Math, Miscellaneous, Multimedia, Network-IM, Network-Management, Network-P2P, Network-Utilities, News, Non-Port, Polish, Ports-Management, Print, Science, Security, Shells, System Utilities, Text Processing, The Warden-Inmates, Web, X11, X11-File Managers and X11-Window Managers.


There is too many packages to choose, part of catalog information can be seen from the previous picture.
There is also a remove button under the "Installed Software" menu. Simply choose the package you want to remove, and click "remove".


== Major package versions ==
The software catalog for this distribution can be found in the Software Browser of Software Manager. There are many possible selections: Archives, Astronomy, Audio, Benchmarks, Biology, CAD, Communications, Databases, Desktop Utilities, Development, E-Mail, Editors, Educational, Emulators, File Transfer & Utilities, Finance, Games, Graphics, IRC, Japanese, Java, Languages, Math, Miscellaneous, Multimedia, Network-IM, Network-Management, Network-P2P, Network-Utilities, News, Non-Port, Polish, Ports-Management, Print, Science, Security, Shells, System Utilities, Text Processing, The Warden-Inmates, Web, X11, X11-File Managers and X11-Window Managers.


Use "diff" command to compare two packages, one is downloaded from official website & another one is resource from this distribution. "diff" will compare two binary code line by line. After that we can see what's the difference and what has been modified by distribution authors.
The fact that there is a vast majority of packages to choose from is a great advantage. A part of the catalog information can be seen in the previous picture.


== Major package versions ==


'''X.org:'''
The package version information can be found by using command "pkg_info" or "pkg_info | grep {package_name}". More information about the specific package version could be found through the Internet. Here are version numbers, release dates, and upstream sources of various major packages in PC-BSD:


version number: 11.0, release 7.5 (Oct 26, 2009) <ref>http://www.x.org/wiki/Releases/7.5</ref>. URL:http://www.x.org/wiki/Releases/7.5
{| border="1"
! Package
! Version
! Latest Official Release
! Official Source
|-
| FreeBSD Kernel
| 8.2-RELEASE Feb 24, 2011 <ref>FreeBSD Release Information. http://en.wikipedia.org/wiki/FreeBSD Retrieved Dec 7, 2011.</ref>
| 9.0-RELEASE Sep, 2011 <ref>FreeBSD Release Engineering Information. http://www.freebsd.org/releng/ Retrieved Dec 7, 2011.</ref>
| http://www.freebsd.org/where.html
|-
| X.org
| 7.5 Oct 26, 2009 <ref>X.org 7.5 release notes. http://www.x.org/wiki/Releases/7.5 Retrieved Dec 5, 2011.</ref>
| 7.6 Dec 20, 2010 <ref>X.org 7.6 release notes. http://www.x.org/wiki/Releases/7.6 Retrieved Dec 5, 2011.</ref>
| http://www.x.org/wiki/
|-
| Qt
| 4.7.1 Nov 9, 2010 <ref>Qt 4.7.1 release notes. http://labs.qt.nokia.com/2010/11/09/qt-4-7-1-released/ Retrieved Dec 5, 2011.</ref>
| 4.7.4 Sep 1, 2011 <ref>Qt 4.7.4 release notes. http://labs.qt.nokia.com/2011/09/01/qt-4-7-4-released/ Retrieved Dec 5, 2011.</ref>
| http://qt.nokia.com/
|-
| GTK+
| 2.22.1, Nov 15, 2010 <ref>GTK+ 2.22.1 overview. http://mail.gnome.org/archives/ftp-release-list/2010-November/msg00145.html Retrieved Dec 5, 2011.</ref>
| 2.24.8, Nov 10, 2011 <ref>GTK+ 2.24.8 overview. http://mail.gnome.org/archives/gtk-devel-list/2011-November/msg00026.html Retrieved Dec 5, 2011.</ref>
| http://ftp.gnome.org/pub/gnome/sources/gtk+/
|-
| bash
| 4.1.9 March, 2010 <ref>BASH PATH REPORT 4.1.9. ftp://ftp.gnu.org/gnu/bash/bash-4.1-patches/bash41-009 Retrieved Dec 5, 2011.</ref>
| 4.2.10 April, 2011 <ref>BASH PATH REPORT 4.2.10. ftp://ftp.cwru.edu/pub/bash/bash-4.2-patches/bash42-010 Retrieved Dec 5, 2011.</ref>
| http://ftp.gnu.org/gnu/bash/
|-
| pth
| 2.0.7 Jun 8, 2006 <ref>GNU Portable Thread. http://www.gnu.org/s/pth/ Retrieved Dec 5, 2011.</ref>
| current is the latest
| http://www.gnu.org/s/pth/
|-
| rpm
| 3.0.6 15 Sep 15, 2000 <ref>RPM 3.0.6 release. http://www.redhat.com/archives/rpm-list/2000-September/msg00101.html Retrieved Dec 7, 2000.</ref>
| 4.9.1.2 Sep 29, 2011 <ref>RPM 4.9.1.2. http://rpm.org/wiki/Releases/4.9.1.2 release. Retrieved Dec 7, 2011.</ref>
| http://www.rpm.org/
|-
| ruby
| 1.8.7 June 1, 2008
| 1.9.3 Oct 30, 2011 <ref>Ruby News. http://www.ruby-lang.org/en/feeds/news.rss Retrieved Dec 5, 2011.</ref>
| http://www.ruby-lang.org/en/news/2008/05/31/ruby-1-8-7-has-been-released/
|-
| KDE(Konqueror web browser and KMail)
| 4.5.5 Jan 4, 2011 <ref>KDE 4.5 Release Schedule. http://techbase.kde.org/Schedules/KDE4/4.5_Release_Schedule#January_4th.2C_2011:_Release_KDE_SC_4.5.5 Retrieved Dec 5, 2011.</ref>
| 4.7.3 Nov, 2011 <ref>KDE Release News. http://www.kubuntu.org/news/by-date/201111 Retrieved Dec 5, 2011.</ref>
| http://kde.org/info/4.5.5.php
|-
| Gwenview
| 1.2.92 Aug 21, 2005 <ref>gwenview-1.2.92-0.1.101mdk RPM for i586. http://rpmfind.net/linux/RPM/sourceforge/g/project/gw/gwenview/gwenview/1.2.92/gwenview-1.2.92-0.1.101mdk.i586.html Retrieved Dec 5, 2011.</ref>
| 4.7.3, Oct 28, 2011 <ref>Gwenview Release list. ftp://ftp.kde.org/pub/kde/stable/latest/src/ Retrieved Dec 5, 2011.</ref>
| http://rpmfind.net/linux/RPM/sourceforge/g/project/gw/gwenview/gwenview/1.2.92/gwenview-1.2.92-0.1.101mdk.i586.html
|-
| amarok
| 2.3.2 Sep 20, 2010 <ref>Amarok 2.3.2 Release News. http://amarok.kde.org/en/releases/2.3.2 Retrieved Dec 5, 2011.</ref>
| 2.5 Nov 6, 2011 <ref>Amarok Home. http://amarok.kde.org/ Retrieved Dec 5, 2011.</ref>
| http://amarok.kde.org/en/releases/2.3.2
|}
<br>


latest version: X11R7.6 on Dec 20, 2010.<ref>http://www.x.org/wiki/Releases/7.6</ref>
'''Major Difference and Purpose'''


reason: Xorg supports several mechanisms for supplying/obtaining configuration and run-time parameters: command line options, environment variables, the xorg.conf configuration file, auto-detection, and fallback defaults. In PC-BSD, it completes distribution meta-port.
PC-BSD is based on FreeBSD, but PC-BSD is for desktop use and FreeBSD is for server use. They are generally similar but some differences still exist. PC-BSD has added some utilities or kernel tweaks or GUI to make PC-BSD suitable for desktop use. For the KDE part, the author just used the one in FreeBSD, so there is no modification in the KDE packages. Therefore the major modification is the kernel. The difference between PC-BSD and FreeBSD can be found [http://www.spreadbsd.org/?q=pcbsd here]. The purposes of the packages are shown below:


'''Qt'''
{| border="1"
! Package
! Purpose of Using This Package
|-
| FreeBSD Kernel
| FreeBSD is known widely for its stability and security in server environment, so it can provide excellent base for PC-BSD. PC-BSD’s kernel has been recompiled with some configuration tweaks to make it better for desktop use. PC-BSD supports all the major package management systems that are in FreeBSD but also has PBI package installer.
|-
| X.org
| Xorg supports several mechanisms for supplying/obtaining configuration and run-time parameters such as: command line options, environment variables, the xorg.conf configuration file, auto-detection, and fallback defaults. In PC-BSD, it completes distribution meta-port
|-
| Qt
| Qt SDK combines the Qt framework with tools designed to streamline the creation of applications for Symbian and Maemo, MeeGo (Nokia N9) as well as desktop platforms, such as Microsoft Windows, Mac OS X, and Linux. It satisfies PC-BSD's goal.
|-
| GTK+
| Gimp toolkit for X11 GUI. It is a multi-platform toolkit for creating graphical user interfaces, which provides desktop environment for PC-BSD.
|-
| bash
| The GNU Project's Bourne Again Shell. Bash is the shell, or command language interpreter, that will appear in the GNU operating system. It is UNIX shell, and PC-BSD is based on UNIX. So that's the reason why we need bash.
|-
| pth
| Pth is a very portable POSIX/ANSI-C based library for Unix platforms which provides non-preemptive priority-based scheduling for multiple threads of execution inside event-driven applications. PC-BSD strives to give users a better experience in desktop environments like Windows or Mac OS. Then multi-threads is required.
|-
| rpm
| It is the Red Hat Package Manager. There is rpm package in PC-BSD means the system needs to manage Linux packages. It is consistent with its goal to be compatible with Linux. The reason why the version is far behind the latest version is that it is enough for basic Linux package management.
|-
| ruby
| A dynamic, open source programming language with a focus on simplicity and productivity. Majority of Unix/Linux distributions make use of this, such as PC-BSD. It has an elegant syntax that is natural to read and easy to write.
|-
| KDE(Konqueror web browser and KMail)
| KDE offers a full suite of user workspace applications which allow interactions with these operating systems in a modern, graphical user interface. PC-BSD requires quality GUI and Utilities to ensure users have a pleasant desktop experience, therefore, KDE is a good choice.
|-
| Gwenview
| Gwenview is part of the KDE graphics module. Gwenview is a fast and easy way to use image viewer/browser for KDE. PC-BSD uses KDE for better user experience. Gwenview is inside KDE.
|-
| amarok
| Media Player for KDE4. PC-BSD wants to provide service for daily users. Multimedia offers us music and movie needs so that a media player like amarok will be a necessary utility.
|}
<br>


version number: 4.7.1, released Nov 9, 2010 <ref>http://labs.qt.nokia.com/2010/11/09/qt-4-7-1-released/</ref> URL: http://qt.nokia.com/downloads
== Initialization ==
 
latest version: 4.7.4, released Sep 1, 2011 <ref>http://labs.qt.nokia.com/2011/09/01/qt-4-7-4-released/</ref>
 
reason: Qt SDK combines the Qt framework with tools designed to streamline the creation of applications for Symbian and Maemo, MeeGo (Nokia N9) in addition to desktop platforms, such as Microsoft Windows, Mac OS X, and Linux. PC-BSD needs that platform.
 
'''gtk'''


version number: 2.22.1, Nov 15, 2010 <ref>http://mail.gnome.org/archives/ftp-release-list/2010-November/msg00145.html</ref> URL: http://ftp.gnome.org/pub/gnome/sources/gtk+/
'''Start Initialization'''


latest version: 2.24.8, Nov 10, 2011 <ref>http://mail.gnome.org/archives/gtk-devel-list/2011-November/msg00026.html</ref>
Because PC-BSD is based on FreeBSD, the initialization will be BSD-style. The init runs the initialization shell script located in /etc/rc.d, then launches a windowing system such as X on graphical terminals under the control of /etc/ttys. There are no runlevels in PC-BSD. The script file, /etc/rc, determines what programs are run by init. The configuration is read from the master configuration file /etc/rc.conf. When we check the /etc/rc.conf file, we can find that the local startup scripts are in /usr/local/etc/rc.d and /Program/rc.d.


reason: Gimp toolkit for X11 GUI. It is is a multi-platform toolkit for creating graphical user interfaces, which is PC-BSD's need.
'''Major Programs'''


'''bash'''
The scripts provide information about how to start service or disable service. Most of services can be disabled or disabled by adding some codes to /etc/rc.conf. For example, in the following programs, fusefs shows how to disable its service.
 
version number: 4.1.9, March, 2010 <ref>ftp://ftp.gnu.org/gnu/bash/bash-4.1-patches/bash41-009</ref> URL: http://ftp.gnu.org/gnu/bash/
 
latest version: 4.2.10, April, 2011 <ref>ftp://ftp.cwru.edu/pub/bash/bash-4.2-patches/bash42-010</ref>
 
reason: The GNU Project's Bourne Again SHell. Bash is the shell, or command language interpreter, that will appear in the GNU operating system.
 
'''pth'''
 
version number: 2.0.7 Jun 8, 2006 <ref>http://www.gnu.org/s/pth/</ref> URL: http://www.gnu.org/s/pth/
 
latest version: current is the latest version
 
reason: Pth is a very portable POSIX/ANSI-C based library for Unix platforms which provides non-preemptive priority-based scheduling for multiple threads of execution inside event-driven applications. PC-BSD want to give user better experience in desktop like Windows or Mac OS, multi-thread is needed.
 
'''ruby'''
 
version number: 1.8.7 June 1, 2008 <ref>http://www.ruby-lang.org/en/feeds/news.rss</ref> URL: http://www.ruby-lang.org/en/news/2008/05/31/ruby-1-8-7-has-been-released/
 
latest version: 1.9.3 Oct 30, 2011 <ref>http://www.ruby-lang.org/en/feeds/news.rss</ref>
 
modification: A dynamic, open source programming language with a focus on simplicity and productivity. Most Linux distribution will use that, so do PC-BSD. It has an elegant syntax that is natural to read and easy to write.
 
 
'''KDE (this includes Konqueror web browser and KMail)'''
 
version number: KDE version 4.5.5, Jan 4, 2011 <ref>http://techbase.kde.org/Schedules/KDE4/4.5_Release_Schedule#January_4th.2C_2011:_Release_KDE_SC_4.5.5</ref> URL: http://kde.org/info/4.5.5.php
 
latest version: 4.7.3 Nov, 2011 <ref>http://www.kubuntu.org/news/by-date/201111</ref>
 
reason: KDE offers a full suite of user workspace applications which allow interaction with these operating systems in a modern, graphical user interface. And PC-BSD need good GUI to provide nice experience for desktop user, KDE is a good choice
 
 
'''RPM'''
 
Version Number : 3.0.6, Sep 13, 2000 <ref>http://rpm.org/releases/historical/rpm-3.0.x/</ref> URL: http://rpm.org/releases/historical/rpm-3.0.x/
 
latest version: 4.9.1.2 Sep 29, 2011 <ref>http://www.rpm.org/wiki/Releases/4.9.1.2</ref>
 
reason: it is the Red Hat Package Manager. It can manage *.rpm file. RPM is part of Linux standard base. PC-BSD is Linux, and it also support .rpm package to be installed so that this distribution will be more powerful to handle packages. RPM is powerful command line and it is free software under GNU GPL.
 
'''Gwenview'''
 
version number : 1.2.92 Aug 21, 2005 Image viewer for KDE. URL: http://rpmfind.net/linux/RPM/sourceforge/g/project/gw/gwenview/gwenview/1.2.92/gwenview-1.2.92-0.1.101mdk.i586.html
 
latest version: 4.7.3, Oct 28, 2011 <ref>ftp://ftp.kde.org/pub/kde/stable/latest/src/</ref>
 
reason: Gwenview is part of the kdegraphics module. Gwenview is a fast and easy to use image viewer/browser for KDE. PC-BSD use KDE for better user experience. Gwenview is inside KDE.
 
'''amarok'''
 
version number: 2.3.2 Sep 20, 2010 URL: http://amarok.kde.org/en/releases/2.3.2
 
latest version: 2.5 Beta1, Nov 6, 2011 <ref>http://amarok.kde.org/</ref>
 
reason: Media Player for KDE4. PC-BSD want to provider service for daily uses, and for desktop user. Multimedia is needed so that a media player like amarok will be a necessary utility.
 
== Initialization ==


Upon initialization of Pcbsd, the following happens or the following programs run. To access the following program from the terminal, the code used is : cd/usr/local/etc/rc.d.
* '''fusefs''' - It runs after sysctl and before mountlate. It is used to implement a fully functional filesystem in a user-space program, with its API library as the key feature. The filesystem works when the fuse kernel module and the fuse library communicate through a special file descriptor which is obtained by opening /dev/fuse. This file can be opened multiple times, and the obtained file descriptor is passed to the mount syscall, to match up the descriptor with the mounted filesystem. To disable the fusefs service, add the following line to /etc/rc.conf :
After which the command ls is typed to see the programs that run on initialization, it is from the list that the following programs where chosen, using the code cat "program name"
  fusefs_enable="NO"
  fusefs_safe="NO"
  fusefs_safe_evil="NO"


* '''ffserver''' -  It runs before NETWORKING service. FFserver is a streaming server for both audio and video which supports several live feeds. It is streaming from files and time shifting on live feeds. FFserver runs in daemon mode by default, which means it puts itself in the background and detaches from its TTY, unless it is launched in debug mode or a NoDaemon option is specified in the configuration file.


(cat ffserver) '''ffserver''' -  is the run after the network service is run, it is a streaming server for both audio and video.
* '''pcbsdinit''' -  pcbsdinit runs after DAEMON. It starts the system scripts. It is the last stage of the boot process which usually runs in automatic reboot sequence. It is a really important part of the boot operation such that if it dies, the system will reboot itself automatically


'''fusefs''' - is run after systctl is run before mountlate is run, this.
* '''gpsd''' - gpsd is an interface daemon for GPS receivers. It runs after networking DAEMON, cleanvar, and devfs. It also runs before ntpd. It collects information from GPSes, differential-GPS radios, or AIS receivers attached to the host machine. Each GPS, DGPS radio or AIS receiver is expected to be direct-connected to the host via sub or R232C serial device.


'''pcbsdinit''' - Is run after DAEMON is run it starts the system scripts.
* '''oss''' - Open Sound System (OSS) is the first attempt in unifying the digital audio architecture for UNIX. It runs after DAEMON, and it handles the sound system. It is the open sound system which provides support for PCM audio play and capture. It is started by function oss_start() and stopped by function oss_stop(). The two function will call system calls: /usr/local/sbin/soundon and /usr/local/sbin/soundoff.


'''gpsd''' - runs after networking deamon cleanvar devfs is runing and runs before ntpd, it is an interface daemon for GPS receivers.
* '''netatalk''' - Netatalk is a freely-available open source AFP fileserver. It also provides a kernel level implementation of the AppleTalk Protocol Suite. It makes *NIX/BSD system to be capable of serving many Macintosh clients simultaneously as an AppleShare file server (AFP), AppleTalk router, *NIX/*BSD print server, and for accessing AppleTalk printers via Printer Access Protocol (PAP). In the script, netatalk will start with netatalk_start() and stop with netatalk_stop(). It runs after DAEMON, and it implements the following major utilities while on booting :
  1) atalkd - an implementation of the AppleTalk protocol <ref>Netatalk functions in PC-BSD. http://netatalk.sourceforge.net/2.2/ReleaseNotes2.2.1.html Retrieved Dec 15, 2011.</ref>.
  2) papd - a print server that enables Macintosh computers to access printers which are connected to UNIX server <ref>Netatalk functions in PC-BSD. http://netatalk.sourceforge.net/2.2/ReleaseNotes2.2.1.html Retrieved Dec 15, 2011.</ref>.
  3) afpd - a file server that implements the Apple Filing Protocol, allowing clients running MacOS to access Unix file servers.<ref>Netatalk functions in PC-BSD. http://netatalk.sourceforge.net/2.2/ReleaseNotes2.2.1.html Retrieved Dec 15, 2011.</ref>.


'''oss''' - also runs after deamon, it handles the sound system.
* '''snddetect''' - It runs after DAEMON, and detects sound. It first removes sound flag then detects an unknown sound card. It starts with snddetect_start(), which call /usr/PCBSD/soundDetect/sound_detect, and stops with snddetect_stop().


'''netatalk''' - runs after daemon, it provides atalkd papd cnid_metad timelord afpd,  
* '''wacom''' - This is Wacom input driver. It runs after filesystem, and it offers setup and cleanup to configure Xorg for use of the driver or remove the configuration settings. It functions as a pointer input device. There is two function in scripts: do_start() to start service by /sbin/kldload and boot/modules/uwacom.ko, and do_stop() to stop service by /sbin/kldunload /boot/modules/uwacom.ko.


'''snddetect''' - runs after daemon, it provides sound detect, it first removes sound flag then detects if system has sound or not.
'''End of Initialization'''


'''wacom''' - runs after filesystem, it offers setup and cleanup to configure Xorg for use of the driver or remove the configuration settings.
The initialization of PC-BSD is completed after all the thirty two shell scripts from /etc/rc.d have been initialized. The /etc/rc script describes how system startup scripts run by init. There is a loop which reads through and runs all the startup scripts. Initialization is completed when the loop is over. Then all the processes start running on this fully initialized system.


== Reference ==
== Reference ==
<references/>
<references/>

Latest revision as of 16:19, 18 December 2011

Part II

Software Packaging

Package Format and Utilities

PC-BSD's package management system takes a different approach to install software from many other Unix-like operating systems. Instead of using the FreeBSD ports<ref>FreeBSD ports. http://en.wikipedia.org/wiki/FreeBSD_ports Retrieved Dec 7, 2011.</ref> tree directly, PC-BSD uses files with the .pbi<ref>PBI Package Management. http://www.pcbsd.org/about/pc-bsd-project/package-management Retrieved Nov 16, 2011.</ref> file-name extension which, when double-clicked, bring up an installation wizard program. PBI (PC-BSD Installer or Push-Button Installer) is Binary Packaging format. This distribution uses a wide variety of graphic utilities<ref>PC-BSD Utilities. http://www.pcbsd.org/about/pc-bsd-project/utilities Retrieved Nov 16, 2011.</ref> to supply a front-end to useful FreeBSD features, such as Software Management Utility, Virtual Environment Utility, Backup Utility, Ports Jails Utility and so on. In the distribution, the package management relies on pkg tool, which is also used in FreeBSD, and Software Manager.

List Installed Packages

In command line, it will use "pkg_info" or "pkg_info | less" to get a list of installed packages. The first command will print the whole list of packages at once, while the second one will print the first page of the package list and you can use keyboard to look back and forth in the list.

Add and Remove Packages

"pkg_add" is for installing packages, and "pkg_delete" is for removing packages. In PC-BSD 9.0, it will use PBI manager<ref>PBI Manager. http://wiki.pcbsd.org/index.php/PBI_Manager Retrieved Nov 16, 2011.</ref>, which will use "pbi_info", "pbi_add", "pbi_delete" instead. Packages can be added by using "pkg_add -r -v {pacakge-name}" or "pbi_add -r PBINAME":

 # pkg_add -v -r vim      or   # pbi_add -r alpine

We can also set the environment variable PACKAGEROOT to specify an alternate location for pkg_add to fetch from:

 # export PACKAGEROOT=ftp://ftp3.FreeBSD.org
 # pkg_add -v -r vim 

Packages can be deleted by using "pkg_delete {package-name}" or "pbi_delete {package-name}". Package name and version can be found by "pkg_info" or "pbi_info":

 # pkg_info | grep ntop          or    # pbi_info | grep ntop
 # ntop-4.0.1_1-i386                   # ntop-4.0.1_1-i386   
 # pkg_delete ntop-4.0.1_1-i386        # pbi_delete ntop-4.0.1_1-i386

Software Catelog

The PC-BSD repository<ref>Package Management in PC-BSD. http://en.wikipedia.org/wiki/PC-BSD#Package_management Retrieved Nov 16, 2011.</ref> is http://www.pbidir.com/. The software catalog is organized in alphabetical order of package categories as shown in the following picture:

Software Management

PC-BSD offers many graphic tools for a desktop user, and is equipped with a utility called Software Management (in PC-BSD version 8.2), which can get a list of installed packages. In this utility, only the packages installed after system installations will be displayed, as in the following picture:


PC-BSD aims to give the user a simple experience of installing or removing packages, like software management in Windows or Mac OS. Software Manager is also very useful in finding desired software and installing them effortlessly, by clicking a specific link. Removing a package is also a simple mouse-click operation. There is also a software browser inside the Software Manager and a search engine for package searching and different catalogs for selections.


Following the user's decision, the software can be downloaded by clicking the download link. After that it will automatically download and install the packages/software.


There is also a remove button under the "Installed Software" menu. Simply choose the package you want to remove, and click "remove".

The software catalog for this distribution can be found in the Software Browser of Software Manager. There are many possible selections: Archives, Astronomy, Audio, Benchmarks, Biology, CAD, Communications, Databases, Desktop Utilities, Development, E-Mail, Editors, Educational, Emulators, File Transfer & Utilities, Finance, Games, Graphics, IRC, Japanese, Java, Languages, Math, Miscellaneous, Multimedia, Network-IM, Network-Management, Network-P2P, Network-Utilities, News, Non-Port, Polish, Ports-Management, Print, Science, Security, Shells, System Utilities, Text Processing, The Warden-Inmates, Web, X11, X11-File Managers and X11-Window Managers.

The fact that there is a vast majority of packages to choose from is a great advantage. A part of the catalog information can be seen in the previous picture.

Major package versions

The package version information can be found by using command "pkg_info" or "pkg_info | grep {package_name}". More information about the specific package version could be found through the Internet. Here are version numbers, release dates, and upstream sources of various major packages in PC-BSD:

Package Version Latest Official Release Official Source
FreeBSD Kernel 8.2-RELEASE Feb 24, 2011 <ref>FreeBSD Release Information. http://en.wikipedia.org/wiki/FreeBSD Retrieved Dec 7, 2011.</ref> 9.0-RELEASE Sep, 2011 <ref>FreeBSD Release Engineering Information. http://www.freebsd.org/releng/ Retrieved Dec 7, 2011.</ref> http://www.freebsd.org/where.html
X.org 7.5 Oct 26, 2009 <ref>X.org 7.5 release notes. http://www.x.org/wiki/Releases/7.5 Retrieved Dec 5, 2011.</ref> 7.6 Dec 20, 2010 <ref>X.org 7.6 release notes. http://www.x.org/wiki/Releases/7.6 Retrieved Dec 5, 2011.</ref> http://www.x.org/wiki/
Qt 4.7.1 Nov 9, 2010 <ref>Qt 4.7.1 release notes. http://labs.qt.nokia.com/2010/11/09/qt-4-7-1-released/ Retrieved Dec 5, 2011.</ref> 4.7.4 Sep 1, 2011 <ref>Qt 4.7.4 release notes. http://labs.qt.nokia.com/2011/09/01/qt-4-7-4-released/ Retrieved Dec 5, 2011.</ref> http://qt.nokia.com/
GTK+ 2.22.1, Nov 15, 2010 <ref>GTK+ 2.22.1 overview. http://mail.gnome.org/archives/ftp-release-list/2010-November/msg00145.html Retrieved Dec 5, 2011.</ref> 2.24.8, Nov 10, 2011 <ref>GTK+ 2.24.8 overview. http://mail.gnome.org/archives/gtk-devel-list/2011-November/msg00026.html Retrieved Dec 5, 2011.</ref> http://ftp.gnome.org/pub/gnome/sources/gtk+/
bash 4.1.9 March, 2010 <ref>BASH PATH REPORT 4.1.9. ftp://ftp.gnu.org/gnu/bash/bash-4.1-patches/bash41-009 Retrieved Dec 5, 2011.</ref> 4.2.10 April, 2011 <ref>BASH PATH REPORT 4.2.10. ftp://ftp.cwru.edu/pub/bash/bash-4.2-patches/bash42-010 Retrieved Dec 5, 2011.</ref> http://ftp.gnu.org/gnu/bash/
pth 2.0.7 Jun 8, 2006 <ref>GNU Portable Thread. http://www.gnu.org/s/pth/ Retrieved Dec 5, 2011.</ref> current is the latest http://www.gnu.org/s/pth/
rpm 3.0.6 15 Sep 15, 2000 <ref>RPM 3.0.6 release. http://www.redhat.com/archives/rpm-list/2000-September/msg00101.html Retrieved Dec 7, 2000.</ref> 4.9.1.2 Sep 29, 2011 <ref>RPM 4.9.1.2. http://rpm.org/wiki/Releases/4.9.1.2 release. Retrieved Dec 7, 2011.</ref> http://www.rpm.org/
ruby 1.8.7 June 1, 2008 1.9.3 Oct 30, 2011 <ref>Ruby News. http://www.ruby-lang.org/en/feeds/news.rss Retrieved Dec 5, 2011.</ref> http://www.ruby-lang.org/en/news/2008/05/31/ruby-1-8-7-has-been-released/
KDE(Konqueror web browser and KMail) 4.5.5 Jan 4, 2011 <ref>KDE 4.5 Release Schedule. http://techbase.kde.org/Schedules/KDE4/4.5_Release_Schedule#January_4th.2C_2011:_Release_KDE_SC_4.5.5 Retrieved Dec 5, 2011.</ref> 4.7.3 Nov, 2011 <ref>KDE Release News. http://www.kubuntu.org/news/by-date/201111 Retrieved Dec 5, 2011.</ref> http://kde.org/info/4.5.5.php
Gwenview 1.2.92 Aug 21, 2005 <ref>gwenview-1.2.92-0.1.101mdk RPM for i586. http://rpmfind.net/linux/RPM/sourceforge/g/project/gw/gwenview/gwenview/1.2.92/gwenview-1.2.92-0.1.101mdk.i586.html Retrieved Dec 5, 2011.</ref> 4.7.3, Oct 28, 2011 <ref>Gwenview Release list. ftp://ftp.kde.org/pub/kde/stable/latest/src/ Retrieved Dec 5, 2011.</ref> http://rpmfind.net/linux/RPM/sourceforge/g/project/gw/gwenview/gwenview/1.2.92/gwenview-1.2.92-0.1.101mdk.i586.html
amarok 2.3.2 Sep 20, 2010 <ref>Amarok 2.3.2 Release News. http://amarok.kde.org/en/releases/2.3.2 Retrieved Dec 5, 2011.</ref> 2.5 Nov 6, 2011 <ref>Amarok Home. http://amarok.kde.org/ Retrieved Dec 5, 2011.</ref> http://amarok.kde.org/en/releases/2.3.2


Major Difference and Purpose

PC-BSD is based on FreeBSD, but PC-BSD is for desktop use and FreeBSD is for server use. They are generally similar but some differences still exist. PC-BSD has added some utilities or kernel tweaks or GUI to make PC-BSD suitable for desktop use. For the KDE part, the author just used the one in FreeBSD, so there is no modification in the KDE packages. Therefore the major modification is the kernel. The difference between PC-BSD and FreeBSD can be found here. The purposes of the packages are shown below:

Package Purpose of Using This Package
FreeBSD Kernel FreeBSD is known widely for its stability and security in server environment, so it can provide excellent base for PC-BSD. PC-BSD’s kernel has been recompiled with some configuration tweaks to make it better for desktop use. PC-BSD supports all the major package management systems that are in FreeBSD but also has PBI package installer.
X.org Xorg supports several mechanisms for supplying/obtaining configuration and run-time parameters such as: command line options, environment variables, the xorg.conf configuration file, auto-detection, and fallback defaults. In PC-BSD, it completes distribution meta-port
Qt Qt SDK combines the Qt framework with tools designed to streamline the creation of applications for Symbian and Maemo, MeeGo (Nokia N9) as well as desktop platforms, such as Microsoft Windows, Mac OS X, and Linux. It satisfies PC-BSD's goal.
GTK+ Gimp toolkit for X11 GUI. It is a multi-platform toolkit for creating graphical user interfaces, which provides desktop environment for PC-BSD.
bash The GNU Project's Bourne Again Shell. Bash is the shell, or command language interpreter, that will appear in the GNU operating system. It is UNIX shell, and PC-BSD is based on UNIX. So that's the reason why we need bash.
pth Pth is a very portable POSIX/ANSI-C based library for Unix platforms which provides non-preemptive priority-based scheduling for multiple threads of execution inside event-driven applications. PC-BSD strives to give users a better experience in desktop environments like Windows or Mac OS. Then multi-threads is required.
rpm It is the Red Hat Package Manager. There is rpm package in PC-BSD means the system needs to manage Linux packages. It is consistent with its goal to be compatible with Linux. The reason why the version is far behind the latest version is that it is enough for basic Linux package management.
ruby A dynamic, open source programming language with a focus on simplicity and productivity. Majority of Unix/Linux distributions make use of this, such as PC-BSD. It has an elegant syntax that is natural to read and easy to write.
KDE(Konqueror web browser and KMail) KDE offers a full suite of user workspace applications which allow interactions with these operating systems in a modern, graphical user interface. PC-BSD requires quality GUI and Utilities to ensure users have a pleasant desktop experience, therefore, KDE is a good choice.
Gwenview Gwenview is part of the KDE graphics module. Gwenview is a fast and easy way to use image viewer/browser for KDE. PC-BSD uses KDE for better user experience. Gwenview is inside KDE.
amarok Media Player for KDE4. PC-BSD wants to provide service for daily users. Multimedia offers us music and movie needs so that a media player like amarok will be a necessary utility.


Initialization

Start Initialization

Because PC-BSD is based on FreeBSD, the initialization will be BSD-style. The init runs the initialization shell script located in /etc/rc.d, then launches a windowing system such as X on graphical terminals under the control of /etc/ttys. There are no runlevels in PC-BSD. The script file, /etc/rc, determines what programs are run by init. The configuration is read from the master configuration file /etc/rc.conf. When we check the /etc/rc.conf file, we can find that the local startup scripts are in /usr/local/etc/rc.d and /Program/rc.d.

Major Programs

The scripts provide information about how to start service or disable service. Most of services can be disabled or disabled by adding some codes to /etc/rc.conf. For example, in the following programs, fusefs shows how to disable its service.

  • fusefs - It runs after sysctl and before mountlate. It is used to implement a fully functional filesystem in a user-space program, with its API library as the key feature. The filesystem works when the fuse kernel module and the fuse library communicate through a special file descriptor which is obtained by opening /dev/fuse. This file can be opened multiple times, and the obtained file descriptor is passed to the mount syscall, to match up the descriptor with the mounted filesystem. To disable the fusefs service, add the following line to /etc/rc.conf :
 fusefs_enable="NO"
 fusefs_safe="NO"
 fusefs_safe_evil="NO"
  • ffserver - It runs before NETWORKING service. FFserver is a streaming server for both audio and video which supports several live feeds. It is streaming from files and time shifting on live feeds. FFserver runs in daemon mode by default, which means it puts itself in the background and detaches from its TTY, unless it is launched in debug mode or a NoDaemon option is specified in the configuration file.
  • pcbsdinit - pcbsdinit runs after DAEMON. It starts the system scripts. It is the last stage of the boot process which usually runs in automatic reboot sequence. It is a really important part of the boot operation such that if it dies, the system will reboot itself automatically
  • gpsd - gpsd is an interface daemon for GPS receivers. It runs after networking DAEMON, cleanvar, and devfs. It also runs before ntpd. It collects information from GPSes, differential-GPS radios, or AIS receivers attached to the host machine. Each GPS, DGPS radio or AIS receiver is expected to be direct-connected to the host via sub or R232C serial device.
  • oss - Open Sound System (OSS) is the first attempt in unifying the digital audio architecture for UNIX. It runs after DAEMON, and it handles the sound system. It is the open sound system which provides support for PCM audio play and capture. It is started by function oss_start() and stopped by function oss_stop(). The two function will call system calls: /usr/local/sbin/soundon and /usr/local/sbin/soundoff.
  • netatalk - Netatalk is a freely-available open source AFP fileserver. It also provides a kernel level implementation of the AppleTalk Protocol Suite. It makes *NIX/BSD system to be capable of serving many Macintosh clients simultaneously as an AppleShare file server (AFP), AppleTalk router, *NIX/*BSD print server, and for accessing AppleTalk printers via Printer Access Protocol (PAP). In the script, netatalk will start with netatalk_start() and stop with netatalk_stop(). It runs after DAEMON, and it implements the following major utilities while on booting :
 1) atalkd - an implementation of the AppleTalk protocol <ref>Netatalk functions in PC-BSD. http://netatalk.sourceforge.net/2.2/ReleaseNotes2.2.1.html Retrieved Dec 15, 2011.</ref>.
 2) papd - a print server that enables Macintosh computers to access printers which are connected to UNIX server <ref>Netatalk functions in PC-BSD. http://netatalk.sourceforge.net/2.2/ReleaseNotes2.2.1.html Retrieved Dec 15, 2011.</ref>.
 3) afpd - a file server that implements the Apple Filing Protocol, allowing clients running MacOS to access Unix file servers.<ref>Netatalk functions in PC-BSD. http://netatalk.sourceforge.net/2.2/ReleaseNotes2.2.1.html Retrieved Dec 15, 2011.</ref>.
  • snddetect - It runs after DAEMON, and detects sound. It first removes sound flag then detects an unknown sound card. It starts with snddetect_start(), which call /usr/PCBSD/soundDetect/sound_detect, and stops with snddetect_stop().
  • wacom - This is Wacom input driver. It runs after filesystem, and it offers setup and cleanup to configure Xorg for use of the driver or remove the configuration settings. It functions as a pointer input device. There is two function in scripts: do_start() to start service by /sbin/kldload and boot/modules/uwacom.ko, and do_stop() to stop service by /sbin/kldunload /boot/modules/uwacom.ko.

End of Initialization

The initialization of PC-BSD is completed after all the thirty two shell scripts from /etc/rc.d have been initialized. The /etc/rc script describes how system startup scripts run by init. There is a loop which reads through and runs all the startup scripts. Initialization is completed when the loop is over. Then all the processes start running on this fully initialized system.

Reference

<references/>