SlideShare a Scribd company logo
1 of 65
Download to read offline
Deploying and
    maintaining software
    with RPM / APT

    Loadays - 16 & 17 April 2011
    Antwerp - Belgium




http://joind.in/3315
Who am I?
Who am I?


Joshua Thijssen (32)
Who am I?


Joshua Thijssen (32)
Senior Software Engineer @ Enrise
Who am I?


Joshua Thijssen (32)
Senior Software Engineer @ Enrise
Development in PHP, Python, Perl,
C, Java....
Who am I?


Joshua Thijssen (32)
Senior Software Engineer @ Enrise
Development in PHP, Python, Perl,
C, Java....

Blogs: http://www.adayinthelifeof.nl
       http://www.enrise.com/blog
Who am I?


Joshua Thijssen (32)
Senior Software Engineer @ Enrise
Development in PHP, Python, Perl,
C, Java....

Blogs: http://www.adayinthelifeof.nl
       http://www.enrise.com/blog

Email: joshua@enrise.com
Who am I?


Joshua Thijssen (32)
Senior Software Engineer @ Enrise
Development in PHP, Python, Perl,
C, Java....

Blogs: http://www.adayinthelifeof.nl
       http://www.enrise.com/blog

Email: joshua@enrise.com
Twitter: @jaytaph
Identi.ca: jaytaph
What is this talk about?




   What are and why use package managers?
   About RPM
   About DEB
   Discussion



‣ QUESTIONS? RAISE YOUR HAND OR YELL LOUD
Word of warning




This talk is focussed on developers, not
system administrators in general.
Why use package
managers?
Why use a package manager (1)
Why use a package manager (1)



 Takes care of dependencies
Why use a package manager (1)



 Takes care of dependencies
 Less time to install
Why use a package manager (1)



 Takes care of dependencies
 Less time to install
 No compilation needed
Why use a package manager (1)



 Takes care of dependencies
 Less time to install
 No compilation needed
 Scrutinized by many users (stability)
Why use a package manager (1)



 Takes care of dependencies
 Less time to install
 No compilation needed
 Scrutinized by many users (stability)
 Quick patches
Why use a package manager (2)




‣ WHY NOT USE A PACKAGE MANAGER?
Why use a package manager (2)



   Not processor specific (i386,i686,x64)




‣ WHY NOT USE A PACKAGE MANAGER?
Why use a package manager (2)



   Not processor specific (i386,i686,x64)
   Missing feature X




‣ WHY NOT USE A PACKAGE MANAGER?
Why use a package manager (2)



   Not processor specific (i386,i686,x64)
   Missing feature X
   Always behind latest versions




‣ WHY NOT USE A PACKAGE MANAGER?
Why use a package manager (2)



   Not processor specific (i386,i686,x64)
   Missing feature X
   Always behind latest versions
   Installing newer versions can be a pain




‣ WHY NOT USE A PACKAGE MANAGER?
Why use a package manager (2)



   Not processor specific (i386,i686,x64)
   Missing feature X
   Always behind latest versions
   Installing newer versions can be a pain
   Multiversioning (php5.2 + php5.3 ???)


‣ WHY NOT USE A PACKAGE MANAGER?
Packageformats vs package frontends




   APT = Advanced Packaging Tool
   ‣ uses .DEB packages
   RPM = RedHat Package Manager
   ‣ uses .RPM packages


‣ QUESTIONS? RAISE YOUR HAND OR YELL LOUD
The DEB vs RPM war
.deb vs .rpm




    Different formats
    DEB for Debian based systems
    RPM for RedHat based system
I like deb because...




    Maintaining custom packages is
    easier
    Asks what to do with your config
    (instead of rpm{save|new})
    Creations are isolated (name.x.y dir)
I hate deb because...




    Creation is hard (all separate files)
    Too many tools and possibilities
    (but that could be a pro as well)
I like rpm because...




    Creating is easy as π (spec file)
I hate rpm because...




    Everything in one directory.
    Spec file outside that directory.
    Macros can be confusing.
.deb vs .rpm




    Use what your system uses.
    Use what you like when creating your
    own distribution.
Creating an
RPM package
Anatomy of a .rpm package




 proprietary’ish format.
 Use rpm2cpio to extract.
Anatomy of a .rpm package

jthijssen@debian-jth:~/rpm$ rpm -qivlp --scripts enrise.rpm
Name        : enrise-repo                  Relocations: (not relocatable)
Version     : 1.2                               Vendor: Enrise
Release     : 1                             Build Date: Fri 21 Jan 2011 11:09:29 AM CET
Install Date: (not installed)               Build Host: rpmbuilder.enrise.com
Group       : Enrise                        Source RPM: enrise-repo-1.2-1.src.rpm
Size        : 1522                             License: GPL
Signature   : RSA/SHA1, Fri 21 Jan 2011 11:09:31 AM CET, Key ID 84781eb0796900bd
Packager    : Joshua Thijssen
Summary     : Enrise Repository Configuration
Description :
This is the main configuration file (for /etc/yum.repos.d) to start using the
repository.
postinstall program: /bin/sh
drwxr-xr-x    2 root    root                0 Jan 21 11:09 /etc/pki
drwxr-xr-x    2 root    root                0 Jan 21 11:09 /etc/pki/rpm-gpg
-rw-r--r--    1 root    root              967 Jan 21 11:09 /etc/pki/rpm-gpg/RPM-GPG-KEY-
enrise
drwxr-xr-x    2 root    root                0 Jan 21 11:09 /etc/yum.repos.d
-rw-r--r--    1 root    root              555 Jan 21 11:09 /etc/yum.repos.d/enrise.repo
Building a package




      Your sources
      Your patches
      Your other stuff
      SPEC file



‣ DON’T FORGET TO BRING...
Building a package




   Sources: myapp-v1.0.tar.gz
   Patches: myapp-v1.0-hotfix.patch
   Other files: myapp.init
   Spec: myapp.spec
SPEC file


Summary: Enrise Database Patcher
Vendor: Enrise
Name: patchdb
Version: 3.0
Release: 1
Source0: patchdb-%{version}.tar.gz
License: GPL
Group: Enrise
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot

%description
This is the database patch script that allows you to quickly patch up a database to the
correct version.
SPEC file


%prep
%setup -q

%build

%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/usr/local/enrise/bin
mkdir -p $RPM_BUILD_ROOT/usr/share/man/man1
cp bin/patchdb $RPM_BUILD_ROOT/usr/local/enrise/bin
cp man/patchdb.1 $RPM_BUILD_ROOT/usr/share/man/man1

%clean
rm -rf $RPM_BUILD_ROOT
SPEC file



%pre

%post

%files
%doc doc/*
%dir /usr/local
%dir /usr/local/enrise
%dir /usr/local/enrise/bin
/usr/share/man/man1/patchdb.1.gz
/usr/local/enrise/bin/patchdb
Creating your (S)RPM’s




# rpmbuild -ba <specfile>
Setting up a
custom
repository
Creating a repository




[me@intranet01 SPECS]# cat ~/.rpmmacros
%packager Joshua Thijssen
%_topdir /usr/src/enriserepo/rpm
%_tmppath /usr/src/enriserepo/rpm/tmp
%_signature gpg
%_gpg_name Enrise Repository <repository@enrise.com>
%_gpgbin /usr/bin/gpg
Creating a repository


#!/bin/sh

# Export source-dirs from SVN,Git,etc into SOURCES

# Create tar.gz files
cd SOURCES
for dir in $1* ; do
        if [ -d $dir ] ; then
                echo "Tarballing $dir..."
                tar czf $dir.tar.gz $dir
        fi
done
cd ..

>>>>
Creating a repository


<<<<

# Build RPMS's
rpmbuild --quiet -ba SPECS/$1*.spec --sign 2>&1 | grep -v 'gpg: WARNING'

# Add *ALL* files to the repository and re-create xml files
REPOROOT=/data/www/enrise.com/repo.enrise.com/public/enrise

/bin/cp SRPMS/* $REPOROOT/SRPMS/
/bin/cp RPMS/x86_64/* $REPOROOT/x86_64/
/bin/cp RPMS/noarch/* $REPOROOT/noarch/

createrepo -v $REPOROOT/x86_64
createrepo -v $REPOROOT/noarch
createrepo -v $REPOROOT/SRPMS
Creating a repository


drwxr-sr-x   3   src   apache    4096   Jan   21   11:13   .
drwxr-sr-x   5   src   apache    4096   Oct    5    2010   ..
-rw-r--r--   1   src   apache    4219   Jan   21   11:12   enrise-repo-1.2-1.src.rpm
-rw-r--r--   1   src   apache    7095   Jan   21   11:12   patchdb-3.0-1.src.rpm
drwxr-sr-x   2   src   apache    4096   Jan   21   11:13   repodata
-rw-r--r--   1   src   apache    4323   Jan   21   11:12   varnishrotate-1.0-1.src.rpm
-rw-r--r--   1   src   apache 3256951   Jan   21   11:12   zfm-1.1-2.src.rpm

./repodata:
total 24
drwxr-sr-x 2     src   apache 4096 Jan 21 11:13 .
drwxr-sr-x 3     src   apache 4096 Jan 21 11:13 ..
-rw-r--r-- 1     src   apache 658 Jan 21 11:13 filelists.xml.gz
-rw-r--r-- 1     src   apache 567 Jan 21 11:13 other.xml.gz
-rw-r--r-- 1     src   apache 1376 Jan 21 11:13 primary.xml.gz
-rw-r--r-- 1     src   apache 951 Jan 21 11:13 repomd.xml
Using your
         repository




http://moodleman.moodle.com.au/wp-content/uploads/2008/09/repository.jpg
Using a repository




 Add repository to /etc/yum.repos.d
 Add key to /etc/pki/rpm-gpg
 yum!
Using a repository




Automate as well
Add your /etc/yum.repos.d files + key
files in package.
“initial wget”
rpm -hiv myrepo.rpm
Creating and using
          debian’s .DEB




http://moodleman.moodle.com.au/wp-content/uploads/2008/09/repository.jpg
Anatomy of a .deb package


jthijssen@debian-jth:~/deb$   ar tv   apache2.2-common_2.2.9-10+lenny9_i386.deb
rw-r--r-- 0/0      4 Dec 11   20:00   2010 debian-binary
rw-r--r-- 0/0 13251 Dec 11    20:00   2010 control.tar.gz
rw-r--r-- 0/0 770323 Dec 11   20:00   2010 data.tar.gz

jthijssen@debian-jth:~/deb$ cat debian-binary
2.0


jthijssen@debian-jth:~/deb$ tar xvzf control.tar.gz
./
./conffiles
./postinst
./preinst
./control
./postrm
./md5sums
Anatomy of a .deb package



  jthijssen@debian-jth:~/deb$ cat control
  Package: apache2.2-common
  Source: apache2
  Version: 2.2.9-10+lenny9
  Architecture: i386
  Maintainer: Debian Apache Maintainers <debian-apache@lists.debian.org>
  Installed-Size: 3416
  Depends: libapr1, libaprutil1, libc6 (>= 2.7-1), libssl0.9.8 (>= 0.9.8f-5),
  zlib1g (>= 1:1.1.4), apache2-utils, net-tools, libmagic1, mime-support, lsb-
  base, procps, perl, psmisc
  Recommends: ssl-cert
  Suggests: www-browser, apache2-doc, apache2-suexec | apache2-suexec-custom




‣ CAT CONTROL
Anatomy of a .deb package


  Conflicts: apache2-common, libapache2-mod-mime-xattr (<= 0.3-2), libapache2-
  mod-mono (<= 1.1.17-3), libapache2-mod-php4 (<= 4:4.4.4-2), libapache2-mod-
  php5 (<= 5.1.6-3), libapache2-mod-proxy-html (<= 2.4.3-2), libapache2-mod-
  scgi (<= 1.11-1), libapache2-mod-speedycgi (<= 2.22-3), libapache2-modxslt
  (<= 2005072700-1), libapache2-redirtoservername (<= 0.1-1), libapache2-
  webauth (<= 3.5.3-1), libapache2-webkdc (<= 3.5.3-1)
  Replaces: apache2-common
  Section: web
  Priority: optional
  Homepage: http://httpd.apache.org/
  Description: Apache HTTP Server common files
   The Apache Software Foundation's goal is to build a secure, efficient and
   extensible HTTP server as standards-compliant open source software. The
   result has long been the number one web server on the Internet.




‣ CAT CONTROL (continued)
Anatomy of a .deb package


jthijssen@debian-jth:~/deb$ head conffiles
/etc/logrotate.d/apache2
/etc/apache2/conf.d/security
/etc/apache2/conf.d/charset
/etc/apache2/envvars
/etc/apache2/sites-available/default-ssl
/etc/apache2/sites-available/default

jthijssen@debian-jth:~/deb$ head postinst
#!/bin/sh -e

if [ "$1" != "configure" ]; then
        exit 0
fi

if [ -e /usr/sbin/apache2 ]; then
    if [ "`dpkg-statoverride --list /usr/sbin/apache2`" = "" ]; then
Creating a .deb package



Directory: <appname>-<major>.<minor>


jthijssen@debian-jth:~/myapp-1.0$ dh_make -s -n -e jthijssen@enrise.com




‣ CREATE ./DEBIAN DIRECTORY TEMPLATE
Creating a .deb package



  Source: myapp
  Section: unknown
  Priority: extra
  Maintainer: jthijssen <jthijssen@enrise.com>
  Build-Depends: debhelper (>= 7)
  Standards-Version: 3.7.3
  Homepage: <insert the upstream URL, if relevant>

  Package: myapp
  Architecture: any
  Depends: ${shlibs:Depends}, ${misc:Depends}
  Description: <insert up to 60 chars description>
   <insert long description, indented with spaces>




‣ EDIT ./DEBIAN/CONTROL ETC..
Creating a .deb package


myapp.1
  .TH myapp 1 "16 April 2011" "MyApp 1.00"
  .SH NAME
  myapp - My Own Hello World Application.
  .SH SYNOPSIS
  myapp
  .SH DESCRIPTION
  Simple application that will print hello world to the standard output.
  .SH AUTHOR
  This manpage was written by Joshua Thijssen <jthijssen@enrise.com>.

  ." end of man page



myapp.manpages
  myapp.1




‣ EDIT ./DEBIAN/MYAPP.1 ETC..
Creating a .deb package




    case "$1" in
        install|upgrade)
            touch /myapp.install
        ;;




‣ EDIT ./DEBIAN/{PREINST,PRERM} ETC..
Creating a .deb package



   usr/local/enrise/bin




‣ EDIT ./DEBIAN/DIRS
Creating a .deb package




  jthijssen@debian-jth:~/myapp-1.0$ dpkg_buildpackage



  jthijssen@debian-jth:~$ ls -la myapp*
  -rw-r--r-- 1 jthijssen jthijssen 2992   2011-04-11   15:50   myapp_1.0_all.deb
  -rw-r--r-- 1 jthijssen jthijssen 716    2011-04-11   15:50   myapp_1.0.dsc
  -rw-r--r-- 1 jthijssen jthijssen 1313   2011-04-11   15:50   myapp_1.0_i386.changes
  -rw-r--r-- 1 jthijssen jthijssen 4683   2011-04-11   15:50   myapp_1.0.tar.gz




‣ ACTUAL BUILDING OF THE PACKAGE
Creating a .deb package



  jthijssen@debian-jth:~/myapp-1.0$ lintian ../myapp_1.0_all.deb
  E: myapp: dir-in-usr-local usr/local/enrise/
  E: myapp: dir-in-usr-local usr/local/enrise/bin/
  E: myapp: file-in-usr-local usr/local/enrise/bin/myapp
  W: myapp: file-in-unusual-dir usr/local/enrise/bin/myapp
  W: myapp: readme-debian-contains-debmake-template
  W: myapp: copyright-lists-upstream-authors-with-dh_make-boilerplate




‣ LINTIAN CHECK
Using your
         repository




http://moodleman.moodle.com.au/wp-content/uploads/2008/09/repository.jpg
Creating a repository


jthijssen@deb:~$ mkdir -p /var/www/repo/enrise/{binary,source}

jthijssen@deb:~$ cp *.deb /var/www/repo/enrise/binary
jthijssen@deb:~$ cp *.dsc *.tar.gz /var/www/repo/enrise/source

jthijssen@deb:~$ cd /var/www/repo/enrise
jthijssen@deb:enrise$ dpkg-scanpackages binary /dev/null | gzip -9c > binary/Packages.gz
jthijssen@deb:enrise$ dpkg-scansources source /dev/null | gzip -9c > source/Sources.gz
Using your repository



/etc/apt/sources.list
deb http://repo.url/enrise binary/
deb-src http://repo.url/enrise source/




jthijssen@deb:~$ apt-get update

jthijssen@deb:~$ apt-get install myapp
Question & discussion




http://farm1.static.flickr.com/73/163450213_18478d3aa6_d.jpg
Please rate my talk on joind.in: http://joind.in/3315

‣ THANK YOU FOR YOUR ATTENTION

More Related Content

What's hot

Installing and running Postfix within a docker container from the command line
Installing and running Postfix within a docker container from the command lineInstalling and running Postfix within a docker container from the command line
Installing and running Postfix within a docker container from the command linedotCloud
 
Dockerizing WordPress
Dockerizing WordPressDockerizing WordPress
Dockerizing WordPressdotCloud
 
Ansible 實戰:top down 觀點
Ansible 實戰:top down 觀點Ansible 實戰:top down 觀點
Ansible 實戰:top down 觀點William Yeh
 
Simplify and run your development environments with Vagrant on OpenStack
Simplify and run your development environments with Vagrant on OpenStackSimplify and run your development environments with Vagrant on OpenStack
Simplify and run your development environments with Vagrant on OpenStackB1 Systems GmbH
 
IT Automation with Ansible
IT Automation with AnsibleIT Automation with Ansible
IT Automation with AnsibleRayed Alrashed
 
Perl in RPM-Land
Perl in RPM-LandPerl in RPM-Land
Perl in RPM-LandDave Cross
 
Releasing and deploying python tools
Releasing and deploying python toolsReleasing and deploying python tools
Releasing and deploying python toolsQuintagroup
 
어릴 적 할머니가 들려주신 옛 wsgi
어릴 적 할머니가 들려주신 옛 wsgi어릴 적 할머니가 들려주신 옛 wsgi
어릴 적 할머니가 들려주신 옛 wsgiHyun-Mook Choi
 
Shared Object images in Docker: What you need is what you want.
Shared Object images in Docker: What you need is what you want.Shared Object images in Docker: What you need is what you want.
Shared Object images in Docker: What you need is what you want.Workhorse Computing
 
Composer for Busy Developers - php|tek13
Composer for Busy Developers - php|tek13Composer for Busy Developers - php|tek13
Composer for Busy Developers - php|tek13Rafael Dohms
 
Dependency management with Composer
Dependency management with ComposerDependency management with Composer
Dependency management with ComposerJason Grimes
 
Puppet control-repo 
to the next level
Puppet control-repo 
to the next levelPuppet control-repo 
to the next level
Puppet control-repo 
to the next levelAlessandro Franceschi
 
How to add system calls to OS/161
How to add system calls to OS/161How to add system calls to OS/161
How to add system calls to OS/161Xiao Qin
 
Project 2 how to install and compile os161
Project 2 how to install and compile os161Project 2 how to install and compile os161
Project 2 how to install and compile os161Xiao Qin
 
Continuous Infrastructure: Modern Puppet for the Jenkins Project - PuppetConf...
Continuous Infrastructure: Modern Puppet for the Jenkins Project - PuppetConf...Continuous Infrastructure: Modern Puppet for the Jenkins Project - PuppetConf...
Continuous Infrastructure: Modern Puppet for the Jenkins Project - PuppetConf...Puppet
 
Fabric-让部署变得简单
Fabric-让部署变得简单Fabric-让部署变得简单
Fabric-让部署变得简单Eric Lo
 
Project 2 - how to compile os161?
Project 2 - how to compile os161?Project 2 - how to compile os161?
Project 2 - how to compile os161?Xiao Qin
 
Learn basic ansible using docker
Learn basic ansible using dockerLearn basic ansible using docker
Learn basic ansible using dockerLarry Cai
 

What's hot (20)

Installing and running Postfix within a docker container from the command line
Installing and running Postfix within a docker container from the command lineInstalling and running Postfix within a docker container from the command line
Installing and running Postfix within a docker container from the command line
 
Dockerizing WordPress
Dockerizing WordPressDockerizing WordPress
Dockerizing WordPress
 
Fabric: A Capistrano Alternative
Fabric:  A Capistrano AlternativeFabric:  A Capistrano Alternative
Fabric: A Capistrano Alternative
 
Ansible 實戰:top down 觀點
Ansible 實戰:top down 觀點Ansible 實戰:top down 觀點
Ansible 實戰:top down 觀點
 
Simplify and run your development environments with Vagrant on OpenStack
Simplify and run your development environments with Vagrant on OpenStackSimplify and run your development environments with Vagrant on OpenStack
Simplify and run your development environments with Vagrant on OpenStack
 
IT Automation with Ansible
IT Automation with AnsibleIT Automation with Ansible
IT Automation with Ansible
 
Perl in RPM-Land
Perl in RPM-LandPerl in RPM-Land
Perl in RPM-Land
 
Tp install anything
Tp install anythingTp install anything
Tp install anything
 
Releasing and deploying python tools
Releasing and deploying python toolsReleasing and deploying python tools
Releasing and deploying python tools
 
어릴 적 할머니가 들려주신 옛 wsgi
어릴 적 할머니가 들려주신 옛 wsgi어릴 적 할머니가 들려주신 옛 wsgi
어릴 적 할머니가 들려주신 옛 wsgi
 
Shared Object images in Docker: What you need is what you want.
Shared Object images in Docker: What you need is what you want.Shared Object images in Docker: What you need is what you want.
Shared Object images in Docker: What you need is what you want.
 
Composer for Busy Developers - php|tek13
Composer for Busy Developers - php|tek13Composer for Busy Developers - php|tek13
Composer for Busy Developers - php|tek13
 
Dependency management with Composer
Dependency management with ComposerDependency management with Composer
Dependency management with Composer
 
Puppet control-repo 
to the next level
Puppet control-repo 
to the next levelPuppet control-repo 
to the next level
Puppet control-repo 
to the next level
 
How to add system calls to OS/161
How to add system calls to OS/161How to add system calls to OS/161
How to add system calls to OS/161
 
Project 2 how to install and compile os161
Project 2 how to install and compile os161Project 2 how to install and compile os161
Project 2 how to install and compile os161
 
Continuous Infrastructure: Modern Puppet for the Jenkins Project - PuppetConf...
Continuous Infrastructure: Modern Puppet for the Jenkins Project - PuppetConf...Continuous Infrastructure: Modern Puppet for the Jenkins Project - PuppetConf...
Continuous Infrastructure: Modern Puppet for the Jenkins Project - PuppetConf...
 
Fabric-让部署变得简单
Fabric-让部署变得简单Fabric-让部署变得简单
Fabric-让部署变得简单
 
Project 2 - how to compile os161?
Project 2 - how to compile os161?Project 2 - how to compile os161?
Project 2 - how to compile os161?
 
Learn basic ansible using docker
Learn basic ansible using dockerLearn basic ansible using docker
Learn basic ansible using docker
 

Viewers also liked

Representation state transfer and some other important stuff
Representation state transfer and some other important stuffRepresentation state transfer and some other important stuff
Representation state transfer and some other important stuffJoshua Thijssen
 
Puppet for dummies - PHPBenelux UG edition
Puppet for dummies - PHPBenelux UG editionPuppet for dummies - PHPBenelux UG edition
Puppet for dummies - PHPBenelux UG editionJoshua Thijssen
 
Alice & bob public key cryptography 101 - uncon dpc
Alice & bob  public key cryptography 101 - uncon dpcAlice & bob  public key cryptography 101 - uncon dpc
Alice & bob public key cryptography 101 - uncon dpcJoshua Thijssen
 
15 protips for mysql users
15 protips for mysql users15 protips for mysql users
15 protips for mysql usersJoshua Thijssen
 
PFZ WorkshopDay Linux - Basic
PFZ WorkshopDay Linux - BasicPFZ WorkshopDay Linux - Basic
PFZ WorkshopDay Linux - BasicJoshua Thijssen
 
PFZ WorkshopDay Linux - Advanced
PFZ WorkshopDay Linux - AdvancedPFZ WorkshopDay Linux - Advanced
PFZ WorkshopDay Linux - AdvancedJoshua Thijssen
 
15 protips for mysql users pfz
15 protips for mysql users   pfz15 protips for mysql users   pfz
15 protips for mysql users pfzJoshua Thijssen
 
Alice & bob public key cryptography 101
Alice & bob  public key cryptography 101Alice & bob  public key cryptography 101
Alice & bob public key cryptography 101Joshua Thijssen
 
Alice & bob public key cryptography 101
Alice & bob  public key cryptography 101Alice & bob  public key cryptography 101
Alice & bob public key cryptography 101Joshua Thijssen
 
Puppet for dummies - ZendCon 2011 Edition
Puppet for dummies - ZendCon 2011 EditionPuppet for dummies - ZendCon 2011 Edition
Puppet for dummies - ZendCon 2011 EditionJoshua Thijssen
 
Unix command-line tools
Unix command-line toolsUnix command-line tools
Unix command-line toolsEric Wilson
 
Sed & awk the dynamic duo
Sed & awk   the dynamic duoSed & awk   the dynamic duo
Sed & awk the dynamic duoJoshua Thijssen
 

Viewers also liked (18)

Workshop unittesting
Workshop unittestingWorkshop unittesting
Workshop unittesting
 
Moved 301
Moved 301Moved 301
Moved 301
 
Representation state transfer and some other important stuff
Representation state transfer and some other important stuffRepresentation state transfer and some other important stuff
Representation state transfer and some other important stuff
 
Puppet for dummies - PHPBenelux UG edition
Puppet for dummies - PHPBenelux UG editionPuppet for dummies - PHPBenelux UG edition
Puppet for dummies - PHPBenelux UG edition
 
Alice & bob public key cryptography 101 - uncon dpc
Alice & bob  public key cryptography 101 - uncon dpcAlice & bob  public key cryptography 101 - uncon dpc
Alice & bob public key cryptography 101 - uncon dpc
 
15 protips for mysql users
15 protips for mysql users15 protips for mysql users
15 protips for mysql users
 
PFZ WorkshopDay Linux - Basic
PFZ WorkshopDay Linux - BasicPFZ WorkshopDay Linux - Basic
PFZ WorkshopDay Linux - Basic
 
PFZ WorkshopDay Linux - Advanced
PFZ WorkshopDay Linux - AdvancedPFZ WorkshopDay Linux - Advanced
PFZ WorkshopDay Linux - Advanced
 
15 protips for mysql users pfz
15 protips for mysql users   pfz15 protips for mysql users   pfz
15 protips for mysql users pfz
 
Alice & bob public key cryptography 101
Alice & bob  public key cryptography 101Alice & bob  public key cryptography 101
Alice & bob public key cryptography 101
 
Cipher block modes
Cipher block modesCipher block modes
Cipher block modes
 
Awk programming
Awk programming Awk programming
Awk programming
 
Czzawk
CzzawkCzzawk
Czzawk
 
Alice & bob public key cryptography 101
Alice & bob  public key cryptography 101Alice & bob  public key cryptography 101
Alice & bob public key cryptography 101
 
Naive Bayes
Naive Bayes Naive Bayes
Naive Bayes
 
Puppet for dummies - ZendCon 2011 Edition
Puppet for dummies - ZendCon 2011 EditionPuppet for dummies - ZendCon 2011 Edition
Puppet for dummies - ZendCon 2011 Edition
 
Unix command-line tools
Unix command-line toolsUnix command-line tools
Unix command-line tools
 
Sed & awk the dynamic duo
Sed & awk   the dynamic duoSed & awk   the dynamic duo
Sed & awk the dynamic duo
 

Similar to Deploying and maintaining your software with RPM/APT

Bundling Packages and Deploying Applications with RPM
Bundling Packages and Deploying Applications with RPMBundling Packages and Deploying Applications with RPM
Bundling Packages and Deploying Applications with RPMAlexander Shopov
 
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
 
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)Thierry Gayet
 
Software management in linux
Software management in linuxSoftware management in linux
Software management in linuxnejadmand
 
Linux Troubleshooting
Linux TroubleshootingLinux Troubleshooting
Linux TroubleshootingKeith Wright
 
Approaching package manager
Approaching package managerApproaching package manager
Approaching package managerTimur Safin
 
PHP on Heroku: Deploying and Scaling Apps in the Cloud
PHP on Heroku: Deploying and Scaling Apps in the CloudPHP on Heroku: Deploying and Scaling Apps in the Cloud
PHP on Heroku: Deploying and Scaling Apps in the CloudSalesforce Developers
 
Nrpe - Nagios Remote Plugin Executor. NRPE plugin for Nagios Core
Nrpe - Nagios Remote Plugin Executor. NRPE plugin for Nagios CoreNrpe - Nagios Remote Plugin Executor. NRPE plugin for Nagios Core
Nrpe - Nagios Remote Plugin Executor. NRPE plugin for Nagios CoreNagios
 
NRPE - Nagios Remote Plugin Executor. NRPE plugin for Nagios Core 4 and others.
NRPE - Nagios Remote Plugin Executor. NRPE plugin for Nagios Core 4 and others.NRPE - Nagios Remote Plugin Executor. NRPE plugin for Nagios Core 4 and others.
NRPE - Nagios Remote Plugin Executor. NRPE plugin for Nagios Core 4 and others.Marc Trimble
 
Oracle11g On Fedora14
Oracle11g On Fedora14Oracle11g On Fedora14
Oracle11g On Fedora14kmsa
 
RPM: Speed up your deploy
RPM: Speed up your deployRPM: Speed up your deploy
RPM: Speed up your deployfcrippa
 
EUC 2013 - Erlang in a *NIX World
EUC 2013 - Erlang in a *NIX WorldEUC 2013 - Erlang in a *NIX World
EUC 2013 - Erlang in a *NIX Worldericbmerritt
 
How To Install Openbravo ERP 2.50 MP43 in Ubuntu
How To Install Openbravo ERP 2.50 MP43 in UbuntuHow To Install Openbravo ERP 2.50 MP43 in Ubuntu
How To Install Openbravo ERP 2.50 MP43 in UbuntuWirabumi Software
 
101 2.5 use rpm and yum package management
101 2.5 use rpm and yum package management101 2.5 use rpm and yum package management
101 2.5 use rpm and yum package managementAcácio Oliveira
 
How tos nagios - centos wiki
How tos nagios - centos wikiHow tos nagios - centos wiki
How tos nagios - centos wikishahab071
 

Similar to Deploying and maintaining your software with RPM/APT (20)

Bundling Packages and Deploying Applications with RPM
Bundling Packages and Deploying Applications with RPMBundling Packages and Deploying Applications with RPM
Bundling Packages and Deploying Applications with RPM
 
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)
 
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)
 
Software management in linux
Software management in linuxSoftware management in linux
Software management in linux
 
Linux Troubleshooting
Linux TroubleshootingLinux Troubleshooting
Linux Troubleshooting
 
Nrpe
NrpeNrpe
Nrpe
 
Approaching package manager
Approaching package managerApproaching package manager
Approaching package manager
 
PHP on Heroku: Deploying and Scaling Apps in the Cloud
PHP on Heroku: Deploying and Scaling Apps in the CloudPHP on Heroku: Deploying and Scaling Apps in the Cloud
PHP on Heroku: Deploying and Scaling Apps in the Cloud
 
Nrpe - Nagios Remote Plugin Executor. NRPE plugin for Nagios Core
Nrpe - Nagios Remote Plugin Executor. NRPE plugin for Nagios CoreNrpe - Nagios Remote Plugin Executor. NRPE plugin for Nagios Core
Nrpe - Nagios Remote Plugin Executor. NRPE plugin for Nagios Core
 
NRPE - Nagios Remote Plugin Executor. NRPE plugin for Nagios Core 4 and others.
NRPE - Nagios Remote Plugin Executor. NRPE plugin for Nagios Core 4 and others.NRPE - Nagios Remote Plugin Executor. NRPE plugin for Nagios Core 4 and others.
NRPE - Nagios Remote Plugin Executor. NRPE plugin for Nagios Core 4 and others.
 
Oracle11g On Fedora14
Oracle11g On Fedora14Oracle11g On Fedora14
Oracle11g On Fedora14
 
Oracle11g on fedora14
Oracle11g on fedora14Oracle11g on fedora14
Oracle11g on fedora14
 
Linux Presentation
Linux PresentationLinux Presentation
Linux Presentation
 
RPM: Speed up your deploy
RPM: Speed up your deployRPM: Speed up your deploy
RPM: Speed up your deploy
 
EUC 2013 - Erlang in a *NIX World
EUC 2013 - Erlang in a *NIX WorldEUC 2013 - Erlang in a *NIX World
EUC 2013 - Erlang in a *NIX World
 
How To Install Openbravo ERP 2.50 MP43 in Ubuntu
How To Install Openbravo ERP 2.50 MP43 in UbuntuHow To Install Openbravo ERP 2.50 MP43 in Ubuntu
How To Install Openbravo ERP 2.50 MP43 in Ubuntu
 
Rpm Introduction
Rpm IntroductionRpm Introduction
Rpm Introduction
 
101 2.5 use rpm and yum package management
101 2.5 use rpm and yum package management101 2.5 use rpm and yum package management
101 2.5 use rpm and yum package management
 
Unix Administration 2
Unix Administration 2Unix Administration 2
Unix Administration 2
 
How tos nagios - centos wiki
How tos nagios - centos wikiHow tos nagios - centos wiki
How tos nagios - centos wiki
 

Deploying and maintaining your software with RPM/APT

  • 1. Deploying and maintaining software with RPM / APT Loadays - 16 & 17 April 2011 Antwerp - Belgium http://joind.in/3315
  • 3. Who am I? Joshua Thijssen (32)
  • 4. Who am I? Joshua Thijssen (32) Senior Software Engineer @ Enrise
  • 5. Who am I? Joshua Thijssen (32) Senior Software Engineer @ Enrise Development in PHP, Python, Perl, C, Java....
  • 6. Who am I? Joshua Thijssen (32) Senior Software Engineer @ Enrise Development in PHP, Python, Perl, C, Java.... Blogs: http://www.adayinthelifeof.nl http://www.enrise.com/blog
  • 7. Who am I? Joshua Thijssen (32) Senior Software Engineer @ Enrise Development in PHP, Python, Perl, C, Java.... Blogs: http://www.adayinthelifeof.nl http://www.enrise.com/blog Email: joshua@enrise.com
  • 8. Who am I? Joshua Thijssen (32) Senior Software Engineer @ Enrise Development in PHP, Python, Perl, C, Java.... Blogs: http://www.adayinthelifeof.nl http://www.enrise.com/blog Email: joshua@enrise.com Twitter: @jaytaph Identi.ca: jaytaph
  • 9. What is this talk about? What are and why use package managers? About RPM About DEB Discussion ‣ QUESTIONS? RAISE YOUR HAND OR YELL LOUD
  • 10. Word of warning This talk is focussed on developers, not system administrators in general.
  • 12. Why use a package manager (1)
  • 13. Why use a package manager (1) Takes care of dependencies
  • 14. Why use a package manager (1) Takes care of dependencies Less time to install
  • 15. Why use a package manager (1) Takes care of dependencies Less time to install No compilation needed
  • 16. Why use a package manager (1) Takes care of dependencies Less time to install No compilation needed Scrutinized by many users (stability)
  • 17. Why use a package manager (1) Takes care of dependencies Less time to install No compilation needed Scrutinized by many users (stability) Quick patches
  • 18. Why use a package manager (2) ‣ WHY NOT USE A PACKAGE MANAGER?
  • 19. Why use a package manager (2) Not processor specific (i386,i686,x64) ‣ WHY NOT USE A PACKAGE MANAGER?
  • 20. Why use a package manager (2) Not processor specific (i386,i686,x64) Missing feature X ‣ WHY NOT USE A PACKAGE MANAGER?
  • 21. Why use a package manager (2) Not processor specific (i386,i686,x64) Missing feature X Always behind latest versions ‣ WHY NOT USE A PACKAGE MANAGER?
  • 22. Why use a package manager (2) Not processor specific (i386,i686,x64) Missing feature X Always behind latest versions Installing newer versions can be a pain ‣ WHY NOT USE A PACKAGE MANAGER?
  • 23. Why use a package manager (2) Not processor specific (i386,i686,x64) Missing feature X Always behind latest versions Installing newer versions can be a pain Multiversioning (php5.2 + php5.3 ???) ‣ WHY NOT USE A PACKAGE MANAGER?
  • 24. Packageformats vs package frontends APT = Advanced Packaging Tool ‣ uses .DEB packages RPM = RedHat Package Manager ‣ uses .RPM packages ‣ QUESTIONS? RAISE YOUR HAND OR YELL LOUD
  • 25. The DEB vs RPM war
  • 26. .deb vs .rpm Different formats DEB for Debian based systems RPM for RedHat based system
  • 27. I like deb because... Maintaining custom packages is easier Asks what to do with your config (instead of rpm{save|new}) Creations are isolated (name.x.y dir)
  • 28. I hate deb because... Creation is hard (all separate files) Too many tools and possibilities (but that could be a pro as well)
  • 29. I like rpm because... Creating is easy as π (spec file)
  • 30. I hate rpm because... Everything in one directory. Spec file outside that directory. Macros can be confusing.
  • 31. .deb vs .rpm Use what your system uses. Use what you like when creating your own distribution.
  • 33. Anatomy of a .rpm package proprietary’ish format. Use rpm2cpio to extract.
  • 34. Anatomy of a .rpm package jthijssen@debian-jth:~/rpm$ rpm -qivlp --scripts enrise.rpm Name : enrise-repo Relocations: (not relocatable) Version : 1.2 Vendor: Enrise Release : 1 Build Date: Fri 21 Jan 2011 11:09:29 AM CET Install Date: (not installed) Build Host: rpmbuilder.enrise.com Group : Enrise Source RPM: enrise-repo-1.2-1.src.rpm Size : 1522 License: GPL Signature : RSA/SHA1, Fri 21 Jan 2011 11:09:31 AM CET, Key ID 84781eb0796900bd Packager : Joshua Thijssen Summary : Enrise Repository Configuration Description : This is the main configuration file (for /etc/yum.repos.d) to start using the repository. postinstall program: /bin/sh drwxr-xr-x 2 root root 0 Jan 21 11:09 /etc/pki drwxr-xr-x 2 root root 0 Jan 21 11:09 /etc/pki/rpm-gpg -rw-r--r-- 1 root root 967 Jan 21 11:09 /etc/pki/rpm-gpg/RPM-GPG-KEY- enrise drwxr-xr-x 2 root root 0 Jan 21 11:09 /etc/yum.repos.d -rw-r--r-- 1 root root 555 Jan 21 11:09 /etc/yum.repos.d/enrise.repo
  • 35. Building a package Your sources Your patches Your other stuff SPEC file ‣ DON’T FORGET TO BRING...
  • 36. Building a package Sources: myapp-v1.0.tar.gz Patches: myapp-v1.0-hotfix.patch Other files: myapp.init Spec: myapp.spec
  • 37. SPEC file Summary: Enrise Database Patcher Vendor: Enrise Name: patchdb Version: 3.0 Release: 1 Source0: patchdb-%{version}.tar.gz License: GPL Group: Enrise BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot %description This is the database patch script that allows you to quickly patch up a database to the correct version.
  • 38. SPEC file %prep %setup -q %build %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT/usr/local/enrise/bin mkdir -p $RPM_BUILD_ROOT/usr/share/man/man1 cp bin/patchdb $RPM_BUILD_ROOT/usr/local/enrise/bin cp man/patchdb.1 $RPM_BUILD_ROOT/usr/share/man/man1 %clean rm -rf $RPM_BUILD_ROOT
  • 39. SPEC file %pre %post %files %doc doc/* %dir /usr/local %dir /usr/local/enrise %dir /usr/local/enrise/bin /usr/share/man/man1/patchdb.1.gz /usr/local/enrise/bin/patchdb
  • 40. Creating your (S)RPM’s # rpmbuild -ba <specfile>
  • 42. Creating a repository [me@intranet01 SPECS]# cat ~/.rpmmacros %packager Joshua Thijssen %_topdir /usr/src/enriserepo/rpm %_tmppath /usr/src/enriserepo/rpm/tmp %_signature gpg %_gpg_name Enrise Repository <repository@enrise.com> %_gpgbin /usr/bin/gpg
  • 43. Creating a repository #!/bin/sh # Export source-dirs from SVN,Git,etc into SOURCES # Create tar.gz files cd SOURCES for dir in $1* ; do if [ -d $dir ] ; then echo "Tarballing $dir..." tar czf $dir.tar.gz $dir fi done cd .. >>>>
  • 44. Creating a repository <<<< # Build RPMS's rpmbuild --quiet -ba SPECS/$1*.spec --sign 2>&1 | grep -v 'gpg: WARNING' # Add *ALL* files to the repository and re-create xml files REPOROOT=/data/www/enrise.com/repo.enrise.com/public/enrise /bin/cp SRPMS/* $REPOROOT/SRPMS/ /bin/cp RPMS/x86_64/* $REPOROOT/x86_64/ /bin/cp RPMS/noarch/* $REPOROOT/noarch/ createrepo -v $REPOROOT/x86_64 createrepo -v $REPOROOT/noarch createrepo -v $REPOROOT/SRPMS
  • 45. Creating a repository drwxr-sr-x 3 src apache 4096 Jan 21 11:13 . drwxr-sr-x 5 src apache 4096 Oct 5 2010 .. -rw-r--r-- 1 src apache 4219 Jan 21 11:12 enrise-repo-1.2-1.src.rpm -rw-r--r-- 1 src apache 7095 Jan 21 11:12 patchdb-3.0-1.src.rpm drwxr-sr-x 2 src apache 4096 Jan 21 11:13 repodata -rw-r--r-- 1 src apache 4323 Jan 21 11:12 varnishrotate-1.0-1.src.rpm -rw-r--r-- 1 src apache 3256951 Jan 21 11:12 zfm-1.1-2.src.rpm ./repodata: total 24 drwxr-sr-x 2 src apache 4096 Jan 21 11:13 . drwxr-sr-x 3 src apache 4096 Jan 21 11:13 .. -rw-r--r-- 1 src apache 658 Jan 21 11:13 filelists.xml.gz -rw-r--r-- 1 src apache 567 Jan 21 11:13 other.xml.gz -rw-r--r-- 1 src apache 1376 Jan 21 11:13 primary.xml.gz -rw-r--r-- 1 src apache 951 Jan 21 11:13 repomd.xml
  • 46. Using your repository http://moodleman.moodle.com.au/wp-content/uploads/2008/09/repository.jpg
  • 47. Using a repository Add repository to /etc/yum.repos.d Add key to /etc/pki/rpm-gpg yum!
  • 48. Using a repository Automate as well Add your /etc/yum.repos.d files + key files in package. “initial wget” rpm -hiv myrepo.rpm
  • 49. Creating and using debian’s .DEB http://moodleman.moodle.com.au/wp-content/uploads/2008/09/repository.jpg
  • 50. Anatomy of a .deb package jthijssen@debian-jth:~/deb$ ar tv apache2.2-common_2.2.9-10+lenny9_i386.deb rw-r--r-- 0/0 4 Dec 11 20:00 2010 debian-binary rw-r--r-- 0/0 13251 Dec 11 20:00 2010 control.tar.gz rw-r--r-- 0/0 770323 Dec 11 20:00 2010 data.tar.gz jthijssen@debian-jth:~/deb$ cat debian-binary 2.0 jthijssen@debian-jth:~/deb$ tar xvzf control.tar.gz ./ ./conffiles ./postinst ./preinst ./control ./postrm ./md5sums
  • 51. Anatomy of a .deb package jthijssen@debian-jth:~/deb$ cat control Package: apache2.2-common Source: apache2 Version: 2.2.9-10+lenny9 Architecture: i386 Maintainer: Debian Apache Maintainers <debian-apache@lists.debian.org> Installed-Size: 3416 Depends: libapr1, libaprutil1, libc6 (>= 2.7-1), libssl0.9.8 (>= 0.9.8f-5), zlib1g (>= 1:1.1.4), apache2-utils, net-tools, libmagic1, mime-support, lsb- base, procps, perl, psmisc Recommends: ssl-cert Suggests: www-browser, apache2-doc, apache2-suexec | apache2-suexec-custom ‣ CAT CONTROL
  • 52. Anatomy of a .deb package Conflicts: apache2-common, libapache2-mod-mime-xattr (<= 0.3-2), libapache2- mod-mono (<= 1.1.17-3), libapache2-mod-php4 (<= 4:4.4.4-2), libapache2-mod- php5 (<= 5.1.6-3), libapache2-mod-proxy-html (<= 2.4.3-2), libapache2-mod- scgi (<= 1.11-1), libapache2-mod-speedycgi (<= 2.22-3), libapache2-modxslt (<= 2005072700-1), libapache2-redirtoservername (<= 0.1-1), libapache2- webauth (<= 3.5.3-1), libapache2-webkdc (<= 3.5.3-1) Replaces: apache2-common Section: web Priority: optional Homepage: http://httpd.apache.org/ Description: Apache HTTP Server common files The Apache Software Foundation's goal is to build a secure, efficient and extensible HTTP server as standards-compliant open source software. The result has long been the number one web server on the Internet. ‣ CAT CONTROL (continued)
  • 53. Anatomy of a .deb package jthijssen@debian-jth:~/deb$ head conffiles /etc/logrotate.d/apache2 /etc/apache2/conf.d/security /etc/apache2/conf.d/charset /etc/apache2/envvars /etc/apache2/sites-available/default-ssl /etc/apache2/sites-available/default jthijssen@debian-jth:~/deb$ head postinst #!/bin/sh -e if [ "$1" != "configure" ]; then exit 0 fi if [ -e /usr/sbin/apache2 ]; then if [ "`dpkg-statoverride --list /usr/sbin/apache2`" = "" ]; then
  • 54. Creating a .deb package Directory: <appname>-<major>.<minor> jthijssen@debian-jth:~/myapp-1.0$ dh_make -s -n -e jthijssen@enrise.com ‣ CREATE ./DEBIAN DIRECTORY TEMPLATE
  • 55. Creating a .deb package Source: myapp Section: unknown Priority: extra Maintainer: jthijssen <jthijssen@enrise.com> Build-Depends: debhelper (>= 7) Standards-Version: 3.7.3 Homepage: <insert the upstream URL, if relevant> Package: myapp Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Description: <insert up to 60 chars description> <insert long description, indented with spaces> ‣ EDIT ./DEBIAN/CONTROL ETC..
  • 56. Creating a .deb package myapp.1 .TH myapp 1 "16 April 2011" "MyApp 1.00" .SH NAME myapp - My Own Hello World Application. .SH SYNOPSIS myapp .SH DESCRIPTION Simple application that will print hello world to the standard output. .SH AUTHOR This manpage was written by Joshua Thijssen <jthijssen@enrise.com>. ." end of man page myapp.manpages myapp.1 ‣ EDIT ./DEBIAN/MYAPP.1 ETC..
  • 57. Creating a .deb package case "$1" in install|upgrade) touch /myapp.install ;; ‣ EDIT ./DEBIAN/{PREINST,PRERM} ETC..
  • 58. Creating a .deb package usr/local/enrise/bin ‣ EDIT ./DEBIAN/DIRS
  • 59. Creating a .deb package jthijssen@debian-jth:~/myapp-1.0$ dpkg_buildpackage jthijssen@debian-jth:~$ ls -la myapp* -rw-r--r-- 1 jthijssen jthijssen 2992 2011-04-11 15:50 myapp_1.0_all.deb -rw-r--r-- 1 jthijssen jthijssen 716 2011-04-11 15:50 myapp_1.0.dsc -rw-r--r-- 1 jthijssen jthijssen 1313 2011-04-11 15:50 myapp_1.0_i386.changes -rw-r--r-- 1 jthijssen jthijssen 4683 2011-04-11 15:50 myapp_1.0.tar.gz ‣ ACTUAL BUILDING OF THE PACKAGE
  • 60. Creating a .deb package jthijssen@debian-jth:~/myapp-1.0$ lintian ../myapp_1.0_all.deb E: myapp: dir-in-usr-local usr/local/enrise/ E: myapp: dir-in-usr-local usr/local/enrise/bin/ E: myapp: file-in-usr-local usr/local/enrise/bin/myapp W: myapp: file-in-unusual-dir usr/local/enrise/bin/myapp W: myapp: readme-debian-contains-debmake-template W: myapp: copyright-lists-upstream-authors-with-dh_make-boilerplate ‣ LINTIAN CHECK
  • 61. Using your repository http://moodleman.moodle.com.au/wp-content/uploads/2008/09/repository.jpg
  • 62. Creating a repository jthijssen@deb:~$ mkdir -p /var/www/repo/enrise/{binary,source} jthijssen@deb:~$ cp *.deb /var/www/repo/enrise/binary jthijssen@deb:~$ cp *.dsc *.tar.gz /var/www/repo/enrise/source jthijssen@deb:~$ cd /var/www/repo/enrise jthijssen@deb:enrise$ dpkg-scanpackages binary /dev/null | gzip -9c > binary/Packages.gz jthijssen@deb:enrise$ dpkg-scansources source /dev/null | gzip -9c > source/Sources.gz
  • 63. Using your repository /etc/apt/sources.list deb http://repo.url/enrise binary/ deb-src http://repo.url/enrise source/ jthijssen@deb:~$ apt-get update jthijssen@deb:~$ apt-get install myapp
  • 65. Please rate my talk on joind.in: http://joind.in/3315 ‣ THANK YOU FOR YOUR ATTENTION

Editor's Notes

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. \n
  9. \n
  10. \n
  11. \n
  12. \n
  13. \n
  14. \n
  15. \n
  16. \n
  17. \n
  18. \n
  19. \n
  20. \n
  21. \n
  22. \n
  23. \n
  24. \n
  25. \n
  26. \n
  27. \n
  28. \n
  29. \n
  30. \n
  31. \n
  32. \n
  33. \n
  34. \n
  35. \n
  36. \n
  37. \n
  38. \n
  39. \n
  40. \n
  41. \n
  42. \n
  43. \n
  44. \n
  45. \n
  46. \n
  47. \n
  48. \n
  49. \n
  50. \n
  51. \n
  52. \n
  53. \n
  54. \n
  55. \n
  56. \n
  57. \n
  58. \n
  59. \n
  60. \n
  61. \n
  62. \n
  63. \n
  64. \n
  65. \n
  66. \n
  67. \n
  68. \n
  69. \n