BuildingWithSchroot

From ago control wiki
(Difference between revisions)
Jump to: navigation, search
m
m (reprepo)
 
Line 44: Line 44:
 
== reprepo ==
 
== reprepo ==
 
config file:
 
config file:
  /var/www/mirror/debian/conf/distributions  
+
  /var/www/mirror/debian/conf/distributions
 +
check:
 +
root@mirror:/var/www/mirror/debian# reprepro check
 +
 
 
= Reference =
 
= Reference =
 
https://wiki.debian.org/sbuild
 
https://wiki.debian.org/sbuild

Latest revision as of 14:09, 24 May 2015

Contents

[edit] Introduction

[edit] Preparation

[edit] share apt cache

sudo sh -c 'echo /var/cache/apt/archives /var/cache/apt/archives none rw,bind 0 0 >>/etc/schroot/sbuild/fstab'

[edit] share CC cache

enter shell, then:

dir=/var/cache/ccache-sbuild
install --group=sbuild --mode=2775 -d $dir
env CCACHE_DIR=$dir ccache --max-size 4G
cat >>/etc/schroot/sbuild/fstab <<END
$dir $dir none rw,bind 0 0
END

then

 296  vi /var/cache/ccache-sbuild/sbuild-setup
 297  chmod +x /var/cache/ccache-sbuild/sbuild-setup

Install ccache inside the chroot by running

schroot -c source:$dist-$arch-sbuild apt-get install ccache

and edit the corresponding configuration file in /etc/schroot/chroot.d/ by appending the line

command-prefix=/var/cache/ccache-sbuild/sbuild-setup

[edit] Adding local repo

https://wiki.ubuntu.com/SimpleSbuild#Local_packages

[edit] Buidling a new schroot

sbuild-createchroot --make-sbuild-tarball=/var/lib/sbuild/jessie-amd64.tar.gz jessie `mktemp -d` http://ftp.at.debian.org/debian

[edit] mk-sbuild foreign architecture

mk-sbuild --arch armel jessie

[edit] Debugging

[edit] Find out paths

schroot --info --all-sessions | grep Path

[edit] Adding user

sbuild-adduser <username>

[edit] List sessions

schroot --list

[edit] Shell

sbuild-shell source:wheezy-amd64-sbuild

[edit] Scrapspace

 315  schroot -i -c wheezy-amd64-sbuild

[edit] Mirror management

To add a distribution, edit these config files:

[edit] mini-dinstall

config file:

/home/dpush/.mini-dinstall.conf 

[edit] reprepo

config file:

/var/www/mirror/debian/conf/distributions

check:

root@mirror:/var/www/mirror/debian# reprepro check

[edit] Reference

https://wiki.debian.org/sbuild

Personal tools