File: README

package info (click to toggle)
debpartial 0%2B20020130
  • links: PTS
  • area: main
  • in suites: woody
  • size: 92 kB
  • ctags: 53
  • sloc: ruby: 860; sh: 136; makefile: 36
file content (116 lines) | stat: -rw-r--r-- 4,098 bytes parent folder | download | duplicates (3)
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
The Debian Package debpartial
----------------------------

This file documents some tips using debpartial as follows:

 1) creating partial mirror
 2) creating partial debian distribution
 3) creating Debian DVD/CDs

* Partial mirror

  debpartial can be used to create a partial debian mirror. A sample
  script to do it is located in:

    /usr/share/doc/debpartial/doc/examples/mirror.sh.

  This script mirrors debian packages and sources, which are currently
  installed on the computer, under /home/ftp/pub/debmirror/partial/.
  It needs debmirror program ( Of course, apt-get install debmirror :)).

  Let's copy mirror.sh in /etc/cron.daily/ for automatic daily mirror :)
  Please edit MIRRORHOST because everyone starts to mirror at the same time,
  or use 'crontab -e' and specify another time to mirror your debian.

  Time difference doesn't solve this problem because people in the same 
  timezone may access to the same location. For example, JST people may
  access to *.jp.debian.org.

* Partial Packages.gz/Sources.gz

  The partial Packages.gz is useful for slow and low memory machines
  because it eliminates the number of packages to maintain. For example,
  it can create a customized server distribution only about 150 packages.

  Say the full debian mirror is located under /home/ftp/debian/ and
  the list of packages for the customized server distribution is located
  in server-dist file. The format is very simple like:

    apt
    dpkg
    ...

  Now execute the following command: 

    ~$ debpartial -l 1 -m -s main -D server --include-from=server-dist \
        /home/ftp/debian/ /home/ftp/debpartial/

  This makes the following files:

  /home/ftp/debpartial/server/dists/unstable/main/binary-i386/Packages.gz
  /home/ftp/debpartial/server/dists/unstable/main/source/Sources.gz

  ,including packages and sources only listed in server-dist
   ( Note that the maximum size of the distribution is CD74 ).

    ~$ ln -s ../../debpartial/server/dists/unstable \
        /home/ftp/debian/dists/unstable-server

  This locates the server distribution to /home/ftp/debian/, so it can
  be used by apt with the following lines in /etc/apt/sources.list:

    deb file:/home/ftp/debian/ unstable-server main
    deb-src file:/home/ftp/debian/ unstable-server main

  (I think the symlink magic isn't good design.)

* Creating Debian DVD/CDs

  Currently, creating Debian DVD/CDs by debpartial is little complex, but
  it's possible. The most easiest method is now to use debmirror.
  For all partitions, it mirrors necessary packages and sources. 

    debpartial --size DVD /home/ftp/debian/ /home/ftp/debpartial/
    for part in /home/ftp/debpartial/*; do
      debmirror -h localhost --skippackages $part
      mkisofs -J -r -o debian-dvd-`basename $part`.iso $part
    done

  (Of course, It needs ftp server on localhost)

  If you have a debian archive, 'debcopy' can be used to create
  CD easily instead of using debmirror as follows:

    debpartial --size DVD /home/ftp/debian/ /home/ftp/debpartial/
    for part in /home/ftp/debpartial/*; do
      ruby /usr/share/doc/debpartial/examples/debcopy -l \
        /home/ftp/debian $part
      mkisofs -F $part -J -r -o debian-dvd-`basename $part`.iso $part
    done

  If you want to create Debian CDs, then specify --size CD74
  (or without --size option because CD74 is default).

  /usr/share/doc/debpartial/examples/debian-1cd.sh is a sample script
  to create 1CD Debian ISO image for your computer on-the-fly :) It
  needs mkisofs.

  In addition, if you want to create a UDF image, do the following
  or something like that:

    dd if=/dev/zero of=udfimage bs=1M count=610
    mkudf udfimage
    mkdir udfmnt
    mount -o loop -t udf udfimage udfmnt

    debpartial -l 1 -m -D udfmnt /home/ftp/debian/ .
    debmirror -h localhost --skippackages udfmnt

    umount udfmnt

  ( It needs the kernel with read/writable udf support )

  Similarly, it's possible to create UDF CD/DVD with packet writing.
  See udftools package for more info.

Masato Taruishi <taru@debian.org>, Sat,  5 Jan 2002 17:52:45 +0900