SlideShare una empresa de Scribd logo
1 de 16
Descargar para leer sin conexión
Debian Packaging
La potencia sin control no sirve de nada

                                   ●Javier Carranza
                     ●   javier.carranza@interactors.coop
                               ●http://www.interactors.coop


                                                          ●


                                                          ●


                                       ●Proyecto Debian
                                   ●http://www.debian.org


                                                 ●Ubuntu


                              ●http://www.ubuntulinux.org
Herramientas Debian
●   Utilidades para la generación de paquetes:

                   ● debhelper /* scripts debian/rules */
                   ● dpkg-dev /* dpkg-buildpackage, dpkg-

                         scanpackages, ... */
                   ● dh-make /* dh_make */
                   ● lintian

                   ● linda

                   ● fakeroot

Javier Carranza Abadía                Debian Packaging      Interactors
Generación de un paquete Debian
 trunks@Orthanc:~/desarrollo (2 Kb) $ mkdir xapi-1.6
 trunks@Orthanc:~/desarrollo (2 Kb) $ cd xapi-1.6/
 trunks@Orthanc:~/desarrollo/xapi-1.6 (0 bytes) $ dh_make -e
 packmaster@guadalinex.org --copyright gpl -f ../../xapi-1.6.tar.gz

 Type of package: single binary, multiple binary, library, or kernel module?
  [s/m/l/k] s

 Maintainer name : Javier Carranza
 Email-Address   : packmaster@guadalinex.org
 Date            : Wed, 22 Jun 2005 09:54:26 +0200
 Package Name    : xapi
 Version         : 1.6
 License         : gpl
 Type of Package : Single
 Hit <enter> to confirm:
 Currently there is no top level Makefile. This may require additional tuning.
 Done. Please edit the files in the debian/ subdirectory now. You should also
 check that the xapi Makefiles install into $DESTDIR and not in / .




Javier Carranza Abadía           Debian Packaging                        Interactors
Generación de un paquete Debian (II)

trunks@Orthanc:~/desarrollo/xapi-1.6 (0 bytes) $ ls
debian/
trunks@Orthanc:~/desarrollo/xapi-1.6 (0 bytes) $ cd debian/
trunks@Orthanc:~/desarrollo/xapi-1.6/debian (23 Kb) $ ls
changelog     copyright emacsen-install.ex manpage.1.ex       postinst.ex
README.Debian    xapi.doc-base.EX
compat        cron.d.ex emacsen-remove.ex    manpage.sgml.ex postrm.ex     rules*
conffiles.ex dirs        emacsen-startup.ex manpage.xml.ex    preinst.ex
watch.ex
control       docs       init.d.ex           menu.ex          prerm.ex     xapi-
default.ex
trunks@Orthanc:~/desarrollo/xapi-1.6/debian (23 Kb) $ rm conffiles.ex cron.d.ex
emacsen-* init.d.ex manpage.* preinst.ex prerm.ex watch.ex xapi-default.ex
xapi.doc-base.EX README.Debian
trunks@Orthanc:~/desarrollo/xapi-1.6/debian (5 Kb) $ mv menu.ex menu; mv
postinst.ex postinst; mv postrm.ex postrm
trunks@Orthanc:~/desarrollo/xapi-1.6/debian (5 Kb) $ ls
changelog compat control copyright dirs docs menu postinst postrm rules*




Javier Carranza Abadía            Debian Packaging                        Interactors
debian/control

Source: xapi
Section: unknown /* guadalinex */
Priority: optional
Maintainer: Javier Carranza <packmaster@guadalinex.org>
Build-Depends: debhelper (>= 4.0.0)
Standards-Version: 3.6.1

Package: xapi
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: <insert up to 60 chars description>
/* Manjeador de paquetes deb para instalacion desde navegador */
 <insert long description, indented with spaces>
/* xapi facilita la instalacion de paquetes .deb desde el navegador
    tras ser descargados desde la web */




Javier Carranza Abadía         Debian Packaging                       Interactors
debian/changelog
xapi (1.6-1) unstable; urgency=low

  * Initial release Closes: #nnnn    (nnnn is the bug number of your ITP)

 -- Javier Carranza <packmaster@guadalinex.org>         Wed, 22 Jun 2005 09:54:26 +0200




                           debian/menu
  ?package(xapi):needs="X11|text|vc|wm" section="Apps/see-menu-manual"
    title="xapi" command="/usr/bin/xapi"




Javier Carranza Abadía               Debian Packaging                            Interactors
debian/copyright
This package was debianized by Javier Carranza <packmaster@guadalinex.org> on
Wed, 22 Jun 2005 09:54:26 +0200.

It was downloaded from <fill in ftp site>

Copyright Holder: <put author(s) name and email here>

License:

   This package is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 2 of the License, or
   (at your option) any later version.

   This package is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this package; if not, write to the Free Software
   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
   02111-1307, USA.

On Debian systems, the complete text of the GNU General
Public License can be found in `/usr/share/common-licenses/GPL'.

Javier Carranza Abadía                 Debian Packaging                         Interactors
preinst, prerm, postinst, postrm
postrm

# Automatically added by dh_installmenu
if [ "$1" = "configure" ] && [ -x /usr/bin/update-menus ]; then update-
menus ; fi
# End automatically added section
# Automatically added by dh_desktop
if [ "$1" = "configure" ] && which update-desktop-database >/dev/null
2>&1 ; then
        update-desktop-database -q
fi
# End automatically added section
# Automatically added by dh_installmime
if [ "$1" = "configure" ] && [ -x /usr/sbin/update-mime ]; then update-
mime; fi
# End automatically added section




Javier Carranza Abadía       Debian Packaging                   Interactors
debian/rules
#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-make.

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1


CFLAGS = -Wall -g

ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
        CFLAGS += -O0
else
        CFLAGS += -O2
endif

configure: configure-stamp
configure-stamp:
        dh_testdir
        # Add here commands to configure the package.

        touch configure-stamp

Javier Carranza Abadía                 Debian Packaging                         Interactors
debian/rules (II)
build: build-stamp

build-stamp: configure-stamp
        dh_testdir
        # Add here commands to compile the package.
        $(MAKE)
        #docbook-to-man debian/xapi.sgml > xapi.1
        touch build-stamp

clean:
         dh_testdir
         dh_testroot
         rm -f build-stamp configure-stamp

         # Add here commands to clean up after the build process.
         -$(MAKE) clean
         dh_clean

install: build
        dh_testdir
        dh_testroot
        dh_clean -k
        dh_installdirs

         # Add here commands to install the package into debian/xapi.
         $(MAKE) install DESTDIR=$(CURDIR)/debian/xapi

Javier Carranza Abadía                  Debian Packaging                Interactors
debian/rules (III)
                                                     #      dh_installinfo
                                                            dh_installman
                                                            dh_link
# Build architecture-independent files here.
                                                            dh_strip
binary-indep: build install
                                                            dh_compress
# We have nothing to do by default.
                                                            dh_fixperms
                                                     #      dh_perl
# Build architecture-dependent files here.
                                                     #      dh_python
binary-arch: build install
                                                     #      dh_makeshlibs
        dh_testdir
                                                            dh_installdeb
        dh_testroot
                                                            dh_shlibdeps
        dh_installchangelogs
                                                            dh_gencontrol
        dh_installdocs
                                                            dh_md5sums
        dh_installexamples
                                                            dh_builddeb
#       dh_install
#       dh_installmenu
                                                     binary: binary-indep binary-arch
#       dh_installdebconf
                                                     .PHONY: build clean binary-indep
#       dh_installlogrotate
                                                     binary-arch binary install configure
#       dh_installemacsen
#       dh_installpam
#       dh_installmime
#       dh_installinit
#       dh_installcron




Javier Carranza Abadía                Debian Packaging                             Interactors
Generación de un paquete Debian (III)


trunks@Orthanc:~/desarrollo/xapi-1.6 (0 bytes) $ dpkg-buildpackage
-rfakeroot -kAA6AB5CB

[...]


trunks@Orthanc:~/desarrollo/xapi-1.6 (0 bytes) $ ls ..
xapi-1.6/           xapi_1.6-1.dsc              xapi_1.6-1_powerpc.deb
xapi_1.6-1.diff.gz xapi_1.6-1_powerpc.changes xapi_1.6.orig.tar.gz




Javier Carranza Abadía       Debian Packaging                   Interactors
Depuración (lintian/linda)
trunks@Orthanc:~/desarrollo/xapi-1.6 (0 bytes) $ lintian -i ../xapi_1.6-1_powerpc.deb
W: xapi: unknown-section unknown
N:
N:   The `Section:' field in this package's control file is not one of the
N:   sections in use on the ftp archive. Valid sections are currently
N:   admin, base, comm, devel, doc, editors, electronics, embedded, games,
N:   gnome, graphics, hamradio, interpreters, kde, libdevel, libs, mail,
N:   math, misc, net, news, oldlibs, otherosfs, perl, python, science,
N:   shells, sound, tex, text, utils, web, and x11.
N:
N:   The section name should be preceded by `non-free/' if the package is
N:   in the non-free distribution, and by `contrib/' if the package is in
N:   the contrib distribution.
N:
N:   Refer to Policy Manual, section 2.4 for details.
N:

trunks@Orthanc:~/desarrollo/xapi-1.6 (0 bytes) $ lintian -i ../xapi_1.6-1.dsc
trunks@Orthanc:~/desarrollo/xapi-1.6 (0 bytes) $ linda -i ../xapi_1.6-1.dsc
trunks@Orthanc:~/desarrollo/xapi-1.6 (0 bytes) $ linda -i ../xapi_1.6-1_powerpc.deb
File /home/trunks/desarrollo/xapi_1.6-1_powerpc.deb failed to process: Format args for
unknown-section don't match Description. (0 vs 1)




Javier Carranza Abadía              Debian Packaging                           Interactors
Colaboración con Debian
       ●   Documentación y traducción
                 http://www.debian.org/doc

       ●   Empaquetado de software


       ●   Depuración e informe de errores
                 http://www.debian.org/Bugs



Javier Carranza Abadía       Debian Packaging   Interactors
Documentación para desarrolladores

                         Documentación online:
                         http://www.debian.org/doc

                 Documentación empaquetada:
                     debian-policy, maint-guide,
            debian-reference-en, debian-installer-manual




Javier Carranza Abadía          Debian Packaging           Interactors
Javier Carranza
javier.carranza@interactors.coop
   http://www.interactors.coop

Más contenido relacionado

La actualidad más candente

CASPUR Staging System II
CASPUR Staging System IICASPUR Staging System II
CASPUR Staging System II
Andrea PETRUCCI
 

La actualidad más candente (20)

CASPUR Staging System II
CASPUR Staging System IICASPUR Staging System II
CASPUR Staging System II
 
TP2 Big Data HBase
TP2 Big Data HBaseTP2 Big Data HBase
TP2 Big Data HBase
 
Koha installation BALID
Koha installation BALIDKoha installation BALID
Koha installation BALID
 
Hadoop installation on windows
Hadoop installation on windows Hadoop installation on windows
Hadoop installation on windows
 
2.4.1 use debian package management v2
2.4.1 use debian package management v22.4.1 use debian package management v2
2.4.1 use debian package management v2
 
Software Packaging with RPM
Software Packaging with RPMSoftware Packaging with RPM
Software Packaging with RPM
 
Open Source Backup Conference 2014: Workshop bareos introduction, by Philipp ...
Open Source Backup Conference 2014: Workshop bareos introduction, by Philipp ...Open Source Backup Conference 2014: Workshop bareos introduction, by Philipp ...
Open Source Backup Conference 2014: Workshop bareos introduction, by Philipp ...
 
Hadoop installation
Hadoop installationHadoop installation
Hadoop installation
 
101 2.4b use debian package management v2
101 2.4b use debian package management v2101 2.4b use debian package management v2
101 2.4b use debian package management v2
 
101 2.4 use debian package management
101 2.4 use debian package management101 2.4 use debian package management
101 2.4 use debian package management
 
Hadoop 2.4 installing on ubuntu 14.04
Hadoop 2.4 installing on ubuntu 14.04Hadoop 2.4 installing on ubuntu 14.04
Hadoop 2.4 installing on ubuntu 14.04
 
250hadoopinterviewquestions
250hadoopinterviewquestions250hadoopinterviewquestions
250hadoopinterviewquestions
 
Arbeiten mit distribute, pip und virtualenv
Arbeiten mit distribute, pip und virtualenvArbeiten mit distribute, pip und virtualenv
Arbeiten mit distribute, pip und virtualenv
 
Hadoop 20111215
Hadoop 20111215Hadoop 20111215
Hadoop 20111215
 
Containers Roadshow: How to Develop Containers for the Enterprise
Containers Roadshow: How to Develop Containers for the EnterpriseContainers Roadshow: How to Develop Containers for the Enterprise
Containers Roadshow: How to Develop Containers for the Enterprise
 
Hadoop Installation
Hadoop InstallationHadoop Installation
Hadoop Installation
 
Command Line Tools
Command Line ToolsCommand Line Tools
Command Line Tools
 
Django로 만든 웹 애플리케이션 도커라이징하기 + 도커 컴포즈로 개발 환경 구축하기
Django로 만든 웹 애플리케이션 도커라이징하기 + 도커 컴포즈로 개발 환경 구축하기Django로 만든 웹 애플리케이션 도커라이징하기 + 도커 컴포즈로 개발 환경 구축하기
Django로 만든 웹 애플리케이션 도커라이징하기 + 도커 컴포즈로 개발 환경 구축하기
 
Hadoop 2.0 cluster setup on ubuntu 14.04 (64 bit)
Hadoop 2.0 cluster setup on ubuntu 14.04 (64 bit)Hadoop 2.0 cluster setup on ubuntu 14.04 (64 bit)
Hadoop 2.0 cluster setup on ubuntu 14.04 (64 bit)
 
HADOOP 실제 구성 사례, Multi-Node 구성
HADOOP 실제 구성 사례, Multi-Node 구성HADOOP 실제 구성 사례, Multi-Node 구성
HADOOP 실제 구성 사례, Multi-Node 구성
 

Destacado

Cómo diagnosticar problemas de rendimiento en entornos LAMP
Cómo diagnosticar problemas de rendimiento en entornos LAMPCómo diagnosticar problemas de rendimiento en entornos LAMP
Cómo diagnosticar problemas de rendimiento en entornos LAMP
Javier Carranza
 

Destacado (7)

Taller de Migrate 2
Taller de Migrate 2Taller de Migrate 2
Taller de Migrate 2
 
Ubuntu
UbuntuUbuntu
Ubuntu
 
Unit & Integration Testing
Unit & Integration TestingUnit & Integration Testing
Unit & Integration Testing
 
Web 2.0 / Ajax
Web 2.0 / AjaxWeb 2.0 / Ajax
Web 2.0 / Ajax
 
Instaladores Live
Instaladores LiveInstaladores Live
Instaladores Live
 
Depuración y profiling en Drupal: casos prácticos
Depuración y profiling en Drupal: casos prácticosDepuración y profiling en Drupal: casos prácticos
Depuración y profiling en Drupal: casos prácticos
 
Cómo diagnosticar problemas de rendimiento en entornos LAMP
Cómo diagnosticar problemas de rendimiento en entornos LAMPCómo diagnosticar problemas de rendimiento en entornos LAMP
Cómo diagnosticar problemas de rendimiento en entornos LAMP
 

Similar a Debian Packaging

101 2.4 use debian package management
101 2.4 use debian package management101 2.4 use debian package management
101 2.4 use debian package management
Acácio Oliveira
 
Debian packaging howto
Debian packaging howtoDebian packaging howto
Debian packaging howto
Ding Zhou
 
Software management in linux
Software management in linuxSoftware management in linux
Software management in linux
nejadmand
 
Deploying with Super Cow Powers (Hosting your own APT repository with reprepro)
Deploying with Super Cow Powers (Hosting your own APT repository with reprepro)Deploying with Super Cow Powers (Hosting your own APT repository with reprepro)
Deploying with Super Cow Powers (Hosting your own APT repository with reprepro)
Simon Boulet
 
Your own minecraft server on a linode vps
Your own minecraft server on a linode vpsYour own minecraft server on a linode vps
Your own minecraft server on a linode vps
Cleo Morisson
 
Understanding Debian Packages (2014)
Understanding Debian Packages (2014)Understanding Debian Packages (2014)
Understanding Debian Packages (2014)
Miriam Ruiz
 

Similar a Debian Packaging (20)

How to make debian package from scratch (linux)
How to make debian package from scratch (linux)How to make debian package from scratch (linux)
How to make debian package from scratch (linux)
 
How to Build Package in Linux Based Systems.
How to Build Package in Linux Based Systems.How to Build Package in Linux Based Systems.
How to Build Package in Linux Based Systems.
 
Software Packaging for Cross OS Distribution
Software Packaging for Cross OS DistributionSoftware Packaging for Cross OS Distribution
Software Packaging for Cross OS Distribution
 
Packaging for the Maemo Platform
Packaging for the Maemo PlatformPackaging for the Maemo Platform
Packaging for the Maemo Platform
 
Packaging in packaging: dh-virtualenv
Packaging in packaging: dh-virtualenvPackaging in packaging: dh-virtualenv
Packaging in packaging: dh-virtualenv
 
101 2.4 use debian package management
101 2.4 use debian package management101 2.4 use debian package management
101 2.4 use debian package management
 
Debian packaging howto
Debian packaging howtoDebian packaging howto
Debian packaging howto
 
Debian packaging
Debian packagingDebian packaging
Debian packaging
 
$ make install
$ make install$ make install
$ make install
 
Software management in linux
Software management in linuxSoftware management in linux
Software management in linux
 
Deploying with Super Cow Powers (Hosting your own APT repository with reprepro)
Deploying with Super Cow Powers (Hosting your own APT repository with reprepro)Deploying with Super Cow Powers (Hosting your own APT repository with reprepro)
Deploying with Super Cow Powers (Hosting your own APT repository with reprepro)
 
OpenWRT guide and memo
OpenWRT guide and memoOpenWRT guide and memo
OpenWRT guide and memo
 
Linux Troubleshooting
Linux TroubleshootingLinux Troubleshooting
Linux Troubleshooting
 
Your own minecraft server on a linode vps
Your own minecraft server on a linode vpsYour own minecraft server on a linode vps
Your own minecraft server on a linode vps
 
Zero Downtime Deployment with Ansible
Zero Downtime Deployment with AnsibleZero Downtime Deployment with Ansible
Zero Downtime Deployment with Ansible
 
Streamline your development environment with docker
Streamline your development environment with dockerStreamline your development environment with docker
Streamline your development environment with docker
 
Docker jako prostředí pro automatizaci testů
Docker jako prostředí pro automatizaci testůDocker jako prostředí pro automatizaci testů
Docker jako prostředí pro automatizaci testů
 
Understanding Debian Packages (2014)
Understanding Debian Packages (2014)Understanding Debian Packages (2014)
Understanding Debian Packages (2014)
 
The Gory Details of Debian packages
The Gory Details of Debian packagesThe Gory Details of Debian packages
The Gory Details of Debian packages
 
How tos nagios - centos wiki
How tos nagios - centos wikiHow tos nagios - centos wiki
How tos nagios - centos wiki
 

Último

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 

Último (20)

Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 

