Fixed string format vulnerability in client entry handling.
[silc.git] / README.DIST
1 How to create SILC distributions
2 ================================
3
4 This document describes how to prepare SILC distributions in SILC source
5 tree and how to package distributions for releasing.  This also defines
6 the procedure what one should do when distribution is created for
7 releasing.
8
9 The distdir/ directory contains all distributions that can be created
10 from the source tree.  The distdir/default cannot be packaged, it must
11 be used only for development.
12
13
14 Preparing distribution
15 ======================
16
17 To prepare a specific distribution with specific version for packaging,
18 give command:
19
20         autodist <name> <version>
21
22 Where the <name> is the distribution name.  It is one of the distributions
23 that was defined in distdir/ directory.  The <version> is the version of
24 the distribution that will be prepared.  The version format is
25 major.minor.build, for example 0.9.10.  Example:
26
27         autodist client 0.9.15
28
29 This prepares 'client' distribution of version 0.9.15.  The package will
30 have the version 0.9.15 automatically.
31
32 NOTE: Those distribution that have RPM spec files you should specify the
33 RPM release version to autodist also by doing the following:
34
35         autodist toolkit 1.1.2 0.fc7
36
37 where the "0.fc7" will become the RPM release version.  If you omit the
38 release version the default currently is "0.fc7".
39
40
41 Creating ChangeLog and Tagging
42 ==============================
43
44 Before packaging the distribution the ChangeLog must be created and the 
45 release must be tagged.  A ready made script for this purpose is the 
46 scripts/release.  It has the following syntax:
47
48         sh scripts/release <previous_tag> <new_tag>
49
50 The tag format is as follows:
51
52         silc.name.version
53
54 Where <name> is the distribution name and <version> is the version of the
55 distribution in following format: major.minor.build, for example 1.1.16.
56 Example:
57
58         silc.server.1.1.6
59
60 When you run the script it also generates the ChangeLog file 
61 automatically.  All the changes between the <previous_tag> and the 
62 <new_tag> from the Git are included in the ChangeLog.  Since the same 
63 repo is used to make packages (client, server and toolkit) the ChangeLog 
64 will usually include changes that are not part of the release you are 
65 making.  You will need to manually remove the commits that are not part 
66 of the distribution you are releasing.
67
68 Later, after the release has been made the tag needs to be pushed to the 
69 public repository.
70
71         git push --tags
72
73
74 Configuring and compiling the distribution
75 ==========================================
76
77 When you prepare the distribution for releasing you should configure the
78 distribution without any specific configuration options, hence just give
79 the command:
80
81         ./configure
82
83 NOTE:  If you have SILC Toolkit installed to your system you must use
84 the following command to configure the distribution, so that the Toolkit
85 from the system is not used:
86
87         PKG_CONFIG=. ./configure
88
89 To compile the distribution, give command:
90
91         make
92
93 If you want you can clear the environment first with make clean command,
94 but this is not necessary.
95
96
97 Packaging the distribution
98 ==========================
99
100 After the distribution is prepared, configured and compiled it can be
101 packaged with the following commands:
102
103         makedist --bzip2
104
105 The 'makedist --bzip2' creates the default 'tar.gz' and 'tar.bz2'
106 distribution.  It also creates the sha256 checksum files automatically.
107
108 NOTE:  Before giving this command, make sure that you do not have any of
109 the tests in the SILC source tree compiled.  If they are the binaries
110 will be included in the distribution which is not allowed.  The tests are
111 always located in the tests/ directory, for example lib/silccore/tests/.
112 The tests are not compiled by default, but if you compiled them by
113 yourself make sure you make clean them before creating the distribution.
114
115 NOTE: Same thing must be assured for tutorial/ sub directory.  Make sure 
116 it is not compiled and does not include any extra files.