dpkg (1.18.25) stretch; urgency=medium
[dpkg] / man / it / dpkg-architecture.man
CommitLineData
1479465f
GJ
1.\" dpkg manual page - dpkg-architecture(1)
2.\"
3.\" Copyright © 2005 Marcus Brinkmann <brinkmd@debian.org>
4.\" Copyright © 2005 Scott James Remnant <scott@netsplit.com>
5.\" Copyright © 2006-2015 Guillem Jover <guillem@debian.org>
6.\" Copyright © 2009-2012 Raphaël Hertzog <hertzog@debian.org>
7.\"
8.\" This is free software; you can redistribute it and/or modify
9.\" it under the terms of the GNU General Public License as published by
10.\" the Free Software Foundation; either version 2 of the License, or
11.\" (at your option) any later version.
12.\"
13.\" This is distributed in the hope that it will be useful,
14.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
15.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16.\" GNU General Public License for more details.
17.\"
18.\" You should have received a copy of the GNU General Public License
19.\" along with this program. If not, see <https://www.gnu.org/licenses/>.
20.
21.\"*******************************************************************
22.\"
23.\" This file was generated with po4a. Translate the source file.
24.\"
25.\"*******************************************************************
26.TH dpkg\-architecture 1 %RELEASE_DATE% %VERSION% "suite dpkg"
27.nh
28.SH NOME
29dpkg\-architecture \- imposta e determina l'architettura per la compilazione
30dei pacchetti
31.
32.SH SINTASSI
33\fBdpkg\-architecture\fP [\fIopzione\fP...] [\fIcomando\fP]
34.PP
35.
36.SH DESCRIZIONE
37\fBdpkg\-architecture\fP fornisce una funzionalità per determinare e impostare
38l'architettura host e di compilazione per la compilazione dei pacchetti.
39.PP
40L'architettura di compilazione è sempre determinata da una chiamata esterna
41a \fBdpkg\fP(1) e non può essere impostata dalla riga di comando.
42.PP
43È possibile specificare l'architettura ospite fornendo una o entrambe le
44opzioni \fB\-\-host\-arch\fP e \fB\-\-host\-type\fP. Quella predefinita viene
45determinata da una chiamata esterna a \fBgcc\fP(1) oppure, se entrambi \fBCC\fP e
46gcc non sono disponibili, è la stessa dell'architettura di compilazione. È
47sufficiente una di \fB\-\-host\-arch\fP e \fB\-\-host\-type\fP, il valore dell'altra
48viene impostato da un valore predefinito utilizzabile. In effetti è spesso
49meglio specificarne una sola, dato che \fBdpkg\-architecture\fP dà un
50avvertimento se la scelta non corrisponde al valore predefinito.
51.
52.SH COMANDI
53.TP
54\fB\-l\fP, \fB\-\-list\fP
55Stampa le variabili d'ambiente, una per riga, nel formato
56\fIVARIABILE=valore\fP. Questa è l'azione predefinita.
57.TP
58\fB\-e\fP, \fB\-\-equal\fP \fIarchitettura\fP
59Controlla l'uguaglianza dell'architettura (a partire da dpkg
601.13.13). Confronta l'architettura Debian ospite attuale o specificata con
61\fIarchitettura\fP, per verificare se sono uguali. Questa azione non espande
62l'espressione jolly per l'architettura. Il comando termina con uno stato di
63uscita di 0 se corrispondono e 1 altrimenti.
64
65.TP
66\fB\-i\fP, \fB\-\-is\fP \fIespressionejolly\-architettura\fP
67Controlla l'identità dell'architettura (a partire da dpkg
681.13.13). Confronta l'architettura Debian ospite attuale o specificata con
69\fIespressionejolly\-architettura\fP dopo aver fatto l'espansione
70dell'espressione jolly per l'architettura, per verificare se
71corrispondono. Il comando termina con uno stato di uscita di 0 se
72corrispondono e 1 altrimenti.
73.TP
74\fB\-q\fP, \fB\-\-query\fP \fInome\-variabile\fP
75Stampa il valore di una singola variabile.
76.TP
77\fB\-s\fP, \fB\-\-print\-set\fP
78Stampa un comando di esportazione. Può essere usata per impostare le
79variabili d'ambiente usando eval.
80.TP
81\fB\-u\fP, \fB\-\-print\-unset\fP
82Stampa un comando simile a \fB\-\-print\-unset\fP ma per deimpostare tutte le
83variabili.
84.TP
85\fB\-c\fP, \fB\-\-command\fP \fIcomando\fP
86Esegue un \fIcomando\fP in un ambiente che ha tutte le variabili impostate al
87valore determinato.
88.TP
89\fB\-L\fP, \fB\-\-list\-known\fP
90Stampa un elenco di nomi di architettura validi. Eventualmente ristretto da
91una o più delle opzioni di corrispondenza \fB\-\-match\-wildcard\fP,
92\fB\-\-match\-bits\fP o \fB\-\-match\-endian\fP (a partire da dpkg 1.17.14).
93.TP
94\fB\-?\fP, \fB\-\-help\fP
95Mostra il messaggio sull'uso ed esce.
96.TP
97\fB\-\-version\fP
98Mostra la versione ed esce.
99.
100.SH OPZIONI
101.TP
102\fB\-a\fP, \fB\-\-host\-arch\fP \fIarchitettura\fP
103Imposta l'architettura host Debian.
104.TP
105\fB\-t\fP, \fB\-\-host\-type\fP \fItipo\-sistema\-gnu\fP
106Imposta il tipo di sistema GNU ospite.
107.TP
108\fB\-A\fP, \fB\-\-target\-arch\fP \fIarchitettura\fP
109Set the target Debian architecture (since dpkg 1.17.14).
110.TP
111\fB\-T\fP, \fB\-\-target\-type\fP \fItipo\-sistema\-gnu\fP
112Set the target GNU system type (since dpkg 1.17.14).
113.TP
114\fB\-W\fP, \fB\-\-match\-wildcard\fP \fIespressionejolly\-architettura\fP
115Limita le architetture elencate da \fB\-\-list\-known\fP a quelle che
116corrispondono alla espressione jolly specificata per l'architettura (a
117partire da dpkg 1.17.14).
118.TP
119\fB\-B\fP, \fB\-\-match\-bits\fP \fIbit\-architettura\fP
120Limita le architetture elencate da \fB\-\-list\-known\fP a quelle con i bit CPU
121specificati (a partire da dpkg 1.17.14). O \fB32\fP o \fB64\fP.
122.TP
123\fB\-E\fP, \fB\-\-match\-endian\fP \fIendian\-architettura\fP
124Limita le architetture elencate da \fB\-\-list\-known\fP a quelle con la modalità
125endian specificata (a partire da dpkg 1.17.14). O \fBlittle\fP o \fBbig\fP.
126.TP
127\fB\-f\fP, \fB\-\-force\fP
128I valori impostati da variabili d'ambiente esistenti con nomi uguali a
129quelli usati dagli script vengono rispettati (cioè usati da
130\fBdpkg\-architecture\fP), tranne se viene usata questa opzione. Ciò permette
131all'utente di sovrascrivere un valore anche quando la chiamata a
132\fBdpkg\-architecture\fP è nascosta in qualche altro script (per esempio
133\fBdpkg\-buildpackage\fP(1)).
134.
135.SH TERMINOLOGIA
136.IP "macchina di compilazione" 4
137La macchina usata per creare il pacchetto.
138.IP "macchina ospite" 4
139La macchina per cui è compilato il pacchetto.
140.IP "macchina di destinazione" 4
141The machine the compiler is building for. This is only needed when building
142a cross\-toolchain, one that will be built on the build architecture, to be
143run on the host architecture, and to build code for the target architecture.
144.IP "architettura Debian" 4
145La stringa dell'architettura Debian che specifica l'albero binario
146nell'archivio FTP. Esempi: i386, sparc, hurd\-i386.
147.IP "Debian architecture tuple" 4
148A Debian architecture tuple is the fully qualified architecture with all its
149components spelled out. This differs with Debian architectures in that at
150least the \fIcpu\fP component does not embed the \fIabi\fP. The current tuple has
151the form \fIabi\fP\-\fIlibc\fP\-\fIos\fP\-\fIcpu\fP. Examples: base\-gnu\-linux\-amd64,
152eabihf\-musl\-linux\-arm.
153.IP "Debian architecture wildcard" 4
154A Debian architecture wildcard is a special architecture string that will
155match any real architecture being part of it. The general form is a Debian
156architecture tuple with four or less elements, and with at least one of them
157being \fBany\fP. Missing elements of the tuple are prefixed implicitly as
158\fBany\fP, and thus the following pairs are equivalent:
159.nf
160 \fBany\fP\-\fBany\fP\-\fBany\fP\-\fBany\fP = \fBany\fP
161 \fBany\fP\-\fBany\fP\-\fIos\fP\-\fBany\fP = \fIos\fP\-\fBany\fP
162 \fBany\fP\-\fIlibc\fP\-\fBany\fP\-\fBany\fP = \fIlibc\fP\-\fBany\fP\-\fBany\fP
163.fi
164Examples: linux\-any, any\-i386, hurd\-any, eabi\-any\-any\-arm, musl\-any\-any.
165.IP "tipo di sistema GNU" 4
166An architecture specification string consisting of two parts separated by a
167hyphen: cpu and system. Examples: i586\-linux\-gnu, sparc\-linux\-gnu,
168i686\-gnu, x86_64\-netbsd.
169.IP "multiarch triplet" 4
170The clarified GNU system type, used for filesystem paths. This triplet does
171not change even when the baseline ISA gets bumped, so that the resulting
172paths are stable over time. The only current difference with the GNU system
173type is that the CPU part for i386 based systems is always i386. Examples:
174i386\-linux\-gnu, x86_64\-linux\-gnu. Example paths:
175/lib/powerpc64le\-linux\-gnu/, /usr/lib/i386\-kfreebsd\-gnu/.
176.
177.SH VARIABILI
178\fBdpkg\-architecture\fP imposta le seguenti variabili:
179.IP \fBDEB_BUILD_ARCH\fP 4
180L'architettura Debian della macchina di compilazione.
181.IP \fBDEB_BUILD_ARCH_ABI\fP 4
182The Debian abi name of the build machine (since dpkg 1.18.11).
183.IP \fBDEB_BUILD_ARCH_LIBC\fP 4
184The Debian libc name of the build machine (since dpkg 1.18.11).
185.IP \fBDEB_BUILD_ARCH_OS\fP 4
186Il nome di sistema Debian della macchina di compilazione (a partire da dpkg
1871.13.2).
188.IP \fBDEB_BUILD_ARCH_CPU\fP 4
189Il nome Debian per la CPU della macchina di compilazione (a partire da dpkg
1901.13.2).
191.IP \fBDEB_BUILD_ARCH_BITS\fP 4
192La dimensione del puntatore della macchina di compilazione (in bit; a
193partire da dpkg 1.15.4).
194.IP \fBDEB_BUILD_ARCH_ENDIAN\fP 4
195La modalità endian della macchina di compilazione (little o big; a partire
196da dpkg 1.15.4).
197.IP \fBDEB_BUILD_GNU_CPU\fP 4
198La parte CPU di \fBDEB_BUILD_GNU_TYPE\fP.
199.IP \fBDEB_BUILD_GNU_SYSTEM\fP 4
200La parte sistema di \fBDEB_BUILD_GNU_TYPE\fP.
201.IP \fBDEB_BUILD_GNU_TYPE\fP 4
202Il tipo di sistema GNU della macchina di compilazione.
203.IP \fBDEB_BUILD_MULTIARCH\fP 4
204Il tipo di sistema GNU chiarito della macchina di compilazione usato per i
205percorsi del file system (a partire da dpkg 1.16.0).
206.IP \fBDEB_HOST_ARCH\fP 4
207L'architettura Debian della macchina ospite.
208.IP \fBDEB_HOST_ARCH_ABI\fP 4
209The Debian abi name of the host machine (since dpkg 1.18.11).
210.IP \fBDEB_HOST_ARCH_LIBC\fP 4
211The Debian libc name of the host machine (since dpkg 1.18.11).
212.IP \fBDEB_HOST_ARCH_OS\fP 4
213Il nome di sistema Debian della macchina ospite (a partire da dpkg 1.13.2).
214.IP \fBDEB_HOST_ARCH_CPU\fP 4
215Il nome Debian per la CPU della macchina host (a partire da dpkg 1.13.2).
216.IP \fBDEB_HOST_ARCH_BITS\fP 4
217La dimensione del puntatore della macchina ospite (in bit; a partire da dpkg
2181.15.4).
219.IP \fBDEB_HOST_ARCH_ENDIAN\fP 4
220La modalità endian della macchina ospite (little o big; a partire da dpkg
2211.15.4).
222.IP \fBDEB_HOST_GNU_CPU\fP 4
223La parte CPU di \fBDEB_HOST_GNU_TYPE\fP.
224.IP \fBDEB_HOST_GNU_SYSTEM\fP 4
225La parte sistema di \fBDEB_HOST_GNU_TYPE\fP.
226.IP \fBDEB_HOST_GNU_TYPE\fP 4
227Il tipo di sistema GNU della macchina ospite.
228.IP \fBDEB_HOST_MULTIARCH\fP 4
229Il tipo di sistema GNU chiarito della macchina ospite usato per i percorsi
230del file system (a partire da dpkg 1.16.0).
231.IP \fBDEB_TARGET_ARCH\fP 4
232L'architettura Debian della macchina di destinazione (a partire da dpkg
2331.17.14).
234.IP \fBDEB_TARGET_ARCH_ABI\fP 4
235The Debian abi name of the target machine (since dpkg 1.18.11).
236.IP \fBDEB_TARGET_ARCH_LIBC\fP 4
237The Debian libc name of the target machine (since dpkg 1.18.11).
238.IP \fBDEB_TARGET_ARCH_OS\fP 4
239Il nome di sistema Debian della macchina di destinazione (a partire da dpkg
2401.17.14).
241.IP \fBDEB_TARGET_ARCH_CPU\fP 4
242Il nome Debian per la CPU della macchina di destinazione (a partire da dpkg
2431.17.14).
244.IP \fBDEB_TARGET_ARCH_BITS\fP 4
245La dimensione del puntatore della macchina di destinazione (in bit; a
246partire da dpkg 1.17.14).
247.IP \fBDEB_TARGET_ARCH_ENDIAN\fP 4
248La modalità endian della macchina di destinazione (little o big; a partire
249da dpkg 1.17.14).
250.IP \fBDEB_TARGET_GNU_CPU\fP 4
251La parte CPU di \fBDEB_TARGET_GNU_TYPE\fP (a partie da dpkg 1.17.14).
252.IP \fBDEB_TARGET_GNU_SYSTEM\fP 4
253La parte sistema di \fBDEB_TARGET_GNU_TYPE\fP (a partire da dpkg 1.17.14).
254.IP \fBDEB_TARGET_GNU_TYPE\fP 4
255Il tipo di sistema GNU della macchina di destinazione (a partire da dpkg
2561.17.14).
257.IP \fBDEB_TARGET_MULTIARCH\fP 4
258Il tipo di sistema GNU chiarito della macchina di destinazione usato per i
259percorsi del file system (a partire da dpkg 1.17.14).
260.
261.SH FILE
262.SS "Tabelle delle architetture"
263All these files have to be present for \fBdpkg\-architecture\fP to work. Their
264location can be overridden at runtime with the environment variable
265\fBDPKG_DATADIR\fP. These tables contain a format \fBVersion\fP pseudo\-field on
266their first line to mark their format, so that parsers can check if they
267understand it, such as "# Version=1.0".
268.TP
269\fI%PKGDATADIR%/cputable\fP
270Table of known CPU names and mapping to their GNU name. Format version 1.0
271(since dpkg 1.13.2).
272.TP
273\fI%PKGDATADIR%/ostable\fP
274Table of known operating system names and mapping to their GNU name. Format
275version 2.0 (since dpkg 1.18.11).
276.TP
277\fI%PKGDATADIR%/tupletable\fP
278Mapping between Debian architecture tuples and Debian architecture names.
279Format version 1.0 (since dpkg 1.18.11).
280.TP
281\fI%PKGDATADIR%/abitable\fP
282Table of Debian architecture ABI attribute overrides. Format version 2.0
283(since dpkg 1.18.11).
284.SS "Supporto per pacchettizzazione"
285.TP
286\fI%PKGDATADIR%/architecture.mk\fP
287Frammento di makefile che imposta ed esporta in modo corretto tutte le
288variabili prodotte in output da \fBdpkg\-architecture\fP (a partire da dpkg
2891.16.1).
290.
291.SH ESEMPI
292\fBdpkg\-buildpackage\fP accetta l'opzione \fB\-a\fP e la passa a
293\fBdpkg\-architecture\fP. Altri esempi:
294.IP
295CC=i386\-gnu\-gcc dpkg\-architecture \-c debian/rules build
296.IP
297eval \`dpkg\-architecture \-u\`
298.PP
299Controlla se l'architettura ospite corrente o specificata è uguale ad
300un'architettura:
301.IP
302dpkg\-architecture \-elinux\-alpha
303.IP
304dpkg\-architecture \-amips \-elinux\-mips
305.PP
306Controlla se l'architettura ospite corrente o specificata è un sistema
307Linux:
308.IP
309dpkg\-architecture \-ilinux\-any
310.IP
311dpkg\-architecture \-ai386 \-ilinux\-any
312.
313.SS "Uso in debian/rules"
314Le variabili d'ambiente impostate da \fBdpkg\-architecture\fP vengono passate a
315\fIdebian/rules\fP come variabili make (vedere la documentazione di
316make). Tuttavia non si deve fare affidamento su di esse, dato che ciò rende
317non funzionanti le invocazioni manuali dello script. Le si dovrebbe invece
318inizializzare sempre usando \fBdpkg\-architecture\fP con l'opzione \fB\-q\fP. Ecco
319alcuni esempi, che mostrano anche come migliorare il supporto per la
320cross\-compilazione nei propri pacchetti:
321.PP
322Recuperare il tipo di sistema GNU e passarlo a ./configure:
323.PP
324.RS 4
325.nf
326DEB_BUILD_GNU_TYPE ?= $(shell dpkg\-architecture \-qDEB_BUILD_GNU_TYPE)
327DEB_HOST_GNU_TYPE ?= $(shell dpkg\-architecture \-qDEB_HOST_GNU_TYPE)
328[...]
329ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
330 confflags += \-\-build=$(DEB_HOST_GNU_TYPE)
331else
332 confflags += \-\-build=$(DEB_BUILD_GNU_TYPE) \e
333 \-\-host=$(DEB_HOST_GNU_TYPE)
334endif
335[...]
336\&./configure $(confflags)
337.fi
338.RE
339.PP
340Fare qualcosa solo per un'architettura specifica:
341.PP
342.RS 4
343.nf
344DEB_HOST_ARCH ?= $(shell dpkg\-architecture \-qDEB_HOST_ARCH)
345
346ifeq ($(DEB_HOST_ARCH),alpha)
347 [...]
348endif
349.fi
350.RE
351.PP
352oppure se è necessario solo controllare il tipo di CPU o sistema operativo,
353usare le variabili \fBDEB_HOST_ARCH_CPU\fP o \fBDEB_HOST_ARCH_OS\fP.
354.PP
355Notare che ci si può anche appoggiare su un frammento di Makefile esterno
356per impostare correttamente tutte le variabili che possono essere fornite da
357\fBdpkg\-architecture\fP.
358.PP
359.RS 4
360.nf
361include %PKGDATADIR%/architecture.mk
362
363ifeq ($(DEB_HOST_ARCH),alpha)
364 [...]
365endif
366.fi
367.RE
368.PP
369In ogni caso non si dovrebbe mai usare \fBdpkg \-\-print\-architecture\fP per
370ottenere informazioni sull'architettura durante la compilazione di un
371pacchetto.
372.
373.SH AMBIENTE
374.TP
375\fBDPKG_DATADIR\fP
376If set, it will be used as the \fBdpkg\fP data directory, where the
377architecture tables are located (since dpkg 1.14.17). Defaults to
378«%PKGDATADIR%».
379.SH NOTE
380Tutti i nomi lunghi di comandi e opzioni disponibili solo a partire da dpkg
3811.17.17.
382.
383.SH "VEDERE ANCHE"
384\fBdpkg\-buildpackage\fP(1), \fBdpkg\-cross\fP(1).