~ubuntu-branches/ubuntu/saucy/live-manual/saucy-proposed

« back to all changes in this revision

Viewing changes to manual/it/user_managing_a_configuration.ssi

  • Committer: Package Import Robot
  • Author(s): Daniel Baumann, Ben Armstrong, chals, Daniel Baumann
  • Date: 2012-08-10 22:48:06 UTC
  • mfrom: (29.2.6 sid)
  • Revision ID: package-import@ubuntu.com-20120810224806-i4vzvy1ijmtt32va
Tags: 1:3.0~a15-1
[ Ben Armstrong ]
* Renaming keyboard-variant to keyboard-variants, matching latest
  live-config.

[ chals ]
* Updating Spanish and French translations to keyboard-variants.

[ Ben Armstrong ]
* Beginning change from predefined package lists to metapackages.

[ chals ]
* Updating Spanish translation of user_customization-packages.ssi.po.

[ Daniel Baumann ]
* Updating the internal list of strings that get automatically a
  certain markup (like debian release codenames, debian packages
  names, etc.).

[ chals ]
* Insisting on the fact that achieving a 100% translation is important
  in respect to code blocks.
* Updating French translation of user_customization.ssi.po, after the
  addition of metapackages.
* Updating Catalan translation of user_customization-packages.ssi.po,
  after the addition of metapackages.

[ Ben Armstrong ]
* Updating apt pinning example to correct actual metapackage
  dependencies.
* Rewriting introductory package list sections around metapackages
  instead of predefined lists.

[ chals ]
* Updating translation of es/user_customization-packages.ssi (apt
  pinning).
* Updating translation of fr/user_customization-packages.ssi (apt
  pinning).
* Updating the translation of ca/user_customization-packages.ssi (apt
  pinning).
* Fixing mismatch in the indexes of the Spanish and French manuals.

[ Ben Armstrong ]
* Explaining multiple lists, dropping includes and tasks, adding
  generated lists.
* Fixing minor typo in Packages helper paragraph.

[ chals ]
* Updating Spanish translation of user_customization-packages
  (multiple lists).
* Updating French translation of user_customization-packages (multiple
  lists).
* Updating Catalan translation of user_customization-packages
  (multiple lists).
* Translating user_customization-runtime.ssi.po into Catalan.
* Revising the now unsupported '-p|--package-lists' option providing
  alternatives, thanks to Ben Armstrong for the hints.
* Copying minimal.chroot hook to config/hooks and thus making the
  example work.
* Removing 'standard-x11 list' and explaining the lists a bit better.
* Removing '--includes none' from the minimal image example as it is
  unsupported and was tested without that option.
* Providing a way to create a smaller image before the size
  optimization warning in the examples.
* Proofreading project_bugs.
* Removing the binary includes section since they were dropped.

[ Ben Armstrong ]
* Rewriting 'Managing a configuration' for greater clarity and
  introducing --config option.

[ chals ]
* Running 'make commit' to avoid conflicts and thus being able to
  commit languages individually afterwards; there are too many changes
  to cope with them all.

[ Ben Armstrong ]
* Fixing lb config --config examples: missing option.

[ chals ]
* Updating Catalan translation of user_managing a configuration, lb
  config --config.

[ Ben Armstrong ]
* Clarifying section headings relating to auto scripts.

[ chals ]
* Removing 'echo' to improve readability.
* Updating Catalan translation of the headings of auto scritps.
* Starting work to complete the Spanish translation, adding missing
  code blocks and updating user_customization-contents, project_bugs
  and user_overview.
* Starting work to complete the French translation, adding missing
  code blocks and updating user_customization-contents,
  user_customization-packages and user_overview.
* Revising the French translation of project_bugs and fixing its
  'fuzzy' string.
* Completing the French translation with user_examples and
  user_managing_a_configuration and revising po headers.
* Revising the headers in the Spanish po files that showed 'Catalan'
  by an error.

[ Ben Armstrong ]
* Updating prerequisites: Linux 3.x included.
* Updating build live-boot and live-config from source to reflect best
  practice for short-term testing.
* Clarifying example uses bash commands.

[ chals ]
* Completing the Spanish translation with
  user_managing_a_configuration, user_installation and user_examples.
* Updating French translation of user_installation.
* Updating the Catalan translation of user_installation.ssi.po.
* Fixing one title in the Spanish translation and improving one string
  in user_installation.ssi.po.

[ Ben Armstrong ]
* Clarifying --apt-recommends false has consequences for live-*
  packages.
* Updating language tasks section and examples chapter to no longer
  use task lists.

[ chals ]
* Re-adding packages left out by 'apt-recommends false' to make the
  images work properly in the examples.

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
dalla creazione iniziale, attraverso le successive revisioni e rilasci sia
7
7
del software live-build che della stessa immagine.
8
8
 
