Overview
Comment:Script to create CDROM-ready directory from .deb package.
Resultant directory should be copied to / directory of iso9660 image.
Recipient of CDROM then uses "apt-cdrom add"; "apt-get install mtt".
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: 9675b715f87386d7435bbfb22a7c1176911fc648296447228049a495f9094694
User & Date: geraint@users.sourceforge.net on 2002-09-29 01:05:13
Other Links: branch diff | manifest | tags
Context
2002-09-29
01:18:30
Prefixed default version with 4.91. This prevents apt from getting
confused by dates which look like very high version numbers.
check-in: fa0e62a51a user: geraint@users.sourceforge.net tags: origin/master, trunk
01:05:13
Script to create CDROM-ready directory from .deb package.
Resultant directory should be copied to / directory of iso9660 image.
Recipient of CDROM then uses "apt-cdrom add"; "apt-get install mtt".
check-in: 9675b715f8 user: geraint@users.sourceforge.net tags: origin/master, trunk
2002-09-28
13:46:03
Added -k option to keep temporary directory. Allows retrieval of .orig.tar.gz, .dsc and .diff.gz to create Sources.gz. check-in: eb474430e6 user: geraint@users.sourceforge.net tags: origin/master, trunk
Changes

Added mttroot/mtt/bin/mtt_deb2cd version [4cf587b080].





























































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
#! /bin/sh

# Script to create a CD-ready directory from .deb package
# output from script will be a directory which should be copied to / of CDROM
# user of CDROM should run "apt-cdrom add"

usage ()
{
    cat <<EOF

usage: $0 debfile

EOF
}

error ()
{
    echo $0: error: ${1:-"unknown error"} - aborting.
    exit 1
}

debfile="$1"

# should be root for some of these commands
if [ ! `whoami` = "root" ]; then
    export my_user=${USER}
    export my_group=`groups | gawk '{print $1}'`
    echo root password required
    exec su -p -c "$0 $*"
    error "root authorisation failed"
fi

if [ -z "${debfile}" ]; then
    usage
    error "No debfile given"
fi

topdir=`pwd`

# create working directory
tmpdir=`mktemp -d mtt_deb2cd.tmp.XXXXXXXXXX`
if [ ! -d ${tmpdir} ]; then
    error "cannot create temporary directory"
fi

cp ${debfile} ${tmpdir}/
cd ${tmpdir}
mkdir .disk
echo "MTT (${debfile}, `date`)" > .disk/info
tmpfile=`mktemp mtt_deb2cd.tmp.XXXXXXXXXX`
echo "Scanning .deb packages"
dpkg-scanpackages . ${tmpfile} | gzip > ./Packages.gz
rm ${tmpfile}
# create Redhat package
echo "Creating .rpm, please wait ..."
alien --to-rpm ${debfile}
chown -R ${my_user:-"root"}.${my_group:-"root"} .
cd ..

echo "Directory created (${tmpdir}) - copy this to iso9660 image as /"

exit 0


MTT: Model Transformation Tools
GitHub | SourceHut | Sourceforge | Fossil RSS ]