带 TWW 的 CPAM/参考手册
外观
本节介绍了不同操作系统上的不同 PMS。通过了解每个 PMS,我们可以找出差异,并尝试将它们在中央和超 PMS 下一起工作。以下各节的主要目的是了解如何使这些 PMS 与 TWW HPMS 协同工作。
打包任务 | rpm | pkgadd | sw 库 | inst | OpenSolaris ips | lpp | Windows WiX | Mac OSX |
---|---|---|---|---|---|---|---|---|
构建包 | rpmbuild -ba packagename.spec | pkgmk | ? | ? | ? | candle.exe -> light.exe | packagemanager | |
查询已安装的包 | rpm -qa | pkginfo | ? | ? | ? | ? | ? | pkgutils—pkgs |
删除包 | rpm -e pkgname | pkgrm | ? | ? | ? | ? | msiexec | 不可用。 |
- Installshield
Mac OSX 软件分发,它并不是提供完整包生命周期机制的软件包管理系统。一些机制仍然缺失,例如
- 命令行删除包。
- 包自动依赖安装。
- 包仓库。
- installer(8)
- repair_packages(8)
- packagemaker(1)
- pkgutil :是一个用于执行包查询操作的命令行工具。
imac:~ me$ pkgutil --pkgutil-version pkgutil: "$Id: main.m,v 1.24 2007/10/08 19:53:38 ryanc Exp $" imac:~ me$
学习 macort 时需要注意几点。Macport 使用 TCL 脚本语言来自动化包的创建、安装和其他包管理过程。
- 以下是 Macport 构建系统的一些目录路径。
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 也是一个超级包管理系统。例如,macport 可以生成 RPM 和 Mac 的 pkg 格式的 zsh。
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$
- Macport 开发人员
- 安装您的 Darwinport PMS
- 尝试构建 gcc-4.0
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
- gcc40 的构建收据(Portfile)。
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 [email protected] $ PortSystem 1.0 name gcc40 version 4.0.4 platforms darwin categories lang maintainers [email protected] 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 支持的工作。
emac:~ tjyang$ sb -V 1.2.10 emac:~ tjyang$ /opt/sbutils1210/lib/systype powerpc-apple-darwin8.9.0 emac:~ tjyang$
- RPM 包的逻辑布局。一个 RPM 包包含头文件和有效负载。
------------------------------- | package header : metadata | ------------------------------ | package payload : cpio ball | -------------------------------
- 如何查看包的元数据?
rpm -qp—xml gnustep-base-debuginfo-1.13.0-1suse93.i386.rpm will display the content of package header(metadata). Following is an example.
- 如何检查包有效负载中使用的文件摘要类型?
- opensolaris 主机信息
-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#
示例
- 在 opensolaris 上成为 root 用户
- mkdir /pub
- 运行以下脚本
-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#
- 检查 /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#
- 检查是否可以浏览 http://depotserver:80
- 将您的仓库添加为首选仓库,并检查首选授权从 opensolaris.org 切换到 localhost。
-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#
-bash-3.2# ksh -x t.ksh + pkg image-create -F -a localhost=http://192.168.1.206:80/ /pub -bash-3.2#
使用 Makfile,我们实际上可以轻松地创建一个 CPAM 系统。以下是一个示例
由于 distcc 只能与 gcc 一起使用,因此它只能编译使用 gcc 编译器的 TWW 包源代码。这意味着我们可以使用 distcc 为 Redhat Linux 构建包。
- 我们将使用 distcc 和新发布的 lsdistcc 来比较编译 RH EL 内核和交叉工具在使用 rhel3-distcc* 机器(在子网中可用)时的性能提升。
- lsdistcc 是一个 distcc 服务器自动发现程序。它依赖于 distcc 服务器在 DNS 中具有以数字 1 到 N 结尾的独特名称。它最初来自 http://kegel.com/distcc,可能会包含在 distcc 的未来版本中。借助这个有用的 lsditcc 小程序,我们可以动态分配 DISTCC_HOSTS 的内容,以使用尽可能多的可用 distcc 主机。
- 对于要配置为 distcc 执行节点的每个操作系统平台,请执行以下操作
pkg-inst distcc /etc/init.d/TWWdistcc212 start
- 将 distcc 节点添加到您的域名服务器中;增加序列号;“ndc reload”。编辑转发区域文件中的以下别名后
- 还要确保您的 distcc 执行主机有良好的命名。${OS}-distcc%d 是一个很好的命名方案。
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”,并运行测试以找出当前启用了 distcc 的可用 RHEL3。
# lsdistcc rhel3-distcc%d rhel3-distcc1 rhel3-distcc2 rhel3-distcc3 rhel3-distcc4 rhel3-distcc5 rhel3-distcc6 #
- 在您的 makefile 或构建脚本中添加“DISTCC-HOSTS := `lsdistcc rhel3-distcc%d`”
- 在没有 distcc 帮助的情况下编译 linux-2.4
# 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 #
- 以下是“distccmon-text”输出的样本快照。
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 #
- 在本地 rhel3-distc6(8CPU)机器上编译 2.4 内核源代码。
#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 #
我们需要一个名为“mvs”的 perl 模块,它是用 perl 语言编写的 mediawiki 客户端。
- MVS
- Perl mvs 支持邮件列表位于 http://geekhive.net/cgi-bin/mailman/listinfo/www-mediawiki-client-l
- 从 cpan 安装 mvs
- 快速检查 mvs 命令。
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>
- 创建一个 makefile 来自动执行登录、下载和上传步骤。
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>
- 如果不需要防火墙帐户,则将 HTTP_PROXY 变量设置为 http://fw.my.com:port。
- 如果需要防火墙帐户/密码,则将 HTTP_PROXY 变量设置为 http://MYaccount:[email protected]:port。