| 1 |
==============================================================================
|
| 2 |
# README.sources for debian-reference (Version 2 series) #
|
| 3 |
# Mon Jun 29 14:21:25 UTC 2009 #
|
| 4 |
# Osamu Aoki, osamu at debian dot org #
|
| 5 |
==============================================================================
|
| 6 |
|
| 7 |
I will touch on following topics.
|
| 8 |
|
| 9 |
* Quick guide
|
| 10 |
* Document style
|
| 11 |
* Basics of build process
|
| 12 |
* What is @@@ in asciidoc
|
| 13 |
* What is @-@ in asciidoc and raw XML
|
| 14 |
* Making copy of SVN contents
|
| 15 |
* Updating contents in English XML source
|
| 16 |
* Fixing typo in English XML source
|
| 17 |
* Updating remote data contents
|
| 18 |
* Creating Translation PO for a new language
|
| 19 |
* Updating Translation PO
|
| 20 |
* Updating for new release (squeeze --> squeeze+1)
|
| 21 |
* VCS locations and history
|
| 22 |
|
| 23 |
== Quick guide ==
|
| 24 |
|
| 25 |
Please note that for http://www.debian.org/ web site publishing, XML/PO
|
| 26 |
files are used to build pages. Before committing, please do this.
|
| 27 |
|
| 28 |
* Update from SVN to get the latest source: "svn co" or "svn up"
|
| 29 |
* Fix fuzzy in PO using via poedit GUI etc.
|
| 30 |
* Update XML/PO files.
|
| 31 |
* If updated English ascoodoc: "make xml"
|
| 32 |
* If updated translation PO only: "make po"
|
| 33 |
* Fix fuzzy in PO using via poedit GUI etc.
|
| 34 |
* Generate HTML to check result.
|
| 35 |
* If updated English ascoodoc: "make all"
|
| 36 |
* If updated translation PO only: "make po-test"
|
| 37 |
|
| 38 |
Please note old translated documents are in SGML and its content is very
|
| 39 |
loosely related to current English content. In order to recycle as much
|
| 40 |
old content, I usually use followings:
|
| 41 |
|
| 42 |
* "poedit" to edit debian-reference.??.po file to be updated.
|
| 43 |
* browser to display debian-reference.??.html from sage/lenny package
|
| 44 |
* copy-and-paste to po file (via poedit GUI)
|
| 45 |
* add XML tags as needed
|
| 46 |
|
| 47 |
== Document style ==
|
| 48 |
|
| 49 |
Besides things mentioned in "About this document" in Preface,
|
| 50 |
I used IBM Style Guide (IBM_Style_27Apr09.pdf) from IBM site:
|
| 51 |
URL: http://www.ibm.com/software/ucd/files/IBM_Style_27Apr09.pdf
|
| 52 |
( You may wish to check newer version linked from:
|
| 53 |
URL: http://www.ibm.com/software/ucd/otherresources.html )
|
| 54 |
|
| 55 |
Currently, there is big gap. I will slowly polish this document to be
|
| 56 |
compliant as possible.
|
| 57 |
|
| 58 |
There are exceptions.
|
| 59 |
* I use Latin acronyms: e.g., etc., i.e., read/write
|
| 60 |
* I use lines starting with number
|
| 61 |
|
| 62 |
== Basics of build process ==
|
| 63 |
|
| 64 |
You must have lenny system with following packages installed:
|
| 65 |
* subversion
|
| 66 |
* pbuilder
|
| 67 |
* asciidoc (only if you update English)
|
| 68 |
* libxml2-utils
|
| 69 |
* devscripts
|
| 70 |
* wget
|
| 71 |
* dctrl-tools
|
| 72 |
* Files in debian/control Build-Depends
|
| 73 |
|
| 74 |
Basic flow of build process can be summarized as:
|
| 75 |
|
| 76 |
all the asciidoc/*.txt files and remotely fetched files by wget
|
| 77 |
:(asciidoc @ lenny version) :
|
| 78 |
:(build from asciidoc by :
|
| 79 |
: "make xml" or "make all") :
|
| 80 |
v v
|
| 81 |
>>> debian-reference.raw.xml --> url.ent and other *.ent
|
| 82 |
(source XML) :(build from raw.xml by "make po" or "make po-test")
|
| 83 |
v
|
| 84 |
debian-reference.en.xml --> all English final formats (HTML, text)
|
| 85 |
debian-reference.en.xmlt \ (This removes untranslating part)
|
| 86 |
(XML file) | \ \
|
| 87 |
v \ \
|
| 88 |
debian-reference.pot +--+-> debian-reference.ja.xml
|
| 89 |
(POT file) | / |
|
| 90 |
v / v
|
| 91 |
>>> debian-reference.ja.po all Japanese final formats (HTML, text)
|
| 92 |
(PO file)
|
| 93 |
|
| 94 |
Please note po files are generated from English
|
| 95 |
debian-reference.en.xmlt. This debian-reference.en.xmlt is an XML file
|
| 96 |
very similar to debian-reference.en.xml which isalso XML file.
|
| 97 |
Untranslatable contents in debian-reference.en.xml is replaced by
|
| 98 |
"DUMMY" to reduce clutter in PO file.
|
| 99 |
|
| 100 |
Please note actual build process starts from debian-reference.raw.xml and
|
| 101 |
debian-reference.ja.po files. These are "REAL" source files as far as
|
| 102 |
package build process and www.debian.org web page building process by
|
| 103 |
ddp are concerned.
|
| 104 |
|
| 105 |
Asciidoc format is used as a helper to make debian-reference.raw.xml
|
| 106 |
source with minimum typing. This will be dropped once squeeze is out.
|
| 107 |
After squeeze release, debian-reference.raw.xml will be the source.
|
| 108 |
|
| 109 |
Due to asciidoc conversion logic differences, we must use lenny version
|
| 110 |
of asciidoc for this source. Otherwise you get different output to the
|
| 111 |
raw.xml and break all the po files.
|
| 112 |
|
| 113 |
Please note Makefile has few key parameters which affects build process.
|
| 114 |
|
| 115 |
BUILD_MODE := xml (normal-build-from-raw-xml mode, default)
|
| 116 |
BUILD_MODE := asciidoc (build-from-asciidoc mode, use this via "all" "xml" target in lenny)
|
| 117 |
|
| 118 |
PDIR := something for normal build situation
|
| 119 |
PDIR := ddp-svn for /org/www.debian.org/ddp-svn/trunk/quick-reference
|
| 120 |
|
| 121 |
PUBLISHDIR := build result file location
|
| 122 |
|
| 123 |
LANGALL := language list for all
|
| 124 |
LANGPO := language list for PO based translation
|
| 125 |
LANGSGML := language list for SGML based old translation (calculated)
|
| 126 |
|
| 127 |
Please note following targets:
|
| 128 |
|
| 129 |
make all
|
| 130 |
Update source from asciidoc
|
| 131 |
Results are in $(PUBLISHDIR)
|
| 132 |
Do not require remote connection if you already have done so.
|
| 133 |
|
| 134 |
make xml
|
| 135 |
Create XML/PO source files from asciidoc
|
| 136 |
|
| 137 |
make po-test
|
| 138 |
Results are in $(PUBLISHDIR)
|
| 139 |
Build html etc using current raw.xml and po files
|
| 140 |
|
| 141 |
make po
|
| 142 |
Update PO files from raw.xml
|
| 143 |
|
| 144 |
make publish
|
| 145 |
Used by DDP for www.debian.org
|
| 146 |
Do not require remote connection nor asciidoc
|
| 147 |
|
| 148 |
make html
|
| 149 |
Create html files
|
| 150 |
|
| 151 |
make txt
|
| 152 |
Create txt files
|
| 153 |
|
| 154 |
make css
|
| 155 |
Create css files
|
| 156 |
|
| 157 |
make clean
|
| 158 |
Clean source to make it ready for packaging
|
| 159 |
|
| 160 |
make distclean
|
| 161 |
Clean source to make it ready to be updated remotely
|
| 162 |
|
| 163 |
make update
|
| 164 |
Update source with remote data.
|
| 165 |
|
| 166 |
== What is @@@ in asciidoc ==
|
| 167 |
|
| 168 |
You see quite a bit of @@@ in asciidoc source. That is placed there
|
| 169 |
when idiosyncrasy of asciidoc hit me. Asciidoc to raw.xml conversion
|
| 170 |
result is filtered with sed script bin/replace to get right characters
|
| 171 |
into a resulting XML file (debian-reference.en.raw) without worrying
|
| 172 |
about asciidoc converting to something funny.
|
| 173 |
|
| 174 |
For example: @@@sq@@@ is converted to '
|
| 175 |
|
| 176 |
These conversion occur right after asciidoc conversion but before
|
| 177 |
storing to raw.xml files. So this is purely work around for asciidoc
|
| 178 |
idiosyncrasies.
|
| 179 |
|
| 180 |
== What is @-@ in asciidoc and raw XML ==
|
| 181 |
|
| 182 |
You see quite a bit of @-@ in asciidoc and generated XML source. That
|
| 183 |
is placed there when auto-generated data replaces them as entity in the
|
| 184 |
final form (*.xml, *.po, *.tml, ...).
|
| 185 |
|
| 186 |
For example: @-@foo@-@ is converted to &foo;
|
| 187 |
@-@popcon1@-@ is converted to popcon value and URL link of
|
| 188 |
package in column 1.
|
| 189 |
@-@psize1@-@ is converted to size value and URL link of
|
| 190 |
package in column 1.
|
| 191 |
@-@popcon2@-@ is converted to popcon value and URL link of
|
| 192 |
package in column 2.
|
| 193 |
@-@psize2@-@ is converted to size value and URL link of
|
| 194 |
package in column 2.
|
| 195 |
|
| 196 |
These survive asciidoc conversion but are transformed from raw.xml to
|
| 197 |
en.xml.
|
| 198 |
|
| 199 |
== Making copy of SVN contents ==
|
| 200 |
|
| 201 |
If you just need readonly access to SVN contents, you can do this with:
|
| 202 |
$ mkdir -p path/to/use/
|
| 203 |
$ cd path/to/use/
|
| 204 |
$ svn co svn://svn.debian.org/svn/ddp/manuals/trunk/quick-reference qref
|
| 205 |
|
| 206 |
If you need read/write access, please follow me ...
|
| 207 |
|
| 208 |
DR is part of Debian Documentation Project (DDP) at
|
| 209 |
http://www.debian.org/doc/ddp .
|
| 210 |
|
| 211 |
DDP uses alioth service.
|
| 212 |
|
| 213 |
If you do not have alioth account (i.e. non DD), you can set up by
|
| 214 |
clicking "New account" at the top right corner.
|
| 215 |
|
| 216 |
You can join DDP by clicking [Request to join] at
|
| 217 |
http://alioth.debian.org/projects/ddp/ and send your request to join.
|
| 218 |
You should send short reminder to debian-doc@lists.debian.org . Then
|
| 219 |
you can get alioth account activated for DDP. Please use English page
|
| 220 |
etc. (Otherwise we get non-English message)
|
| 221 |
|
| 222 |
You should set up SSH (passwordless login). Then:
|
| 223 |
|
| 224 |
$ mkdir -p path/to/use/
|
| 225 |
$ cd path/to/use/
|
| 226 |
$ svn co svn+ssh://svn.debian.org/svn/ddp/manuals/trunk/qick-reference qref
|
| 227 |
|
| 228 |
== Updating contents in English XML source ==
|
| 229 |
|
| 230 |
Typical work flow of creating latest XML source from asciidoc/po4a is:
|
| 231 |
|
| 232 |
* Get latest source with "svn up" to sync with latest upstream.
|
| 233 |
* Edit "asciidoc/*.txt" files to update English contents if needed.
|
| 234 |
* Run "make xml".
|
| 235 |
--> It runs msgmerge for you.
|
| 236 |
* Edit "po4a/debian-reference.??.po" to update translation if needed.
|
| 237 |
--> remove "fuzzy" while fixing translation.
|
| 238 |
* Run "make all" for test build html,
|
| 239 |
--> If error, back to Edit "asciidoc/*.txt" files.
|
| 240 |
* Save updated XML source with "svn ci".
|
| 241 |
|
| 242 |
* Clean source as needed with "make clean".
|
| 243 |
|
| 244 |
* Test build package using "debuild" and "pdebuild".
|
| 245 |
|
| 246 |
For editing "po4a/debian-reference.??.po", use specialized po file
|
| 247 |
editor such as poedit for ease.
|
| 248 |
|
| 249 |
== Fixing typo in English XML source ==
|
| 250 |
|
| 251 |
If you find typo in English and you know its fix should not affects
|
| 252 |
translation, you can do following:
|
| 253 |
|
| 254 |
* Get latest source with "svn up".
|
| 255 |
* Fix source as neeeded for merge errors.
|
| 256 |
* Run "make xml" to be sure.
|
| 257 |
via poedit GUI--> It runs msgmerge for you.
|
| 258 |
* Save updated XML source with "svn ci" to sync with upstream.
|
| 259 |
* Edit "asciidoc/*.txt" files to typo English contents if needed.
|
| 260 |
* Run "make typo".
|
| 261 |
--> It runs msguntypot for you.
|
| 262 |
* Run "make all" for test build html
|
| 263 |
--> If error, back to Edit "asciidoc/*.txt" files.
|
| 264 |
* Save updated XML source with "svn ci".
|
| 265 |
|
| 266 |
== Updating remote data contents ==
|
| 267 |
|
| 268 |
You need remote connection to update popcon, package size, and other remotely
|
| 269 |
fetched data.
|
| 270 |
|
| 271 |
* Get latest source with "svn up".
|
| 272 |
* Run "make distclean" to remove remote data contents.
|
| 273 |
* Run "make all" for test build html
|
| 274 |
* Save updated XML source with "svn ci".
|
| 275 |
|
| 276 |
== Creating Translation PO for a new language ==
|
| 277 |
|
| 278 |
* Get latest source with "svn up".
|
| 279 |
* Run "make xml" to be sure.
|
| 280 |
* Run "cd po4a; cp debian-reference.pot debian-reference.??.po".
|
| 281 |
* Save updated XML source with "svn ci".
|
| 282 |
|
| 283 |
To test run for language ??, "make xml LANGPO=??".
|
| 284 |
|
| 285 |
Once translation becomes in good shape, update LANGPO value in Makefile to
|
| 286 |
include ?? .
|
| 287 |
|
| 288 |
== Updating Translation PO ==
|
| 289 |
|
| 290 |
* Get latest source with "svn up".
|
| 291 |
* Run "make xml" to be sure.
|
| 292 |
* Edit "po4a/debian-reference.??.po" to update translation if needed.
|
| 293 |
* Run "make all" for test build html,
|
| 294 |
--> If error, back to Edit "po4a/debian-reference.??.po" files.
|
| 295 |
* Save updated XML source with "svn ci".
|
| 296 |
|
| 297 |
== Updating for new release (squeeze --> squeeze+1) ==
|
| 298 |
|
| 299 |
* Update common.ent target in Makefile to new release names.
|
| 300 |
* Change English source to debian-reference.raw.xml or other pre-XML
|
| 301 |
format.
|
| 302 |
|
| 303 |
== VCS locations and history ==
|
| 304 |
|
| 305 |
This DR source is maintained in alioth ddp SVN repository now.
|
| 306 |
|
| 307 |
VCS usage of Debian Reference (DR) have been changed with time.
|
| 308 |
This can be summarized approximately as follows:
|
| 309 |
|
| 310 |
1. DR ver 1 (ALL SGML source)
|
| 311 |
* Souceforge CVS as primary
|
| 312 |
* ddp CVS having copy of Souceforge CVS
|
| 313 |
2. DR ver 2 (lenny) (XML=English source, SGML=other sources)
|
| 314 |
* Souceforge CVS stalled
|
| 315 |
* ddp CVS having copy of old Souceforge CVS
|
| 316 |
--> This was moved to ddp SVN
|
| 317 |
* git.debian.org having latest source
|
| 318 |
3. DR ver 2 (squeeze) (XML=English Japanese sources, SGML=other sources)
|
| 319 |
* Souceforge CVS stalled
|
| 320 |
* ddp SVN latest content
|
| 321 |
* git.debian.org stalled
|
| 322 |
|
| 323 |
Latest SVN repository contents can be inspected/cloned as:
|
| 324 |
$ svn co svn://svn.debian.org/svn/ddp/manuals/trunk manuals # SVN (ro)
|
| 325 |
$ svn co svn+ssh://svn.debian.org/svn/ddp/manuals/trunk manuals # SVN+SSH (r/w)
|
| 326 |
http://svn.debian.org/wsvn/ddp/manuals/trunk/quick-reference/
|
| 327 |
http://www-master.debian.org/build-logs/ddp/ DDP build results
|
| 328 |
|
| 329 |
Latest source source package can be downloaded by
|
| 330 |
$ apt-get source debian-reference
|
| 331 |
|
| 332 |
Older lenny GIT repository contents can be inspected/cloned as:
|
| 333 |
$ sensible-browser http://git.debian.org/?p=users/osamu/debian-reference.git # web
|
| 334 |
$ git clone ssh://git.debian.org/~osamu/public_git/debian-reference.git debian-reference # r/w
|
| 335 |
$ git clone ssh://git.debian.org/git/users/osamu/debian-reference.git debian-reference # r/w
|
| 336 |
$ git clone git://git.debian.org/~osamu/debian-reference.git debian-reference # ro
|
| 337 |
$ git clone git://git.debian.org/git/users/osamu/debian-reference.git debian-reference # ro
|
| 338 |
$ git clone http://git.debian.org/git/users/osamu/debian-reference.git debian-reference # ro
|
| 339 |
|
| 340 |
|
| 341 |
Osamu
|
| 342 |
|
| 343 |
# vim: set tw=78 sts=2 ai expandtab:
|