CPAM with TWW/References Manual

From Wikibooks, open books for an open world
Jump to: navigation, search

Contents

Package Management System Overview[edit]

This section is about the different PMS on different OS. By understanding each PMS we can find out the differences and try to make them work together under a central and hyper PMS. The main interests of following sections are to understand how to make these PMS work with TWW HPMS.

Package Management System Compasion[edit]

Packaging Tasks rpm pkgadd sw depot inst OpenSolaris ips lpp Windows WiX Mac OSX
build a package rpmbuild -ba packagename.spec pkgmk  ?  ?  ? candle.exe -> light.exe packagemanager
Query installed packages rpm -qa pkginfo  ?  ?  ?  ?  ? pkgutils --pkgs
delete a package rpm -e pkgname pkgrm  ?  ?  ?  ? msiexec Not Available.


MS Windows[edit]

MS Windows PMS Architecture[edit]

MS Windows PMS References[edit]

Commercial Packaing tools[edit]

  • Installshield

Open source Packaing tools[edit]

BSD[edit]

FreeBSD[edit]

FreeBSD PMS Architecture[edit]

FreeBSD PMS References[edit]

OpenBSD[edit]

OpenBSD PMS Architecture[edit]

OpenBSD PMS References[edit]

NetBSD[edit]

NetBSD PMS Architecture[edit]

NetBSD PMS References[edit]

Mac OS X[edit]

Mac OSX software distribution, it is not software package management that provide complete package life-cycle mechanism. Some mechanis still missing are

  • package removal by command line.
  • package automated dependency install.
  • package depot.

Mac OSX related PMS Tools[edit]

imac:~ me$ pkgutil  --pkgutil-version
pkgutil: "$Id: main.m,v 1.24 2007/10/08 19:53:38 ryanc Exp $"
imac:~ me$ 
Mac OS X PMS References[edit]
Macport[edit]

A few notes when learning macort. Macport use TCL scripting language to automate the package creating,installation and other package management processes.

  • Following are some directories path for Macport build system.
emac:/opt/local/var/db/dports tjyang$ pwd
/opt/local/var/db/dports
emac:/opt/local/var/db/dports tjyang$ ls -lrt
total 0
drwxr-xr-x    4 root    admin   136 Jan 26  2006 sources
drwxr-xr-x    3 root    admin   102 Jan 26  2006 packages
drwxrwxr-x   41 root    admin  1394 Feb 13 07:26 distfiles
drwxr-xr-x   42 tjyang  admin  1428 Feb 13 07:26 build
drwxr-xr-x   36 root    admin  1224 Feb 13 07:28 software
drwxrwxr-x   40 root    admin  1360 Feb 13 07:28 receipts
emac:/opt/local/var/db/dports tjyang$

  • MacPort is also a Hyper Package Management System. For example, macport can generate zsh in RPM and Mac's pkg formats.
emac:~ tjyang$ ls -l /opt/local/var/db/dports/build/_opt_local_var_db_dports_sources_rsync.rsync.darwinports.org_dpupdate_dports_shells_zsh/work
total 3312
drwxrwxr-x    3 root  wheel      102 Feb 13 06:46 destroot
drwxr-xr-x   41 root  admin     1394 Feb 13 06:43 zsh-4.2.6
-rw-r--r--    1 root  admin  1655668 Feb 13 06:53 zsh-4.2.6.dmg
drwxr-xr-x    3 root  admin      102 Feb 13 06:46 zsh-4.2.6.pkg
-rw-r--r--    1 root  admin    29411 Feb 13 06:55 zsh.filelist
-rw-r--r--    1 root  admin     1139 Feb 13 06:55 zsh.spec
emac:~ tjyang$

emac:~ tjyang$ sudo port install gcc40
--->  Fetching gcc40
--->  Attempting to fetch gcc-core-4.0.4.tar.bz2 from ftp://gcc.gnu.org/pub/gcc/releases/gcc-4.0.4/
--->  Attempting to fetch gcc-fortran-4.0.4.tar.bz2 from ftp://gcc.gnu.org/pub/gcc/releases/gcc-4.0.4/
--->  Attempting to fetch gcc-g++-4.0.4.tar.bz2 from ftp://gcc.gnu.org/pub/gcc/releases/gcc-4.0.4/
--->  Attempting to fetch gcc-java-4.0.4.tar.bz2 from ftp://gcc.gnu.org/pub/gcc/releases/gcc-4.0.4/
--->  Attempting to fetch gcc-objc-4.0.4.tar.bz2 from ftp://gcc.gnu.org/pub/gcc/releases/gcc-4.0.4/
--->  Verifying checksum(s) for gcc40
--->  Extracting gcc40
--->  Configuring gcc40
--->  Building gcc40 with target profiledbootstrap
  • the building receipt(Portfile) for gcc40.
