Differences between revisions 58 and 59
Revision 58 as of 2020-06-01 03:32:55
Size: 5810
Editor: coringao
Comment:
Revision 59 as of 2020-06-01 03:40:50
Size: 5436
Editor: coringao
Comment:
Deletions are marked like this. Additions are marked like this.
Line 27: Line 27:
Once installed, we will edit the "'''/etc/schroot/schroot.conf'''" file. Once installed, we will edit the '''/etc/schroot/schroot.conf''' file.
Line 34: Line 34:
# '''editor''' /etc/schroot/schroot.conf # editor /etc/schroot/schroot.conf
Line 37: Line 37:
{*} '''editor''' = ''your favorite text editor: nano, vim, mcedit, etc ...'' {*} '''editor''' = ''your favorite text editor: nano, vim, mcedit, etc...''
Line 91: Line 91:
user@debian:~$''' schroot -c unstable-amd64 user@debian:~$ schroot -c unstable-amd64
Line 97: Line 97:
user@debian:~$''' schroot -c unstable-amd64 -u root user@debian:~$ schroot -c unstable-amd64 -u root
Line 100: Line 100:
= Basic Debian packaging configurations = == Basic Debian packaging configurations ==
Line 102: Line 102:
||<#ADADAC -4 style="border: medium none ;-moz-border-radius-bottomleft: 30px ;"> ''Thanks to [[https://wiki.debian.org/Eriberto | Eriberto]] and I recommend everyone to access this link https://debianet.com.br (Portuguese - Brazil) for more details on how to package your software in Debian.''|| ||<#EAE5DA -4 style="border: medium none ;-moz-border-radius-bottomleft: 30px ;"> ''Thanks to [[https://wiki.debian.org/Eriberto | Eriberto]] and I recommend everyone to access this link https://debianet.com.br (Portuguese - Brazil) for more details on how to package your software in Debian.''||
Line 104: Line 104:
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 107: Line 107:
user@debian:~$''' schroot -c unstable-amd64 -u root user@debian:~$ schroot -c unstable-amd64 -u root
Line 115: Line 115:
(unstable-amd64)root@debian:~#''' '''editor''' /etc/bash.bashrc (unstable-amd64)root@debian:~# editor /etc/bash.bashrc
Line 150: Line 150:
(unstable-amd64)root@debian:~#''' dpkg-reconfigure locales tzdata (unstable-amd64)root@debian:~# dpkg-reconfigure locales tzdata
Line 154: Line 154:
(unstable-amd64)root@debian:~#''' apt autoremove && apt autoclean (unstable-amd64)root@debian:~# apt autoremove && apt autoclean
Line 159: Line 159:
||<#ADADAC -4 style="border: medium none ;-moz-border-radius-bottomleft: 30px ;"> '''(unstable-amd64)root@debian:~#''' '''editor''' /etc/lintianrc|| {{{
(unstable-amd64)root@debian:~# editor /etc/lintianrc
}}}
Line 163: Line 165:
||<#EAE5DA -4 style="border: medium none ;-moz-border-radius-bottomleft: 30px ;"> display-info = yes<<BR>> pedantic = yes<<BR>> display-experimental = yes<<BR>> color = auto<<BR>>|| {{{
display-info = yes
pedantic = yes
display-experimental = yes
color = auto
}}}
Line 167: Line 174:
Edit the "'''/etc/devscripts.conf'''" file and enter your GPG key on the '''DEBSIGN_KEYID''' line and activate. Edit the '''/etc/devscripts.conf''' file and enter your GPG key on the '''DEBSIGN_KEYID''' line and activate.
Line 169: Line 176:
||<#ADADAC -4 style="border: medium none ;-moz-border-radius-bottomleft: 30px ;"> '''(unstable-amd64)root@debian:~#''' '''editor''' /etc/devscripts.conf||
Line 171: Line 177:
||<#ADADAC -4 style="border: medium none ;-moz-border-radius-bottomleft: 30px ;"> DEBSIGN_KEYID=0987654321ABC1234567890DFG0987654321HIJL|| {{{
(un
stable-amd64)root@debian:~# editor /etc/devscripts.conf
}}}

{{{
DEBSIGN_KEYID=0987654321ABC1234567890DFG0987654321HIJL
}}}

ToDo: merge this with Schroot

debian-cage.png

PACKAGES STUCK WITH SCHROOT

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

Thanks to Eriberto and I recommend everyone to access this link https://debianet.com.br (Portuguese - Brazil) for more details on how to package your software in Debian.

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...

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 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

4. Enabling the GPG key to sign packages

Edit the /etc/devscripts.conf file and enter your GPG key on the DEBSIGN_KEYID line and activate.

(unstable-amd64)root@debian:~# editor /etc/devscripts.conf

DEBSIGN_KEYID=0987654321ABC1234567890DFG0987654321HIJL

Save and close. With that, schroot is ready for Debian packaging and you don't need to be root to get the job done.


This wiki is a support and documentation resource for the Debian project. You are free to make improvements and corrections to this published content.


CategorySystemAdministration | CategoryVirtualization