gcs

Merge lp:~ehbello/gcs/trunk into lp:gcs

Proposed by Enrique Hernández Bello
Status: Merged
Merged at revision: 25
Proposed branch: lp:~ehbello/gcs/trunk
Merge into: lp:gcs
Diff against target: 1425 lines (+560/-297)
41 files modified
TODO (+0/-2)
builder.py (+25/-10)
config.py (+31/-8)
debian/changelog (+54/-0)
debian/control (+3/-3)
debian/gcs_build.1 (+23/-0)
debian/gcs_skel.1 (+16/-0)
debian/install (+9/-0)
debian/manpages (+2/-0)
debian/prerm (+7/-0)
debian/rules (+12/-47)
debian/source/format (+1/-0)
gcs.conf (+8/-3)
gcs/changelog (+0/-30)
gcs/depends (+0/-14)
gcs/info (+0/-26)
gcs/newfiles (+0/-10)
gcs/predepends (+0/-5)
gcs/replaces (+0/-5)
gcs_build (+13/-0)
generators/file.py (+263/-67)
generators/part.py (+4/-14)
skel/README.gcs (+5/-0)
skel/gcs/depends (+1/-1)
skel/gcs/info (+1/-1)
skel/gcs/questions/01first (+15/-0)
skel/gcs/questions/02second (+4/-0)
templates/changelog.template (+1/-1)
templates/config.template (+14/-0)
templates/control.template (+4/-2)
templates/copyright.template (+1/-1)
templates/postinst.template (+6/-1)
templates/postrm.template (+6/-1)
templates/preinst.template (+6/-1)
templates/prerm.template (+6/-1)
templates/rules.template (+14/-39)
templates/sourceformat.template (+1/-0)
test_pkg/debian.orig/gcs-test-pkg/DEBIAN/conffiles (+1/-1)
test_pkg/debian.orig/gcs-test-pkg/DEBIAN/postinst (+1/-1)
test_pkg/debian.orig/postinst (+1/-1)
test_pkg/debian.orig/rules (+1/-1)
To merge this branch: bzr merge lp:~ehbello/gcs/trunk
Reviewer Review Type Date Requested Status
Roberto C. Morano Approve
Review via email: mp+24073@code.launchpad.net

Description of the change

This branch releases a new personal version of GCS for karmic. It fixes some bugs, implements some items described in TODO file and also, another issues needed by Bardinux distribution.

Please, check if my changes are in line with your development policy.

To post a comment you must log in.
lp:~ehbello/gcs/trunk updated
40. By Enrique Hernández Bello

Allows reading package lists with brackets in their versions, e.g.:
gcs (> 0.3.20)

41. By Enrique Hernández Bello

Fixed bug when divert a file due to a variable not defined.

42. By Enrique Hernández Bello

Updated changelog to show the last change

43. By Enrique Hernández Bello

Renamed function __parse_deps to __parse_list.

44. By Enrique Hernández Bello

Tiny refactorization in file.py

45. By Enrique Hernández Bello

Added support for debian install file to get a more readable rules file
in target packages.

46. By Enrique Hernández Bello

Added preliminary support for adding questions during install proccess
of the packages using DebConf.

47. By Enrique Hernández Bello

Bugfix: GCS didn't work if questions directory doesn't exists.

48. By Enrique Hernández Bello

Avoiding to create template file when there are no questions.

49. By Enrique Hernández Bello

Removed duped ${misc:Depends} in GCS template for debian control file.

50. By Enrique Hernández Bello

Fixed lintian warning 'maintainer-script-without-set-e' in GCS templates

51. By Enrique Hernández Bello

Supplied GCS template for setting the source format and fix the lintian
warning 'missing-debian-source-format'.

52. By Enrique Hernández Bello

Fixed lintian warning 'out-of-date-standards-version' in GCS templates

53. By Enrique Hernández Bello

Updated standards version and defined source format of package.

54. By Enrique Hernández Bello

Added initial manpages for gcs commands.

55. By Enrique Hernández Bello

Fixed a syntax bug making directories ;)

56. By Enrique Hernández Bello

Simplified the debian 'rules' file. Now installs manpages and uses a more
readable 'install' file instead dh_install sentences.

57. By Enrique Hernández Bello

_Really_ fixed lintian warning 'maintainer-script-without-set-e' in GCS
templates. Explanation:

http://us.generation-nt.com/answer/why-maintainer-bother-use-set-e-inste
ad-bin-sh-e-maintainer-scripts-help-194963531.html

58. By Enrique Hernández Bello

Fixed mode creating dirs on writing files. 0755 is more suitable than
750 ;)

59. By Enrique Hernández Bello

Enabled SourceFormatGenerator hook previously coded.

60. By Enrique Hernández Bello

Avoiding to include debconf code in installation scripts when there are
no defined questions.

61. By Enrique Hernández Bello

Simplified the debian 'rules' file also on GCS templates. Now installs
manpages and uses a more readable 'install' file instead dh_install
sentences.

62. By Enrique Hernández Bello

Releasing gcs 0.3.20+ehbello2 for lucid.

63. By Enrique Hernández Bello

Added a pseudo syntax check for package lists used in Debian control files.
Now supports packages with version and multiple dependences.

64. By Enrique Hernández Bello

Added support to create softlinks files using dh_link instead of copying
them.

65. By Enrique Hernández Bello

Fixed the first template question of example skel removing non valid
tabulators.

Revision history for this message
Roberto C. Morano (rcmorano) wrote :

