veewee 0.3.10 → 0.3.11

Sign up to get free protection for your applications and to get access to all the features.
Files changed (30) hide show
  1. data/doc/kvm.md +1 -1
  2. data/lib/veewee/provider/virtualbox/box.rb +0 -2
  3. data/lib/veewee/version.rb +1 -1
  4. data/templates/gentoo-latest-amd64/cleanup.sh +4 -0
  5. data/templates/gentoo-latest-amd64/definition.rb +1 -1
  6. data/templates/gentoo-latest-amd64/kernel.sh +2 -0
  7. data/templates/gentoo-latest-amd64/reboot.sh +2 -1
  8. data/templates/gentoo-latest-amd64/usb.sh +11 -0
  9. data/templates/gentoo-latest-amd64/vagrant.sh +5 -0
  10. data/templates/gentoo-latest-i686/{chef.sh → add_chef.sh} +0 -0
  11. data/templates/gentoo-latest-i686/{puppet.sh → add_puppet.sh} +0 -0
  12. data/templates/gentoo-latest-i686/add_vim.sh +22 -0
  13. data/templates/gentoo-latest-i686/base.sh +75 -4
  14. data/templates/gentoo-latest-i686/cleanup.sh +5 -1
  15. data/templates/gentoo-latest-i686/definition.rb +8 -6
  16. data/templates/gentoo-latest-i686/git.sh +21 -0
  17. data/templates/gentoo-latest-i686/grub.sh +12 -12
  18. data/templates/gentoo-latest-i686/kernel.sh +5 -3
  19. data/templates/gentoo-latest-i686/reboot.sh +2 -1
  20. data/templates/gentoo-latest-i686/{ruby_portage.sh → ruby.sh} +2 -2
  21. data/templates/gentoo-latest-i686/settings.sh +9 -6
  22. data/templates/gentoo-latest-i686/subversion.sh +5 -0
  23. data/templates/gentoo-latest-i686/usb.sh +11 -0
  24. data/templates/gentoo-latest-i686/vagrant.sh +38 -4
  25. data/templates/gentoo-latest-i686/virtualbox.sh +10 -4
  26. data/templates/gentoo-latest-i686/wipe_sources.sh +10 -0
  27. data/templates/gentoo-latest-i686/zerodisk.sh +1 -1
  28. data/veewee.gemspec +0 -1
  29. metadata +12 -23
  30. data/templates/gentoo-latest-i686/ruby_source.sh +0 -15
data/doc/kvm.md CHANGED
@@ -21,7 +21,7 @@ To check if your kernel can run kvm:
21
21
  $ kvm_ok
22
22
 
23
23
  # or look for vmx or svm in /proc/cpuinfo
24
- $ egrep '^flags.*(vmx|svm)' /proc/cpuinfo
24
+ $ grep '^flags' /proc/cpuinfo | grep -E --color '(vmx|svm)'
25
25
 
26
26
  The kernel modules needed are the following: `kvm`, `kvm_intel` or `kvm-amd`.
27
27
 
@@ -22,8 +22,6 @@ require 'veewee/provider/virtualbox/box/helper/buildinfo'
22
22
  require 'veewee/provider/virtualbox/box/helper/console_type'
23
23
  require 'veewee/provider/virtualbox/box/up'
24
24
 
25
- require 'whichr'
26
-
27
25
  module Veewee
28
26
  module Provider
29
27
  module Virtualbox
@@ -4,5 +4,5 @@ end
4
4
 
5
5
  # Only set the version constant if it wasn't set before
6
6
  unless defined?(Veewee::VERSION)
7
- ::Veewee::VERSION="0.3.10"
7
+ ::Veewee::VERSION="0.3.11"
8
8
  end
@@ -19,5 +19,9 @@ eclean -d distfiles
19
19
  rm /tmp/*
20
20
  rm -rf /var/log/*
21
21
  rm -rf /var/tmp/*
22
+ rm /etc/profile.d/settings.sh
23
+
24
+ # clean root
22
25
  rm -rf /root/.gem
26
+ #rm -rf /root/*
23
27
  DATAEOF
@@ -21,7 +21,6 @@ Veewee::Definition.declare({
21
21
  '<Wait>' * 30,
22
22
  '<Enter>',
23
23
  '<Wait>' * 20,
24
- '<Wait><Wait>ifconfig -a<Enter>',
25
24
  'passwd<Enter><Wait><Wait>',
26
25
  'vagrant<Enter><Wait>',
27
26
  'vagrant<Enter><Wait>',
@@ -42,6 +41,7 @@ Veewee::Definition.declare({
42
41
  'settings.sh',
43
42
  'base.sh',
44
43
  'kernel.sh',
44
+ 'usb.sh',
45
45
  'git.sh',
46
46
  'subversion.sh',
47
47
  'virtualbox.sh',
@@ -58,6 +58,8 @@ CONFIG_CIFS=m
58
58
  CONFIG_CIFS_UPCAL=y
59
59
  CONFIG_CIFS_XATTR=y
60
60
  CONFIG_CIFS_DFS_UPCALL=y
61
+ # for FUSE fs
62
+ CONFIG_FUSE_FS=m
61
63
  # reduce size
62
64
  CONFIG_NR_CPUS=$nr_cpus
63
65
  CONFIG_COMPAT_VDSO=n
@@ -1,4 +1,5 @@
1
1
  #!/bin/bash
2
2
  source /etc/profile
3
3
 
4
- reboot
4
+ /sbin/reboot
5
+ ps aux | grep sshd | grep -v grep | awk '{print $2}' | xargs kill
@@ -0,0 +1,11 @@
1
+ #!/bin/bash
2
+ source /etc/profile
3
+
4
+ # Set up for better USB support
5
+
6
+ # install usbutils (which includes 'lsusb') and libusb
7
+ chroot "$chroot" emerge sys-apps/usbutils
8
+
9
+ # add exFAT filesystem support.
10
+ # (exFAT requires a kernel with a FUSE module)
11
+ #chroot "$chroot" emerge sys-fs/fuse sys-fs/exfat-utils sys-fs/fuse-exfat
@@ -7,7 +7,12 @@ mkdir -p "$chroot/home/vagrant/.ssh"
7
7
  chmod 700 "$chroot/home/vagrant/.ssh"
8
8
  wget --no-check-certificate "$vagrant_ssh_key_url" -O "$chroot/home/vagrant/.ssh/authorized_keys"
9
9
  chmod 600 "$chroot/home/vagrant/.ssh/authorized_keys"
10
+
11
+ # record virtualbox version
10
12
  cp -f /root/.vbox_version "$chroot/home/vagrant/.vbox_version"
13
+ vbox_version=$(cat /root/.vbox_version)
14
+ echo "export vbox_version=$vbox_version" >> /etc/profile.d/settings.sh
15
+ cp /etc/profile.d/settings.sh $CHROOT/etc/profile.d/
11
16
 
12
17
  mkdir -p "$chroot/root/.ssh" 2> /dev/null
13
18
 
@@ -0,0 +1,22 @@
1
+ #!/bin/bash
2
+ source /etc/profile
3
+
4
+ # add required use flags and keywords
5
+ #cat <<DATAEOF >> "$chroot/etc/portage/package.use/vim"
6
+ #app-editors/vim minimal
7
+ #DATAEOF
8
+
9
+ cat <<DATAEOF >> "$chroot/etc/portage/package.accept_keywords/vim"
10
+ app-vim/bash-support ~x86 ~amd64
11
+ DATAEOF
12
+
13
+ # install vim
14
+ chroot "$chroot" emerge app-editors/vim
15
+
16
+
17
+ # install vim plugins
18
+ chroot "$chroot" emerge app-vim/puppet-syntax app-vim/bash-support
19
+
20
+ # install spf13 (experimental)
21
+ #chroot "$chroot" emerge dev-vcs/git # be aware of huge dependency
22
+ #chroot "$chroot" wget --no-check-certificate -qO- http://j.mp/spf13-vim3
@@ -24,15 +24,33 @@ wget -nv --tries=5 "$stage3url"
24
24
  tar xpf "$stage3file" && rm "$stage3file"
25
25
 
26
26
  # prepeare chroot, update env
27
- mount --bind /proc "$chroot/proc"
28
- mount --bind /dev "$chroot/dev"
27
+ mount -t proc none "$chroot/proc"
28
+ mount --rbind /dev "$chroot/dev"
29
29
 
30
30
  # copy nameserver information, save build timestamp
31
31
  cp /etc/resolv.conf "$chroot/etc/"
32
32
  date -u > "$chroot/etc/vagrant_box_build_time"
33
+
34
+ # retrieve and extract latest portage tarball
35
+ chroot "$chroot" wget --tries=5 "${portageurl}"
36
+ chroot "$chroot" tar -xjpf portage-latest.tar.bz2 -C /usr
37
+ chroot "$chroot" rm -rf portage-latest.tar.bz2
33
38
  chroot "$chroot" env-update
34
39
 
35
- # bring up eth0 and sshd on boot
40
+ # bring up network interface and sshd on boot (Alt. for new systemd naming scheme, enp0s3)
41
+ #chroot "$chroot" /bin/bash <<DATAEOF
42
+ #cd /etc/conf.d
43
+ #sed -i "s/eth0/enp0s3/" /etc/udhcpd.conf
44
+ #echo 'config_enp0s3=( "dhcp" )' >> net
45
+ #ln -s net.lo /etc/init.d/net.enp0s3
46
+ #rc-update add net.enp0s3 default
47
+ #rc-update add sshd default
48
+ #DATAEOF
49
+
50
+ # bring up network interface and sshd on boot (for older systemd naming scheme, eth0)
51
+ chroot "$chroot" /bin/bash <<DATAEOF
52
+ ln -s /dev/null /etc/udev/rules.d/80-net-name-slot.rules
53
+ DATAEOF
36
54
  chroot "$chroot" /bin/bash <<DATAEOF
37
55
  cd /etc/conf.d
38
56
  echo 'config_eth0=( "dhcp" )' >> net
@@ -61,13 +79,62 @@ ACCEPT_KEYWORDS="$accept_keywords"
61
79
  MAKEOPTS="-j$((1 + $nr_cpus)) -l$nr_cpus.5"
62
80
  EMERGE_DEFAULT_OPTS="-j$nr_cpus --quiet-build=y"
63
81
  FEATURES="\${FEATURES} parallel-fetch"
82
+ USE="nls cjk unicode"
83
+
84
+ PYTHON_TARGETS="python2_7 python3_2 python3_3"
85
+ USE_PYTHON="3.2 2.7"
64
86
 
65
87
  # english only
66
- LINGUAS=""
88
+ LINGUAS="en"
67
89
 
68
90
  # for X support if needed
69
91
  INPUT_DEVICES="evdev"
70
92
  VIDEO_CARDS="virtualbox"
93
+
94
+ # Additional portage overlays (space char separated)
95
+ PORTDIR_OVERLAY="/usr/local/portage"
96
+
97
+ # Including /usr/local/portage overlay
98
+ source "/usr/local/portage/make.conf"
99
+ DATAEOF
100
+
101
+ # Create an empty portage overlay
102
+ mkdir -p "$chroot/usr/local/portage"
103
+
104
+ touch "$chroot/usr/local/portage/make.conf"
105
+ chown root:portage "$chroot/usr/local/portage/make.conf"
106
+ chmod g+s "$chroot/usr/local/portage/make.conf"
107
+ chmod 775 "$chroot/usr/local/portage/make.conf"
108
+
109
+ mkdir -p "$chroot/usr/local/portage/profiles"
110
+ echo "local_repo" >> "$chroot/usr/local/portage/profiles/repo_name"
111
+ chown root:portage "$chroot/usr/local/portage" "$chroot/usr/local/portage/profiles/repo_name"
112
+ chmod g+s "$chroot/usr/local/portage" "$chroot/usr/local/portage/profiles/repo_name"
113
+ chmod 775 "$chroot/usr/local/portage" "$chroot/usr/local/portage/profiles/repo_name"
114
+
115
+ mkdir -p "$chroot/usr/local/portage/metadata"
116
+ echo "masters = gentoo" >> "$chroot/usr/local/portage/metadata/layout.conf"
117
+ chown root:portage "$chroot/usr/local/portage/metadata/layout.conf"
118
+ chmod g+s "$chroot/usr/local/portage/metadata/layout.conf"
119
+ chmod 775 "$chroot/usr/local/portage/metadata/layout.conf"
120
+
121
+ # This distribution does not like flags described in single files
122
+ # all 'package.*', except 'package.keywords', should be directories.
123
+ mkdir -p "$chroot/etc/portage/package.license"
124
+ mkdir -p "$chroot/etc/portage/package.use"
125
+ mkdir -p "$chroot/etc/portage/package.accept_keywords"
126
+ mkdir -p "$chroot/etc/portage/package.mask"
127
+ mkdir -p "$chroot/etc/portage/package.unmask"
128
+
129
+
130
+ # Some forced updates for this system
131
+ cat <<DATAEOF >> "$chroot/etc/portage/package.unmask/python-2.7"
132
+ =dev-lang/python-2.7.5*
133
+ DATAEOF
134
+
135
+ cat <<DATAEOF >> "$chroot/etc/portage/package.unmask/pam"
136
+ =sys-libs/pam-1.1.6-r2
137
+ =sys-libs/pam-1.1.7
71
138
  DATAEOF
72
139
 
73
140
  # set localtime
@@ -76,9 +143,13 @@ chroot "$chroot" ln -sf "/usr/share/zoneinfo/$timezone" /etc/localtime
76
143
  # set locale
77
144
  chroot "$chroot" /bin/bash <<DATAEOF
78
145
  echo LANG=\"$locale\" > /etc/env.d/02locale
146
+ echo LANG_ALL=\"$locale\" >> /etc/env.d/02locale
147
+ echo LANGUAGE=\"$locale\" >> /etc/env.d/02locale
79
148
  env-update && source /etc/profile
80
149
  DATAEOF
81
150
 
151
+ # NOTE: LC_ALL, LC_TYPE will be set in vagrant.sh
152
+
82
153
  # update portage tree to most current state
83
154
  # emerge-webrsync is recommended by Gentoo for first sync
84
155
  chroot "$chroot" emerge-webrsync
@@ -19,5 +19,9 @@ eclean -d distfiles
19
19
  rm /tmp/*
20
20
  rm -rf /var/log/*
21
21
  rm -rf /var/tmp/*
22
+ rm /etc/profile.d/settings.sh
23
+
24
+ # clean root
22
25
  rm -rf /root/.gem
23
- DATAEOF
26
+ #rm -rf /root/*
27
+ DATAEOF
@@ -21,7 +21,6 @@ Veewee::Definition.declare({
21
21
  '<Wait>' * 30,
22
22
  '<Enter>',
23
23
  '<Wait>' * 20,
24
- '<Wait><Wait>ifconfig -a<Enter>',
25
24
  'passwd<Enter><Wait><Wait>',
26
25
  'vagrant<Enter><Wait>',
27
26
  'vagrant<Enter><Wait>',
@@ -42,17 +41,20 @@ Veewee::Definition.declare({
42
41
  'settings.sh',
43
42
  'base.sh',
44
43
  'kernel.sh',
44
+ 'usb.sh',
45
+ 'git.sh',
46
+ 'subversion.sh',
45
47
  'virtualbox.sh',
46
48
  'vagrant.sh',
47
- #Choose your ruby way : source or portage?
48
- 'ruby_portage.sh',
49
- #'ruby_source.sh',
50
- 'chef.sh',
51
- 'puppet.sh',
49
+ 'ruby.sh',
50
+ 'add_chef.sh',
51
+ 'add_puppet.sh',
52
+ 'add_vim.sh',
52
53
  'cron.sh',
53
54
  'syslog.sh',
54
55
  'nfs.sh',
55
56
  'grub.sh',
57
+ 'wipe_sources.sh',
56
58
  'cleanup.sh',
57
59
  'zerodisk.sh',
58
60
  'reboot.sh'
@@ -0,0 +1,21 @@
1
+ #!/bin/bash
2
+ source /etc/profile
3
+
4
+ # remove git's dependency on 50+ perl modules.
5
+ cat <<DATAEOF >> "$chroot/etc/portage/package.use/git"
6
+ # git with no dependency
7
+ dev-vcs/git -curl -perl -gpg -webdav
8
+
9
+ # git with massive dependency with subversion support
10
+ #dev-vcs/git -gpg perl -webdav subversion
11
+ #>=dev-vcs/subversion-1.7.13 -dso perl
12
+ DATAEOF
13
+
14
+ # install git
15
+ chroot "$chroot" emerge dev-vcs/git
16
+
17
+ # for git-quiltimport
18
+ #chroot "$chroot" emerge dev-util/quilt
19
+ # for git-instaweb : || ( www-servers/lighttpd www-servers/apache)
20
+ #chroot "$chroot" emerge www-servers/lighttpd
21
+
@@ -1,24 +1,24 @@
1
1
  #!/bin/bash
2
2
  source /etc/profile
3
3
 
4
+ # use grub2
5
+ cat <<DATAEOF >> "$chroot/etc/portage/package.accept_keywords/grub"
6
+ sys-boot/grub:2
7
+ DATAEOF
8
+
4
9
  # install grub
5
10
  chroot "$chroot" emerge grub
6
11
 
7
- # add installed kernel entry
8
- cat <<DATAEOF > "$chroot/boot/grub/grub.conf"
9
- default 0
10
- timeout 1
11
-
12
- title=Gentoo Linux ($kernel_version-gentoo)
13
- root (hd0,0)
14
- kernel /boot/kernel-genkernel-x86-$kernel_version-gentoo root=/dev/ram0 real_root=/dev/sda4
15
- initrd /boot/initramfs-genkernel-x86-$kernel_version-gentoo
16
- DATAEOF
12
+ # tweak timeout
13
+ chroot "$chroot" sed -i "s/GRUB_TIMEOUT=.*/GRUB_TIMEOUT=1/g" /etc/default/grub
17
14
 
