Differences between revisions 38 and 40 (spanning 2 versions)
Revision 38 as of 2020-05-31 04:04:10
Size: 4438
Editor: coringao
Comment:
Revision 40 as of 2020-05-31 04:45:29
Size: 5481
Editor: coringao
Comment:
Deletions are marked like this. Additions are marked like this.
Line 71: Line 71:
We will do root access in the "schroot" configured to install some important packages for Debian packaging. We will do root access in the "'''schroot'''" configured to install some important packages for Debian packaging.
Line 75: Line 75:
{*} '''editor''' = ''your favorite text editor: nano, vim, mcedit, etc...''

Add the "'''/etc/bash.bashrc'''" file to the end of the line, copying and pasting below:

||<#EAE5DA -4 style="border: medium none ;-moz-border-radius-bottomleft: 30px ;"> alias ls="ls --color=auto"<<BR>> alias tree="tree -aC"<<BR>> alias debuildsa="dpkg-buildpackage -sa -k'''0987654321ABC1234567890DFG0987654321HIJL'''"<<BR>> alias uscan="uscan --verbose --report"<<BR>> alias apt-cache="LANG=C apt-cache"<<BR>> alias man="LANG=C man"<<BR>> export DEBFULLNAME="'''put-your-full-name'''"<<BR>> export DEBEMAIL="'''put-your-email'''"<<BR>> export EDITOR="'''put-your-favorite-text-editor'''"<<BR>> export QUILT_PATCHES="debian/patches"<<BR>> export QUILT_DIFF_ARGS="--no-timestamps --no-index -pab"<<BR>> export QUILT_REFRESH_ARGS="--no-timestamps --no-index -pab"<<BR>> mount /proc<<BR>>||

Let's add the source repository as follows: (sources.list)
Line 77: Line 85:
{*} '''editor''' = ''your favorite text editor: nano, vim, mcedit, etc ...'' ||<#EAE5DA -4 style="border: medium none ;-moz-border-radius-bottomleft: 30px ;"> deb https://deb.debian.org/debian unstable main<<BR>> deb-src https://deb.debian.org/debian unstable main<<BR>>||
Line 79: Line 87:
Let's add the source repository as follows: Save, close and update:
Line 81: Line 89:
||<#EAE5DA -4 style="border: medium none ;-moz-border-radius-bottomleft: 30px ;"> deb https://deb.debian.org/debian unstable main<<BR>> deb-src https://deb.debian.org/debian unstable main<<BR>>|| ||<#ADADAC -4 : tablewidth="70%" style="border: medium none ;-moz-border-radius-topleft: 30px ;-moz-border-radius-topright: 30px;"> '''(unstable-amd64)root@debian:~#''' apt update && apt upgrade||

debian-cage.png

PACKAGES STUCK WITH SCHROOT

Chroot Manager

Allows you to configure chroots without requiring root credentials.

For a better knowledge on the subject:

wiki.debian.org/Schroot

wiki.debian.org/Debootstrap

Starting prison for packages

jail.png

To start the installations, we will download the following packages:

# apt install debootstrap schroot

Once installed, we will edit the "/etc/schroot/schroot.conf" file.

# cp /etc/schroot/schroot.conf /etc/schroot/schroot.conf.old

# editor /etc/schroot/schroot.conf

{*} editor = your favorite text editor: nano, vim, mcedit, etc ...

In this model, we will do this in the amd64 architecture, but you can change or create it in the i386 architecture.

Copy and paste into the file.

[unstable-amd64]
description=debian unstable amd64
type=directory
directory=/srv/chroot/unstable-amd64
users=your-username
root-groups=root
preserve-environment=true

1. Installing the Debian base in the cage

schroot.png

# mkdir -p /srv/chroot/unstable-amd64

# debootstrap --arch amd64 unstable /srv/chroot/unstable-amd64 https://deb.debian.org/debian

2. Entering the cage

# chroot /srv/chroot/unstable

# echo proc /proc proc defaults 0 0 >> /etc/fstab

# echo mount /proc >> /etc/bash.bashrc

After these settings, type "exit" or press "Ctrl+D" to close everything.

Confirming that the configured prison is correct

user@debian: ~$ schroot -l
chroot:unstable-amd64

Entering prison as a user:

user@debian:~$ schroot -c unstable-amd64

Entering private prison: (root)

user@debian:~$ schroot -c unstable-amd64 -u root


Basic Debian packaging configurations

We will do root access in the "schroot" configured to install some important packages for Debian packaging.

user@debian:~$ schroot -c unstable-amd64 -u root

{*} editor = your favorite text editor: nano, vim, mcedit, etc...

Add the "/etc/bash.bashrc" file to the end of the line, copying and pasting below:

alias ls="ls --color=auto"
alias tree="tree -aC"
alias debuildsa="dpkg-buildpackage -sa -k0987654321ABC1234567890DFG0987654321HIJL"
alias uscan="uscan --verbose --report"
alias apt-cache="LANG=C apt-cache"
alias man="LANG=C man"
export DEBFULLNAME="put-your-full-name"
export DEBEMAIL="put-your-email"
export EDITOR="put-your-favorite-text-editor"
export QUILT_PATCHES="debian/patches"
export QUILT_DIFF_ARGS="--no-timestamps --no-index -pab"
export QUILT_REFRESH_ARGS="--no-timestamps --no-index -pab"
mount /proc

Let's add the source repository as follows: (sources.list)

(unstable-amd64)root@debian:~# editor /etc/apt/sources.list

deb https://deb.debian.org/debian unstable main
deb-src https://deb.debian.org/debian unstable main

Save, close and update:

(unstable-amd64)root@debian:~# apt update && apt upgrade