emac:~ tjyang$ cat  /opt/local/var/db/dports/sources/rsync.rsync.darwinports.org_dpupdate_dports/lang/gcc40/Portfile
# $Id: Portfile 21750 2007-02-05 15:33:03Z mww@macports.org $

PortSystem 1.0

name                    gcc40
version                 4.0.4
platforms               darwin
categories              lang
maintainers             mww@macports.org
description             The GNU compiler collection
long_description        The GNU compiler collection, including front ends for C, \
                                C++, Objective-C, Java and Fortran95.

homepage                http://gcc.gnu.org/
master_sites    ftp://gcc.gnu.org/pub/gcc/releases/gcc-${version}/ \
                                ftp://ftp.gwdg.de/pub/linux/gcc/releases/gcc-${version}/ \
                                gnu:/gcc/gcc-${version}
set dcore               gcc-core-${version}.tar.bz2
set dfort               gcc-fortran-${version}.tar.bz2
set dcxx                gcc-g++-${version}.tar.bz2
set djava               gcc-java-${version}.tar.bz2
set dobjc               gcc-objc-${version}.tar.bz2
distfiles               ${dcore} ${dfort} ${dcxx} ${dcxx} ${djava} ${dobjc}

checksums               ${dcore} sha1 55c664b33a4dc6b2130c47da28a1d6daab732ce9 \
                                ${dfort} sha1 fff9f58ff51e10dac89fb0b51ad74f5f90d5cabc \
                                ${dcxx} sha1 804870b31d1567e81c96a682dd9ef5a6175e8574 \
                                ${djava} sha1 9f0c56f4dabbe74811d40344ce0afe920798cca4 \
                                ${dobjc} sha1 5c5c3052796fef9e1fc4a468f6e04881c6dc9267

use_bzip2               yes

depends_lib             port:gmp port:mpfr

set major               4.0

worksrcdir              build

post-extract {
        file mkdir ${worksrcpath}
}

configure.cmd   ${workpath}/gcc-${version}/configure
configure.args  --enable-languages=c,c++,java,objc,f95 \
                                --libdir=${prefix}/lib/${name} \
                                --includedir=${prefix}/include/${name} \
                                --infodir=${prefix}/share/info \
                                --mandir=${prefix}/share/man \
                                --with-local-prefix=${prefix} \
                                --with-system-zlib \
                                --disable-nls \
                                --program-suffix=-dp-${major} \
                                --with-gxx-include-dir=${prefix}/include/${name}/c++/ \
                                --with-gmp=${prefix} \
                                --with-mpfr=${prefix}

build.target    profiledbootstrap
build.args              -j 2

post-destroot {
        cd ${destroot}${prefix}
        file delete -force share/man/man7
        file delete -force share/info
        if {[variant_isset powerpc]} {
        }
}

platform darwin 7 {
        depends_build   port:odcctools
        patch {
                reinplace "s|/usr/bin/libtool|${prefix}/bin/odlibtool|g" \
                        ${workpath}/gcc-${version}/gcc/config/darwin.h
        }
        configure.args-append   --with-as=${prefix}/bin/odas \
                                        --with-ld=${prefix}/bin/odld \
                                        --with-ar=${prefix}/bin/odar
}

platform darwin 8 {
        configure.env   CC=/usr/bin/gcc-4.0 CPP=/usr/bin/cpp-4.0 CXX=/usr/bin/g++-4.0
}

platform powerpc {
        post-destroot {
                system "cd ${destroot}${prefix}/include/${name} && \
                        cp ../../lib/${name}/gcc/*/${version}/include/libffi/ffitarget.h ."
        }
}

emac:~ tjyang$

== TWW HPM on Mac OS X ==[edit]

This is not a TWW supported effort.

emac:~ tjyang$ sb -V
1.2.10
emac:~ tjyang$ /opt/sbutils1210/lib/systype
powerpc-apple-darwin8.9.0
emac:~ tjyang$


Linux[edit]