18
15
  # make the disk bootable
19
16
  chroot "$chroot" /bin/bash <<DATAEOF
20
17
  source /etc/profile && \
21
18
  env-update && \
22
19
  grep -v rootfs /proc/mounts > /etc/mtab && \
23
- grub-install --no-floppy /dev/sda
24
- DATAEOF
20
+ mkdir -p /boot/grub2 && \
21
+ ln -sf /boot/grub2 /boot/grub && \
22
+ grub2-mkconfig -o /boot/grub/grub.cfg && \
23
+ grub2-install --no-floppy /dev/sda
24
+ DATAEOF
@@ -2,13 +2,13 @@
2
2
  source /etc/profile
3
3
 
4
4
  # add required use flags and keywords
5
- cat <<DATAEOF >> "$chroot/etc/portage/package.use"
5
+ cat <<DATAEOF >> "$chroot/etc/portage/package.use/kernel"
6
6
  sys-kernel/gentoo-sources symlink
7
7
  sys-kernel/genkernel -cryptsetup
8
8
  DATAEOF
9
9
 
10
- cat <<DATAEOF >> "$chroot/etc/portage/package.keywords"
11
- dev-util/kbuild ~x86
10
+ cat <<DATAEOF >> "$chroot/etc/portage/package.accept_keywords/kernel"
11
+ dev-util/kbuild ~x86 ~amd64
12
12
  DATAEOF
13
13
 
14
14
  # get, configure, compile and install the kernel and modules
@@ -58,6 +58,8 @@ CONFIG_CIFS=m
58
58
  CONFIG_CIFS_UPCAL=y
59
59
  CONFIG_CIFS_XATTR=y
60
60
  CONFIG_CIFS_DFS_UPCALL=y
61
+ # for FUSE fs
62
+ CONFIG_FUSE_FS=m
61
63
  # reduce size
62
64
  CONFIG_NR_CPUS=$nr_cpus
63
65
  CONFIG_COMPAT_VDSO=n
@@ -1,4 +1,5 @@
1
1
  #!/bin/bash
2
2
  source /etc/profile
3
3
 
4
- reboot
4
+ /sbin/reboot
5
+ ps aux | grep sshd | grep -v grep | awk '{print $2}' | xargs kill
@@ -6,8 +6,8 @@ cat <<DATAEOF >> "$chroot/etc/portage/make.conf"
6
6
  RUBY_TARGETS="ruby19"
7
7
  DATAEOF
8
8
 
9
- cat <<DATAEOF >> "$chroot/etc/portage/package.keywords"
10
- dev-util/ragel ~x86
9
+ cat <<DATAEOF >> "$chroot/etc/portage/package.accept_keywords/ruby"
10
+ dev-util/ragel ~x86 ~amd64
11
11
  DATAEOF
