2008年9月14日 星期日

SOP for Re-creating Debian binary packages with dpkg-repack

# SOP for Re-creating Debian binary packages with dpkg-repack
#
# Description:
# If you've installed a Debian package upon a machine, but lost the binary archive,
# then it is difficult to copy that package to another machine.
# Thankfully is a simple solution for recreating a Debian package from an installed system.
# dpkg-repack allows you to turn a package which you've installed back into a binary .deb file.
#
# Reference: http://www.debian-administration.org/articles/499
# Date: 2008/09/04
# Author: Payton Chou

# step 1: Download
Download dpkg-repack from here
http://packages.debian.org/etch/all/dpkg-repack/download

# step 2: Install dpkg-repack
> dpkg -i dpkg-repack_1.25_all.deb

# step 3: Search which packages need to make binary debian packages, ex. ncs
> dpkg -l | grep ncs
601:ii libvncserver0 0.9.3.dfsg.1-2asus2 API to write one's own vnc server
619:ii libxandrosncs1 0.209-2 Xandros Network Connection System library
927:ii xandros-libxandrosncsui 4.0.511-2 Xandros Network Connection System UI Library
955:ii xandros-xncsapplet 4.0.511-2 Xandros Network Connection System Applet
956:ii xandros-xncsconfig 4.0.511-2 Xandros Network Configuration Panel
957:ii xandros-xncswizard 4.0.511-2 Xandros Internet Connection Wizard
959:ii xandrosncstools 0.51-11 Xandros Network Connection System - Command

# step 4: Make binary Debian packages
> dpkg-repack xandros-libxandrosncsui
dpkg-deb: building package `xandros-libxandrosncsui' in `./xandros-libxandrosncsui_4.0.511-2_i386.deb'.
> dpkg-repack xandros-xncsapplet
dpkg-deb: building package `xandros-xncsapplet' in `./xandros-xncsapplet_4.0.511-2_i386.deb'.
> dpkg-repack xandros-xncsconfig
dpkg-deb: building package `xandros-xncsconfig' in `./xandros-xncsconfig_4.0.511-2_i386.deb'.
> dpkg-repack xandros-xncswizard
dpkg-deb: building package `xandros-xncswizard' in `./xandros-xncswizard_4.0.511-2_i386.deb'.
> ls -alh xandros*
-rw-r--r-- 1 root root 264K 2008-09-04 17:29 xandros-libxandrosncsui_4.0.511-2_i386.deb
-rw-r--r-- 1 root root 430K 2008-09-04 17:30 xandros-xncsapplet_4.0.511-2_i386.deb
-rw-r--r-- 1 root root 207K 2008-09-04 17:31 xandros-xncsconfig_4.0.511-2_i386.deb
-rw-r--r-- 1 root root 497K 2008-09-04 17:31 xandros-xncswizard_4.0.511-2_i386.deb

# step 5: Copy your debian packages to another EPC
skip

# Final step: In another EPC, and your binary Debian packages are located in /mnt/ncs
> dpkg -Ri /mnt/ncs

Reference: http://down.gogobox.com.tw/payton345/fdhy2

沒有留言: