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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
|
TODO
====
@@ No upgrade testing (see old test-upgrade script).
@@ Not saving in previous toolchains (see old install script).
@@ Using FreeBSD for Clang/libc++ testing, both 3.4 (earliest we support)
and 3.7.
Setup
=====
* Make symlinks to development b, bpkg in /usr/local/bin/, used as the latest
toolchain.
* Set passwordless sudo, logins to freebsd, cppget1, rbook (Mac OS)
For Mac OS:
echo "boris ALL=(ALL) NOPASSWD:ALL" >>/etc/sudoers
- Boot freebsd VM, make sure data/time is correct.
Notes
=====
* Be very careful with submodules if fixing anything, remember to update
build2-toolchain.
* Be very carefult with regenerating documentation, ODB files, both in
individual projects and build2-toolchain.
Stage
=====
- To stage build2
~ make sure build2-toolchain is ready (submodules, doc/odb regen)
~ update BUILD2_REPO URL in build2-toolchain/build* scripts if needed
To stage to stage.build2.org:
~ to exclude baseutils/mingw, add -p
etc/stage
To stage to cppget.org/queue:
~ note: assuming brep running on queue can handle it
etc/stage -q
- To stage hello
cd hello
./stat
./stage
To run intro on staged:
etc/intro -s https://build2.org/pkg/1/stage
Test :
+ Local with cli disables
+ Local with Intel icc
~ fails with ICE on build2
+ Local with gcc 4.8
+ Local brep build:
bpkg create -d brep cc config.cc.poptions="-I$(apxs -q includedir)"
cd brep
bpkg add https://stage.build2.org/1
bpkg fetch
bpkg build brep ?sys:libapr1 ?sys:libpq
Cross:
+ Test VC cross-build
+ Test MinGW cross-build (build2 build fails on GC 4.8.2, using ODB cross)
Bootstrap (with upgrade procedures):
+ CentOS GCC 4.8
+ FreeBSD 10 Clang 3.4 (clang++)
+ FreeBSD 10 Clang 3.7 (clang++37) with -W -Wall (mod build.sh) + brep:
bpkg create -d brep cc config.cxx=clang++37 \
config.cc.poptions="-I$(apxs -q includedir)"
cd brep
bpkg add https://stage.build2.org/1
bpkg fetch
bpkg build brep ?sys:libapr1 ?sys:libpq
+ Windows7-64 VC14u2
+ WindowsXP-32 MinGW (build2-mingw)
+ Windows MSYS2
+ Mac OS Xcode/Clang (and g++ alias)
Upgrade brep on stage
Prelude
=======
+ Remove etc/, build2-toolchain from modules in etc/git/modules.
+ Review '@@' items [note: etc, private excluded]
etc/review | less -R
+ Make sure Intro is still accurate wrt output, etc. Use -s -p switches to
etc/intro to compare (after running hello/stage):
etc/intro -s `pwd`/hello/repository/1/
+ If new preprequisites/version, need to update manifests. See
private/build2-projects.txt to review.
+ Increment version to final.
~ update and use etc/version script
~ update versions/dates for man generation (cli.sh in build2, bpkg, brep,
and built2-toolchain)
+ Update BUILD2_REPO URL in build2-toolchain/build* scripts to alpha, also
grep docs for 'stage.' in case got copied.
+ Close schema versions, review schema changlog difference from previous
release (tag) for any data migration that may be required (@@ would also
need to test this; see upgrade test).
+ Update NEWS files.
+ Need to update submodules? (remember to push first)
+ Need to regenerate ODB files, CLI documentation, in build2-toolchin?
Procession
==========
+ Stage final packages (remove -p if need baseutils/mingw)
etc/stage -p
- Upgrade brep on lists.build2, lists.cppget from stage
~ assumming it can handle old repositories (should normally be the case)
~ backup config if changed
cd private/
scp -r lists.build2.org:/home/brep/config lists.build2.org/home/brep/
scp -r lists.cppget.org:/home/brep/config lists.cppget.org/home/brep/
~ note: on cppget we have queue:
install/bin/brep-migrate -n brep_queue
install/bin/brep-load -n brep_queue config/brep-queue-load.conf
+ Queue final packages
etc/stage -p -q
+ Smoke-test any last-minute changes
+ Move packages from queue to alpha, cleanup obsolete, regenerate.
cd cppget.org
git -C repository status
./update
+ Publish to production (build2.org/cppget.org)
etc/publish
+ Smoke-test
+ Publish hello repository
cd hello
./stage -p
Test intro steps:
etc/intro -s https://build2.org/pkg/1/hello
- Commit and push git repositories:
+ ~ cppget.org (commit individually and push)
~ hello project and respository (add & commit individual packages)
cd hello
./foreach-git stat
./foreach-git -x libhello-1.0 tag -a build2-X.Y -m "Tag for build2 version X.Y"
git -C libhello-1.0 tag -a 1.0/build2-X.Y -m "Tag for build2 version X.Y"
./foreach-git push --tags
+ Tag (review tag_modules) and push.
etc/tag
./push.sh
- Tag and increment version for each published package (see
private/build2-projects.txt)
=============================================================================
@@ When copying to production need to make sure we don't override existing
versions of prerequisite packages that haven't changed (but which we still
stage/queue).
=============================================================================
@@ Move up.
- Update everything:
b libbutl/ build2/ libbpkg/ bpkg/ brep/ build2-toolchain-default/
- Run tests for each project:
* b 'test(libbutl/ libbpkg/)'
* Manually in build2/
* Manually in bpkg/; test (valgrind/asan), publish, test remote with -v,
FreeBSD tools:
./test.sh -v --remote --fetch fetch --fetch-option --no-verify-peer \
--tar bsdtar --sha256 sha256-freebsd
* Test dev integration of brep/ on hello and cppget repos
First check if Apache2 configuration needs updating (INSTALL-DEV). Then
from build2/ work root:
# This will have broken links since we are not running it as /pkg/hello.
#
brep/migrate/brep-migrate --recreate
brep/load/brep-load hello/brep-loader-home.conf
sudo /etc/init.d/apache2 restart
brep/migrate/brep-migrate --recreate
brep/load/brep-load cppget.org/brep-loader-home.conf
sudo /etc/init.d/apache2 restart
If need to drop the entire database, one way to do it is by executing:
DROP OWNED BY <user>;
Procession
==========
X Generate distribution (use -t for toolchain-only, without brep). The
result is placed into the queue.
etc/dist 2>&1 | tee dist.log
X Test upgrade from previous version (replace Y in 0.Y.0).
etc/test-upgrade -c cxx \
-c config.cxx.loptions=-L/usr/local/lib \
-c config.cxx.poptions="-I/usr/include/apache2 -I/usr/include/apr-1.0" \
/home/boris/work/build2/etc1/install/0.Y.0
X Update and test hello repository
cd hello
./foreach-git status
./stage -p
X Test Intro steps on the local hello repository
etc/intro `pwd`/hello/repository/1/
X Stage queue to cppget.org
etc/stage --dry-run
etc/stage
- Determine the earliest supported backwards-compatible toolchain (see
requires: in manifests), update etc/test
- Test
etc/test 2>&1 | tee test.log
grep -i warning test.log
- Test production and save a copy of toolchain in etc1/install/X.Y.Z
etc/install -t -i "etc1/install/`cat build2-toolchain/version`" \
https://download.build2.org/0.Y/build2-toolchain-0.Y.0.tar.gz \
https://pkg.cppget.org/1/alpha
- Upgrade brep on cppget.org (via package/alpha upgrade if possible),
verify works.
Note that here we also have queue:
install/bin/brep-migrate -n brep_queue
install/bin/brep-load -n brep_queue config/brep-queue-load.conf
Backup configs if changed:
cd private/
scp -r lists.cppget.org:/home/brep/config lists.cppget.org/home/brep/
Release
=======
+ Update style/ submodule in private/
+ Write release notes, use placeholder for announcement URL. Add link from
the doc page.
- Any new FAQ entries or any other updates (main page, etc)?
+ Update download page.
+ Regenerate (./cli.sh) all hosts.
+ Test local, publish, test production:
cd private/
./publish --dry-run
./publish
+ Write and send announcements
Remember upgrade instructions.
cat `ls -1 *.sha256`
+ Patch the announcement URL in release notes, re-publish.
- Announce on reddit and other places (doc/ann).
Postlude
========
- Increment and open schema versions. Maybe not. Maybe we should only do that
when there is a model change.
+ Increment project versions to alpha1, change BUILD2_REPO to staging,
open master for business.
- Commit changes to etc/, add it back to etc/git/modules, and tag:
git tag -a X.Y.Z -m "Tag version X.Y.Z"
|