[pkg-go] gbp buildpackage
Anthony Fok
foka at debian.org
Sat Jun 16 15:46:33 BST 2018
Hi again,
On Sat, Jun 16, 2018 at 8:35 AM, Anthony Fok <foka at debian.org> wrote:
> Hi Tong,
>
> On Sat, Jun 16, 2018 at 7:19 AM, Tong Sun <pkgoyq.xpt at neverbox.com> wrote:
>> However, I'm having problem with `cowbuilder --create` --
>>
>> - If I run it with `fakeroot`, then it'll break at the end with:
>>
>> chroot: cannot change root directory to '/var/cache/pbuilder/base.cow':
>> Operation not permitted
>> ..
>>
>> - If I run it without `fakeroot`, then it'll break at the beginning with:
>>
>> E: debootstrap can only run as root
>
> 1. man fakeroot
> 2. man sudo
> 3. man su
I don't know how you manage to run cowbuilder as a non-root because
/usr/sbin isn't even in the PATH for non-root users.
Anyhow, nowadays, I am using a higher-level tool:
git-pbuilder - Wrapper around cowbuilder/qemubuilder for gbp buildpackage
It is part of the git-buildpackage package:
$ dpkg -S git-pbuilder
git-buildpackage: /usr/bin/git-pbuilder
git-buildpackage: /usr/share/man/man1/git-pbuilder.1.gz
It lives in /usr/bin/git-pbuilder and calls sudo for you, and does
other nice things for you.
So, instead of calling "sudo cowbuilder create" directly,
you call "git-pbuilder create".
Have fun exploring (Google about it) and experimenting!
Anthony
More information about the Pkg-go-maintainers
mailing list