LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
12
返回列表 发新帖
楼主: Eg_zm

有问题想请兄弟们看看。使用#make index的时候,出现下面的错误。

[复制链接]
发表于 2004-5-25 14:30:19 | 显示全部楼层
Making your own release with FreeBSD
Check out the source you want, eg
cd /usr
cvs -d /home/ncvs co -rRELENG_4 src
   
Apply the patches and things.. You will need to apply this patch to teach 'make release' about copying the source files rather than using checkout. I also have a patches to
Enable all.log (and create it on install)
Teach cron to do jobs in UTC time
Remove the 'flags 0x1' from GENERIC so fussy keyboards work.
Do an fsck -y if the fsck -p fails at startup. We ship systems that sit in far away locations, if fsck -y doesn't work the system is hosed anyway.
Add sensible defaults for csh to stop in beeping and to automatically list the contents when auto completing.
Delete the .orig files generate by the patches..

find /usr/src -name \*.orig -delete
   
Do a buildworld...
/usr/bin/time sh -c 'make -j 2 buildworld' |& tee /tmp/buildworld.log
   
Mount the ports tree you want distributed on /usr/ports, eg
sudo mount -o soft,intr cain:/home/doconnor/work/ros-ports /usr/ports
   
Cook the release! I build with NODOC because I don't care for the extra junk it gets you.
sudo /usr/bin/time sh -c 'make release CHROOTDIR=/tmp/release/release BUILDNAME=4.2-GENESIS CVSROOT=/usr CPNOTCVS= NODOC=' | & tee /tmp/release.log
   
OK, after that is done the packages need to be built. If you are content with just using the already built ones from a CD then you can just copy them, eg
mount /cdrom
cp -R /cdrom/packages /tmp/release/cdrom/disc1/
   
If you want to build your own set (handy for making local mods etc) then you need to setup a suitable chroot envrionment. I install X from a CD to save (lots of) time and space, also note that the nameserver used below will probably have to be changed I install compat22 so that the native Netscape port will build.
cp -r /cdrom/XF86336 /tmp/release/release/R/cdrom/disc1
rm -rf /tmp/release/pkg-root
chflags -R noschg /tmp/release/pkg-root
rm -rf /tmp/release/pkg-root
mkdir /tmp/release/pkg-root
linux
cd /usr/src
make installworld DESTDIR=/tmp/release/pkg-root
cd etc
make distribution DESTDIR=/tmp/release/pkg-root
cat << EOF >/tmp/release/pkg-root/etc/resolv.conf
search gsoft.com.au
nameserver 203.38.152.97
EOF

cd /tmp/release/pkg-root/usr
mkdir X11R6
cd X11R6
tar zxvf /tmp/release/release/R/cdrom/disc1/XF86336/Xbin.tgz
tar zxvf /tmp/release/release/R/cdrom/disc1/XF86336/Xcfg.tgz
tar zxvf /tmp/release/release/R/cdrom/disc1/XF86336/Xf100.tgz
tar zxvf /tmp/release/release/R/cdrom/disc1/XF86336/Xfnts.tgz
tar zxvf /tmp/release/release/R/cdrom/disc1/XF86336/Xfscl.tgz
tar zxvf /tmp/release/release/R/cdrom/disc1/XF86336/Xlib.tgz
tar zxvf /tmp/release/release/R/cdrom/disc1/XF86336/Xman.tgz
tar zxvf /tmp/release/release/R/cdrom/disc1/XF86336/Xprog.tgz
tar zxvf /tmp/release/release/R/cdrom/disc1/XF86336/Xset.tgz
cp /tmp/release/release/R/cdrom/disc1/XF86336/postinst.sh /tmp/release/pkg-root

cd /tmp/release/pkg-root/usr
tar zxf /tmp/release/release/R/cdrom/disc1/ports/ports.tgz
cd ..
cat /tmp/release/release/R/cdrom/disc1/compat22/compat22.?? | tar zxf -

chroot /tmp/release/pkg-root /bin/csh
ldconfig /usr/lib /usr/local/lib /usr/X11R6/lib
ldconfig -aout /usr/lib/compat/aout
/postinst.sh

Now you actually build the ports..
cd /usr/ports
mkdir /packages
make index
make package PACKAGES=/packages USA_RESIDENT=NO WRKDIRPREFIX=/tmp/work MOTIF_OPEN= HAVE_MOTIF= MASTER_SITE_OVERRIDE='http://cain.gsoft.com.au/~doconnor/distfiles/${DIST_SUBDIR}/' PACKAGES=/packages