12
12
 
13
13
  chroot "$chroot" /bin/bash <<DATAEOF
@@ -3,18 +3,24 @@
3
3
  cat <<DATAEOF > "/etc/profile.d/veewee.sh"
4
4
  # stage 3 filename and full url
5
5
  # retrieve from Gentoo current autobuild txt - these change regularly
6
+
7
+ # distfiles source
8
+ distfiles_url=http://distfiles.gentoo.org
9
+
6
10
  build_arch="x86"
7
11
  build_proc="i686"
8
- stage3current=\`curl -s http://distfiles.gentoo.org/releases/\${build_arch}/autobuilds/latest-stage3-\${build_proc}.txt|grep -v "^#"\`
9
- export stage3url="http://distfiles.gentoo.org/releases/\${build_arch}/autobuilds/\${stage3current}"
12
+ stage3current=\`curl -s \${distfiles_url}/releases/\${build_arch}/autobuilds/latest-stage3-\${build_proc}.txt|grep -v "^#"\`
13
+ export stage3url="\${distfiles_url}/releases/\${build_arch}/autobuilds/\${stage3current}"
10
14
  export stage3file=\${stage3current##*/}
15
+ export portageurl="\${distfiles_url}/snapshots/portage-latest.tar.bz2"
11
16
 
12
17
  # these two (configuring the compiler) and the stage3 url can be changed to build a 32 bit system
13
18
  export accept_keywords="x86"
14
19
  export chost="i686-pc-linux-gnu"
15
20
 
16
21
  # kernel version to use
17
- export kernel_version="3.7.10"
22
+ export kernel_version="3.10.7-r1"
23
+ export kernel_image_version="3.10.7-gentoo-r1"
18
24
 
19
25
  # timezone (as a subdirectory of /usr/share/zoneinfo)
20
26
  export timezone="UTC"
@@ -25,9 +31,6 @@ export locale="en_US.utf8"
25
31
  # chroot directory for the installation
26
32
  export chroot=/mnt/gentoo
27
33
 
28
- # ruby version, works only with ruby_source
29
- export ruby_version="1.9.3-p327"
30
-
31
34
  # number of cpus in the host system (to speed up make and for kernel config)
32
35
  export nr_cpus=$(</proc/cpuinfo grep processor|wc -l)
33
36
 
@@ -0,0 +1,5 @@
1
+ #!/bin/bash
2
+ source /etc/profile
3
+
4
+ # install subversion
5
+ chroot "$chroot" emerge subversion
@@ -0,0 +1,11 @@
1
+ #!/bin/bash
2
+ source /etc/profile
3
+
4
+ # Set up for better USB support
5
+
6
+ # install usbutils (which includes 'lsusb') and libusb
7
+ chroot "$chroot" emerge sys-apps/usbutils
8
+
9
+ # add exFAT filesystem support.
10
+ # (exFAT requires a kernel with a FUSE module)
11
+ #chroot "$chroot" emerge sys-fs/fuse sys-fs/exfat-utils sys-fs/fuse-exfat
@@ -7,16 +7,19 @@ mkdir -p "$chroot/home/vagrant/.ssh"
7
7
  chmod 700 "$chroot/home/vagrant/.ssh"
8
8
  wget --no-check-certificate "$vagrant_ssh_key_url" -O "$chroot/home/vagrant/.ssh/authorized_keys"
9
9
  chmod 600 "$chroot/home/vagrant/.ssh/authorized_keys"
10
+
11
+ # record virtualbox version
10
12
  cp -f /root/.vbox_version "$chroot/home/vagrant/.vbox_version"
13
+ vbox_version=$(cat /root/.vbox_version)
14
+ echo "export vbox_version=$vbox_version" >> /etc/profile.d/settings.sh
15
+ cp /etc/profile.d/settings.sh $CHROOT/etc/profile.d/
11
16
 
12
- # for passwordless logins
13
17
  mkdir -p "$chroot/root/.ssh" 2> /dev/null
14
- cat /tmp/ssh-root.pub >> "$chroot/root/.ssh/authorized_keys"
15
18
 
16
19
  # add vagrant user
17
20
  chroot $chroot /bin/bash <<DATAEOF
18
21
  groupadd -r vagrant
19
- useradd -m -r vagrant -g vagrant -G wheel,vboxsf,vboxguest -c 'added by vagrant, veewee basebox creation'
22
+ useradd -m -r vagrant -g vagrant -G wheel,vboxsf,vboxguest -c 'Vagrant user'
20
23
 
21
24
  # set passwords (for after reboot)
22
25
  passwd<<EOF
@@ -42,6 +45,7 @@ DATAEOF
42
45
  # configure ssh daemon
43
46
  # veewee validate uses password authentication, so we have to enable it
44
47
  cat <<DATAEOF > "$chroot/etc/ssh/sshd_config"
48
+ Protocol 2
45
49
  HostBasedAuthentication no
46
50
  IgnoreUserKnownHosts yes
47
51
  PasswordAuthentication yes
@@ -54,4 +58,34 @@ Subsystem sftp internal-sftp
54
58
  UseDNS no
55
59
  UsePAM yes
56
60
  UsePrivilegeSeparation sandbox
57
- DATAEOF
61
+
62
+ # X11 features need openssh emerged with USE flag "X"
63
+ X11Forwarding yes
64
+ X11DisplayOffset 10
65
+ X11UseLocalhost yes
66
+ DATAEOF
67
+
68
+
69
+ # Set locale (glibc)
70
+
71
+ # generate locale
72
+ chroot "$chroot" /bin/bash <<DATAEOF
73
+ echo en_US.UTF-8 UTF-8 >> /etc/locale.gen
74
+ #echo ja_JP.UTF-8 UTF-8 >> /etc/locale.gen
75
+ #echo fa_IR UTF-8 >> /etc/locale.gen
76
+ locale-gen
77
+ DATAEOF
78
+
79
+ # set locale
80
+ chroot "$chroot" /bin/bash <<DATAEOF
81
+ echo LC_ALL=\"$locale\" >> /etc/env.d/02locale
82
+ echo LC_TYPE=\"$locale\" >> /etc/env.d/02locale
83
+ env-update && source /etc/profile
84
+ DATAEOF
85
+
86
+ # make hostname shorter
87
+ cat <<DATAEOF > "$chroot/etc/conf.d/hostname"
88
+ # Set to the hostname of this machine
89
+ hostname="local"
90
+ DATAEOF
91
+
@@ -2,8 +2,13 @@
2
2
  source /etc/profile
3
3
 
4
4
  # add package keywords
5
- cat <<DATAEOF >> "$chroot/etc/portage/package.keywords"
6
- app-emulation/virtualbox-guest-additions ~x86
5
+ cat <<DATAEOF >> "$chroot/etc/portage/package.accept_keywords/virtualbox-guest-additions"
6
+ app-emulation/virtualbox-guest-additions ~x86 ~amd64
7
+ DATAEOF
8
+
9
+ # unmask
10
+ cat <<DATAEOF >> "$chroot/etc/portage/package.unmask/virtualbox-guest-additions"
11
+ >=app-emulation/virtualbox-guest-additions-4.3.0
7
12
  DATAEOF
8
13
 
9
14
  # install the virtualbox guest additions, add vagrant and root to group vboxguest
@@ -12,7 +17,8 @@ chroot "$chroot" /bin/bash <<DATAEOF
12
17
  emerge sys-apps/dbus app-emulation/virtualbox-guest-additions
13
18
  # we need this as gentoo doesn't do it on its own
14
19
  groupadd -r vboxsf
15
- mkdir /media && chgrp vboxsf /media
20
+ mkdir -p /media && chgrp vboxsf /media
16
21
  rc-update add dbus default # required by virtualbox-guest-additions service
17
22
  rc-update add virtualbox-guest-additions default
18
- DATAEOF
23
+ DATAEOF
24
+
@@ -0,0 +1,10 @@
1
+ #!/bin/bash
2
+ source /etc/profile
3
+
4
+ # remove kernel source ( for less disk usage.)
5
+ chroot "$chroot" /bin/bash <<DATAEOF
6
+ pushd /usr/src/linux
7
+ make clean
8
+ popd
9
+ #emerge -C sys-kernel/gentoo-sources
10
+ DATAEOF
@@ -12,4 +12,4 @@ rm "$chroot/EMPTY"
12
12
  swapoff /dev/sda3
13
13
  shred -n 0 -z /dev/sda3
14
14
  mkswap /dev/sda3
15
- exit
15
+ exit
@@ -34,7 +34,6 @@ Gem::Specification.new do |s|
34
34
  s.add_dependency "childprocess"
35
35
  s.add_dependency "grit"
36
36
  s.add_dependency "fission", "0.4.0"
37
- s.add_dependency "whichr"
38
37
 
39
38
  # Modified dependency version, as libxml-ruby dependency has been removed in version 2.1.1
40
39
  # See : https://github.com/ckruse/CFPropertyList/issues/14
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: veewee
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.10
4
+ version: 0.3.11
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-10-28 00:00:00.000000000 Z
12
+ date: 2013-10-30 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: net-ssh
@@ -219,22 +219,6 @@ dependencies:
219
219
  - - '='
220
220
  - !ruby/object:Gem::Version
221
221
  version: 0.4.0
222
- - !ruby/object:Gem::Dependency
223
- name: whichr
224
- requirement: !ruby/object:Gem::Requirement
225
- none: false
226
- requirements:
227
- - - ! '>='
228
- - !ruby/object:Gem::Version
229
- version: '0'
230
- type: :runtime
231
- prerelease: false
232
- version_requirements: !ruby/object:Gem::Requirement
233
- none: false
234
- requirements:
235
- - - ! '>='
236
- - !ruby/object:Gem::Version
237
- version: '0'
238
222
  - !ruby/object:Gem::Dependency
239
223
  name: rspec
240
224
  requirement: !ruby/object:Gem::Requirement
@@ -1224,26 +1208,31 @@ files:
1224
1208
  - templates/gentoo-latest-amd64/settings.sh
1225
1209
  - templates/gentoo-latest-amd64/subversion.sh
1226
1210
  - templates/gentoo-latest-amd64/syslog.sh
1211
+ - templates/gentoo-latest-amd64/usb.sh
1227
1212
  - templates/gentoo-latest-amd64/vagrant.sh
1228
1213
  - templates/gentoo-latest-amd64/virtualbox.sh
1229
1214
  - templates/gentoo-latest-amd64/wipe_sources.sh
1230
1215
  - templates/gentoo-latest-amd64/zerodisk.sh
1216
+ - templates/gentoo-latest-i686/add_chef.sh
1217
+ - templates/gentoo-latest-i686/add_puppet.sh
1218
+ - templates/gentoo-latest-i686/add_vim.sh
1231
1219
  - templates/gentoo-latest-i686/base.sh
1232
- - templates/gentoo-latest-i686/chef.sh
1233
1220
  - templates/gentoo-latest-i686/cleanup.sh
1234
1221
  - templates/gentoo-latest-i686/cron.sh
1235
1222
  - templates/gentoo-latest-i686/definition.rb
1223
+ - templates/gentoo-latest-i686/git.sh
1236
1224
  - templates/gentoo-latest-i686/grub.sh
1237
1225
  - templates/gentoo-latest-i686/kernel.sh
1238
1226
  - templates/gentoo-latest-i686/nfs.sh
1239
- - templates/gentoo-latest-i686/puppet.sh
1240
1227
  - templates/gentoo-latest-i686/reboot.sh
1241
- - templates/gentoo-latest-i686/ruby_portage.sh
1242
- - templates/gentoo-latest-i686/ruby_source.sh
1228
+ - templates/gentoo-latest-i686/ruby.sh
1243
1229
  - templates/gentoo-latest-i686/settings.sh
1230
+ - templates/gentoo-latest-i686/subversion.sh
1244
1231
  - templates/gentoo-latest-i686/syslog.sh
1232
+ - templates/gentoo-latest-i686/usb.sh
1245
1233
  - templates/gentoo-latest-i686/vagrant.sh
1246
1234
  - templates/gentoo-latest-i686/virtualbox.sh
1235
+ - templates/gentoo-latest-i686/wipe_sources.sh
1247
1236
  - templates/gentoo-latest-i686/zerodisk.sh
1248
1237
  - templates/nixos-minimal-0.2-i686/configuration.nix
1249
1238
  - templates/nixos-minimal-0.2-i686/definition.rb
@@ -1917,7 +1906,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
1917
1906
  version: '0'
1918
1907
  segments:
1919
1908
  - 0
1920
- hash: -1876719226549566323
1909
+ hash: -4081033819412174145
1921
1910
  required_rubygems_version: !ruby/object:Gem::Requirement
1922
1911
  none: false
1923
1912
  requirements:
@@ -1,15 +0,0 @@
1
- #!/bin/bash
2
- source /etc/profile
3
-
4
- chroot "$chroot" /bin/bash <<DATAEOF
5
- env-update && source /etc/profile
6
- emerge libyaml
7
- wget http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-$ruby_version.tar.gz
8
- tar xzf ruby-$ruby_version.tar.gz
9
- cd ruby-$ruby_version
10
- ./configure
11
- make
12
- make install
13
- cd ..
14
- rm -rf ruby-$ruby_version*
15
- DATAEOF