RedHat Linux[edit]

RPM PMS Architecture[edit]

  • The logical layout of an rpm package. An rpm package contains header and payload.
     -------------------------------
     | package header  : metadata  |
     ------------------------------
     | package payload : cpio ball |
     -------------------------------
  • How to see a package's metadata ?
 rpm -qp --xml gnustep-base-debuginfo-1.13.0-1suse93.i386.rpm will display the content of package header(metadata). Following is an example.

  • How to check what kind of file digest is used in a package payload ?

RedHat PMS References[edit]

RedHat KickStart Architecture[edit]

RedHat KickStart overview[edit]

SUSE/Novell[edit]

Suse PMS Architecture[edit]

Suse PMS References[edit]

Debian/Hurd[edit]

Debian PMS Architecture[edit]

Debian PMS References[edit]

OpenSolaris[edit]

Creating Your IPS depot[edit]

  • opensolaris host info
-bash-3.2# cat /etc/release
                       Open Solaris 2008.05 snv_86_rc2a X86
           Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
                        Use is subject to license terms.
                             Assembled 23 April 2008
-bash-3.2# uname -a
SunOS opensolaris 5.11 snv_86 i86pc i386 i86pc
-bash-3.2#
-bash-3.2# ifconfig -a
lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
        inet 127.0.0.1 netmask ff000000
e1000g0: flags=201004843<UP,BROADCAST,RUNNING,MULTICAST,DHCP,IPv4,CoS> mtu 1500 index 2
        inet 192.168.1.206 netmask ffffff00 broadcast 192.168.1.255
        ether 0:c:29:97:10:e3
lo0: flags=2002000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv6,VIRTUAL> mtu 8252 index 1
        inet6 ::1/128
-bash-3.2#

Example

  • become root on opensolaris
  • mkdir /pub
  • Run following scripts
-bash-3.2# cat createdepot.ksh
svcadm enable  application/pkg/server
svccfg -s application/pkg/server setprop pkg/port=80
svccfg -s application/pkg/server setprop pkg/inst_root=/pub
svcadm refresh application/pkg/server
svcadm restart application/pkg/server
svcs -a |grep pkg
-bash-3.2#

  • Check the files created under /pub
-bash-3.2# ls -lrt /pub
total 21
drwxr-xr-x   2 root     root           2 May  6 21:50 trans
drwxr-xr-x   2 root     root           2 May  6 21:50 file
drwxr-xr-x   2 root     root           2 May  6 21:50 pkg
drwxr-xr-x   2 root     root           2 May  6 21:50 updatelog
drwxr-xr-x   2 root     root           3 May  6 21:50 catalog
-rw-r--r--   1 root     root           0 May  6 21:50 search.dir
-rw-r--r--   1 root     root        1024 May  6 21:50 search.pag
-rw-r--r--   1 root     root         281 May  6 21:58 createdepot.ksh
-bash-3.2#
  • Check if you can browse http://depotserver:80
  • Add your depot as preferred depot and check preferred authority switch from opensolaris.org to localhost one.
-bash-3.2# pkg set-authority -P -O http://192.168.1.206:80/  localhost
-bash-3.2# pkg authority
AUTHORITY                           URL
opensolaris.org                     http://pkg.opensolaris.org:80/
localhost (preferred)               http://192.168.1.206:80/
-bash-3.2#

Create your first IPS package[edit]

-bash-3.2# ksh -x  t.ksh
+ pkg image-create -F -a localhost=http://192.168.1.206:80/ /pub
-bash-3.2#

Solaris[edit]

Solaris PMS Architecture[edit]

Solaris PMS References[edit]

Solaris JumpStart Architecture[edit]

Solaris JumpStart overview[edit]

HP-UX[edit]

HP-UX PMS Architecture[edit]

HP-UX PMS References[edit]

HP-UX Ignite-UX Architecture[edit]

HP-UX Ignite-UX overview[edit]

IBM AIX[edit]

AIX PMS Architecture[edit]

AIX PMS References[edit]

SGI IRIX[edit]

IRIX PMS Architecture[edit]

IRIX PMS References[edit]

Cross-Platform Package Management System Overview[edit]

homogeneous approach[edit]

Home-grown[edit]

Using Makfile we can acturally create a CPAM system easily. Following is an example

TWW[edit]

non-homogeneous approach[edit]

openpkg[edit]

Portage[edit]

