Differences between revisions 45 and 47 (spanning 2 versions)
Revision 45 as of 2020-05-31 05:27:37
Size: 7133
Editor: coringao
Comment:
Revision 47 as of 2020-05-31 05:40:06
Size: 6219
Editor: coringao
Comment:
Deletions are marked like this. Additions are marked like this.
Line 21: Line 21:
||<#ADADAC -4 : tablewidth="70%" style="border: medium none ;-moz-border-radius-topleft: 30px ;-moz-border-radius-topright: 30px;"> # apt install debootstrap schroot|| ||<#ADADAC -4 style="border: medium none ;-moz-border-radius-bottomleft: 30px ;"> # apt install debootstrap schroot||
Line 25: Line 25:
||<#ADADAC -4 : tablewidth="70%" style="border: medium none ;-moz-border-radius-topleft: 30px ;-moz-border-radius-topright: 30px;"> # cp /etc/schroot/schroot.conf /etc/schroot/schroot.conf.old|| ||<#ADADAC -4 style="border: medium none ;-moz-border-radius-bottomleft: 30px ;"> # cp /etc/schroot/schroot.conf /etc/schroot/schroot.conf.old||
Line 27: Line 27:
||<#ADADAC -4 : tablewidth="70%" style="border: medium none ;-moz-border-radius-topleft: 30px ;-moz-border-radius-topright: 30px;"> # '''editor''' /etc/schroot/schroot.conf|| ||<#ADADAC -4 style="border: medium none ;-moz-border-radius-bottomleft: 30px ;"> # '''editor''' /etc/schroot/schroot.conf||
Line 41: Line 41:
||<#ADADAC -4 : tablewidth="70%" style="border: medium none ;-moz-border-radius-topleft: 30px ;-moz-border-radius-topright: 30px;"> # mkdir -p /srv/chroot/unstable-amd64|| ||<#ADADAC -4 style="border: medium none ;-moz-border-radius-bottomleft: 30px ;"> # mkdir -p /srv/chroot/unstable-amd64||
Line 43: Line 43:
||<#ADADAC -4 : tablewidth="70%" style="border: medium none ;-moz-border-radius-topleft: 30px ;-moz-border-radius-topright: 30px;"> # debootstrap --arch amd64 unstable /srv/chroot/unstable-amd64 https://deb.debian.org/debian|| ||<#ADADAC -4 style="border: medium none ;-moz-border-radius-bottomleft: 30px ;"> # debootstrap --arch amd64 unstable /srv/chroot/unstable-amd64 https://deb.debian.org/debian||
Line 47: Line 47:
||<#ADADAC -4 : tablewidth="70%" style="border: medium none ;-moz-border-radius-topleft: 30px ;-moz-border-radius-topright: 30px;"> # chroot /srv/chroot/unstable|| ||<#ADADAC -4 style="border: medium none ;-moz-border-radius-bottomleft: 30px ;"> # chroot /srv/chroot/unstable||
Line 49: Line 49:
||<#ADADAC -4 : tablewidth="70%" style="border: medium none ;-moz-border-radius-topleft: 30px ;-moz-border-radius-topright: 30px;"> # echo proc /proc proc defaults 0 0 >> /etc/fstab|| ||<#ADADAC -4 style="border: medium none ;-moz-border-radius-bottomleft: 30px ;"> # echo proc /proc proc defaults 0 0 >> /etc/fstab||
Line 51: Line 51:
||<#ADADAC -4 : tablewidth="70%" style="border: medium none ;-moz-border-radius-topleft: 30px ;-moz-border-radius-topright: 30px;"> # echo mount /proc >> /etc/bash.bashrc|| ||<#ADADAC -4 style="border: medium none ;-moz-border-radius-bottomleft: 30px ;"> # echo mount /proc >> /etc/bash.bashrc||
Line 61: Line 61:
||<#ADADAC -4 : tablewidth="70%" style="border: medium none ;-moz-border-radius-topleft: 30px ;-moz-border-radius-topright: 30px;"> '''user@debian:~$''' schroot -c unstable-amd64|| ||<#ADADAC -4 style="border: medium none ;-moz-border-radius-bottomleft: 30px ;"> '''user@debian:~$''' schroot -c unstable-amd64||
Line 65: Line 65:
||<#ADADAC -4 : tablewidth="70%" style="border: medium none ;-moz-border-radius-topleft: 30px ;-moz-border-radius-topright: 30px;"> '''user@debian:~$''' schroot -c unstable-amd64 -u root||

