simple-cdd-0.3.14/0000755000000000000000000000000011532015736010511 5ustar simple-cdd-0.3.14/FAQ0000644000000000000000000000352211272507072011045 0ustar Frequently asked questions (Q:) and answers (A:) for simple-cdd. Q: the image I'm generating with simple-cdd is always giving me "no kernel modules were found" A: this is likely a problem with debian-cd's debian-installer tasks specifying an old kernel version. to work around it, you may have to use a customized debian-cd dir, or specify additional customzed "includes" in simple-cdd.conf Q: i get warnings about 'cannot find md5sum.textutils' A: your distribution probably no longer had md5sum.textutils, hopefully the standard md5sum utility will work. edit debian-cd/Makefile: md5sum=/usr/bin/md5sum Q: how do i set up a custom debian-cd dir? A: you simply need to copy the debian-cd dir to somewhere, and edit whatever files you need to customize. this will not be updated if you install a new version of debian-cd- you will have to update your custom debian-cd directory yourself. cp -a /usr/share/debian-cd ~/my-debian-cd in simple-cdd.conf: debian_cd_dir="~/my-debian-cd" Q: i get lot's of messages like this: Link from /home/vagrant/simple-cdd/mirror//pool/main/l/links/links_0.99+1.00pre12-1_i386.deb to /home/vagrant/simple-cdd/tmp//sarge-i386/CD1/pool/main/l/links/links_0.99+1.00pre12-1_i386.deb failed: No such file or directory A: not totally sure about these, but it's always been packages i didn't want or need anyways, and hasn't caused me any trouble. i think it *might* be because debian-cd is trying to include all the packages from a particular source package on the same CD, or certain packages on the first CD. Q: can i default to using a MTA other than exim4, such as postfix? A: you can include other MTAs on the CD, but by default, it is difficult to avoid installing exim4. simply installing another MTA should remove exim4, so if you include it in one of the profile's .packages, you should end up with the MTA you want. simple-cdd-0.3.14/profiles/0000755000000000000000000000000011532014000012313 5ustar simple-cdd-0.3.14/profiles/x-basic.downloads0000644000000000000000000000007111272507072015574 0ustar # provides "not+sparc" dependency for xorg type-handling simple-cdd-0.3.14/profiles/default.udebs0000644000000000000000000000006511272507072015005 0ustar # the udeb needed for simple-cdd simple-cdd-profiles simple-cdd-0.3.14/profiles/default.downloads0000644000000000000000000000120211272507072015667 0ustar # keep grub or debian-installer may not work properly. grub popularity-contest localization-config console-tools usbutils acpi acpid eject # needed for debian-installer's LVM, software RAID or encrypted disks: lvm2 mdadm cryptsetup # to support reiserfs, JFS and XFS filesystems reiserfsprogs jfsutils xfsprogs # type-handling tiny package needed for xorg on most architectures type-handling # debian-cd uses debootstrap from the mirror debootstrap # initramfs-tools recommends busybox, and we don't yet support recommends busybox # newer debian-cd (0.3.5+) requires syslinux-common or syslinux in the mirror syslinux-common syslinux simple-cdd-0.3.14/profiles/router.preseed0000644000000000000000000000152111406772741015232 0ustar #arno-iptables-firewall arno-iptables-firewall/config-ext-if string eth0 arno-iptables-firewall arno-iptables-firewall/dynamic-ip boolean true arno-iptables-firewall arno-iptables-firewall/config-int-if string br0 arno-iptables-firewall arno-iptables-firewall/config-int-net string 192.168.99.0/24 arno-iptables-firewall arno-iptables-firewall/nat boolean true arno-iptables-firewall arno-iptables-firewall/config-int-nat-net string 192.168.99.0/24 arno-iptables-firewall arno-iptables-firewall/icmp-echo boolean false arno-iptables-firewall arno-iptables-firewall/services-udp string arno-iptables-firewall arno-iptables-firewall/services-tcp string arno-iptables-firewall arno-iptables-firewall/restart boolean true arno-iptables-firewall arno-iptables-firewall/debconf-wanted boolean true simple-cdd-0.3.14/profiles/router.description0000644000000000000000000000005511272507072016121 0ustar simple NAT router, firewall, and DHCP server simple-cdd-0.3.14/profiles/vserver.preseed0000644000000000000000000000011411272507072015375 0ustar base-installer base-installer/kernel/image select linux-image-vserver-686 simple-cdd-0.3.14/profiles/test.preseed0000644000000000000000000000157111272507072014670 0ustar d-i time/zone select US/Pacific passwd passwd/root-password password fg passwd passwd/root-password-again password fg passwd passwd/make-user boolean false d-i partman-auto/init_automatically_partition select Guided - use entire disk d-i partman-auto/choose_recipe select All files in one partition (recommended for new users) d-i partman/confirm_write_new_label boolean true d-i partman/choose_partition select Finish partitioning and write changes to disk d-i partman/confirm boolean true partman-auto partman-auto/purge_lvm_from_device boolean true base-config apt-setup/security-updates boolean false d-i popularity-contest/participate boolean false # Use a network mirror? apt-mirror-setup apt-setup/use_mirror boolean false # set to empty to avoid using security, volatile, etc. d-i apt-setup/services-select multiselect simple-cdd-0.3.14/profiles/ltsp.downloads0000644000000000000000000000007611352503544015234 0ustar ltsp-client xorg udev ltsp-server-standalone linux-image-486 simple-cdd-0.3.14/profiles/ltsp.preseed0000644000000000000000000000102711352503630014662 0ustar ltsp-client-builder ltsp-client-builder/build-client-opts string --mirror file:///cdrom --security-mirror none --accept-unsigned-packages --mount-cdrom ltsp-client-builder ltsp-client-builder/run boolean true #ltsp-client-builder ltsp-client-builder/configure_network_interface boolean true #ltsp-client-builder ltsp-client-builder/ltsp_update_image boolean true #ltsp-client-builder ltsp-client-builder/server_packages string ltsp-server # ignore annoying note: dhcp3-server dhcp3-server/new_auth_behavior note simple-cdd-0.3.14/profiles/router.packages0000644000000000000000000000005411406772517015362 0ustar arno-iptables-firewall dnsmasq bridge-utils simple-cdd-0.3.14/profiles/vserver.downloads0000644000000000000000000000005411407334665015751 0ustar linux-image-vserver-686 vserver-debiantools simple-cdd-0.3.14/profiles/vserver.packages0000644000000000000000000000004411272507072015526 0ustar util-vserver debootstrap libc6-i686 simple-cdd-0.3.14/profiles/ltsp.description0000644000000000000000000000005711272507072015565 0ustar Linux Terminal Server Project: http://ltsp.org simple-cdd-0.3.14/profiles/ltsp.postinst0000755000000000000000000000036111272507072015126 0ustar #!/bin/sh # configure NFS echo '/opt/ltsp *(ro,no_root_squash,async)' >> /etc/exports # configure DHCP (disabled by default, so as not to interfere with existing # networks) #echo 'include "/etc/ltsp/dhcpd.conf";' >> /etc/dhcp3/dhcpd.conf simple-cdd-0.3.14/profiles/ltsp.udebs0000644000000000000000000000002411272507072014336 0ustar ltsp-client-builder simple-cdd-0.3.14/profiles/test.postinst0000755000000000000000000000215611532014000015106 0ustar #!/bin/sh grubmenu=/boot/grub/menu.lst if [ -f "$grubmenu" ]; then # tweak grub to support serial console sed -i -e 's,^serial.*,serial --unit=0 --speed=38400,g' $grubmenu # force serial console only: #sed -i -e 's/ro$/ro console=ttyS0,38400/g' $grubmenu if egrep -q ^terminal $grubmenu ; then # add terminal entry if not present echo terminal console >> $grubmenu fi # enable both console and serial terminal sed -i -e 's,^terminal.*,terminal --timeout=5 console serial,g' $grubmenu update-grub fi grub2default=/etc/default/grub if [ -f "$grub2default" ]; then grub_pc_version=$(dpkg -l grub-pc | awk '/^ii/{print $3}') || true # disable graphical console for grub2: if [ -n "$grub_pc_version" ] && dpkg --compare-versions "$grub_pc_version" ge "1.98+20100527-1" ; then # enable both serial and regular console if newer version of grub. echo GRUB_TERMINAL=\'serial console\' >> $grub2default else # use regular console only echo GRUB_TERMINAL=console >> $grub2default fi # ensure the updates go live update-grub fi simple-cdd-0.3.14/profiles/vserver.description0000644000000000000000000000005711272507072016277 0ustar Linux Virtual Server: http://linux-vserver.org simple-cdd-0.3.14/profiles/vserver.conf0000644000000000000000000000006111272507072014674 0ustar export kernel_packages="linux-image-vserver-686" simple-cdd-0.3.14/profiles/x-basic.packages0000644000000000000000000000035511272507072015365 0ustar # window manager icewm # x-teminal-emulator rxvt-unicode # menus up to date menu # login manager xdm # includes startx xbase-clients # X xorg # workaround http://bugs.debian.org/405639 xserver-xorg-input-all xserver-xorg-video-all simple-cdd-0.3.14/profiles/router.postinst0000755000000000000000000000106711407013655015467 0ustar #!/bin/sh # configure dnsmasq to serve up DHCP echo dhcp-range=192.168.99.20,192.168.99.250,1h >> /etc/dnsmasq.conf # configure a bridge on the dummy interface, with comments of how to add other # interfaces cat << EOF >> /etc/network/interfaces auto br0 iface br0 inet static address 192.168.99.1 netmask 255.255.255.0 bridge_ports dummy0 up ifconfig dummy0 up # edit and uncomment the following entries, replacing eth1 with your internal # network interface: # #up ifconfig eth1 up #up brctl addif br0 eth1 #down brctl delif br0 eth1 #down ifconfig eth1 down EOF simple-cdd-0.3.14/profiles/default.preseed0000644000000000000000000001574011272507072015340 0ustar # these are the basic debconf pre-seeding items needed for a miminal # interaction debian etch install using debian-installer # this example pre-seeding file was largely based on # http://d-i.alioth.debian.org/manual/example-preseed.txt # # for more explanation of the options, see: # http://d-i.alioth.debian.org/manual/en.mips/apbs04.html ## simple-cdd options # automatically select simple-cdd profiles # NOTE: profile "default" is now automatically included, and should not be # specified here. #simple-cdd simple-cdd/profiles multiselect ltsp #simple-cdd simple-cdd/profiles multiselect ltsp, x-basic ###### Package selection. # You can choose to install any combination of tasks that are available. # Available tasks as of this writing include: Desktop environment, # Web server, Print server, DNS server, File server, Mail server, # SQL database, manual package selection. The last of those will run # aptitude. You can also choose to install no tasks, and force the # installation of a set of packages in some other way. # don't install any tasks tasksel tasksel/first multiselect #tasksel tasksel/first multiselect Desktop environment #tasksel tasksel/first multiselect Web server, Mail server, DNS server ###### Time zone setup. # Controls whether or not the hardware clock is set to UTC. d-i clock-setup/utc boolean true # Many countries have only one time zone. If you told the installer you're # in one of those countries, you can choose its standard time zone via this # question. base-config tzconfig/choose_country_zone_single boolean true #d-i time/zone select US/Pacific ### keyboard configuration # don't mess with the keymap console-common console-data/keymap/policy select Don't touch keymap console-data console-data/keymap/policy select Don't touch keymap # keyboard layouts #console-data console-data/keymap/qwerty/layout select US american #console-data console-data/keymap/family select qwerty #console-common console-data/keymap/family select qwerty ###### Account setup. # To preseed the root password, you have to put it in the clear in this # file. That is not a very good idea, use caution! #passwd passwd/root-password password r00tme #passwd passwd/root-password-again password r00tme # If you want to skip creation of a normal user account. #passwd passwd/make-user boolean false # Alternatively, you can preseed the user's name and login. #passwd passwd/user-fullname string Debian User #passwd passwd/username string debian # And their password, but use caution! #passwd passwd/user-password password insecure #passwd passwd/user-password-again password insecure #### Network configuration. # netcfg will choose an interface that has link if possible. This makes it # skip displaying a list if there is more than one interface. d-i netcfg/choose_interface select auto # Note that any hostname and domain names assigned from dhcp take # precidence over values set here. However, setting the values still # prevents the questions from being shown even if values come from dhcp. d-i netcfg/get_hostname string unassigned d-i netcfg/get_domain string unassigned # to set the domain to empty: #d-i netcfg/get_domain string # Disable that annoying WEP key dialog. d-i netcfg/wireless_wep string ### Partitioning. # you can specify a disk to partition. The device name can be given in either # devfs or traditional non-devfs format. For example, to use the first disk # devfs knows of: ## NOTE: disabled for lenny, as it seemed to cause issues #d-i partman-auto/disk string /dev/discs/disc0/disc # In addition, you'll need to specify the method to use. # The presently available methods are: "regular", "lvm" and "crypto" d-i partman-auto/method string regular # If one of the disks that are going to be automatically partitioned # contains an old LVM configuration, the user will normally receive a # warning. This can be preseeded away... #d-i partman-auto/purge_lvm_from_device boolean true # And the same goes for the confirmation to write the lvm partitions. #d-i partman-lvm/confirm boolean true # Alternately, If the system has free space you can choose to only partition # that space. #d-i partman-auto/init_automatically_partition select Use the largest continuous free space #d-i partman-auto/init_automatically_partition select Guided - use entire disk # You can choose from any of the predefined partitioning recipes: d-i partman-auto/choose_recipe select All files in one partition (recommended for new users) #d-i partman-auto/choose_recipe select Desktop machine #d-i partman-auto/choose_recipe select Multi-user workstation # uncomment the following three values to makes partman automatically partition # without confirmation. #d-i partman/confirm_write_new_label boolean true d-i partman/choose_partition select Finish partitioning and write changes to disk #d-i partman/confirm boolean true #### Boot loader installation. # This is fairly safe to set, it makes grub install automatically to the MBR # if no other operating system is detected on the machine. d-i grub-installer/only_debian boolean true # This one makes grub-installer install to the MBR if if finds some other OS # too, which is less safe as it might not be able to boot that other OS. d-i grub-installer/with_other_os boolean true ###### Apt setup. # automatically set the CD as the installation media. #base-config apt-setup/uri_type select http #base-config apt-setup/uri_type select cdrom # only scan the first CD by default #base-config apt-setup/cd/another boolean false # don't ask to use additional mirrors #base-config apt-setup/another boolean false # Use a network mirror? # apt-mirror-setup apt-setup/use_mirror boolean false # Do enable security updates. #base-config apt-setup/security-updates boolean true # You can choose to install non-free and contrib software. #d-i apt-setup/non-free boolean true #d-i apt-setup/contrib boolean true ###### Mailer configuration. # During a normal install, exim asks only two questions. Here's how to # avoid even those. More complicated preseeding is possible. exim4-config exim4/dc_eximconfig_configtype select no configuration at this time # It's a good idea to set this to whatever user account you choose to # create. Leaving the value blank results in postmaster mail going to # /var/mail/mail. exim4-config exim4/dc_postmaster string ### skip some annoying installation status notes # Avoid that last message about the install being complete. d-i finish-install/reboot_in_progress note # Avoid the introductory message. base-config base-config/intro note # Avoid the final message. base-config base-config/login note #d-i popularity-contest/participate boolean false ### simple-cdd commands # you may add to the following commands by including a ";" followed by your # shell commands. # loads the simple-cdd-profiles udeb to which asks for which profiles to use, # load the debconf preseeding and queue packages for installation. d-i preseed/early_command string anna-install simple-cdd-profiles simple-cdd-0.3.14/profiles/x-basic.description0000644000000000000000000000007011272507072016124 0ustar very basic X.org system with window manager and console simple-cdd-0.3.14/profiles/test.conf0000644000000000000000000000040611412250062014150 0ustar BOOT_TIMEOUT=50 locale="en_US" keyboard=us use_qemu="true" force_preseed="true" auto_profiles="$auto_profiles test" KERNEL_PARAMS="$KERNEL_PARAMS DEBIAN_FRONTEND=text fb=false vga=normal" vga_normal="true" qemu_opts="-curses -no-reboot" #use_serial_console=true simple-cdd-0.3.14/profiles/default.packages0000644000000000000000000000003611272507072015457 0ustar # less is more intuituve less simple-cdd-0.3.14/profiles/ltsp.packages0000644000000000000000000000006111272507072015013 0ustar ltsp-server openssh-server nbd-server x11-common simple-cdd-0.3.14/tools/0000755000000000000000000000000011272507072011651 5ustar simple-cdd-0.3.14/tools/mirror/0000755000000000000000000000000011523116320013152 5ustar simple-cdd-0.3.14/tools/mirror/rsync0000644000000000000000000000031111272507072014237 0ustar mkdir -p $MIRROR # download files for file in $mirror_files ; do case $file in */) mkdir -p $MIRROR/$file esac rsync -avP $rsync_debian_mirror/$file $MIRROR/$file sleep 1 done simple-cdd-0.3.14/tools/mirror/wget0000644000000000000000000000051311423615471014054 0ustar mkdir -p $MIRROR wget_file_list="" for file in $mirror_files ; do wget_file_list="$wget_file_list $wget_debian_mirror/$file" done cut_dirs=$(echo -n "$wget_debian_mirror" | sed -e 's:/$::' -e 's://::' -e 's:[^/]::g' | wc -m) # download files wget -c -N -nv --no-parent -nH --cut-dirs=$cut_dirs -r $wget_file_list -P $MIRROR simple-cdd-0.3.14/tools/mirror/debpartial-mirror0000644000000000000000000001447411272507072016537 0ustar debpartial_conf_old(){ # generates debpartial-mirror.conf # compatible with versions 0.2.8 - 0.2.11 # TODO check if variables used in conf file generation are set. echo [mirror] > $debpartial_conf echo server=$debian_mirror >> $debpartial_conf echo local_directory=$MIRROR >> $debpartial_conf echo files=$mirror_files >> $debpartial_conf echo get_suggests=false >> $debpartial_conf # NOTE spelling mistake is intentional- debpartial-mirror uses it. echo get_recomends=false >> $debpartial_conf echo get_provides=false >> $debpartial_conf echo archs=$ARCH >> $debpartial_conf echo [$CODENAME] >> $debpartial_conf # use '' to prevent shell expansion echo filter=$debpartial_filter >> $debpartial_conf echo include-task=$TASK >> $debpartial_conf } debpartial_conf_old_security(){ # generates debpartial-mirror.conf # compatible with versions 0.2.8 - 0.2.11 # TODO check if variables used in conf file generation are set. echo [mirror] > $debpartial_conf_security echo server=$security_mirror >> $debpartial_conf_security echo local_directory=$SECURITY >> $debpartial_conf_security echo get_suggests=false >> $debpartial_conf_security # NOTE spelling mistake is intentional- debpartial-mirror uses it. echo get_recomends=false >> $debpartial_conf_security echo get_provides=false >> $debpartial_conf_security echo archs=$ARCH >> $debpartial_conf_security echo [$CODENAME/updates] >> $debpartial_conf_security echo filter=$debpartial_filter_security >> $debpartial_conf_security echo include-task=$TASK >> $debpartial_conf_security } debpartial_conf_old_extra(){ # generates debpartial-mirror.conf # compatible with versions 0.2.8 - 0.2.11 # TODO check if variables used in conf file generation are set. echo [mirror] > $debpartial_conf_extra echo server=$debian_mirror_extra >> $debpartial_conf_extra echo local_directory=$MIRROR/extra-mirror >> $debpartial_conf_extra echo get_suggests=false >> $debpartial_conf_extra # NOTE spelling mistake is intentional- debpartial-mirror uses it. echo get_recomends=false >> $debpartial_conf_extra echo get_provides=false >> $debpartial_conf_extra echo archs=$ARCH >> $debpartial_conf_extra echo [$CODENAME] >> $debpartial_conf_extra echo filter=$debpartial_filter_extra >> $debpartial_conf_extra echo include-task=$TASK >> $debpartial_conf_extra } debpartial_conf_new(){ # generate debpartial-mirror.conf for versions 0.2.90+ echo [GLOBAL] > $debpartial_conf echo mirror_dir=$MIRROR >> $debpartial_conf echo get_suggests=false >> $debpartial_conf echo get_recommends=false >> $debpartial_conf echo get_provides=false >> $debpartial_conf echo get_sources=false >> $debpartial_conf echo get_packages=true >> $debpartial_conf echo architectures=$ARCH >> $debpartial_conf echo distributions=$CODENAME >> $debpartial_conf echo components=$debpartial_components >> $debpartial_conf echo [$CODENAME] >> $debpartial_conf echo server=$debian_mirror >> $debpartial_conf echo files=$mirror_files >> $debpartial_conf echo filter = $debpartial_filter_new include-from:$TASK >> $debpartial_conf if [ -n "$security_mirror" ]; then # TODO: export only if the DIR exists, after doing a debpartial-mirror run? # tell debian-cd to get security updates export SECURITY="$MIRROR/$CODENAME-security" # configure debpartial-mirror to grab security updates echo [$CODENAME-security] >> $debpartial_conf echo distributions=$CODENAME/updates >> $debpartial_conf test -z "$debpartial_components_security" && debpartial_components_security="main" echo components=$debpartial_components_security >> $debpartial_conf echo server=$security_mirror >> $debpartial_conf echo filter = $debpartial_filter_new include-from:$TASK >> $debpartial_conf echo resolve_deps_using = $CODENAME >> $debpartial_conf fi if [ -n "$debian_mirror_extra" ]; then echo [extra-mirror] >> $debpartial_conf echo server=$debian_mirror_extra >> $debpartial_conf test -z "$debpartial_components_extra" && debpartial_components_extra="main" echo components=$debpartial_components_extra >> $debpartial_conf echo filter = $debpartial_filter_new include-from:$TASK >> $debpartial_conf echo resolve_deps_using = $CODENAME >> $debpartial_conf echo [merged-mirror] >> $debpartial_conf echo backends = $CODENAME extra-mirror >> $debpartial_conf export MIRROR="$MIRROR/merged-mirror" fi } test -z "$debpartial_conf" && debpartial_conf=debpartial-mirror.conf test -r "$debpartial_conf" && cp -f $debpartial_conf $debpartial_conf.bak debpartial_version="$(debpartial-mirror -v | head -n 1 | awk '{print $2}')" # TODO compare versions with something more common than dpkg ? if dpkg --compare-versions "$debpartial_version" lt 0.2.90 ; then debpartial_conf_old debpartial-mirror -c $debpartial_conf if [ -n "$security_mirror" ]; then debpartial_conf_security="$debpartial_conf.security" test -r "$debpartial_conf_security" && cp -f $debpartial_conf_security $debpartial_conf_security.bak export SECURITY="$MIRROR/$CODENAME-security/" debpartial_conf_old_security debpartial-mirror -c $debpartial_conf_security fi if [ -n "$debian_mirror_extra" ]; then debpartial_conf_extra="$debpartial_conf.extra" test -r "$debpartial_conf_extra" && cp -f $debpartial_conf_extra $debpartial_con_extra.bak debpartial_conf_old_extra debpartial-mirror -c $debpartial_conf_extra # FIXME: somehow, get debian-cd to include this archive fi else debpartial_conf_new for opt in update upgrade ; do debpartial-mirror -c $debpartial_conf $opt done # make symlinks for pool and dists directories if [ -d "$MIRROR/$CODENAME" ]; then MIRROR="$MIRROR/$CODENAME" echo "re-setting mirror for new debpartial-mirror dir: $MIRROR" else echo "ERROR: could not find mirror: $MIRROR" exit 1 fi fi simple-cdd-0.3.14/tools/mirror/reprepro0000644000000000000000000001534611523115705014752 0ustar mkdir -p $MIRROR generate_distributions(){ updates="default default-base default-udebs" if [ -n "$security_mirror" ]; then updates="$updates default-security" fi if [ -n "$debian_mirror_extra" ]; then updates="$updates default-extra" fi if [ "true" = "$proposed_updates" ]; then updates="$updates default-proposed-updates" fi if [ -n "$profiles_udeb_dist" ]; then updates="$updates default-profiles-udeb" fi if [ -n "$extra_udeb_dist" ]; then updates="$updates default-extra-udebs" fi if [ "true" = "$backports" ]; then updates="$updates default-backports" fi cat << EOF > $conf/distributions Codename: $CODENAME Architectures: $ARCHES Components: $mirror_components UDebComponents: main Description: mirror for $CODENAME Update: $updates Suite: ${SUITE:-"stable"} EOF if [ "$CODENAME" != "$DI_CODENAME" ]; then cat << EOF >> $conf/distributions Codename: $DI_CODENAME Architectures: $ARCHES Components: $mirror_components UDebComponents: main Description: mirror for $CODENAME Update: default-udebs Suite: ${SUITE:-"stable"} EOF fi } generate_updates(){ cat << EOF > $conf/updates Name: default Suite: * UDebComponents: Method: $debian_mirror FilterList: deinstall package-list VerifyRelease: ${verify_release_keys} Name: default-base Suite: * UDebComponents: Method: $debian_mirror FilterFormula: priority (== required) | priority (== important) | priority (== standard) VerifyRelease: ${verify_release_keys} Name: default-udebs Suite: * Components: Method: $debian_mirror VerifyRelease: ${verify_release_keys} EOF if [ -n "$security_mirror" ]; then cat << EOF >> $conf/updates Name: default-security Suite: */updates UDebComponents: Method: $security_mirror FilterList: deinstall package-list VerifyRelease: ${verify_release_keys} EOF fi if [ -n "$debian_mirror_extra" ]; then cat << EOF >> $conf/updates Name: default-extra Suite: * Components: $mirror_components_extra UDebComponents: Method: $debian_mirror_extra FilterList: deinstall package-list VerifyRelease: ${verify_release_keys} EOF fi if [ "true" = "$proposed_updates" ]; then cat << EOF >> $conf/updates Name: default-proposed-updates Suite: $CODENAME-proposed-updates UDebComponents: main Method: $debian_mirror FilterList: deinstall package-list VerifyRelease: ${verify_release_keys} EOF fi if [ -n "$profiles_udeb_dist" ]; then cat << EOF >> $conf/updates Name: default-profiles-udeb Suite: $profiles_udeb_dist Components: FilterFormula: package (== simple-cdd-profiles) Method: $debian_mirror VerifyRelease: ${verify_release_keys} EOF fi if [ -n "$extra_udeb_dist" ]; then cat << EOF >> $conf/updates Name: default-extra-udebs Suite: $extra_udeb_dist Components: Method: $debian_mirror VerifyRelease: ${verify_release_keys} EOF if [ -n "$extra_udeb_dist_packages" ]; then p_line="" for p in $extra_udeb_dist_packages ; do if [ -z "$p_line" ]; then p_line="package (== $p)" else p_line="package (== $p) | $p_line" fi done if [ -n "$p_line" ]; then cat << EOF >> $conf/updates FilterFormula: $p_line EOF fi fi echo >> $conf/updates fi if [ "true" = "$backports" ]; then test -z "$backports_mirror" && backports_mirror="http://backports.org/debian" touch $conf/backports-packages for package in $backports_packages ; do echo $package install done | sort -u > $conf/backports-packages cat << EOF >> $conf/updates Name: default-backports Suite: $CODENAME-backports UDebComponents: main Method: $backports_mirror FilterList: deinstall backports-packages VerifyRelease: ${verify_release_keys} EOF fi } export REPREPRO_BASE_DIR=$MIRROR conf=$MIRROR/conf mkdir -p $conf generate_distributions generate_updates touch $conf/package-list test -z "$reprepro_opts" && reprepro_opts="-V" # include local packages into the mirror if [ -n "$local_packages" ]; then for p in $(find $local_packages -type f); do case $p in *.deb) reprepro $reprepro_opts --ignore=wrongdistribution includedeb $CODENAME $p ;; *.udeb) reprepro $reprepro_opts --ignore=wrongdistribution includeudeb $CODENAME $p if [ "$CODENAME" != "$DI_CODENAME" ]; then reprepro $reprepro_opts --ignore=wrongdistribution includeudeb $DI_CODENAME $p fi ;; *) echo "unknown package type: $p" ;; esac done fi reprepro $reprepro_opts --noskipold update # attempt to resolve dependencies test -z "$reprepro_retries" && reprepro_retries="20" package_lists="" for a in $ARCHES ; do for component in $mirror_components ; do package_lists="$package_lists $MIRROR/dists/$CODENAME/$component/binary-$a/Packages" upstream_package_lists="$upstream_package_lists $MIRROR/lists/${CODENAME}_default_deb_${component}_${a}" done done # get a list of provides provides="$(zgrep ^Provides $upstream_package_lists | cut -d : -f 2 | tr ',' '\n' | sort -u)" for i in $(seq $reprepro_retries); do cp $conf/package-list $conf/package-list.old dependencies="$(awk -F Depends: '/Depends:/{print $2}' $package_lists | tr '|,' '\n' | awk '{print $1}' | sort -u)" if [ "$NORECOMMENDS" != "1" ]; then recommends="$(awk -F Recommends: '/Recommends:/{print $2}' $package_lists | tr '|,' '\n' | awk '{print $1}' | sort -u)" fi provide_dependencies="$(providecheck "$provides" "$all_packages $dependencies" | sort -u)" if [ -n "$provide_dependencies" ]; then for p in $provide_dependencies ; do # see if a package already satisfies the provides satisfies="$(grep-dctrl -n --show-field Package --field Provides --field Package $p $package_lists)" if [ -z "$satisfies" ]; then # search for other packages that provide the desired features dependencies="$dependencies $(zcat $upstream_package_lists | grep-dctrl -n --show-field Package --field Provides $p)" fi done fi for p in $dependencies $recommends $all_packages ; do echo $p install done | sort -u > $conf/package-list if diff -q $conf/package-list $conf/package-list.old ; then echo "no new dependencies, finished in $i attempts." break else echo "getting missing dependencies... attempt $i" reprepro $reprepro_opts --nolistsdownload --noskipold update fi done if [ -x /usr/bin/edos-debcheck ] && [ -n "$package_lists" ]; then echo "checking for missing dependencies with edos-debcheck: $package_lists" cat $package_lists | edos-debcheck -failures -explain fi simple-cdd-0.3.14/tools/testing/0000755000000000000000000000000011532007632013322 5ustar simple-cdd-0.3.14/tools/testing/qemu0000644000000000000000000000432211523064300014210 0ustar # run qemu to install the system and boot the system with qemu. if [ -z "$qemu" ]; then case $ARCH in i386) qemu=qemu ;; amd64) qemu=qemu-system-x86_64 ;; powerpc) qemu=qemu-system-ppc ;; *) qemu=qemu-system-$ARCH ;; esac fi if [ -z "$(which $qemu)" ]; then qemu=kvm fi if [ -z "$(which $qemu)" ]; then echo "ERROR: qemu not installed: $qemu" exit 1 fi # set some defaults test -z "$hd_img" && hd_img="$simple_cdd_dir/qemu-test.hd.img" if [ -z "$cd_img" ]; then # check alternate locations for cd images... for x in $DEBVERSION $(echo $DEBVERSION | sed -e 's/[. ]//g'); do cd_img="$OUT/${CDNAME:-debian}-$x-$(echo $ARCHES | tr ' ' '-')-CD-1.iso" if [ -r "$cd_img" ]; then echo "found cd image: $cd_img" break fi done fi # detect if qemu/kvm support is available. if [ "false" != "$autodetect_kvm" ] && [ -c "/dev/kvm" ]; then case $(uname -r) in 2.6.[3-9][0-9]*) if $qemu -help | grep -q enable-kvm ; then echo "enabling kvm support..." qemu_opts="$qemu_opts -enable-kvm" fi ;; esac fi if [ "true" = "$use_serial_console" ]; then echo "enabling qemu's serial console..." qemu_opts="$qemu_opts -nographic" fi if [ -n "$mem" ]; then qemu_opts="$qemu_opts -m $mem" fi if [ -n "$hd_img" ] && [ -r "$hd_img" ]; then echo "using disk image: $hd_img" elif [ -n "$hd_img" ] && [ -n "$(which qemu-img)" ]; then test -z "$hd_size" && hd_size="4G" echo "creating $hd_size qemu disk image: $hd_img" qemu-img create -f qcow $hd_img $hd_size else echo "ERROR: hard drive image not readable: $hd_img" exit 1 fi if [ -r "$hd_img" ]; then qemu_opts="$qemu_opts -hda $hd_img" fi if [ -n "$cd_img" ] && [ -r "$cd_img" ]; then qemu_opts="$qemu_opts -cdrom $cd_img" else echo "ERROR: CD image not readable: $cd_img" exit 1 fi # boot the installer echo date echo "loading installer" $qemu $qemu_opts -boot d # take a break and start fresh sleep 5 reset # boot to the installed system echo date echo "initial boot" $qemu $qemu_opts -boot c simple-cdd-0.3.14/tools/build/0000755000000000000000000000000011411767512012752 5ustar simple-cdd-0.3.14/tools/build/debian-cd0000644000000000000000000001207411407347074014511 0ustar #= -*- Mode: shell-script -*- export PATH="$debian_cd_dir/tools:$PATH" # copy debian-cd files into working dir rsync --delete -aWHr $debian_cd_dir/. $BASEDIR/ # update the tasks files cd $BASEDIR/tasks for a in generate_di_list generate_di+k_list ; do ../tools/$a || echo "WARNING: $a failed." done cd $BASEDIR # if using non-official CODENAME, create links to emulate an existing codename. # http://bugs.debian.org/542241 if [ -n "$debian_cd_emulate_codename" ]; then for x in data/ tools/ tools/boot/ ; do link="$x/$CODENAME" if [ ! -e "$link" ]; then echo "Creating link from $debian_cd_emulate_codename to $link" ln -s $debian_cd_emulate_codename $link fi done fi echo "simple-cdd: Running debian-cd makefile" make distclean make status if [ -n "$EXCLUDE" ]; then mv $EXCLUDE $TDIR/$CODENAME/tasks/simple-cdd.exclude export EXCLUDE=simple-cdd.exclude fi # add include files to the task test -r "$TASK" && mv -f $TASK $TASK.bak for i in $includes ; do echo '#include <'"$i"'>' # ensure includes exist in the appropriate place if [ -f "$BASEDIR/tasks/$i" ]; then cp $BASEDIR/tasks/$i $TDIR/$CODENAME/tasks/ fi done | sort -u > $TASK # add all desired packages to the task for p in $all_packages ; do echo $p done | sort -u >> $TASK mv $TASK $TDIR/$CODENAME/tasks/simple-cdd.task make packagelists TASK=simple-cdd.task make image-trees isolinuxcfg="$TDIR/$CODENAME/boot1/isolinux/isolinux.cfg" if [ -f "$isolinuxcfg" ]; then if [ "true" = "$use_serial_console" ] && [ -n "$serial_console_speed" ]; then echo "SERIAL 0 $serial_console_speed 0" >> $isolinuxcfg fi if [ -n "$BOOT_TIMEOUT" ]; then sed -r -i -e "s,(TIMEOUT|timeout).*,TIMEOUT $BOOT_TIMEOUT,g" $isolinuxcfg fi fi # hack to ensure that vga=normal in KERNEL_PARAMS is respected, which may be # needed to use -curses with qemu/kvm. if [ "true" = "$vga_normal" ]; then sed -i -e 's,vga=788,vga=normal,g' $TDIR/$CODENAME/boot1/isolinux/*.cfg fi for dir in etc install ; do yabootconf="$TDIR/$CODENAME/CD1/$dir/yaboot.conf" if [ -f "$yabootconf" ]; then if [ -n "$KERNEL_PARAMS" ]; then # workaround for http://bugs.debian.org/416230 sed -i -e "s|append=\"|append=\"$KERNEL_PARAMS |g" $yabootconf fi if [ -n "$BOOT_TIMEOUT" ]; then echo timeout=$BOOT_TIMEOUT >> $yabootconf fi fi done extras_base_dir="$simple_cdd_temp/extras" if [ -n "$extras_base_dir" ] && [ -d "$extras_base_dir" ]; then echo "purging $extras_base_dir" rm -rf $extras_base_dir fi extras_dir="$extras_base_dir/simple-cdd" mkdir -p "$extras_dir" # copy some build information onto the CD mkdir -p "$extras_dir/.build-info/" echo $commandline_opts > $extras_dir/.build-info/commandline # TODO: copy configuration files in for p in $profiles $build_profiles ; do file="$(profile_files $p conf)" if [ -f "$file" ]; then cp $file $extras_dir/.build-info/ fi done all_extras="$all_extras $package_files $preseed_files $exclude_files" # copy files to extras directory for file in $all_extras ; do test -r "$file" && cp -f $file $extras_dir/ done # FIXME: include extra mirror in extras dir. # populate the choices file. for p in $profiles ; do if [ -z "$choices" ]; then choices="$p" else choices="$choices,$p" fi done for p in $default_profiles ; do if [ -z "$default_choices" ]; then default_choices="$p" else default_choices="$default_choices,$p" fi done if [ -n "$profiles" ]; then simple_cdd_template="$(find_files simple-cdd.templates)" if [ ! -f "$simple_cdd_template" ]; then echo "ERROR: cannot find simple-cdd.templates" exit 1 fi cat $simple_cdd_template | sed s/CHOICES/$choices/g | sed s/DEFAULTS/$default_choices/g | sed -e 's/,/, /g' > $extras_dir/simple-cdd.templates for p in $profiles ; do file="$(profile_files $p description)" if [ -f "$file" ]; then echo "including description: $file" echo " ." >> $extras_dir/simple-cdd.templates echo " $p: $(egrep -v ^# $file)" >> $extras_dir/simple-cdd.templates fi done fi echo simple-cdd: extra files for simple-cdd # TODO: use the hook mechanism of debian-cd to first indicate the # size that must be reserved and then copy the files at the appropriate time in # the process (see RESERVED_BLOCKS_HOOK and DISC_START_HOOK). The current # approach can overflow the media. cp -a $extras_base_dir/. $TDIR/$CODENAME/CD1 # check to make sure all the packages we want are present. CHECK_MIRROR="$TDIR/$CODENAME/CD1/pool" profiles="default $build_profiles $profiles" simple_cdd_dir="$simple_cdd_dir" check_not_requested="$check_not_requested" checkpackages || exit $? echo simple-cdd: image make image CD=1 if [ -x /usr/bin/edos-debcheck ]; then # check for missing dependencies with edos-debcheck, ignoring debian-installer files which are a little unusual for p in $(find $TDIR/$CODENAME/CD1/dists/ -name Packages | egrep -v debian-installer) ; do echo "checking for missing dependencies with edos-debcheck: $p" edos-debcheck -failures -explain < $p done fi simple-cdd-0.3.14/checkpackages0000755000000000000000000000615211272507072013217 0ustar #!/usr/bin/python # check for missing packages in mirrors # copyright 2006 Vagrant Cascadian , distributed under # the terms of the GNU General Public License version 2 or any later version. # this expects three environment variables to be set: # CHECK_MIRROR: a space separated list of mirror locations to check # profiles: a space separated list of profiles to be included # simple_cdd_dir: directory where simple-cdd is being build # TODO: refactor with functions for duplicated code import os import sys mirrors=os.environ.get('CHECK_MIRROR') profiles=os.environ.get('profiles').split() simple_cdd_dir=os.environ.get('simple_cdd_dir') x=os.popen("find %s -type f -name '*.deb' -o -name '*.udeb' | sed -e 's,.*/,,g' -e 's,_.*,,g'" % mirrors) y=x.readlines() x.close() available_packages=list() for p in y: available_packages.append(p.rstrip()) missing_required_packages=list() def check_missing_packages(packagelist, available_packages): missing=list() x=file(packagelist) y=x.readlines() x.close() for line in y: if not line.startswith('#') and not line.startswith('\n'): p=line.rstrip() if available_packages.count(p) < 1: missing.append(p) return missing def get_missing_packages (packagelist, alt_packagelist, available_packages): if os.path.exists(packagelist): return check_missing_packages(packagelist, available_packages) elif os.path.exists(alt_packagelist): return check_missing_packages(alt_packagelist, available_packages) def report_missing_packages (profile, packages, packagetype): m='' if packagetype == 'required': errortype='ERROR' else: errortype='WARNING' for p in packages: m=m + ' ' + p print '%s: missing %s packages from profile %s: %s' % (errortype, packagetype, profile, m) for profile in profiles: missing_profile_packages=list() missing_profile_downloads=list() profile_base=simple_cdd_dir+'/profiles/'+profile alt_profile_base='/usr/share/simple-cdd/profiles/'+profile missing_profile_packages=get_missing_packages(profile_base+'.packages', alt_profile_base+'.packages', available_packages) missing_profile_downloads=get_missing_packages(profile_base+'.downloads', alt_profile_base+'.downloads', available_packages) missing_profile_udebs=get_missing_packages(profile_base+'.udebs', alt_profile_base+'.udebs', available_packages) if missing_profile_packages: missing_required_packages.extend(missing_profile_packages) report_missing_packages(profile, missing_profile_packages, 'required') if missing_profile_udebs: missing_required_packages.extend(missing_profile_udebs) report_missing_packages(profile, missing_profile_udebs, 'required') if missing_profile_downloads: warn='optional' if os.environ.get('require_optional_packages') == "true": missing_required_packages.extend(missing_profile_downloads) warn='required' report_missing_packages(profile, missing_profile_downloads, warn) if missing_required_packages: sys.exit(1) sys.exit(0) simple-cdd-0.3.14/providecheck0000755000000000000000000000033611272507072013107 0ustar #!/usr/bin/python # given two lists, output entries in both lists import sys provides=sys.argv[1].split() packages=sys.argv[2].split() for package in packages: if provides.count(package) > 0: print package simple-cdd-0.3.14/simple-cdd.10000644000000000000000000000413111272507072012613 0ustar .TH SIMPLE-CDD 1 "Oct 28th, 2007" .SH NAME simple-cdd \- create custom debian-installer CDs .SH SYNOPSIS .B simple-cdd .RI [ options ] .br .SH OPTIONS .TP \fB\-\-conf\fR Specify a configuration file .TP \fB\-\-dist\fR Specify a distribution (etch, lenny, sid) .TP \fB\-\-graphical\-installer\fR|\-g Enable graphical installer by default .TP \fB\-\-serial\-console\fR|\-s Set defaults for serial console .TP \fB\-\-do\-mirror\fR Generate a local mirror .TP \fB\-\-no\-do\-mirror\fR Do not generate a local mirror .TP \fB\-\-profiles\fR|\-p Select profiles (Examples in /usr/share/simple-cdd/profiles/ directory) .TP \fB\-\-build\-profiles\fR|\-b Profiles only used while building the CD .TP \fB\-\-auto\-profiles\fR|\-a Pre\-select and automatically install these profiles .TP \fB\-\-local\-packages\fR List of packages to be included on CD's local package repository .TP \fB\-\-locale\fR Select locale (language and country) .TP \fB\-\-keyboard\fR Select keyboard (console\-keymaps\-at/keymap debconf question) .TP \fB\-\-debian\-mirror\fR Specify debian mirror (The default is: ftp://ftp.us.debian.org/debian) .TP \fB\-\-security\-mirror\fR Specify securty mirror (The default is: http://security.debian.org/) .TP \fB\-\-mirror\-tools\fR List the mirror tools to be used (The defaults are both wget and reprepro) .TP \fB\-\-kernel\-packages\fR List of kernel packages to be included on the CD .TP \fB\-\-help\fR|\-h Display the usage message .TP \fB\-\-qemu\fR|\-q Use qemu to test the built image .TP \fB\-\-force\-preseed\fR Only issue a warning if a preseeding file is invalid .TP \fB\-\-profiles\-udeb\-dist\fR Specify distribution to pull simple-cdd-profiles udeb from .TP \fB\-\-extra\-udeb\-dist\fR Specify additional distribution to pull udebs from .SH EXAMPLES .TP simple-cdd \-\-profiles x-basic \-g Build a custom image using the default options, except for using the graphical installer by default and the x-basic profile (/usr/share/simple-cdd/x-basic.*) .SH AUTHOR This manual page was written by Gustavo Franco , for the Debian project (but may be used for others). simple-cdd-0.3.14/README0000644000000000000000000001574211425271336011403 0ustar here's a quick guide to using simple-cdd... if you have further questions, ask on the simple-cdd-devel mailing list: http://lists.alioth.debian.org/mailman/listinfo/simple-cdd-devel, or in the debian-custom channel on irc.debian.org. Quick Start (from http://wiki.debian.org/Simple-CDD/Howto) To try Simple-CDD, on a Debian system: Install simple-cdd (as root): # apt-get install simple-cdd Create a working directory (as a user): $ mkdir ~/my-simple-cdd $ cd ~/my-simple-cdd Build a basic CD: $ build-simple-cdd This will create a partial package mirror in the directory tmp/mirror, and if all goes well, an .iso CD image in the "images" directory when it is finished. By default, target CDD release version is the same as the host version. You can specify the optional argument --dist to change the targets version. For example, it can be etch, lenny, sid, etc. If this step doesn't work, you need to figure out why before trying more complicated things. Create a profile named NAME: $ mkdir profiles $ for p in list-of-packages-you-want-installed ; do echo $p >> profiles/NAME.packages ; done Note that you should not include package dependencies, but only the packages you actually want. Build the CD with selected profile NAME: $ build-simple-cdd --profiles NAME This should create an .iso CD image in the "images" directory when it is finished with your custom profile. Use qemu to test: # apt-get install qemu $ build-simple-cdd --qemu --profiles NAME Optional features: If you want debconf preseeding, put a debconf-set-selections compatible file into profiles/NAME.preseed. If you want a custom post-install script, place it in profiles/NAME.postinst. For more options: $ build-simple-cdd --help The Less Quick Start Preparing a Simple-CDD Working Directory mkdir my-cdd cd my-cdd Profiles create the profiles directory: mkdir profiles to make a custom profile, think of a name for it, such as "x-basic". edit or create files in the "profiles" directory, beginning with the profile name, and ending in .preseed, .packages, .downloads, etc. for example: profiles/x-basic.preseed profiles/x-basic.packages profiles/x-basic.downloads *.description short, one-line description of the what the profile does *.packages packages installed when the profile is selected. do not include packages such as linux-image or grub, as debian-installer will handle these specially. *.downloads additional packages included on a CD providing the profile, but not installed by simple-cdd (though debian-installer may install them) *.preseed debconf questions loaded if the profile is selected *.postinst profile-specific post-install script. runs in the "finish-install" phase of debian-installer. *.conf profile-specific configuration settings. sourced during CD build. to build a CD image with the x-basic profile: build-simple-cdd --profiles x-basic when installing from the CD, a menu should pop up asking you which profiles you want to install. select all the profiles you want, and the debconf preseed files will populate the debconf database, and the packages will be installed. Default Profile the profile named "default" is special, because it always gets installed. modify the profile/default.* files with care, as simple-cdd relies upon the default profile working in certain ways (such as installing the simple-cdd-profiles .udeb). Debconf Preseeding debconf preseeding is a way to pre-answer the questions asked during package installation and debian-installer. it uses the debconf-set-selections format. for more information on the format: man debconf-set-selections profiles/default.preseed is loaded after the debian-installer CD is mounted. other profiles preseed files are loaded when the simple-cdd-profile .udeb is installed. some questions may have to be passed at the boot prompt(see below), as they are asked before any of the preseed files are loaded. the following question is used by simple-cdd, modify at your own risk: d-i preseed/early_command Automatically Selecting Profiles to automatically select profiles, in profiles/default.preseed, uncomment the line: simple-cdd simple-cdd/profiles multiselect and add all profiles you want, separated by commas, i.e.: simple-cdd simple-cdd/profiles multiselect x-basic, ltsp alternately, use the --auto-profiles commandline option: build-simple-cdd --profiles x-basic,ltsp --auto-profiles x-basic,ltsp Language and Country Selection to pre-select the language and country, it is recommended to use the --locale commandline option: build-simple-cdd --locale en_US Configuration Files to specify a configuration file: build-simple-cdd --conf my-cdd.conf in my-cdd.conf, include values like locale=en_US profiles="x-basic,ltsp" auto_profiles="x-basic,ltsp" debian_mirror="http://my.local.mirror/debian" you can also specify configuration files on a per-profile basis, in profiles/.conf. Passing Boot Prompt Parameters to pass boot parameters, set KERNEL_PARAMS in a configuration file. the following example adds the default.preseed file (needed for simple-cdd to function) and disables power management (acpi): export KERNEL_PARAMS="preseed/file=/cdrom/simple-cdd/default.preseed acpi=off" Build the CD build-simple-cdd now the mirroring tools will download lots and lots of files. then CD image will be built, and appear as a file in the "images" directory, such as "debian-40-i386-CD-1.iso" Testing With Qemu you can test that your image works using qemu... apt-get install qemu build-simple-cdd --qemu --profiles x-basic this will build the CD image using the profile x-basic, run qemu to install it, and then run qemu for the initial boot into the system. Testing With Qemu in Non-Graphical Mode i tested this code out entirely with qemu over a slow ssh connection, so i needed to figure out how to get serial console working... build-simple-cdd --qemu --profiles x-basic --serial-console More Fun and Adventures Post and Pre Installation Hooks if you need to do some customization that cannot be handled by debconf preseeding, write a script doing what you need to do... and copy that script to either: default.postinst (for all installs) or .postinst (for profile-specific post-install) Totally Automatic Partitioning since automatically over-writing the data on the hard-drive could be destructive, it is disabled by default. to enable it, edit profiles/default.preseed and uncomment the following three lines: d-i partman/confirm_write_new_label boolean true d-i partman/choose_partition select Finish partitioning and write changes to disk d-i partman/confirm boolean true Using contrib and non-free if you want to add packages from contrib or non-free, add them to the mirror_components in a configuration file: mirror_components="main contrib non-free" if you're using a mirror that uses different components, add them to mirror_components_extra in a configuration file: debian_mirror_extra="http://some.mirror.org/debian/" mirror_components_extra="contrib non-free" simple-cdd-0.3.14/simple-cdd.conf0000644000000000000000000000162611272507072013406 0ustar # simple-cdd.conf minimal configuration file # Note: this is only an example, it is recommended to only add configuration # values as you need them. # Profiles to include on the CD profiles="" #profiles="x-basic ltsp" # set default locale locale="en_US" # Mirror tools # mirror_tools="wget reprepro" # Mirror variables server="ftp.us.debian.org" debian_mirror="http://$server/debian/" wget_debian_mirror="ftp://$server/debian/" rsync_debian_mirror="$server::debian" # Mirror for security updates # Expects security updates to be in dists/DEBIAN_DIST/updates security_mirror="http://security.debian.org/" # Extra mirror # May only work when using reprepro as mirror tool #debian_mirror_extra="http://example.com/debian/" # Components to include #mirror_components="main contrib non-free" # Generate a simple package repository on the CD with the debs cited # Please insert full paths. local_packages="" simple-cdd-0.3.14/debian/0000755000000000000000000000000011532016317011727 5ustar simple-cdd-0.3.14/debian/simple-cdd-profiles.postinst0000644000000000000000000000410411272507072017401 0ustar #!/bin/sh # Copyright 2006 Gustavo Franco . # Copyright 2004-2006 Vagrant Cascadian . # Licensed under the terms of the GNU General Public License, # version 2 or any later version. # TODO: figure out a better way to avoid asking about profiles when there are # no profiles specified SIMPLE_CDD_DIR=/cdrom/simple-cdd set -e if [ ! -d "$SIMPLE_CDD_DIR" ]; then exit 1 fi # load debconf . /usr/share/debconf/confmodule if [ -f $SIMPLE_CDD_DIR/simple-cdd.templates ]; then echo "loading simple-cdd templates..." debconf-loadtemplate simple-cdd $SIMPLE_CDD_DIR/simple-cdd.templates echo "asking simple-cdd debconf questions..." db_input high simple-cdd/profiles || /bin/true db_go else echo "NOTE: simple-cdd templates not found, not asking about profiles." fi db_get simple-cdd/profiles || /bin/true profiles="$(echo $RET | tr ',' ' ')" echo "loading simple-cdd preseeding files" echo "profiles: $profiles" cd $SIMPLE_CDD_DIR for p in $profiles ; do echo if [ "$p" = "$default" ]; then echo "default Debconf preseeding already loaded. skipping." elif [ -r "$p.preseed" ]; then echo "Debconf preseeding for: $p" debconf-set-selections $p.preseed else echo "no Debconf preseeding for: $p" fi done echo "Finished with simple-cdd debconf preseeding" echo "Queuing simple-cdd udebs..." for p in default $profiles ; do echo if [ -r "$p.udebs" ]; then echo "Queuing udebs for profile: $p" wanted_packages="$(egrep -v ^# $p.udebs)" anna-install $wanted_packages || true else echo "No udeb list for profile: $p" fi done echo "Finished queueing simple-cdd udebs" echo "Queuing simple-cdd packages..." for p in default $profiles ; do echo if [ -r "$p.packages" ]; then echo "Queuing packages for profile: $p" wanted_packages="$(egrep -v ^# $p.packages)" apt-install $wanted_packages || true else echo "No package list for profile: $p" fi done echo "Finished queueing simple-cdd packages" #DEBHELPER# exit 0 simple-cdd-0.3.14/debian/control0000644000000000000000000000311611531775475013353 0ustar Source: simple-cdd Section: misc Priority: extra Maintainer: Simple-CDD Developers Uploaders: Vagrant Cascadian Build-Depends: debhelper (>= 7), libdebian-installer4-dev (>= 0.41), libdebconfclient0-dev (>= 0.49) Standards-Version: 3.9.1 Vcs-Bzr: nosmart+http://bzr.debian.org/simple-cdd/simple-cdd-devel Vcs-Browser: http://bzr.debian.org/loggerhead/simple-cdd/simple-cdd-devel/files XS-DM-Upload-Allowed: yes Package: simple-cdd Architecture: all Depends: ${misc:Depends}, rsync, debian-cd (>= 3.1.0), reprepro, apt-utils, wget, python, debootstrap, lsb-release, dctrl-tools Recommends: edos-debcheck Suggests: qemu-system | qemu-kvm Description: create custom debian-installer CDs simple-cdd is a limited though relatively easy tool to create a customized debian-installer CD. . it includes simple mechanisms to create "profiles" that define common system configurations, which can be selected during system installation. simple-cdd also makes it easy to build CDs with language and country settings pre-configured. . this can be used to create a crude "Custom Debian Distribution" using packages from Debian, with pre-configuration of packages that use debconf. custom configuration scripts can be specified to handle packages that don't support debconf pre-configuration. . testing CD images with qemu is also made simple with a provided script. Package: simple-cdd-profiles Section: debian-installer Architecture: all Depends: ${shlibs:Depends}, ${misc:Depends} Description: simple-cdd profile selection XC-Package-Type: udeb simple-cdd-0.3.14/debian/simple-cdd.install0000644000000000000000000000046011272507072015344 0ustar profiles/* usr/share/simple-cdd/profiles build-simple-cdd usr/share/simple-cdd checkpackages usr/share/simple-cdd simple-cdd.templates usr/share/simple-cdd README usr/share/simple-cdd TODO usr/share/simple-cdd FAQ usr/share/simple-cdd tools/* usr/share/simple-cdd/tools providecheck usr/share/simple-cdd simple-cdd-0.3.14/debian/changelog0000644000000000000000000003607511532015607013615 0ustar simple-cdd (0.3.14) unstable; urgency=low * tools/mirror/wget: - Handle non-standard mirror paths with an arbitrary depth. Thanks to Stefan Kisdaroczi for the patch. (Closes: #589968) * Updated README. Thanks to Stefan Kisdaroczi for the patch. (Closes: #590701) * tools/testing/qemu: - detect alternate locations for the CD image (Closes: #611635). Thanks to Matthias Müller-Reineke. * tools/mirror/reprepro: - include rudimentary support for gpg-signed apt repositories. Thanks to Matthias Müller-Reineke for the suggestion. - do not specify "none" for components or udebcomponents, to reduce noise from reprepro. * test profile: - support grub with serial or terminal in both grub2 and grub-legacy. * Updated Standards-Version to 3.9.1, no changes necessary. -- Vagrant Cascadian Fri, 25 Feb 2011 13:07:14 -0800 simple-cdd (0.3.13) unstable; urgency=low * Added $profile.extras functionality. Thanks to Oxan van Leeuwen. * profiles: - router: + Switch to using arno-iptables-firewall, as ipmasq was dropped from Debian. - ltsp: + Remove xdebconfigurator from the ltsp profile, as it was removed from Debian. - vserver: + Fix typo in vserver-debiantools package name. - test: + Switch to using qemu's curses mode. + Pass the -no-reboot argument to qemu to ensure that the initial boot from disk starts automatically. * tools/testing/qemu: - Detect and use kvm support if available. - Drop special code to enable kqemu, as it's no longer supported in qemu. - Support using qemu-kvm if qemu is not available. * tools/build/debian-cd: - Hack to ensure that vga=normal in KERNEL_PARAMS is respected, needed to use -curses with qemu. * tools/mirror/reprepro: - Added option to limit udebs from extra_udeb_dist to certain packages. * debian/control: - Updated to use vagrant@debian.org in Uploaders field. - Updated Standards-Version to 3.8.4, no changes necessary. - Suggests: Drop qemu, add "qemu-system | qemu-kvm". - Depends: Drop debpartial-mirror, as it is largely untested and missing many features. * Added debian/source/format and set to "3.0 (native)". -- Vagrant Cascadian Sun, 27 Jun 2010 18:55:09 -0700 simple-cdd (0.3.12) unstable; urgency=low * Thanks to Raphaël Hertzog: - When using using non-official codenames, create links in debian-cd to emulate a known codename (Closes: #542241). - If CODENAME and DI_CODENAME do not match, generate a udeb repository with udebs from DI_CODENAME (Closes: #542235). - Consistantly use DI_CODENAME instead of di_codename (Closes: #542235). * New simple-cdd project on alioth: - Updated README to mention new simple-cdd-devel mailing list. - Changed Maintainer field in debian/control to point to simple-cdd-devel mailing list. - Updated information in debian/copyright and debian/control about new location for bzr repositories * Updated simple-cdd manpage to use properly quoted minus signs, otherwise groff turns them into hyphens. * Updated Standards-Version to 3.8.3, no changes necessary. -- Vagrant Cascadian Fri, 18 Sep 2009 12:31:27 -0700 simple-cdd (0.3.11) unstable; urgency=low * use DI_CODENAME with custom_installer. based on patch by Raphaël Hertzog. (Closes: #529424) * fix bashism by using "id -ru" instead of "$UID" (Closes: #530190) * fix typo that caused NORECOMMENDS to be ignored when checking for recommends in reprepro hooks. thanks to Sergei Mutovkin. * update standards-version to 3.8.2, no changes needed. -- Vagrant Cascadian Fri, 17 Jul 2009 17:09:56 +0200 simple-cdd (0.3.10) unstable; urgency=low * applied patch to get newer versions of reprepro working again. patch by Enrico Zini, with slight modification to handle an additional case. (Closes: #519324) * use edos-debcheck to report missing dependencies in the mirror and on the CD. thanks to Enrico Zini for the idea. (Closes: #491069) * profiles: - router: + new example a simple NAT router/firewall/dhcp server - test: + set preseeding for apt-setup/services-select to empty * add crude support for backports * switch to debhelper 7, drop cdbs * add ${misc:Depends} to simple-cdd dependencies to quiet lintian * updated standards-version to 3.8.1, no changes necessary. * updated debian/copyright to explicitly point to GPL-2 -- Vagrant Cascadian Wed, 22 Apr 2009 15:38:57 -0700 simple-cdd (0.3.9) unstable; urgency=low * depend on debian-cd >= 3.1.0 * update task and exclude handling to support newer versions of debian-cd. (Closes: #511755) * set MAXISOS and MAXJIGDOS used in newer versions of debian-cd. * only download installer when DI_WWW_HOME is not set, as debian-cd will handle it. * fix BOOT_TIMEOUT parameter. * debian/control: use proper Vcs-* header. * update architecture specific kernel selection. * ensure that relevent linux-image-2.6-* packages are also installed, as changes to linux-image metapackages do not pull in linux-image-2.6-* by default, which causes debian-installer to ask which kernel to install. * exit if being run as root. add --force-root commandline option to override. * profile updates: - ltsp: + include commented out example to enable DHCP server + remove packages no longer needed - vserver: + ensure that a vserver capable kernel is installed + install util-vserver and debootstrap by default + lower vserver-debiantools to an optional package -- Vagrant Cascadian Wed, 14 Jan 2009 10:58:16 -0800 simple-cdd (0.3.8) unstable; urgency=low * add syslinux-common and syslinux to default packages to download which fixes builds with newer versions debian-cd * depend on debian-cd >= 3.0.5, to ensure simple-cdd works with lenny -- Vagrant Cascadian Fri, 31 Oct 2008 16:39:36 -0700 simple-cdd (0.3.7) unstable; urgency=low * improved commandline processing, based on patch from Bruce Korb * changes for lenny: - attempt to get busybox by default (needed by initramfs-tools) - comment out preseeding to select a disk * updated --help output and manpage * get recommended packages if debian-cd is configured to use recommends * added --require-optional-packages which fails if optional packages are missing. thanks to Raphael Hertzog for the suggestion. (Closes: #484161) * remove Gustavo Franco as maintainer, with permission. thanks for all your work! * add myself as maintainer * add headers to allow debian-maintainer uploads * updated example ltsp profile with new preseeding options * commented out old preseeding questions for default profile * fix capitalization of Debian to please lintian * updated standards-version to 3.8.0, no changes necessary. -- Vagrant Cascadian Sun, 29 Jun 2008 16:28:00 -0700 simple-cdd (0.3.6) unstable; urgency=medium * urgency medium, as it closes an RC bug * fix dependency resolution for provides: - install providecheck into /usr/share/simple-cdd reported by David Paleino (Closes: #447293) - fix bug causing packages providing multiple features to be ignored * include help output for --build-tools patch from alessandro -oggei- ogier (Closes: #446734) * consistantly use "sed -i -e" instead of "sed -ie" reported by alessandro -oggei- ogier (Closes: #447031) * updated example configuration files thanks to alessandro -oggei- ogier (Closes: #446735) * language and country are obsoleted by locale: - dropped from man page and example configuration files * build-simple-cdd: - do not unset CONTRIB or NONFREE variables - include profile configuration files before setting default values - ensure that KERNEL_PARAMS gets exported * document using contrib and non-free in README * update bzr branch info in debian/copyright -- Vagrant Cascadian Tue, 23 Oct 2007 21:48:19 -0700 simple-cdd (0.3.5) unstable; urgency=low * updated README (Closes: #445139) * dependency resolution now handles provides -- Vagrant Cascadian Wed, 3 Oct 2007 12:34:06 -0700 simple-cdd (0.3.4) unstable; urgency=low * fix bug in handling proposed-updates: - append instead of overwrite (Closes: #431543) * documentation updates: - use x-basic profile in the example, since default is always installed - default protocol is ftp * added commandline options: - set distribution used (--dist) - pull simple-cdd-profiles udeb from newer distribution (--profiles-udeb-dist) - pull in udebs from additional distribution (--extra-udeb-dist) * dropped commandline options: --http-proxy and --default-profiles * possible to use different mirror for wget and reprepro mirror-tools * test profile: do not set kqemu options * add comment explaining why local_packages is handled differenty when reprepro is used (Closes: #442371) -- Vagrant Cascadian Tue, 18 Sep 2007 09:39:09 -0700 simple-cdd (0.3.3) unstable; urgency=low * patch to use proposed-updates based on patches provided by Daniel Dehennin (Closes: #431543) * document --conf option (thanks to Chris AtLee, Closes: #440193) * export OFFICIAL_VAL (thanks to Vlad Shakhov, Closes: #435831) * fix typo in CODENAME (thanks to Vlad Shakhov, Closes: #435831) * enable kqemu if present (suggested by Daniel Dehennin, Closes: #431419) * drop commanline arguments: --extras and --packages -- Vagrant Cascadian Sat, 1 Sep 2007 15:52:27 -0700 simple-cdd (0.3.2) unstable; urgency=low [ Gustavo Franco ] * Introduce a simple-cdd manpage. * Add information about debootstrap run before it runs. * Add usage header into '--help' output. [ Vagrant Cascadian ] * build-simple-cdd: - drop use of debian-cd's CONF.sh - depend on lsb-release to set default CODENAME and DEBVERSION - improved handling of contrib and non-free - fix typo: cutsom_installer -> custom_installer - remove obsoleted language/country selection code * add XS-X-Vcs-Bzr field * use -g as shorthand for --graphical-installer * include simple-cdd manpage in package -- Vagrant Cascadian Sat, 16 Jun 2007 20:23:02 +0100 simple-cdd (0.3.1) unstable; urgency=low [ Gustavo Franco ] * Split simple-cdd.conf configuration file in two - simple-cdd.conf: Containing the minimal configuration options - simple-cdd.conf.detailed: Containing every possible option * Move debian-cd related code to build-tools/debian-cd * Move qemu related code to testing-tools/qemu [ Vagrant Cascadian ] * move tools to tools directory - build-tools -> tools/build - mirror-tools -> tools/mirror - testing-tools -> tools/testing * obsolete need for simple-cdd.conf - build-simple-cdd sets default values - add a --conf commandline option - move to examples documentation * build-simple-cdd can be run from anywhere * support components other than "main" (Closes: #422264) * checkpackages now works with directories containing underscores -- Vagrant Cascadian Tue, 22 May 2007 14:58:56 +0200 simple-cdd (0.3.0) experimental; urgency=low * updates for etch - depend on debian-cd >= 3.0.0 - support for multi-arch CDs * documentation updates - improved README and comments - moved to cdd project - switched to bzr for revision control * simple-cdd-profile udeb integrates into debian-installer * improvements to download methods - significantly reduced number of files downloaded - switch default protocol for debian mirror to ftp - additional download methods: + reprepro, wget, rsync and debpartial-mirror - prefer reprepro and wget over depbartial-mirror * new profile options - load udebs when profile is selected - exclude packages from CD if profile is included * new profiles: - ltsp - vserver - x-basic - test * removed outdated profiles: - lessdisks - fg-baseserver - freekbox3* -- Vagrant Cascadian Mon, 26 Mar 2007 09:03:16 -0700 simple-cdd (0.2.1) unstable; urgency=low * freekbox3 profile: - defaults to 2.6 kernel - only add CD entry to sources.list if not already present * new experimental profiles: - fg-baseserver: a simple server image + include (but not install) software for: web, mail, dhcp, dns, http proxy - freekbox3-laptop: additional software for laptops - freekbox3-gnome: gnome-based profile similar to freekbox3 - freekbox3-fgoly: minor changes to freekbox3 from freegeek olympia * removed unmaintained "sa" profile * per-profile descriptions * example exclude files * build-simple-cdd - "build profiles" that only are used during CD build - can be installed into PATH and run from anywhere - crude support for an additional mirror - allow comma-separated lists for profile selection - configuration files and commandline options included on CD - able to grab updates from a security mirror - new commandline options: + set default profiles: --default-profiles + build profiles: --build-profiles + security mirror: --security-mirror + extra mirror: --extra-mirror * simple-cdd-packages: - do not attempt to install packages already installed - option to override debconf priority and frontend * freekbox3-multi build profile: multi-profile freekbox3 installer - excluded packages by default * local package support: - attempt to resolve dependencies of local packages - use LOCAL/LOCALDEBS feature of debian-cd * checkpackages: - can now check for packages in any directory - handle packages with a "+" in name - check for packages included but not asked for - check for local packages -- Vagrant Cascadian Fri, 21 Oct 2005 11:10:14 -0600 simple-cdd (0.2.0) unstable; urgency=low * automatically include "default" profile * option to build local package repository * simplified language and country selection * added build-time configuration file for profiles * examples for setting default CD label * updated freekbox3 and lessdisks profiles * prompt before over-writing hard-disk partitions by default * build-simple-cdd: many commandline options added -- Vagrant Cascadian Mon, 11 Jul 2005 11:28:19 -0600 simple-cdd (0.1.1) unstable; urgency=low * switch to using cdbs * drop un-used substitution variables in control file * use build-depends-indep instead of build-depends * fix to work with debian-cd in sarge (2.2.22) * new option to use a 2.6 kernel by default * new option to use serial console * added post-install scripts for profiles -- Vagrant Cascadian Thu, 23 Jun 2005 14:18:11 -0600 simple-cdd (0.1.0) unstable; urgency=low * Initial Release. -- Vagrant Cascadian Tue, 1 Feb 2005 12:52:42 -0800 simple-cdd-0.3.14/debian/simple-cdd.manpages0000644000000000000000000000001511272507072015465 0ustar simple-cdd.1 simple-cdd-0.3.14/debian/rules0000755000000000000000000000003611272507072013012 0ustar #!/usr/bin/make -f %: dh $@ simple-cdd-0.3.14/debian/copyright0000644000000000000000000000160411532007246013664 0ustar This package was debianized by Vagrant Cascadian on Tue, 1 Feb 2005 12:52:42 -0800. It was downloaded using bzr: bzr get nosmart+http://bzr.debian.org/simple-cdd/simple-cdd-devel Upstream Author: Vagrant Cascadian Copyright: Copyright 2004-2011 Vagrant Cascadian . Licensed under the terms of the GNU General Public License, version 2 or any later version. On Debian GNU/Linux systems, the complete text of the GNU General Public License can be found in `/usr/share/common-licenses/GPL-2'. This module provides simple-cdd profile selection for the Debian GNU/Linux installer. Author(s): Gustavo Franco Copyright (c) 2006 Gustavo Franco The copyright of this package is GPL, version 2. A copy of the GNU General Public License is available in /usr/share/common-licenses/GPL-2. simple-cdd-0.3.14/debian/source/0000755000000000000000000000000011412000331013211 5ustar simple-cdd-0.3.14/debian/source/format0000644000000000000000000000001511412000331014420 0ustar 3.0 (native) simple-cdd-0.3.14/debian/simple-cdd.links0000644000000000000000000000055611272507072015024 0ustar usr/share/simple-cdd/README usr/share/doc/simple-cdd/README usr/share/simple-cdd/TODO usr/share/doc/simple-cdd/TODO usr/share/simple-cdd/FAQ usr/share/doc/simple-cdd/FAQ usr/share/simple-cdd/build-simple-cdd usr/bin/build-simple-cdd usr/share/simple-cdd/build-simple-cdd usr/bin/simple-cdd usr/share/man/man1/simple-cdd.1.gz usr/share/man/man1/build-simple-cdd.1.gz simple-cdd-0.3.14/debian/compat0000644000000000000000000000000211272507072013131 0ustar 5 simple-cdd-0.3.14/debian/14simple-cdd0000755000000000000000000000204411272507072014047 0ustar #!/bin/sh # Copyright 2005-2006 Vagrant Cascadian . # Copyright 2006 Gustavo Franco . # Licensed under the terms of the GNU General Public License, # version 2 or any later version. # handle profile-specific post-install scripts SIMPLE_CDD_DIR=/cdrom/simple-cdd set -e if [ ! -d "$SIMPLE_CDD_DIR" ]; then exit 1 fi # load debconf . /usr/share/debconf/confmodule db_get simple-cdd/profiles || /bin/true profiles="$(echo default $RET | tr ',' ' ')" echo "simple-cdd post-install scripts..." echo "profiles: $profiles" cd $SIMPLE_CDD_DIR mkdir -p /target/usr/local/simple-cdd for p in $profiles ; do echo if [ -x "$p.postinst" ]; then echo "running postinstall script for: $p" cp $p.postinst /target/usr/local/simple-cdd in-target /usr/local/simple-cdd/$p.postinst elif [ -r "$p.postinst" ]; then echo "WARNING: postinstall script not executable: $p.postinst" else echo "No postinstall script for: $p" fi done echo "Finished running simple-cdd profile post-install scripts" simple-cdd-0.3.14/debian/simple-cdd-profiles.install0000644000000000000000000000005711272507072017167 0ustar debian/14simple-cdd /usr/lib/finish-install.d/ simple-cdd-0.3.14/debian/simple-cdd.examples0000644000000000000000000000005111272507072015510 0ustar simple-cdd.conf simple-cdd.conf.detailed simple-cdd-0.3.14/build-simple-cdd0000755000000000000000000004071511272507072013564 0ustar #!/bin/sh # Copyright 2004-2007 Vagrant Cascadian . Licensed under # the terms of the GNU General Public License, version 2 or any later version. # FIXME: call with LANG=C for parts that need it die() { echo "build-simple-cdd error: $*" > /dev/stderr exit 1 } get_help() { test -n "$@" && echo "$@" cat< /dev/stderr exit 1 ;; esac shift || die "no argument supplied for ${opt} option" done # set defaults test -z "$simple_cdd_dir" && simple_cdd_dir=$(pwd) test -z "$simple_cdd_dirs" && simple_cdd_dirs="$simple_cdd_dir /usr/share/simple-cdd" # turn comma-separated list into whitespace-separated list profiles="$(echo $profiles | tr ',' ' ')" default_profiles="$(echo $default_profiles | tr ',' ' ')" all_extras="$(echo $all_extras | tr ',' ' ')" local_packages="$(echo $local_packages | tr ',' ' ')" all_packages="$(echo $all_packages | tr ',' ' ')" build_profiles="$(echo $build_profiles | tr ',' ' ')" mirror_tools="$(echo $mirror_tools | tr ',' ' ')" build_tools="$(echo $build_tools | tr ',' ' ')" new_profiles="" for p in $profiles ; do if [ "$p" = "default" ]; then echo "NOTE: profile 'default' is automatically included in this version of simple-cdd." echo "NOTE: to disable this message, remove it from the 'profiles' value in simple-cdd.conf" else new_profiles="$new_profiles $p" fi done profiles="$new_profiles" find_files(){ file="$1" for dir in $simple_cdd_dirs ; do f="$dir/$file" if [ -r "$f" ]; then echo "$f" break fi done } profile_files(){ profile="$1" type="$2" find_files "profiles/$profile.$type" } get_config() { # get configuration files for p in $@ ; do file="$(profile_files $p conf)" if [ -f "$file" ]; then echo "including configuration values for: $file" . "$file" fi done } # get defaults, and have build profiles over-ride all others get_config default $profiles $build_profiles if [ "$force_root" != "true" ] && [ "$(id -ru)" = "0" ]; then die "Running as root is strongly discouraged. please run as a non-root user." fi test -z "$server" && server="ftp.us.debian.org" test -z "$debian_mirror" && debian_mirror="ftp://$server/debian/" test -z "$wget_debian_mirror" && wget_debian_mirror="$debian_mirror" test -z "$rsync_debian_mirror" && rsync_debian_mirror="$server::debian" test -z "$use_security_mirror" && use_security_mirror="true" if [ -z "$security_mirror" ] && [ "true" = "$use_security_mirror" ]; then security_mirror="http://security.debian.org/" fi test -z "$mirror_tools" && mirror_tools="wget reprepro" test -z "$mirror_components" && mirror_components="main" test -z "$mirror_components_extra" && mirror_components_extra="$mirror_components" test -z "$mirror_files" && mirror_files="README doc/ tools/" test -z "$simple_cdd_temp" && simple_cdd_temp="$simple_cdd_dir/tmp/" test -z "$ARCH" && ARCH="$(dpkg --print-architecture)" test -z "$ARCHES" && ARCHES=$ARCH test -z "$simple_cdd_mirror" && simple_cdd_mirror="$simple_cdd_temp/mirror" test -z "$simple_cdd_basedir" && simple_cdd_basedir="$simple_cdd_temp/debian-cd" test -z "$simple_cdd_preseed" && simple_cdd_preseed="preseed/file=/cdrom/simple-cdd/default.preseed" test -z "$TASK" && TASK=$simple_cdd_temp/simple-cdd.task # set path to include simple-cdd dirs simple_cdd_path="" for dir in $simple_cdd_dirs ; do if [ -z "$simple_cdd_path" ]; then simple_cdd_path="$dir" else simple_cdd_path="$simple_cdd_path:$dir" fi done export PATH="$simple_cdd_path:$PATH" # set default values test -z "$CODENAME" && export CODENAME="$(lsb_release --short --codename)" test -z "$DI_CODENAME" && export DI_CODENAME="$CODENAME" test -z "$DEBVERSION" && export DEBVERSION="$(lsb_release --short --release)" test -z "$OFFICIAL" && export OFFICIAL="Unofficial" test -z "$OFFICIAL_VAL" && export OFFICIAL_VAL=0 test -z "$ISOLINUX" && export ISOLINUX=1 test -z "$DISKTYPE" && export DISKTYPE=CD test -z "$NORECOMMENDS" && export NORECOMMENDS=1 test -z "$MAXCDS" && export MAXCDS=1 test -z "$OMIT_RELEASE_NOTES" && export OMIT_RELEASE_NOTES=1 test -z "$DOJIGDO" && export DOJIGDO="0" test -z "$MAXJIGDOS" && export MAXJIGDOS="0" export MIRROR="$simple_cdd_mirror" export BASEDIR="$simple_cdd_basedir" export TDIR="$simple_cdd_temp/cd-build" export APTTMP="$TDIR/apt/" export OUT="$simple_cdd_dir/images" test -z "$INSTALLER_CD" && export INSTALLER_CD=2 for component in $mirror_components $mirror_components_extra ; do case $component in contrib) export CONTRIB=1 ;; non-free) export NONFREE=1 ;; esac done test -z "$build_tools" && build_tools="debian-cd" for tool in $build_tools ; do case $tool in debian-cd) test -z "$debian_cd_dir" && debian_cd_dir="/usr/share/debian-cd" # set include files for debian-cd test -z "$includes" && includes="debian-installer+kernel debian-installer" # ensure that ISO images are built test -z "$MAXISOS" && export MAXISOS="ALL" ;; esac done # set some debian-installer defaults test -z "$di_release" && di_release="current" # ensure variables are exported export ARCH export ARCHES mkdir -p "$simple_cdd_dir" # create temp directory mkdir -p "$simple_cdd_temp" if [ ! -d "$simple_cdd_dir" ] ; then echo "ERROR: directory not found: $simple_cdd_dir" exit 1 fi # include package and preseed files for profiles for p in default $profiles $build_profiles ; do preseed_files="$preseed_files $(profile_files $p preseed)" package_files="$package_files $(profile_files $p packages)" package_files="$package_files $(profile_files $p downloads)" package_files="$package_files $(profile_files $p udebs)" all_extras="$all_extras $(profile_files $p postinst)" for file in $(profile_files $p extra) ; do # include the extra file itself, as well as the contents it references all_extras="$all_extras $file $(egrep -v ^# $file)" done exclude_files="$exclude_files $(profile_files $p excludes)" done preseed_check_failure() { if [ "true" = "$force_preseed" ]; then echo "WARNING: preseed file invalid: $1" else echo "ERROR: preseed file invalid: $1" exit 1 fi } # verify that preseeding files are valid for p in $preseed_files ; do /usr/bin/debconf-set-selections --checkonly $p || preseed_check_failure $p done for a in $ARCHES ; do base_include_packages="" debootstrap_dir="$simple_cdd_temp/debootstrap" debootstrap_file="$debootstrap_dir/$CODENAME-$a" if [ -f "$debootstrap_file" ]; then base_include_packages="$(cat $debootstrap_file)" fi if [ -z "$base_include_packages" ]; then echo "Trying to run debootstrap for $a architecture" base_include_packages="$(/usr/sbin/debootstrap --print-debs --arch $a $CODENAME /tmp/debootstrap.$$ $debian_mirror)" # cache the results mkdir -p $debootstrap_dir for p in $base_include_packages ; do echo $p >> $debootstrap_file done fi # include base packages all_packages="$all_packages $base_include_packages" done if [ -n "$exclude_files" ]; then export EXCLUDE=$simple_cdd_temp/simple-cdd.excludes test -r "$EXCLUDE" && mv -f "$EXCLUDE" "$EXCLUDE".bak touch $EXCLUDE for f in $exclude_files ; do for p in $(egrep -v ^# $f); do echo $p >> $EXCLUDE done done fi # get lists of packages from files for l in $package_files $BASE_INCLUDE ; do all_packages="$all_packages $(egrep -v ^# $l)" done if [ -z "$kernel_packages" ]; then # guess appropriate kernel for architectures for kernel_base in linux-image- linux-image-2.6- ; do for a in $ARCHES ; do case $a in i386) kernel_packages="$kernel_packages ${kernel_base}486" ;; powerpc|amd64|s390) kernel_packages="$kernel_packages ${kernel_base}$a" ;; alpha) kernel_packages="$kernel_packages ${kernel_base}alpha-generic" ;; sparc) kernel_packages="$kernel_packages ${kernel_base}sparc64" ;; *) echo "WARNING: unable to guess kernel for architecture: $a" ;; esac done done fi if [ -n "$kernel_packages" ]; then all_packages="$all_packages $kernel_packages" fi # create local package repository, unless using reprepro (which includes # local_packages directly into the repository) if [ -n "$local_packages" ] && [ -z "$(echo $mirror_tools | egrep reprepro)" ]; then echo "NOTE: building local package repository" local_base_package_dir="$simple_cdd_temp/local-packages" local_package_dir="$local_base_package_dir/pool/local/" if [ -d "$local_base_package_dir.old" ]; then rm -rf "$local_base_package_dir.old" fi if [ -d "$local_base_package_dir" ]; then mv -f "$local_base_package_dir" "$local_base_package_dir.old" fi mkdir -p "$local_package_dir" for file in $local_packages ; do if [ -f "$file" ] ; then cp -vf $file $local_package_dir elif [ -d "$file" ]; then cp -vrf $file $local_package_dir else echo "WARNING: local packages file not found: $file" fi done cd $local_base_package_dir local_packages_file=dists/$CODENAME/local/binary-$ARCH/Packages local_sources_file=dists/$CODENAME/local/source/Sources for a in $local_packages_file $local_sources_file ; do a_dir=$(dirname $a) mkdir -p $a_dir if [ "$a" = "$local_packages_file" ]; then apt-ftparchive packages . > $local_packages_file elif [ "$a" = "$local_sources_file" ]; then apt-ftparchive sources . > $local_sources_file fi # TODO: set suite and whatnot for pinning apt-ftparchive release $a_dir > $a_dir/Release gzip -c $a > $a.gz done # TODO: set suite and whatnot for pinning apt-ftparchive release dists/$CODENAME > dists/$CODENAME/Release export LOCAL=1 export LOCALDEBS="$local_base_package_dir" # get dependencies from local packages for p in $(find $local_package_dir -type f -name '*.deb' -o -name '*.udeb') ; do dep_line="$(dpkg-deb --info $p | awk -F Depends: '/Depends/{print $2}' | sed s/,//g)" for d in $dep_line; do case $d in [a-z0-9]*) all_packages="$all_packages $d" esac done done fi mkdir -p $BASEDIR if [ "true" = "$do_mirror" ] || [ -z "$do_mirror" ] ; then if [ -z "$custom_installer" ] && [ -z "$DI_WWW_HOME" ]; then # add d-i files for each architecture for a in $ARCHES ; do case $a in i386|amd64) cdrom="/cdrom" ;; *) cdrom="" ;; esac mirror_files="$mirror_files dists/$DI_CODENAME/main/installer-$a/$di_release/images$cdrom/" done fi # run mirroring hooks for tool in $mirror_tools ; do file="$(find_files tools/mirror/$tool)" if [ -f "$file" ]; then . "$file" fi done fi if [ -z "$SECURITY" ] && [ -n "$security_mirror" ]; then if [ -d "$MIRROR/$CODENAME-security" ]; then export SECURITY="$MIRROR/$CODENAME-security/" fi fi if [ -n "$(echo $mirror_tools | grep debpartial-mirror)" ] && [ -d "$MIRROR/$CODENAME" ]; then # FIXME: better check for new-style debpartial-mirror re-location ? MIRROR="$MIRROR/$CODENAME" echo "re-setting mirror for new debpartial-mirror dir: $MIRROR" fi if [ ! -d "$MIRROR" ]; then echo "ERROR: mirror dir not a dir: $MIRROR" exit 1 fi # check to make sure all the packages we want are present. CHECK_MIRROR="$MIRROR $local_packages $SECURITY" profiles="default $build_profiles $profiles" simple_cdd_dir="$simple_cdd_dir" checkpackages || exit $? cd $MIRROR for a in $ARCHES ; do current_installer="dists/$DI_CODENAME/main/installer-$a/current/" di_dir="" if [ -n "$custom_installer" ] && [ -d "$custom_installer/$a" ]; then di_dir="$custom_installer/$a" elif [ "$CODENAME" != "$DI_CODENAME" ] || [ "current" != "$di_release" ]; then di_dir="dists/$DI_CODENAME/main/installer-$a/$di_release" fi if [ -d "$di_dir" ]; then echo "NOTE: using installer from: $di_dir" mkdir -p $current_installer rsync --delete -aWHr $di_dir/. $current_installer/ fi done if [ -n "$simple_cdd_preseed" ]; then echo "setting preseed file..." KERNEL_PARAMS="$KERNEL_PARAMS $simple_cdd_preseed" echo "KERNEL_PARAMS: $KERNEL_PARAMS" fi if [ "true" = "$use_serial_console" ]; then echo "enabling serial console hacks..." test -z "$serial_console_speed" && serial_console_speed="38400" test -z "$serial_console_opts" && serial_console_opts="ttyS0,$serial_console_speed" KERNEL_PARAMS="$KERNEL_PARAMS console=$serial_console_opts" echo "KERNEL_PARAMS: $KERNEL_PARAMS" fi if [ -n "$locale" ]; then echo "setting default locale..." KERNEL_PARAMS="$KERNEL_PARAMS debian-installer/locale=$locale" echo "KERNEL_PARAMS: $KERNEL_PARAMS" fi if [ -n "$keyboard" ]; then echo "setting default keyboard..." KERNEL_PARAMS="$KERNEL_PARAMS console-keymaps-at/keymap=$keyboard" echo "KERNEL_PARAMS: $KERNEL_PARAMS" fi if [ -n "$auto_profiles" ]; then for p in $auto_profiles ; do if [ -z "$new_auto_profiles" ]; then new_auto_profiles="$p" else new_auto_profiles="$new_auto_profiles,$p" fi done echo "setting automatically selected profiles..." KERNEL_PARAMS="$KERNEL_PARAMS simple-cdd/profiles=$new_auto_profiles" echo "KERNEL_PARAMS: $KERNEL_PARAMS" fi export KERNEL_PARAMS for buildtool in $build_tools ; do file="$(find_files tools/build/$buildtool)" if [ -f "$file" ]; then . "$file" fi done if [ "true" = "$use_qemu" ]; then file="$(find_files tools/testing/qemu)" if [ -f "$file" ] ; then . "$file" else echo "Warning: unable to find qemu testing script" fi fi simple-cdd-0.3.14/simple-cdd.conf.detailed0000644000000000000000000001513611272507072015161 0ustar # simple-cdd.conf detailed configuration file # Note: this is an example list of configuration options: it is *strongly* # advised to merely create a new file using only the options you actually need. # Note: Variables in lowercase are only used by simple-cdd. # Profile Selection # # The following four files get included on the CD if present: # $profile.preseed # Debconf selections. # $profile.packages # Packages to be installed with the profile. Dependencies also will # be installed. # $profile.downloads # Additional packages to be included on the CD with this profile, but # not installed by default. # $profile.postinst # Post-install script that is run after installing packages. # # During the install after base system setup, it will give you the # options to determine which profiles you want to install. # Profiles to include on the CD #profiles="" #profiles="x-basic ltsp" # To automatically select profiles (must also be listed in profiles): # auto_profiles="foo bar baz" # To include profiles which only effect the CD build # build_profiles="foo bar baz" # Mirror tools # mirror_tools="wget reprepro" # Mirror variables #server="ftp.us.debian.org" #debian_mirror="ftp://$server/debian/" #rsync_debian_mirror="$server::debian" # which components to get from the mirror #mirror_components="main" #mirror_components="main contrib" # Mirror for security updates # Expects security updates to be in dists/DEBIAN_DIST/updates #security_mirror="http://security.debian.org/" # Extra mirror # Only works with "wget reprepro" mirror tools. #debian_mirror_extra="http://example.com/debian/" #mirror_components_extra="$mirror_components non-free" # Extra files to include onto the CD # These will get copied to /simple-cdd dir on the CD #all_extras="" # Generate a simple package repository on the CD with the debs cited # Please insert full paths. #local_packages="/path/to/dir/with/deb/packages" # Call mirror tools at each build- defaults to true. #do_mirror="false" # Set your proxy (if any). #export http_proxy=http://localhost:3128 # Enable serial console settings: true/false # useful when testing with qemu's -nographic mode #use_serial_console="false" # Location of debian-cd files #debian_cd_dir=/usr/share/debian-cd #debian_cd_dir=$simple_cdd_dir/debian-cd # Temporary directory for simple-cdd #simple_cdd_temp="$simple_cdd_dir/tmp/" # Set target architecture for build #export ARCH=${ARCH:-`dpkg --print-architecture`} #export ARCHES=$ARCH # You can use a alternative splash image using a PNG image (640 x 480, # 4-bit colormap, non-interlaced), other formats should work but weren't # tested. Keep in mind that the alternative splash image will be displayed # only at the installer boot prompt. # export SPLASHPNG="$simple_cdd_dir/yourimage.png" # Don't include the manual or release notes, respectively, to save space. #export OMIT_MANUAL=1 #export OMIT_RELEASE_NOTES=1 # Don't generate JIGDO files #export DOJIGDO=0 # Define the CD label #export DISKINFO="Simple-cdd Installer: Debian GNU/Linux $DEBVERSION $CODENAME $(date --utc +%Y%m%d)" # Where debian-cd expects to find itself :) #export BASEDIR=$simple_cdd_temp/debian-cd # Kernel parameters passed to the CD bootloader works with isolinux on i386. #export KERNEL_PARAMS="preseed/file=/cdrom/simple-cdd/default.preseed" # download a specific installer release, such as 20041118 or rc2 #di_release="current" # custom debian-installer images to use. must contain one sub-directory for # each architecture. #custom_installer="/path/to/custom/installer/" # files needed to build the CD, downloaded from the default mirror #mirror_files="README doc/ tools/" ## Values used by both the various mirror tools and debian-cd # # directory of debian mirror #export MIRROR=$simple_cdd_dir/mirror/ # location of generated task file #export TASK=$simple_cdd_temp/simple-cdd.task # These are generally debian-cd files which should get included in the task file #includes="$BASEDIR/tasks/debian-installer+kernel-$CODENAME $BASEDIR/tasks/debian-installer-$CODENAME $BASEDIR/tasks/base-$CODENAME" # Location of generated debpartial-mirror configuration file #debpartial_conf="$simple_cdd_temp/debpartial-mirror.conf" # Package filter #debpartial_filter="main:*:standard main:*:required main:*:important main/debian-installer:*:*" #debpartial_filter_security="main:*:standard main:*:required main:*:important" #debpartial_filter_extra="main:*:standard main:*:required main:*:important" # Filter for newer (0.2.90+) versions of debpartial-mirror #debpartial_filter_new="priority:required|important|standard" # Components for newer (0.2.90+) versions of debpartial-mirror #debpartial_components="main main/debian-installer" # Security components for newer (0.2.90+) versions of debpartial-mirror #debpartial_components_security="main" # Extra components for newer (0.2.90+) versions of debpartial-mirror #debpartial_components_extra="main" ## debian-cd options # # Packages to include in initial debootstrap install. # Note that this will not work well with multi-arch CDs #export BASE_INCLUDE=$simple_cdd_temp/simple-cdd.$CODENAME.base_include # Packages to exclude from the initial debootstrap install, useful if # you want to use a MTA other than exim #export BASE_EXCLUDE=$simple_cdd_dir/excludes/base-excludes-sarge # Location where generated CD image(s) will be put #export OUT=$simple_cdd_dir/images/ # debian-cd temporary directories #export TDIR="$simple_cdd_temp/cd-build" #export APTTMP="$TDIR/apt/" # Increase the size limit if debian-cd tries to make more CDs than you want, # and the generated CDs are smaller than 650MB, or if you want to generate # larger than "normal" CD images. #export SIZELIMIT=838860800 # Don't include contrib #export CONTRIB=0 # Only generate one CD #export MAXCDS=1 # Only put the installer onto the cd (set NORECOMMENDS,... as well). # INSTALLER_CD=0: nothing special (default) # INSTALLER_CD=1: just add debian-installer (use TASK=tasks/debian-installer) # INSTALLER_CD=2: add d-i and base (use TASK=tasks/debian-installer+kernel) # # What I understand it does is saying "I do want the installer [and base], so # make sure they're always in" (--Enrico) #export INSTALLER_CD=2 ## qemu options # # Location of the hard disk image (used with qemu's -hda option) #hd_img="$simple_cdd_dir/qemu-test.hd.img" # size of qemu hard disk image to create (if not already present) #hd_size="6G" # location of the CD image (used with qemu's -cdrom option) #cd_img="$OUT/${CDNAME:-debian}-$(echo $DEBVERSION | sed -e 's/[. ]//g')-$(echo $ARCHES | tr ' ' '-')-CD-1.iso" # memory available within qemu, in MB #mem=96 # additional options that get passed to qemu #qemu_opts="-std-vga" simple-cdd-0.3.14/TODO0000644000000000000000000000326711272507072011211 0ustar update README (mostly done) and FAQ update preseeding to etch (mostly done): http://d-i.alioth.debian.org/manual/en.i386/apbs04.html profiles in sub-dirs: profiles/PROFILE.* -> profiles/PROFILE/* make --local-packages handling a mirror-tools method code cleanup on build-simple-cdd (python re-write?) explore debian-installer's "auto" mode for use with simple-cdd include debian-live images with live-helper get debpartial-mirror working again debian-installer network boot method (instead of CD) explore using .disk/udeb_include instead of preseeding to load simple-cdd-profiles udeb build-simple-cdd: verify extra mirror works (for both debpartial-mirror versions) support arbitrary number of additional mirrors commandline options to: define working dir: profiles dir, simple-cdd.conf, checkpackages, etc point to profiles dir point to simple-cdd.conf add debconf preseed file set SECURITY even if do_mirror=false improve support for additional package archives see debpartial-mirror's merge options dynamically tweak default.preseed with a preseed/include, and add modifications to the included preseed directly re-building with an existing debian-installer .iso see buildcd script from debian-edu (look for isoinfo): svn://svn.debian.org/svn/debian-edu/trunk/src/build/CD write a debconf pre-seeding sanitizer: document questions that cause problems when preseeded: base-config base-config/main-menu base-config base-config/late_command base-config base-config/early_command base-config apt-setup/uri_type d-i debconf/priority debconf debconf/priority xserver-xfree86 (many hardware-specific ones) simple-cdd-0.3.14/simple-cdd.templates0000644000000000000000000000030311272507072014446 0ustar Template: simple-cdd/profiles Type: multiselect Choices: CHOICES Default: DEFAULTS Description: Select profiles profiles are a simple description of common system types. select all that apply.