OpenSolaris IPS[edit]

Package building automation[edit]

Distributed package building[edit]

General Tools for distributed build[edit]

gmake[edit]

SGE : qmake[edit]

Distcc[edit]

Because distcc can only work with gcc, so it only can compile TWW's package source that utilize gcc compiler. This means we can use distcc to build pacakges for Redhat Linux.

How to use distcc to compile TWW's RH packages source[edit]

  • We will use distcc and newly released lsdistcc to compare the performance gain of compiling RH EL kernel and crosstool on using rhel3-distcc* machines are available in a subnet.
  • lsdistcc is a distcc server autodiscovery program. It relies on distcc servers being in DNS with distinctive names ending in numbers 1 through N. It is originally from http://kegel.com/distcc and will probably be included in a future release of distcc. With this helpful small lsditcc program we can dynamically assign the content of DISTCC_HOSTS to use as many available distcc hosts as possible.
  • For each OS platform you want to configure as a distcc execution node, do
  pkg-inst distcc
  /etc/init.d/TWWdistcc212 start
  
  • add distcc nodes into your name server;increase the serial number;"ndc reload". After following aliases are edited in your forward zone file
  • also make sure you have a good naming for your distcc execution hosts. ${OS}-distcc%d is the good naming scheme.
root@t2000> grep distcc test.zone
rhel3-distcc1         IN CNAME   t4001.test.com.
rhel3-distcc2         IN CNAME   t4408.test.com.
rhel3-distcc3         IN CNAME   t4500.test.com.
rhel3-distcc4         IN CNAME   t4000.test.com.
rhel3-distcc5         IN CNAME   t4001.test.com.
rhel3-distcc6         IN CNAME   t4002.test.com.
root@t2000>
 
  • "cc -o lsdistcc lsdistcc.c", and run a test to find out the current available RHEL3 have distcc enabled.
# lsdistcc rhel3-distcc%d
rhel3-distcc1
rhel3-distcc2
rhel3-distcc3
rhel3-distcc4
rhel3-distcc5
rhel3-distcc6
#

  • put "DISTCC-HOSTS := `lsdistcc rhel3-distcc%d`"in your makefile or build script.

Compiling RHEL3 kernel soucce[edit]

  • compiling linux-2.4 without help of distcc