----
----
||<#ADADAC -4 style="border: medium none ;-moz-border-radius-bottomleft: 30px ;"> '''user@debian:~$''' schroot -c unstable-amd64 -u root||
Line 74: Line 71:
||<#ADADAC -4 : tablewidth="70%" style="border: medium none ;-moz-border-radius-topleft: 30px ;-moz-border-radius-topright: 30px;"> '''user@debian:~$''' schroot -c unstable-amd64 -u root|| |<#ADADAC -4 style="border: medium none ;-moz-border-radius-bottomleft: 30px ;"> '''user@debian:~$''' schroot -c unstable-amd64 -u root||
Line 80: Line 77:
||<#ADADAC -4 : tablewidth="70%" style="border: medium none ;-moz-border-radius-topleft: 30px ;-moz-border-radius-topright: 30px;"> '''(unstable-amd64)root@debian:~#''' '''editor''' /etc/bash.bashrc|| ||<#ADADAC -4 style="border: medium none ;-moz-border-radius-bottomleft: 30px ;"> '''(unstable-amd64)root@debian:~#''' '''editor''' /etc/bash.bashrc||
Line 90: Line 87:
||<#ADADAC -4 : tablewidth="70%" style="border: medium none ;-moz-border-radius-topleft: 30px ;-moz-border-radius-topright: 30px;"> '''(unstable-amd64)root@debian:~#''' '''editor''' /etc/apt/sources.list|| ||<#ADADAC -4 style="border: medium none ;-moz-border-radius-bottomleft: 30px ;"> '''(unstable-amd64)root@debian:~#''' '''editor''' /etc/apt/sources.list||
Line 98: Line 95:
||<#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|| ||<#ADADAC -4 style="border: medium none ;-moz-border-radius-bottomleft: 30px ;"> '''(unstable-amd64)root@debian:~#''' apt update && apt upgrade||
Line 102: Line 99:
||<#ADADAC -4 : tablewidth="70%" style="border: medium none ;-moz-border-radius-topleft: 30px ;-moz-border-radius-topright: 30px;"> '''(unstable-amd64)root@debian:~#''' apt install autopkgtest blhc devscripts dh-make dput-ng git-buildpackage<<BR>>how-can-i-help locales quilt renameutils spell splitpatch tree|| ||<#ADADAC -4 style="border: medium none ;-moz-border-radius-bottomleft: 30px ;"> '''(unstable-amd64)root@debian:~#''' apt install autopkgtest blhc devscripts dh-make dput-ng git-buildpackage<<BR>> how-can-i-help locales quilt renameutils spell splitpatch tree||
Line 104: Line 101:
||<#ADADAC -4 : tablewidth="70%" style="border: medium none ;-moz-border-radius-topleft: 30px ;-moz-border-radius-topright: 30px;"> '''(unstable-amd64)root@debian:~#''' dpkg-reconfigure locales tzdata|| ||<#ADADAC -4 style="border: medium none ;-moz-border-radius-bottomleft: 30px ;"> '''(unstable-amd64)root@debian:~#''' dpkg-reconfigure locales tzdata||
Line 106: Line 103:
||<#ADADAC -4 : tablewidth="70%" style="border: medium none ;-moz-border-radius-topleft: 30px ;-moz-border-radius-topright: 30px;"> '''(unstable-amd64)root@debian:~#''' apt autoremove && apt autoclean|| ||<#ADADAC -4 style="border: medium none ;-moz-border-radius-bottomleft: 30px ;"> '''(unstable-amd64)root@debian:~#''' apt autoremove && apt autoclean||
Line 110: Line 107:
||<#ADADAC -4 : tablewidth="70%" style="border: medium none ;-moz-border-radius-topleft: 30px ;-moz-border-radius-topright: 30px;"> '''(unstable-amd64)root@debian:~#''' '''editor''' /etc/lintianrc|| ||<#ADADAC -4 style="border: medium none ;-moz-border-radius-bottomleft: 30px ;"> '''(unstable-amd64)root@debian:~#''' '''editor''' /etc/lintianrc||

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.

|<#ADADAC -4 style="border: medium none ;-moz-border-radius-bottomleft: 30px ;"> user@debian:~$ schroot -c unstable-amd64 -u root||

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

1. Adjusting the "/etc/bash.bashrc" file

(unstable-amd64)root@debian:~# editor /etc/bash.bashrc

Insert at the end of the file /etc/bash.bashrc

alias ls="ls --color=auto"
alias tree="tree -aC"
alias debuildsa="dpkg-buildpackage -sa -k0987654321ABC1234567890DFG0987654321HIJL" --> your GPG key.
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

Save and close.

2. Adjusting the "/etc/apt/sources.list" file

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

Edit the file, duplicate the existing line and change the beginning of the second line from "deb" to "deb-src". The end result will be:

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

We can now install additional procedures for Debian packaging.

(unstable-amd64)root@debian:~# apt install autopkgtest blhc devscripts dh-make dput-ng git-buildpackage
how-can-i-help locales quilt renameutils spell splitpatch tree

(unstable-amd64)root@debian:~# dpkg-reconfigure locales tzdata

(unstable-amd64)root@debian:~# apt autoremove && apt autoclean

3. Adjusting the "/etc/lintianrc" file

(unstable-amd64)root@debian:~# editor /etc/lintianrc

Enable the following lines:

display-info = yes
pedantic = yes
display-experimental = yes
color = auto