Cannot get program to create debian Cds

If none of the more specific forums is the right place to ask

Cannot get program to create debian Cds

Postby Marcipicus » 2014-01-17 15:56

Hi there,

I was trying to get the entire source code repository of debian wheezy on a debian cd like the images you can download from the debian site. Anyways I did some research on the internet and I think I needed the debian-cd program(probably the wrong program I should just mirror the site and take the hit in bandwidth use).

Here's the problem I downloaded the program and it looks as if debian-cd is not installed and there were some suspicious packages that were installed along with it namely fakeroot which I don't really trust since someone with the authority to create those cds probably also has root on their machine.

Here's the output from apt-get install debian-cd. I'm concerned with the fakeroot program in particular which you can see in the required packages. http://packages.debian.org/wheezy/fakeroot. I would personally say that code that "simulates" a root environment basically gives them root privileges. Maybe I'm ignorant.
Code: Select all
root@dt-kitchen:/home/ike# apt-get install debian-cd
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libcec1 libhal-storage1 libhal1 libmicrohttpd10 libnfs1 libpcrecpp0
  libshairport1 libtinyxml2.6.2 libva-glx1 xbmc-bin
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  build-essential curl dctrl-tools dpkg-dev fakeroot g++ g++-4.7 gcc gcc-4.7
  hfsutils libalgorithm-diff-perl libalgorithm-diff-xs-perl
  libalgorithm-merge-perl libc-dev-bin libc6-dev libcrypt-passwdmd5-perl
  libcurl3 libdpkg-perl libfile-fcntllock-perl libitm1 libstdc++6-4.7-dev
  linux-libc-dev lynx-cur make manpages-dev mtools syslinux-common tofrodos
Suggested packages:
  debtags debian-keyring g++-multilib g++-4.7-multilib gcc-4.7-doc
  libstdc++6-4.7-dbg gcc-multilib autoconf automake1.9 libtool flex bison gdb
  gcc-doc gcc-4.7-multilib libmudflap0-4.7-dev gcc-4.7-locales libgcc1-dbg
  libgomp1-dbg libitm1-dbg libquadmath0-dbg libmudflap0-dbg libcloog-ppl0
  libppl-c2 libppl7 binutils-gold hfsutils-tcltk glibc-doc libstdc++6-4.7-doc
  make-doc floppyd
The following NEW packages will be installed:
  build-essential curl dctrl-tools debian-cd dpkg-dev fakeroot g++ g++-4.7 gcc
  gcc-4.7 hfsutils libalgorithm-diff-perl libalgorithm-diff-xs-perl
  libalgorithm-merge-perl libc-dev-bin libc6-dev libcrypt-passwdmd5-perl
  libcurl3 libdpkg-perl libfile-fcntllock-perl libitm1 libstdc++6-4.7-dev
  linux-libc-dev lynx-cur make manpages-dev mtools syslinux-common tofrodos
0 upgraded, 29 newly installed, 0 to remove and 11 not upgraded.
Need to get 33.5 MB of archives.
After this operation, 85.9 MB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://ftp.ca.debian.org/debian/ wheezy/main libitm1 i386 4.7.2-5 [36.2 kB]
Get:2 http://ftp.ca.debian.org/debian/ wheezy/main libc-dev-bin i386 2.13-38 [217 kB]
Get:3 http://security.debian.org/ wheezy/updates/main libcurl3 i386 7.26.0-1+wheezy7 [335 kB]
Get:4 http://ftp.ca.debian.org/debian/ wheezy/main linux-libc-dev i386 3.2.51-1 [814 kB]
Get:5 http://security.debian.org/ wheezy/updates/main curl i386 7.26.0-1+wheezy7 [268 kB]
Get:6 http://ftp.ca.debian.org/debian/ wheezy/main libc6-dev i386 2.13-38 [4,935 kB]
Get:7 http://ftp.ca.debian.org/debian/ wheezy/main gcc-4.7 i386 4.7.2-5 [8,267 kB]
Get:8 http://ftp.ca.debian.org/debian/ wheezy/main gcc i386 4:4.7.2-1 [5,062 B]
Get:9 http://ftp.ca.debian.org/debian/ wheezy/main libstdc++6-4.7-dev i386 4.7.2-5 [1,711 kB]
Get:10 http://ftp.ca.debian.org/debian/ wheezy/main g++-4.7 i386 4.7.2-5 [7,786 kB]
Get:11 http://ftp.ca.debian.org/debian/ wheezy/main g++ i386 4:4.7.2-1 [1,372 B]
Get:12 http://ftp.ca.debian.org/debian/ wheezy/main make i386 3.81-8.2 [398 kB]
Get:13 http://ftp.ca.debian.org/debian/ wheezy/main libdpkg-perl all 1.16.12 [951 kB]
Get:14 http://ftp.ca.debian.org/debian/ wheezy/main dpkg-dev all 1.16.12 [1,349 kB]
Get:15 http://ftp.ca.debian.org/debian/ wheezy/main build-essential i386 11.5 [7,190 B]
Get:16 http://ftp.ca.debian.org/debian/ wheezy/main dctrl-tools i386 2.22.2 [161 kB]
Get:17 http://ftp.ca.debian.org/debian/ wheezy/main fakeroot i386 1.18.4-2 [107 kB]
Get:18 http://ftp.ca.debian.org/debian/ wheezy/main libalgorithm-diff-perl all 1.19.02-2 [51.5 kB]
Get:19 http://ftp.ca.debian.org/debian/ wheezy/main libalgorithm-diff-xs-perl i386 0.04-2+b1 [13.3 kB]
Get:20 http://ftp.ca.debian.org/debian/ wheezy/main libalgorithm-merge-perl all 0.08-2 [13.5 kB]
Get:21 http://ftp.ca.debian.org/debian/ wheezy/main libcrypt-passwdmd5-perl all 1.3-10 [10.5 kB]
Get:22 http://ftp.ca.debian.org/debian/ wheezy/main libfile-fcntllock-perl i386 0.14-2 [17.2 kB]
Get:23 http://ftp.ca.debian.org/debian/ wheezy/main manpages-dev all 3.44-1 [1,737 kB]
Get:24 http://ftp.ca.debian.org/debian/ wheezy/main mtools i386 4.0.17-1 [196 kB]
Get:25 http://ftp.ca.debian.org/debian/ wheezy/main syslinux-common all 2:4.05+dfsg-6+deb7u1 [934 kB]
Get:26 http://ftp.ca.debian.org/debian/ wheezy/main tofrodos i386 1.7.9.debian.1-1 [21.6 kB]
Get:27 http://ftp.ca.debian.org/debian/ wheezy/main lynx-cur i386 2.8.8dev.12-2 [2,214 kB]
Get:28 http://ftp.ca.debian.org/debian/ wheezy/main debian-cd all 3.1.13 [885 kB]
Get:29 http://ftp.ca.debian.org/debian/ wheezy/main hfsutils i386 3.2.6-11 [74.4 kB]
Fetched 33.5 MB in 1min 41s (329 kB/s)                                         
Selecting previously unselected package libcurl3:i386.
(Reading database ... 154161 files and directories currently installed.)
Unpacking libcurl3:i386 (from .../libcurl3_7.26.0-1+wheezy7_i386.deb) ...
Selecting previously unselected package libitm1:i386.
Unpacking libitm1:i386 (from .../libitm1_4.7.2-5_i386.deb) ...
Selecting previously unselected package libc-dev-bin.
Unpacking libc-dev-bin (from .../libc-dev-bin_2.13-38_i386.deb) ...
Selecting previously unselected package linux-libc-dev:i386.
Unpacking linux-libc-dev:i386 (from .../linux-libc-dev_3.2.51-1_i386.deb) ...
Selecting previously unselected package libc6-dev:i386.
Unpacking libc6-dev:i386 (from .../libc6-dev_2.13-38_i386.deb) ...
Selecting previously unselected package gcc-4.7.
Unpacking gcc-4.7 (from .../gcc-4.7_4.7.2-5_i386.deb) ...
Selecting previously unselected package gcc.
Unpacking gcc (from .../gcc_4%3a4.7.2-1_i386.deb) ...
Selecting previously unselected package libstdc++6-4.7-dev.
Unpacking libstdc++6-4.7-dev (from .../libstdc++6-4.7-dev_4.7.2-5_i386.deb) ...
Selecting previously unselected package g++-4.7.
Unpacking g++-4.7 (from .../g++-4.7_4.7.2-5_i386.deb) ...
Selecting previously unselected package g++.
Unpacking g++ (from .../g++_4%3a4.7.2-1_i386.deb) ...
Selecting previously unselected package make.
Unpacking make (from .../make_3.81-8.2_i386.deb) ...
Selecting previously unselected package libdpkg-perl.
Unpacking libdpkg-perl (from .../libdpkg-perl_1.16.12_all.deb) ...
Selecting previously unselected package dpkg-dev.
Unpacking dpkg-dev (from .../dpkg-dev_1.16.12_all.deb) ...
Selecting previously unselected package build-essential.
Unpacking build-essential (from .../build-essential_11.5_i386.deb) ...
Selecting previously unselected package curl.
Unpacking curl (from .../curl_7.26.0-1+wheezy7_i386.deb) ...
Selecting previously unselected package dctrl-tools.
Unpacking dctrl-tools (from .../dctrl-tools_2.22.2_i386.deb) ...
Selecting previously unselected package fakeroot.
Unpacking fakeroot (from .../fakeroot_1.18.4-2_i386.deb) ...
Selecting previously unselected package libalgorithm-diff-perl.
Unpacking libalgorithm-diff-perl (from .../libalgorithm-diff-perl_1.19.02-2_all.deb) ...
Selecting previously unselected package libalgorithm-diff-xs-perl.
Unpacking libalgorithm-diff-xs-perl (from .../libalgorithm-diff-xs-perl_0.04-2+b1_i386.deb) ...
Selecting previously unselected package libalgorithm-merge-perl.
Unpacking libalgorithm-merge-perl (from .../libalgorithm-merge-perl_0.08-2_all.deb) ...
Selecting previously unselected package libcrypt-passwdmd5-perl.
Unpacking libcrypt-passwdmd5-perl (from .../libcrypt-passwdmd5-perl_1.3-10_all.deb) ...
Selecting previously unselected package libfile-fcntllock-perl.
Unpacking libfile-fcntllock-perl (from .../libfile-fcntllock-perl_0.14-2_i386.deb) ...
Selecting previously unselected package manpages-dev.
Unpacking manpages-dev (from .../manpages-dev_3.44-1_all.deb) ...
Selecting previously unselected package mtools.
Unpacking mtools (from .../mtools_4.0.17-1_i386.deb) ...
Selecting previously unselected package syslinux-common.
Unpacking syslinux-common (from .../syslinux-common_2%3a4.05+dfsg-6+deb7u1_all.deb) ...
Selecting previously unselected package tofrodos.
Unpacking tofrodos (from .../tofrodos_1.7.9.debian.1-1_i386.deb) ...
Selecting previously unselected package lynx-cur.
Unpacking lynx-cur (from .../lynx-cur_2.8.8dev.12-2_i386.deb) ...
Selecting previously unselected package debian-cd.
Unpacking debian-cd (from .../debian-cd_3.1.13_all.deb) ...
Selecting previously unselected package hfsutils.
Unpacking hfsutils (from .../hfsutils_3.2.6-11_i386.deb) ...
Processing triggers for man-db ...
Processing triggers for install-info ...
Processing triggers for doc-base ...
Processing 1 added doc-base file...
Registering documents with scrollkeeper...
Processing triggers for menu ...
Processing triggers for mime-support ...
Setting up libcurl3:i386 (7.26.0-1+wheezy7) ...
Setting up libitm1:i386 (4.7.2-5) ...
Setting up libc-dev-bin (2.13-38) ...
Setting up linux-libc-dev:i386 (3.2.51-1) ...
Setting up libc6-dev:i386 (2.13-38) ...
Setting up gcc-4.7 (4.7.2-5) ...
Setting up gcc (4:4.7.2-1) ...
Setting up make (3.81-8.2) ...
Setting up libdpkg-perl (1.16.12) ...
Setting up dpkg-dev (1.16.12) ...
Setting up curl (7.26.0-1+wheezy7) ...
Setting up dctrl-tools (2.22.2) ...
Setting up fakeroot (1.18.4-2) ...
update-alternatives: using /usr/bin/fakeroot-sysv to provide /usr/bin/fakeroot (fakeroot) in auto mode
Setting up libalgorithm-diff-perl (1.19.02-2) ...
Setting up libalgorithm-diff-xs-perl (0.04-2+b1) ...
Setting up libalgorithm-merge-perl (0.08-2) ...
Setting up libcrypt-passwdmd5-perl (1.3-10) ...
Setting up libfile-fcntllock-perl (0.14-2) ...
Setting up manpages-dev (3.44-1) ...
Setting up mtools (4.0.17-1) ...
Setting up syslinux-common (2:4.05+dfsg-6+deb7u1) ...
Setting up tofrodos (1.7.9.debian.1-1) ...
Setting up lynx-cur (2.8.8dev.12-2) ...
update-alternatives: using /usr/bin/lynx to provide /usr/bin/www-browser (www-browser) in auto mode
Setting up debian-cd (3.1.13) ...
Setting up hfsutils (3.2.6-11) ...
Setting up g++-4.7 (4.7.2-5) ...
Setting up g++ (4:4.7.2-1) ...
update-alternatives: using /usr/bin/g++ to provide /usr/bin/c++ (c++) in auto mode
Setting up build-essential (11.5) ...
Setting up libstdc++6-4.7-dev (4.7.2-5) ...
Processing triggers for menu ...


