Package Managers What are they and why we use them.

Slides:



Advertisements
Similar presentations
Introduction to Maven 2.0 An open source build tool for Enterprise Java projects Mahen Goonewardene.
Advertisements

Software installation Chapter 7. Software installation Numerous software options Usually free Open source Several sources Installation CD Websites sourceforge.net.
Low level CASE: Source Code Management. Source Code Management  Also known as Configuration Management  Source Code Managers are tools that: –Archive.
Installing software on personal computer
Hyrax Installation and Customization Dan Holloway James Gallagher.
Introduction to The Linaro Toolchain Embedded Processors Training Multicore Software Applications Literature Number: SPRPXXX 1.
1 Introduction to Tool chains. 2 Tool chain for the Sitara Family (but it is true for other ARM based devices as well) A tool chain is a collection of.
Mining Large Software Compilations over Time Another Perspective on Software Evolution: Gregorio Robles, Jesus M. Gonzalez-Barahona, Martin Michlmayr,
Debian package manager Presenter: Lilian Wang. Install Software  先別管 package 了, 你有聽過重灌嗎 ?  Chrome/Firefox, Office, pietty, Notepad++, PCMan, LOL, …
UNIX ™ /Linux Overview Unix/IP Preparation Course June 9, 2013 Lusaka, Zambia.
Linux Operations and Administration
M. Taimoor Khan * Java Server Pages (JSP) is a server-side programming technology that enables the creation of dynamic,
Welcome to the 3 rd Junior Session Prepared by Eslam Mohammed Diaa El-Din Twitter
SKA/KAT SPIN Presentation Software Engineering (!?) Robert Crida.
2008 Taipei, Taiwan Ubuntu Linux Server Structure and Config APRICOT 2008 Network Management Workshop February 20 – Taipei, Taiwan.
The Pipeline Processing Framework LSST Applications Meeting IPAC Feb. 19, 2008 Raymond Plante National Center for Supercomputing Applications.
Review Security Hardening IPTables SELinux. Today Installations and updates – Rpm command and packages Apache “Issue Ownership”
Linux Package Management Dr. Michael L. Collard 1.
Software Engineering in Robotics Packaging and Deployment of Systems Henrik I. Christensen –
Working with Ubuntu Linux Track 2 Workshop June 2010 Pago Pago, American Samoa.
Package Management. Basic Commands apt-get install : install package + dependencies apt-get remove : removes the package not dependencies apt-get autoremove.
Introduction to Linux ( I ) Sidney Fong 4 th Feb 2006.
Maintain Installed Applications. Computer Center, CS, NCTU 2 In Ports Tree  / Makefile  COMMENT pkg-descr  WWW pkg-message  Shown after installed.
APT for RPM Simplified package management for rpm based distributions INFN - Napoli 1 INFM - UDR Napoli 2 HEPiX/HEPNT 2003 – Vancouver Rosario Esposito.
A Practical Guide to Fedora and Red Hat Enterprise Linux Unit 8: Installing Software in Linux Chapter 13: Downloading and Installing Software By Fred R.
2008 Bangkok, Thailand Ubuntu Linux Server Structure and Config intERLab at AIT Network Management Workshop March 11 – Bangkok, Thailand.
1 What is a Kernel The kernel of any operating system is the core of all the system’s software. The only thing more fundamental than the kernel is the.
Information Systems and Network Engineering Laboratory II DR. KEN COSH WEEK 1.
Progress with migration to SVN Part3: How to work with g4svn and geant4tags tools. Geant4.
New Delhi, India Ubuntu Linux Server Structure and Config PacNOG5 June 16 – Papeete, French Polynesia Hervey Allen.
CERN-PH-SFT-SPI August Ernesto Rivera Contents Context Automation Results To Do…
Ant & Jar Ant – Java-based build tool Jar – pkzip archive, that contains metadata (a manifest file) that the JRE understands.
What is a port The Ports Collection is essentially a set of Makefiles, patches, and description files placed in /usr/ports. The port includes instructions.
GLite build and integration system Building and Packaging Robert HARAKALY
Intro to Git presented by Brian K. Vagnini Hosted by.
CSCI 330 UNIX and Network Programming Unit XX: Linux Administration.
ASIS + RPM: ASISwsmp German Cancio, Lionel Cons, Philippe Defert, Andras Nagy CERN/IT Presented by Alan Lovell.
Yannick Patois - Datagrid Software Repository Presentation - March, n° 1 Datagrid Software Repository Presentation CVS, packages and automatic.
A Mirror Engine Computer Science Capstone Tobias Hertkorn.
Linux development Lection What we gonna do today Root privileges Software packages Managing software packages Build procedures Build components.
SPI NIGHTLIES Alex Hodgkins. SPI nightlies  Build and test various software projects each night  Provide a nightlies summary page that displays all.
Installing Applications in FreeBSD lctseng. Computer Center, CS, NCTU 2 Before we start  Permission issue root: the super user Like administrator in.
Build Tools 1. Building a program for a large project is usually managed by a build tool that controls the various steps involved. These steps may include:
Installing Applications in FreeBSD. Computer Center, CS, NCTU 2 Install software  Package Pre-built rpm, yum, dpkg, … FreeBSD: pkg_add, pkg_delete, pkg_info.
Introduction to Linux Server Setup Jonathan Hood CSE 4000 Practical Issues in Software Engineering.
Tutorial on setting up Zebra: A Z39.50 Server ARD Prasad DRTC Indian Statistical Institute Bangalore.
Debian Package Management
SCDB Update Michel Jouvin LAL, Orsay March 17, 2010 Quattor Workshop, Thessaloniki.
New Delhi, India Ubuntu Linux Server Structure and Config PacNOG5 June 16 – Papeete, French Polynesia Hervey Allen.
System Administration Application Management. ● A common task for a system administrator is the installation, updating and removal of software. Several.
Linux Basics Part 2. VIM Editor vi improved Installed on most Linux machines Can be a bit confusing at first... o Cheat sheets FTW Other popular editors:
2008 Taipei, Taiwan Ubuntu Linux Server Structure and Config APRICOT 2008 Network Management Workshop February 20 – Taipei, Taiwan.
1 /15 Design and Implementation of the Custom Debian Distributions Toolkit (CDDT) 17 February 2006 Sergio Talens-Oliag II Open Source World.
Upgrade-advisor DebConf9 Caceres, Extremadura, Spain Frank lin Piat
Packaging Software for Debian Roberto C. Sánchez Ohio Linuxfest Saturday, September 29, 2007.
Bangkok, Thailand Ubuntu Linux Server Structure and Config intERLab at AIT Network Management Workshop March 11 – Bangkok, Thailand.
Chuan-kai Lin Drake Diedrich Google Inc.
Connect:Direct for UNIX v4.2.x Silent Installation
SPI external software build tool and distribution mechanism
Chapter 7 Installing Program &Backup Tool
Build and Package CSE 403 section, 2011 Feb 3, Hao Lu.
BIND 10 Packaging & Distribution
Ubuntu Working in Terminal
Giving Back Contributing to Debian and the New Maintainer Process
More Scripting & Chapter 11
University of Texas Rio Grande Valley Systems Administration CSCI 6175
Introduction to Ansible
JENKINS TIPS Ideas for making your life with Jenkins easier
The Linux Command Line Chapter 14
FreeBSD ports & packages
Presentation transcript:

Package Managers What are they and why we use them

Thoughts of an admin Installing software is painful Installing a lot of software is extremely painful Installing a lot of software on a lot of machines is HELL

舉例 - LOL 天賦、符文 道具

Before Packages Install from source Time consuming Varying configuration

Improvement 1 Copy the binaries Setup scripts? Version? Dependencies?

Package - Basic Archive Binaries Supporting files Setup script

Package – Improvement Versioning ◦1.0.x ◦1.1.x ◦… Upgrades!

Package - Dependencies Program A requires library B to work If library C is available, program A will work better/faster!

Example – Call of Duty Requires: DirectX Works better with: PhysX

Package Managers Low Level Unpacking packages Run configuration scripts Dependency checks …

Package Managers High Level Fetch from remote repositories Search Install additional packages to meet dependencies Handle complex upgrades

Package Repository Collection of packages Maintained by distribution Multiple versions Index

Package Managers RPM BasedDEB Based Low levelRPMDpkg High levelYUM, up2date, …APT

DEBIAN DPKG & APT Focus on

Types of Packages Binary Package Meta Package Virtual Package

Binary Package Normal package Source is available Architecture ◦Dependent  Compiled binary files ◦Independent  Scripts  Documents  Data files

Meta Package Depends on other packages only Rename ◦git-core -> git Default version ◦gcc -> gcc-4.6 ◦Python -> python2.7 Can be creative!