9
 
2~ Utilizzare auto per gestire i cambiamenti di configurazione
10
 
 
11
 
Le configurazioni live raramente sono perfette da riuscire al primo colpo,
12
 
servono una serie di revisioni prima di essere soddisfatti. Tuttavia, se non
13
 
si presta attenzione, possono verificarsi delle incoerenze tra una revisione
14
 
e l'altra se non si presta attenzione. Il problema principale è che una
15
 
volta assegnato un valore predefinito ad una variabile, tale valore non sarà
16
 
ricalcolato da altre variabili che possono cambiare in altre revisioni.
17
 
 
18
 
Per esempio, durante la prima configurazione della distribuzione, a molte
19
 
variabili 'dipendenti' vengono dati valori predefiniti che si adattino.Per
20
 
cui se in seguito si decide di cambiare distribuzione, quelle variabili
21
 
continueranno a mantenere vecchi valori non più appropriati.
22
 
 
23
 
Un secondo problema correlato è l'eseguire #{lb config}# e aggiornare alla
24
 
nuova versione di live-build il quale ha cambiato il nome di una delle
25
 
variabili, lo si può scoprire solamente con una revisione manuale delle
26
 
variabili nei file #{config/*}#, che sarà necessario utilizzare per
27
 
impostare nuovamente le opzioni appropriate.
28
 
 
29
 
Tutto ciò potrebbe essere un fastidio terribile se non fosse per gli script
30
 
