Click here to load reader
Upload
motaz-saad
View
1.857
Download
4
Embed Size (px)
DESCRIPTION
Browsing The Source Code of Linux Packages
Citation preview
Browsing Linux Source Packages
Linux Day – May 6, 2007Motaz K. Saad
Department of Computer Sciencehttp://motaz.saad.googlepages.com
Introduction
• Linux Binary Packages: *.rpm files (rpm = redhat package manager)– Package_name-ver.rpm
• Linux Source Packages: *.src.rpm– Package_name-ver.src.rpm
Introduction (Cont.)
• Linux source are found in /usr/src directory.• Linux kernel source located in:
/usr/src/linux-2.6.x directory.• When installing source rpm package [src.rpm]
(rpm –i package_name.src.rpm) it will be installed in /usr/src/packages/SOURCES directory.
How to install software on Linux
• Binary Packages:– RPM packages : • Use the command: rpm –i package_name.rpm
– SH files• Use the command: sh install.sh or execute ./install.sh
– Bin files• Execute it!: ./file.bin
How to install software on Linux
• Source packages (packge_name.tar.gz):– Extract the packge_name.tar.gz file– cd to extracted directory– Execute ./configure– Execute make– Su to root– Execute make install
Where to Start Looking?
• coreutils package: – The /bin directory contains the most important
programs that the system needs to operate such as shells, cp, mkdir, ls, …etc.
– Look at cp.c, mkdir.c, ls.c, pwd.c ….
• unix2dos package:– Unix2dos is a program that convert line feed [lf]
('\x0a') characters in a file to carriage return [cr] lf ('\x0d' '\x0a') combinations.
Where to Start Looking?
• dos2unix package:– dos2unix is a program that Remove carriage
return [cr] ('\x0d') characters from a file.
• xscreensaver package:– Contains set of screen saver that made using
OpenGL and other graphic library.– OpenGL Screensavers:• Pipes Screen Saver: xscreensaver/hacks/glx/pipes.c• Gears Screen Saver: xscreensaver/hacks/glx/gears.c
Where to Start Looking?
• gzip package:– file compression utility gzip/gzip.c– Compression Algorithm details:
gzip/alogrithm.doc
Where to Start Looking?
• gnuchess packages– GNU Chess game: Information about game data
structure and search algorithm can be found in gnuchess/doc/README
– Search algorithm gnuchess/src/search.c: Based on Professor Tony Marsland's modification to alpha-beta minimax, called Principal Variation Search (PVS), this algorithm performs credibly.
Where to Start Looking?
• traceroute package:– traceroute is a system administrators utility to
trace the route ip packets from the current system take in getting to some destination system.
• gcc package: – GNU Compiler
• eject package:– A program that eject the CD/DVD ROM drive
Where to Start Looking?
• aspell-en package: – GNU Aspell English Word List Package
• And more and more package!
Thank you!