Archive for 27 octubre 2009

h1

Errores habituales con Lintian y soluciones

27/10/2009

Lintian es una utilidad para buscar errores en paquetes .deb. Algunos de ellos son:

1º) Lintian copyright-file-contains-full-gpl-license
Borrar el fichero de copyright
# echo > debian/copyright

Incluir el siguiente texto:
# nano debian/copyright

GPL 1.0 Licence
For details, read /usr/share/common-licenses/GPL

2º) copyright-without-copyright-notice
Introducir el siguiente texto, modificando los valores correspondientes en debian/copyrigth
| This package was debianized by VICTIMS NAME on
| DATE.
|
| The current Debian maintainer is YOUR NAME
|
| It was downloaded from: http://www.download.address/foo.bar.tgz
|
| Upstream Authors: Homer Simpson, Bart Simpson, Maggie Simpson
|
| Copyright: 1971 - 2001 Homer Simpson
| 2001 - 2006 Bart Simpson
|
| This program is free software; you can redistribute it and/or modify
| it under the terms of the GNU General Public License as published by
| the Free Software Foundation; either version 2 of the License.
|
| This program is distributed in the hope that it will be useful,
| but WITHOUT ANY WARRANTY; without even the implied warranty of
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
| GNU General Public License for more details.
|
| You should have received a copy of the GNU General Public License with
| the Debian GNU/Linux distribution in file /usr/share/common-licenses/GPL;
| if not, write to the Free Software Foundation, Inc., 51 Franklin St,
| Fifth Floor, Boston, MA 02110-1301, USA.
|
| On Debian systems, the complete text of the GNU General Public
| License, version 2, can be found in /usr/share/common-licenses/GPL-2.
|
| The Files in lib/maggie are Copyright 2005, 2006 Maggie Simpson
|
| This library is free software; you can redistribute it and/or
| modify it under the terms of the GNU Lesser General Public
| License as published by the Free Software Foundation; either
| version 2.1 of the License, or (at your option) any later version.
|
| This library is distributed in the hope that it will be useful,
| but WITHOUT ANY WARRANTY; without even the implied warranty of
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
| Lesser General Public License for more details.
|
| You should have received a copy of the GNU Lesser General Public
| License along with this library; if not, write to the Free Software
| Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
| On Debian systems, the complete text of the GNU Lesser General Public
| License, can be found in /usr/share/common-licenses/LGPL.
|
| The Debian packaging is (C) 2006, YOUR NAME and
| is licensed under the GPL, see above.

3º) old-fsf-address-in-copyright-file
cambiar la dirección por:
Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.

4º) depends-on-python-minimal
eliminar del fichero debian/control, línea depends, “python-minimal“, ya que será instalado por otros paquetes especificados en esa misma línea.

Fuentes: http://lists.debian.org/debian-devel-announce/2006/03/msg00023.html

Anuncios
h1

ulimit: 181: Illegal option -u

21/10/2009

En un script se puede reproducir el siguiente problema con ulimit:

ulimit: 181: Illegal option -u

Esto ocurre cuando se utiliza una shell distinta de bash. Para evitarlo, y si no hay más consecuencias en el script, vale con cambiar de shell:

#!/bin/sh
#!/bin/bash

h1

Error VBoxLinuxAdditions bad interpreter, Permission denied

19/10/2009

En la instalación de las VirtualBox tools en una imagen de VirtualBox, Debian 5.0 por ejemplo, puede ocurrir el siguiente error:

debian-xplico-demo:/media/cdrom# ./VBoxLinuxAdditions-amd64.run
-su: ./VBoxLinuxAdditions-amd64.run: /bin/sh: bad interpreter: Permission denied

Se soluciona con:

debian-xplico-demo:/media/cdrom# sudo sh /media/cdrom/VBoxLinuxAdditions.run"

Fuente: UbuntuForums.org.

h1

Error compilando ghostpdl: /usr/bin/ld: cannot find -lXext

15/10/2009

El siguiente error compilando “ghostpdl“:

#kubuntu@kubuntu:~/xbuild/ghostpdl-8.70$ make
./obj/echogs -a ./obj/ldall.tr -s - ./obj/gsromfs1.o ./obj/plmain.o ./obj/plimpl.o  -lm -lpthread -ldl
sh <./obj/ldall.tr
/usr/bin/ld: cannot find -lXext
collect2: ld returned 1 exit status
make[2]: *** [obj/pcl6] Error 1
make[2]: Leaving directory `/home/kubuntu/xbuild/ghostpdl-8.70/main'
make[1]: *** [pdl-product] Error 2
make[1]: Leaving directory `/home/kubuntu/xbuild/ghostpdl-8.70/main'
make: *** [pcl] Error 2

se soluciona instalando la siguiente librería.

kubuntu@kubuntu:~$ sudo apt-get install libxext-dev

En algunos entornos también puede ser necesario libx11-dev:

kubuntu@kubuntu:~$ sudo apt-get install libx11-dev

h1

Como medir el tiempo que utiliza un proceso en ejecutarse

07/10/2009

Si se desean realizar por ejemplo comparativas de distintos binarios para comprobar su rendimiento, una de los parámetros a estudiar puede ser el tiempo de ejecución de los mismos sobre la misma máquina.

Para ello, en vez de utilizar un script bash con el comando “date –rfc-3339=ns”, se puede utilizar el comando “time” seguido del programa, a modo de cronómetro.

carlos@WhenIGrowUp:~/tmp/capturas.tests$ time cat /etc/debian_version
lenny/sid
real 0m0.003s
user 0m0.004s
sys 0m0.004s