auto/*, semplici wrapper ai comandi #{lb config}#, #{lb build}# e #{lb
31
 
clean}#, designati per aiutare nella gestione della propria
32
 
configurazione. Basta creare uno script auto/config che contenga il comando
33
 
#{lb config}# con le opzioni desiderate e un auto/clean che rimuove i file
34
 
contenenti valori delle variabili di configurazione, così ogni volta che si
35
 
usano #{lb config}# e #{lb clean}# questi file saranno eseguiti. Ciò fà sì
36
 
che la configurazione sia coerente da una revisione all'altra e tra i
37
 
rilasci delle varie versioni di live-build (sebbene si dovrà comunque fare
38
 
attenzione aggiornando live-build, leggendo la documentazione e facendo le
39
 
modifiche necessarie).
40
 
 
41
 
2~ Esempi di script automatici
42
 
 
43
 
Usare esempi di script automatici come il seguente come punto di partenza
44
 
per una nuova configurazione di live-build. Si noti che quando si invoca il
45
 
comando #{lb}# incluso nello script, si deve specificare il parametro
46
 
#{noauto}# per essere certi che lo script stesso non venga richiamato
47
 
ricorsivamente. Non dimenticare, inoltre, di accertarsi che gli script siano
48
 
eseguibili (es. #{chmod 755 auto/*}#).
49
 
 
50
 
#{auto/config}#
 
9
2~ Dealing with configuration changes
 
10
 
 
11
Live configurations rarely are perfect on the first try. It may be fine to
 
12
pass #{lb config}# options from the command-line to perform a single build,
 
13
but it is more typical to revise those options and build again until you are
 
14
satisfied. To support these changes, you will need auto scripts which ensure
 
15
your configuration is kept in a consistent state.
 
16
 
 
17
3~ Why use auto scripts? What do they do?
 
18
 
 
19
The #{lb config}# command stores the options you pass to it in #{config/*}#
 
20
files along with many other options set to default values. If you run #{lb
 
21
config}# again, it will not reset any option that was defaulted based on
 
22
your initial options. So, for example, if you run #{lb config}# again with a
 
23
new value for #{--distribution}#, any dependent options that were defaulted
 
24
for the old distribution may no longer work with the new. Nor are these
 
25
files intended to be read or edited. They store values for over a hundred
 
26
options, so nobody, let alone yourself, will be able to see in these which
 
27
options you actually specified. And finally, if you run #{lb config}#, then
 
28
upgrade live-build and it happens to rename an option, #{config/*}# would
 
29
still contain variables named after the old option that are no longer valid.
 
30
 
 
31
For all these reasons, #{auto/*}# scripts will make your life easier. They
 
32
are simple wrappers to the #{lb config}#, #{lb build}# and #{lb clean}#
 
33
commands that are designed to help you manage your configuration. The
 
34
#{auto/config}# script stores your #{lb config}# command with all desired
 
35
options, the #{auto/clean}# script removes the files containing
 
36
configuration variable values, and the #{auto/build}# script keeps a
 
37
#{build.log}# of each build. Each of these scripts is run automatically
 
38
every time you run the corresponding #{lb}# command. By using these scripts,
 
39
your configuration is easier to read and is kept internally consistent from
 
40
one revision to the next. Also, it will be much easier for you identify and
 
41
fix options which need to change when you upgrade live-build after reading
 
42
the updated documentation.
 
43
 
 
44
3~ Use example auto scripts
 
45
 
 
46
For your convenience, live-build comes with example auto shell scripts to
 
47
copy and edit. Start a new, default configuration, then copy the examples
 
48
into it:
 
49
 
 
50
code{
 
51
 
 
52
 $ mkdir mylive && cd mylive && lb config
 
53
 $ cp /usr/share/doc/live-build/examples/auto/* auto/
 
54
 
 
55
}code
 
56
 
 
57
Edit #{auto/config}#, adding any options as you see fit. For instance:
51
58
 
52
59
code{
53
60
 
54
61
 #!/bin/sh
55
62
 lb config noauto \
56
 
     --package-lists "standard" \
 
63
     --architectures i386 \
 
64
     --linux-flavours 686-pae \
 
65
     --binary-images hdd \
 
66
     --mirror-bootstrap http://ftp.es.debian.org/debian/ \
 
67
     --mirror-binary http://ftp.es.debian.org/debian/ \
57
68
     "${@}"
58
69
 
59
70
}code
60
71
 
61
 
#{auto/clean}#
62
 
 
63
 
code{
64
 
 
65
 
 #!/bin/sh
66
 
 lb clean noauto "${@}"
67
 
 rm -f config/binary config/bootstrap \
68
 
     config/chroot config/common config/source
69
 
 rm -f build.log
70
 
 
71
 
}code
72
 
 
73
 
#{auto/build}#
74
 
 
75
 
code{
76
 
 
77
 
 #!/bin/sh
78
 
 lb build noauto "${@}" 2>&1 | tee build.log
79
 
 
80
 
}code
81
 
 
82
 
Facciamo un esempio di script automatico per live-build basato sugli esempi
83
 
precedenti; si possono copiare come punto di partenza.
84
 
 
85
 
code{
86
 
 
87
 
 $ cp /usr/share/doc/live-build/examples/auto/* auto/
88
 
 
89
 
}code
90
 
 
91
 
Modificare #{auto/config}# aggiungendo o togliendo le opzioni come meglio
92
 
credi. Nel precedente esempio, #{--package-lists standard}# è impostato al
93
 
valore predefinito; cambiarlo in un valore appropriato per l'immagine (o
94
 
cancellarlo se si desidera utilizzare un valore predefinito) e aggiungere
95
 
eventuali opzioni ulteriori in continuazione delle righe che seguono.
 
72
Now, each time you use #{lb config}#, #{auto/config}# will reset the
 
73
configuration based on these options. When you want to make changes to them,
 
74
edit the options in this file instead of passing them to #{lb config}#. When
 
75
you use #{lb clean}#, #{auto/clean}# will clean up the #{config/*}# files
 
76
along with any other build products. And finally, when you use #{lb build}#,
 
77
a log of the build will be written by #{auto/build}# in #{build.log}#.
 
78
 
 
79
Note: A special #{noauto}# parameter is used here to suppress another call
 
80
to #{auto/config}#, thereby preventing infinite recursion. Make sure you
 
81
don't accidentally remove it when making edits. Also, take care to ensure
 
82
when you split the #{lb config}# command across multiple lines for
 
83
readability, as shown in the example above, that you don't forget the
 
84
backslash (\) at the end of each line that continues to the next.
 
85
 
 
86
2~ Clone a configuration published via Git
 
87
 
 
88
Use the #{lb config --config}# option to clone a Git repository that
 
89
contains a Debian Live configuration. If you would like to base your
 
90
configuration on one maintained by the Debian Live project, look at
 
91
http://live.debian.net/gitweb for the repositories prefixed with
 
92
#{config-}#.
 
93
 
 
94
For example, to build a rescue image, use the #{config-rescue}# repository
 
95
as follows:
 
96
 
 
97
code{
 
98
 
 
99
 $ mkdir live-rescue && cd live-rescue
 
100
 $ lb config --config git://live.debian.net/git/config-rescue.git
 
101
 
 
102
}code
 
103
 
 
104
Edit #{auto/config}# and any other things you need in the #{config}# tree to
 
105
suit your needs.
 
106
 
 
107
You may optionally define a shortcut in your Git configuration by adding the
 
108
following to your #{${HOME}/.gitconfig}#:
 
109
 
 
110
code{
 
111
 
 
112
 [url "git://live.debian.net/git/"]
 
113
     insteadOf = ldn:
 
114
 
 
115
}code
 
116
 
 
117
This enables you to use #{ldn:}# anywhere you need to specify the address of
 
118
a #{live.debian.net}# git repository. If you also drop the optional #{.git}#
 
119
suffix, starting a new image using this configuration is as easy as:
 
120
 
 
121
code{
 
122
 
 
123
 $ lb config --config ldn:config-rescue
 
124
 
 
125
}code
 
126