If that worked (haha..) you now have a package suite which can be put on a CD. If you
cp -r /tmp/release/pkg-root/packages /tmp/release/release/R/cdrom/disc1
cp tmp/release/pkg-root/usr/ports/INDEX /tmp/release/release/R/cdrom/disc1/packages

you will be able to create an iso which is bootable and has all of the packages easily installable. To make the iso..
mkisofs -b floppies/boot.flp -c floppies/boot.catalog -J -o /tmp/myrelease.iso -r -T /tmp/release/release/R/cdrom/disc1

A handy thing to have is a sysinstall install script which installs all of your custom packages and picks what distributions you want etc etc.. I have one here which is in the middle of being hacked on. Note the comment about package order.. I had a *very* frustrating time finding that out..

http://www.gsoft.com.au/~doconnor/FreeBSD-release.html
发表于 2004-5-25 14:34:55 | 显示全部楼层
找到这一篇文章! 不过看不懂的说!
http://win.koalasoft.org/documen ... llare-un-ports.html

Installare un ports, gestione dei package
A questo punto possiamo finalmente installare tutto il software che necessita al nostro sistema o che maggiormente ci interessa: per selezionare un ports sarà sufficente scorrere il contenuto della directory /usr/ports.

Per ricercare un programma nell'albero dei ports:

[root@FreeBSD root]# cd /usr/ports/
[root@FreeBSD ports]# make search key=apache13
  


L'albero dei ports viene aggiornato continuamente ma spesso non viene aggiornato l'indice, per sistemare l'indice del database dell'albero dei ports dovremo digitare il seguente comando (l'operazione è sconsigliata nel caso si disponga di un sistema particolarmente lento):

[root@FreeBSD root]# cd /usr/ports
[root@FreeBSD ports]# make index
Generating INDEX - please wait..
  


E' anche possibile effettuare delle ricerche per reperirire un ports specifico, a tale scopo potremmo utilizzare il motore di ricerca presente sul sito del progetto FreeBSD alla URLs: http://www.freebsd.org/ports/.

Prendiamo ora in considerazione un'esempio pratico, ora sarà possibile capire al meglio la procedura di installazione di un nuovo ports in un sistema FreeBSD. Installiamo ora Apache web server, creiamo anche un package autoinstallante. Il package potrà poi essere utilizzato anche su altri sistemi, al termine della procedura, facciamo pulizia.

Ecco i comandi:

[root@picard root]# cd /usr/ports/www/apache13
[root@picard apache13]# make install
[root@picard apache13]# make package
[root@picard apache13]# make clean
  


Il comando make install installa il software ed aggiorna il database dei packages, tutto il software installato su FreeBSD viene registrato del database dei packages.

Il comando make packages crea un pacchetto software autoinstallante che potrà essere utilizzato anche su altri sistemi FreeBSD grazie al comando pkg_add nomedelpacchetto.tbz.

Per finire, il comando make clean ripulisce la directory che è stata automaticamente generata dallo script Makefile per consentire la compilazione dell'applicazione sul sistema.

Se necessita ricercare un particolare ports è bene consultare la seguente URLs:http://www.freebsd.org/ports/.

http://win.koalasoft.org/documentazione/freebsd/index.html
发表于 2004-5-25 14:35:45 | 显示全部楼层
直接使用google, 然后freebsd  make index可找到好多资料!
 楼主| 发表于 2004-5-25 16:40:04 | 显示全部楼层
今天仔细的检查了服务器,发现是/var/db/pkg里面的都是我昨天和今天安装的东西,以前的pkgdb好象丢失了。
问题可能就是出在这里,以前好象使用pkgdb -fuF能恢复,可是这次总是出错
谁有恢复的方法吗??

这里屏蔽了google的搜索。抱歉的说。
发表于 2004-6-5 07:38:33 | 显示全部楼层
出现这种错误一般是由于在更新ports tree时没有选择更新所有的造成的。。。你可能是只选择更新一部分
 楼主| 发表于 2004-6-5 14:08:08 | 显示全部楼层
最初由 laozei 发表
出现这种错误一般是由于在更新ports tree时没有选择更新所有的造成的。。。你可能是只选择更新一部分


开始的时候也以为是,可是重新更新所有的port tree之后,错误还是一样.
发表于 2004-6-6 01:15:32 | 显示全部楼层
试一下portsdb -fuU
另外说/var/db/pkg都是两天内的东东
这是怎么回事?强烈关注。
发表于 2004-6-6 01:17:35 | 显示全部楼层
另外不知版主的portupgrade是不是最新的了?
好象这个月portupgrade升级了两次吧。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表