-
Notifications
You must be signed in to change notification settings - Fork 21
/
Release_Procedure.txt
1606 lines (1142 loc) · 52.2 KB
/
Release_Procedure.txt
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
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
Please note that this document is outdated, builds are now done
via Jenkins - jenkins.asf.alaska.edu
The User Tool Development Group's Release Procedure Instructions:
=================================================================
IMPORTANT NOTE: At this time, ALL Linux rpm builds should occur
on dq.asf.alaska.edu, not on some other RedHat or CentOS machine.
This is because the configure script, if re-generated, may differ
and the docbook2text tool used to create the MapReady GUI's help
file creates a text file full of HTML rather than plain text
when run on other machines. This will be fixed in the future,
but for now ...dq.asf.alaska.edu is king for builds.
MapReady v2.x RPM Build Procedure:
----------------------------------
Note: The following example assumes version 2.4.0, subversion
revision 9423, and a work folder at ~/asf.
Note: The MapReady binaries are mapready and asf_mapready, but
they are still built in the asf_convert_gui and asf_convert
source folders respectively. The executable and icon file (etc)
files are renamed as they are copied to the bin and share folders.
* It is suggested that you do the build on dq.
* Check out the code to be released (if not already), i.e. branched version
or the trunk, i.e. to ~/asf/asf_tools. NOTE: You will perform an
'svn export' to obtain a copy of the tools for building the release
later in this procedure.
* Update the version number(s) in ~/asf/asf_tools/include/asf_version.h
and commit the change to the subversion repository. Example:
a) MAPREADY_VERSION_STRING "2.4.0-dev"
MAPREADY_VERSION 2.4
changes to
MAPREADY_VERSION_STRING "2.4.0"
MAPREADY_VERSION 2.4
b) svn ci
* In your regular subversion checkout (not your exported version), bump
the version in include/asf_version.h and add "-dev" to the end, then
commit the change to the repository.
a)
MAPREADY_VERSION_STRING "2.0.9-dev"
MAPREADY_VERSION 2.0
b) svn ci
* Update the asf_convert_gui.glade file to eliminate all the cruft added
by more modern version of glade.
> cd asf_tools/src/asf_convert_gui
> glade-2 asf_convert_gui.glade
Simply click "Save" and then exit.
> svn ci
* When doing a release close to final release, you may wish to
update "mapready-version_history.txt" with the release date and
version number, and check that in.
For example, for 2.0.13 the first line is:
MapReady 2.0.13 (released 2008 August 27)
When building 2.0.14, this line needs to be updated accordingly.
* Tag the repository:
svn copy svn+ssh://svn/svn/asf_tools/trunk
svn+ssh://svn/svn/asf_tools/tags/mapready_v2-0-8
[[ Or if tagging a branched revision --
svn copy svn+ssh://svn/svn/asf_tools/branches/mapready_v2-0-x
svn+ssh://svn/svn/asf_tools/tags/mapready_v2-0-8
]]
* Create a clean directory where you will produce the build (etc),
for example (change the revision number to the one that you have
checked out):
mkdir ~/asf/svn-r9423
* Check out autotar and rpmbuild into this work directory. Example:
cd ~/asf/svn-r9423
svn co svn+ssh://svn/svn/release/trunk/autotar release/autotar
svn co svn+ssh://svn/svn/release/trunk/rpmbuild release/rpmbuild
* Make working directories:
cd ~/asf/svn-r9423
mkdir -p release/tar_filelist release/tar
* If you have never copied the .rpmmacros and .rpmrc files to your
home directory, then do so now, otherwise skip to step 7:
cd ~/asf/svn-r9423/release/rpmbuild
cp dot.rpmmacros ~/.rpmmacros
cp dot.rpmrc ~/.rpmrc
* Edit ~/.rpmmacros to update the top directory for your build's rpmbuild
parent directory, i.e. the 'release' folder. Find the %_topdir line and
edit as follows:
%_topdir %(echo $HOME)/asf/svn-r9423/release
* Check out a copy of the release:
cd ~/asf/svn-r9423
svn export svn+ssh://svn/svn/asf_tools/tags/mapready_v2-0-8 asf_tools
* Make sure the "References" section in the end of the asf_convert_gui.txt
file has been removed, including the 'Visible Links' that occur there.
In the ~/asf/svn-r9423/asf_tools/src/asf_convert_gui folder, edit the
asf_convert_gui.txt file as follows (if they exist):
REMOVE The following (typical set of) lines:
References
Visible links
1. file:///tmp/html-tR2820#overview
2. file:///tmp/html-tR2820#general-tab
3. file:///tmp/html-tR2820#import-options
4. file:///tmp/html-tR2820#polarimetry-options
5. file:///tmp/html-tR2820#dem
6. file:///tmp/html-tR2820#geocode
7. file:///tmp/html-tR2820#export
8. file:///tmp/html-tR2820#files
9. file:///tmp/html-tR2820#execute
10. file:///tmp/html-tR2820#AEN284
11. file:///tmp/html-tR2820#caveats
12. file:///tmp/html-tR2820#contacting-us
13. mailto:[email protected]
* Make sure DEBUG_BUILD is not set to any particular debug level:
unset DEBUG_BUILD
* If you want to meddle with what the package will include you'll need to
edit ~/asf/svn-r9423/asf_tools/make_support/master_program_list. That is
where all the tools to be compiled are listed with other tools that they
depend on. There's also a CATEGORIES category in the master_program_list.
You can make special groupings of tools in CATEGORIES section (eg 'mapready'
which includes asf_mapready, mapready, asf_export, asf_import, etc.).
NOTE: In general, you should not have to edit the master_program_list.
** KLUDGE #2 **
a. Edit ~/asf/svn-r9423/asf_tools/Makefile.in, eliminate the following
lines from the MAPREADY_MODULES list:
src/ardop \
src/asf_gamma_import \
src/asf_polsarpro_import \
src/asf_airsar_import \
src/llh2ls \
src/gr2sr \
src/convert2vector \
src/convert2vector_gui \
b. Change the following line in Makefile.in to include the hard coded
svn revision number. At the time of writing these instructions,
this line occurs near line 228 (after deleting the items above).
change:
SET_SVN_REV_H = echo "\#define SVN_REV \"`svn info|grep Revision|cut -c11-`\"">include/svn_rev.h
to
SET_SVN_REV_H = echo "\#define SVN_REV \"9423\"">include/svn_rev.h
c. The "stp" "ap" "req" "c2v", "jpl", "create_thumbs", "data_qc",
and "oldtools" targets, and all associated build instructions,
should all be deleted from Makefile.in
d. Update the "all" target to only build "mapready".
e. Fix the "clean" target near the end of the file, to only include
MAPREADY_MODULES, i.e., delete the STP_MODULES and AP_MODULES, etc.
** KLUDGE #3 **
Edit ~/asf/svn-r9423/asf_tools/src/asf_convert_gui/Makefile, and change
the default target to include "doc. This should amount to uncommenting
line 138, and commenting out line 139 in the Unix section of the make file
vi ~/asf/svn-r9423/asf_tools/src/asf_convert_gui/Makefile
* Create the source.mapready_package file in ~/asf/svn-r9423/releast/autotar
(automatically by makemake if you followed the directory structure
instructions listed here):
cd ~/asf/svn-r9423/asf_tools/make_support
make
./makemake
rm -f makemake ../Makefile.old
** KLUDGE #4 **
Add missing tools to the source.mapready_package file:
cd ~/asf/svn-r9423/release/autotar
Edit release/autotar/source.mapready_package, adding these items:
src/libasf_insar
external
src/meta2envi
src/meta2xml
src/resample
src/fill_holes
src/to_sr
src/deskew
src/shift_geolocation
src/trim
src/proj2proj
src/smooth
src/farcorr
src/asf_calpol
src/fftMatch
src/flip
src/analyze_yaw
src/write_ppf
src/brs2jpg
src/populate_meta_field
src/sample_plugin
src/adjust_bands
src/diffimage
src/diffmeta
src/asf_kml_overlay
src/asf_fgdc_meta
src/asf_test
* Run the autotar script:
cd ~/asf/svn-r9423/release/autotar
./tarfile src ~/asf/svn-r9423 mapready_package
* Run the rpmprep script (from autotar folder):
./rpmprep mapready_package asf_mapready
* Copy an older .spec file to the new one, then edit the new .spec
file in to use the correct version and to add a brief version
history comment (towards the end of the file):
cd ~/asf/svn-r9423/release/rpmbuild
cp <old .spec file> asf_mapready-2.4.0-1.spec
vi asf_mapready-2.4.0-1.spec
* Save the new .spec file in the repository:
svn add asf_mapready-2.4.0-1.spec
svn ci asf_mapready-2.4.0-1.spec
* a) If you have not already added the secret and public gpg keys
to your ~/.gnupg folder, then do so now or the rpm build will
not sign the rpms. Note that you CAN sign the rpms after they
have been created with "rpm --addsign <rpm file name>". Note that
the first step below is unnecessary if you already have a .gnupg
folder in your home directory:
mkdir ~/.gnupg
cp dot.gnupg* ~/.gnupg
cd ~/.gnupg
gunzip *
tar xvf *
b) If the machine that you are using has not had the public key
imported to the rpm public keys database yet, you will not be
able to check your rpms to see if they were signed properly.
Import the public key into the rpm public keys database as
shown below (you must have root access). Still in the rpmbuild
folder ...do the following:
cd ~/asf/svn-r9423/release/rpmbuild/public_key
sudo rpm -import asf_tools-pubkey.asc
* Build and check the rpm:
cd ~/asf/svn-r9423/release/rpmbuild
rpmbuild -ba --sign asf_mapready-2.4.0-1.spec
<password is 'bob'>
rpm -K RPMS/asf_mapready-2.4.0-1.i386.rpm
After the "rpm -K" command, you should see an 'OK' statement similar
to the one below that indicates the rpm was properly signed:
asf_mapready-2.4.0-1.i386.rpm: (sha1) dsa sha1 md5 gpg OK
IMPORTANT: If you get a response that says "OK" but does NOT have "gpg"
in the list (see above), then the rpm is NOT signed! Check your
~/.rpmmacros file to make sure no-sign is not set and that lines similar
to the following do exist, otherwise no signing will take place:
# RPM Signing stuff
%_signature gpg
%_gpg_path ~/.gnupg
%_gpgbin /usr/bin/gpg
%_gpg_name ASF User Tool Development
These lines should already be in the .rpmmacros file. If they are not,
then use Subversion to check out fresh copies rather than enter them
by hand (just in case changes have taken place.)
If you get a response that includes the words "NOT OK", then it usually
means the ASCII public key has not been imported with "rpm -import"
yet.
* Create tarballs of the rpms (the binary rpm will also contain the
README_rpm.txt file from ~/asf/svn-r9423/asf_tools folder):
cd ~/asf/svn-r9423/release/rpmbuild
./tarrpms asf_mapready mapready
* Put the built files on dq (still in ~/asf/svn-r9423/release/rpmbuild):
mkdir /stor/dq/release_builds/mapready/v2.4.0
cp dist/* /stor/dq/release_builds/mapready/v2.4.0
chmod 775 /stor/dq/release_builds/mapready/v2.4.0
chmod 664 /stor/dq/release_builds/mapready/v2.4.0/*
chgrp dq /stor/dq/release_builds/mapready/v2.4.0
chgrp dq /stor/dq/release_builds/mapready/v2.4.0/*
**OPTIONAL**
'Da Man' likes to finish up by doing this:
mv ~/asf/svn-r9423 ~/asf/mapready-v2.4.0
MapReady v2.x Windows Release Build Procedure:
----------------------------------------------
* Notes:
- The installer package is now called "mapreadyPackageInstall<VV>.nsi"
where <VV> is the version number: e.g., "mapreadyPackageInstall21.nsi"
- You must have MSys, MinGW, Cygwin and the Nullsoft installer system
installed on the build machine for this build step.
* Make sure DEBUG_BUILD is not set to any particular debug level:
unset DEBUG_BUILD
* Go to the UTD Tools Wiki and follow the instructions for preparing
the tools to be built with MinGW:
http://wiki/asf/MinGW
* Once you've completed the MinGW preparation steps, then build the ASF tools:
cd <path>/asf_tools
make clean
make
* Optional: We are currently not distributing akdem_grab, but if you want to
distribute it with the Windows build, then you will have to build akdem_grab
manually:
1) From asf_tools directory:
cd prototype/src/usgs_seamless
make
The Makefile should copy akdem_grab to ../../../bin automatically.
If "make" fails because of an error in osl/socket.cpp (it did for me)
then you probably need to do this:
vi ../osl/socket.cpp
--> comment out line 35: typedef int socklen_t;
2) In the NSIS script, find the akdem_grab.exe line and un-comment it out
so the file will be included. Change this:
;File "${ASF_BINS_LOC}\akdem_grab.exe
to this by removing the leading ';' character:
File "${ASF_BINS_LOC}\akdem_grab.exe
* Make the help files:
1) From a CYGWIN window (important!), not a MSys/MinGW window, build the MapReady
htmlhelp.chm manually and get it to the proper location.
From the asf_tools directory:
cd src/asf_convert_gui
make htmlhelp.chm
2) From a MSYS/MINGW window (important!), not a CygWin window, build the mapready
GUI:
make
* Edit
<path>/release/trunk/windows_installer/convert_package/mapreadyPackageInstall21.nsi
and update the locations of the tool binaries and the cygwin
binaries directories. Look for the ASF_BINS_LOC and CYGWIN_BINS_LOC
definitions respectively (although the CygWin stuff shouldn't matter now.)
* Build the Windows self-installing executable:
a) In a Windows file manager window, right click on the script
that you edited in the previous step and select 'Compile NSIS script'
b) -deprecated- (The MinGW library is now statically linked to the tools)
The installer is going to grab the cygwin1.dll file from
../support/cygwin (along with a bunch of other dlls). You
must test the self-installer on a Windows machine that does
NOT have Cygwin installed on to verify that the cygwin1.dll
file from this folder works with our code. If not, then you
should replace this cygwin1.dll file with the one from your
Cygwin installation (c:/cygwin/bin/cygwin1.dll) and try
again. Ideally, you would also test the installer on a
machine WITH Cygwin installed as well.
* Create a zip and tarball of the generated binary (use Winzip, 7zip, or unix)
Currently we are using the naming scheme:
<package>-<V>.<V>.<V>-<OS>.<compression type>
e.g.
mapready-2.1.8-win32.zip
mapready-2.1.8-win32.tar.gz
* Put these files with the already packaged Linux and Source distributions to
our favorite 'point release' locations using WinSCP and your favorite web
browser. Then DQ can test this stuff!
On Data Quality's machine at
dq.asf.alaska.edu:/stor/dq/release_builds/mapready/v2.1.8
And on our Wiki page
http://wiki/asf/UTD_tools_page
SAR TRAINING PROCESSOR (STP) SOURCE AND RPM RELEASE PROCEDURE
-------------------------------------------------------------
* Check out the branched or trunk code to be released to a directory
(e.g.~/asf/asf_tools). NOTE: You will perform an 'svn export' to obtain
a copy of the tools for building the release later in this procedure.
Trunk:
> svn co svn+ssh://svn/svn/asf_tools/trunk asf_tools
Or Branch:
> svn co svn+ssh://svn/svn/asf_tools/branches/stp_v?-?-x asf_tools
* Update STP_VERSION in include/asf_version.h
* Tag the repository:
Trunk:
> svn copy svn+ssh://svn/svn/asf_tools/trunk \
svn+ssh://svn/svn/asf_tools/tags/stp_v?-?-?
Or Branch:
> svn copy svn+ssh://svn/svn/asf_tools/branches/stp_v?-?-x \
svn+ssh://svn/svn/asf_tools/tags/stp_v?-?-?
* Create a clean directory where you will produce the build (etc),
for example:
> mkdir ~/asf/svn-r<REVISION#>
* Export a copy of the release in the work directory:
> cd ~/asf/svn-r<REVISION#>
> svn export svn+ssh://svn/svn/asf_tools/tags/stp_v?-?-? asf_tools
* Check out autotar and rpmbuild into the work directory.
> cd ~/asf/svn-r<REVISION#>
> svn co svn+ssh://svn/svn/release/trunk/autotar release/autotar
> svn co svn+ssh://svn/svn/release/trunk/rpmbuild release/rpmbuild
* Make working directories for autotar:
> cd ~/asf/svn-r<REVISION#>
> mkdir -p release/tar_filelist
> mkdir -p release/tar
* Create the source.stp_package file:
> cd ~/asf/svn-r<REVISION#>/asf_tools/make_support
> make
> ./makemake
* Update Makefile.in
-> Update the "default" target to build stp (instead of mapready)
-> Update the "all" target to just include stp.
-> Update the "clean" target to just include STP_MODULES
-> Hardcode the SVN revision number
Change:
SET_SVN_REV_H = echo "\#define SVN_REV \"`svn info|grep Revision|cut -c11-`\"">include/svn_rev.h
to:
SET_SVN_REV_H = echo "\#define SVN_REV \"<REVISION#>\"">include/svn_rev.h
* Update source.stp_package, adding:
src/metadata
src/metadata_tui
src/libasf_terrcorr
src/libasf_insar
src/stp
* Run the autotar script:
> cd ~/asf/svn-r<REVISION#>/release/autotar
> ./tarfile src ~/asf/svn-r<REVISION#> stp_package
* Run the rpmprep script:
> cd ~/asf/svn-r<REVISION#>/release/autotar
> ./rpmprep stp_package stp
* Copy an older .spec file to the new one:
> cd ~/asf/svn-r<REVISION#>/release/rpmbuild
> cp <old .spec file> stp-?.?.?-1.spec
* Edit the new .spec file (stp-?.?.?-1.spec) to use the correct version.
The version number to be edited should be on line 2:
Text chunk:
Summary: ASF SAR Training Processor
Name: stp
Version: ?.?.?
Release: 1
License: BSD
* If you have never copied the .rpmmacros and .rpmrc files to your
home directory, then do so now:
> cd ~/asf/svn-r<REVISION#>/release/rpmbuild
> cp dot.rpmmacros ~/.rpmmacros
> cp dot.rpmrc ~/.rpmrc
* Edit ~/.rpmmacros to update the top directory to the 'release' folder.
Find the %_topdir line and edit as follows:
%_topdir %(echo $HOME)/asf/svn-r<REVISION#>/release
* Make sure DEBUG_BUILD is not set to any particular debug level:
> unset DEBUG_BUILD
* Build the rpm:
> cd ~/asf/svn-r<REVISION#>/release/rpmbuild
> rpmbuild -ba stp-?.?.?-1.spec
* Collect rpm & source tarball for Linux & Win32 distribution using the
tarrpms script. This should put all the *.tar.gz & *.zip files you need
in ~/asf/svn-r<REVISION#>/release/rpmbuild/Source and
~/asf/svn-r<REVISION#>/release/rpmbuild/RPMS:
> cd ~/asf/svn-r<REVISION#>/release/rpmbuild
> ./tarrpms stp stp
* Copy all the packages to our favorite archive location. The files you're
sending should look something like this:
stp-?.?.?-rpm.tar.gz
stp-?.?.?-rpm.zip
stp-?.?.?-src.tar.gz
stp-?.?.?-src.zip
> cd ~/asf/svn-r<REVISION#>/release/rpmbuild
> scp ./dist/* dq:/stor/dq/release_builds/stp/?.?.?
* Let Data Quality know where stuff is for validation.
DQ Lead: Wade Albright ([email protected], x1985)
Master tester: Charley Slater ([email protected], x5633)
* If it's been validated let the web person know to deliver it to the web
Jeannine Haney <[email protected], x5793)
* Rejoice! For this task is done!
SAR TRAINING PROCESSOR (STP) WINDOWS RELEASE PROCEDURE
------------------------------------------------------
NOTE: it is assumed that you have already tagged the repository in preparation
for this release you are about to do. The tagging procedure takes place
in the first few steps source & rpm release procedure in case you'd like
a reference.
* Make sure you've got these programs installed:
* Cygwin
* Nullsoft installer system
* Tortoise SVN (or the svn that comes with cygwin,
but only use one of these svns for your checkins, checkouts, etc,
because they don't play very well together)
* Open a Cygwin terminal
* Check out the tagged version of the stp for release.
> svn export svn+ssh://svn/svn/asf_tools/tags/stp_v?-?-? asf_tools
* If you've got another code tree that has already been built, and you're sure
that the external libraries you have built already are the same as the
tagged version you're about to check out, you can copy that into your
tagged tree.
> cp -r prebuilt/asf_tools/external tagged/asf_tools/.
* Make sure DEBUG_BUILD is not set to any particular debug level:
> unset DEBUG_BUILD
* Build the ASF tools:
cd <path>/asf_tools
make clean
make
* Edit
<path>/release/trunk/windows_installer/stp_package/stpPackageInstall<??>.nsi
where <??> is the version number (e.g. stpPackageInstall10.nsi) and update
the locations of the tool binaries and the cygwin binaries directories. Look
for the ASF_BINS_LOC and CYGWIN_BINS_LOC definitions respectively.
* Build the Windows self-installing executable:
a) In a Windows file manager window, right click on the script
that you edited in the previous step and select 'Compile NSIS script'
b) The installer is going to grab the cygwin1.dll file from
../support/cygwin (along with a bunch of other dlls). You
must test the self-installer on a Windows machine that does
NOT have Cygwin installed on to verify that the cygwin1.dll
file from this folder works with our code. If not, then you
should replace this cygwin1.dll file with the one from your
Cygwin installation (c:/cygwin/bin/cygwin1.dll) and try
again. Ideally, you would also test the installer on a
machine WITH Cygwin installed as well.
* Create a tarball and zip of the generated binary. In Unix-land you can use
tar czf for the tar.gz and the zip command for the .zip. On windows Winzip
can take care of the .zip or 7zip can do both.
The file to package should be at
<path>\release\windows_installer\stp_package\STP_Setup.exe
The tarballed and zipped file names should be formatted as follows where
the ?s are version numbers:
stp-?.?.?-win32.tar.gz
stp-?.?.?-win32.zip
* Copy the packages (winSCP or FileZilla) to our archive location, currently:
dq:/stor/dq/release_builds/stp/?.?.?
* Let Data Quality know where stuff is for validation.
DQ Lead: Wade Albright ([email protected], x1985)
Master tester: Charley Slater ([email protected], x5633)
* If it's been validated let the web person know to deliver it to the web.
Jeannine Haney <[email protected], x5793)
* Rejoice! For this task is done!
CONVERT TO VECTOR SOURCE AND RPM RELEASE PROCEDURE
-------------------------------------------------------------
* It is suggested that you do the build on dq.
* Update C2V_VERSION and C2V_VERSION_STRING in include/asf_version.h
* Do a global-replace in this file of "8-8-8" with the actual version
number of the build. Do not save/check-in the document with that
replacement!
* Do a global-replace in this file of "8.8.8" with the actual version
number of the build. Do not save/check-in the document with that
replacement!
* Update the version history document to reflect the version being build,
and the current date.
* Tag the repository:
Trunk:
> svn copy svn+ssh://svn/svn/asf_tools/trunk
svn+ssh://svn/svn/asf_tools/tags/c2v_v8-8-8
Or Branch (branch name varies...)
> svn copy svn+ssh://svn/svn/asf_tools/branches/c2v_v?-?-x \
svn+ssh://svn/svn/asf_tools/tags/c2v_v8-8-8
* Do a global-replace in this file of "8888" with the svn revision number
of the copy. Do not save/check-in the document with that replacement!
* Create a clean directory where you will produce the build (etc),
for example:
> mkdir ~/asf/svn-r8888
* Export a copy of the release in the work directory:
> cd ~/asf/svn-r8888
> svn export svn+ssh://svn/svn/asf_tools/tags/c2v_v8-8-8 asf_tools
* Check out autotar and rpmbuild into the work directory.
> cd ~/asf/svn-r8888
> svn co svn+ssh://svn/svn/release/trunk/autotar release/autotar
> svn co svn+ssh://svn/svn/release/trunk/rpmbuild release/rpmbuild
* Make working directories for autotar:
> cd ~/asf/svn-r8888
> mkdir -p release/tar_filelist
> mkdir -p release/tar
* Create svn_rev.h:
cd ~/asf/svn-r8888/asf_tools/include
echo "#define SVN_REV \"8888\"" > svn_rev.h
* Fix up Makefile.in:
a. Change the following line in the Makefile.in so that the svn revision
number is hard coded.
change:
SET_SVN_REV_H = echo "\#define SVN_REV \"`svn info|grep Revision|cut -c11-`\"">include/svn_rev.h
to:
SET_SVN_REV_H = echo "\#define SVN_REV \"8888\"">include/svn_rev.h
b. The "stp", "ap", "req", "mapready", "jpl", "create_thumbs", "data_qc",
and "oldtools" targets, and all associated build instructions,
should all be deleted from Makefile.in
c. Update the "all" and "default" targets to only build "c2v".
d. Fix the "clean" target near the end of the file, to only include C2V_MODULES,
i.e., delete the STP_MODULES and AP_MODULES, etc.
* Clean out the mapready, etc documentation that is not needed in the c2v package:
> cd ~/asf/svn-r8888/asf_tools/doc
> rm arc* cre* dem* map* rep* SAR* stp*
* Create the source.c2v_package file:
> cd ~/asf/svn-r8888/asf_tools/make_support
> make
> ./makemake
> rm -f makemake ../Makefile.old
* Update source.c2v_package, adding:
src/libasf_sar
src/libasf_geocode
src/libasf_export
src/convert2vector_gui
doc
* Run the autotar script:
> cd ~/asf/svn-r8888/release/autotar
> ./tarfile src ~/asf/svn-r8888 c2v_package
* Run the rpmprep script:
> cd ~/asf/svn-r8888/release/autotar
> ./rpmprep c2v_package c2v
* Copy an older .spec file to the new one:
> cd ~/asf/svn-r8888/release/rpmbuild
> mv c2v-1.0.0-1.spec c2v-8.8.8-1.spec
* Edit the new .spec file (c2v-1.0.0-1.i386.spec) to use the correct version.
The version number to be edited should be on line 2:
Text chunk:
Summary: ASF Convert To Vector
Name: c2v
Version: 8.8.8
Release: 1
License: BSD
* If you have never copied the .rpmmacros and .rpmrc files to your
home directory, then do so now:
> cd ~/asf/svn-r8888/release/rpmbuild
> cp dot.rpmmacros ~/.rpmmacros
> cp dot.rpmrc ~/.rpmrc
* Edit ~/.rpmmacros to update the top directory to the 'release' folder.
Find the %_topdir line and edit as follows:
%_topdir %(echo $HOME)/asf/svn-r8888/release
* Make sure DEBUG_BUILD is not set to any particular debug level:
> unset DEBUG_BUILD
* Build the rpm:
> cd ~/asf/svn-r8888/release/rpmbuild
> rpmbuild -ba --sign c2v-8.8.8-1.spec
The password is 'bob'
Check that the rpm was properly signed:
> rpm -K RPMS/asf_mapready-2.4.0-1.i386.rpm
After this, you should see an 'OK' statement similar to the one below:
asf_mapready-2.4.0-1.i386.rpm: (sha1) dsa sha1 md5 gpg OK
**--> Ensure that 'gpg' is present in the list. <--**
* Collect rpm & source tarball for Linux & Win32 distribution using the
tarrpms script. This should put all the *.tar.gz & *.zip files you need
in ~/asf/svn-r8888/release/rpmbuild/Source and
~/asf/svn-r8888/release/rpmbuild/RPMS:
> cd ~/asf/svn-r8888/release/rpmbuild
> ./tarrpms c2v convert_to_vector
* Copy all the packages to our favorite archive location. The files you're
sending should look something like this:
convert_to_vector-8.8.8-rpm.tar.gz
convert_to_vector-8.8.8-rpm.zip
convert_to_vector-8.8.8-src.tar.gz
convert_to_vector-8.8.8-src.zip
Also, make sure permissions are good.
> cd ~/asf/svn-r8888/release/rpmbuild
> mkdir /stor/dq/release_builds/c2v/8.8.8
> cp dist/* /stor/dq/release_builds/c2v/8.8.8
> chmod 775 /stor/dq/release_builds/c2v/8.8.8
> chmod 664 /stor/dq/release_builds/c2v/8.8.8/*
> chgrp dq /stor/dq/release_builds/c2v/8.8.8
> chgrp dq /stor/dq/release_builds/c2v/8.8.8/*
* Upload the files to winfs:
http://winfs/utdtools/default.aspx
They should be uploaded to the "Convert To Vector" section.
You only need to upload the .tar.gz files for Linux/Source, and the .zip
file for windows.
* Update this page:
http://wiki/asf/C2V_releases
including writing a "release notes" entry in the wiki. Use prior
versions as a template.
JPL Mosaic Suite RPM Build Procedure:
-------------------------------------
Note: The following example assumes subversion revision 8072, jpl version
of 1.0.0, and a work folder at ~/asf.
* Check out the code to be released (if not already), i.e. branched version
or the trunk, i.e. to ~/asf/asf_tools. NOTE: You will perform an
'svn export' to obtain a copy of the tools for building the release
later in this procedure.
* Update the version number(s) in ~/asf/asf_tools/include/asf_version.h
and commit the change to the subversion repository. Example:
a) JPL_VERSION_STRING "1.0.0-dev"
changes to
JPL_VERSION_STRING "1.0.0"
b) svn ci
* Tag the repository. Example of tagging the trunk:
svn copy svn+ssh://svn/svn/asf_tools/trunk \
svn+ssh://svn/svn/asf_tools/tags/jplmosaicsuite_v1-0-0
* Create a clean directory where you will produce the build (etc),
for example (change the revision number to the one that you have
checked out):
mkdir ~/asf/jpl-r8072
* Check out autotar and rpmbuild into this work directory. Example:
cd ~/asf/jpl-r8072
svn co svn+ssh://svn/svn/release/trunk/autotar release/autotar
svn co svn+ssh://svn/svn/release/trunk/rpmbuild release/rpmbuild
* Export a copy of the release:
cd ~/asf/jpl-r8072
svn export svn+ssh://svn/svn/asf_tools/tags/jplmosaicsuite_v1-0-0 asf_tools
* Use your favorite editor to edit ~/asf/jpl-r8072/asf_tools/Makefile.in
a) Hard code the setting of the SVN revision number:
change (around line 235):
SET_SVN_REV_H = echo "\#define SVN_REV \"`svn info|grep Revision|cut -c11-`\"">include/svn_rev.h
to:
SET_SVN_REV_H = echo "\#define SVN_REV \"8072\"">include/svn_rev.h
b) Change the default target to build the jpl target (around line 238).
default: jpl
* Create the source.* files in ~/asf/jpl-r8072/release/autotar
(automatically by makemake if you followed the directory structure
instructions listed here):
cd ~/asf/jpl-r8072/asf_tools/make_support
make
./makemake
rm makemake
* Run the autotar script:
cd ~/asf/jpl-r8072/release/autotar
./tarfile src ~/asf/jpl-r8072 -noext jpl
* Run the rpmprep script (from autotar folder):
./rpmprep jpl jplmosaicsuite
* Copy an older .spec file to the new one, then edit the new .spec
file in to use the correct version:
cd ~/asf/jpl-r8072/release/rpmbuild
cp <old .spec file> jplmosaicsuite-1.0.0-1.i386.spec
vi jplmosaicsuite-1.0.0-1.i386.spec
* Create RPM keys (if not already done)
a) If you have not already added the secret and public gpg keys
to your ~/.gnupg folder, then do so now or the rpm build will
not sign the rpms. Note that you CAN sign the rpms after they
have been created with "rpm --addsign <rpm file name>". Note that
the first step below is unnessary if you already have a .gnupg
folder in your home directory:
cd ~/asf/jpl-r8072/release/rpmbuild
mkdir ~/.gnupg
cp dot.gnupg* ~/.gnupg
cd ~/.gnupg
gunzip *
tar xvf *
b) If the machine that you are using has not had the public key
imported to the rpm public keys database yet, you will not be
able to check your rpms to see if they were signed properly.
Import the public key into the rpm public keys database as
shown below (you must have root access). Still in the rpmbuild
folder ...do the following:
cd ~/asf/jpl-r8072/release/rpmbuild/public_key
sudo rpm -import asf_tools-pubkey.asc
* If you have never copied the .rpmmacros and .rpmrc files to your
home directory, then do so now, otherwise skip to step 7:
cd ~/asf/jpl-r8072/release/rpmbuild
cp dot.rpmmacros ~/.rpmmacros
cp dot.rpmrc ~/.rpmrc
* Edit ~/.rpmmacros to update the top directory for your build's rpmbuild
parent directory, i.e. the 'release' folder. Find the %_topdir line and
edit as follows:
%_topdir %(echo $HOME)/asf/jpl-r8072/release
* Clean up any old rpm builds if necessary:
cd ~/asf/jpl-r8072/release/rpmbuild
rm -rf BUILD/* RPMS/* SRPMS/*
* Make sure DEBUG_BUILD is not set to any particular debug level:
unset DEBUG_BUILD
* Build and check the rpm:
cd ~/asf/jpl-r8072/release/rpmbuild
rpmbuild -ba --sign jplmosaicsuite-1.0.0-1.i386.spec
<password is 'bob'>
OPTIONAL: Check the results of the rpm build:
rpm -K RPMS/jplmosaicsuite-1.0.0-1.i386.rpm
After the "rpm -K" command, you should see an 'OK' statement similar
to the one below that indicates the rpm was properly signed: