Work on boss

From Bosslinux
Jump to: navigation, search

1. Introduction to Packages

All packages that are included in the official BOSS distribution are free according to the BOSS Free Software Guidelines.
This assures free use and redistribution of the packages and their complete source code. There are three sections in
the BOSS distribution main , contrib , non-free.

As a service to our users, we also provide packages in separate sections that cannot be included in the main distribution
due to either a restrictive license or legal issues. They include:

Contrib :

Packages in this area are freely licensed by the copyright holder but depend on other software that is not free.

Non-Free :

Packages in this area have some onerous license condition restricting use or redistribution of the software.


2.Package Installation in BOSS:


Accessing BOSS-Savir (stable)

Savir can be accessed through savir/stable

 Update /etc/apt/sources.list with 
 For Binary (deb packages)
    deb http://packages.bosslinux.in/boss savir main conrtib non-free
 For source (tar.gz, dsc)
    deb-src http://packages.bosslinux.in/boss savir main contrib non-free


Accessing Edu-BOSS (stable)

Edu-BOSS can be accessed through eduboss/stable

 Update /etc/apt/sources.list with 
 For Binary (deb packages)
    deb http://packages.bosslinux.in/boss eduboss main conrtib non-free
 For source (tar.gz, dsc)
    deb-src http://packages.bosslinux.in/boss eduboss main contrib non-free


Accessing BOSS-Tejas (stable)

Tejas can be accessed through tejas/stable
 Update /etc/apt/sources.list with 
 For Binary (deb packages)
    deb http://packages.bosslinux.in/boss tejas main contrib non-free
 For source (tar.gz, dsc)
    deb-src http://packages.bosslinux.in/boss tejas main contrib non-free


Accessing BOSS-Advanced Server (stable)

Server can be accessed through server/stable

 Update /etc/apt/sources.list with 
 For Binary (deb packages)
    deb http://packages.bosslinux.in/boss server main contrib non-free
 For source (tar.gz, dsc)
    deb-src http://packages.bosslinux.in/boss server main contrib non-free


3.Installing additional packages/applications from the boss packages repository:

update /etc/apt/sources.list with the repo path specified on the top according to the release you are using (savir/tejas)

You can install the package needed in two ways ..

1. Using Graphical Front End - Synaptic

    Desktop --> Administration --> Synaptic Package Manager
     
    Check the Packages which you want to install and click on Apply button to install those packages.

2. Using apt tool

 apt is an Advanced Packaging Tool. APT is a management system for software packages.
 After updating sources.list, do 
    $ apt-get update  --> This will scan the repository mentioned in sources.list
     
    $ apt-get install package-name --> Install the package you want.Replace package-name with the actual name of 
     the package.

Getting the source Package:

    $ apt-get -d source source-package-name

Searching the Package existence in the repository

    $ apt-cache search package-name

Removing the installed pacakge in the system

    $ apt-get remove package-name

Installing Downloaded Packages

Sometimes you might want to install a package which you have downloaded from a website, rather than from a software repository.These packages are called .deb files.Because they may have been created for a different Linux distribution, they may have unmet dependencies on BOSS and so may not be installable.

Using dpkg to install packages

dpkg is a command-line tool used to install packages. To install a package with dpkg, open a Terminal and type the following:

    $ cd directory 
    $ sudo dpkg -i package_name.deb

Note: replace directory with the directory in which the package is stored and package_name with the filename of the package.

It is recommended that you read the dpkg manual page before using dpkg, as improper use may break the package management database. To view the manual page for dpkg, open a Terminal and type man dpkg.


4. How To Create A .DEB Package


To create a .deb package, firstly make sure you have all the dependencies required for compiling the package. Basically, try to compile it first and if once you can do that, it means everything is installed properly and you can create the .deb package.

1. Install all the packages needed for creating a .deb package:


sudo apt-get install build-essential autoconf automake autotools-dev dh-make debhelper devscripts fakeroot xutils lintian pbuilder


2. Folder and source preparations:

Extract the archive for the application you want to create the .deb file and name the folder

like this  : packagename-packageversion

NOTE 1:

The folder name must be lowercase.</p. NOTE 2 : <p> You should start packaging with a completely clean source directory, or simply with freshly unpacked sources.

NOTE 3 :

Then, place the source package .tar.gz file one directory up fromwhere the source files have been extracte


If you don't have the source files .tar.gz archive, simply create an archive from your source files (if for instance you downloaded the packages using Git)


3. Begin the “Debianization”:

I will use the ABC.01 files in my example, for easier explanations. To begin the "debianization", run the following commands:

     root@boss[~]#cd ABC.01
     root@boss[~]#  dh_make -e youremail@address -f . ./ABC.01.tar.gz


Where ABC.01 is the source files folder of the application you want to create the .deb package of, ABC.01.tar.gz is the tar.gz archive of the original source files and youremail@address is your email address.



This should be displayed after running the above command:

 Type of package: single binary, indep binary, multiple binary, library,kernel  module, kernel patch or cdbs?
[s/i/m/l/k/n/b]


We'll not get into complicated things right now, so select "s" (single binary). Then hit "Enter" to confirm.


Please note that you should run dh_make only once, and that it won't behave correctly if you run it again in the same, already "debianized", directory.


4.The "control" file:

Probably the most important step is how you edit the control file. This file contains various values which dpkg, dselect and other package management tools will use to manage the package.

This file will be created after completing step 3, and you can find it in the "debian" folder in the directory containing your source files. It initially looks like this:


1 Source: x264
2 Section: unknown
3 Priority: extra
4 Maintainer: andrei <webupd8@gmail.com>
5 Build-Depends: debhelper (>= 7), autotools-dev
6 Standards-Version: 3.8.1
7 Homepage: <insert the upstream URL, if relevant>
8
9 Package: x264
10 Architecture: any
11 Depends: ${shlibs:Depends}, ${misc:Depends}
12 Description: <insert up to 60 chars description>
<insert long description, indented with spaces>


For now, enter a hompage (line 7) and a description (line 12) for your package and also a section, such as "X11", on line 2.


Now, a very important step: we must enter the build dependencies on line 5, To find out which files our package needs, run the following command:


  root@boss[~]# dpkg-depcheck -d ./configure

At the bottom, the output of this command should be something like this:

Packages needed:
libc6-i686
libldap-2.4-2
libsasl2-2
libtasn1-3
yasm
libgpg-error0
libgcrypt11
libkeyutils1
libidn11
libgnutls26
libk5crypto3
locales
libcurl3-gnutls
libkrb5support0
libkrb5-3
libgssapi-krb5-2
gawk


Enter all these packages on the line 5 of your control file, separated by a comma and a space. Don't remove the already existing packages on line 5!

Here is how my control file now looks like:

Source: ABC.01
Section: X11
Priority: extra
Maintainer: sai <sai@gmail.co>
Build-Depends: debhelper (>= 7), autotools-dev, libc6-i686, libldap-2.4-2,   libsasl2-2, libtasn1-3, yasm, libgpg-error0, libgcrypt11, libkeyutils1, 1libidn11, libgnutls26, libk5crypto3, locales, libcurl3-gnutls,  libkrb5support0, libkrb5-3, libgssapi-krb5-2, gawk
Standards-Version: 3.8.1
Homepage: http://www.videolan.org/developers/x264.html
Package: ABC.01
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: ABC.01 is a free library for encoding H264/AVC video streams.

5.The "copyright" file:

In the same "debian" folder, you will also find a "copyright" file which you need to edit. The important things to add to this file are the place you got the package from and the actual copyright notice and license.

You must include the complete license, unless it's one of the common free software licenses such as GNU GPL or LGPL, BSD or the Artistic license, when you can just refer to the appropriate file in /usr/share/common-licenses/ directory that exists on every Debian system.

6.The "changelog" file:

Also in the same "debian" folder, this file is very important, especially for signing your .deb file with your GPG key


NOTE : The name of the maintainer in the changelog file must be exactly the same as the one entered for the GPG key, so edit it and enter your name. Here is how mine looks like:

ABC.01 unstable; urgency=low * Initial release (Closes: #nnnn) <nnnn is the bug number of your ITP> -- sai <saiv@gmail.com> Thu, 09 Dec 2010 22:40:24 +0200


If you enter the wrong name, you will see something like this:

dpkg-deb: building package `ABC.01 in `../ABC.01.deb'. signfile x264-0.1+svn20100107-1.dsc gpg: skipped "sai <sai@gmail.com>": secret key not available gpg: [stdin]: clearsign failed: secret key not available

7. Building the actual .deb package:

Run the following command:

 root@boss[~]# dpkg-buildpackage -rfakeroot
 dpkg-depcheck -d ./configure

If you successfully completed step 6, you should be asked for your GPG passkey. Enter it and proceed. The .deb file should be now created in your home file, along with the .dsc, .changes, .diff.gz and .orig.tar.gz files.


8. Optional: Check your new .deb package using lintian:

Run the following command:

 root@boss[~]# lintian -Ivi ../yourpackage.changes


5.HOW TO INSTALL MOODLE IN BOSS



.