The following was run right after
Code: Select all
root@dt-kitchen:/home/ike# man debian-cd
No manual entry for debian-cd
root@dt-kitchen:/home/ike# info debian-cd
root@dt-kitchen:/home/ike# debian-cd
bash: debian-cd: command not found



So does anybody know the reason that this package is broken?
Marcipicus
 
Posts: 14
Joined: 2014-01-17 15:30

Re: Cannot get program to create debian Cds

Postby kiyop » 2014-01-17 16:22

I found
http://xpt.sourceforge.net/techdocs/nix ... CD/single/
although I am not familiar with "debian-cd" package.
Openbox, JWM: Jessie, Sid, Arch / Win XP (on VirtualBox), 10
http://kiyoandkei.bbs.fc2.com/
User avatar
kiyop
 
Posts: 3984
Joined: 2011-05-05 15:16
Location: Where persons without desire to improve themselves fear to tread, in Japan

Re: Cannot get program to create debian Cds

Postby Marcipicus » 2014-01-19 16:06

Just found something else out. Was trying to download simple-cdd to create debian cds. Downloaded the source package couldn't find any source that could build a debian cd as far as i could tell. Downloaded the binary and it turns out that the only script available is the script to build simple-cdd. By the way I'm using wheezy.

Here's the install
Code: Select all
root@dt-kitchen:/home/name# apt-get install simple-cdd
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  dctrl-tools debian-cd debootstrap edos-debcheck edos-distcheck hfsutils
  libcrypt-passwdmd5-perl librpm3 librpmio3 mtools reprepro rpm-common
  syslinux-common tofrodos
Suggested packages:
  debtags hfsutils-tcltk floppyd gnupg-agent inoticoming lzip qemu-system
  qemu-kvm
The following NEW packages will be installed:
  dctrl-tools debian-cd debootstrap edos-debcheck edos-distcheck hfsutils
  libcrypt-passwdmd5-perl librpm3 librpmio3 mtools reprepro rpm-common
  simple-cdd syslinux-common tofrodos
0 upgraded, 15 newly installed, 0 to remove and 11 not upgraded.
Need to get 4,031 kB/6,313 kB of archives.
After this operation, 13.2 MB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://ftp.ca.debian.org/debian/ wheezy/main librpmio3 i386 4.10.0-5+deb7u1 [998 kB]
Get:2 http://ftp.ca.debian.org/debian/ wheezy/main librpm3 i386 4.10.0-5+deb7u1 [1,104 kB]
Get:3 http://ftp.ca.debian.org/debian/ wheezy/main edos-distcheck i386 1.4.2-13+b1 [395 kB]
Get:4 http://ftp.ca.debian.org/debian/ wheezy/main edos-debcheck all 1.0-9 [3,176 B]
Get:5 http://ftp.ca.debian.org/debian/ wheezy/main rpm-common i386 4.10.0-5+deb7u1 [942 kB]
Get:6 http://ftp.ca.debian.org/debian/ wheezy/main debootstrap all 1.0.48+deb7u1 [60.6 kB]
Get:7 http://ftp.ca.debian.org/debian/ wheezy/main reprepro i386 4.12.5-1 [493 kB]
Get:8 http://ftp.ca.debian.org/debian/ wheezy/main simple-cdd all 0.3.14 [34.9 kB]
Fetched 4,031 kB in 12s (322 kB/s)                                             
Selecting previously unselected package dctrl-tools.
(Reading database ... 159544 files and directories currently installed.)
Unpacking dctrl-tools (from .../dctrl-tools_2.22.2_i386.deb) ...
Selecting previously unselected package librpmio3.
Unpacking librpmio3 (from .../librpmio3_4.10.0-5+deb7u1_i386.deb) ...
Selecting previously unselected package librpm3.
Unpacking librpm3 (from .../librpm3_4.10.0-5+deb7u1_i386.deb) ...
Selecting previously unselected package edos-distcheck.
Unpacking edos-distcheck (from .../edos-distcheck_1.4.2-13+b1_i386.deb) ...
Selecting previously unselected package edos-debcheck.
Unpacking edos-debcheck (from .../edos-debcheck_1.0-9_all.deb) ...
Selecting previously unselected package libcrypt-passwdmd5-perl.
Unpacking libcrypt-passwdmd5-perl (from .../libcrypt-passwdmd5-perl_1.3-10_all.deb) ...
Selecting previously unselected package mtools.
Unpacking mtools (from .../mtools_4.0.17-1_i386.deb) ...
Selecting previously unselected package rpm-common.
Unpacking rpm-common (from .../rpm-common_4.10.0-5+deb7u1_i386.deb) ...
Selecting previously unselected package syslinux-common.
Unpacking syslinux-common (from .../syslinux-common_2%3a4.05+dfsg-6+deb7u1_all.deb) ...
Selecting previously unselected package tofrodos.
Unpacking tofrodos (from .../tofrodos_1.7.9.debian.1-1_i386.deb) ...
Selecting previously unselected package debian-cd.
Unpacking debian-cd (from .../debian-cd_3.1.13_all.deb) ...
Selecting previously unselected package debootstrap.
Unpacking debootstrap (from .../debootstrap_1.0.48+deb7u1_all.deb) ...
Selecting previously unselected package hfsutils.
Unpacking hfsutils (from .../hfsutils_3.2.6-11_i386.deb) ...
Selecting previously unselected package reprepro.
Unpacking reprepro (from .../reprepro_4.12.5-1_i386.deb) ...
Selecting previously unselected package simple-cdd.
Unpacking simple-cdd (from .../simple-cdd_0.3.14_all.deb) ...
Processing triggers for man-db ...
Processing triggers for install-info ...
Processing triggers for doc-base ...
Processing 1 added doc-base file...
Registering documents with scrollkeeper...
Setting up dctrl-tools (2.22.2) ...
Setting up librpmio3 (4.10.0-5+deb7u1) ...
Setting up librpm3 (4.10.0-5+deb7u1) ...
Setting up edos-distcheck (1.4.2-13+b1) ...
Setting up edos-debcheck (1.0-9) ...
Setting up libcrypt-passwdmd5-perl (1.3-10) ...
Setting up mtools (4.0.17-1) ...
Setting up rpm-common (4.10.0-5+deb7u1) ...
Setting up syslinux-common (2:4.05+dfsg-6+deb7u1) ...
Setting up tofrodos (1.7.9.debian.1-1) ...
Setting up debian-cd (3.1.13) ...
Setting up debootstrap (1.0.48+deb7u1) ...
Setting up hfsutils (3.2.6-11) ...
Setting up reprepro (4.12.5-1) ...
Setting up simple-cdd (0.3.14) ...


