-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
/
README.howto
281 lines (199 loc) · 9.7 KB
/
README.howto
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
README (English)
##################################################
DEB Package tools
##################################################
This directory contains files used by makepack-dolibarr.pl
script to build a package, ready to be distributed,
with format .DEB (for Debian, Ubuntu, ...).
##### Prepare linux env to work
# To build a debian package, you need first
# With Ubuntu 12.04
# apt-get install debhelper dpkg-source gpg lintian git-buildpackage pkg-php-tools schroot sbuild dh-linktree dh-make-php
# With Debian 7
# apt-get install debhelper dpkg gnupg lintian git-buildpackage pkg-php-tools schroot sbuild dh-linktree dh-make-php
# To generate gpg key for email used into changelog
* Check your existing keys/emails
> gpg --list-key
* Generate a new one, if none exists for email you use as author
> gpg --gen-key Generate a GPG key (-> pubring.gpg + secring.gpg)
Files are saved int .gnupg directory
* Create a file ~/.gpb.conf by
> cat >~/.gbp.conf <<END
[DEFAULT]
pristine-tar = True
[git-buildpackage]
sign-tags = True
export-dir = ../build-area/
[git-import-orig]
filter-pristine-tar = True
END
# To use Alioth.debian.org
* Create an account login
* Update your ~/.ssh/config file to add:
Host svn.debian.org git.debian.org bzr.debian.org hg.debian.org darcs.debian.org arch.debian.org
User eldy-guest
IdentityFile ~/.ssh/id_rsa
* Check login on page https://alioth.debian.org/users/login
Ex: https://alioth.debian.org/users/eldy-guest
* Setup your ssh as described into page: http://wiki.debian.org/Alioth/SSH
* Ask to be included into project collab-maint: http://alioth.debian.org/projects/collab-maint/
##### Some interesting command to know
# To translate .po files
# debconf-updatepo To run into po dir to regenate templates.pot
# podebconf-report-po --from email@email.com To send email to ask translations
# Edit manually file XX.po and remove all lines "#, fuzzy" when translation is complete
# msgfmt -v -c -o /dev/null XX.po To have status of translation for language XX
# To check package integrity
# lintian --pedantic -E -I package.deb To test a package
# To manipulate packages
# dpkg -l List all packages
# dpkg -b To build binary only package
# dpkg -c package.deb List content of package
# dpkg -I package.deb Give informations on package
# dpkg -i package.deb Install a package
# dpkg-reconfigure -plow package Reconfigure package
# dpkg -L packagename List content of installed package
# dpkg -r packagename Remove config files and interactive saved answers
# dpkg -s packagename Give status of installed package
# dpkg --purge Remove config files and interactive saved answers
#
# dpkg-buildpackage -us -uc Build a source and binary package
#
# gdebi package.deb Install a package + dependencies
##### Global view of submit new package to Debian:
- Post an ITP with reportbugs :
> reportbug -B debian --email username@domain.tld wnpp
See page http://www.debian.org/devel/wnpp/#l1 for example of ITP requests contents.
- Wait until you received bug number.
For first ITP submission of Dolibarr, bug id was 634783.
- Check bug is into database by searching with id on
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=634783
- Add a line for upstream into file changelog with bug number
- Call for a mentor on ML debian-mentors to upload packages
- Once package is uploaded, following URL are available:
http://packages.qa.debian.org/package.html
http://bugs.debian.org/package
##### Testing a package into unstable env
Check you have a mysql server available from another interface than localhost
Comment line in /etc/mysql/my.cnf if required and restart mysql
#bind-address = 127.0.0.1
Create a chroot called "unstable-amd64-sbuild"
> sudo sbuild-createchroot --keyring= unstable /srv/chroot/unstable http://ftp.uk.debian.org/debian
Pour lister les env chroot
> schroot -l
Puis pour se connecter et préparer l'environnement
> schroot -c name_of_chroot
> vi /usr/sbin/policy-rc.d and replace return code 101 (not allowed) into 0 (ok)
> apt-get install links mysql-client
Pour tester un package
> On host server, stop any server on port 80 and 3306 (same port will be used by chroot env)
> cp ../build-area/* /srv/chroot/unstable/tmp
> sudo schroot -c name_of_chroot
> cd /tmp
> lintian --pedantic -E -I dolibarr*.deb
> lintian --pedantic -E -I dolibarr*.dsc
> dpkg -i dolibarr*.deb ou pour avoir des traces: dpkg -D77777 -i dolibarr*.deb
> apt-get install -f
Puis http://localhost/dolibarr/ (cela peut etre appeler depuis le hote).
##### Create/Maintain TCPDF package
To update tcpdf package:
* You can git clone tcpdf
> git clone git.debian.org:/git/collab-maint/tcpdf.git [tcpdf-debian]
or better
> mkdir gitdebian
> cd gitdebian
> gbp-clone git.debian.org:/git/collab-maint/tcpdf.git
* You can then create a PHP project from Eclipse called tcpdf-debian
from git clone dir and make link to git.
* If local branch upstream and pristine-tar does not exists, create it
from origin/upstream and origin/pristine.
* Into root dir, launch:
> debian/get-orig-source.sh
* Staying into git root directory, run
> git-import-orig -vv ../tcpdf_x.y.z+dfsg.orig.tar.xz
Note: If there was errors solved manually, you may need to make a git commit
* Add an entry into debian/changelog
> dch -v x.y.z-dsfg-1 "My comment" will add entry.
For example: dch -v x.y.z-dsfg-1 "New upstream release." for a new version
Then modify changelog to replace "unstable" with "UNRELEASED".
Warning: Date must have format reported by "date -R"
Warning: Name and email must match value into debian/control file (Entry added here is used by next step).
* We try to build package
> rm -fr ../build-area; git-buildpackage -us -uc
Note: You can use git-buildpackage -us -uc --git-ignore-new if you want to test build with uncommited file
Note: You can use git-buildpackage -us -uc -d if you want to test build when dependencies does not match
Note: Package is built into directory ../build-area
* If package .deb is ok:
Note: If there was errors managed manually, you may need to make a git commit but do not use option "amend" previous commit
> git push --all ou git push origin --all
* If ok, you can tag.
> Edit debian/changelog to replace "UNRELEASED" into "unstable", then push
> git-buildpackage --git-tag-only --git-retag
> git push --tags
* Compilation is then done by a debian developer and sent
> sbuild ...
> dput ...
* Go into page. You should see new package into unstable.
http://packages.qa.debian.org/t/tcpdf.html
* Package will be into release when test will be moved as stable.
##### Update but tracker system
To set status of a bug to pending
> bts tag 999999 +pending
or replay to email 999999@bugs.debian.org + submitter of bug
With a message starting with:
Control: tag -1 +pending
and then a text like:
Thanks. Fixed into git.
or replay to email control@bugs.debian.org
With only message
tag 729538 +pending
##### Create/Maintain dolibarr package
To update dolibarr debian package
* You can git clone debian git repo
> git clone git.debian.org:/git/collab-maint/dolibarr.git [dolibarr-debian]
or better
> cd ~; mkdir git-debian; cd git-debian
> gbp-clone git.debian.org:/git/collab-maint/dolibarr.git
* You can then create a PHP project from Eclipse called dolibarr-debian
from git clone dir and make link to git.
* If local branch upstream and pristine-tar does not exists, create it
from origin/upstream and origin/pristine.
* If new upstream is available onto sourceforge, launch:
> debian/get-orig-source.sh
* Edit tgz file to remove ckeditor and phpexcel and rename file into
dolibarr-x.y.z+dsfgw.tgz
(x.y.z = version, w start from 1 and is increased for each new import)
* Staying into git root directory, run
> git-import-orig -vv ../dolibarr-x.y.z+dsfgw.tgz
and enter version when requested with format
x.y.z+dsfgw
(x.y.z = version, w start from 1 and is increased for each new import)
Note: If there was errors solved manually after get-orig-sources.sh, you may need to make a git commit
* Add an entry into debian/changelog
> dch -v x.y.z-w "My comment" will add entry.
For example: dch -v x.y.z-w "New upstream release." for a new version (x.y.z = version, w start from 1 and increaed for each new import)
Then modify changelog to replace "unstable" with "UNRELEASED".
Then check/modify also the user/date signature:
- Date must have format reported by "date -R"
- Name and email must match value into debian/control file (Entry added here is used by next step).
* We try to build package
> rm -fr ../build-area; git-buildpackage -us -uc
Note: You can use git-buildpackage -us -uc --git-ignore-new if you want to test build with uncommited file
Note: You can use git-buildpackage -us -uc -d if you want to test build when dependencies does not match
Note: Package is built into directory ../build-area
* Test package (see dedicated chapter to test it with debian unstable env)
* If package .deb is ok:
Note: If there was errors managed manually, you may need to make a git commit but do not use option "amend" previous commit
> git push --all ou git push origin --all
* If ok, you can tag.
> Edit debian/changelog to replace "UNRELEASED" into "unstable", then push
> git-buildpackage --git-tag-only --git-retag
> git push --tags
* Compilation is then done by a debian developer and sent
> sbuild ...
> dput ...
* Package arrives into FTPmaster taskboard with status NEW (pending upload). You can view it at:
http://ftp-master.debian.org/new/
* Once package is validated, you should see it into area unstable at:
http://packages.qa.debian.org
* Package will be into release when test will be moved as stable.