1 | Introduction
|
---|
2 | ------------
|
---|
3 |
|
---|
4 | This document contains information about creating RPM and ZIP distribution
|
---|
5 | archives. It is inteneded to be carefully studied by packagers.
|
---|
6 |
|
---|
7 |
|
---|
8 | Main Routine
|
---|
9 | ------------
|
---|
10 |
|
---|
11 | 1. Update the version number in the file "/include/odinbuild.h".
|
---|
12 |
|
---|
13 | 2. Update the "/changelog" file by adding a brief of all major changes to
|
---|
14 | the TOP of it using the formatting of the previous block of changes
|
---|
15 | in this file as a template.
|
---|
16 |
|
---|
17 | When adding new entries, avoid too many technical details. Read what you
|
---|
18 | write from the end user's perspective. Do NOT put all commit messages in
|
---|
19 | there, concentrate on essential changes and rephrase descriptions to be
|
---|
20 | short and simple (1-2 lines per change entry). Remember that the changelog
|
---|
21 | is NOT the documentation. The Readme file is a better place to describe
|
---|
22 | essential differences in detail.
|
---|
23 |
|
---|
24 | 3. Update the "/doc/Readme.txt" file by describing important changes in
|
---|
25 | detail, especially those that require certain actions from the end users,
|
---|
26 | such as installation or configuration instructions and usage pattern
|
---|
27 | changes.
|
---|
28 |
|
---|
29 | 4. Perform clean builds of the software by using the script "/makeall.cmd".
|
---|
30 |
|
---|
31 | 5. Create ZIP packages according to the instructions below.
|
---|
32 |
|
---|
33 | 6. Create RPM packages according to the instructions below (this step needs
|
---|
34 | to be done after the ZIP step).
|
---|
35 |
|
---|
36 | 7. Commit the changed files (i.e. the changelog, Readmes, .spec files etc.) to
|
---|
37 | the project repository as a single change set with a commit message like:
|
---|
38 |
|
---|
39 | Release X.Y.Z.
|
---|
40 |
|
---|
41 | where "X.Y.Z-N" is the version number (including the RPM release number, see
|
---|
42 | below) that you just released.
|
---|
43 |
|
---|
44 | 8. Tag the release by issuing:
|
---|
45 |
|
---|
46 | svn copy http://svn.netlabs.org/repos/odin32/trunk \
|
---|
47 | http://svn.netlabs.org/repos/odin32/tags/X.Y.Z \
|
---|
48 | -m "Tagged release X.Y.Z."
|
---|
49 |
|
---|
50 | 9. If you later discover that the RPM packages are broken, the sequence of
|
---|
51 | actions is as follows:
|
---|
52 |
|
---|
53 | - Fix the RPM issues.
|
---|
54 | - Re-release RPMs according to the "Creating RPM Packages" section (this
|
---|
55 | will increase the RPM release number).
|
---|
56 | - Commit the changes to the .spec file using the following commit message:
|
---|
57 | "Spec for release X.Y.Z-N." (where N is the RPM release number).
|
---|
58 |
|
---|
59 | Note that the RPM re-release step doesn't involve rebuilding or ZIP
|
---|
60 | re-generation.
|
---|
61 |
|
---|
62 |
|
---|
63 | Creating ZIP Packages
|
---|
64 | ---------------------
|
---|
65 |
|
---|
66 | 1. Run the "CreateZIPs.sh" script. A number of ZIP files will be created
|
---|
67 | in the current directory.
|
---|
68 |
|
---|
69 | 2. Check these files by attemting to perform an install from them.
|
---|
70 |
|
---|
71 | 3. If everything is fine, upload the files to the ZIP repository:
|
---|
72 |
|
---|
73 | ftp://ftp.netlabs.org/pub/odin/
|
---|
74 |
|
---|
75 |
|
---|
76 | Creating RPM Packages
|
---|
77 | ---------------------
|
---|
78 |
|
---|
79 | 1. Run the "UpdateRPMSpec.sh" script to automatically update fields in the
|
---|
80 | "odin.spec" file such as the version number. The script will also update
|
---|
81 | the RPM release number. This number is separate from the version number
|
---|
82 | because it represents the version of the RPM package itself.
|
---|
83 |
|
---|
84 | The RPM release number allows to have several versions of the RPM package for
|
---|
85 | the same version of the software. This may be necessary if the previous RPM
|
---|
86 | package contains errors (missing files, incorrect installation scripts, etc.)
|
---|
87 | or if there is a need to add a hot fix to the sotfware without waiting until
|
---|
88 | the new version is released. The RPM release number starts from 1 with each
|
---|
89 | new version of the software and increases by one with each new RPM release of
|
---|
90 | that verison. It is appended to the version string after a dash: 'X.Y.Z-N'.
|
---|
91 |
|
---|
92 | 2. Carefully inspect changes made by "UpdateRPMSpec.sh" to make sure they are
|
---|
93 | correct.
|
---|
94 |
|
---|
95 | 3. Add a new changelog paragraph in the %changelog section of the .spec file.
|
---|
96 | "UpdateRPMSpec.sh" will create a template of this paragraph including the
|
---|
97 | header with the full version number, release date and placeholders for the
|
---|
98 | packager's name and email. Replace these placeholders with your real name
|
---|
99 | and email (or delete them) and paste the relevant block from the "/changelog"
|
---|
100 | file after the header. Use the existing changelog paragraph in .spec to see
|
---|
101 | how it should be formatted.
|
---|
102 |
|
---|
103 | 4. When the .spec file is done, copy "odin-XYZ.zip" to the
|
---|
104 | "$HOME/rpmbuild/SOURCES" directory and perform the following command to
|
---|
105 | actually build the RPM packages:
|
---|
106 |
|
---|
107 | rpmbuild -ba odin.spec
|
---|
108 |
|
---|
109 | In the default RPM setup, the resulting .rpm files will be created in the
|
---|
110 | "$HOME/rpmbuild/RPMS/i386" directory.
|
---|
111 |
|
---|
112 | 5. Try to install them all using the following command:
|
---|
113 |
|
---|
114 | rpm -i <package-XYZ>.rpm
|
---|
115 |
|
---|
116 | 6. If all goes right, upload the .rpm files to the experimental RPM repository:
|
---|
117 |
|
---|
118 | davs://user@webdav.netlabs.org/rpm/experimental/00/i386/
|
---|
119 |
|
---|
120 | (in a subdirectory corresponding to the package architecture). When synced,
|
---|
121 | test them with the following command:
|
---|
122 |
|
---|
123 | yum install <package>
|
---|
124 |
|
---|
125 | Don't forget to upload the .src.rpm file to the respecive place, too.
|
---|
126 |
|
---|
127 | If it goes right as well, finally upload to the release repository:
|
---|
128 |
|
---|
129 | davs://user@webdav.netlabs.org/rpm/release/00/i386/
|
---|
130 |
|
---|
131 |
|
---|
132 | EOF
|
---|
133 |
|
---|