Here's the research on my system
Code: Select all
root@dt-kitchen:/bin# cd /usr/bin
root@dt-kitchen:/usr/bin# file simple-cdd
simple-cdd: symbolic link to `../share/simple-cdd/build-simple-cdd'
root@dt-kitchen:/usr/bin# file ../share/simple-cdd/build-simple-cdd
../share/simple-cdd/build-simple-cdd: POSIX shell script, ASCII text executable


Code: Select all
name@dt-kitchen:~/simplecdd/simple-cdd-0.3.14$ simple-cdd
debconf: DbDriver "passwords" warning: could not open /var/cache/debconf/passwords.dat: Permission denied
Trying to run debootstrap for i386 architecture
I: Retrieving Release
^CE: Interrupt caught ... exiting



So can anyone tell me why a program that is meant to build debian cds needs to access the password store???
Considering the fact that a normal user under default security can read almost anything on the computer (which is all this program needs to do)
I cannot see any reason for this program to be doing this. There are probably severe security issues with all linux if this kind of shit is allowed and never checked
out independently.

here's build-simple-cdd which was run, in case anyone wants to see what was run without installing the program.
Code: Select all
#!/bin/sh

# Copyright 2004-2007 Vagrant Cascadian <vagrant@freegeek.org>.  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<<EOF
simple-cdd - create custom debian-installer CDs

Usage:
--conf  specify a configuration file
--dist  specify distribution (etch, lenny, sid)
--graphical-installer|-g  enable graphical installer by default
--serial-console|-s  set defaults for serial console
--do-mirror  generate mirror
--no-do-mirror  do not generate mirror
--profiles|-p  select profiles (examples in profiles/ dir)
--build-profiles|-b  profiles only used while building the CD
--auto-profiles|-a  automatically install these profiles
--local-packages  list of files included on CD's local package repository
--locale  select locale
--keyboard  select keyboard (console-keymaps-at/keymap debconf question)
--debian-mirror  specify debian mirror. default: ftp://ftp.us.debian.org/debian
--security-mirror  specify security mirror. default: http://security.debian.org/
--proposed-updates  specify if proposed updates should be used. default is no.
--mirror-tools  list the mirror tools to be used
--build-tools  list the build tools to be used
--kernel-packages  list of kernel packages to include on the CD
--help|-h  display this help
--qemu|-q  use qemu to test the image
--force-preseed  only issue a warning if a preseeding file is invalid
--force-root  allow running as root
--profiles-udeb-dist  pull simple-cdd-profiles udeb from other distribution
--extra-udeb-dist  also pull in udebs from specified distribution
--require-optional-packages  fail if missing optional packages (*.downloads)
EOF
}

commandline_opts="$@"
while [ -n "$1" ]; do
  opt=${1}
  case "${opt}" in
    --conf)
      if [ -f "$2" ]; then
            . "$2"
        else
            echo "ERROR: simple-cdd configuration file not found: $2"
            exit 1
      fi
      shift ;;
    --dist) export CODENAME="$2"
      shift ;;
    -g|--g|--graphical-installer) export ISOLINUX_DEFAULT="installgui" ;;
    --serial-console|-s) use_serial_console="true" ;;
    --do-mirror) do_mirror="true" ;;
    --no-do-mirror) do_mirror="false" ;;
    --profiles|-p) profiles="$2"
      shift ;;
    --build-profiles|-b) build_profiles="$2"
      shift ;;
    --auto-profiles|-a) auto_profiles="$2"
      shift ;;
    --local-packages) local_packages="$2"
      shift ;;
    --locale) locale="$2"
      shift ;;
    --keyboard) keyboard="$2"
      shift ;;
    --debian-mirror) debian_mirror="$2"
      shift ;;
    --security-mirror) security_mirror="$2"
      shift ;;
    --proposed-updates) proposed_updates="true"
      shift ;;
    --mirror-tools) mirror_tools="$2"
      shift ;;
    --build-tools) build_tools="$2"
      shift ;;
    --kernel-packages) kernel_packages="$2"
      shift ;;
    --help|-h) get_help
      exit 0 ;;
    --qemu|-q) use_qemu="true" ;;
    --force-preseed) force_preseed="true" ;;
    --profiles-udeb-dist) profiles_udeb_dist="$2"
      shift ;;
    --extra-udeb-dist) extra_udeb_dist="$2"
      shift ;;
    --require-optional-packages) export require_optional_packages="true" ;;
    --force-root) force_root="true" ;;
    *) get_help "ERROR: unknown commandline option: $1" > /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


I used to love debian it was the second distribution that I used and it was pretty dependable around version 5.
This is kind of making me rethink the whole open source concept though. If the NSA and CIA are putting backdoors into windows
then who knows what they put in here.
Marcipicus
 
Posts: 14
Joined: 2014-01-17 15:30

Re: Cannot get program to create debian Cds

Postby M51 » 2014-01-19 22:20

Where to begin?

First, you should try reading the documentation for the tools you are attempting to use. The debian-cd package does not contain an executable called debian-cd. Why did you assume it would? The package is not broken.

Second, simple-cdd depends on the debian-cd package to build an image. Think of it as a front-end.

Third, the passwords.dat file does not contain your root or user passwords. It is part of debconf, which is Debian's packaging system. Debconf is needed when building a cd image to verify the list of packages being fed to it are actually present. If you look at the simple-cdd script, you'll see it is running debconf-set-selections --checkonly against a list of files. Because you are not root, the security message is generated.

Finally:
"This is kind of making me rethink the whole open source concept though. If the NSA and CIA are putting backdoors into windows
then who knows what they put in here."

LOL.
<sarcasm>
Oh yes, closed source code form a mega-corporation that freely cooperates with spy agencies is FAR better than code that tells you exactly what it freaking does!
</sarcasm>
M51
 
Posts: 397
Joined: 2013-05-13 01:38

Re: Cannot get program to create debian Cds

Postby llivv » 2014-01-19 22:48

The concept behind fakeroot is to allow normal user to run a program without having to use root.
If you want to use root to run the programs that use fakeroot it may be possible, ( more as time premits )

If I understand correctly, the maintainers of debian-cd are working on updating it.
( I'll assume the maintainers have been very busy with other responsibilities and are tackling debian-cd now. )
Please be patient, it may take a while to get into stable.
In memory of Ian Ashley Murdock (1973 - 2015) founder of the Debian project.
User avatar
llivv
 
Posts: 5484
Joined: 2007-02-14 18:10
Location: cold storage

Re: Cannot get program to create debian Cds

Postby Marcipicus » 2014-01-20 01:24

One last thing if I were working on the debian project I would probably get a little suspicious of the two guys trying to defend a hacker kit getting passed off as a tool to build debian cds.
Marcipicus
 
Posts: 14
Joined: 2014-01-17 15:30

Re: Cannot get program to create debian Cds

Postby vbrummond » 2014-01-20 02:55

There is no need to talk like that. I am moving the post, and giving you an opportunity to rewrite it and actually get help on the issue.
Always on Debian Testing
vbrummond
 
Posts: 4468
Joined: 2010-03-02 01:42

Re: Cannot get program to create debian Cds

Postby Marcipicus » 2014-01-20 15:16

Look I was just a bit pissed about being called an idiot when I know for certain the NSA would definitely put backdoors into linux and they could probably get away with it if they have the right people inside(or on the outside and just insert their own code into the repositories). Considering the fact that they are trying to fight a cyber war they would certainly try to control or compromise any project which is capable of hacking their systems.

And for those who doubt that it was a hacking kit there are new daemons on my system; exim4, an smtp server probably to be used for spamming email, and rpc servers which i do not need. Neither of these were installed by me and who knows what else was installed along with it. There could be another rootkit besides fakeroot on there now.

I'm just going to reinstall debian because that's the only way that I know that it's gone for sure.

And for anyone who is concerned about security the hacking exposed series is excellent to learn this stuff from. Some of the tools might be outdated but it helps to understand the exploits. A bit more on firewalls and defense could be used but it tells you what is possible.
Marcipicus
 
Posts: 14
Joined: 2014-01-17 15:30

Re: Cannot get program to create debian Cds

Postby Marcipicus » 2014-01-20 15:37

What about the other guy ignoring all the evidence that your mirror got hacked then calling me an idiot for saying that a project whose membership is open without background checks. With enough work anyone can get to a position of privilege and do whatever they need to with that privilege. Do you think that the nsa is seriously going to leave linux alone? Do you think that the cia doesn't have people who can infiltrate a group with open membership perhaps a maintainer or a moderator. Someone with enough privilege to modify a package without anyone noticing (or hack a mirror). Let alone the people who probably did it who were creating a click server or a spam bot.

So did my post get moved to the abyss or is still around somewhere because I did have some good points in there. It seems to me you'll put up with a mouthy 16 year old who knows nothing about this world or the people in it but you won't allow someone who got screwed over by a trusted system to explain himself and his concerns. You people just want to sweep this under the rug like it never happened I know for certain that the ftp.ca.debian mirror got hacked because of the stuff that was installed without my knowledge. Namely Exim4 an smtp server, and rpcbind neither of which I installed.
Last edited by Marcipicus on 2014-01-20 20:51, edited 1 time in total.
Marcipicus
 
Posts: 14
Joined: 2014-01-17 15:30

Re: Cannot get program to create debian Cds

Postby M51 » 2014-01-20 16:02

Marcipicus,

I certainly didn't call you an idiot, even though you're throwing around insinuations that I'm defending a 'hacker kit' because what...I'm a black hat hacker, or NSA spook?

I can't speak about the ftp.ca.debian mirror because I don't use it, but I certainly haven't seen any evidence on this thread. Everything you've posted here has been your misunderstanding of how the debian-cd and simple-cdd packages work. Something which could be resolved by simply reading the documentation.

If you don't trust the package 'fakeroot' (which is used by several build tools by the way, e.g. look at the dependencies of apt-build) then download the source for said package and read it. It's not that difficult. :roll:
M51
 
Posts: 397
Joined: 2013-05-13 01:38

Re: Cannot get program to create debian Cds

Postby Marcipicus » 2014-01-20 16:23

Why does a package to create cds require lynx-cur a console based web browser. Why do they use fakeroot when that machine should use file permissions instead to allow access to packages. Why does it require development manpages. Why does it require package tofrodos which converts windows file line endings to linux type line endings. Where is the interaction with windows here because I do not see it.

Look at the packages that were installed that's all you have to do to understand what I'm saying. There is one package to be installed now from the canadian mirror, debian-cd that is it.

P.S. I am not making this up that mirror was hacked at the very least
Marcipicus
 
Posts: 14
Joined: 2014-01-17 15:30

Re: Cannot get program to create debian Cds

Postby Marcipicus » 2014-01-20 16:35

Do you not think it's a security risk to give root access to non-root users on a build and development server?
Marcipicus
 
Posts: 14
Joined: 2014-01-17 15:30

Re: Cannot get program to create debian Cds

Postby stevepusser » 2014-01-20 16:44

Sigh. So now you know for sure that all of Debian is riddled with NSA backdoors.

The jig is up, boys, he's on to us! Time to take it on the lam! Last one out, turn off the servers.

It is difficult to hide malicious code when it's out there for anyone in the world to inspect. There are very good reasons to include those packages and have fakeroot, just because you don't understand them does not mean they are there for malicious reasons.

Contrast this with the NSA paying RSA $10 million to include and make their broken, slow, backdoored pseudorandom number generator the default method used in their for-sale toolkit--that would never fly in Debian. Why do you think closed-source firmware blobs are also mistrusted?
The MX Linux repositories: Backports galore! If we don't have something, just ask and we'll try--we like challenges. New packages: LibreOffice 7.0.0, QMPlay2 20.07.04, Pale Moon 28.12.0, KeepassXC 2.6.0, Arqiver 0.6.0+git, Foliate 2.4.2
User avatar
stevepusser
 
Posts: 11891
Joined: 2009-10-06 05:53

Re: Cannot get program to create debian Cds

Postby Marcipicus » 2014-01-20 17:27

So how does a web browser tie into the dependency needs of debian-cd. I'm ignorant I know it's useful some how.

Please, enlighten me.
Marcipicus
 
Posts: 14
Joined: 2014-01-17 15:30

Re: Cannot get program to create debian Cds

Postby M51 » 2014-01-20 21:08

Marcipicus wrote:So how does a web browser tie into the dependency needs of debian-cd.


It's for documentation.
Lynx's dump command line switch is used by the bash script /usr/share/debian-cd/tools/add-bin-doc" to read a README.html file and output a formatted README.txt. This same script (same line actually) also uses a command from the package tofrodos to make the file readable on Windows machines.

Really, how hard is it to look this stuff up?
I guess that's less fun than playing chicken little.


Marcipicus wrote:I'm ignorant


No comment.
M51
 
Posts: 397
Joined: 2013-05-13 01:38

Next

Return to General Questions

Who is online

Users browsing this forum: No registered users and 5 guests

fashionable