Virtual Package Does not really exist Names common functionality Other binary packages “provide” a virtual package c-compiler is provided by ◦gcc ◦gcc-4.6 ◦clang

Commonly Used Commands apt-get apt-cache aptitude ◦Frontend to the first 2 commands

Search for a package apt-cache search ^vim$ Search pattern State flags

Search Patterns Patterns are regular expressions Aptitude supports complex patterns ◦See referencereference Search requires guessing ◦Just like Googling

Differences Aptitude and apt-cache have slighty different behavior ◦Aptitude looks at package name only ◦Apt-cache looks at description as well

State Flags

Try it! You want to install a web server. What do you look for? What should you actually install?

Looking at a package Web interface ◦ CLI ◦apt-cache show XXX ◦aptitude show XXX Debian Control File Try it now!

Package Info Name State Version Priority Section Maintainer Architecture Dependencies Description

Package Info - State installed not installed removed …

Package Info - Version Vim: 2: : -> Epoch > Upstream version -6 -> Debian package revision

Package Info - Priority Required Important Standard Optional Extra

Package Info - Dependencies Depends Recommends Suggests Conflicts Replaces Breaks Provides Syntax: policy/ch-relationships.html policy/ch-relationships.html

Installing / Removing apt-get install XXX aptitude install XXX remove/purge hold/unhold upgrade dist-upgrade

remove vs. purge Remove keeps config files in system Purge = Remove + delete config files

hold/unhold Keep a package at a specific state/version unless explicitly request otherwise

upgrade vs. dist-upgrade upgrade only updates currently installed packages dist-upgrade will do anything to satisfy all new dependencies

Try it now! Install a web server Then remove it See that config files are still there Then purge it

MAKING A PACKAGE

Why? Customize Software not packaged yet ◦Become a maintainer? Build your own

Making your first package Basic structure ◦package/XXX  Files you want to package ◦package/DEBIAN/control  Debian control file ◦package/DEBIAN/xxx  Package scripts, other control files dpkg-deb –b package

Homework – Build a meta package Name: nasa-hw Should always install ◦gcc no older than 4.7 ◦make newer than 3.80 Should not install when ◦clang is installed Maintainer: Your ID Use your judgment for other fields ◦Read the documents! Submit.deb file

Too simple? Debian related source code ◦source/debian/rules ◦source/debian/control ◦source/debian/changelog ◦source/debian/…

Guidelines for packaging Debian 新維護人員手冊 ◦ /maint-guide/ /maint-guide/ Get other package sources and see how other people do it ◦apt-get source XXX

Packages for packaging build-essential dpkg-dev debhelper CDBS dh_make lintian

build-essential Meta package that depends on essential tools for packaging You need to install additional tools/libraries ◦debhelper, cdbs, … ◦lib*-dev

dpkg-dev Basic tools for package development dpkg-buildpackage

Debhelper Collection of commands to assist packaging Wraps complex steps ◦Splitting files between different packages ◦Generating shared library dependencies ◦Generate and sign binary packages ◦…

CDBS Common Debian Build System Class based system Supports different build systems ◦make, ant, cmake, … isentraut/the-common-debian- build-system-cdbs isentraut/the-common-debian- build-system-cdbs

dh_make Prepare source code for packaging Always uses debhelper Supports CDBS

lintian Check packages for errors

Steps to packaging s/maint-guide/first.en.html s/maint-guide/first.en.html 1. Get source code 2. Unpack 3. dh_make 4. Install build dependencies 5. Check control file 6. Check installation paths 7. Build package ◦dpkg-buildpackage -b

Homework Build a package of “Omnitty” ◦ You will also need to build a package for “ROTE” ◦ Build it, install it, and try it out Submit.deb for omnitty

Tips Packages you can look at ◦libevent ◦screen ◦tmux ◦make

HOMEWORK RECAP

nasa-hw meta package omnitty binary package Leave your packages on 217 workstation ◦Mail the path of your package to wens_at_csie.org Start sooner! You need to do research to finish this assignment.