Outils pour utilisateurs

Outils du site


Le cas uzbl

(annexe) Débug du site uzbl.org

Page blanche lors de l'accès à https://www.uzbl.org, avec firefox (iceweasel).

Aucune réponse suite au GET (d'après la console FF).

Compilation & packaging de uzbl

Mise en place d'un chroot + schroot

debootstrap

Exemple 32 bits :

debootstrap --arch i386 testing /srv/chroot/testing32

«Si vous êtes intéressés à mettre en place un chroot pour construire des paquets Debian, regardez sbuild, cowbuilder ou pbuilder.»

⇒ Oops, j'aurais dû faire ça.

A priori, la machine de build peut être en stable. J'ai malgré tout mis un chroot Testing.

Il est assez simple de construire un paquet pour Testing sous un système Stable (sans chroot, il suffit de préciser qu'on veut les sources du paquet de Testing quand on les choppe).

schroot

Voir: /etc/schroot/*

Passage dans le chroot :

schroot -c testing32

Préparer l'environnement de compilation

  • build-essential, devscripts (fournit debuild…)
  • ajouter la ligne deb-src dans le sources.list

Sources uzbl

Une solution rapide

  • Chopper le répertoire Debian/
  • Chopper les sources d'uzbl depuis git
  • dpkg-buildpackage -us -uc -b

Problème 1: je compile sur du 64bits, et j'ai besoin du paquet en version 32bits.

Problème 2: j'ai quand même envie de voir ce que fournit le paquet dans les dépots Debian.

Recompiler paquet Debian

https://raphaelhertzog.fr/2011/07/12/comment-recompiler-un-paquet-debian/

(testing)root@mpldev:~# apt-get source uzbl
Reading package lists... Done
NOTICE: 'uzbl' packaging is maintained in the 'Git' version control system at:
git://anonscm.debian.org/collab-maint/uzbl.git
Please use:
git clone git://anonscm.debian.org/collab-maint/uzbl.git
to retrieve the latest (possibly unreleased) updates to the package.
Need to get 162 kB of source archives.
Get:1 http://ftp.us.debian.org/debian testing/main uzbl 0.0.0~git.20120514-1.2 (dsc) [1977 B]
Get:2 http://ftp.us.debian.org/debian testing/main uzbl 0.0.0~git.20120514-1.2 (tar) [152 kB]
Get:3 http://ftp.us.debian.org/debian testing/main uzbl 0.0.0~git.20120514-1.2 (diff) [8108 B]
Fetched 162 kB in 0s (196 kB/s)
dpkg-source: info: extracting uzbl in uzbl-0.0.0~git.20120514
dpkg-source: info: unpacking uzbl_0.0.0~git.20120514.orig.tar.gz
dpkg-source: info: unpacking uzbl_0.0.0~git.20120514-1.2.debian.tar.xz
dpkg-source: info: applying revert-python2.patch
W: Download is performed unsandboxed as root as file 'uzbl_0.0.0~git.20120514-1.2.dsc' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)
(testing)root@mpldev:~# 
(testing)fab@mpldev:~/depuisapt$ apt-get source uzbl
Reading package lists... Done
NOTICE: 'uzbl' packaging is maintained in the 'Git' version control system at:
git://anonscm.debian.org/collab-maint/uzbl.git
Please use:
git clone git://anonscm.debian.org/collab-maint/uzbl.git
to retrieve the latest (possibly unreleased) updates to the package.
Need to get 162 kB of source archives.
Get:1 http://ftp.us.debian.org/debian testing/main uzbl 0.0.0~git.20120514-1.2 (dsc) [1977 B]
Get:2 http://ftp.us.debian.org/debian testing/main uzbl 0.0.0~git.20120514-1.2 (tar) [152 kB]
Get:3 http://ftp.us.debian.org/debian testing/main uzbl 0.0.0~git.20120514-1.2 (diff) [8108 B]
Fetched 162 kB in 0s (221 kB/s)
dpkg-source: info: extracting uzbl in uzbl-0.0.0~git.20120514
dpkg-source: info: unpacking uzbl_0.0.0~git.20120514.orig.tar.gz
dpkg-source: info: unpacking uzbl_0.0.0~git.20120514-1.2.debian.tar.xz
dpkg-source: info: applying revert-python2.patch
(testing)fab@mpldev:~/depuisapt$ 
# apt-get build-dep uzbl      
Reading package lists... Done
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  aspell aspell-en autoconf automake autopoint autotools-dev
  dconf-gsettings-backend dconf-service debhelper dh-autoreconf dh-python
  dh-strip-nondeterminism dictionaries-common emacsen-common file fontconfig
  fontconfig-config fonts-dejavu-core gettext gettext-base gir1.2-atk-1.0
  gir1.2-freedesktop gir1.2-gdkpixbuf-2.0 gir1.2-glib-2.0 gir1.2-gtk-2.0
  gir1.2-pango-1.0 gir1.2-soup-2.4 glib-networking glib-networking-common
  glib-networking-services gnome-icon-theme groff-base gsettings-desktop-schemas
  gtk-update-icon-cache hicolor-icon-theme icu-devtools intltool-debian iso-codes
  libarchive-zip-perl libaspell15 libatk1.0-0 libatk1.0-data libatk1.0-dev
  libavahi-client3 libavahi-common-data libavahi-common3 libcairo-gobject2
  libcairo-script-interpreter2 libcairo2 libcairo2-dev libcap2-bin libcroco3
  libcups2 libdatrie1 libdbus-1-3 libdconf1 libdrm2 libegl1-mesa libenchant1c2a
  libexpat1-dev libfile-stripnondeterminism-perl libfontconfig1
  libfontconfig1-dev libfreetype6 libfreetype6-dev libgbm1 libgdk-pixbuf2.0-0
  libgdk-pixbuf2.0-common libgdk-pixbuf2.0-dev libgirepository-1.0-1
  libgl1-mesa-glx libglapi-mesa libglib2.0-0 libglib2.0-bin libglib2.0-data
  libglib2.0-dev libgraphite2-3 libgraphite2-dev libgstreamer-plugins-base1.0-0
  libgstreamer1.0-0 libgtk2.0-0 libgtk2.0-common libgtk2.0-dev libharfbuzz-dev
  libharfbuzz-gobject0 libharfbuzz-icu0 libharfbuzz0b libhunspell-1.4-0
  libice-dev libice6 libicu-dev libicu57 libjavascriptcoregtk-1.0-0
  libjavascriptcoregtk-1.0-dev libjbig0 libjpeg62-turbo liblzo2-2 libmagic-mgc
  libmagic1 libmpdec2 liborc-0.4-0 libpango-1.0-0 libpango1.0-dev
  libpangocairo-1.0-0 libpangoft2-1.0-0 libpangoxft-1.0-0 libpcre16-3
  libpcre3-dev libpcre32-3 libpcrecpp0v5 libpixman-1-0 libpixman-1-dev libpng-dev
  libpng16-16 libproxy1v5 libpthread-stubs0-dev libpython-all-dev libpython-dev
  libpython-stdlib libpython2.7 libpython2.7-dev libpython2.7-minimal
  libpython2.7-stdlib libpython3-stdlib libpython3.5-minimal libpython3.5-stdlib
  librsvg2-2 librsvg2-common libsecret-1-0 libsecret-common libsigsegv2 libsm-dev
  libsm6 libsoup-gnome2.4-1 libsoup2.4-1 libsoup2.4-dev libthai-data libthai0
  libtiff5 libtimedate-perl libtool libwayland-client0 libwayland-server0
  libwebkitgtk-1.0-0 libwebkitgtk-dev libwebp6 libx11-dev libx11-xcb1 libxau-dev
  libxcb-dri2-0 libxcb-dri3-0 libxcb-glx0 libxcb-present0 libxcb-render0
  libxcb-render0-dev libxcb-shm0 libxcb-shm0-dev libxcb-sync1 libxcb-xfixes0
  libxcb1-dev libxcomposite-dev libxcomposite1 libxcursor-dev libxcursor1
  libxdamage-dev libxdamage1 libxdmcp-dev libxext-dev libxfixes-dev libxfixes3
  libxft-dev libxft2 libxi-dev libxi6 libxinerama-dev libxinerama1 libxml2
  libxml2-dev libxml2-utils libxrandr-dev libxrandr2 libxrender-dev libxrender1
  libxshmfence1 libxslt1.1 libxt6 libxxf86vm1 m4 man-db mime-support pkg-config
  po-debconf python python-all python-all-dev python-dev python-minimal python2.7
  python2.7-dev python2.7-minimal python3 python3-minimal python3.5
  python3.5-minimal shared-mime-info ucf x11-common x11proto-composite-dev
  x11proto-core-dev x11proto-damage-dev x11proto-fixes-dev x11proto-input-dev
  x11proto-kb-dev x11proto-randr-dev x11proto-render-dev x11proto-xext-dev
  x11proto-xinerama-dev xorg-sgml-doctools xtrans-dev zlib1g-dev
0 upgraded, 220 newly installed, 0 to remove and 0 not upgraded.
Need to get 149 MB of archives.
After this operation, 496 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
~/depuisapt/uzbl-0.0.0~git.20120514$ debuild -us -uc

On a déjà quelques suggestions d'améliorations du paquet actuel, qui a l'air un peu goret :

...
dpkg-shlibdeps: warning: package could avoid a useless dependency if debian/uzbl/usr/bin/uzbl-core was not linked against libfreetype.so.6 (it uses none of the library's symbols)
dpkg-shlibdeps: warning: package could avoid a useless dependency if debian/uzbl/usr/bin/uzbl-core was not linked against libgthread-2.0.so.0 (it uses none of the library's symbols)
dpkg-shlibdeps: warning: package could avoid a useless dependency if debian/uzbl/usr/bin/uzbl-core was not linked against libcairo.so.2 (it uses none of the library's symbols)
dpkg-shlibdeps: warning: package could avoid a useless dependency if debian/uzbl/usr/bin/uzbl-core was not linked against libpangocairo-1.0.so.0 (it uses none of the library's symbols)
dpkg-shlibdeps: warning: package could avoid a useless dependency if debian/uzbl/usr/bin/uzbl-core was not linked against libgdk_pixbuf-2.0.so.0 (it uses none of the library's symbols)
dpkg-shlibdeps: warning: package could avoid a useless dependency if debian/uzbl/usr/bin/uzbl-core was not linked against libatk-1.0.so.0 (it uses none of the library's symbols)
dpkg-shlibdeps: warning: package could avoid a useless dependency if debian/uzbl/usr/bin/uzbl-core was not linked against libfontconfig.so.1 (it uses none of the library's symbols)
dpkg-shlibdeps: warning: package could avoid a useless dependency if debian/uzbl/usr/bin/uzbl-core was not linked against libgio-2.0.so.0 (it uses none of the library's symbols)
dpkg-shlibdeps: warning: package could avoid a useless dependency if debian/uzbl/usr/bin/uzbl-core was not linked against libpangoft2-1.0.so.0 (it uses none of the library's symbols)
...
   dh_installdeb
   dh_gencontrol
   dh_md5sums
   dh_builddeb
dpkg-deb: building package 'uzbl-dbgsym' in '../uzbl-dbgsym_0.0.0~git.20120514-1.2_amd64.deb'.
dpkg-deb: building package 'uzbl' in '../uzbl_0.0.0~git.20120514-1.2_amd64.deb'.
 dpkg-genbuildinfo
 dpkg-genchanges  >../uzbl_0.0.0~git.20120514-1.2_amd64.changes
dpkg-genchanges: info: not including original source code in upload
 dpkg-source --after-build uzbl-0.0.0~git.20120514
dpkg-buildpackage: info: binary and diff upload (original source NOT included)
Now running lintian...
W: uzbl source: ancient-standards-version 3.9.6 (current is 3.9.8)
E: uzbl source: debian-watch-file-uses-deprecated-githubredir line 4
Finished running lintian.

Comparaison des répertoires debian/

Celui fourni par Komar: http://core.org.ua/tmp/uzbl-debian.tar.gz

… est un peu plus à jour.

  • python3
  • gtk3
diff debian/uzbl.substvars debian_from_apt/uzbl.substvars
1c1,2
< shlibs:Depends=libatk1.0-0 (>= 1.12.4), libc6 (>= 2.4), libcairo-gobject2 (>= 1.10.0), libcairo2 (>= 1.2.4), libgdk-pixbuf2.0-0 (>= 2.22.0), libglib2.0-0 (>= 2.43.90), libgnutls30 (>= 3.5.0), libgtk-3-0 (>= 3.0.0), libjavascriptcoregtk-4.0-18, libpango-1.0-0 (>= 1.14.0), libpangocairo-1.0-0 (>= 1.14.0), libsoup2.4-1 (>= 2.41.90), libwebkit2gtk-4.0-37 (>= 2.5.3), libx11-6
---
> python:Depends=python:any, python:any (>= 2.6~), python:any (>= 2.7.5-5~)
> shlibs:Depends=libatk1.0-0 (>= 1.12.4), libc6 (>= 2.4), libcairo2 (>= 1.2.4), libfontconfig1 (>= 2.11), libfreetype6 (>= 2.2.1), libgdk-pixbuf2.0-0 (>= 2.22.0), libglib2.0-0 (>= 2.37.3), libgtk2.0-0 (>= 2.24.0), libjavascriptcoregtk-1.0-0 (>= 1.5.1), libpango-1.0-0 (>= 1.14.0), libpangocairo-1.0-0 (>= 1.14.0), libpangoft2-1.0-0 (>= 1.14.0), libsoup2.4-1 (>= 2.26.1), libwebkitgtk-1.0-0 (>= 1.3.13), libx11-6

Après avoir viré ce qui était strictement identique:

  • < libcairo-gobject2 (>= 1.10.0), ), libglib2.0-0 (>= 2.43.90), libgnutls30 (>= 3.5.0), libgtk-3-0 (>= 3.0.0), libjavascriptcoregtk-4.0-18, libsoup2.4-1 (>= 2.41.90), libwebkit2gtk-4.0-37 (>= 2.5.3)
  • > libfontconfig1 (>= 2.11), libfreetype6 (>= 2.2.1), libglib2.0-0 (>= 2.37.3), libgtk2.0-0 (>= 2.24.0), libjavascriptcoregtk-1.0-0 (>= 1.5.1), libpangoft2-1.0-0 (>= 1.14.0), libsoup2.4-1 (>= 2.26.1), libwebkitgtk-1.0-0 (>= 1.3.13)
diff debian/watch debian_from_apt/watch
1,6c1
< #version=3
< #opts=dversionmangle=s/(\d+\.*){3}~git\.//,uversionmangle=s/\.//g \
< # http://githubredir.debian.net/github/Dieterbe/uzbl/(\d.*)\.tar\.gz
< 
< version=4
< opts="mode=git" https://github.com/uzbl/uzbl.git master debian uupdate
---
> version=3
7a3,4
> opts=dversionmangle=s/(\d+\.*){3}~git\.//,uversionmangle=s/\.//g \
>  http://githubredir.debian.net/github/Dieterbe/uzbl/(\d.*)\.tar\.gz

Compilation depuis git, avec le debian/ de komar

dpkg-checkbuilddeps: error: Unmet build dependencies: libwebkitgtk-3.0-dev python3-setuptools python3-all-dev

après ajout des 2-3 nouvelles dépendances *-dev, ça fonctionne !

dpkg-shlibdeps: warning: package could avoid a useless dependency if debian/uzbl/usr/bin/uzbl-core was not linked against libpangocairo-1.0.so.0 (it uses none of the library's symbols)
dpkg-shlibdeps: warning: package could avoid a useless dependency if debian/uzbl/usr/bin/uzbl-core was not linked against libpango-1.0.so.0 (it uses none of the library's symbols)
dpkg-shlibdeps: warning: package could avoid a useless dependency if debian/uzbl/usr/bin/uzbl-core was not linked against libgdk_pixbuf-2.0.so.0 (it uses none of the library's symbols)
dpkg-shlibdeps: warning: package could avoid a useless dependency if debian/uzbl/usr/bin/uzbl-core was not linked against libcairo-gobject.so.2 (it uses none of the library's symbols)
dpkg-shlibdeps: warning: package could avoid a useless dependency if debian/uzbl/usr/bin/uzbl-core was not linked against libgthread-2.0.so.0 (it uses none of the library's symbols)
dpkg-shlibdeps: warning: package could avoid a useless dependency if debian/uzbl/usr/bin/uzbl-core was not linked against libatk-1.0.so.0 (it uses none of the library's symbols)
   dh_installdeb
   dh_gencontrol
dpkg-gencontrol: warning: Depends field of package uzbl: unknown substitution variable ${python:Depends}
dpkg-gencontrol: warning: Depends field of package uzbl: unknown substitution variable ${python:Depends}
   dh_md5sums
   dh_builddeb
dpkg-deb: building package 'uzbl-dbgsym' in '../uzbl-dbgsym_0.9.1-1_amd64.deb'.
dpkg-deb: building package 'uzbl' in '../uzbl_0.9.1-1_amd64.deb'.
 dpkg-genbuildinfo --build=binary
 dpkg-genchanges --build=binary >../uzbl_0.9.1-1_amd64.changes
dpkg-genchanges: info: binary-only upload (no source code included)
 dpkg-source --after-build uzbl
dpkg-buildpackage: info: binary-only upload (no source included)

19 fev. 32 bits

VERSION=0.9.1+35.g02ed281a python3 setup.py bdist_wheel
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
   or: setup.py --help [cmd1 cmd2 ...]
   or: setup.py --help-commands
   or: setup.py cmd --help

error: invalid command 'bdist_wheel'
Makefile:144: recipe for target 'dist/uzbl-0.9.1+35.g02ed281a-py3-none-any.whl' failed
make[1]: *** [dist/uzbl-0.9.1+35.g02ed281a-py3-none-any.whl] Error 1
make[1]: Leaving directory '/home/fab/git2/uzbl'
dh_auto_build: make -j1 returned exit code 2
debian/rules:12: recipe for target 'build' failed
make: *** [build] Error 2
dpkg-buildpackage: error: debian/rules build gave error exit status 2
debuild: fatal error at line 1116:
dpkg-buildpackage -rfakeroot -us -uc -b failed

ça semble venir du dépot en amont, car maintenant j'ai la même sur le 64 bits.

09:32 < keis> cacatoes: oh, figured that was a default. try "pip3 install bdist_wheel"
09:39 < keis> sry, "pip3 install wheel" :)

Je modifie le Makefile, et j'installe python3-pip.

Bon fallait pas modifier le Makefile, mais les build-deps dans control.

Mais ça marche toujours pas.

En fait, le problème est bien lourdingue : mélange de versions de python, et pas que. Donc pas l'idéal pour se faire la main dans la modif de paquet Debian. Je lâche l'affaire…

article/linux/uzbl.txt · Dernière modification: 2017/08/23 01:30 par bicarbonate