source: build-files/freebsd-update/scripts/init.sh @ 635dc54

9.2-releasereleng/10.0releng/10.0.1
Last change on this file since 635dc54 was 635dc54, checked in by Kris Moore <kris@…>, 10 months ago

Add our freebsd-update code to GIT

This will become a dumping ground for mods we may make to the freebsd-update
build process, as well as the specific patches we have going into a release

  • Property mode set to 100755
File size: 3.2 KB
Line 
1#!/bin/sh -e
2
3#-
4# Copyright 2006 Colin Percival
5# All rights reserved
6#
7# Redistribution and use in source and binary forms, with or without
8# modification, are permitted providing that the following conditions
9# are met:
10# 1. Redistributions of source code must retain the above copyright
11#    notice, this list of conditions and the following disclaimer.
12# 2. Redistributions in binary form must reproduce the above copyright
13#    notice, this list of conditions and the following disclaimer in the
14#    documentation and/or other materials provided with the distribution.
15#
16# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
17# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19# ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
20# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
24# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
25# IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
26# POSSIBILITY OF SUCH DAMAGE.
27
28# $FreeBSD: user/cperciva/freebsd-update-build/scripts/init.sh 247826 2013-03-05 00:52:14Z cperciva $
29
30# Perform an "initialization" build for a release.  This downloads the
31# release ISO image and builds everything locally in order to find any
32# build stamps.  As the name suggests, this script is the first thing which
33# should be run for each release, and should only be run once.
34
35. `dirname $0`/build.subr
36readconfig $1 $2
37
38# Make sure that necessary binaries have been built
39checkbins
40
41# Create directories, (empty) databases, and some incidental files
42# in the publishing directory.
43makedirs
44makedbs
45makepub
46
47# Fetch the ISO and extract the important files.
48fetchiso
49extractiso
50
51# Perform a build.
52extractworld world0
53rpatchworld world0
54buildworld world0
55
56# Compare the built and released worlds to identify
57# which docs are built from the doc tree; add them
58# to the built files.
59findextradocs world0
60addextradocs world0
61
62# Fully index the released and built files.
63indexfiles release
64indexfiles world0
65
66# Check for discrepancies
67diffwarn world0
68
69# Perform build 400 days into the future
70extractworld world1
71rpatchworld world1
72futurebuildworld world1
73addextradocs world1
74
75# Index the future world
76indexfiles world1
77
78# Compare world0 and world1 to find stamps
79findstamps world0 world1
80
81# Compare world0 and the release to find differences in non-stamped files.
82findnonstamps world0
83
84# Now that we have found the stamps, we don't need the worlds we built.
85removeworld world0
86removeworld world1
87
88# Move everything from the release into the staging area
89stageworld release
90
91# Warn the user about which timestamps have been found
92printstamps
93
94# Tell the user that we're done and what he should do next
95cat <<-EOF
96
97        FreeBSD/${TARGET} ${REL} initialization build complete.  Please
98        review the list of build stamps printed above to confirm that
99        they look sensible, then run
100        # sh -e approve.sh ${TARGET} ${REL}
101        to sign the release.
102EOF
Note: See TracBrowser for help on using the repository browser.