Bring this article up-to-date:
- mention ZFS - xorg instead of XFree86 - use most recent mergemaster messages in <screen> sections stage_1.sh: - use /dev/daXYZs1a to no longer require anti-footshooting warning - Introduce TARGET and MAKEOBJDIRPREFIX variables - remove FreeBSD version 4/5 relevant shell code stage_2.conf.default: - update somewhat ancient port list; openoffice 1 just doesn't cut it any more stage_3.mk: - update to closer reflect my current version
This commit is contained in:
parent
4e66d4f2d0
commit
11aa75bda3
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/head/; revision=33349
5 changed files with 218 additions and 227 deletions
en_US.ISO8859-1/articles/fbsd-from-scratch
|
@ -16,7 +16,7 @@
|
|||
</affiliation>
|
||||
</author>
|
||||
<copyright>
|
||||
<year>2002,2003,2004</year>
|
||||
<year>2002,2003,2004,2008</year>
|
||||
<holder>Jens Schweikhardt</holder>
|
||||
</copyright>
|
||||
|
||||
|
@ -83,7 +83,7 @@
|
|||
|
||||
<listitem>
|
||||
<para>It cannot install in <application>Vinum</application>
|
||||
partitions.</para>
|
||||
or <application>ZFS</application> partitions.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
|
@ -289,7 +289,7 @@
|
|||
call, these binaries will die with <literal>SIGSYS, Bad
|
||||
system call</literal>, because the old kernel does not have
|
||||
that system call. I have seen other issues when I tried
|
||||
building <filename role="package">lang/perl5</filename>.</para>
|
||||
building <filename role="package">lang/perl5.8</filename>.</para>
|
||||
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
|
@ -339,6 +339,7 @@
|
|||
merge, it will display and ask at the end</para>
|
||||
|
||||
<screen>*** Comparison complete
|
||||
*** Saving mtree database for future upgrades
|
||||
|
||||
Do you wish to delete what is left of /var/tmp/temproot.stage1? [no] <userinput>no</userinput></screen>
|
||||
|
||||
|
@ -348,8 +349,9 @@ Do you wish to delete what is left of /var/tmp/temproot.stage1? [no] <userinput>
|
|||
<filename>/var/tmp/temproot.stage1</filename> which will be copied to the
|
||||
new system later (unless already there).</para>
|
||||
|
||||
<para>After that it will list the files it installed, making use of
|
||||
a pager, &man.more.1; by default, optionally &man.less.1;:</para>
|
||||
<para>After that <command>mergemaster</command> will list the files it
|
||||
installed and ask if the new <filename>login.conf</filename> should be
|
||||
generated:</para>
|
||||
|
||||
<screen>*** You chose the automatic install option for files that did not
|
||||
exist on your system. The following were installed for you:
|
||||
|
@ -357,34 +359,25 @@ Do you wish to delete what is left of /var/tmp/temproot.stage1? [no] <userinput>
|
|||
...
|
||||
/newroot/COPYRIGHT
|
||||
|
||||
(END)</screen>
|
||||
*** You installed a new aliases file into /newroot/etc/mail, but
|
||||
the newaliases command is limited to the directories configured
|
||||
in sendmail.cf. Make sure to create your aliases database by
|
||||
hand when your sendmail configuration is done.
|
||||
|
||||
<para>Type <keycap>q</keycap> to quit the pager. Then you will
|
||||
be informed about <filename>login.conf</filename>:</para>
|
||||
|
||||
<screen>*** You installed a login.conf file, so make sure that you run
|
||||
*** You installed a login.conf file, so make sure that you run
|
||||
'/usr/bin/cap_mkdb /newroot/etc/login.conf'
|
||||
to rebuild your login.conf database
|
||||
to rebuild your login.conf database
|
||||
|
||||
Would you like to run it now? y or n [n]</screen>
|
||||
|
||||
<para>The answer does not matter since we will run &man.cap.mkdb.1; in any
|
||||
case.</para>
|
||||
<para>The answer does not matter since <filename>stage_1.sh</filename> will
|
||||
run &man.cap.mkdb.1; for you in any case.</para>
|
||||
|
||||
<para>Here is the author's <ulink
|
||||
url="stage_1.conf.default"><filename>stage_1.conf.default</filename></ulink>,
|
||||
which you need to modify substantially. The comments give you
|
||||
enough information what to change.</para>
|
||||
|
||||
<warning>
|
||||
<para>Please pay attention to the &man.newfs.8; commands.
|
||||
While you can not create new file systems on mounted partitions, the
|
||||
script will happily erase any unmounted
|
||||
<filename>/dev/da0s1a</filename>, <filename>/dev/da0s1e</filename>
|
||||
and <filename>/dev/da2s1e</filename>. This can be enough to ruin
|
||||
your day, so be sure to modify the device names.</para>
|
||||
</warning>
|
||||
|
||||
<programlisting><inlinegraphic fileref="stage_1.conf.default" format="linespecific"></programlisting>
|
||||
|
||||
<para>Download <ulink
|
||||
|
@ -398,7 +391,7 @@ Do you wish to delete what is left of /var/tmp/temproot.stage1? [no] <userinput>
|
|||
<para>Inherited users and groups.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>Firewalled Internet connectivity over Ethernet and PPP.</para>
|
||||
<para>Firewalled Internet connectivity over Ethernet.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>Correct time zone and NTP.</para>
|
||||
|
@ -458,10 +451,13 @@ Do you wish to delete what is left of /var/tmp/temproot.stage1? [no] <userinput>
|
|||
<para>In fact you can specify arbitrary shell commands, so you are
|
||||
not restricted to simple <command>make</command> invocations:</para>
|
||||
|
||||
<programlisting>java linux-sun-jdk13 yes | make install
|
||||
news inn-stable CONFIGURE_ARGS="--enable-uucp-rnews --enable-setgid-inews" make install</programlisting>
|
||||
<programlisting>java jdk16 echo true > files/license.sh; make install BATCH=yes < /dev/null
|
||||
print acroread8 yes accept | make install PAGER=ls
|
||||
x11-fonts gnu-unifont make install && mkfontdir /usr/local/lib/X11/fonts/local
|
||||
news inn-stable CONFIGURE_ARGS="--enable-uucp-rnews --enable-setgid-inews" make install</programlisting>
|
||||
|
||||
<para>Note that the line for
|
||||
<para>The first two lines are examples how you can handle ports
|
||||
asking you to accept a licence. Note how the line for
|
||||
<filename role="package">news/inn-stable</filename> is an example
|
||||
for a one-shot shell variable assignment to
|
||||
<literal>CONFIGURE_ARGS</literal>. The port
|
||||
|
@ -524,33 +520,13 @@ news inn-stable CONFIGURE_ARGS="--enable-uucp-rnews --enable-setgid-inews" make
|
|||
is interactive and does not support <command>make BATCH=YES
|
||||
install</command>. For a few ports the interaction is nothing more
|
||||
than typing <literal>yes</literal> when asked to accept some license.
|
||||
If such input is read from the standard input, we simply pipe the
|
||||
appropriate answers to the installation command (usually <command>make
|
||||
install</command>; this is how I deal with <filename
|
||||
role="package">java/linux-sun-jdk14</filename> in
|
||||
<filename>stage_2.conf.default</filename>).</para>
|
||||
|
||||
<para>This strategy for example does not work for <filename
|
||||
role="package">editors/staroffice52</filename>, which requires that
|
||||
X11 is running. The installation procedure involves a fair amount of
|
||||
clicking and typing, so it cannot be automated like other ports can.
|
||||
However the following workaround does the trick for me: first I
|
||||
create a staroffice package on the old system with</para>
|
||||
|
||||
<informalexample>
|
||||
<screen>&prompt.root; <userinput>cd /usr/ports/editors/staroffice52</userinput>
|
||||
&prompt.root; <userinput>make package</userinput>
|
||||
===> Building package for staroffice-5.2_1
|
||||
Creating package /usr/ports/editors/staroffice52/staroffice-5.2_1.tbz
|
||||
Registering depends:.
|
||||
Creating bzip'd tar ball in '/usr/ports/editors/staroffice52/staroffice-5.2_1.tbz'</screen>
|
||||
</informalexample>
|
||||
|
||||
<para>and during stage two I simply use:</para>
|
||||
|
||||
<informalexample>
|
||||
<screen>&prompt.root; <userinput>pkg_add /usr/ports/editors/staroffice52/staroffice-5.2_1.tbz</userinput></screen>
|
||||
</informalexample>
|
||||
If the answer is read from standard input, simply pipe the
|
||||
appropriate answers to the installation command (e.g. <command>yes |
|
||||
make install</command>. For other ports you need to investigate
|
||||
where exactly the interactive command is located and deal with it
|
||||
appropriately. The examples above for
|
||||
<filename role="package">print/acroread8</filename> and
|
||||
<filename role="package">java/jdk16</filename> are examples.</para>
|
||||
|
||||
<para>You should also be aware of upgrade issues for config files.
|
||||
In general you do not know when and if the format or contents of a
|
||||
|
@ -586,22 +562,15 @@ fi
|
|||
httpd.conf</command>.</para>
|
||||
|
||||
<para>I have used &scratch.ap; several times to update a
|
||||
<literal>5-CURRENT</literal> to <literal>5-CURRENT</literal>, i.e.
|
||||
I have never tried to install a <literal>5-CURRENT</literal> from
|
||||
a <literal>4-STABLE</literal> system or vice versa. Due to the
|
||||
<literal>7-CURRENT</literal> to <literal>7-CURRENT</literal> and
|
||||
<literal>8-CURRENT</literal> to <literal>8-CURRENT</literal>, i.e.
|
||||
I have never tried to install a <literal>8-CURRENT</literal> from
|
||||
a <literal>7-CURRENT</literal> system or vice versa. Due to the
|
||||
number of changes between different major release numbers I would
|
||||
expect this process to be a bit more involved. Using &scratch.ap;
|
||||
for upgrades within the realm of <literal>4-STABLE</literal>
|
||||
should work painlessly (although I have not yet tried it.) Users of
|
||||
<literal>4-STABLE</literal> may want to consider the following
|
||||
areas:</para>
|
||||
for upgrades within the realm of a <literal>STABLE</literal> branch
|
||||
should work painlessly (although I have not yet tried it.)</para>
|
||||
|
||||
<note>
|
||||
<para>If you do not use the device file system, &man.devfs.5;, you
|
||||
may want to create devices for some of your hardware with
|
||||
&man.MAKEDEV.8; in <command>all_remaining_customization</command>.
|
||||
</para>
|
||||
</note>
|
||||
</sect1>
|
||||
|
||||
<sect1 id="files">
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# This file: stage_1.conf.default, sourced by stage_1.sh.
|
||||
#
|
||||
# $Id: stage_1.conf.default,v 1.3 2004-07-19 21:02:26 schweikh Exp $
|
||||
# $Id: stage_1.conf.default,v 1.4 2008-12-03 21:59:51 schweikh Exp $
|
||||
# $FreeBSD$
|
||||
|
||||
# Root mount point where you create the new system. Because it is only
|
||||
|
@ -11,34 +11,42 @@ DESTDIR="/newroot"
|
|||
# Where your src tree is.
|
||||
SRC="/usr/src"
|
||||
|
||||
# Where your obj is.
|
||||
MAKEOBJDIRPREFIX="/usr/obj"
|
||||
|
||||
# Your kernel config name as from make buildkernel KERNCONF=...
|
||||
KERNCONF="HAL9000"
|
||||
|
||||
# Your target architecture as used for make buildworld TARGET=...
|
||||
# If you did not specify a TARGET when building world, it defaulted
|
||||
# to the build architecture (run "uname -m" to find out if you are unsure).
|
||||
TARGET="i386" # amd64 arm i386 ia64 mips pc98 powerpc sparc64 sun4v
|
||||
|
||||
# Available time zones are those under /usr/share/zoneinfo.
|
||||
TIMEZONE="Europe/Berlin"
|
||||
|
||||
|
||||
#
|
||||
# The create_file_systems function must create the mountpoints under
|
||||
# DESTDIR, create the file systems, and then mount them under DESTDIR.
|
||||
#
|
||||
create_file_systems () {
|
||||
# The new root file system. Mandatory.
|
||||
# Change DEVICE names or risk foot shooting.
|
||||
# You must use newfs -O 1 for the root fs if you want to boot it from grub.
|
||||
DEVICE=/dev/da0s1a
|
||||
# Change DEVICE names.
|
||||
DEVICE=/dev/daXYZs1a
|
||||
mkdir -m 755 -p ${DESTDIR}
|
||||
chown root:wheel ${DESTDIR}
|
||||
newfs -U -O 1 ${DEVICE}
|
||||
newfs -U ${DEVICE}
|
||||
mount -o noatime ${DEVICE} ${DESTDIR}
|
||||
|
||||
# Additional file systems and initial mount points. Optional.
|
||||
DEVICE=/dev/da0s1e
|
||||
DEVICE=/dev/daXYZs1e
|
||||
mkdir -m 755 -p ${DESTDIR}/var
|
||||
chown root:wheel ${DESTDIR}/var
|
||||
newfs -U ${DEVICE}
|
||||
mount -o noatime ${DEVICE} ${DESTDIR}/var
|
||||
|
||||
DEVICE=/dev/da2s1e
|
||||
DEVICE=/dev/daXYZs1e
|
||||
mkdir -m 755 -p ${DESTDIR}/usr
|
||||
chown root:wheel ${DESTDIR}/usr
|
||||
newfs -U ${DEVICE}
|
||||
|
@ -83,6 +91,9 @@ copy_files () {
|
|||
# Add or remove from this list at your discretion. Mostly mandatory.
|
||||
for f in \
|
||||
/.profile \
|
||||
/etc/devd.conf \
|
||||
/etc/devd.rules \
|
||||
/etc/exports \
|
||||
/etc/group \
|
||||
/etc/hosts \
|
||||
/etc/inetd.conf \
|
||||
|
@ -95,18 +106,17 @@ copy_files () {
|
|||
/etc/profile \
|
||||
/etc/rc.conf \
|
||||
/etc/resolv.conf \
|
||||
/etc/start_if.xl0 \
|
||||
/etc/src.conf \
|
||||
/etc/sysctl.conf \
|
||||
/etc/ttys \
|
||||
/etc/ppp/* \
|
||||
/etc/mail/aliases \
|
||||
/etc/mail/aliases.db \
|
||||
/etc/mail/hal9000.mc \
|
||||
/etc/mail/service.switch \
|
||||
/etc/ssh/*key* \
|
||||
/etc/ssh/*_config \
|
||||
/etc/X11/XF86Config-4 \
|
||||
/etc/X11/xorg.conf \
|
||||
/var/cron/tabs/* \
|
||||
/var/files \
|
||||
/root/.profile \
|
||||
/boot/*.bmp \
|
||||
/boot/loader.conf \
|
||||
|
@ -135,6 +145,20 @@ all_remaining_customization () {
|
|||
mkdir -m 755 home; chown root:wheel home
|
||||
mkdir -m 755 usr/ports; chown root:wheel usr/ports
|
||||
|
||||
# Create the ntp and slip log files.
|
||||
touch ${DESTDIR}/var/log/ntp ${DESTDIR}/var/log/slip.log
|
||||
|
||||
# Make /usr/src point to the right directory. Optional.
|
||||
# Note: some ports need part of the src tree, e.g. emulators/kqemu,
|
||||
# sysutils/lsof, sysutils/fusefs, ...
|
||||
cd ${DESTDIR}/usr
|
||||
if test "${SRC}" != /usr/src; then
|
||||
rmdir src; ln -s ${SRC}
|
||||
fi
|
||||
if test "${MAKEOBJDIRPREFIX}" != /usr/obj; then
|
||||
rmdir obj; ln -s ${MAKEOBJDIRPREFIX}
|
||||
fi
|
||||
|
||||
# My personal preference is to symlink tmp -> var/tmp. Optional.
|
||||
cd ${DESTDIR}; rmdir tmp; ln -s var/tmp
|
||||
|
||||
|
@ -145,39 +169,6 @@ all_remaining_customization () {
|
|||
# If you do not have /home on a shared partition, you may want to copy it:
|
||||
# mkdir -p ${DESTDIR}/home
|
||||
# cd /home; tar cf - . | (cd ${DESTDIR}/home; tar xpvf -)
|
||||
|
||||
case ${REVISION} in
|
||||
4.*)
|
||||
# 4.x without devfs: create non-standard devices to match your hardware.
|
||||
cd ${DESTDIR}/dev
|
||||
./MAKEDEV all
|
||||
./MAKEDEV da0 da0s1h da0s2h da0s3h da0s4h
|
||||
./MAKEDEV da1 da1s1h da1s2h da1s3h da1s4h
|
||||
./MAKEDEV da2 da2s1h da2s2h da2s3h da2s4h
|
||||
./MAKEDEV da3 da3s1h da3s2h da3s3h da3s4h
|
||||
./MAKEDEV bktr0 cd1
|
||||
if test -d /dev/vinum; then
|
||||
# 'vinum makedev' can only create devices in /dev, thus use cpio.
|
||||
cd /dev; find vinum -print | cpio -pv ${DESTDIR}/dev
|
||||
fi
|
||||
|
||||
# Make the floppy group wheel writable.
|
||||
chown root:wheel ${DESTDIR}/dev/fd0*
|
||||
chmod g+w ${DESTDIR}/dev/fd0*
|
||||
;;
|
||||
|
||||
5.*)
|
||||
# Make the floppy group wheel writable.
|
||||
printf '%s\n' 'own fd0 root:wheel' >> ${DESTDIR}/etc/devfs.conf
|
||||
printf '%s\n' 'perm fd0 0660' >> ${DESTDIR}/etc/devfs.conf
|
||||
;;
|
||||
|
||||
*)
|
||||
printf '%s\n' "REVISION ${REVISION} not supported"
|
||||
exit 1
|
||||
;;
|
||||
|
||||
esac
|
||||
}
|
||||
|
||||
# vim: tabstop=2:expandtab:shiftwidth=2:syntax=sh:
|
||||
|
|
|
@ -2,11 +2,11 @@
|
|||
#
|
||||
# stage_1.sh - FreeBSD From Scratch, Stage 1: System Installation.
|
||||
# Usage: ./stage_1.sh profile
|
||||
# will read ./stage_1.conf.profile
|
||||
# will read profile
|
||||
# and write ./stage_1.log.profile
|
||||
#
|
||||
# Author: Jens Schweikhardt
|
||||
# $Id: stage_1.sh,v 1.5 2004-07-19 21:02:26 schweikh Exp $
|
||||
# $Id: stage_1.sh,v 1.6 2008-12-03 21:59:51 schweikh Exp $
|
||||
# $FreeBSD$
|
||||
|
||||
PATH=/bin:/usr/bin:/sbin:/usr/sbin
|
||||
|
@ -16,7 +16,7 @@ PATH=/bin:/usr/bin:/sbin:/usr/sbin
|
|||
# a) Successfully completed "make buildworld" and "make buildkernel"
|
||||
# b) Unused partitions (at least one for the root fs, probably more for
|
||||
# the new /usr and /var, to your liking.)
|
||||
# c) A customized stage_1.conf.profile file.
|
||||
# c) A customized profile file.
|
||||
|
||||
if test $# -ne 1; then
|
||||
echo "usage: stage_1.sh profile" 1>&2
|
||||
|
@ -30,7 +30,7 @@ fi
|
|||
step_one () {
|
||||
create_file_systems
|
||||
# Now create all the other directories. Mandatory.
|
||||
cd ${SRC}/etc; make distrib-dirs DESTDIR=${DESTDIR}
|
||||
cd ${SRC}/etc; make distrib-dirs DESTDIR=${DESTDIR} TARGET=${TARGET}
|
||||
}
|
||||
|
||||
# ---------------------------------------------------------------------------- #
|
||||
|
@ -73,12 +73,7 @@ step_two () {
|
|||
|
||||
step_three () {
|
||||
cd ${SRC}
|
||||
make installworld DESTDIR=${DESTDIR}
|
||||
# Install additional compatibility libraries (optional). Use this if you
|
||||
# have programs dynamically linked against libc.so.4, i.e. if you see
|
||||
# /usr/libexec/ld-elf.so.1: Shared object "libc.so.4" not found
|
||||
cd lib/compat/compat4x.i386
|
||||
make all install DESTDIR=${DESTDIR}
|
||||
make installworld DESTDIR=${DESTDIR} TARGET=${TARGET}
|
||||
}
|
||||
|
||||
# ---------------------------------------------------------------------------- #
|
||||
|
@ -91,7 +86,7 @@ step_four () {
|
|||
# If you have not copied them in Step 2, cp them as shown in the next 2 lines.
|
||||
# cp sys/boot/forth/loader.conf ${DESTDIR}/boot/defaults
|
||||
# cp sys/i386/conf/GENERIC.hints ${DESTDIR}/boot/device.hints
|
||||
make installkernel DESTDIR=${DESTDIR} KERNCONF=${KERNCONF}
|
||||
make installkernel DESTDIR=${DESTDIR} KERNCONF=${KERNCONF} TARGET=${TARGET}
|
||||
}
|
||||
|
||||
# ---------------------------------------------------------------------------- #
|
||||
|
@ -118,6 +113,7 @@ step_six () {
|
|||
|
||||
do_steps () {
|
||||
echo "PROFILE=${PROFILE}"
|
||||
echo "TARGET=${TARGET}"
|
||||
echo "DESTDIR=${DESTDIR}"
|
||||
echo "SRC=${SRC}"
|
||||
echo "KERNCONF=${KERNCONF}"
|
||||
|
@ -140,28 +136,28 @@ do_steps () {
|
|||
|
||||
PROFILE="$1"
|
||||
set -x -e -u # Stop for any error or use of an undefined variable.
|
||||
. ./stage_1.conf.${PROFILE}
|
||||
. ${PROFILE}
|
||||
|
||||
# Determine a few variables from the sources that were used to make the
|
||||
# world. The variables can be used to modify actions, e.g. depending on
|
||||
# whether we install a 4.x or 5.x system. The __FreeBSD_version numbers
|
||||
# the system's version. The __FreeBSD_version numbers
|
||||
# for RELDATE are documented in the Porter's Handbook,
|
||||
# doc/en_US.ISO8859-1/books/porters-handbook/freebsd-versions.html.
|
||||
# Scheme is: <major><two digit minor><0 if release branch, otherwise 1>xx
|
||||
# The result will be something like
|
||||
#
|
||||
# TYPE="FreeBSD"
|
||||
# REVISION="4.9"
|
||||
# REVISION="8.0"
|
||||
# BRANCH="RC" { "CURRENT", "STABLE", "RELEASE" }
|
||||
# RELDATE="502101"
|
||||
# RELDATE="800028"
|
||||
#
|
||||
eval $(awk '/^(TYPE|REVISION|BRANCH)=/' ${SRC}/sys/conf/newvers.sh)
|
||||
RELDATE=$(awk '/^[ \t]*#[ \t]*define[ \t][ \t]*__FreeBSD_version[ \t]/ {
|
||||
print $3
|
||||
}' ${SRC}/sys/sys/param.h)
|
||||
|
||||
echo "=> Logging to stage_1.log.${PROFILE}"
|
||||
do_steps 2>&1 | tee stage_1.log.${PROFILE}
|
||||
echo "=> Logging to stage_1.${PROFILE}.log"
|
||||
do_steps 2>&1 | tee "stage_1.${PROFILE}.log"
|
||||
|
||||
# vim: tabstop=2:expandtab:shiftwidth=2:
|
||||
# EOF $RCSfile: stage_1.sh,v $
|
||||
|
|
|
@ -1,85 +1,99 @@
|
|||
# vim: syntax=sh
|
||||
# $Id: stage_2.conf.default,v 1.3 2004-07-19 20:42:13 schweikh Exp $
|
||||
# $Id: stage_2.conf.default,v 1.4 2008-12-03 21:59:51 schweikh Exp $
|
||||
# $FreeBSD$
|
||||
ports-mgmt portaudit
|
||||
devel ccache
|
||||
shells zsh
|
||||
devel gettext make BATCH=yes install
|
||||
lang perl5.8 make install; use.perl port
|
||||
devel gettext
|
||||
archivers unzip
|
||||
archivers zip
|
||||
security sudo
|
||||
x11-servers XFree86-4-Server
|
||||
x11 wrapper
|
||||
x11 XFree86-4-clients
|
||||
x11 XFree86-4-documents
|
||||
x11-fonts XFree86-4-font75dpi
|
||||
x11-fonts XFree86-4-font100dpi
|
||||
x11-fonts XFree86-4-fontScalable
|
||||
x11 xorg
|
||||
x11-servers xorg-server
|
||||
x11-fonts xorg-fonts-100dpi
|
||||
x11-fonts xorg-fonts-75dpi
|
||||
x11-fonts xorg-fonts-miscbitmaps
|
||||
x11-fonts xorg-fonts-truetype
|
||||
x11-fonts xorg-fonts-type1
|
||||
x11-fonts gnu-unifont make install && mkfontdir /usr/local/lib/X11/fonts/local
|
||||
x11-fonts urwfonts
|
||||
x11-fonts webfonts make WITH_NETSCAPE_ALIASES=yes install
|
||||
x11-fonts webfonts
|
||||
x11-toolkits open-motif
|
||||
x11-wm ctwm
|
||||
x11 wdm
|
||||
security openssh-askpass
|
||||
astro xplanet
|
||||
astro xephem
|
||||
editors vim
|
||||
print ghostscript-gnu make A4=yes BATCH=yes install
|
||||
print ghostscript8
|
||||
print psutils-a4
|
||||
print a2ps-a4
|
||||
print gv
|
||||
print acroread5
|
||||
print transfig
|
||||
print teTeX
|
||||
# NOTE: jdk14 needs linprocfs(5) mounted or it will hang indefinitely.
|
||||
java linux-sun-jdk14 mount -a linproc; yes | make install
|
||||
java jdk14 mount -a linproc; make -DNODEBUG install
|
||||
www apache2
|
||||
www weblint
|
||||
print cups-base
|
||||
emulators linux_base-fc6
|
||||
print acroread8 yes accept | make install PAGER=ls
|
||||
java jdk16 echo true > files/license.sh; make install BATCH=yes < /dev/null
|
||||
www apache22
|
||||
www amaya
|
||||
www firefox make BATCH=yes install
|
||||
www mozilla make WITHOUT_MAILNEWS=yes WITHOUT_COMPOSER=yes WITHOUT_LDAP=yes WITHOUT_CHATZILLA=yes WITHOUT_XMLTERM=yes install
|
||||
www firefox3
|
||||
www checkbot
|
||||
www privoxy
|
||||
www p5-HTML-Parser
|
||||
www validator
|
||||
www mplayer-plugin
|
||||
math p5-Math-Combinatorics
|
||||
math p5-Bit-Vector
|
||||
graphics evince
|
||||
graphics xfig
|
||||
graphics xv
|
||||
graphics gphoto2
|
||||
multimedia xawtv
|
||||
graphics graphviz
|
||||
lang expect
|
||||
lang gawk
|
||||
lang TenDRA unset MAKEOBJDIRPREFIX; make install
|
||||
lang python
|
||||
news tin
|
||||
net freebsd-uucp
|
||||
net cvsup-without-gui
|
||||
net pathchar make NO_CHECKSUM=yes install
|
||||
net rsync
|
||||
ftp wget
|
||||
textproc ispell
|
||||
german ispell-neu
|
||||
german ispell-alt
|
||||
textproc docproj make JADETEX=no HAVE_MOTIF=yes BATCH=yes install < /dev/null
|
||||
textproc docproj
|
||||
sysutils samefile
|
||||
sysutils lsof
|
||||
sysutils smartmontools
|
||||
sysutils pstree
|
||||
sysutils cdrtools
|
||||
sysutils dvd+rw-tools
|
||||
sysutils grub
|
||||
sysutils smartmontools
|
||||
sysutils vobcopy
|
||||
sysutils lsof
|
||||
devel subversion-freebsd
|
||||
devel bcc
|
||||
devel ddd
|
||||
devel gindent
|
||||
devel ctags
|
||||
devel ElectricFence
|
||||
devel strace
|
||||
devel perltidy
|
||||
mail procmail make BATCH=yes install
|
||||
mail procmail
|
||||
mail metamail
|
||||
mail mutt-devel
|
||||
emulators mtools
|
||||
sysutils portupgrade
|
||||
news inn-stable CONFIGURE_ARGS="--enable-uucp-rnews --enable-setgid-inews" make install
|
||||
ports-mgmt portupgrade
|
||||
news inn CONFIGURE_ARGS="--enable-uucp-rnews --enable-setgid-inews" make BATCH=yes install < /dev/null
|
||||
misc figlet-fonts
|
||||
security gpa
|
||||
mail spamoracle
|
||||
multimedia mplayer make WITHOUT_RUNTIME_CPUDETECTION=yes WITH_GUI=yes BATCH=yes install
|
||||
textproc rman
|
||||
multimedia mplayer
|
||||
multimedia mplayer-fonts
|
||||
audio wavplay
|
||||
games xmahjongg
|
||||
games xdemineur
|
||||
editors openoffice-1.1
|
||||
multimedia acidrip
|
||||
multimedia ogle
|
||||
multimedia ogle-gui
|
||||
audio pacpl
|
||||
audio p5-CDDB_get
|
||||
audio cowbell
|
||||
shells bash
|
||||
editors openoffice.org-3-RC
|
||||
java eclipse
|
||||
java netbeans
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
# stage_3.mk - FreeBSD From Scratch, Stage 3: Ports Post-Configuration.
|
||||
# Usage: make -f stage_3.mk all (config everything)
|
||||
# or make -f stage_3.mk target (to just config target)
|
||||
# Usage: make -f stage_3.mk all (configure everything)
|
||||
# or make -f stage_3.mk target (just configure target)
|
||||
#
|
||||
# Author: Jens Schweikhardt
|
||||
#
|
||||
# It is a good idea to make sure any target can be made more than
|
||||
# once without ill effect.
|
||||
#
|
||||
# $Id: stage_3.mk,v 1.4 2004-07-19 20:42:14 schweikh Exp $
|
||||
# $Id: stage_3.mk,v 1.5 2008-12-03 21:59:51 schweikh Exp $
|
||||
# $FreeBSD$
|
||||
|
||||
.POSIX:
|
||||
|
@ -15,62 +15,78 @@
|
|||
message:
|
||||
@echo "Please use one of the following targets:"
|
||||
@echo "config_apache"
|
||||
@echo "config_cups"
|
||||
@echo "config_firefox"
|
||||
@echo "config_inn"
|
||||
@echo "config_javaplugin"
|
||||
@echo "config_nullplugin"
|
||||
@echo "config_privoxy"
|
||||
@echo "config_smartd"
|
||||
@echo "config_openoffice"
|
||||
@echo "config_sudo"
|
||||
@echo "config_TeX"
|
||||
@echo "config_tin"
|
||||
@echo "config_wdm"
|
||||
@echo "config_uucp"
|
||||
@echo "all -- all of the above"
|
||||
|
||||
|
||||
all: \
|
||||
config_apache \
|
||||
config_cups \
|
||||
config_firefox \
|
||||
config_inn \
|
||||
config_javaplugin \
|
||||
config_nullplugin \
|
||||
config_privoxy \
|
||||
config_smartd \
|
||||
config_openoffice \
|
||||
config_sudo \
|
||||
config_TeX \
|
||||
config_tin \
|
||||
config_wdm \
|
||||
config_uucp
|
||||
|
||||
|
||||
APACHE = apache22
|
||||
config_apache:
|
||||
# 1. Modify httpd.conf.
|
||||
perl -pi \
|
||||
-e 's/^\s*ServerAdmin.*/ServerAdmin schweikh\@schweikhardt.net/;' \
|
||||
-e 's/^#?ServerName .*/ServerName hal9000.schweikhardt.net:80/;' \
|
||||
-e 's/^\s*Listen.*/Listen 127.0.0.1:80/;' \
|
||||
-e 's/^\s*StartServers.*/StartServers 2/;' \
|
||||
-e 's/^\s*MinSpareServers.*/MinSpareServers 2/;' \
|
||||
-e 's,/usr/local/www/cgi-bin/,/home/opt/www/cgi-bin/,;' \
|
||||
/usr/local/etc/apache2/httpd.conf
|
||||
-e 's/^\s*Deny from all/ Allow from 127.0.0.1/i;' \
|
||||
-e 's,/usr/local/www/$(APACHE)/cgi-bin/,/home/opt/www/cgi-bin/,;' \
|
||||
/usr/local/etc/$(APACHE)/httpd.conf
|
||||
cp w3c-validator.conf /usr/local/etc/$(APACHE)/Includes
|
||||
# 2. Restore symlinks to web pages.
|
||||
cd /usr/local/www/data; \
|
||||
ln -fs /home/schweikh/prj/homepage schweikhardt.net; \
|
||||
cd /usr/local/www/$(APACHE)/data && \
|
||||
ln -fs /home/schweikh/prj/homepage schweikhardt.net && \
|
||||
ln -fs /home/opt/www/test .
|
||||
# 3. Restore W3C Validator config.
|
||||
mkdir -p /etc/w3c
|
||||
cp /usr/local/www/validator/htdocs/config/validator.conf.sample \
|
||||
/etc/w3c/validator.conf
|
||||
perl -pi \
|
||||
-e 's/^Allow Private IPs.*/Allow Private IPs = yes/;' \
|
||||
/etc/w3c/validator.conf
|
||||
# Test if the httpd.conf has changed.
|
||||
@if ! cmp -s /usr/local/etc/apache2/httpd.conf httpd.conf; then \
|
||||
@if ! cmp -s /usr/local/etc/$(APACHE)/httpd.conf httpd.conf; then \
|
||||
echo "ATTENTION: the httpd.conf has changed. Please examine if"; \
|
||||
echo "the modifications are still correct. Here is the diff:"; \
|
||||
diff -u /usr/local/etc/apache2/httpd.conf httpd.conf; \
|
||||
echo "the modifications are still correct. If so you can simply"; \
|
||||
echo "cp /usr/local/etc/$(APACHE)/httpd.conf httpd.conf"; \
|
||||
echo "to make this message go away. Here is the diff:"; \
|
||||
diff -u /usr/local/etc/$(APACHE)/httpd.conf httpd.conf; \
|
||||
fi
|
||||
if test -f /var/run/httpd.pid; then \
|
||||
/usr/local/etc/rc.d/apache2.sh stop; \
|
||||
/usr/local/etc/rc.d/apache2.sh start; \
|
||||
/usr/local/etc/rc.d/$(APACHE) stop; \
|
||||
/usr/local/etc/rc.d/$(APACHE) start; \
|
||||
else \
|
||||
/usr/local/etc/rc.d/apache2.sh start; \
|
||||
/usr/local/etc/rc.d/$(APACHE) start; \
|
||||
fi
|
||||
|
||||
# The original ppd file is from http://www.cups.org/ppd.php?L63+I0+T+Q2300
|
||||
# = http://www.cups.org/ppd/hp/de/hpc2325s.ppd.gz
|
||||
config_cups:
|
||||
chmod 644 /usr/local/etc/cups/cupsd.conf
|
||||
cp printers.conf /usr/local/etc/cups/printers.conf
|
||||
cp LaserJet_2300d.ppd /usr/local/etc/cups/ppd/LaserJet_2300d.ppd
|
||||
|
||||
config_firefox:
|
||||
# Make this group wheel writable to allow extensions being installed.
|
||||
chmod -R g+w /usr/X11R6/lib/firefox/lib/mozilla-1.6/chrome
|
||||
chmod -R g+w /usr/local/lib/firefox3/chrome
|
||||
|
||||
config_inn:
|
||||
pw usermod -n news -d /usr/local/news -s /bin/sh
|
||||
|
@ -82,7 +98,7 @@ config_inn:
|
|||
/share/news/db
|
||||
chown -R news:news /share/news
|
||||
# Give the news system its initial configuration.
|
||||
cd /home/root/setup; \
|
||||
cd /home/root/setup && \
|
||||
if test ! -f /share/news/db/active; then \
|
||||
echo "installing /share/news/db/active"; \
|
||||
install -C -o news -g news -m 664 active /share/news/db; \
|
||||
|
@ -91,18 +107,14 @@ config_inn:
|
|||
echo "installing /share/news/db/newsgroups"; \
|
||||
install -C -o news -g news -m 664 newsgroups /share/news/db; \
|
||||
fi
|
||||
# The innd.sh that comes with the port is broken, it
|
||||
# checks for history.pag which does not exist.
|
||||
cd /home/root/setup; \
|
||||
install -C -o root -g wheel -m 555 innd.sh /usr/local/etc/rc.d
|
||||
# Configure storage method.
|
||||
cd /home/root/setup; \
|
||||
cd /home/root/setup && \
|
||||
printf "%s\n%s\n%s\n%s\n" \
|
||||
"method tradspool {" \
|
||||
" newsgroups: *" \
|
||||
" class: 0" \
|
||||
"}" \
|
||||
>storage.conf; \
|
||||
>storage.conf && \
|
||||
install -C -o news -g news -m 664 storage.conf /usr/local/news/etc
|
||||
# Configure newsfeeds.
|
||||
printf "%s\n%s\n" \
|
||||
|
@ -122,7 +134,7 @@ config_inn:
|
|||
/usr/local/news/etc/inn.conf
|
||||
# Create empty history, if none there.
|
||||
# See post-install in /usr/ports/news/inn-stable/Makefile.
|
||||
cd /share/news/db; \
|
||||
set -e; cd /share/news/db; \
|
||||
if test ! -f history; then \
|
||||
touch history; \
|
||||
chmod 644 history; \
|
||||
|
@ -135,49 +147,36 @@ config_inn:
|
|||
# Configure send-uucp.
|
||||
echo shuttle:shuttle >/usr/local/news/etc/send-uucp.cf
|
||||
# Satisfy inncheck:
|
||||
cd /usr/local/news/etc; \
|
||||
set -e; cd /usr/local/news/etc; \
|
||||
chown news:news *; \
|
||||
chmod 640 control.ctl expire.ctl nntpsend.ctl readers.conf
|
||||
/usr/local/news/bin/inncheck
|
||||
# Test if the inn.conf has changed.
|
||||
@if ! cmp -s /usr/local/news/etc/inn.conf inn.conf; then \
|
||||
echo "ATTENTION: the inn.conf has changed. Please examine if"; \
|
||||
echo "the modifications are still correct. Here is the diff:"; \
|
||||
echo "the modifications are still correct. If so you can simply"; \
|
||||
echo "cp /usr/local/news/etc/inn.conf inn.conf"; \
|
||||
echo "to make this message go away. Here is the diff:"; \
|
||||
diff -u /usr/local/news/etc/inn.conf inn.conf; \
|
||||
fi
|
||||
if ! test -f /usr/local/news/run/innd.pid; then \
|
||||
/usr/local/etc/rc.d/innd.sh start; \
|
||||
/usr/local/etc/rc.d/innd start; \
|
||||
fi
|
||||
|
||||
config_javaplugin:
|
||||
# Mozilla Firefox:
|
||||
cd /usr/X11R6/lib/firefox/lib/mozilla-1.6/plugins; \
|
||||
ln -fs /usr/local/jdk1.4.2/jre/plugin/i386/ns610/libjavaplugin_oji.so
|
||||
# Plain Mozilla:
|
||||
#cd /usr/X11R6/lib/mozilla/plugins; \
|
||||
#ln -fs /usr/local/jdk1.4.2/jre/plugin/i386/ns610/libjavaplugin_oji.so
|
||||
cd /usr/local/lib/firefox3/plugins && \
|
||||
ln -fs /usr/local/jdk1.6.0/jre/plugin/$$(uname -m)/ns7/libjavaplugin_oji.so
|
||||
|
||||
# Move the nullplugin out of the way. With a .mozilla/*/*/prefs.js entry of
|
||||
# user_pref("plugin.display_plugin_downloader_dialog", false);
|
||||
# this suppresses popup dialogs for unavailable plugins (flash, ...)
|
||||
config_nullplugin:
|
||||
find /usr/X11R6/lib -name libnullplugin.so -exec mv {} {}.orig \;
|
||||
|
||||
config_privoxy:
|
||||
install -C -o root -g wheel -m 644 conf/privoxy/config \
|
||||
/usr/local/etc/privoxy
|
||||
install -C -o root -g wheel -m 755 conf/privoxy/privoxy.sh \
|
||||
/usr/local/etc/rc.d
|
||||
/usr/local/etc/rc.d/privoxy.sh restart
|
||||
|
||||
config_smartd:
|
||||
cp smartd.sh /usr/local/etc/rc.d/smartd.sh
|
||||
cp smartd.conf /usr/local/etc/smartd.conf
|
||||
config_openoffice:
|
||||
# Copy some truetype files so ooo can use them.
|
||||
find /usr/local/openoffice.org* -type d -name truetype \
|
||||
-exec echo cp *.ttf {} \; -exec cp *.ttf {} \;
|
||||
|
||||
config_sudo:
|
||||
if ! grep -q schweikh /usr/local/etc/sudoers; then \
|
||||
echo 'schweikh ALL = (ALL) NOPASSWD: ALL' >> /usr/local/etc/sudoers; \
|
||||
fi
|
||||
chmod 440 /usr/local/etc/sudoers
|
||||
|
||||
config_TeX:
|
||||
# textproc/docproj advises: to typeset the FreeBSD Handbook with JadeTeX,
|
||||
|
@ -192,7 +191,9 @@ config_TeX:
|
|||
# Test if the texmf.cnf has changed.
|
||||
@if ! cmp -s /usr/local/share/texmf/web2c/texmf.cnf texmf.cnf; then \
|
||||
echo "ATTENTION: the texmf.cnf has changed. Please examine if"; \
|
||||
echo "the modifications are still correct. Here is the diff:"; \
|
||||
echo "the modifications are still correct. If so you can simply"; \
|
||||
echo "cp /usr/local/share/texmf/web2c/texmf.cnf texmf.cnf"; \
|
||||
echo "to make this message go away. Here is the diff:"; \
|
||||
diff -u /usr/local/share/texmf/web2c/texmf.cnf texmf.cnf; \
|
||||
fi
|
||||
|
||||
|
@ -204,17 +205,33 @@ config_tin:
|
|||
"spooldir=/share/news/spool/articles" \
|
||||
>/usr/local/etc/tin.defaults
|
||||
|
||||
config_wdm:
|
||||
cp daemon1-JS-1600x1200.jpg FreeBSD_small.png \
|
||||
/usr/local/lib/X11/wdm/pixmaps
|
||||
perl -pi \
|
||||
-e 's,^(DisplayManager\*wdmBg:).*,\1 pixmap:/usr/local/lib/X11/wdm/pixmaps/daemon1-JS-1600x1200.jpg,;' \
|
||||
-e 's,^(DisplayManager\*wdmLogo:).*,\1 /usr/local/lib/X11/wdm/pixmaps/FreeBSD_small.png,;' \
|
||||
-e 's,^(DisplayManager\*wdmWm:).*,\1 ctwm:icewm:xfce4:tvtwm,;' \
|
||||
/usr/local/lib/X11/wdm/wdm-config
|
||||
@if ! cmp -s /usr/local/lib/X11/wdm/wdm-config wdm-config; then \
|
||||
echo "ATTENTION: the wdm-config has changed. Please examine if"; \
|
||||
echo "the modifications are still correct. If so you can simply"; \
|
||||
echo "cp /usr/local/lib/X11/wdm/wdm-config wdm-config"; \
|
||||
echo "to make this message go away. Here is the diff:"; \
|
||||
diff -u /usr/local/lib/X11/wdm/wdm-config wdm-config; \
|
||||
fi
|
||||
|
||||
config_uucp:
|
||||
cd /etc/mail; make install SENDMAIL_MC=/etc/mail/hal9000.mc
|
||||
cd /etc/mail && make install SENDMAIL_MC=/etc/mail/hal9000.mc
|
||||
# Make the uucp user's shell the correct uucico, so su(1) works.
|
||||
chpass -s /usr/local/libexec/uucp/uucico uucp
|
||||
# UUCP expects to find /usr/bin/rnews.
|
||||
cd /usr/bin; ln -fs ../local/news/bin/rnews .
|
||||
cd /usr/bin && ln -fs ../local/news/bin/rnews .
|
||||
# Actual UUCP configuration.
|
||||
echo nodename js2015 > /usr/local/etc/uucp/config
|
||||
echo shuttle js2015 `cat uucp` > /usr/local/etc/uucp/call
|
||||
printf 'port tcp\ntype tcp\n' > /usr/local/etc/uucp/port
|
||||
printf "%s\n%s\n%s\n%s\n%s\n%s\n%s\n" \
|
||||
printf "%s\n" \
|
||||
"call-login *" \
|
||||
"call-password *" \
|
||||
"time any" \
|
||||
|
@ -223,9 +240,13 @@ config_uucp:
|
|||
"commands rmail rnews" \
|
||||
"port tcp" \
|
||||
>/usr/local/etc/uucp/sys
|
||||
cd /usr/local/etc/uucp; chown uucp:uucp *; chmod o-rwx *
|
||||
cd /usr/local/etc/uucp && chown uucp:uucp * && chmod o-rwx *
|
||||
# Trigger uucico after booting.
|
||||
mkdir -p /usr/local/etc/rc.d; cp uucp.sh /usr/local/etc/rc.d
|
||||
mkdir -p /usr/local/etc/rc.d
|
||||
cp uucp.sh /usr/local/etc/rc.d
|
||||
# Rebuild the aliases.db.
|
||||
cp aliases /etc/mail/aliases
|
||||
newaliases
|
||||
|
||||
# vim: tabstop=4:
|
||||
# EOF $RCSfile: stage_3.mk,v $
|
||||
|
|
Loading…
Reference in a new issue