티스토리 뷰
virtualization
How to build deb packaging from scratch (Ex2: OpenNebula)
kenshin579 2010. 7. 19. 01:04First let's dissect opennebula_1.4.0-1_i386.deb binary file
Package Strucuture
># ar tv opennebula_1.4.0-1_i386.deb
Extract them
># ar xv opennebula_1.4.0-1_i386.deb
- debian-binary
- control.tar.gz (md5sums, control, postinst, postrm)
- data.tar.gz
># mkdir opennebula
># cd opennebula
># git clone git://opennebula.org/one.git
># tar -czvf one-1.4.orig.tar.gz ./one-1.4
># tar -xzvf debian.tar.gz;
># cd ./one-1.4
># mv ../debian .
># dpkg-buildpackage -rfakeroot
Here let's take a brief look at some of control files.
control
files
rules
* sdf
opennebula.postinst
opennebula.postrm
opennebula.substvars
References
1. Debian Binary Package HOWTO, http://tldp.org/HOWTO/html_single/Debian-Binary-Package-Building-HOWTO/
2.
Package Strucuture
># ar tv opennebula_1.4.0-1_i386.deb
Extract them
># ar xv opennebula_1.4.0-1_i386.deb
- debian-binary
- control.tar.gz (md5sums, control, postinst, postrm)
- data.tar.gz
># mkdir opennebula
># cd opennebula
># git clone git://opennebula.org/one.git
># tar -czvf one-1.4.orig.tar.gz ./one-1.4
># tar -xzvf debian.tar.gz;
># cd ./one-1.4
># mv ../debian .
># dpkg-buildpackage -rfakeroot
Here let's take a brief look at some of control files.
control
Source: opennebula Section: utils Priority: extra Maintainer: Jaime Melis <j.melis@fdi.ucm.es> Build-Depends: debhelper (>= 7), scons, libxmlrpc-c3-dev, ruby, libsqlite3-dev, libssl-dev Standards-Version: 3.8.0 Homepage: http://opennebula.org/ Package: opennebula Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, ruby, adduser, libsqlite3-ruby, openssh-client Description: OpenNebula controller OpenNebula is an open source virtual infrastructure engine that enables the dynamic deployment and re-placement of virtual machines on a pool of physical resources. . ONE (OpenNebula) extends the benefits of virtualization platforms from a single physical resource to a pool of resources, decoupling the server not only from the physical infrastructure but also from the physical location. . |
files
opennebula_1.4-0ubuntu1_i386.deb utils extra |
rules
* sdf
#!/usr/bin/make -f build: build-stamp build-stamp: dh_testdir scons touch $@ install: dh_clean dh_installdirs DESTDIR=debian/opennebula ./install.sh clean: dh_testdir dh_clean scons -c . rm -rf install-stamp build-stamp share/scons/lex_bison.pyc \ src/nebula/.xmlrpc_test/xmlrpc_test.* \ src/scheduler/.xmlrpc_test/xmlrpc_test.* \ .xmlrpc_test .sconsign.dblite binary-arch: install dh_testdir -a dh_testroot -a dh_strip -a dh_fixperms -a dh_installdeb -a dh_shlibdeps -a dh_gencontrol -a dh_md5sums -a dh_builddeb -a binary-indep: binary: binary-arch |
opennebula.postinst
#!/bin/sh set -e if [ "$1" = "configure" ] then if ! getent passwd oneadmin > /dev/null 2>&1; then ONEHOME=/var/lib/one adduser --system --home $ONEHOME --shell /bin/bash oneadmin else ONEHOME=`getent passwd oneadmin | cut -f6 -d:` fi if ! [ -d "$ONEHOME/.ssh" ] then mkdir "$ONEHOME/.ssh" chown oneadmin "$ONEHOME/.ssh" chmod 755 "$ONEHOME/.ssh" fi if ! [ -f "$ONEHOME/.ssh/authorized_keys" ] then touch "$ONEHOME/.ssh/authorized_keys" chown oneadmin "$ONEHOME/.ssh/authorized_keys" chmod 600 "$ONEHOME/.ssh/authorized_keys" fi if ! [ -f "$ONEHOME/.ssh/id_rsa" ] then su oneadmin -c "ssh-keygen -N '' -t rsa -f $ONEHOME/.ssh/id_rsa" fi chown oneadmin /var/lib/one chown oneadmin /var/log/one chown oneadmin /var/run/one fi #DEBHELPER# |
opennebula.postrm
#!/bin/sh set -e if [ "$1" = "purge" ] then if getent passwd oneadmin > /dev/null 2>&1 then deluser oneadmin fi rm -rf /var/lib/one rm -rf /var/log/one rm -rf /var/run/one fi #DEBHELPER# |
opennebula.substvars
shlibs:Depends=libc6 (>= 2.3.6-6~), libc6 (>= 2.4), libgcc1 (>= 1:4.1.1), libsqlite3-0 (>= 3.6.22), libssl0.9.8 (>= 0.9.8k-1), libstdc++6 (>= 4.1.1), libxmlrpc-c3, libxmlrpc-core-c3 misc:Depends= |
References
1. Debian Binary Package HOWTO, http://tldp.org/HOWTO/html_single/Debian-Binary-Package-Building-HOWTO/
2.
'virtualization' 카테고리의 다른 글
Workload Characterization for VM and process in Non-virtualized Environment (0) | 2011.01.07 |
---|---|
Installing Xen on Ubuntu 10.04 (0) | 2011.01.06 |
How to build openNebula (rpm) from scratch (Fedora 13) (0) | 2010.07.19 |
How to check your hardware compatiblity issue? Does it support 64-bit? (0) | 2010.05.02 |
Resize the size of an image file (Xen) (0) | 2009.08.13 |
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- VIM
- Java profiler
- perfmon2
- Xen
- C정리
- nas parallel benchmark
- meld
- latex on ubuntu
- benchmark
- SNU 석사논문 latex
- benchmarks
- C언어 정리
- 서울대 학위논문 포멧
- YourKit
- MPI
- Ubuntu 9.04
- C
- ssh
- deb
- SNU latex 논문
- KVM
- known_hosts
- opennebula
- ubuntu 8.10
- spec
- r
- latex
- ubuntu
- SNU 학위논문 latex 포멧
- hprof
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
글 보관함