(→Listado de Opciones de Alien) |
(→Listado de Opciones de Alien) |
||
| Línea 182: | Línea 182: | ||
| + | * '''--description=desc''': Permite especificar una descripción para el paquete binario. Esto sólo tiene un efecto cuando se convierte un paquete .tgz, que carece de descripciones. | ||
| − | + | * '''--version=version''': Permite especificar una versión para el paquete binario. Esto sólo tiene un efecto cuando se convierte un paquete .tgz, que pueden carecer de información de versión. Nota: Si pasamos esta opción sin argumentos se mostrará en su lugar la versión de alien. | |
| − | + | ||
| − | + | ||
| − | + | ||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
-c, --scripts | -c, --scripts | ||
| |
Uno o más colaboradores están trabajando actualmente en extender esta página. Es posible que, a causa de ello, haya lagunas de contenido, deficiencias de formato o texto en otros idiomas. Por favor, antes de realizar correcciones mayores o reescrituras, contacta con ellos en su página de usuario o en la página de discusión del artículo para poder coordinar la redacción. |
Alien es un script en Perl que nos permite convertir entre diferentes formatos de paquetes binarios de GNU/Linux, pudiendo pasar entre sí cualquiera de estos formatos:
Usando alien podemos por tanto, convertir por ejemplo paquetes precompilados de debian (debian, esware, etc…) a .rpm’s (Red Hat, Conectiva, Mandrake, SuSE,…), o paquetes .rpm a .tgz (muy sencillos de descomprimir), de una forma sencilla, rápida y muy cómoda. También soporta paquetes LSB.
Contenido |
Alien no debería ser empleado para sustituir paquetes de sistema importantes como init, libc u otros que sean esenciales para el funcionamiento de nuestro sistema. Muchos de estos paquetes están configurados de forma distinta por las diferentes distribuciones existentes y no son intercambiables.
En general, si no podemos desinstalar/eliminar un paquete determinado de nuestro sistema sin romper la estabilidad del mismo, no debemos intentar cambiarlo con una versión convertida a través de alien.
Podemos instalar Alien a través de terminal (apt-get o aptitude) o del gestor de paquetes Synaptic de Ubuntu o Adept de Kubuntu. De este modo no tendremos que preocuparnos por dependencias.
Para instalarlo desde uno de los gestores de paquetes gráficos (Synaptic o Adept), sólo hay que buscar el paquete e indicarle "instalar".
Para instalarlo a través de un terminal podemos hacerlo mediante apt-get:
sudo apt-get install alien
o mediante aptitude:
sudo aptitude install alien
En cuanto al formato de paquetes, para aquellos que quieran saber más de las interioridades (librerías, requisitos, dependencias,...) de este script, podemos añadir lo siguiente. Para un usuario estándar esta información no es precisa, ya que instalando por cualquiera de los métodos mencionados anteriormente ya queda alien perfectamente funcional.
Para convertir a .rpm o desde .rpm a otro formato será imprescindible instalar el Gestor de Paquetes RedHat.
Unlike the other package formats, alien can handle the depenenden‐
cies of lsb packages if the destination package format supports
dependencies. Note that this means that the package generated from
a lsb package will depend on a package named "lsb" -- your distri‐
bution should provide a package by that name, if it is lsb compli‐
ant. The scripts in the lsb package will be converted by default as
well.
To generate lsb packages, the Red Hat Package Manager must be
installed, and alien will use by preference a program named
lsb-rpm, if it exists. No guarantees are made that the generated
lsb packages will be fully LSB compliant, and it’s rather unlikely
they will unless you build them in the lsbdev environment.
Note that unlike other package formats, converting an LSB package
to another format will not cause its minor version number to be
changed.
For converting to (but not from) deb format, the gcc, make, deb‐
helper, dpkg-dev, and dpkg packages must be installed.
tgz Note that when converting from the tgz format, alien will simply
generate an output package that has the same files in it as are in
the tgz file. This only works well if the tgz file has precompiled
binaries in it in a standard linux directory tree. Do NOT run alien
on tar files with source code in them, unless you want this source
code to be installed in your root directory when you install the
package!
pkg To manipulate packages in the Solaris pkg format (which is really
the SV datastream package format), you will need the Solaris
pkginfo and pkgtrans tools.
El uso que le vamos a dar a Alien va a ser principalmente para:
En este caso no queremos instalarlo, si no sólo convertirlo para ponerlo a disposición de la comunidad o por otros motivos. Para ello debemos usar una de las siguientes opciones:
alien --to-deb package.rpm ----> Convertimos el paquete "package.rpm" a formato deb en el paquete "package.deb"
alien --to-rpm package.deb ----> Convertimos el paquete "package.deb" a formato rpm en el paquete "package.rpm"
Incluso podemos hacer conversiones múltiples:
alien --to-deb --to-rpm --to-tgz --to-slp foo.deb bar.rpm baz.tgz
En este caso creamos 9 paquetes nuevos. Cuando finaliza el proceso, foo.deb, bar.rpm y baz.tgz estarán disponibles en los 4 formatos de paquete: .deb, .rpm, .tgz y .slp.
Para hacer esto podemos convertir primero el paquete al formato binario que deseemos y luego instalarlo con el gestor de paquetes binarios propios de nuestra distribución. En Ubuntu sería un paquete .deb que instalaríamos a través de terminal con dpkg o gráficamente con Gdebi.
Si por el contrario queremos convertir el paquete e instalarlo directamente, tendríamos que abrir una terminal y escribir:
alien -i package.rpm
Este comando convertirá a package.rpm a package.deb (en el caso de Ubuntu el propio alien ya detecta que se ha de hacer una conversión a .deb, por lo que no es preciso especificar la opción "--to-deb". En otra distribución haría la propio) e instalará el paquete generado directamete.
Las opciones son lo que dan funcionalidad y potencia al script. A pesar de ello, si no ponemos opciones, Alien convertirá de forma predeterminada cualquier paquete que le presentemos a formato .deb.
En caso de usar opciones, el formato de uso será:
alien [options] file [...]
Las opciones posibles son:
Además, esta opción permite emplear las siguientes funciones:
Be less strict about which patch file is used, perhaps attempting
to use a patch file for an older verson of the package. This is not
guaranteed to always work; older patches may necessarily not work
with newer packages.
--nopatch
Do not use any patch files.
-c, --scripts
Try to convert the scripts that are meant to be run when the packâ
age is installed and removed. Use this with caution, becuase these
scripts might be designed to work on a system unlike your own, and
could cause problems. It is recommended that you examine the
scripts by hand and check to see what they do before using this
option.
This is enabled by default when converting from lsb packages.
-T, --test
Test the generated packages. Currently this is only supported for
debian packages, which, if lintian is installed, will be tested
with lintian and lintianâs output displayed.
-k, --keep-version
By default, alien adds one to the minor version number of each
package it converts. If this option is given, alien will not do
this.
--bump=number
Instead of incrementing the version number of the converted package
by 1, increment it by the given number.
--fixperms
Sanitize all file owners and permissions when building a deb. This
may be useful if the original package is a mess. On the other hand,
it may break some things to mess with their permissions and owners
to the degree this does, so it defaults to off. This can only be
used when converting to debian packages.
-v, --verbose
Be verbose: Display each command alien runs in the process of conâ
verting a package.
--veryverbose
Be verbose as with --verbose, but also display the output of each
command run. Some commands may generate a lot of output.
-h, --help
Display a short usage summary.
-V, --version
Display the version of alien.
EXAMPLES
Here are some examples of the use of alien:
alien --to-deb package.rpm
Convert the package.rpm into a package.deb
alien --to-rpm package.deb
Convert the package.deb into a package.rpm
alien -i package.rpm
Convert the package.rpm into a package.deb (converting to a .deb
package is default, so you need not specify --to-deb), and install
the generated package.
alien --to-deb --to-rpm --to-tgz --to-slp foo.deb bar.rpm baz.tgz
Creates 9 new packages. When it is done, foo bar and baz are availâ
able in all 4 package formats.
ENVIRONMENT
alien recognizes the following environemnt variables:
RPMBUILDOPTS
Options to pass to rpm when it is building a package.
RPMINSTALLOPT
Options to pass to rpm when it is installing a package.
EMAIL
If set, alien assumes this is your email address. Email addresses
are included in generated debian packages.
NOTES
When using alien to convert a tgz package, all files in /etc in are
assumed to be configuration files.
If alien is not run as root, the files in the generated package will
have incorrect owners and permissions.
AUTHOR
alien was written by Christoph Lameter, <clameter@debian.org>.
deb to rpm conversion code was taken from the martian program by Ranâ
dolph Chung, <tausq@debian.org>.
The Solaris pkg code was written by Mark A. Hershberger <mah@everyââ
body.org>.
alien has been extensively rewritten (3 times) and is now maintained by
Joey Hess, <joeyh@debian.org>.
COPYRIGHT
alien may be copied and modified under the terms of the GNU General
Public License.
perl v5.8.8 2006-12-20 ALIEN(1p)