[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Pbuilder problem



On 09/07/2018 01:08 PM, Alex Mestiashvili wrote:
>> What is the correct way to modify the chroot?  I have tried things like:
>>
>> mkdir /tmp/test; cd /tmp/test/
>> tar zxpf /var/cache/pbuilder/stable-amd64-base.tgz
>> nano etc/apt/sources.list
>> tar cfz ../stable-amd64-base.tgz .
>>
>> Is this a good way?
>>
>> It does not work, I get now:
>> ----
>> I: Extracting source
>> /sbin/start-stop-daemon: unable to start /bin/sh (Permission denied)
>> E: pbuilder: Failed extracting the source
>> ----
>> Not sure what this is.
>>
>> What I saw, is that stable-amd64-base.tgz has in sources.list lines with
>> "stable", but for backports it has "jessie-backports"!  I have changed that.
>>
>> When I run:
>> sudo pbuilder --create --distribution stretch
>> It's creating a testing-amd64-base.tgz
>> When I try to login with:
>> pbuilder --login --distribution stable
>> I see it's using testing-amd64-base.tgz
>>
>> Very confusing. Is there something wrong on my system, is this a bug, or
>> is this normal?
>

Out of curiosity tried to build dh-linktree on a stretch for stretch.
Here are the steps:

Install cowbuilder and create stretch chroot:

export DISTR=stretch;cowbuilder --create --architecture amd64
--distribution ${DISTR} --basepath
/var/cache/pbuilder/base-${DISTR}-amd64.cow

mkdir pkg; cd pkg

dget -x
http://http.debian.net/debian/pool/main/d/dh-linktree/dh-linktree_0.6.dsc

export DISTR=stretch;cowbuilder build dh-linktree_0.6.dsc --architecture
amd64 --distribution ${DISTR} --basepath
/var/cache/pbuilder/base-${DISTR}-amd64.cow


  pbuilder-satisfydepends-dummy : Depends: debhelper (>= 11) but it is
not going to be installed
  Unable to resolve dependencies!  Giving up...

Ok, doesn't work.

Let's add backports to our chroot

echo 'HOOKDIR="/var/cache/pbuilder/hook.d/"' >> /etc/pbuilderrc

mkdir /var/cache/pbuilder/hook.d/

cp /usr/share/doc/pbuilder/examples/D20addnonfree
/var/cache/pbuilder/hook.d/D20addbackports

perl -pi -e 's/sid\scontrib\snon-free/stretch-backports main/'
/var/cache/pbuilder/hook.d/D20addbackports

cat /var/cache/pbuilder/hook.d/D20addbackports
#!/bin/bash
# example file to be used with --hookdir
#
# add non-free and contrib distributions to
# /etc/apt/sources.list

echo ' Add sid non-free mirror to distribution'
echo 'deb '$(awk '/^deb / {print $2} ' < /etc/apt/sources.list | head -1
)' stretch-backports main' >> /etc/apt/sources.list
apt-get update


export DISTR=stretch;cowbuilder build dh-linktree_0.6.dsc --architecture
amd64 --distribution ${DISTR} --basepath
/var/cache/pbuilder/base-${DISTR}-amd64.cow

Seem to work
<skip>
...
<skip>

#ls -latrh /var/cache/pbuilder/result
total 44K
drwxr-xr-x 10 root root 4.0K Sep  7 08:05 ..
-rw-r--r--  1 root root 5.9K Sep  7 08:22 dh-linktree_0.6.tar.xz
-rw-r--r--  1 root root  636 Sep  7 08:22 dh-linktree_0.6.dsc
-rw-r--r--  1 root root  11K Sep  7 08:22 dh-linktree_0.6_all.deb
-rw-r--r--  1 root root 4.8K Sep  7 08:22 dh-linktree_0.6_amd64.buildinfo
-rw-r--r--  1 root root 1.6K Sep  7 08:22 dh-linktree_0.6_amd64.changes
drwxr-xr-x  2 root root 4.0K Sep  7 08:22 .

lsb_release -a

No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 9.5 (stretch)
Release:        9.5
Codename:       stretch


Hope this helps!

Best,
Alex


Reply to: