Eu estou tentando empacotar um pacote Ubuntu como um pacote Debian. Para manutenção, estou tentando usar sbuild
.
Seguindo os passos aqui
Eu passo pelos cinco primeiros passos, mas quando tento construir, recebo erros de chroot.
Estas são as etapas:
1 sudo apt-get install sbuild
2 sudo mkdir /root/.gnupg # To work around #792100
3 sudo sbuild-update --keygen
4 sudo sbuild-adduser $LOGNAME
5 ... *logout* and *re-login* or use 'newgrp sbuild' in your current shell
6 sudo sbuild-createchroot --make-sbuild-tarball=/srv/chroot/unstable-amd64.tar.gz unstable 'mktemp -d' http://httpredir.debian.org/debian
O comando sbuild-createchrrot
que eu uso é:
CÓDIGO: SELECIONE TUDO
sudo sbuild-createchroot --make-sbuild-tarball=/srv/chroot/jessie-amd64.tar.gz jessie 'mktemp -d' http://httpredir.debian.org/debian
I: SUITE: jessie
I: TARGET: /tmp/tmp.uLbQox2R0X
I: MIRROR: http://httpredir.debian.org/debian
I: Running debootstrap --arch=amd64 --variant=buildd --verbose --include=fakeroot,build-essential,debfoster --components=main --resolve-deps jessie /tmp/tmp.uLbQox2R0X http://httpredir.debian.org/debian
I: Retrieving Release
I: Retrieving Release.gpg
I: Checking Release signature
I: Valid Release signature (key id 75DDC3C4A499F1A18CB5F3C8CBF8D6FD518E17E1)
I: Retrieving Packages
I: Validating Packages
I: Resolving dependencies of required packages...
I: Resolving dependencies of base packages...
I: Found additional required dependencies: acl adduser dmsetup insserv libaudit-common libaudit1 libbz2-1.0 libcap2 libcap2-bin libcryptsetup4 libdb5.3 libdebconfclient0 libdevmapper1.02.1 libgcrypt20 libgpg-error0 libkmod2 libncursesw5 libprocps3 libsemanage-common libsemanage1 libslang2 libsystemd0 libudev1 libustr-1.0-1 procps systemd systemd-sysv udev
I: Found additional base dependencies: binutils bzip2 cpp cpp-4.9 debian-archive-keyring dpkg-dev g++ g++-4.9 gcc gcc-4.9 gnupg gpgv libapt-pkg4.12 libasan1 libatomic1 libc-dev-bin libc6-dev libcilkrts5 libcloog-isl4 libdpkg-perl libfakeroot libgc1c2 libgcc-4.9-dev libgdbm3 libgmp10 libgomp1 libisl10 libitm1 liblsan0 libmpc3 libmpfr4 libquadmath0 libreadline6 libstdc++-4.9-dev libstdc++6 libtimedate-perl libtsan0 libubsan0 libusb-0.1-4 linux-libc-dev make patch perl perl-modules readline-common xz-utils
I: Checking component main on http://httpredir.debian.org/debian...
I: Retrieving acl 2.2.52-2
I: Validating acl 2.2.52-2
I: Retrieving libacl1 2.2.52-2
I: Validating libacl1 2.2.52-2
I: Retrieving adduser 3.113+nmu3
I: Validating adduser 3.113+nmu3
I: Retrieving apt 1.0.9.8.2
I: Validating apt 1.0.9.8.2
I: Retrieving libapt-pkg4.12 1.0.
Ele continua até que termine, não tenho certeza se são erros, mas isso acontece logo antes de recuperar o controle do terminal.
I: Base system installed successfully.
I: Configured /etc/hosts:
┌────────────────────────────────────────────────────────────────────────
│127.0.0.1 hn localhost
└────────────────────────────────────────────────────────────────────────
I: Configured /usr/sbin/policy-rc.d:
┌────────────────────────────────────────────────────────────────────────
│#!/bin/sh
│echo "All runlevel operations denied by policy" >&2
│exit 101
└────────────────────────────────────────────────────────────────────────
I: Configured APT /etc/apt/sources.list:
┌────────────────────────────────────────────────────────────────────────
│deb http://httpredir.debian.org/debian jessie main
│deb-src http://httpredir.debian.org/debian jessie main
└────────────────────────────────────────────────────────────────────────
I: Please add any additional APT sources to /tmp/tmp.uLbQox2R0X/etc/apt/sources.list
I: Setting reference package list.
I: Updating chroot.
Ign http://httpredir.debian.org jessie InRelease
Hit http://httpredir.debian.org jessie Release.gpg
Hit http://httpredir.debian.org jessie Release
Get:1 http://httpredir.debian.org jessie/main Sources [7058 kB]
Get:2 http://httpredir.debian.org jessie/main amd64 Packages [6763 kB]
Get:3 http://httpredir.debian.org jessie/main Translation-en [4582 kB]
Fetched 18.4 MB in 21s (837 kB/s)
Reading package lists... Done
Reading package lists... Done
Building dependency tree... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
I: chroot /tmp/tmp.uLbQox2R0X has been removed.
I: Successfully set up jessie chroot.
I: Run "sbuild-adduser" to add new sbuild users.
Depois disso, tento executar:
sbuild -d jessie filename.dsc
Então eu recebo este erro:
╔══════════════════════════════════════════════════════════════════════════════╗
║ simplescreenrecorder 0.3.6+1~ppa1~wily1 (amd64) 07 Feb 2016 04:15 ║
╚══════════════════════════════════════════════════════════════════════════════╝
Package: simplescreenrecorder
Version: 0.3.6+1~ppa1~wily1
Source Version: 0.3.6+1~ppa1~wily1
Distribution: jessie
Machine Architecture: amd64
Host Architecture: amd64
Build Architecture: amd64
E: /etc/schroot/schroot.conf: Failed to stat file: No such file or directory
┌──────────────────────────────────────────────────────────────────────────────┐
│ Summary │
└──────────────────────────────────────────────────────────────────────────────┘
Então o cursor fica lá, piscando.
O que há de errado com o chroot? Por que sbuild
não está configurando corretamente? Como corrijo isso para usar sbuild
?
sbuild:
Installed: 0.65.2-1
Candidate: 0.65.2-1
Version table:
0.66.0-5~bpo8+1 0
100 http://httpredir.debian.org/debian/ jessie-backports/main amd64 Packages
*** 0.65.2-1 0
500 http://httpredir.debian.org/debian/ jessie/main amd64 Packages
100 /var/lib/dpkg/status
schroot:
Installed: 1.6.10-1+b1
Candidate: 1.6.10-1+b1
Version table:
*** 1.6.10-1+b1 0
500 http://httpredir.debian.org/debian/ jessie/main amd64 Packages
100 /var/lib/dpkg/status
Editar:
Eu não tenho os arquivos ou pastas abaixo, nem sei como criá-los manualmente. O wiki não falou muito sobre esses arquivos.
E: /etc/schroot/schroot.conf: Failed to stat file: No such file or directory
editar
este é o conteúdo da minha pasta /etc/schroot
tree /etc/schroot/
/etc/schroot/
├── buildd
├── chroot.d
│ └── jessie-amd64-sbuild-k92zq_
├── default
├── desktop
├── minimal
├── sbuild
└── setup.d
└── 99check -> 00check
7 directories, 2 files
este é o conteúdo do arquivo jessie-amd64
cat /etc/schroot/chroot.d/jessie-amd64-sbuild-k92zq_
[jessie-amd64-sbuild]
type=file
description=Debian jessie/amd64 autobuilder
file=/srv/chroot/jessie-amd64.tar.gz
groups=root,sbuild
root-groups=root,sbuild
profile=sbuild
quando eu corro
schroot -c jessie-amd64-sbuild
E: /etc/schroot/schroot.conf: Failed to stat file: No such file or directory
schroot -c jessie-amd64
E: /etc/schroot/schroot.conf: Failed to stat file: No such file or directory
Eles ainda dão um erro, embora eu esteja usando o comando -c, queixando-se do arquivo schroot.conf.
Eu tentei escrever isso no arquivo schroot.conf
cat /etc/schroot/schroot.conf
[jessie-amd64]
type=file
description=Debian jessie/amd64 autobuilder
file=/srv/chroot/jessie-amd64.tar.gz
groups=root,sbuild
root-groups=root,sbuild
profile=sbuild
tentou executar schroot -c /etc/schroot/schroot.conf
schroot -c jessie-amd64
E: /srv/chroot/jessie-amd64.tar.gz: Failed to stat file: No such file or directory
então eu recebo o erro acima.