Debian Packaging

  • 1. Debian Packaging La potencia sin control no sirve de nada ●Javier Carranza ● javier.carranza@interactors.coop ●http://www.interactors.coop ● ● ●Proyecto Debian ●http://www.debian.org ●Ubuntu ●http://www.ubuntulinux.org
  • 2. Herramientas Debian ● Utilidades para la generación de paquetes: ● debhelper /* scripts debian/rules */ ● dpkg-dev /* dpkg-buildpackage, dpkg- scanpackages, ... */ ● dh-make /* dh_make */ ● lintian ● linda ● fakeroot Javier Carranza Abadía Debian Packaging Interactors
  • 3. Generación de un paquete Debian trunks@Orthanc:~/desarrollo (2 Kb) $ mkdir xapi-1.6 trunks@Orthanc:~/desarrollo (2 Kb) $ cd xapi-1.6/ trunks@Orthanc:~/desarrollo/xapi-1.6 (0 bytes) $ dh_make -e packmaster@guadalinex.org --copyright gpl -f ../../xapi-1.6.tar.gz Type of package: single binary, multiple binary, library, or kernel module? [s/m/l/k] s Maintainer name : Javier Carranza Email-Address : packmaster@guadalinex.org Date : Wed, 22 Jun 2005 09:54:26 +0200 Package Name : xapi Version : 1.6 License : gpl Type of Package : Single Hit <enter> to confirm: Currently there is no top level Makefile. This may require additional tuning. Done. Please edit the files in the debian/ subdirectory now. You should also check that the xapi Makefiles install into $DESTDIR and not in / . Javier Carranza Abadía Debian Packaging Interactors
  • 4. Generación de un paquete Debian (II) trunks@Orthanc:~/desarrollo/xapi-1.6 (0 bytes) $ ls debian/ trunks@Orthanc:~/desarrollo/xapi-1.6 (0 bytes) $ cd debian/ trunks@Orthanc:~/desarrollo/xapi-1.6/debian (23 Kb) $ ls changelog copyright emacsen-install.ex manpage.1.ex postinst.ex README.Debian xapi.doc-base.EX compat cron.d.ex emacsen-remove.ex manpage.sgml.ex postrm.ex rules* conffiles.ex dirs emacsen-startup.ex manpage.xml.ex preinst.ex watch.ex control docs init.d.ex menu.ex prerm.ex xapi- default.ex trunks@Orthanc:~/desarrollo/xapi-1.6/debian (23 Kb) $ rm conffiles.ex cron.d.ex emacsen-* init.d.ex manpage.* preinst.ex prerm.ex watch.ex xapi-default.ex xapi.doc-base.EX README.Debian trunks@Orthanc:~/desarrollo/xapi-1.6/debian (5 Kb) $ mv menu.ex menu; mv postinst.ex postinst; mv postrm.ex postrm trunks@Orthanc:~/desarrollo/xapi-1.6/debian (5 Kb) $ ls changelog compat control copyright dirs docs menu postinst postrm rules* Javier Carranza Abadía Debian Packaging Interactors
  • 5. debian/control Source: xapi Section: unknown /* guadalinex */ Priority: optional Maintainer: Javier Carranza <packmaster@guadalinex.org> Build-Depends: debhelper (>= 4.0.0) Standards-Version: 3.6.1 Package: xapi Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Description: <insert up to 60 chars description> /* Manjeador de paquetes deb para instalacion desde navegador */ <insert long description, indented with spaces> /* xapi facilita la instalacion de paquetes .deb desde el navegador tras ser descargados desde la web */ Javier Carranza Abadía Debian Packaging Interactors
  • 6. debian/changelog xapi (1.6-1) unstable; urgency=low * Initial release Closes: #nnnn (nnnn is the bug number of your ITP) -- Javier Carranza <packmaster@guadalinex.org> Wed, 22 Jun 2005 09:54:26 +0200 debian/menu ?package(xapi):needs="X11|text|vc|wm" section="Apps/see-menu-manual" title="xapi" command="/usr/bin/xapi" Javier Carranza Abadía Debian Packaging Interactors
  • 7. debian/copyright This package was debianized by Javier Carranza <packmaster@guadalinex.org> on Wed, 22 Jun 2005 09:54:26 +0200. It was downloaded from <fill in ftp site> Copyright Holder: <put author(s) name and email here> License: This package is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This package is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this package; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. On Debian systems, the complete text of the GNU General Public License can be found in `/usr/share/common-licenses/GPL'. Javier Carranza Abadía Debian Packaging Interactors
  • 8. preinst, prerm, postinst, postrm postrm # Automatically added by dh_installmenu if [ "$1" = "configure" ] && [ -x /usr/bin/update-menus ]; then update- menus ; fi # End automatically added section # Automatically added by dh_desktop if [ "$1" = "configure" ] && which update-desktop-database >/dev/null 2>&1 ; then update-desktop-database -q fi # End automatically added section # Automatically added by dh_installmime if [ "$1" = "configure" ] && [ -x /usr/sbin/update-mime ]; then update- mime; fi # End automatically added section Javier Carranza Abadía Debian Packaging Interactors
  • 9. debian/rules #!/usr/bin/make -f # -*- makefile -*- # Sample debian/rules that uses debhelper. # This file was originally written by Joey Hess and Craig Small. # As a special exception, when this file is copied by dh-make into a # dh-make output file, you may use that output file without restriction. # This special exception was added by Craig Small in version 0.37 of dh-make. # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 CFLAGS = -Wall -g ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) CFLAGS += -O0 else CFLAGS += -O2 endif configure: configure-stamp configure-stamp: dh_testdir # Add here commands to configure the package. touch configure-stamp Javier Carranza Abadía Debian Packaging Interactors
  • 10. debian/rules (II) build: build-stamp build-stamp: configure-stamp dh_testdir # Add here commands to compile the package. $(MAKE) #docbook-to-man debian/xapi.sgml > xapi.1 touch build-stamp clean: dh_testdir dh_testroot rm -f build-stamp configure-stamp # Add here commands to clean up after the build process. -$(MAKE) clean dh_clean install: build dh_testdir dh_testroot dh_clean -k dh_installdirs # Add here commands to install the package into debian/xapi. $(MAKE) install DESTDIR=$(CURDIR)/debian/xapi Javier Carranza Abadía Debian Packaging Interactors
  • 11. debian/rules (III) # dh_installinfo dh_installman dh_link # Build architecture-independent files here. dh_strip binary-indep: build install dh_compress # We have nothing to do by default. dh_fixperms # dh_perl # Build architecture-dependent files here. # dh_python binary-arch: build install # dh_makeshlibs dh_testdir dh_installdeb dh_testroot dh_shlibdeps dh_installchangelogs dh_gencontrol dh_installdocs dh_md5sums dh_installexamples dh_builddeb # dh_install # dh_installmenu binary: binary-indep binary-arch # dh_installdebconf .PHONY: build clean binary-indep # dh_installlogrotate binary-arch binary install configure # dh_installemacsen # dh_installpam # dh_installmime # dh_installinit # dh_installcron Javier Carranza Abadía Debian Packaging Interactors
  • 12. Generación de un paquete Debian (III) trunks@Orthanc:~/desarrollo/xapi-1.6 (0 bytes) $ dpkg-buildpackage -rfakeroot -kAA6AB5CB [...] trunks@Orthanc:~/desarrollo/xapi-1.6 (0 bytes) $ ls .. xapi-1.6/ xapi_1.6-1.dsc xapi_1.6-1_powerpc.deb xapi_1.6-1.diff.gz xapi_1.6-1_powerpc.changes xapi_1.6.orig.tar.gz Javier Carranza Abadía Debian Packaging Interactors
  • 13. Depuración (lintian/linda) trunks@Orthanc:~/desarrollo/xapi-1.6 (0 bytes) $ lintian -i ../xapi_1.6-1_powerpc.deb W: xapi: unknown-section unknown N: N: The `Section:' field in this package's control file is not one of the N: sections in use on the ftp archive. Valid sections are currently N: admin, base, comm, devel, doc, editors, electronics, embedded, games, N: gnome, graphics, hamradio, interpreters, kde, libdevel, libs, mail, N: math, misc, net, news, oldlibs, otherosfs, perl, python, science, N: shells, sound, tex, text, utils, web, and x11. N: N: The section name should be preceded by `non-free/' if the package is N: in the non-free distribution, and by `contrib/' if the package is in N: the contrib distribution. N: N: Refer to Policy Manual, section 2.4 for details. N: trunks@Orthanc:~/desarrollo/xapi-1.6 (0 bytes) $ lintian -i ../xapi_1.6-1.dsc trunks@Orthanc:~/desarrollo/xapi-1.6 (0 bytes) $ linda -i ../xapi_1.6-1.dsc trunks@Orthanc:~/desarrollo/xapi-1.6 (0 bytes) $ linda -i ../xapi_1.6-1_powerpc.deb File /home/trunks/desarrollo/xapi_1.6-1_powerpc.deb failed to process: Format args for unknown-section don't match Description. (0 vs 1) Javier Carranza Abadía Debian Packaging Interactors
  • 14. Colaboración con Debian ● Documentación y traducción http://www.debian.org/doc ● Empaquetado de software ● Depuración e informe de errores http://www.debian.org/Bugs Javier Carranza Abadía Debian Packaging Interactors
  • 15. Documentación para desarrolladores Documentación online: http://www.debian.org/doc Documentación empaquetada: debian-policy, maint-guide, debian-reference-en, debian-installer-manual Javier Carranza Abadía Debian Packaging Interactors