# pwd
/usr/src/linux-2.4
# make clean;time make
<snip>
ib/lib.a /usr/src/linux-2.4.21-9.EL/lib/lib.a /usr/src/linux-2.4.21-9.EL/arch/i386/lib/lib.a --end-group -o .tmp_vmlinux1
kallsyms pass 2
kallsyms pass 3
ld -m elf_i386 -T /usr/src/linux-2.4.21-9.EL/arch/i386/vmlinux.lds -e stext 
arch/i386/kernel/head.o arch/i386/kernel/init_task.o init/main.o init/version.o init/do_mounts.o 
--start-group arch/i386/kernel/kernel.o arch/i386/mm/mm.o kernel/kernel.o mm/mm.o fs/fs.o 
ipc/ipc.o  drivers/char/char.o drivers/block/block.o drivers/misc/misc.o drivers/net/net.o 
drivers/char/drm/drm.o drivers/net/fc/fc.o drivers/net/appletalk/appletalk.o 
drivers/net/tokenring/tr.o drivers/net/wan/wan.o drivers/atm/atm.o drivers/ide/idedriver.o 
drivers/cdrom/driver.o drivers/pci/driver.o drivers/net/pcmcia/pcmcia_net.o 
drivers/net/wireless/wireless_net.o drivers/pnp/pnp.o drivers/video/video.o drivers/media/media.o 
drivers/md/mddev.o drivers/hotplug/vmlinux-obj.o drivers/isdn/vmlinux-obj.o crypto/crypto.o 
net/network.o /usr/src/linux-2.4.21-9.EL/arch/i386/lib/lib.a /usr/src/linux-2.4.21-9.EL/lib/lib.a 
/usr/src/linux-2.4.21-9.EL/arch/i386/lib/lib.a --end-group .tmp_kallsyms3.o -o vmlinux
nm vmlinux | grep -v '\(compiled\)\|\(\.o$\)\|\( [aUw] \)\|\(\.\.ng$\)\|\(LASH[RL]DI\)' | sort > System.map
make[1]: Leaving directory `/usr/src/linux-2.4.21-9.EL'

real    3m9.791s
user    2m49.010s
sys     0m20.350s
#
  • Following is a sample snapshot of "distccmon-text" output.
 23918  Blocked                                                            [0]
 23778  Compile     sun.c                                     rhel3-distcc1[0]
 23782  Compile     inode.c                                   rhel3-distcc1[1]
 23769  Compile     i8259.c                                   rhel3-distcc1[3]
 23896  Preprocess  dev_mcast.c                               rhel3-distcc2[0]
 23922  Preprocess  time.c                                    rhel3-distcc2[1]
 23907  Preprocess  futex.c                                   rhel3-distcc2[2]
 23927  Preprocess  sys_i386.c                                rhel3-distcc2[3]
 23383  Send        rd.c                                      rhel3-distcc3[0]
 23753  Send        ip_sockglue.c                             rhel3-distcc3[1]
 23112  Send        usercopy.c                                rhel3-distcc3[2]
 23057  Compile     sysctl_net_ether.c                        rhel3-distcc3[3]
 22496  Compile     xfrm_policy.c                             rhel3-distcc4[0]
 23851  Preprocess  context.c                                 rhel3-distcc4[1]
 23809  Compile     proc_misc.c                               rhel3-distcc4[3]
 23765  Compile     ialloc.c                                  rhel3-distcc5[0]
 23885  Compile     flow.c                                    rhel3-distcc5[1]
 23890  Preprocess  dev.c                                     rhel3-distcc5[2]
 23911  Compile     ioport.c                                  rhel3-distcc5[3]
 22772  Receive     xfrm_output.c                             rhel3-distcc6[0]
 22867  Compile     mem.c                                     rhel3-distcc6[2]
 22580  Compile     addr.c                                    rhel3-distcc6[3]

* compile the source with 6 distcc execution hosts.
# echo $DISTCC_HOSTS
rhel3-distcc1 rhel3-distcc2 rhel3-distcc3 rhel3-distcc4 rhel3-distcc5 rhel3-distcc6
#pwd
/usr/src/linux-2.4
# make clean;time make -j80 CC='distcc gcc'

distcc gcc -D__KERNEL__ -I/usr/src/linux-2.4.21-9.EL/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common  -Wno-unused -fomit-frame-pointer -pipe -freorder-blocks -mpreferred-stack-boundary=2 -march=i686   -nostdinc -iwithprefix include -DKBUILD_BASENAME=xattr_acl  -DEXPORT_SYMTAB -c xattr_acl.c
distcc gcc -D__KERNEL__ -I/usr/src/linux-2.4.21-9.EL/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common  -Wno-unused -fomit-frame-pointer -pipe -freorder-blocks -mpreferred-stack-boundary=2 -march=i686   -nostdinc -iwithprefix include -DKBUILD_BASENAME=solaris_acl  -DEXPORT_SYMTAB -c solaris_acl.c
rm -f network.o
ld -m elf_i386  -r -o network.o socket.o core/core.o ethernet/ethernet.o 802/802.o sched/sched.o netlink/netlink.o ipv4/ipv4.o xfrm/xfrm.o ipv4/netfilter/netfilter.o unix/unix.o ipv6/netfilter/netfilter.o packet/packet.o atm/atm.o netsyms.o sysctl_net.o
make[2]: Leaving directory `/usr/src/linux-2.4.21-9.EL/net'
make[1]: Leaving directory `/usr/src/linux-2.4.21-9.EL/net'
rm -f fs.o
ld -m elf_i386  -r -o fs.o open.o read_write.o devices.o file_table.o buffer.o super.o block_dev.o char_dev.o stat.o exec.o pipe.o namei.o fcntl.o ioctl.o readdir.o select.o fifo.o locks.o dcache.o inode.o attr.o bad_inode.o file.o iobuf.o dnotify.o filesystems.o namespace.o seq_file.o quota.o xattr.o dquot.o quota_v2.o aio.o dcookies.o binfmt_script.o binfmt_elf.o mbcache.o posix_acl.o xattr_acl.o solaris_acl.o proc/proc.o partitions/partitions.o ext2/ext2.o ramfs/ramfs.o hugetlbfs/hugetlbfs.o isofs/isofs.o nls/nls.o devpts/devpts.o
make[2]: Leaving directory `/usr/src/linux-2.4.21-9.EL/fs'
make[1]: Leaving directory `/usr/src/linux-2.4.21-9.EL/fs'
make[1]: Entering directory `/usr/src/linux-2.4.21-9.EL'
kallsyms pass 1
ld -m elf_i386 -T /usr/src/linux-2.4.21-9.EL/arch/i386/vmlinux.lds -e stext arch/i386/kernel/head.o arch/i386/kernel/init_task.o init/main.o init/version.o init/do_mounts.o --start-group arch/i386/kernel/kernel.o arch/i386/mm/mm.o kernel/kernel.o mm/mm.o fs/fs.o ipc/ipc.o  drivers/char/char.o drivers/block/block.o drivers/misc/misc.o drivers/net/net.o drivers/char/drm/drm.o drivers/net/fc/fc.o drivers/net/appletalk/appletalk.o drivers/net/tokenring/tr.o drivers/net/wan/wan.o drivers/atm/atm.o drivers/ide/idedriver.o drivers/cdrom/driver.o drivers/pci/driver.o drivers/net/pcmcia/pcmcia_net.o drivers/net/wireless/wireless_net.o drivers/pnp/pnp.o drivers/video/video.o drivers/media/media.o drivers/md/mddev.o drivers/hotplug/vmlinux-obj.o drivers/isdn/vmlinux-obj.o crypto/crypto.o net/network.o /usr/src/linux-2.4.21-9.EL/arch/i386/lib/lib.a /usr/src/linux-2.4.21-9.EL/lib/lib.a /usr/src/linux-2.4.21-9.EL/arch/i386/lib/lib.a --end-group -o .tmp_vmlinux1
kallsyms pass 2
kallsyms pass 3
ld -m elf_i386 -T /usr/src/linux-2.4.21-9.EL/arch/i386/vmlinux.lds -e stext arch/i386/kernel/head.o arch/i386/kernel/init_task.o init/main.o init/version.o init/do_mounts.o --start-group arch/i386/kernel/kernel.o arch/i386/mm/mm.o kernel/kernel.o mm/mm.o fs/fs.o ipc/ipc.o  drivers/char/char.o drivers/block/block.o drivers/misc/misc.o drivers/net/net.o drivers/char/drm/drm.o drivers/net/fc/fc.o drivers/net/appletalk/appletalk.o drivers/net/tokenring/tr.o drivers/net/wan/wan.o drivers/atm/atm.o drivers/ide/idedriver.o drivers/cdrom/driver.o drivers/pci/driver.o drivers/net/pcmcia/pcmcia_net.o drivers/net/wireless/wireless_net.o drivers/pnp/pnp.o drivers/video/video.o drivers/media/media.o drivers/md/mddev.o drivers/hotplug/vmlinux-obj.o drivers/isdn/vmlinux-obj.o crypto/crypto.o net/network.o /usr/src/linux-2.4.21-9.EL/arch/i386/lib/lib.a /usr/src/linux-2.4.21-9.EL/lib/lib.a /usr/src/linux-2.4.21-9.EL/arch/i386/lib/lib.a --end-group .tmp_kallsyms3.o -o vmlinux
nm vmlinux | grep -v '\(compiled\)\|\(\.o$\)\|\( [aUw] \)\|\(\.\.ng$\)\|\(LASH[RL]DI\)' | sort > System.map
make[1]: Leaving directory `/usr/src/linux-2.4.21-9.EL'

real    1m11.185s
user    0m42.430s
sys     0m16.110s
#

  • compile the 2.4 kernel source on rhel3-distc6 (8CPU) machines locally.
#pwd
/usr/src/linux-2.4
# time make -j8

c -iwithprefix include -DKBUILD_BASENAME=apic  -c -o apic.o apic.c
gcc -D__KERNEL__ -I/usr/src/linux-2.4.21-9.EL/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common  -Wno-unused -fomit-frame-pointer -pipe -freorder-blocks -mpreferred-stack-boundary=2 -march=i686   -nostdinc -iwithprefix include -DKBUILD_BASENAME=nmi  -c -o nmi.o nmi.c
gcc -D__KERNEL__ -I/usr/src/linux-2.4.21-9.EL/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common  -Wno-unused -fomit-frame-pointer -pipe -freorder-blocks -mpreferred-stack-boundary=2 -march=i686   -nostdinc -iwithprefix include -DKBUILD_BASENAME=io_apic  -c -o io_apic.o io_apic.c
gcc -D__KERNEL__ -I/usr/src/linux-2.4.21-9.EL/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common  -Wno-unused -fomit-frame-pointer -pipe -freorder-blocks -mpreferred-stack-boundary=2 -march=i686   -nostdinc -iwithprefix include -DKBUILD_BASENAME=acpitable  -c -o acpitable.o acpitable.c
rm -f video.o
ld -m elf_i386  -r -o video.o dummycon.o vgacon.o font_8x8.o font_8x16.o fbmem.o fbcmap.o modedb.o fbcon.o fonts.o vesafb.o fbcon-cfb8.o fbcon-cfb16.o fbcon-cfb24.o fbcon-cfb32.o
make[3]: Leaving directory `/usr/src/linux-2.4.21-9.EL/drivers/video'
make[2]: Leaving directory `/usr/src/linux-2.4.21-9.EL/drivers/video'
make all_targets
make[2]: Entering directory `/usr/src/linux-2.4.21-9.EL/drivers'
make[2]: Nothing to be done for `all_targets'.
make[2]: Leaving directory `/usr/src/linux-2.4.21-9.EL/drivers'
make[1]: Leaving directory `/usr/src/linux-2.4.21-9.EL/drivers'
gcc -D__ASSEMBLY__ -D__KERNEL__ -I/usr/src/linux-2.4.21-9.EL/include -traditional -c head.S -o head.o
gcc -D__KERNEL__ -I/usr/src/linux-2.4.21-9.EL/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common  -Wno-unused -fomit-frame-pointer -pipe -freorder-blocks -mpreferred-stack-boundary=2 -march=i686   -nostdinc -iwithprefix include -DKBUILD_BASENAME=init_task  -c -o init_task.o init_task.c
{standard input}: Assembler messages:
{standard input}:289: Warning: indirect lcall without `*'
{standard input}:418: Warning: indirect lcall without `*'
rm -f kernel.o
ld -m elf_i386  -r -o kernel.o process.o semaphore.o signal.o entry.o traps.o irq.o vm86.o ptrace.o i8259.o ioport.o ldt.o setup.o time.o sys_i386.o pci-dma.o i386_ksyms.o i387.o bluesmoke.o dmi_scan.o entry_trampoline.o doublefault.o process_timing.o pci-i386.o pci-pc.o pci-irq.o mtrr.o apm.o smp.o smpboot.o trampoline.o mpparse.o apic.o nmi.o io_apic.o acpitable.o
make[1]: Leaving directory `/usr/src/linux-2.4.21-9.EL/arch/i386/kernel'
make[1]: Entering directory `/usr/src/linux-2.4.21-9.EL'
kallsyms pass 1
ld -m elf_i386 -T /usr/src/linux-2.4.21-9.EL/arch/i386/vmlinux.lds -e stext arch/i386/kernel/head.o arch/i386/kernel/init_task.o init/main.o init/version.o init/do_mounts.o --start-group arch/i386/kernel/kernel.o arch/i386/mm/mm.o kernel/kernel.o mm/mm.o fs/fs.o ipc/ipc.o  drivers/char/char.o drivers/block/block.o drivers/misc/misc.o drivers/net/net.o drivers/char/drm/drm.o drivers/net/fc/fc.o drivers/net/appletalk/appletalk.o drivers/net/tokenring/tr.o drivers/net/wan/wan.o drivers/atm/atm.o drivers/ide/idedriver.o drivers/cdrom/driver.o drivers/pci/driver.o drivers/net/pcmcia/pcmcia_net.o drivers/net/wireless/wireless_net.o drivers/pnp/pnp.o drivers/video/video.o drivers/media/media.o drivers/md/mddev.o drivers/hotplug/vmlinux-obj.o drivers/isdn/vmlinux-obj.o crypto/crypto.o net/network.o /usr/src/linux-2.4.21-9.EL/arch/i386/lib/lib.a /usr/src/linux-2.4.21-9.EL/lib/lib.a /usr/src/linux-2.4.21-9.EL/arch/i386/lib/lib.a --end-group -o .tmp_vmlinux1
kallsyms pass 2
kallsyms pass 3
ld -m elf_i386 -T /usr/src/linux-2.4.21-9.EL/arch/i386/vmlinux.lds -e stext arch/i386/kernel/head.o arch/i386/kernel/init_task.o init/main.o init/version.o init/do_mounts.o --start-group arch/i386/kernel/kernel.o arch/i386/mm/mm.o kernel/kernel.o mm/mm.o fs/fs.o ipc/ipc.o  drivers/char/char.o drivers/block/block.o drivers/misc/misc.o drivers/net/net.o drivers/char/drm/drm.o drivers/net/fc/fc.o drivers/net/appletalk/appletalk.o drivers/net/tokenring/tr.o drivers/net/wan/wan.o drivers/atm/atm.o drivers/ide/idedriver.o drivers/cdrom/driver.o drivers/pci/driver.o drivers/net/pcmcia/pcmcia_net.o drivers/net/wireless/wireless_net.o drivers/pnp/pnp.o drivers/video/video.o drivers/media/media.o drivers/md/mddev.o drivers/hotplug/vmlinux-obj.o drivers/isdn/vmlinux-obj.o crypto/crypto.o net/network.o /usr/src/linux-2.4.21-9.EL/arch/i386/lib/lib.a /usr/src/linux-2.4.21-9.EL/lib/lib.a /usr/src/linux-2.4.21-9.EL/arch/i386/lib/lib.a --end-group .tmp_kallsyms3.o -o vmlinux
nm vmlinux | grep -v '\(compiled\)\|\(\.o$\)\|\( [aUw] \)\|\(\.\.ng$\)\|\(LASH[RL]DI\)' | sort > System.map
make[1]: Leaving directory `/usr/src/linux-2.4.21-9.EL'

