Whitespace fixes (bad tag indents, wrap long lines) that igor complained
about. Translators can ignore.
This commit is contained in:
parent
713eec090c
commit
17d158057d
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/head/; revision=44942
1 changed files with 228 additions and 183 deletions
|
@ -1,15 +1,22 @@
|
||||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
<?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE article PUBLIC
|
||||||
<!DOCTYPE article PUBLIC "-//FreeBSD//DTD DocBook XML V5.0-Based Extension//EN"
|
"-//FreeBSD//DTD DocBook XML V5.0-Based Extension//EN" "http://www.FreeBSD.org/XML/share/xml/freebsd50.dtd" [
|
||||||
"http://www.FreeBSD.org/XML/share/xml/freebsd50.dtd" [
|
|
||||||
<!ENTITY fbus.ap "<application xmlns='http://docbook.org/ns/docbook'>FreeBSD Update Server</application>">
|
<!ENTITY fbus.ap "<application xmlns='http://docbook.org/ns/docbook'>FreeBSD Update Server</application>">
|
||||||
]>
|
]>
|
||||||
<article xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0" xml:lang="en">
|
<article xmlns="http://docbook.org/ns/docbook"
|
||||||
<info><title>Build Your Own &os; Update Server</title>
|
xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0"
|
||||||
|
xml:lang="en">
|
||||||
|
<info>
|
||||||
|
<title>Build Your Own &os; Update Server</title>
|
||||||
|
|
||||||
|
<author>
|
||||||
<author><personname><firstname>Jason</firstname><surname>Helfman</surname></personname><affiliation>
|
<personname>
|
||||||
|
<firstname>Jason</firstname>
|
||||||
|
<surname>Helfman</surname>
|
||||||
|
</personname>
|
||||||
|
<affiliation>
|
||||||
<address>&a.jgh.email;</address>
|
<address>&a.jgh.email;</address>
|
||||||
</affiliation></author>
|
</affiliation>
|
||||||
|
</author>
|
||||||
|
|
||||||
<copyright>
|
<copyright>
|
||||||
<year>2009</year>
|
<year>2009</year>
|
||||||
|
@ -32,33 +39,38 @@
|
||||||
|
|
||||||
<abstract>
|
<abstract>
|
||||||
<para>This article describes building an internal &fbus.ap;.
|
<para>This article describes building an internal &fbus.ap;.
|
||||||
The <link xlink:href="http://svnweb.freebsd.org/base/user/cperciva/freebsd-update-build/">freebsd-update-server</link>
|
The <link
|
||||||
is written by &a.cperciva.email;, Security Officer Emeritus of &os;.
|
xlink:href="http://svnweb.freebsd.org/base/user/cperciva/freebsd-update-build/">freebsd-update-server</link>
|
||||||
For users that think it is convenient to update their systems
|
is written by &a.cperciva.email;, Security Officer Emeritus of
|
||||||
against an official update server, building their own &fbus.ap; may
|
&os;. For users that think it is convenient to update their
|
||||||
help to extend its functionality by supporting manually-tweaked
|
systems against an official update server, building their own
|
||||||
&os; releases or by providing a local mirror that will allow faster
|
&fbus.ap; may help to extend its functionality by supporting
|
||||||
updates for a number of machines.</para>
|
manually-tweaked &os; releases or by providing a local mirror
|
||||||
|
that will allow faster updates for a number of
|
||||||
|
machines.</para>
|
||||||
</abstract>
|
</abstract>
|
||||||
</info>
|
</info>
|
||||||
|
|
||||||
<sect1 xml:id="acknowledgments">
|
<sect1 xml:id="acknowledgments">
|
||||||
<title>Acknowledgments</title>
|
<title>Acknowledgments</title>
|
||||||
<para>This article was subsequently printed at <link xlink:href="http://bsdmag.org/magazine/1021-bsd-as-a-desktop">BSD
|
|
||||||
|
<para>This article was subsequently printed at <link
|
||||||
|
xlink:href="http://bsdmag.org/magazine/1021-bsd-as-a-desktop">BSD
|
||||||
Magazine</link>.</para>
|
Magazine</link>.</para>
|
||||||
</sect1>
|
</sect1>
|
||||||
|
|
||||||
<sect1 xml:id="introduction">
|
<sect1 xml:id="introduction">
|
||||||
<title>Introduction</title>
|
<title>Introduction</title>
|
||||||
|
|
||||||
<para>Experienced users or administrators are often responsible for
|
<para>Experienced users or administrators are often responsible
|
||||||
several machines or environments. They understand the difficult
|
for several machines or environments. They understand the
|
||||||
demands and challenges of maintaining such an infrastructure.
|
difficult demands and challenges of maintaining such an
|
||||||
Running a &fbus.ap; makes it easier to deploy security and software
|
infrastructure. Running a &fbus.ap; makes it easier to deploy
|
||||||
patches to selected test machines before rolling them out to
|
security and software patches to selected test machines before
|
||||||
production. It also means a number of systems can be updated from the
|
rolling them out to production. It also means a number of
|
||||||
local network rather than a potentially slower Internet connection.
|
systems can be updated from the local network rather than a
|
||||||
This article outlines the steps involved in creating an internal
|
potentially slower Internet connection. This article outlines
|
||||||
|
the steps involved in creating an internal
|
||||||
&fbus.ap;.</para>
|
&fbus.ap;.</para>
|
||||||
</sect1>
|
</sect1>
|
||||||
|
|
||||||
|
@ -80,9 +92,10 @@
|
||||||
</listitem>
|
</listitem>
|
||||||
|
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>A user account with at least 4 GB of available space.
|
<para>A user account with at least 4 GB of available
|
||||||
This will allow the creation of updates for 7.1 and 7.2, but the
|
space. This will allow the creation of updates for 7.1 and
|
||||||
exact space requirements may change from version to version.</para>
|
7.2, but the exact space requirements may change from
|
||||||
|
version to version.</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
|
||||||
<listitem>
|
<listitem>
|
||||||
|
@ -91,10 +104,12 @@
|
||||||
</listitem>
|
</listitem>
|
||||||
|
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>A web server, like <link xlink:href="&url.books.handbook;/network-apache.html">Apache</link>,
|
<para>A web server, like <link
|
||||||
with over half of the space required for the build. For instance,
|
xlink:href="&url.books.handbook;/network-apache.html">Apache</link>,
|
||||||
test builds for 7.1 and 7.2 consume a total amount of 4 GB,
|
with over half of the space required for the build. For
|
||||||
and the webserver space needed to distribute these updates is
|
instance, test builds for 7.1 and 7.2 consume a total amount
|
||||||
|
of 4 GB, and the webserver space needed to distribute
|
||||||
|
these updates is
|
||||||
2.6 GB.</para>
|
2.6 GB.</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
|
||||||
|
@ -108,21 +123,24 @@
|
||||||
<sect1 xml:id="Configuration">
|
<sect1 xml:id="Configuration">
|
||||||
<title>Configuration: Installation & Setup</title>
|
<title>Configuration: Installation & Setup</title>
|
||||||
|
|
||||||
<para>Download the <link xlink:href="http://svnweb.freebsd.org/base/user/cperciva/freebsd-update-build/">
|
<para>Download the <link
|
||||||
freebsd-update-server</link> software by installing <package>devel/subversion </package>, and execute:</para>
|
xlink:href="http://svnweb.freebsd.org/base/user/cperciva/freebsd-update-build/">
|
||||||
|
freebsd-update-server</link> software by installing
|
||||||
|
<package>devel/subversion </package>, and execute:</para>
|
||||||
|
|
||||||
<screen>&prompt.user; <userinput>svn co http://svn.freebsd.org/base/user/cperciva/freebsd-update-build freebsd-update-server</userinput></screen>
|
<screen>&prompt.user; <userinput>svn co
|
||||||
|
http://svn.freebsd.org/base/user/cperciva/freebsd-update-build
|
||||||
|
freebsd-update-server</userinput></screen>
|
||||||
|
|
||||||
<para>Update <filename>scripts/build.conf</filename> appropriately.
|
<para>Update <filename>scripts/build.conf</filename>
|
||||||
It is sourced during all build operations.</para>
|
appropriately. It is sourced during all build
|
||||||
|
operations.</para>
|
||||||
|
|
||||||
<para>Here is the default <filename>build.conf</filename>, which should
|
<para>Here is the default <filename>build.conf</filename>, which
|
||||||
be modified to suit your environment.</para>
|
should be modified to suit your environment.</para>
|
||||||
|
|
||||||
<informalexample>
|
<informalexample>
|
||||||
<programlisting>
|
<programlisting># Main configuration file for FreeBSD Update builds. The
|
||||||
|
|
||||||
# Main configuration file for FreeBSD Update builds. The
|
|
||||||
# release-specific configuration data is lower down in
|
# release-specific configuration data is lower down in
|
||||||
# the scripts tree.
|
# the scripts tree.
|
||||||
|
|
||||||
|
@ -149,18 +167,18 @@ MASTERDIR=update-master.freebsd.org<co xml:id="mstdir-id"/></programlisting>
|
||||||
|
|
||||||
<calloutlist>
|
<calloutlist>
|
||||||
<callout arearefs="ftp-id">
|
<callout arearefs="ftp-id">
|
||||||
<para>This is the location where ISO images are downloaded from (by
|
<para>This is the location where ISO images are downloaded
|
||||||
the <function>fetchiso()</function> subroutine
|
from (by the <function>fetchiso()</function> subroutine of
|
||||||
of <filename>scripts/build.subr</filename>). The location
|
<filename>scripts/build.subr</filename>). The location
|
||||||
configured is not limited to FTP URIs. Any URI scheme
|
configured is not limited to FTP URIs. Any URI scheme
|
||||||
supported by standard &man.fetch.1; utility should work
|
supported by standard &man.fetch.1; utility should work
|
||||||
fine.</para>
|
fine.</para>
|
||||||
|
|
||||||
<para>Customizations to the <function>fetchiso()</function> code can
|
<para>Customizations to the <function>fetchiso()</function>
|
||||||
be installed by copying the
|
code can be installed by copying the default
|
||||||
default <filename>build.subr</filename> script to the release and
|
<filename>build.subr</filename> script to the release and
|
||||||
architecture-specific area
|
architecture-specific area at
|
||||||
at <filename>scripts/RELEASE/ARCHITECTURE/build.subr</filename>
|
<filename>scripts/RELEASE/ARCHITECTURE/build.subr</filename>
|
||||||
and applying local changes.</para>
|
and applying local changes.</para>
|
||||||
</callout>
|
</callout>
|
||||||
|
|
||||||
|
@ -172,12 +190,12 @@ MASTERDIR=update-master.freebsd.org<co xml:id="mstdir-id"/></programlisting>
|
||||||
</callout>
|
</callout>
|
||||||
|
|
||||||
<callout arearefs="sshkey-id">
|
<callout arearefs="sshkey-id">
|
||||||
<para>The <application>SSH</application> key for uploading files to
|
<para>The <application>SSH</application> key for uploading
|
||||||
the update server. A key pair can be created by
|
files to the update server. A key pair can be created by
|
||||||
typing <command>ssh-keygen -t dsa</command>. This parameter is
|
typing <command>ssh-keygen -t dsa</command>. This parameter
|
||||||
optional; standard password authentication will be used as a
|
is optional; standard password authentication will be used
|
||||||
fallback authentication method when <literal>SSHKEY</literal> is
|
as a fallback authentication method when
|
||||||
not defined.</para>
|
<literal>SSHKEY</literal> is not defined.</para>
|
||||||
|
|
||||||
<para>The &man.ssh-keygen.1; manual page has more detailed
|
<para>The &man.ssh-keygen.1; manual page has more detailed
|
||||||
information about <application>SSH</application> and the
|
information about <application>SSH</application> and the
|
||||||
|
@ -185,8 +203,7 @@ MASTERDIR=update-master.freebsd.org<co xml:id="mstdir-id"/></programlisting>
|
||||||
</callout>
|
</callout>
|
||||||
|
|
||||||
<callout arearefs="mstacct-id">
|
<callout arearefs="mstacct-id">
|
||||||
<para>Account for uploading files to the update
|
<para>Account for uploading files to the update server.</para>
|
||||||
server.</para>
|
|
||||||
</callout>
|
</callout>
|
||||||
|
|
||||||
<callout arearefs="mstdir-id">
|
<callout arearefs="mstdir-id">
|
||||||
|
@ -195,11 +212,12 @@ MASTERDIR=update-master.freebsd.org<co xml:id="mstdir-id"/></programlisting>
|
||||||
</callout>
|
</callout>
|
||||||
</calloutlist>
|
</calloutlist>
|
||||||
|
|
||||||
<para>The default <filename>build.conf</filename> shipped with
|
<para>The default <filename>build.conf</filename> shipped with the
|
||||||
the <application>freebsd-update-server</application> sources is
|
<application>freebsd-update-server</application> sources is
|
||||||
suitable for building &arch.i386; releases of &os;. As an example of
|
suitable for building &arch.i386; releases of &os;. As an
|
||||||
building an update server for other architectures, the following steps
|
example of building an update server for other architectures,
|
||||||
outline the configuration changes needed for &arch.amd64;:</para>
|
the following steps outline the configuration changes needed for
|
||||||
|
&arch.amd64;:</para>
|
||||||
|
|
||||||
<procedure>
|
<procedure>
|
||||||
<step>
|
<step>
|
||||||
|
@ -211,9 +229,9 @@ MASTERDIR=update-master.freebsd.org<co xml:id="mstdir-id"/></programlisting>
|
||||||
</step>
|
</step>
|
||||||
|
|
||||||
<step>
|
<step>
|
||||||
<para>Install a <filename>build.conf</filename> in the
|
<para>Install a <filename>build.conf</filename> in the newly
|
||||||
newly created build directory. The build configuration
|
created build directory. The build configuration options
|
||||||
options for &os; 7.2-RELEASE on &arch.amd64; should be similar
|
for &os; 7.2-RELEASE on &arch.amd64; should be similar
|
||||||
to:</para>
|
to:</para>
|
||||||
|
|
||||||
<informalexample>
|
<informalexample>
|
||||||
|
@ -233,17 +251,22 @@ export EOL=1275289200<co xml:id="eol-id"/></programlisting>
|
||||||
|
|
||||||
<calloutlist>
|
<calloutlist>
|
||||||
<callout arearefs="sha256-id">
|
<callout arearefs="sha256-id">
|
||||||
<para>The &man.sha256.1; hash key for the desired release, is
|
<para>The &man.sha256.1; hash key for the desired release,
|
||||||
published within the respective <link xlink:href="&url.base;/releases/">release announcement</link>.</para>
|
is published within the respective <link
|
||||||
|
xlink:href="&url.base;/releases/">release
|
||||||
|
announcement</link>.</para>
|
||||||
</callout>
|
</callout>
|
||||||
|
|
||||||
<callout arearefs="eol-id">
|
<callout arearefs="eol-id">
|
||||||
<para>To generate the "End of Life" number for
|
<para>To generate the "End of Life" number for
|
||||||
<filename>build.conf</filename>, refer to the "Estimated
|
<filename>build.conf</filename>, refer to the "Estimated
|
||||||
EOL" posted on the <link xlink:href="&url.base;/security/security.html">&os;
|
EOL" posted on the <link
|
||||||
Security Website</link>. The value
|
xlink:href="&url.base;/security/security.html">&os;
|
||||||
of <literal>EOL</literal> can be derived from the date listed on
|
Security Website</link>. The value of
|
||||||
the web site, using the &man.date.1; utility, for example:</para>
|
<literal>EOL</literal> can be derived from the date
|
||||||
|
listed on the web site, using the &man.date.1; utility,
|
||||||
|
for example:</para>
|
||||||
|
|
||||||
<screen>&prompt.user; <userinput>date -j -f '%Y%m%d-%H%M%S' '20090401-000000' '+%s'</userinput></screen>
|
<screen>&prompt.user; <userinput>date -j -f '%Y%m%d-%H%M%S' '20090401-000000' '+%s'</userinput></screen>
|
||||||
</callout>
|
</callout>
|
||||||
</calloutlist>
|
</calloutlist>
|
||||||
|
@ -254,10 +277,11 @@ export EOL=1275289200<co xml:id="eol-id"/></programlisting>
|
||||||
<sect1 xml:id="build">
|
<sect1 xml:id="build">
|
||||||
<title>Building Update Code</title>
|
<title>Building Update Code</title>
|
||||||
|
|
||||||
<para>The first step is to run <filename>scripts/make.sh</filename>.
|
<para>The first step is to run
|
||||||
This will build some binaries, create directories, and generate an RSA
|
<filename>scripts/make.sh</filename>. This will build some
|
||||||
signing key used for approving builds. In this step, a passphrase will
|
binaries, create directories, and generate an RSA signing key
|
||||||
have to be supplied for the final creation of the signing key.</para>
|
used for approving builds. In this step, a passphrase will have
|
||||||
|
to be supplied for the final creation of the signing key.</para>
|
||||||
|
|
||||||
<screen>&prompt.root; <userinput>sh scripts/make.sh</userinput>
|
<screen>&prompt.root; <userinput>sh scripts/make.sh</userinput>
|
||||||
cc -O2 -fno-strict-aliasing -pipe findstamps.c -o findstamps
|
cc -O2 -fno-strict-aliasing -pipe findstamps.c -o findstamps
|
||||||
|
@ -281,8 +305,8 @@ Verifying - enter aes-256-cbc encryption password:</screen>
|
||||||
|
|
||||||
<note>
|
<note>
|
||||||
<para>Keep a note of the generated key fingerprint. This value
|
<para>Keep a note of the generated key fingerprint. This value
|
||||||
is required in <filename>/etc/freebsd-update.conf</filename> for
|
is required in <filename>/etc/freebsd-update.conf</filename>
|
||||||
binary updates.</para>
|
for binary updates.</para>
|
||||||
</note>
|
</note>
|
||||||
|
|
||||||
<para>At this point, we are ready to stage a build.</para>
|
<para>At this point, we are ready to stage a build.</para>
|
||||||
|
@ -292,8 +316,8 @@ Verifying - enter aes-256-cbc encryption password:</screen>
|
||||||
&prompt.root; <userinput>sh scripts/init.sh <replaceable>amd64 7.2-RELEASE</replaceable></userinput></screen>
|
&prompt.root; <userinput>sh scripts/init.sh <replaceable>amd64 7.2-RELEASE</replaceable></userinput></screen>
|
||||||
</informalexample>
|
</informalexample>
|
||||||
|
|
||||||
<para>What follows is a sample of an <emphasis>initial</emphasis> build
|
<para>What follows is a sample of an <emphasis>initial</emphasis>
|
||||||
run.</para>
|
build run.</para>
|
||||||
|
|
||||||
<screen>&prompt.root; <userinput>sh scripts/init.sh amd64 7.2-RELEASE</userinput>
|
<screen>&prompt.root; <userinput>sh scripts/init.sh amd64 7.2-RELEASE</userinput>
|
||||||
Mon Aug 24 16:04:36 PDT 2009 Starting fetch for FreeBSD/amd64 7.2-RELEASE
|
Mon Aug 24 16:04:36 PDT 2009 Starting fetch for FreeBSD/amd64 7.2-RELEASE
|
||||||
|
@ -341,11 +365,13 @@ world|base|/usr/lib/libalias_ftp.a
|
||||||
<warning>
|
<warning>
|
||||||
<para>During this second build cycle, the network time protocol
|
<para>During this second build cycle, the network time protocol
|
||||||
daemon, &man.ntpd.8;, is turned off. Per &a.cperciva.email;,
|
daemon, &man.ntpd.8;, is turned off. Per &a.cperciva.email;,
|
||||||
Security Officer Emeritus of &os;, "the <link xlink:href="http://svnweb.freebsd.org/base/user/cperciva/freebsd-update-build/">freebsd-update-server</link>
|
Security Officer Emeritus of &os;, "the <link
|
||||||
build code needs to identify timestamps which are stored in files so
|
xlink:href="http://svnweb.freebsd.org/base/user/cperciva/freebsd-update-build/">freebsd-update-server</link>
|
||||||
that they can be ignored when comparing builds to determine which
|
build code needs to identify timestamps which are stored in
|
||||||
files need to be updated. This timestamp-finding works by doing two
|
files so that they can be ignored when comparing builds to
|
||||||
builds 400 days apart and comparing the results."</para>
|
determine which files need to be updated. This
|
||||||
|
timestamp-finding works by doing two builds 400 days apart and
|
||||||
|
comparing the results."</para>
|
||||||
</warning>
|
</warning>
|
||||||
|
|
||||||
<screen>Mon Aug 24 17:54:07 PDT 2009 Extracting world+src for FreeBSD/amd64 7.2-RELEASE
|
<screen>Mon Aug 24 17:54:07 PDT 2009 Extracting world+src for FreeBSD/amd64 7.2-RELEASE
|
||||||
|
@ -417,12 +443,12 @@ they look sensible, then run
|
||||||
# sh -e approve.sh amd64 7.2-RELEASE
|
# sh -e approve.sh amd64 7.2-RELEASE
|
||||||
to sign the release.</screen>
|
to sign the release.</screen>
|
||||||
|
|
||||||
<para>Approve the build if everything is correct. More information on
|
<para>Approve the build if everything is correct. More
|
||||||
determining this can be found in the distributed source
|
information on determining this can be found in the distributed
|
||||||
file named <filename>USAGE</filename>. Execute
|
source file named <filename>USAGE</filename>. Execute
|
||||||
<filename>scripts/approve.sh</filename>, as directed. This will sign
|
<filename>scripts/approve.sh</filename>, as directed. This will
|
||||||
the release, and move components into a staging area suitable for
|
sign the release, and move components into a staging area
|
||||||
uploading.</para>
|
suitable for uploading.</para>
|
||||||
|
|
||||||
<informalexample>
|
<informalexample>
|
||||||
<screen>&prompt.root; <userinput>cd /usr/local/freebsd-update-server</userinput>
|
<screen>&prompt.root; <userinput>cd /usr/local/freebsd-update-server</userinput>
|
||||||
|
@ -436,8 +462,8 @@ Wed Aug 26 12:50:06 PDT 2009 Copying files to upload staging area for FreeBSD/am
|
||||||
Wed Aug 26 12:50:07 PDT 2009 Updating databases for FreeBSD/amd64 7.2-RELEASE
|
Wed Aug 26 12:50:07 PDT 2009 Updating databases for FreeBSD/amd64 7.2-RELEASE
|
||||||
Wed Aug 26 12:50:07 PDT 2009 Cleaning staging area for FreeBSD/amd64 7.2-RELEASE</screen>
|
Wed Aug 26 12:50:07 PDT 2009 Cleaning staging area for FreeBSD/amd64 7.2-RELEASE</screen>
|
||||||
|
|
||||||
<para>After the approval process is complete, the upload procedure may
|
<para>After the approval process is complete, the upload procedure
|
||||||
be started.</para>
|
may be started.</para>
|
||||||
|
|
||||||
<informalexample>
|
<informalexample>
|
||||||
<screen>&prompt.root; <userinput>cd /usr/local/freebsd-update-server</userinput>
|
<screen>&prompt.root; <userinput>cd /usr/local/freebsd-update-server</userinput>
|
||||||
|
@ -445,9 +471,9 @@ Wed Aug 26 12:50:07 PDT 2009 Cleaning staging area for FreeBSD/amd64 7.2-RELEASE
|
||||||
</informalexample>
|
</informalexample>
|
||||||
|
|
||||||
<note>
|
<note>
|
||||||
<para>In the event update code needs to be re-uploaded, this may be
|
<para>In the event update code needs to be re-uploaded, this may
|
||||||
done by changing to the public distributions directory for the
|
be done by changing to the public distributions directory for
|
||||||
target release and updating attributes of the
|
the target release and updating attributes of the
|
||||||
<emphasis>uploaded</emphasis> file.</para>
|
<emphasis>uploaded</emphasis> file.</para>
|
||||||
|
|
||||||
<informalexample>
|
<informalexample>
|
||||||
|
@ -460,12 +486,13 @@ Wed Aug 26 12:50:07 PDT 2009 Cleaning staging area for FreeBSD/amd64 7.2-RELEASE
|
||||||
avoid making the instructions Apache-specific here. -->
|
avoid making the instructions Apache-specific here. -->
|
||||||
|
|
||||||
<!-- there are specific web instructions in the uploaded code that pertain to Apache. I believe it is worded fine here, now, and if others choose to use another web server, that is their choice to figure out -->
|
<!-- there are specific web instructions in the uploaded code that pertain to Apache. I believe it is worded fine here, now, and if others choose to use another web server, that is their choice to figure out -->
|
||||||
<para>The uploaded files will need to be in the
|
<para>The uploaded files will need to be in the document root of
|
||||||
document root of the webserver in order for updates
|
the webserver in order for updates to be distributed. The exact
|
||||||
to be distributed. The exact configuration will vary depending on the
|
configuration will vary depending on the web server used. For
|
||||||
web server used. For the <application>Apache</application> web server,
|
the <application>Apache</application> web server, please refer
|
||||||
please refer to the <link xlink:href="&url.books.handbook;/network-apache.html">Configuration of
|
to the <link
|
||||||
Apache servers</link> section in the Handbook.</para>
|
xlink:href="&url.books.handbook;/network-apache.html">Configuration
|
||||||
|
of Apache servers</link> section in the Handbook.</para>
|
||||||
|
|
||||||
<!-- This note seems either out of place. I find it hard to read and it
|
<!-- This note seems either out of place. I find it hard to read and it
|
||||||
is a bit difficult to understand why it is related to the rest of
|
is a bit difficult to understand why it is related to the rest of
|
||||||
|
@ -489,37 +516,45 @@ Wed Aug 26 12:50:07 PDT 2009 Cleaning staging area for FreeBSD/amd64 7.2-RELEASE
|
||||||
<!-- What is a 'KeyPrint'? -->
|
<!-- What is a 'KeyPrint'? -->
|
||||||
<para>Update client's <literal>KeyPrint</literal> and
|
<para>Update client's <literal>KeyPrint</literal> and
|
||||||
<literal>ServerName</literal> in
|
<literal>ServerName</literal> in
|
||||||
<filename>/etc/freebsd-update.conf</filename>, and perform updates as
|
<filename>/etc/freebsd-update.conf</filename>, and perform
|
||||||
instructed in the <link xlink:href="&url.books.handbook;/updating-upgrading-freebsdupdate.html">&os;
|
updates as instructed in the <link
|
||||||
|
xlink:href="&url.books.handbook;/updating-upgrading-freebsdupdate.html">&os;
|
||||||
Update</link>
|
Update</link>
|
||||||
<!-- One sentence, two instances of 'in'. We can probably reword this
|
<!-- One sentence, two instances of 'in'. We can probably
|
||||||
|
reword this
|
||||||
part to avoid repetition. -->
|
part to avoid repetition. -->
|
||||||
<!-- What about "place client's new keyprint and servername values to
|
<!-- What about "place client's new keyprint and servername
|
||||||
freebsd-update.conf, ..."? gabor -->
|
values to
|
||||||
section of the Handbook.</para>
|
freebsd-update.conf, ..."? gabor --> section of the
|
||||||
|
Handbook.</para>
|
||||||
|
|
||||||
<!-- Sorry folks, but I disagree here. I believe it is worded fine. If anything, drop everything after "perform" and change "updates" to "FreeBSD Updates" and link that to the handbook -->
|
<!-- Sorry folks, but I disagree here. I believe it is worded fine. If anything, drop everything after "perform" and change "updates" to "FreeBSD Updates" and link that to the handbook -->
|
||||||
|
|
||||||
<important>
|
<important>
|
||||||
<para>In order for &fbus.ap; to work properly, updates
|
<para>In order for &fbus.ap; to work properly, updates for both
|
||||||
for both the <emphasis>current</emphasis> release and the
|
the <emphasis>current</emphasis> release and the release
|
||||||
release <emphasis>one wants to upgrade to</emphasis> need to be
|
<emphasis>one wants to upgrade to</emphasis> need to be built.
|
||||||
built. This is necessary for determining the differences of
|
This is necessary for determining the differences of files
|
||||||
files between releases. For example, when upgrading a &os;
|
between releases. For example, when upgrading a &os; system
|
||||||
system from 7.1-RELEASE to 7.2-RELEASE, updates will need to be built
|
from 7.1-RELEASE to 7.2-RELEASE, updates will need to be built
|
||||||
and uploaded to your distribution server for both versions.</para>
|
and uploaded to your distribution server for both
|
||||||
|
versions.</para>
|
||||||
</important>
|
</important>
|
||||||
|
|
||||||
<para>For reference, the entire run of <link xlink:href="init.txt"><filename>init.sh</filename></link> is
|
<para>For reference, the entire run of <link
|
||||||
|
xlink:href="init.txt"><filename>init.sh</filename></link> is
|
||||||
attached.</para>
|
attached.</para>
|
||||||
</sect1>
|
</sect1>
|
||||||
|
|
||||||
<sect1 xml:id="patch">
|
<sect1 xml:id="patch">
|
||||||
<title>Building a Patch</title>
|
<title>Building a Patch</title>
|
||||||
|
|
||||||
<para>Every time a <link xlink:href="&url.base;/security/advisories.html">security advisory</link>
|
<para>Every time a <link
|
||||||
or <link xlink:href="&url.base;/security/notices.html">security notice</link>
|
xlink:href="&url.base;/security/advisories.html">security
|
||||||
is announced, a patch update can be built.</para>
|
advisory</link> or <link
|
||||||
|
xlink:href="&url.base;/security/notices.html">security
|
||||||
|
notice</link> is announced, a patch update can be
|
||||||
|
built.</para>
|
||||||
|
|
||||||
<para>For this example, 7.1-RELEASE will be used.</para>
|
<para>For this example, 7.1-RELEASE will be used.</para>
|
||||||
|
|
||||||
|
@ -537,38 +572,43 @@ Wed Aug 26 12:50:07 PDT 2009 Cleaning staging area for FreeBSD/amd64 7.2-RELEASE
|
||||||
</listitem>
|
</listitem>
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
|
|
||||||
<para>Create the patch directory of the respective release
|
<para>Create the patch directory of the respective release under
|
||||||
under <filename>/usr/local/freebsd-update-server/patches/</filename>.</para>
|
<filename>/usr/local/freebsd-update-server/patches/</filename>.</para>
|
||||||
|
|
||||||
<informalexample>
|
<informalexample>
|
||||||
<screen>&prompt.user; <userinput>mkdir -p /usr/local/freebsd-update-server/patches/7.1-RELEASE/</userinput>
|
<screen>&prompt.user; <userinput>mkdir -p /usr/local/freebsd-update-server/patches/7.1-RELEASE/</userinput>
|
||||||
&prompt.user; <userinput>cd /usr/local/freebsd-update-server/patches/7.1-RELEASE</userinput></screen>
|
&prompt.user; <userinput>cd /usr/local/freebsd-update-server/patches/7.1-RELEASE</userinput></screen>
|
||||||
</informalexample>
|
</informalexample>
|
||||||
|
|
||||||
<para>As an example, take the patch for &man.named.8;. Read the advisory,
|
<para>As an example, take the patch for &man.named.8;. Read the
|
||||||
and grab the necessary file from <link xlink:href="&url.base;/security/advisories.html">&os; Security
|
advisory, and grab the necessary file from <link
|
||||||
Advisories</link>. More information on interpreting the advisory,
|
xlink:href="&url.base;/security/advisories.html">&os; Security
|
||||||
can be found in the <link xlink:href="&url.books.handbook;/security-advisories.html">&os; Handbook</link>.</para>
|
Advisories</link>. More information on interpreting the
|
||||||
|
advisory, can be found in the <link
|
||||||
|
xlink:href="&url.books.handbook;/security-advisories.html">&os;
|
||||||
|
Handbook</link>.</para>
|
||||||
|
|
||||||
<para>In the <link xlink:href="http://security.freebsd.org/advisories/FreeBSD-SA-09:12.bind.asc">security brief</link>,
|
<para>In the <link
|
||||||
this advisory is called <literal>SA-09:12.bind</literal>. After
|
xlink:href="http://security.freebsd.org/advisories/FreeBSD-SA-09:12.bind.asc">security
|
||||||
downloading the file, it is required to rename the file to an
|
brief</link>, this advisory is called
|
||||||
appropriate patch level. It is suggested to keep this consistent with
|
<literal>SA-09:12.bind</literal>. After downloading the file,
|
||||||
official &os; patch levels, but its name may be freely chosen.
|
it is required to rename the file to an appropriate patch level.
|
||||||
For this build, let us follow the currently established practice of
|
It is suggested to keep this consistent with official &os; patch
|
||||||
&os; and call this <literal>p7</literal>. Rename the file:</para>
|
levels, but its name may be freely chosen. For this build, let
|
||||||
|
us follow the currently established practice of &os; and call
|
||||||
|
this <literal>p7</literal>. Rename the file:</para>
|
||||||
|
|
||||||
<informalexample>
|
<informalexample>
|
||||||
<screen>&prompt.user; <userinput>cd /usr/local/freebsd-update-server/patches/7.1-RELEASE/; mv bind.patch 7-SA-09:12.bind </userinput></screen>
|
<screen>&prompt.user; <userinput>cd /usr/local/freebsd-update-server/patches/7.1-RELEASE/; mv bind.patch 7-SA-09:12.bind </userinput></screen>
|
||||||
</informalexample>
|
</informalexample>
|
||||||
|
|
||||||
<note>
|
<note>
|
||||||
<para>When running a patch level build, it is assumed that previous
|
<para>When running a patch level build, it is assumed that
|
||||||
patches are in place. When a patch build is run, it will run all
|
previous patches are in place. When a patch build is run, it
|
||||||
patches contained in the patch directory.</para>
|
will run all patches contained in the patch directory.</para>
|
||||||
|
|
||||||
<para>There can be custom patches added to any build. Use the number
|
<para>There can be custom patches added to any build. Use the
|
||||||
zero, or any other number.</para>
|
number zero, or any other number.</para>
|
||||||
</note>
|
</note>
|
||||||
|
|
||||||
<warning>
|
<warning>
|
||||||
|
@ -577,18 +617,18 @@ Wed Aug 26 12:50:07 PDT 2009 Cleaning staging area for FreeBSD/amd64 7.2-RELEASE
|
||||||
patch.</para>
|
patch.</para>
|
||||||
</warning>
|
</warning>
|
||||||
|
|
||||||
<para>At this point, a <emphasis>diff</emphasis> is ready to be built.
|
<para>At this point, a <emphasis>diff</emphasis> is ready to be
|
||||||
The software checks first to see if a
|
built. The software checks first to see if a
|
||||||
<filename>scripts/init.sh</filename> has been run on the respective
|
<filename>scripts/init.sh</filename> has been run on the
|
||||||
release prior to running the diff build.</para>
|
respective release prior to running the diff build.</para>
|
||||||
|
|
||||||
<informalexample>
|
<informalexample>
|
||||||
<screen>&prompt.root; <userinput>cd /usr/local/freebsd-update-server</userinput>
|
<screen>&prompt.root; <userinput>cd /usr/local/freebsd-update-server</userinput>
|
||||||
&prompt.root; <userinput>sh scripts/diff.sh <replaceable>amd64 7.1-RELEASE 7</replaceable></userinput></screen>
|
&prompt.root; <userinput>sh scripts/diff.sh <replaceable>amd64 7.1-RELEASE 7</replaceable></userinput></screen>
|
||||||
</informalexample>
|
</informalexample>
|
||||||
|
|
||||||
<para>What follows is a sample of a <emphasis>differential</emphasis>
|
<para>What follows is a sample of a
|
||||||
build run.</para>
|
<emphasis>differential</emphasis> build run.</para>
|
||||||
|
|
||||||
<screen>&prompt.root; <userinput>sh -e scripts/diff.sh amd64 7.1-RELEASE 7</userinput>
|
<screen>&prompt.root; <userinput>sh -e scripts/diff.sh amd64 7.1-RELEASE 7</userinput>
|
||||||
Wed Aug 26 10:09:59 PDT 2009 Extracting world+src for FreeBSD/amd64 7.1-RELEASE-p7
|
Wed Aug 26 10:09:59 PDT 2009 Extracting world+src for FreeBSD/amd64 7.1-RELEASE-p7
|
||||||
|
@ -704,8 +744,8 @@ the new builds.</screen>
|
||||||
&prompt.root; <userinput>sh scripts/upload.sh <replaceable>amd64 7.1-RELEASE</replaceable></userinput></screen>
|
&prompt.root; <userinput>sh scripts/upload.sh <replaceable>amd64 7.1-RELEASE</replaceable></userinput></screen>
|
||||||
</informalexample>
|
</informalexample>
|
||||||
|
|
||||||
<para>For reference, the entire run of
|
<para>For reference, the entire run of <link
|
||||||
<link xlink:href="diff.txt"><filename>diff.sh</filename></link> is
|
xlink:href="diff.txt"><filename>diff.sh</filename></link> is
|
||||||
attached.</para>
|
attached.</para>
|
||||||
</sect1>
|
</sect1>
|
||||||
|
|
||||||
|
@ -732,17 +772,20 @@ the new builds.</screen>
|
||||||
<itemizedlist>
|
<itemizedlist>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>If a custom release is built using the native
|
<para>If a custom release is built using the native
|
||||||
<command>make release</command> <link xlink:href="&url.articles.releng;/release-build.html">procedure</link>,
|
<command>make release</command> <link
|
||||||
<application>freebsd-update-server</application> code will work
|
xlink:href="&url.articles.releng;/release-build.html">procedure</link>,
|
||||||
from your release. As an example, a release without ports or
|
<application>freebsd-update-server</application> code will
|
||||||
documentation can be built by clearing functionality pertaining
|
work from your release. As an example, a release without
|
||||||
to documentation subroutines <function> findextradocs ()</function>,
|
ports or documentation can be built by clearing
|
||||||
<function>addextradocs ()</function> and altering the download
|
functionality pertaining to documentation subroutines
|
||||||
location in <function>fetchiso ()</function>, respectively, in
|
<function> findextradocs ()</function>,
|
||||||
<filename>scripts/build.subr</filename>. As a last step, change
|
<function>addextradocs ()</function> and altering the
|
||||||
the &man.sha256.1; hash in <filename>build.conf</filename> under
|
download location in <function>fetchiso ()</function>,
|
||||||
your respective release and architecture and you are ready to build
|
respectively, in <filename>scripts/build.subr</filename>.
|
||||||
off your custom release.</para>
|
As a last step, change the &man.sha256.1; hash in
|
||||||
|
<filename>build.conf</filename> under your respective
|
||||||
|
release and architecture and you are ready to build off your
|
||||||
|
custom release.</para>
|
||||||
|
|
||||||
<screen># Compare ${WORKDIR}/release and ${WORKDIR}/$1, identify which parts
|
<screen># Compare ${WORKDIR}/release and ${WORKDIR}/$1, identify which parts
|
||||||
# of the world|doc subcomponent are missing from the latter, and
|
# of the world|doc subcomponent are missing from the latter, and
|
||||||
|
@ -752,17 +795,18 @@ the new builds.</screen>
|
||||||
|
|
||||||
# Add extra docs to ${WORKDIR}/$1
|
# Add extra docs to ${WORKDIR}/$1
|
||||||
addextradocs () {
|
addextradocs () {
|
||||||
}
|
}</screen>
|
||||||
</screen>
|
|
||||||
</listitem>
|
</listitem>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>Adding <option>-j <replaceable>NUMBER</replaceable></option>
|
<para>Adding <option>-j
|
||||||
flags to <buildtarget>buildworld</buildtarget> and
|
<replaceable>NUMBER</replaceable></option> flags to
|
||||||
|
<buildtarget>buildworld</buildtarget> and
|
||||||
<buildtarget>obj</buildtarget> targets in the
|
<buildtarget>obj</buildtarget> targets in the
|
||||||
<filename>scripts/build.subr</filename> script may speed up
|
<filename>scripts/build.subr</filename> script may speed up
|
||||||
processing depending on the hardware used, however it is not
|
processing depending on the hardware used, however it is not
|
||||||
necessary. Using these flags in other targets is not
|
necessary. Using these flags in other targets is not
|
||||||
recommended, as it may cause the build to become unreliable.</para>
|
recommended, as it may cause the build to become
|
||||||
|
unreliable.</para>
|
||||||
|
|
||||||
<screen> # Build the world
|
<screen> # Build the world
|
||||||
log "Building world"
|
log "Building world"
|
||||||
|
@ -777,11 +821,12 @@ the new builds.</screen>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>Create an appropriate <link xlink:href="&url.books.handbook;/network-dns.html">DNS</link>
|
<para>Create an appropriate <link
|
||||||
SRV record for the update server, and put others behind it with
|
xlink:href="&url.books.handbook;/network-dns.html">DNS</link>
|
||||||
variable weights. Using this facility will provide update
|
SRV record for the update server, and put others behind it
|
||||||
mirrors, however this tip is not necessary unless you wish to
|
with variable weights. Using this facility will provide
|
||||||
provide a redundant service.</para>
|
update mirrors, however this tip is not necessary unless you
|
||||||
|
wish to provide a redundant service.</para>
|
||||||
|
|
||||||
<screen> _http._tcp.update.myserver.com. IN SRV 0 2 80 host1.myserver.com.
|
<screen> _http._tcp.update.myserver.com. IN SRV 0 2 80 host1.myserver.com.
|
||||||
SRV 0 1 80 host2.myserver.com.
|
SRV 0 1 80 host2.myserver.com.
|
||||||
|
|
Loading…
Reference in a new issue