Hello,
Finally I set up my own mirror and I'm able to build my unofficial discs
with debian-cd. Thanks Andy Cater and Linux-Fan for instructions!
================== ABOUT MIRROR ======================================
Currently I'm using the recommended ftpsync.tar.gz scripts to set up my
mirror. However, although I was able to use ARCH_INCLUDE=amd64 to mirror
amd64 binaries only, I found there is no official/supported way to
include only one release (e.g. a bullseye only mirror. Please point me
out if I'm wrong) . Thus the mirror disk usage is too high because it
contains other older releases and testing release. It's now occupying
456GB of disk space. In contrast, the ISOs for single arch should
occupying about 71GB. I found the wiki page says 'debmirror' may fit my
needs. I will try it later.
================== ABOUT BUILDING DISCs ==============================
I tried my DLBD(50G) build and CUSTOM(all-in-one) build. The all-in-one
build time is slightly shorter than DLBD build. The test machine is a
virtual machine with 2 core and 3gb memory (host is 4 core / 8gb / ssd).
=== TIME RESULT FOR DLBD BUILD ===
real 32m18.505s
user 21m2.810s
sys 14m40.667s
=== TIME RESULT FOR ALL-IN-ONE BUILD ===
real 26m20.481s
user 19m29.255s
sys 10m14.450s
I used 'apt install debian-cd' to install, then I used the installed
scripts in /usr/share/debian-cd directly.
=== Changed configurations in 'CONF.sh' are ===
export MIRROR=/path/to/my/debian/mirror
export VARIANTS=xen
export CHECKSUMS="sha512 sha256"
export DISKTYPE=DLBD
or
export DISKTYPE=CUSTOM
export CUSTOMSIZE=4000000000
I tried my best to simulate an official build. I wasn't able to find the
configuration values for official build. Please correct me if I missed
something.
=== The build command is ===
***@mirror:/usr/share/debian-cd# time sh -c '. ./CONF.sh && export
COMPLETE=1 && make distclean && make status && make official_images &&
make imagesums && echo ALLOK'
=== About the time result ===
I think why all-in-one build time is shorter is because it doesn't need
the "try put one package, if can't, rollback" procedure. However,
because it only produce one ISO file, the building process can't be
parallelized. Thus with more cpu cores, the overall build time may vary,
and the result can be changed.
================== ABOUT MERGING DISCs ==============================
Then I tried Thomas Schmitt's merger script. Thanks Thomas Schmitt for
this script!
=== I ran this command to merge two DLBD isos ===
mkdir /cd1
mkdir /cd2
./merge_2_debian_isos debian-11.0.0-amd64-DLBD-1.iso /cd1
debian-11.0.0-amd64-DLBD-2.iso /cd2 merged.iso
=== Then use custom all-in-one iso as ground truth to compare them ===
mount -o loop,ro merged.iso /mnt
mount -o loop,ro debian-11.0.0-amd64-CUSTOM-1.iso /groundtruth
diff -q -r /mnt /groundtruth > diff.txt 2>&1
diff -r /mnt /groundtruth > diff.details.txt 2>&1
=== The result is like this ===
Files /mnt/.disk/cd_type and /groundtruth/.disk/cd_type differ
Files /mnt/.disk/info and /groundtruth/.disk/info differ
Files /mnt/.disk/mkisofs and /groundtruth/.disk/mkisofs differ
Files /mnt/README.html and /groundtruth/README.html differ
Files /mnt/README.txt and /groundtruth/README.txt differ
Files /mnt/boot/grub/efi.img and /groundtruth/boot/grub/efi.img differ
diff: /mnt/debian: recursive directory loop
Files /mnt/dists/bullseye/Release and
/groundtruth/dists/bullseye/Release differ
Files /mnt/dists/bullseye/contrib/binary-amd64/Packages.gz and
/groundtruth/dists/bullseye/contrib/binary-amd64/Packages.gz differ
Files /mnt/dists/bullseye/contrib/i18n/Translation-cs.gz and
[balabala]
Files /mnt/dists/bullseye/main/binary-amd64/Packages.gz and
/groundtruth/dists/bullseye/main/binary-amd64/Packages.gz differ
Files /mnt/dists/bullseye/main/debian-installer/binary-amd64/Packages.gz
and
/groundtruth/dists/bullseye/main/debian-installer/binary-amd64/Packages.gz
differ
Files /mnt/dists/bullseye/main/i18n/Translation-ca.gz and
/groundtruth/dists/bullseye/main/i18n/Translation-ca.gz differ
[balabala]
Files /mnt/dists/stable/Release and /groundtruth/dists/stable/Release differ
Files /mnt/dists/stable/contrib/binary-amd64/Packages.gz and
/groundtruth/dists/stable/contrib/binary-amd64/Packages.gz differ
Files /mnt/dists/stable/contrib/i18n/Translation-cs.gz and
/groundtruth/dists/stable/contrib/i18n/Translation-cs.gz differ
[balabala]
Files /mnt/dists/stable/main/binary-amd64/Packages.gz and
/groundtruth/dists/stable/main/binary-amd64/Packages.gz differ
Files /mnt/dists/stable/main/debian-installer/binary-amd64/Packages.gz
and
/groundtruth/dists/stable/main/debian-installer/binary-amd64/Packages.gz
differ
Files /mnt/dists/stable/main/i18n/Translation-ca.gz and
/groundtruth/dists/stable/main/i18n/Translation-ca.gz differ
[balabala]
Only in /groundtruth/firmware:
arm-trusted-firmware-tools_2.4+dfsg-2_amd64.deb
Only in /groundtruth/firmware: firm-phoenix-ware_4.7.5+repack-1_all.deb
Only in /groundtruth/firmware:
firmware-microbit-micropython-dl_1.2.4+dfsg-8_all.deb
Only in /groundtruth/firmware:
firmware-microbit-micropython-doc_1.0.1-2_all.deb
Only in /groundtruth/firmware: firmware-microbit-micropython_1.0.1-2_all.deb
Only in /groundtruth/firmware: firmware-tomu_2.0~rc7-2_all.deb
Only in /groundtruth/firmware: gnome-firmware_3.36.0-1_amd64.deb
Files /mnt/isolinux/boot.cat and /groundtruth/isolinux/boot.cat differ
Files /mnt/isolinux/f1.txt and /groundtruth/isolinux/f1.txt differ
Files /mnt/isolinux/isolinux.bin and /groundtruth/isolinux/isolinux.bin
differ
Files /mnt/md5sum.txt and /groundtruth/md5sum.txt differ
Most differs come from READMEs, and dist/ directory. ( I haven't tried
advance features of merger script yet, I will try it later)
The further details is in the attached file. I will try to analysis it.
(For size reasons, lines with md5 in it is filtered out by "sed -i -E -e
'/[a-f0-9]{32,32}/d' diff.details.txt")
Best Regards,
Zhang Boyang