SM1: Open-source operating systems |
ASIX/DAW/DAM-1
|
Task A13: How to share and install
software using tarball and .deb packages |
03-02-25
|
TASK A13: HOW TO SHARE AND
INSTALL SOFTWARE USING tarball AND .deb PACKAGES
GENERAL CONDITIONS
1- Deadline: 16-02-2025.
2- Send
your files attached
to an e-mail with the following specifications:
a) E-mail address:
cf(at)collados.org or jordi.binefa(at)fje.edu depending who is your
teacher
b) Subject:
b.1) ASIX1: asix1_surname_name_sm1act13
b.2) DAW1: daw1_surname_name_sm1act13
BEFORE STARTING: HOW TO INSTALL AND SHARE SOFTWARE ON DEBIAN
LINUX AND DERIVATIVES
a) Debian derivatives
- A Debian derivative is a distribution that
is based on the work done in Debian but has its own identity,
goals and audience and is created by an entity that is
independent from Debian. Derivatives modify Debian to achieve
the goals they set for themselves.
- A common pattern for derivatives is that of
reusing/rebuilding most of the official Debian packages and
adding some custom packages of their own.
- Distributions based on Debian are listed in
the Debian
derivatives census as well as in other
places.
- Popular derivatives:
- Ubuntu
-> Ubuntu is a Debian derivative aimed at popularising
and polishing Linux.
- Kali
-> Security auditing and penetration testing.
- Linux Mint has for a long
time been a favorite among many users – experts and
beginners alike – thanks to its user-friendliness and neat
and simple UI which make it easy to navigate around
- PureOS is a modern and
fully-features distro that takes pride in being a
privacy-respecting, secure, and user-friendly operating
system
- Knoppix
is a Debian variant primarily designed to be run from a Live
CD or USB drive. With your bootable medium, you can simply
plug it in on any machine and conveniently run it.
b) Installing software via tarball files
- A tarball archive is a
.tar.gz or .tar.bz2 file usually stored in a
server accessible via an internet.
- Tarballs
are used for programs which are not compiled, i.e. they are
presented as source code.
- Usually, a README
file is added to the tarball file with information about how
to compile (or build) and install the software on your
system.
- In
order to install software via a tarball file you
should follow this procedure:
- Download
the tarball file
- Extract
the code and README from the tarball file
- Read
carefully the README file
- Compile
(or build) the source code
- Install
software on your system
c) Installing software via
tarball files with the help of a Makefile
- In order to make easier the process of
compiling (or building), installing and removing software via
tarball files, usually an special file called Makefile
is added to the tarball file.
- A README file is added as well,
with information about how to use the Makefile.
- A software developement
tool called make. With the help of information
stored in Makefile, our system will
compile (or build) and install the new software on your
system. Makefile can be used to remove the installed
software as well.
- In order to install software via a tarball
file with Makefile
, this is the normal procedure:
- Download the
tarball file
- Extract the code from the
tarball file
- Compile (or build) the
source code running: make
- Install the new software
running: sudo make install
- Clean temporary files: make
clean
- In order to remove software via a tarball
file with Makefile,
this is the normal procedure:
- NOTE: You should
always read the README file in order to be
sure what is the right process to intall sofware using
a Makefile.
d)
Installing software via a .deb software package
and a package manager
- A
package manager is a tool that make easy to install
a .deb package. On Debian, typical package managers
are:
- dpkg,
apt-get or aptitude are typical
cli package managers
- Gdebi
or Synaptics are typical GUI package managers
- A .deb software package is a special file that consists of:
- The software (binary, configuration
files, etc...) that will be installed on the system.
- Files containing metada, in
other words, information about the software (software's
name, version number, dependencies and so on).
- Also, a package can contain extra
related material such as manuals, guides, examples and
tutorials.
- Version vs Release:
- Version: A change (or changes) in a file
(or set of file) of your software. Usually, there are
two or three kinds of changes:
- Major versions
- Minor versions
- Patch versions
- A 2.13 version means --> Major Version = 2, Minor
Version = 13
- A 2.13.6 version means --> Major
Version = 2, Minor Version = 13, Patch version = 6
- Release: Version of the software published after being
tested and deployed to customers
- In
order to install software via a .deb
file, this is the normal
procedure:
- Download
the .deb package
- Run
a package manager (dpkg, Gdebi, etc...) to install
the package on your system
e) Installing software via repository servers
- A software
repository is a storage
location from which software
packages may be retrieved and installed on a
computer.
- Normally,
a software
repository is
stored in a Web (HTTP) or FTP server accessible via
an internet connection.
- In
order to install software via a software
repository:
- You need
the repository server URL address
- You have
to create/update
/etc/apt/sources.list
- You have
to run a package manager such as aptitude
or apt-get or Synaptic
if you prefer a GUI package manager.
- By now, you should know how
to install packages via software
repositories because has been the usual
way to install software along this
academic year.
<--------------------<><><><><><>-------------------->
PART
I - CREATING TARBALL SOFTWARE PACKAGES
1.1- How to build a tarball software
package from a program made of a single source code
Step 1) Source
code development
We are going to develop a software that shows us our login name at
system. Make a new directory called loginteller on your
system. Change to the newly created directory. Start an instance
of Geany and write the folliwing source code in C language:
/* loginteller.c
* Based on monousuar.c at
http://www.binefa.net/gnu/gcc/processos/Informacio_d_usuari.html
* www.binefa.cat
* 20120507
*/
#include <stdio.h>
#include <unistd.h> // getlogin()
#include <stdlib.h> // exit()
int main(){
char *szLogin;
if((szLogin = getlogin())==NULL){
perror("getlogin");
exit(EXIT_FAILURE);
}
printf("Your login name at the system is
: %s\n",szLogin);
return (0);
}
In order to check if your code works
properly, run the following commnads:
dacomo@inf1-dacomo:~/loginteller$
gcc loginteller.c -o loginteller
dacomo@inf1-dacomo:~/loginteller$ ./loginteller
Your terminal will show you the following message:
Your login
name at the system is: dacomo
Of course, the message displayed by the terminal depends
on what your username is in the system.
Step 2)
Creating a Makefile archive
A Makefile typically starts with some variable
definitions which are then followed by a set of target entries
for building specific targets (typically .o & executable
files in C) or executing a set of command associated with a
target label. We are going to develop a Makefile for easily:
a) Compiling and linking the source code
b) Cleaning binary files
c) Installing binary files on your system
d) Uninstalling binary files on your system
Start an instance of Geany and write the following Makefile:
############################################################################
# Makefile for building: loginteller
# 20120508 - www.binefa.cat
#############################################################################
####### Compiler, tools and options
CC
= gcc
CFLAGS
= -o
INSTALL_PROGRAM = install -m 755 -p
DEL_FILE =
rm -f
####### Files
SOURCES = loginteller.c
DESTDIR = /usr/local/bin
TARGET = loginteller
####### Compilation and cleaning. Be
careful, you have to write a TAB
character at the beginnig of each
command. Do not write whitespace
characters.
loginteller:
$(CC) $(SOURCES) $(CFLAGS)
$(TARGET)
clean:
$(DEL_FILE) $(TARGET)
####### Install
and uninstall. Be
careful, you have to
write a TAB
character at the
beginnig of each
command. Do not
write whitespace
characters.
install: $(TARGET)
$(INSTALL_PROGRAM) $(TARGET)
$(DESTDIR)
uninstall:
$(DEL_FILE) $(DESTDIR)/$(TARGET)
Now,
you can easily:
a) Compile loginteller.c running the following
command: make (or make loginteller)
b) Clean old binaries and object
files running the following
command: make clean
c) Install a binary on your
system running as a sudo user the following command: make
install
d) Uninstall a binary on your
system running as a sudo
user the
following the command: make
uninstall
Step3) Creating a README file
A README file is a text file that contains information for
the user about the program. README files often contain
instructions and additional help. Add a README file with the
following content:
********************************************
*
*
* loginteller
v1.01
*
* Copyright (C) 2010-2021, jobima & dacomo *
*
*
********************************************
Welcome to the loginteller program! This program, once
installed as
/usr/local/sbin/loginteller, tells current login name
at the system.
SOURCES
=========
Web:
http://www.inf1-jobima.cat/software/utils/loginteller/
FTP:
ftp://ftp.inf1-jobima.cat/pub/utils/loginteller/loginteller.tar.gz
INSTALLATION
============
Installation of loginteller is quite easy.
Simply follow these steps:
1. Building:
# make loginteller
2. Installing:
# sudo make install
3. You are finished.
REMOVAL
=======
Removal of loginteller is quite easy as
well. Simply follow these steps:
1. Uninstalling:
# sudo make
uninstall
2. Cleaning (:
# make clean
3. You are finished.
LICENSE
=======
The logiteller program is
distributed under the terms of the
GNU
General Public License. The copyright on
this program belongs to Jordi
Binefa. The actual license appears in file
/usr/share/common-license/GPL.
Even though the GNU General Public License does
NOT require you to send
your modifications back to the author, it is
considered "good form" to do
so, as this allows your
modifications to be incorporated into
future
versions of the program, allowing others to benefit from
them.
FEEDBACK
========
Your comments, suggestions, corrections and enhancements are
always warmly
welcomed! Please send these to:
E-mail: jobima@inf1-jobima.cat
Step 4) Creating a .tar.gz file
Run the following command:
dacomo@inf1-dacomo:~/loginteller$ tar cfz
loginteller-1.01.tar.gz loginteller.c Makefile README
1.2- How to build a
tarball software package from a program made
of multiple source code
Step 1) Source code development
We are going to develop a software that shows us our login name
and UID at system. Make a new project directory called
loginteller2 on your system. Change to the newly created
directory. Start an instance of Geany and write the following
source codes in C language:
// login.c
// login.c gets the user's login username
// jobima & dacomo
// 20230509
#include <stdio.h>
#include <unistd.h> // getlogin()
#include <stdlib.h> // exit()
void showLogin(){
char *szLogin;
if((szLogin = getlogin())==NULL){
perror("getlogin");
exit(EXIT_FAILURE);
}
printf("Your login name at the system is :
%s\n",szLogin);
}
----------------------------------------------------------------------
// Program name: uid.c
// uid.c gets the user's UID number
// Authors: jobima & dacomo
// Date: 20230509
#include <stdio.h>
#include <unistd.h> // getuid()
void showUID(){
int iUID;
iUID = getuid();
printf("Your UID number at the system is
: %i\n",iUID);
}
----------------------------------------------------------------------
// Header name:
loginteller2.h
// Header required for loginteller2.c
// Authors: jobima & dacomo
// Date: 20230509
#ifndef LOGINTELLER2_H
#define LOGINTELLER2_H
void showLogin();
void showUID();
#endif
------------------------------------------------------------------------
// Program name: loginteller2.c
// Authors: jobima & dacomo
// loginteller shows the user's login name and UID number
// Date: 20230509
#include "loginteller2.h"
int main(){
showLogin();
showUID();
return 0;
}
Step 2) Creating a Makefile
archive
Start an instance of Geany and write the
following Makefile:
############################################################################
# Makefile for building: loginteller2
# jobima and dacomo
# 20230509
############################################################################
#
####### Compiler
CC
= gcc
####### Compiler options
CFLAGS
= -Wall -c
LFLAGS
= -Wall -o
####### Installing and uninstalling programs and options
INSTALL_PROGRAM = install -p -m 755
DEL_PROGRAM = rm -f
####### Files and directories
SOURCES = loginteller2.c login.c uid.c
DEPS = loginteller2.h
OBJECTS = loginteller2.o login.o uid.o
DESTDIR = /usr/bin
TARGET = loginteller2
####### Compilation, linking and installing. Be careful,
you have to write a TAB character at the beginnig of
each command. Do not write whitespace characters.
%.o: %.c $(DEPS) $(SOURCES)
$(CC)
$(CFLAGS) $(SOURCES)
loginteller2:$(OBJECTS)
$(CC)
$(OBJECTS) $(LFLAGS) $(TARGET)
install:$(TARGET)
$(INSTALL_PROGRAM) $(TARGET) $(DESTDIR)
####### Uninstalling and cleaning. Be careful, you have
to write a TAB character at the beginnig of each
command. Do not write whitespace characters.clean:
clean:$(TARGET) $(OBJECTS)
$(DEL_PROGRAM) $(TARGET) $(OBJECTS)
uninstall:
$(DEL_PROGRAM) $(DESTDIR)/$(TARGET)
Now, you can easily:
a) Compile and link your source codes
running the following command: make loginteller2
c) Install
a binary on your system
running as a sudo user the following command:
sudo make install
b) Clean old binaries
files running the following
command: make clean
d) Uninstall
a binary on your system
running as a sudo
user the following the
command: sudo make uninstall
Step3) Creating a README file
A README file is a text file that contains
information for the user about the program. README files
often contain instructions and additional help. Add a
README file with the following content:
********************************************
*
*
* loginteller2
v1.01
*
* Copyright (C) 2010-2023, XXXXXXX
*
*
*
********************************************
Welcome to the loginteller2 program! This
program, once installed as
/usr/local/bin/loginteller2, tells current uid
and login name at the system.
SOURCES
=========
Web:
http://www.fjeclot.cat/software/utils/loginteller2/
FTP:
ftp://ftp.fjeclot.cat/pub/utils/loginteller2.tar.gz
INSTALLATION
============
Installation of loginteller2 is quite
easy. Simply follow these steps:
1. Building:
# make
loginteller2
2. Installing:
# sudo make
install
3. You are finished.
REMOVAL AND CLEANING
====================
Removal and cleaning of loginteller2
is quite easy as well. Simply
follow these steps:
1. Uninstalling:
# sudo
make uninstall
2. Cleaning :
# make
clean
3. You are finished.
LICENSE
=======
The loginteller2 program is
distributed under the terms of
the GNU
General Public License. The
copyright on this program belongs to XXX
YYY. The actual license appears in file
/usr/share/common-license/GPL.
Even though the GNU General Public
License does NOT require you to send
your modifications back to the author, it is
considered "good form" to do
so, as this allows your
modifications to be incorporated
into future
versions of the program, allowing others to benefit
from them.
FEEDBACK
========
Your comments, suggestions, corrections and
enhancements are always warmly
welcomed! Please send these to:
E-mail: feedback@fjeclot.cat
Step 4) Creating a .tar.gz file
Run the following command:
dacomo@inf1-dacomo:~/loginteller2$
tar
cfz
loginteller2-1.01.tar.gz
loginteller2.c
login.c uid.c
loginteller2.h
README
Makefile
<--------------------<><><><><><>-------------------->
PART II -
CREATING .DEB PACKAGES
2.1- Installing checkinstall
In order to build a .deb package you need an
application called checkintall
installed on your system. In ordre to install checkintall
run the following commands:
dacomo@inf1-dacomo:~$
sudo aptitude update
dacomo@inf1-dacomo:~$
sudo aptitude
install
checkinstall
But If If your system tells you that
it couldn't find a package called checkinstall
then add the following line to /etc/apt/sources.list:
deb
http://deb.debian.org/debian buster-backports main
and run again:
dacomo@inf1-dacomo:~$
sudo aptitude update
dacomo@inf1-dacomo:~$
sudo aptitude
install
checkinstall
2.2-
How to build a .deb software package from a
program made of a single source code
We are going to create a .deb software
package for the programa called loginteller.c that
we developed in section 1.1 following these steps:
a) Check if Makefile exists. If it
does not exist then you have to create it. Remember: Makefile
and loginteller.c have to be stored in
the same directory.
b) If you had installed a previous version of loginteller
from a tarball package then, remove
any binary running make clean and uninstall
the software running make uninstall.
c) Run checkinstall:
dacomo@inf1-dacomo:~/loginteller$
checkinstall --install=no --deldesc=yes
--backup=no
checkinstall 1.6.3, Copyright 2010 Felipe Eduardo
Sanchez Diaz Duran
This software is released under the GNU GPL.
The package documentation directory ./doc-pak does not
exist.
Should I create a default set of package docs?
[y]: n
Please write a description for the package.
End your description with an empty line or EOF.
>> It tells current login name at the system
>>
*****************************************
**** Debian package creation selected ***
*****************************************
This package will be built according to these values:
0 - Maintainer: [ dacomo@inf1-dacomo ]
1 - Summary: [ It tells current login name at
the system ]
2 - Name: [ loginteller ]
3 - Version: [ 20200414 ]
4 - Release: [ 1 ]
5 - License: [ GPL ]
6 - Group: [ checkinstall ]
7 - Architecture: [ amd64 ]
8 - Source location: [ loginteller ]
9 - Alternate source location: [ ]
10 - Requires: [ ]
11
- Recommends: [ ]
12 - Suggests: [ ]
13 - Provides: [ loginteller ]
14 - Conflicts: [ ]
15 - Replaces: [ ]
Enter a number to change any of them or press ENTER to
continue: 0
Enter the maintainer's name and e-mail address:
>> dacomo@inf1-dacomo (NOTE:
dacomo must be change into your user name)
This package will be built according to these values:
0 - Maintainer: [ dacomo@inf1-dacomo.fjeclot.net
]
1 - Summary: [ It tells current login name at
the system ]
2 - Name: [ loginteller ]
3 - Version: [ 20210513
]
4 - Release: [ 1 ]
5 - License: [ GPL ]
6 - Group: [ checkinstall ]
7 - Architecture: [ amd64 ]
8 - Source location: [ loginteller ]
9 - Alternate source location: [ ]
10 - Requires: [ ]
11
- Recommends: [ ]
12 - Suggests: [ ]
13 - Provides: [ loginteller ]
14 - Conflicts: [ ]
15 - Replaces: [ ]
Enter a number to change any of them or press ENTER to
continue: 3
Enter new version:
>> 0.1
This package will be built according to these values:
0 - Maintainer: [ dacomo@inf1-dacomo.fjeclot.net
]
1 - Summary: [ It tells current login name at
the system ]
2 - Name: [ loginteller ]
3 - Version: [ 1.01 ]
4 - Release: [ 1 ]
5 - License: [ GPL ]
6 - Group: [ checkinstall ]
7 - Architecture: [ amd64 ]
8 - Source location: [ loginteller ]
9 - Alternate source location: [ ]
10 - Requires: [ ]
11
- Recommends: [ ]
12 - Suggests: [ ]
13 - Provides: [ loginteller ]
14 - Conflicts: [ ]
15 - Replaces: [ ]
Enter a number to change any of them or press ENTER to
continue: 6
Enter the new software group:
>> utilities
This package will be built according to these values:
0 - Maintainer: [ dacomo@inf1-dacomo.fjeclot.net
]
1 - Summary: [ It tells current login name
at the system ]
2 - Name: [ loginteller ]
3 - Version: [ 1.01 ]
4 - Release: [ 1 ]
5 - License: [ GPL ]
6 - Group: [ utilities ]
7 - Architecture: [ amd64 ]
8 - Source location: [ loginteller ]
9 - Alternate source location: [ ]
10 - Requires: [ ]
11 -
Recommends: [ ]
12 - Suggests: [ ]
13 - Provides: [ loginteller ]
14 - Conflicts: [ ]
15 - Replaces: [ ]
Enter a number to change any of them or press ENTER to
continue:
Installing with make install...
=========================
Installation results ===========================
gcc loginteller.c -o loginteller
install -m 755 -p loginteller /usr/local/bin
======================== Installation successful
==========================
Copying files to the temporary directory...OK
Stripping ELF binaries and libraries...OK
Compressing man pages...OK
Building file list...OK
Building Debian package...OK
NOTE: The package will not be installed
Erasing temporary files...OK
Deleting temp dir...OK
*********************************************************************
Done. The new package has been installed and
saved to
/home/dacomo/loginteller/loginteller_1.01-1_amd64.deb
You can install it in your system anytime using:
dpkg -i
loginteller_1.01-1_amd64.deb
**********************************************************************
d) At this moment a new .deb package loginteller_1.01-1_amd.64.deb
has been build in your working directory. Run the
following command:
dacomo@inf1-dacomo:~/loginteller$
ls
and your terminal will show you the
following files:
loginteller loginteller_1.01-1_amd64.deb
loginteller.c Makefile
e) Install loginteller_1.01-1_amd64.deb running:
dacomo@inf1-dacomo:~/loginteller$
sudo dpkg -i
loginteller_1.01-1_amd64.deb
[sudo] password for dacomo:
Selecting previously unselected package
loginteller.
(Reading database ... 300676 files and directories
currently installed.)
Preparing to unpack loginteller_1.01-1_amd64.deb
...
Unpacking loginteller (1.01-1) ...
Setting up loginteller (1.01-1) ...
Afterwards, run the following command:
dacomo@inf1-dacomo:~/loginteller$
aptitude search loginteller
and your terminal will show
the following message:
i
loginteller
- It tells current
login name at the system
e) Run the following command:
dacomo@inf1-dacomo:~/loginteller$
aptitude show loginteller
and your terminal
will show you the following
message:
Package:
loginteller
Version: 1.01-1
New: yes
State: installed
Automatically installed: no
Priority: extra
Section: utilities
Maintainer: dacomo@inf1-dacomo.fjeclot.net
Architecture: amd64
Uncompressed Size: 36.9 k
Description: It tells current login name at the system
f) If you want to remove loginteller from
your system run the following command: sudo dpkg
-r loginteller
Reading database ... 300678
files and directories currently installed.)
Removing loginteller (1.01-1) ...
dpkg: warning: while removing loginteller, directory
'/usr/local/bin' not empty so not removed (NOTE: Do not worry about any warning
message)
g) If you want to install loginteller
through the terminal run again: sudo dpkg
-i loginteller_1.01-1_amd64.deb
jihuh
2.3- How to
build a .deb software package from a program made of a
multiple source code
We are going to create
a .deb software package for the programa
called loginteller2.c that we developed in section
1.2 following these steps:
a) Run checkinstall:
dacomo@inf1-dacomo:~/loginteller2$
checkinstall --install=no
--deldesc=yes --deldoc=yes --delspec=no -d 0
--backup=no
checkinstall 1.6.3, Copyright 2010 Felipe
Eduardo Sanchez Diaz Duran
This software is released under the GNU GPL.
The package documentation directory ./doc-pak
does not exist.
Should I create a default set of package
docs? [y]: y
Please write a description for the package.
End your description with an empty line or EOF.
>> It tells current login name and UID
number at the system
>>
*****************************************
**** Debian package creation selected ***
*****************************************
This package will be built according to these
values:
0 - Maintainer: [ dacomo@inf1-dacomo ]
1 - Summary: [ It tells current login
name and UID number at the system ]
2 - Name: [ loginteller2
]
3 - Version: [ 20230509 ]
4 - Release: [ 1 ]
5 - License: [ GPL ]
6 - Group: [ checkinstall ]
7 - Architecture: [ amd64 ]
8 - Source location: [ loginteller ]
9 - Alternate source location: [ ]
10 - Requires: [ ]
11
- Recommends:
[ ]
12 - Suggests:
[ ]
13 - Provides: [ loginteller ]
14 - Conflicts: [ ]
15 - Replaces: [ ]
Enter a
number to change any of them or press ENTER to
continue: 3
Enter new version:
>> 1.01
This package will be built according to these
values:
0 - Maintainer: [ dacomo@inf1-dacomo ]
1 - Summary: [ It tells
current login name and UID
number at the system
]
2 - Name: [ loginteller
]
3 - Version: [ 1.01 ]
4 - Release: [ 1 ]
5 - License: [ GPL ]
6 - Group: [ checkinstall ]
7 - Architecture: [ amd64 ]
8 - Source location: [ loginteller ]
9 - Alternate source location: [ ]
10 - Requires: [ ]
11
- Recommends:
[ ]
12 - Suggests:
[ ]
13 - Provides: [ loginteller ]
14 - Conflicts: [ ]
15 - Replaces: [ ]
Enter a number to change any of them or press
ENTER to continue: 6
Enter the new software group:
>> utilities
This package will be built according to these
values:
0 - Maintainer: [ dacomo@inf1-dacomo
]
1 - Summary: [ It tells
current login name and UID
number at the system
]
2 - Name: [
loginteller ]
3 - Version: [ 1.01 ]
4 - Release: [ 1 ]
5 - License: [ GPL ]
6 - Group: [ utilities
]
7 - Architecture: [ amd64 ]
8 - Source location: [ loginteller ]
9 - Alternate source location: [ ]
10 - Requires: [ ]
11 -
Recommends: [ ]
12 - Suggests: [ ]
13 - Provides: [ loginteller ]
14 - Conflicts: [ ]
15 - Replaces: [ ]
Enter a number to change any of them or press
ENTER to continue:
Installing with make install...
=========================
Installation results
===========================
gcc -Wall -c loginteller2.c login.c uid.c
gcc loginteller2.c login.c uid.c -Wall -o
loginteller2
install -p -m 755 loginteller2 /usr/bin
======================== Installation
successful ==========================
Copying documentation directory...
./
./README
chown: changing ownership of
'/var/tmp/tmp.FehxWLeUDX/package//usr/share/doc/loginteller2/README':
Operation not permitted
chown: changing ownership of
'/var/tmp/tmp.FehxWLeUDX/package//usr/share/doc/loginteller2':
Operation not permitted
Copying files to the temporary directory...OK
Stripping ELF binaries and libraries...OK
Compressing man pages...OK
Building file list...OK
Building Debian package...OK
NOTE: The package will not be installed
Erasing temporary files...OK
Deleting doc-pak directory...OK
Deleting temp dir...OK
**********************************************************************
Done. The new package has been saved to
/home/dacomo/m01tu3p4/loginteller2/loginteller2_1.01-1_amd64.deb
You can install it in your system
anytime using:
dpkg -i
loginteller2_1.01-1_amd64.deb
**********************************************************************
d) At this moment a new .deb package
loginteller2_1.01-1_amd.64.deb
has been build in your working directory. Run
the following command:
dacomo@inf1-dacomo:~/loginteller2$
ls
and your terminal will show you
the following files:
login.c
login.o loginteller2
loginteller2_1.01-1_amd64.deb
loginteller2.c
loginteller2.h
loginteller2.o
Makefile README
uid.c uid.o
e) Install loginteller2_1.01-1_amd64.deb
running:
dacomo@inf1-dacomo:~/loginteller2$
sudo dpkg -i
loginteller2_1.01-1_amd64.deb
[sudo]
password for dacomo:
Selecting previously unselected
package loginteller2.
(Reading database ... 238295 files and
directories currently installed.)
Preparing to unpack
loginteller2_1.01-1_amd64.deb ...
Unpacking loginteller2 (1.01-1) ...
Setting up loginteller2 (1.01-1)
Afterwards, run the
following command:
dacomo@inf1-dacomo:~/loginteller2$
aptitude search loginteller2
and your
terminal will show the following
message:
i
loginteller
- It tells
current login name and UID
number at the system
e) Run the following command:
dacomo@inf1-dacomo:~/loginteller2$
aptitude show loginteller2
and your
terminal will show you the
following message:
Package:
loginteller2
Version: 1.01-1
New: yes
State: installed
Automatically installed: no
Priority: extra
Section: utilities
Maintainer: dacomo@inf1-dacomo
Architecture: amd64
Uncompressed Size: 49.2 k
Description: It tells current login name and UID number
at the system
f) Check that your README has been copied
at /usr/share/doc/loginteller2 directory.
g) If you want
to check if your program
works run:
dacomo@inf1-dacomo:~/loginteller2$
loginteller2
and your terminal will show you
the following message:
Your
login name at the system is: dacomo
Your UID
number at the system is:
1000
g) Finally, if you want to remove loginteller2
from your system run the following command:
dacomo@inf1-dacomo:~/loginteller2$
sudo
dpkg -r loginteller2
[sudo]
password for dacomo:
(Reading database ... 238298 files and directories
currently installed.)
Removing loginteller2 (1.01-1) ...
<--------------------<><><><><><>-------------------->
PRACTICAL EXERCISE
1- Create:
a) loginteller-1.01.tar.gz
with the help of information you can find here.
b) loginteller-1.01.tar.gz with the
help of information you can
find here.
c) loginteller-1.01-1_amd64.deb with the
help of information you can
find here.
d) loginteller2-1.01-1_amd64.deb with the help of information you
can find here.
2- Download the
following source code: https://www.collados.org/asix1/sm1/tasks/sm1act13/userinfo.c. Create:
a) A Makefile
to compile,
clean, install (on /usr/local/bin) and
uninstall userinfo on your
system.
b)
A README file with
information about
version (2.07), release (4),
authors (write your personal
information), a small
explanation, sources,
compiling, installing,
removal, license and
feedback.
c) Build a .deb package
called userinfo_2.07-4_amd64.deb with userinfo.c and the Makefile archive
created in the previous
question. Write
your personal
information in Maintener.
3- Download the following source code: https://www.collados.org/asix1/sm1/tasks/sm1act13/triangle.c.
Create:
a) A Makefile
to compile, clean, install (on /usr/local/bin)
and uninstall triangle on your system.
b) A README
file with information about version
(6.28), release (2), authors (write your
personal information), a small explanation,
sources, compiling, installing, removal, license
and feedback.
c) Build
a .deb package called triangle_6.28-2_amd64.deb
with triangle.c and the Makefile
archive created in the previous question. Write your personal
information in Maintainer.
4- Download the
following source code: https://www.collados.org/asix1/sm1/tasks/sm1act13/netshow.tar.gz.
Create:
a)
A Makefile to compile,
clean, install (on /usr/bin)
and uninstall netshow on
your system.
b) A README
file with information about
version (1.04), release (4),
authors (write your personal
information), a small explanation,
sources, compiling, installing,
removal, license and feedback.
c) Build a
.deb package called netshow_1.04-4_amd64.deb
with the files .c, .h
and the Makefile archive
created in the previous question.
Write your
personal information
in Maintainer.
5.- Send: loginteller-1.01.tar.gz, loginteller-1.01.tar.gz,
loginteller-1.01-1_amd64.deb, loginteller2-1.01-1_amd64.deb, userinfo_2.07-4_amd64.deb,
triangle_6.28-2_amd64.deb, netshow_1.04-4_amd64.deb