summaryrefslogtreecommitdiff
path: root/db/dist/buildrel
blob: ef589abcb1e5f3959e6cb9e395f8503ca98b2371 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#!/bin/sh -
#	Id: buildrel,v 1.31 2001/10/14 15:31:11 bostic Exp 
#
# Build the distribution archives.
#
# A set of commands intended to be cut and pasted into a csh window.

# Development tree, release home.
setenv D /a/db

# Update the release number.
cd $D/dist
vi RELEASE
setenv VERSION \
`sh -c '. RELEASE; echo $DB_VERSION_MAJOR.$DB_VERSION_MINOR.$DB_VERSION_PATCH'`
echo "Version: $VERSION"

# Make sure the source tree is up-to-date, generate new support files, and
# commit anything that's changed.
cd $D && cvs -q update
cd $D/dist && sh s_all
cd $D && cvs -q commit

# Copy a development tree into a release tree.
setenv R /var/tmp/db-$VERSION
rm -rf $R && mkdir -p $R
cd $D && tar cf - \
`cvs -q status | sed -n -e "/Repository/s;.*/CVSROOT/db/;;" -e "s/,v//p"` | \
(cd $R && tar xpf -)

# Fix symbolic links and permissions.
cd $R/dist && sh s_perm
cd $R/dist && sh s_symlink

# Build the documentation.
cd $R/docs_src && make

# Build a version.
cd $R && rm -rf build_run && mkdir build_run
cd $R/build_run && ~bostic/bin/dbconf && make >& mklog

# Smoke test.
./ex_access

# Check the install
make prefix=`pwd`/BDB install

# Clean up the tree.
cd $R && rm -rf build_run docs_src
cd $R && rm -rf test/TODO test/upgrade
cd $R && rm -rf test_perf test_purify test_server test_thread test_vxworks

# ACQUIRE ROOT PRIVILEGES
cd $R && find . -type d | xargs chmod 775
cd $R && find . -type f | xargs chmod 444
cd $R && chmod 664 build_win32/*.dsp
cd $R/dist && sh s_perm
chown -R 100.100 $R
# DISCARD ROOT PRIVILEGES

# Compare this release with the last one.
set LR=3.1.X
cd $R/.. && gzcat /a/releases/db-${LR}.tar.gz | tar xf -
cd $R/../db-${LR} && find . | sort > /tmp/__OLD
cd $R && find . | sort > /tmp/__NEW
diff -c /tmp/__OLD /tmp/__NEW

# Create the tar archive release.
setenv T "$R/../db-$VERSION.tar.gz"
cd $R/.. && tar cf - db-$VERSION | gzip --best > $T
chmod 444 $T

# Create the zip archive release.
#
# Remove symbolic links to tags files.  They're large and we don't want to
# store real symbolic links in the archive for portability reasons.
# ACQUIRE ROOT PRIVILEGES
cd $R && rm -f `find . -type l -name 'tags'`
# DISCARD ROOT PRIVILEGES

setenv T "$R/../db-$VERSION.zip"
cd $R/.. && zip -r - db-$VERSION > $T
chmod 444 $T