real    0m56.337s
user    5m32.990s
sys     0m35.860s
# 

Electric Cloud: emake[edit]

Vendor specific distributed build[edit]

Clearcase : clearmake[edit]

Sun Studio: dmake[edit]

FAQ[edit]

How TO[edit]

How to automate this wiki book publishing by automated script ?[edit]

We need a perl module call "mvs", it is mediawiki client written in perl language.

me@myhost> mvs -h
Usage:
      mvs [Options] command [Options] [filename]

      mvs -h|--help
      mvs --version
      mvs -D

      mkdir wikistuff
      cd wikistuff

      mvs [-q|-v] [-d <wikihost>] [-l language_code ] [-u <username>] [-p <password> ] [-w <wiki\
_path>] login

      mvs [-q|-v] update [<file> ..]
      mvs [-q|-v] up [<file> ..]

      mvs [-q|-v] [-M] [-W] -m "commit message" commit [<file> ..]
      mvs [-q|-v] [-M] [-W] -m "commit message" com [<file> ..]

me@myhost>

  • Create a makefile to automate the login,download and upload steps.
me@myhost> cat Makefile 
.PHONY: all
all: download 
login:
        mvs login -d www.wikibooks.org -l en  -u MyAccountName -p 'MyPassword'
# erase the local copy first
init: 
        rm -rf CPAM_with_TWW CPAM_with_TWW.wiki 
