Lines 37-44
Link Here
|
37 |
|
37 |
|
38 |
create_image() { |
38 |
create_image() { |
39 |
Verbose "Creating image for \`$IDENT'." |
39 |
Verbose "Creating image for \`$IDENT'." |
|
|
40 |
[ -n "$IMAGE_TYPE" ] || IMAGE_TYPE="$image_type" |
41 |
Verbose "image type: \`$IMAGE_TYPE'." |
40 |
|
42 |
|
41 |
case "$image_type" in |
43 |
case "$IMAGE_TYPE" in |
42 |
squashfs) |
44 |
squashfs) |
43 |
init_chroot_progs "squashfsprogs" |
45 |
init_chroot_progs "squashfsprogs" |
44 |
cp -a "$tmpdir/.archive.tar" "$chroot/tmp/" |
46 |
cp -a "$tmpdir/.archive.tar" "$chroot/tmp/" |
Lines 57-62
Link Here
|
57 |
mkiso= |
59 |
mkiso= |
58 |
cat "$tmpdir/.archive.tar" | gzip -f9 > "$workdir/$OUT.tar.gz" |
60 |
cat "$tmpdir/.archive.tar" | gzip -f9 > "$workdir/$OUT.tar.gz" |
59 |
;; |
61 |
;; |
|
|
62 |
cpio) |
63 |
init_chroot_progs "cpio findutils" |
64 |
cp -a "$tmpdir/.archive.tar" "$chroot/tmp/" |
65 |
cat >"$tmpdir/script" <<'__EOF__' |
66 |
mkdir -p /tmp/.archive |
67 |
tar -C /tmp/.archive -xf /tmp/.archive.tar |
68 |
cd /tmp/.archive |
69 |
find . | cpio -o -H newc > /.image |
70 |
__EOF__ |
71 |
chroot_exec "$tmpdir/script" |
72 |
mv -f -- "$chroot/.image" "$outdir/$OUT" |
73 |
gzip "$outdir/$OUT" |
74 |
mv "$outdir/$OUT.gz" "$outdir/$OUT" |
75 |
;; |
60 |
*) |
76 |
*) |
61 |
Fatal 'Unsupported image type.' |
77 |
Fatal 'Unsupported image type.' |
62 |
;; |
78 |
;; |
Lines 149-162
Link Here
|
149 |
chroot_run rm -rf -- "$imgdir" |
166 |
chroot_run rm -rf -- "$imgdir" |
150 |
} |
167 |
} |
151 |
|
168 |
|
|
|
169 |
to_isolinux() { |
170 |
[ -n "$TO_ISOLINUX" ] || return 0 |
171 |
|
172 |
Verbose "Move image for $IDENT to isolinux/alt0" |
173 |
|
174 |
chroot_run mv $isodir/$OUT $isodir/isolinux/alt0/ |
175 |
} |
176 |
|
152 |
runto_components() { |
177 |
runto_components() { |
153 |
local cmd comp |
178 |
local cmd comp |
154 |
local IDENT VENDOR COPYONLY INSTALLDIR NOIMAGE EXTRAOPTS FILES OUT |
179 |
local IDENT VENDOR COPYONLY INSTALLDIR NOIMAGE EXTRAOPTS FILES OUT IMAGE_TYPE TO_ISOLINUX |
155 |
|
180 |
|
156 |
cmd="$1" && shift |
181 |
cmd="$1" && shift |
157 |
|
182 |
|
158 |
for comp in $COMPONENTS; do |
183 |
for comp in $COMPONENTS; do |
159 |
IDENT="packages" VENDOR="ALTLinux" COPYONLY= INSTALLDIR= NOIMAGE= EXTRAOPTS= FILES= OUT= |
184 |
IDENT="packages" VENDOR="ALTLinux" COPYONLY= INSTALLDIR= NOIMAGE= EXTRAOPTS= FILES= OUT= IMAGE_TYPE= TO_ISOLINUX= |
160 |
|
185 |
|
161 |
. "$profile_dir/$comp/config" || |
186 |
. "$profile_dir/$comp/config" || |
162 |
Fatal "File \`$profile_dir/$comp/config' not found." |
187 |
Fatal "File \`$profile_dir/$comp/config' not found." |
Lines 312-317
Link Here
|
312 |
# COPYONLY handle |
337 |
# COPYONLY handle |
313 |
runto_components copyonly |
338 |
runto_components copyonly |
314 |
|
339 |
|
|
|
340 |
# TO_ISOLINUX handle |
341 |
runto_components to_isolinux |
342 |
|
315 |
# syslinux stuff |
343 |
# syslinux stuff |
316 |
addisolinux= |
344 |
addisolinux= |
317 |
if [ -f "$profile_dir/isolinux.cfg.in" ]; then |
345 |
if [ -f "$profile_dir/isolinux.cfg.in" ]; then |