I am trying to package an Ubuntu package as a Debian package. For maintainability I am trying to use
sbuild
.
Following the steps here
I go through the first five steps, but when I try to build I get chroot errors.
These are the steps:
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
The sbuild-createchrrot
command that I use is:
CODE: SELECT ALL
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.
It continues until it finishes, I am not sure if these are errors, but this happens right before I regain control over the 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.
After that I try to run:
sbuild -d jessie filename.dsc
Then I get this error:
╔══════════════════════════════════════════════════════════════════════════════╗
║ 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 │
└──────────────────────────────────────────────────────────────────────────────┘
Then the cursor just sits there blinking.
What is wrong with the chroot? How come sbuild
isn't setting it up properly? How do I fix this to use 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
**Edit:**
I do not have the below file or folders nor do I really know how to manually create them. The wiki didn't really say much about these files.
E: /etc/schroot/schroot.conf: Failed to stat file: No such file or directory
**edit**
this is the contents of my /etc/schroot
folder
tree /etc/schroot/
/etc/schroot/
├── buildd
├── chroot.d
│ └── jessie-amd64-sbuild-k92zq_
├── default
├── desktop
├── minimal
├── sbuild
└── setup.d
└── 99check -> 00check
7 directories, 2 files
this is the content of that jessie-amd64 file
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
when I run
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
They still just give an error even though I am using the -c command, it's complaining about the schroot.conf file.
I've tried to write this to the schroot.conf file
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
then tried to run 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
then I get the above error.
Asked by user1610950
(829 rep)
Feb 6, 2016, 08:25 PM
Last activity: Feb 7, 2016, 07:17 PM
Last activity: Feb 7, 2016, 07:17 PM