clean: 
        rm -f *~ CPAM_with_TWW/*~
# mvs update    local                 remote
download: login
        mvs update CPAM_with_TWW.wiki  CPAM_with_TWW.wiki 
        mvs update CPAM_with_TWW/References_Manual.wiki References_Manual.wiki
        mvs update CPAM_with_TWW/User_Guide.wiki User_Guide.wiki
        mvs update CPAM_with_TWW/Developer_Guide.wiki Developer_Guide.wiki

# Check in and Commit

upload: CPAM_with_TWW.wiki CPAM_with_TWW/User_Guide.wiki  CPAM_with_TWW/Developer_Guide.wiki  CPAM_with_TWW/References_Manual.wiki
        mvs -m "Updated with 0.26 mvs perl mediawiki client." commit  CPAM_with_TWW.wiki 
        mvs -m "Updated with 0.26 mvs perl mediawiki client." commit  CPAM_with_TWW/User_Guide.wiki 
        mvs -m "Updated with 0.26 mvs perl mediawiki client." commit  CPAM_with_TWW/Developer_Guide.wiki 
        mvs -m "Updated with 0.26 mvs perl mediawiki client." commit  CPAM_with_TWW/References_Manual.wiki

me@myhost> 

If you are behind corporate firewall[edit]

  • set HTTP_PROXY variable to http://fw.my.com:port if no firewall account is needed.
  • set HTTP_PROXY variable to http://MYaccount:MYpassword@fw.my.com:port if firewall account/password is needed.

Doxygen docs of CPAM/TWW application[edit]

GNUstep and CPAM[edit]