Everything is fine, many thanks for the code :]

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'TODO'
2--- TODO 2009-03-12 21:03:28 +0000
3+++ TODO 2010-09-25 22:48:44 +0000
4@@ -1,5 +1,3 @@
5- * Add <AUTHOR> token to the copyright template
6- * Removed execution permission to the templates and give them to the post and pre scripts
7 * Added the Architecture field to the info file
8 * Checking the best way to put the versions
9 * See how get the changelog from the svn log instead of from the info (which usually doesn't change
10
11=== modified file 'builder.py'
12--- builder.py 2008-03-25 17:29:55 +0000
13+++ builder.py 2010-09-25 22:48:44 +0000
14@@ -5,7 +5,7 @@
15 import os.path
16 import shutil
17
18-import syck
19+import yaml
20
21 from config import config
22 from generators.file import ControlGenerator
23@@ -17,6 +17,9 @@
24 from generators.file import PreRmGenerator
25 from generators.file import PostRmGenerator
26 from generators.file import CompatGenerator
27+from generators.file import SourceFormatGenerator
28+from generators.file import ConfigGenerator
29+from generators.file import TemplatesGenerator
30 from generators.file import CopyrightGenerator
31
32
33@@ -26,7 +29,7 @@
34
35 def __init__(self, path):
36 config['source_path'] = path
37- config['info'] = syck.load(open(path + '/gcs/info').read())
38+ config['info'] = yaml.load(open(path + '/gcs/info').read())
39 extension = config['info'].get('config_extension', None)
40 if extension:
41 config['config_extension'] = extension
42@@ -37,7 +40,7 @@
43 """
44 try:
45 os.mkdir(config['source_path'] + '/debian')
46- except:
47+ except OSError:
48 pass
49
50 self.__prepare_conffiles()
51@@ -51,17 +54,29 @@
52 PreRmGenerator().activate()
53 PostRmGenerator().activate()
54 CompatGenerator().activate()
55+ SourceFormatGenerator().activate()
56+ ConfigGenerator().activate()
57+ TemplatesGenerator().activate()
58 CopyrightGenerator().activate()
59
60- os.system('debuild -us -uc')
61-
62- self.__delete_tmpfiles()
63-
64-
65+ # FIXME: At the moment we need to keep the configuration files because
66+ # the conversion doesn't transparently (dh_install rename problem)
67+ #self.__delete_tmpfiles()
68+
69+
70+
71+
72+ def build_package(self):
73+ """ Build the package. Use a simply debuild for this propouse.
74+ """
75+ try:
76+ os.system('debuild -us -uc')
77+ except:
78+ pass
79
80
81 def __prepare_conffiles(self):
82- """ Add .gv4 extension at all conffiles (making a copy)
83+ """ Add .gcs extension at all conffiles (making a copy)
84 """
85 def copy_file(arg, dirname, file_names):
86
87@@ -79,7 +94,7 @@
88
89
90 def __delete_tmpfiles(self):
91- """ Add .gv4 extension at all conffiles (making a copy)
92+ """ Add .gcs extension at all conffiles (making a copy)
93 """
94 def delete_file(arg, dirname, file_names):
95
96
97=== modified file 'config.py'
98--- config.py 2008-03-25 17:29:55 +0000
99+++ config.py 2010-09-25 22:48:44 +0000
100@@ -3,18 +3,41 @@
101 """ Parse /etc/gcs.conf for configuration options
102 """
103
104+import re
105+import os
106 import sys
107-
108-import syck
109+import yaml
110
111 try:
112- config = syck.load(open('/etc/gcs.conf').read())
113-
114- # Add default options
115- config['source_path'] = './'
116- config['info'] = {}
117-
118+ config = yaml.load(open('/etc/gcs.conf').read())
119 except:
120 print "Can't read /etc/gcs.conf file."
121 sys.exit(1)
122
123+# Add default options
124+config['source_path'] = './'
125+config['info'] = {}
126+config['questions'] = []
127+if not config.has_key('diverts_basepath'):
128+ config['diverts_basepath'] = '/'
129+
130+questions_path = config['source_path'] + '/gcs/questions'
131+
132+if os.path.isdir(questions_path):
133+ for template_file in os.listdir(questions_path):
134+ template_path = config['source_path'] + 'gcs/questions/' + template_file
135+
136+ if os.path.isdir(template_path):
137+ pass
138+
139+ try:
140+ template = re.sub(r'\n\n', '\n---\n', open(template_path).read())
141+ template = re.sub(r'(?=\W+):(?=.+\n )', ': |\n', template)
142+ for question in yaml.load_all(template):
143+ config['questions'].append(question)
144+ except yaml.scanner.ScannerError as e:
145+ print "Error parsing %s file." % template_path
146+ print e
147+ except Exception as e:
148+ print e
149+ sys.exit(1)
150
151=== modified file 'debian/changelog'
152--- debian/changelog 2009-06-17 09:08:22 +0000
153+++ debian/changelog 2010-09-25 22:48:44 +0000
154@@ -1,3 +1,57 @@
155+gcs (0.3.20+ehbello3) UNRELEASED; urgency=low
156+
157+ * Added a pseudo syntax check for package lists used in Debian control files.
158+ Now supports packages with version and multiple dependences.
159+ * Added support to create softlinks files using dh_link instead of copying
160+ them.
161+ * Fixed the first template question of example skel removing non valid
162+ tabulators.
163+
164+ -- Enrique Hernández Bello <quique@osl.ull.es> Sat, 25 Sep 2010 23:42:53 +0100
165+
166+gcs (0.3.20+ehbello2) lucid; urgency=low
167+
168+ * Allows reading package lists with brackets in their versions, e.g.:
169+ gcs (> 0.3.20)
170+ * Fixed bug when divert a file due to a variable not defined.
171+ * Added support for debian install file to get a more readable rules file
172+ in target packages.
173+ * Added preliminary support for adding questions during install proccess
174+ of the packages using DebConf.
175+ * Fixed some lintian warnings in GCS templates:
176+ - maintainer-script-without-set-e
177+ - missing-debian-source-format
178+ - out-of-date-standards-version
179+ * Added initial manpages for gcs commands.
180+
181+ -- Enrique Hernández Bello <quique@osl.ull.es> Fri, 16 Jul 2010 16:56:34 +0100
182+
183+gcs (0.3.20+ehbello1) karmic; urgency=low
184+
185+ * Added support for all architectures.
186+ * Added preremoval script to delete all remaining pyc files for a clean
187+ uninstall.
188+ * Added support for Recommends and Suggests control fields.
189+ preparation process is no longer necessary.
190+ * Changed default config_extension to .gcs
191+ * Added an option parameter for gcs_build to don't build the Debian source
192+ generated. It's useful to build it later.
193+ * Created <DISTRIB> tag with the codename of the parent distribution for the
194+ changelog template.
195+ * Added support for <AUTHOR> tag in copyright template.
196+ * Deleted some old stuff.
197+ * Replaced python-syck dependence by a newer python-yaml.
198+ * The example section in the info file of the skeleton by default couldn't
199+ have multiple words.
200+ * Fixed almost all lintian warnings coming from this debian package and the
201+ debian templates for gcs.
202+ * Added feature to change the base directory of diverted files. Useful for a
203+ run-parts style of directory. [config: diverts_basepath]
204+ * Removed execution permission to the templates and gave them later to the
205+ post and pre scripts
206+
207+ -- Enrique Hernández Bello <quique@osl.ull.es> Sat, 20 Feb 2010 14:25:20 +0000
208+
209 gcs (0.3.20) jaunty; urgency=low
210
211 * Added Provides: control's field support
212
213=== modified file 'debian/control'
214--- debian/control 2009-03-12 21:28:24 +0000
215+++ debian/control 2010-09-25 22:48:44 +0000
216@@ -4,14 +4,14 @@
217 Maintainer: Junta de Andalucia <packmaster@guadalinex.org>
218 Uploaders: Juanje Ojeda Croissier <jojeda@emergya.es>
219 Build-Depends: debhelper (>= 7.0)
220-Standards-Version: 3.8.0
221+Standards-Version: 3.8.4
222 Homepage: http://launchpad.net/gcs
223 Vcs-Browser: http://codebrowse.launchpad.net/~guadalinex-members/gcs/trunk/changes
224 Vcs-Bzr: http://bazaar.launchpad.net/~guadalinex-members/gcs/trunk
225
226 Package: gcs
227-Architecture: i386
228-Depends: python, python-syck, python-support, debhelper, devscripts, make, fakeroot, gcc
229+Architecture: all
230+Depends: ${misc:Depends}, python, python-yaml, python-support, debhelper, devscripts, make, fakeroot, gcc
231 Description: Guadalinex Configuration System
232 gcs (Guadalinex Configuration System) is a system which was originally created
233 to generate plane metapackages (just dependences) and configuration
234
235=== added file 'debian/gcs_build.1'
236--- debian/gcs_build.1 1970-01-01 00:00:00 +0000
237+++ debian/gcs_build.1 2010-09-25 22:48:44 +0000
238@@ -0,0 +1,23 @@
239+.TH gcs_build 1 "July 16, 2010" "Guadalinex Configuration System"
240+.SH NAME
241+gcs_build \- build a Debian package
242+.SH SYNOPSIS
243+.B gcs_build
244+.RI [ -S ]
245+.SH DESCRIPTION
246+.PP
247+Build a package from a customized skeleton spawned by gcs_skel
248+.SH OPTIONS
249+.B \-h, \-\-help
250+Show summary of options.
251+.TP
252+.B \-S, \-\-sources
253+debian source only, don't build binary files
254+.SH SEE ALSO
255+.BR gcs_skel (1).
256+.br
257+.SH AUTHOR
258+Junta de Andalucia <packmaster@guadalinex.org>
259+.PP
260+This manual page was written by Enrique Hernández Bello <quique@osl.ull.es>,
261+for the Debian project and may be used by others.
262
263=== added file 'debian/gcs_skel.1'
264--- debian/gcs_skel.1 1970-01-01 00:00:00 +0000
265+++ debian/gcs_skel.1 2010-09-25 22:48:44 +0000
266@@ -0,0 +1,16 @@
267+.TH gcs_skel 1 "July 16, 2010" "Guadalinex Configuration System"
268+.SH NAME
269+gcs_skel \- generate a GCS skeleton
270+.SH SYNOPSIS
271+.B gcs_skel
272+.SH DESCRIPTION
273+.PP
274+Generate a skeleton of directories to configure and build with gcs_build
275+.SH SEE ALSO
276+.BR gcs_build (1).
277+.br
278+.SH AUTHOR
279+Junta de Andalucia <packmaster@guadalinex.org>
280+.PP
281+This manual page was written by Enrique Hernández Bello <quique@osl.ull.es>,
282+for the Debian project and may be used by others.
283
284=== added file 'debian/install'
285--- debian/install 1970-01-01 00:00:00 +0000
286+++ debian/install 2010-09-25 22:48:44 +0000
287@@ -0,0 +1,9 @@
288+builder.py /usr/share/gcs
289+config.py /usr/share/gcs
290+generators /usr/share/gcs
291+skel /usr/share/gcs
292+templates /usr/share/gcs
293+doc /usr/share/gcs
294+ gcs_build /usr/bin
295+ gcs_skel /usr/bin
296+ gcs.conf /etc
297
298=== added file 'debian/manpages'
299--- debian/manpages 1970-01-01 00:00:00 +0000
300+++ debian/manpages 2010-09-25 22:48:44 +0000
301@@ -0,0 +1,2 @@
302+debian/gcs_build.1
303+debian/gcs_skel.1
304
305=== added file 'debian/prerm'
306--- debian/prerm 1970-01-01 00:00:00 +0000
307+++ debian/prerm 2010-09-25 22:48:44 +0000
308@@ -0,0 +1,7 @@
309+#!/bin/sh
310+
311+#DEBHELPER#
312+
313+set -e
314+
315+find /usr/share/gcs/ -iname "*.pyc" -delete
316
317=== modified file 'debian/rules'
318--- debian/rules 2008-03-25 17:29:55 +0000
319+++ debian/rules 2010-09-25 22:48:44 +0000
320@@ -1,48 +1,13 @@
321 #!/usr/bin/make -f
322-
323-build:
324-
325-clean:
326- dh_testdir
327- dh_testroot
328- dh_clean
329-
330-install: build
331- dh_testdir
332- dh_testroot
333- dh_clean -k
334-
335- dh_install "builder.py" "/usr/share/gcs"
336- dh_install "config.py" "/usr/share/gcs"
337- dh_install "generators" "/usr/share/gcs"
338- dh_install "skel" "/usr/share/gcs"
339- dh_install "templates" "/usr/share/gcs"
340- dh_install "doc" "/usr/share/gcs"
341- dh_install "gcs_build" "/usr/bin"
342- dh_install "gcs_skel" "/usr/bin"
343- dh_install "gcs.conf" "/etc"
344-
345-binary-indep: build install
346-
347-binary-arch: build install
348- dh_testdir
349- dh_testroot
350- dh_installdebconf
351- dh_installdocs
352- dh_installcron
353- dh_installchangelogs
354- dh_installdirs
355- dh_link
356- dh_strip
357- dh_compress
358- dh_fixperms
359- dh_installdeb
360- dh_shlibdeps
361- dh_gencontrol
362- dh_builddeb
363-
364-binary: binary-indep binary-arch
365-
366-.PHONY: build clean install binary binary-indep binary-arch
367-
368-
369+# -*- makefile -*-
370+# Sample debian/rules that uses debhelper.
371+# This file was originally written by Joey Hess and Craig Small.
372+# As a special exception, when this file is copied by dh-make into a
373+# dh-make output file, you may use that output file without restriction.
374+# This special exception was added by Craig Small in version 0.37 of dh-make.
375+
376+# Uncomment this to turn on verbose mode.
377+#export DH_VERBOSE=1
378+
379+%:
380+ dh $@
381
382=== added directory 'debian/source'
383=== added file 'debian/source/format'
384--- debian/source/format 1970-01-01 00:00:00 +0000
385+++ debian/source/format 2010-09-25 22:48:44 +0000
386@@ -0,0 +1,1 @@
387+3.0 (native)
388
389=== removed directory 'gcs'
390=== modified file 'gcs.conf'
391--- gcs.conf 2009-05-11 15:36:33 +0000
392+++ gcs.conf 2010-09-25 22:48:44 +0000
393@@ -6,7 +6,12 @@
394 postinst_template: /usr/share/gcs/templates/postinst.template
395 prerm_template: /usr/share/gcs/templates/prerm.template
396 postrm_template: /usr/share/gcs/templates/postrm.template
397+config_template: /usr/share/gcs/templates/config.template
398 copyright_template: /usr/share/gcs/templates/copyright.template
399-
400-# Extensión en la que acaban los ficheros de configuración
401-config_extension: .gv6
402+sourceformat_template: /usr/share/gcs/templates/sourceformat.template
403+
404+## Final extension for the configuration files.
405+config_extension: .gcs
406+
407+## This variable change the base path where you want to store the diversions.
408+# diverts_basepath: /diverts
409
410=== removed file 'gcs/changelog'
411--- gcs/changelog 2008-03-25 17:29:55 +0000
412+++ gcs/changelog 1970-01-01 00:00:00 +0000
413@@ -1,30 +0,0 @@
414-gcs (0.3.13) edgy; urgency=low
415-
416- * Added support for desktop files.
417-
418- -- Junta de Andalucia <packmaster@guadalinex.org> Tue, 25 Mar 2008 17:20:59 -0000
419-
420-
421-gcs (0.3.12) edgy; urgency=low
422-
423- * Added support for pre-depends.
424- * Added support for conflict fields.
425-
426- -- Gumersindo Coronel Pérez <gcoronel@emergya.info> Mon, 19 Mar 2007 09:00:14 -0000
427-
428-
429-gcs (0.3.9) edgy; urgency=low
430-
431- * 0.4 rc1.
432-
433- -- Gumersindo Coronel Pérez <gcoronel@emergya.info> Wed, 20 Dec 2006 11:55:20 -0000
434-
435-
436-gcs (0.3.8) edgy; urgency=low
437-
438- * Development release.
439- * Fixing a minor bug with skel.
440-
441- -- Gumersindo Coronel Pérez <gcoronel@emergya.info> Thu, 30 Nov 2006 16:08:22 -0000
442-
443-
444
445=== removed directory 'gcs/conffiles_skel'
446=== removed file 'gcs/depends'
447--- gcs/depends 2008-03-25 17:29:55 +0000
448+++ gcs/depends 1970-01-01 00:00:00 +0000
449@@ -1,14 +0,0 @@
450-# Dependencias del paquete. Un paquete por línea. Si se desea, se puede indicar la versión del paquete en una segunda columna
451-# Ejemplos:
452-#
453-# gnome-terminal
454-# nautilus >=2.6.10
455-#
456-python
457-python-syck
458-python-support
459-debhelper
460-devscripts
461-make
462-fakeroot
463-gcc
464
465=== removed file 'gcs/info'
466--- gcs/info 2008-03-25 17:29:55 +0000
467+++ gcs/info 1970-01-01 00:00:00 +0000
468@@ -1,26 +0,0 @@
469-# YAML 1.1
470-# Fichero de configuración de paquetes de personalización de Guadalinex v4
471-
472-# Nombre del paquete (minúsculas-separado-con-guiones)
473-name: gcs
474-
475-# Autor
476-author: Junta de Andalucia <packmaster@guadalinex.org>
477-
478-# Priority
479-priority: optional
480-
481-# Section
482-section: admin
483-
484-shortdesc: "Sistema de configuración de Guadalinex v4"
485-
486-longdesc: "Consiste en un conjunto de herramientas que facilitan\n la creacion de metapaquetes y paquetes de configuración."
487-
488-# Versión del paquete
489-version: 0.3.13
490-
491-# Cambios en esta versión
492-changes:
493- - Added support for desktop files.
494-
495
496=== removed directory 'gcs/install_scripts'
497=== removed file 'gcs/newfiles'
498--- gcs/newfiles 2008-03-25 17:29:55 +0000
499+++ gcs/newfiles 1970-01-01 00:00:00 +0000
500@@ -1,10 +0,0 @@
501-# File/Dir InstallDir
502-builder.py /usr/share/gcs
503-config.py /usr/share/gcs
504-generators /usr/share/gcs
505-skel /usr/share/gcs
506-templates /usr/share/gcs
507-doc /usr/share/gcs
508-gcs_build /usr/bin
509-gcs_skel /usr/bin
510-gcs.conf /etc
511
512=== removed directory 'gcs/newfiles_skel'
513=== removed file 'gcs/predepends'
514--- gcs/predepends 2008-03-25 17:29:55 +0000
515+++ gcs/predepends 1970-01-01 00:00:00 +0000
516@@ -1,5 +0,0 @@
517-# Predependencias del paquete. Un paquete por línea. Si se desea, se puede indicar la versión del paquete en una segunda columna
518-# Ejemplos:
519-#
520-# gnome-terminal
521-# nautilus >=2.6.10
522
523=== removed directory 'gcs/remove_scripts'
524=== removed file 'gcs/replaces'
525--- gcs/replaces 2009-06-15 08:17:43 +0000
526+++ gcs/replaces 1970-01-01 00:00:00 +0000
527@@ -1,5 +0,0 @@
528-# Replaces del paquete. Un paquete por línea. Si se desea, se puede indicar la versión del paquete en una segunda columna
529-# Ejemplos:
530-#
531-# gnome-terminal
532-# nautilus <=2.6.10
533
534=== modified file 'gcs_build'
535--- gcs_build 2008-03-25 17:29:55 +0000
536+++ gcs_build 2010-09-25 22:48:44 +0000
537@@ -7,8 +7,21 @@
538 sys.setdefaultencoding('utf8')
539 sys.path.insert(0, '/usr/share/gcs/')
540
541+from optparse import OptionParser
542 from builder import Builder
543
544 if __name__ == "__main__":
545+ parser = OptionParser()
546+
547+ parser.add_option('-S', '--sources',
548+ dest="sources",
549+ action="store_true",
550+ help="debian source only, don't build binary files"
551+ )
552+ (options, args) = parser.parse_args()
553+
554 builder = Builder(os.getcwd())
555 builder.make_package()
556+
557+ if not options.sources:
558+ builder.build_package()
559
560=== modified file 'generators/file.py'
561--- generators/file.py 2009-06-17 09:08:22 +0000
562+++ generators/file.py 2010-09-25 22:48:44 +0000
563@@ -3,7 +3,6 @@
564
565 import os
566 import shutil
567-import os.path
568 import re
569 import datetime
570 import email.Utils
571@@ -39,11 +38,27 @@
572 print "Can't create template content. Template: %s" % template_name
573
574
575+ def _copy_file(self, orig_path, dest_path, mode=0644, dirmode=0755):
576+ real_orig_path = config['source_path'] + '/' + orig_path
577+ real_dest_path = config['source_path'] + '/' + dest_path
578+ try:
579+ os.makedirs(os.path.dirname(real_dest_path), dirmode)
580+ except OSError:
581+ pass
582+ shutil.copy(real_orig_path, real_dest_path)
583+ os.chmod(real_dest_path, mode)
584+
585
586- def _write_file(self, path):
587- real_file = open(config['source_path'] + '/' + path, 'w')
588+ def _write_file(self, path, mode=0644, dirmode=0755):
589+ real_path = config['source_path'] + '/' + path
590+ try:
591+ os.makedirs(os.path.dirname(real_path), dirmode)
592+ except OSError:
593+ pass
594+ real_file = open(real_path, 'w')
595 real_file.write(self.template_content)
596 real_file.close()
597+ os.chmod(real_path, mode)
598
599
600 class ControlGenerator(FileGenerator):
601@@ -65,6 +80,8 @@
602 self.__set_predepends()
603 self.__set_provides()
604 self.__set_depends()
605+ self.__set_recommends()
606+ self.__set_suggests()
607 self.__set_conflicts()
608 self.__set_replaces()
609 self.__set_section()
610@@ -75,7 +92,8 @@
611
612
613 def __set_name(self):
614- newcontent = self.template_content.replace('<NAME>', config['info']['name'])
615+ name = config['info']['name']
616+ newcontent = self.template_content.replace('<NAME>', name)
617 self.template_content = newcontent
618
619
620@@ -86,31 +104,43 @@
621
622
623 def __set_predepends(self):
624- predepends = self.__parse_deps('/gcs/predepends')
625+ predepends = self.__parse_list('/gcs/predepends')
626 newcontent = self.template_content.replace('<PREDEPENDS>', predepends)
627 self.template_content = newcontent
628
629
630 def __set_depends(self):
631- depends = self.__parse_deps('/gcs/depends')
632+ depends = self.__parse_list('/gcs/depends')
633 newcontent = self.template_content.replace('<DEPENDS>', depends)
634 self.template_content = newcontent
635
636
637+ def __set_recommends(self):
638+ recommends = self.__parse_list('/gcs/recommends')
639+ newcontent = self.template_content.replace('<RECOMMENDS>', recommends)
640+ self.template_content = newcontent
641+
642+
643+ def __set_suggests(self):
644+ suggests = self.__parse_list('/gcs/suggests')
645+ newcontent = self.template_content.replace('<SUGGESTS>', suggests)
646+ self.template_content = newcontent
647+
648+
649 def __set_conflicts(self):
650- conflicts = self.__parse_deps('/gcs/conflicts')
651+ conflicts = self.__parse_list('/gcs/conflicts')
652 newcontent = self.template_content.replace('<CONFLICTS>', conflicts)
653 self.template_content = newcontent
654
655
656 def __set_replaces(self):
657- replaces = self.__parse_deps('/gcs/replaces')
658+ replaces = self.__parse_list('/gcs/replaces')
659 newcontent = self.template_content.replace('<REPLACES>', replaces)
660 self.template_content = newcontent
661
662
663 def __set_provides(self):
664- provides = self.__parse_deps('/gcs/provides')
665+ provides = self.__parse_list('/gcs/provides')
666 newcontent = self.template_content.replace('<PROVIDES>', provides)
667 self.template_content = newcontent
668
669@@ -132,28 +162,55 @@
670 newcontent = newcontent.replace('<LONGDESC>', longdesc)
671 self.template_content = newcontent
672
673- def __parse_deps(self, file):
674+ def __parse_list(self, file):
675 try:
676- depends_list = open(config['source_path'] + file).readlines()
677+ input_list = open(config['source_path'] + file).readlines()
678 except IOError:
679- #print "No existe el fichero gcs/predepends"
680+ #print "No existe el fichero %s" % file
681 return ''
682+
683+ # TODO: Improve this pseudo syntax check
684+ p = re.compile(r"""
685+ (?P<name>
686+ .*
687+ )
688+ [ ]*
689+ (?P<version>
690+ [(]?
691+ [<>=]+[ ]*.+
692+ [)]?
693+ )?
694+ """, re.VERBOSE)
695
696- new_depends = []
697- for depend in depends_list:
698- depend = depend.strip()
699- if not depend or depend.startswith('#'):
700+ output_list = []
701+ for line in input_list:
702+ line = line.strip()
703+ if not line or line.startswith('#'):
704 continue
705- name_and_version = depend.split()
706-
707- depend_string = name_and_version[0]
708- if len(name_and_version) == 2:
709- depend_string += " (%s)" %(name_and_version[1])
710-
711- new_depends.append(depend_string)
712-
713- depends = ', '.join(new_depends)
714- return depends
715+
716+ output_items = []
717+ items_list = line.split('|')
718+
719+ for item in items_list:
720+ m = p.match(item)
721+ name = m.group('name')
722+ version = m.group('version')
723+
724+ if not name:
725+ print "Error parsing %s" % file
726+ sys.exit(1)
727+
728+ item_string = name
729+ if version:
730+ item_string += " (%s)" % version.strip('()')
731+
732+ output_items.append(item_string)
733+
734+ line_string = '| '.join(output_items)
735+ output_list.append(line_string)
736+
737+ output_string = ', '.join(output_list)
738+ return output_string
739
740
741
742@@ -165,9 +222,9 @@
743 """
744
745 def __init__(self):
746- self.dhinstall_list = []
747- self.copy_list = []
748- self.dirs = []
749+ self.install_list = []
750+ self.links_list = []
751+ self.dirs_list = []
752 FileGenerator.__init__(self)
753
754
755@@ -192,7 +249,7 @@
756 if (len(line_tuple) != 2) or line.startswith('#'):
757 continue
758
759- self.__add_dhinstall(*line_tuple)
760+ self.__add_install(*line_tuple)
761
762
763 def __process_skel(self, skel_name):
764@@ -209,57 +266,79 @@
765 if not '/.svn' in dirname:
766 dir_to_add = dirname[dest_stuff_len - 1:]
767 if dir_to_add:
768- self.dirs.append(dirname[dest_stuff_len - 1:])
769+ self.dirs_list.append(dirname[dest_stuff_len - 1:])
770
771 for fname in file_names:
772 base_path = dirname + os.sep + fname
773 orig_path = base_path[orig_stuff_len:]
774 dest_path = base_path[dest_stuff_len:]
775
776- if (not '/.svn' in orig_path) and\
777- os.path.isfile(orig_path):
778- dest_path = os.path.dirname(dest_path)
779- self.__add_dhinstall(orig_path, dest_path)
780- elif os.path.islink(orig_path):
781- dest_path = os.path.dirname(dest_path)
782- self.__add_copy(orig_path, dest_path)
783+ if ('/.svn' in orig_path):
784+ continue
785+
786+ if os.path.islink(orig_path):
787+ orig_path = os.readlink(base_path)
788+ self.__add_link(orig_path, dest_path)
789+ elif os.path.isfile(orig_path):
790+ dest_path = os.path.dirname(dest_path)
791+ if skel_name == "conffiles_skel":
792+ dest_path = os.path.join(config['diverts_basepath'], dest_path)
793+ self.__add_install(orig_path, dest_path)
794
795 os.path.walk(config['source_path'] + '/gcs/' + skel_name,
796 set_dhinstall, None)
797
798
799 def __write_rules_file(self):
800- dhinstall_content = '\n'.join(self.dhinstall_list)
801- copy_content = '\n'.join(self.copy_list)
802- commands_content = '\n'.join([dhinstall_content, copy_content])
803+ dhinstall_content = ''
804 newcontent = self.template_content.replace('<DHINSTALL_SLOT>',
805- commands_content)
806+ dhinstall_content)
807 self.template_content = newcontent
808
809- self._write_file('debian/rules')
810- os.chmod(config['source_path'] + '/' + 'debian/rules', 0755)
811+ self._write_file('debian/rules', 0755)
812+
813+ # write debian/install file
814+ install_file = open(config['source_path'] + '/debian/install', 'w')
815+ install_file.write('\n'.join(self.install_list))
816+ install_file.close()
817
818 # write debian/dirs file
819 dirs_file = open(config['source_path'] + '/debian/dirs', 'w')
820- dirs_file.write('\n'.join(self.dirs))
821+ dirs_file.write('\n'.join(self.dirs_list))
822 dirs_file.close()
823
824-
825- def __add_dhinstall(self, orig_path, dest_path):
826- if not dest_path:
827- return
828- #dest_path = os.path.dirname(dest_path)
829- command = ''
830- # If we aren't working with config files or we are working with them but has the appropiate
831- # extension fill the command
832- if not ('gcs/conffiles_skel/' in orig_path) or orig_path.endswith(config['config_extension']):
833- exclude_arg = ''
834- if os.path.isdir(orig_path + '/.svn'):
835- exclude_arg = '--exclude=.svn'
836- command = '\tdh_install %s "%s" "%s"' % (exclude_arg, orig_path, dest_path)
837-
838- if command:
839- self.dhinstall_list.append(command)
840+ # write debian/links file
841+ links_file = open(config['source_path'] + '/debian/links', 'w')
842+ links_file.write('\n'.join(self.links_list))
843+ links_file.close()
844+
845+
846+ def __add_install(self, orig_path, dest_path):
847+ if not dest_path:
848+ return
849+ #dest_path = os.path.dirname(dest_path)
850+ command = ''
851+ # If we aren't working with config files or we are working with them but has the appropiate
852+ # extension fill the command
853+ if not ('gcs/conffiles_skel/' in orig_path) or orig_path.endswith(config['config_extension']):
854+ command = orig_path + " " + dest_path
855+
856+ if command:
857+ self.install_list.append(command)
858+
859+
860+ def __add_link(self, orig_path, dest_path):
861+ if not dest_path:
862+ return
863+ #dest_path = os.path.dirname(dest_path)
864+ command = ''
865+ # If we aren't working with config files or we are working with them but has the appropiate
866+ # extension fill the command
867+ if not ('gcs/conffiles_skel/' in orig_path) or orig_path.endswith(config['config_extension']):
868+ command = orig_path + " " + dest_path
869+
870+ if command:
871+ self.links_list.append(command)
872
873
874 def __add_copy(self, orig_path, dest_path):
875@@ -285,7 +364,7 @@
876 self.actual_content = open(config['source_path'] + \
877 '/gcs/changelog').read()
878 self.changelog_exists = True
879- except:
880+ except Exception:
881 self.actual_content = ''
882 self.changelog_exists = False
883
884@@ -293,7 +372,6 @@
885
886
887 def activate(self):
888- debchangelog_path = config['source_path'] + '/debian/changelog'
889 if self.__is_new_version():
890 self.set_template_content('changelog_template')
891
892@@ -303,9 +381,8 @@
893 self.template_content += '\n\n' + self.actual_content
894 self._write_file('gcs/changelog')
895 self._write_file('debian/changelog')
896- elif self.changelog_exists and (not os.path.exists(debchangelog_path)):
897- orig_changelog_path = config['source_path'] + '/gcs/changelog'
898- shutil.copy(orig_changelog_path, debchangelog_path)
899+ elif self.changelog_exists:
900+ self._copy_file('gcs/changelog', 'debian/changelog')
901
902
903 def __set_basic_info(self):
904@@ -314,6 +391,8 @@
905 info['name'])
906 newcontent = newcontent.replace('<VERSION>',
907 str(info['version']))
908+ newcontent = newcontent.replace('<DISTRIB>',
909+ os.popen('lsb_release -cs').read()[:-1])
910 newcontent = newcontent.replace('<AUTHOR>',
911 info['author'])
912 newcontent = newcontent.replace('<DATE>',
913@@ -367,18 +446,26 @@
914 self.divert_content = ''
915 self.scripts_path = ''
916
917+ # Default DebConf slot for all derivated classes
918+ self.debconf_content = '''
919+## Source debconf library.
920+. /usr/share/debconf/confmodule
921+'''
922+
923
924 def activate(self):
925 self.set_template_content(self.template_name)
926 initial_content = self.template_content
927+ initial_content = initial_content.replace('<DEBCONF_SLOT>', '')
928 initial_content = initial_content.replace('<DIVERT_SLOT>', '')
929 initial_content = initial_content.replace('<SCRIPTS_SLOT>', '')
930
931+ self._set_debconf()
932 self._set_divert()
933 self._set_install_scripts()
934
935 if initial_content != self.template_content:
936- self._write_file(self.file_path)
937+ self._write_file(self.file_path, 0755)
938 else:
939 try:
940 os.remove(config['source_path'] + '/' + self.file_path)
941@@ -386,6 +473,15 @@
942 pass
943
944
945+ def _set_debconf(self):
946+ if not config['questions']:
947+ self.debconf_content = ''
948+
949+ newcontent = self.template_content.replace('<DEBCONF_SLOT>',
950+ self.debconf_content)
951+ self.template_content = newcontent
952+
953+
954 def _set_divert(self):
955 newcontent = self.template_content.replace('<DIVERT_SLOT>',
956 self.divert_content)
957@@ -446,6 +542,12 @@
958 self.template_name = 'postrm_template'
959 self.file_path = 'debian/postrm'
960 self.scripts_path = 'gcs/remove_scripts/pos/'
961+ self.debconf_content += '''
962+if [ "$1" = "purge" ]; then
963+ # Remove my changes to the db.
964+ db_purge
965+fi
966+'''
967
968
969
970@@ -457,8 +559,102 @@
971
972
973
974+class SourceFormatGenerator(FileGenerator):
975+
976+ def activate(self):
977+ self.set_template_content('sourceformat_template')
978+ self._write_file('debian/source/format')
979+
980+
981+
982+class ConfigGenerator(FileGenerator):
983+ """ Generate debian/config file from configuration, if it exists
984+ """
985+ def __init__(self):
986+ self.dbinput_list = []
987+ FileGenerator.__init__(self)
988+
989+ def __set_debconf_questions(self):
990+ for question in config['questions']:
991+ self.dbinput_list.append('db_input critical %s || true' % question['Template'])
992+ dbinput_content = '\n'.join(self.dbinput_list)
993+ newcontent = self.template_content.replace('<DBINPUT_SLOT>', dbinput_content)
994+ self.template_content = newcontent
995+
996+ def activate(self):
997+ """ Generate debian/config file
998+
999+ Steps:
1000+
1001+ 1) Obtain control template
1002+ 2) Set template content from configuration.
1003+ 3) Write debian/config file
1004+ """
1005+ self.set_template_content('config_template')
1006+ initial_content = self.template_content
1007+ initial_content = initial_content.replace('<DBINPUT_SLOT>', '')
1008+
1009+ # Allow custom configuration scripts
1010+ if os.path.exists(config['source_path'] + '/gcs/install_scripts/config'):
1011+ self._copy_file('gcs/install_scripts/config', 'debian/config', 0755)
1012+ pass
1013+
1014+ self.__set_debconf_questions()
1015+
1016+ if initial_content != self.template_content:
1017+ self._write_file('debian/config')
1018+ else:
1019+ try:
1020+ os.remove(config['source_path'] + '/config')
1021+ except:
1022+ pass
1023+
1024+
1025+class TemplatesGenerator(FileGenerator):
1026+ """ Generate debian/templates file
1027+ """
1028+ def __init__(self):
1029+ FileGenerator.__init__(self)
1030+ self.template_keys = ( 'Template', 'Type', 'Description' )
1031+
1032+
1033+ def _gen_template_content(self):
1034+ for question in config['questions']:
1035+ for key in self.template_keys:
1036+ value = question[key].replace("\n", "\n ")
1037+ value = re.sub(r'\n $', '', value)
1038+ self.template_content += key + ': ' + value + "\n"
1039+ self.template_content += "\n"
1040+
1041+
1042+ def activate(self):
1043+ initial_content = self.template_content
1044+
1045+ self._gen_template_content()
1046+
1047+ if initial_content != self.template_content:
1048+ self._write_file('debian/templates')
1049+ else:
1050+ try:
1051+ os.remove(config['source_path'] + '/templates')
1052+ except:
1053+ pass
1054+
1055+
1056+
1057 class CopyrightGenerator(FileGenerator):
1058
1059 def activate(self):
1060 self.set_template_content('copyright_template')
1061+
1062+ self.__set_author()
1063+
1064 self._write_file('debian/copyright')
1065+
1066+
1067+ def __set_author(self):
1068+ from datetime import date
1069+ today = date.today()
1070+ author = "Copyright %s, %s" % (today.year, config['info']['author'])
1071+ newcontent = self.template_content.replace('<AUTHOR>', author)
1072+ self.template_content = newcontent
1073
1074=== modified file 'generators/part.py'
1075--- generators/part.py 2008-03-25 17:29:55 +0000
1076+++ generators/part.py 2010-09-25 22:48:44 +0000
1077@@ -60,17 +60,6 @@
1078 abs_path.endswith(extension):
1079 divert_method(dest_path)
1080
1081- desktop_extension = 'desktop' + extension
1082- if fname.endswith(desktop_extension):
1083- if divert_method == self.__add_divert:
1084- real_conf_path = dest_path[: -len(extension)]
1085- command = "rm %s\n" % real_conf_path
1086- command += "cp %s %s\n\n" % (dest_path, real_conf_path)
1087- self.diverts.append(command)
1088-
1089- elif divert_method == self.__rm_divert:
1090- pass
1091-
1092 os.path.walk(config['source_path'] + '/gcs/conffiles_skel',
1093 set_divert, None)
1094
1095@@ -85,10 +74,11 @@
1096 pkg_name = config['info']['name']
1097 divert_command = '[ "%s" != "$(dpkg-divert --truename %s)" ] && rm -f %s && dpkg-divert --rename --remove %s\n' % (real_conf_path, real_conf_path, real_conf_path, real_conf_path)
1098
1099- divert_command += "dpkg-divert --package %s --rename " % pkg_name
1100- divert_command += "--quiet --add %s\n" % real_conf_path
1101+ divert_command += "dpkg-divert --package %s " % pkg_name
1102+ divert_command += "--divert %s.distrib " % os.path.join(config['diverts_basepath'], real_conf_path[1:])
1103+ divert_command += "--rename --quiet --add %s\n\n" % real_conf_path
1104
1105- divert_command += "ln -fs %s %s\n\n" % (dest_path, real_conf_path)
1106+ divert_command += "ln -fs %s %s\n\n" % (os.path.join(config['diverts_basepath'], dest_path[1:]), real_conf_path)
1107
1108 self.diverts.append(divert_command)
1109
1110
1111=== modified file 'skel/README.gcs'
1112--- skel/README.gcs 2008-03-25 17:29:55 +0000
1113+++ skel/README.gcs 2010-09-25 22:48:44 +0000
1114@@ -18,10 +18,15 @@
1115
1116 * Fichero //changelog//. Contendrá los cambios realizados por las distintas versiones. Se genera automáticamente. No se debería tocar.
1117
1118+ * Fichero //provides//. Describe los paquetes virtuales o no virtuales que este paquete proporciona.
1119+
1120 * Fichero //depends//. Contendrá las dependencias de nuestro paquete.
1121
1122 * Fichero //predepends//. Contendrá las pre-dependencias de nuestro paquete.
1123
1124+ * Fichero //recommends//. Contendrá las recomendaciones de nuestro paquete.
1125+
1126+ * Fichero //suggests//. Contendrá las sugerencias de nuestro paquete.
1127
1128 La sintaxis de cada fichero y una información más detallada están incluidos en cada uno de ellos.
1129
1130
1131=== modified file 'skel/gcs/depends'
1132--- skel/gcs/depends 2008-03-25 17:29:55 +0000
1133+++ skel/gcs/depends 2010-09-25 22:48:44 +0000
1134@@ -2,4 +2,4 @@
1135 # Ejemplos:
1136 #
1137 # gnome-terminal
1138-# nautilus >=2.6.10
1139+# nautilus (>=2.6.10)
1140
1141=== modified file 'skel/gcs/info'
1142--- skel/gcs/info 2009-03-12 20:51:41 +0000
1143+++ skel/gcs/info 2010-09-25 22:48:44 +0000
1144@@ -11,7 +11,7 @@
1145 priority: optional
1146
1147 # Section
1148-section: seccion de la aplicacion
1149+section: seccion_de_la_aplicacion
1150
1151 # Descripción corta
1152 shortdesc: "descripción corta"
1153
1154=== added directory 'skel/gcs/questions'
1155=== added file 'skel/gcs/questions/01first'
1156--- skel/gcs/questions/01first 1970-01-01 00:00:00 +0000
1157+++ skel/gcs/questions/01first 2010-09-25 22:48:44 +0000
1158@@ -0,0 +1,15 @@
1159+Template: foo/bar
1160+Type: string
1161+Default: foo
1162+Description: This is a sample string question.
1163+ This is its extended description.
1164+ .
1165+ Notice that:
1166+ - Like in a debian package description, a dot
1167+ on its own line sets off a new paragraph.
1168+ - Most text is word-wrapped, but doubly-indented
1169+ text is left alone, so you can use it for lists
1170+ of items, like this list. Be careful, since
1171+ it is not word-wrapped, if it's too wide
1172+ it will look bad. Using it for short items
1173+ is best (so this is a bad example).
1174
1175=== added file 'skel/gcs/questions/02second'
1176--- skel/gcs/questions/02second 1970-01-01 00:00:00 +0000
1177+++ skel/gcs/questions/02second 2010-09-25 22:48:44 +0000
1178@@ -0,0 +1,4 @@
1179+Template: foo/baz
1180+Type: boolean
1181+Description: Clear enough, no?
1182+ This is another question, of boolean type.
1183
1184=== modified file 'templates/changelog.template'
1185--- templates/changelog.template 2009-03-12 20:28:14 +0000
1186+++ templates/changelog.template 2010-09-25 22:48:44 +0000
1187@@ -1,4 +1,4 @@
1188-<NAME> (<VERSION>) jaunty; urgency=low
1189+<NAME> (<VERSION>) <DISTRIB>; urgency=low
1190
1191 <CHANGES>
1192 -- <AUTHOR> <DATE>
1193
1194=== added file 'templates/config.template'
1195--- templates/config.template 1970-01-01 00:00:00 +0000
1196+++ templates/config.template 2010-09-25 22:48:44 +0000
1197@@ -0,0 +1,14 @@
1198+#!/bin/sh
1199+
1200+set -e
1201+
1202+## Source debconf library.
1203+. /usr/share/debconf/confmodule
1204+## Require debconf protocol version 2.0
1205+db_version 2.0
1206+## This conf script is capable of backing up
1207+db_capb backup
1208+
1209+<DBINPUT_SLOT>
1210+
1211+db_go || true
1212
1213=== modified file 'templates/control.template'
1214--- templates/control.template 2009-06-17 09:08:22 +0000
1215+++ templates/control.template 2010-09-25 22:48:44 +0000
1216@@ -3,14 +3,16 @@
1217 Priority: <PRIORITY>
1218 Maintainer: <MANTAINER>
1219 Build-Depends: debhelper (>= 7.0)
1220-Standards-Version: 3.8.0
1221+Standards-Version: 3.8.4
1222
1223 Package: <NAME>
1224 Architecture: all
1225 Provides: <PROVIDES>
1226 Replaces: <REPLACES>
1227-Pre-Depends: <PREDEPENDS>
1228+Pre-Depends: ${misc:Depends}, <PREDEPENDS>
1229 Depends: <DEPENDS>
1230+Recommends: <RECOMMENDS>
1231+Suggests: <SUGGESTS>
1232 Conflicts: <CONFLICTS>
1233 Description: <SHORTDESC>
1234 <LONGDESC>
1235
1236=== modified file 'templates/copyright.template'
1237--- templates/copyright.template 2009-03-12 20:48:27 +0000
1238+++ templates/copyright.template 2010-09-25 22:48:44 +0000
1239@@ -1,4 +1,4 @@
1240-Copyright 2009, Junta de Andalucía.
1241+<AUTHOR>.
1242
1243 This program is free software; you can redistribute it and/or modify it under
1244 the terms of the GNU General Public License as published by the Free Software
1245
1246=== modified file 'templates/postinst.template' (properties changed: +x to -x)
1247--- templates/postinst.template 2008-03-25 17:29:55 +0000
1248+++ templates/postinst.template 2010-09-25 22:48:44 +0000
1249@@ -1,6 +1,11 @@
1250-#!/bin/bash
1251+#!/bin/sh
1252+
1253+set -e
1254+
1255 #DEBHELPER#
1256
1257+<DEBCONF_SLOT>
1258+
1259 <DIVERT_SLOT>
1260
1261 <SCRIPTS_SLOT>
1262
1263=== modified file 'templates/postrm.template' (properties changed: +x to -x)
1264--- templates/postrm.template 2008-03-25 17:29:55 +0000
1265+++ templates/postrm.template 2010-09-25 22:48:44 +0000
1266@@ -1,6 +1,11 @@
1267-#!/bin/bash
1268+#!/bin/sh
1269+
1270+set -e
1271+
1272 #DEBHELPER#
1273
1274+<DEBCONF_SLOT>
1275+
1276 <DIVERT_SLOT>
1277
1278 <SCRIPTS_SLOT>
1279
1280=== modified file 'templates/preinst.template' (properties changed: +x to -x)
1281--- templates/preinst.template 2008-03-25 17:29:55 +0000
1282+++ templates/preinst.template 2010-09-25 22:48:44 +0000
1283@@ -1,6 +1,11 @@
1284-#!/bin/bash
1285+#!/bin/sh
1286+
1287+set -e
1288+
1289 #DEBHELPER#
1290
1291+<DEBCONF_SLOT>
1292+
1293 <DIVERT_SLOT>
1294
1295 <SCRIPTS_SLOT>
1296
1297=== modified file 'templates/prerm.template' (properties changed: +x to -x)
1298--- templates/prerm.template 2008-03-25 17:29:55 +0000
1299+++ templates/prerm.template 2010-09-25 22:48:44 +0000
1300@@ -1,6 +1,11 @@
1301-#!/bin/bash
1302+#!/bin/sh
1303+
1304+set -e
1305+
1306 #DEBHELPER#
1307
1308+<DEBCONF_SLOT>
1309+
1310 <DIVERT_SLOT>
1311
1312 <SCRIPTS_SLOT>
1313
1314=== modified file 'templates/rules.template' (properties changed: +x to -x)
1315--- templates/rules.template 2009-05-11 15:42:41 +0000
1316+++ templates/rules.template 2010-09-25 22:48:44 +0000
1317@@ -1,41 +1,16 @@
1318 #!/usr/bin/make -f
1319-
1320-build:
1321-
1322-clean:
1323- dh_testdir
1324- dh_testroot
1325- dh_clean
1326-
1327-install: build
1328- dh_testdir
1329- dh_testroot
1330- dh_clean -k
1331- dh_installdirs -A
1332-
1333+# -*- makefile -*-
1334+# Sample debian/rules that uses debhelper.
1335+# This file was originally written by Joey Hess and Craig Small.
1336+# As a special exception, when this file is copied by dh-make into a
1337+# dh-make output file, you may use that output file without restriction.
1338+# This special exception was added by Craig Small in version 0.37 of dh-make.
1339+
1340+# Uncomment this to turn on verbose mode.
1341+#export DH_VERBOSE=1
1342+
1343+%:
1344+ dh $@
1345+
1346+install:
1347 <DHINSTALL_SLOT>
1348-
1349-binary-indep: build install
1350-
1351-binary-arch: build install
1352- dh_testdir
1353- dh_testroot
1354- dh_installdebconf
1355- dh_installdocs
1356- dh_installcron
1357- dh_installchangelogs
1358- dh_installdirs
1359- dh_link
1360- dh_strip
1361- dh_compress
1362- dh_fixperms
1363- dh_installdeb
1364- dh_shlibdeps
1365- dh_gencontrol
1366- dh_builddeb
1367-
1368-binary: binary-indep binary-arch
1369-
1370-.PHONY: build clean install binary binary-indep binary-arch
1371-
1372-
1373
1374=== added file 'templates/sourceformat.template'
1375--- templates/sourceformat.template 1970-01-01 00:00:00 +0000
1376+++ templates/sourceformat.template 2010-09-25 22:48:44 +0000
1377@@ -0,0 +1,1 @@
1378+1.0
1379
1380=== modified file 'test_pkg/debian.orig/gcs-test-pkg/DEBIAN/conffiles'
1381--- test_pkg/debian.orig/gcs-test-pkg/DEBIAN/conffiles 2008-03-25 17:29:55 +0000
1382+++ test_pkg/debian.orig/gcs-test-pkg/DEBIAN/conffiles 2010-09-25 22:48:44 +0000
1383@@ -1,2 +1,2 @@
1384 /etc/test_pkg.conf
1385-/etc/lsb-release.gv4
1386+/etc/lsb-release.gcs
1387
1388=== modified file 'test_pkg/debian.orig/gcs-test-pkg/DEBIAN/postinst'
1389--- test_pkg/debian.orig/gcs-test-pkg/DEBIAN/postinst 2008-03-25 17:29:55 +0000
1390+++ test_pkg/debian.orig/gcs-test-pkg/DEBIAN/postinst 2010-09-25 22:48:44 +0000
1391@@ -2,7 +2,7 @@
1392
1393
1394 dpkg-divert --package gcs-test-pkg --rename --quiet --add /etc/lsb-release
1395-ln -s /etc/lsb-release.gv4 /etc/lsb-release
1396+ln -s /etc/lsb-release.gcs /etc/lsb-release
1397
1398
1399
1400
1401=== renamed file 'test_pkg/debian.orig/gcs-test-pkg/etc/lsb-release.gv4' => 'test_pkg/debian.orig/gcs-test-pkg/etc/lsb-release.gcs'
1402=== modified file 'test_pkg/debian.orig/postinst'
1403--- test_pkg/debian.orig/postinst 2008-03-25 17:29:55 +0000
1404+++ test_pkg/debian.orig/postinst 2010-09-25 22:48:44 +0000
1405@@ -2,7 +2,7 @@
1406 #DEBHELPER#
1407
1408 dpkg-divert --package gcs-test-pkg --rename --quiet --add /etc/lsb-release
1409-ln -s /etc/lsb-release.gv4 /etc/lsb-release
1410+ln -s /etc/lsb-release.gcs /etc/lsb-release
1411
1412
1413
1414
1415=== modified file 'test_pkg/debian.orig/rules'
1416--- test_pkg/debian.orig/rules 2008-03-25 17:29:55 +0000
1417+++ test_pkg/debian.orig/rules 2010-09-25 22:48:44 +0000
1418@@ -14,7 +14,7 @@
1419
1420 dh_install test_pkg.conf /etc
1421 dh_install gcs/newfiles_skel/usr/share/test_pkg/newfile_example.txt usr/share/test_pkg
1422- dh_install gcs/conffiles_skel/etc/lsb-release.gv4 etc
1423+ dh_install gcs/conffiles_skel/etc/lsb-release.gcs etc
1424
1425 binary-indep: build install
1426

Subscribers

People subscribed via source and target branches