From 53cfee79505d86737282c639554e87202116ff1b Mon Sep 17 00:00:00 2001 From: Joseph Anthony Pasquale Holsten Date: Wed, 30 Jan 2013 18:27:07 -0800 Subject: [PATCH 1/2] add fedora 18 support --- definitions/.fedora/cleanup.sh | 5 ++++ definitions/.fedora/ks.cfg | 42 ++++++++++++++++++++++++++++ definitions/.fedora/session.rb | 13 +++++++++ definitions/fedora-18/chef-client.sh | 1 + definitions/fedora-18/cleanup.sh | 1 + definitions/fedora-18/definition.rb | 16 +++++++++++ definitions/fedora-18/ks.cfg | 1 + definitions/fedora-18/minimize.sh | 1 + definitions/fedora-18/vagrant.sh | 1 + 9 files changed, 81 insertions(+) create mode 100644 definitions/.fedora/cleanup.sh create mode 100644 definitions/.fedora/ks.cfg create mode 100644 definitions/.fedora/session.rb create mode 120000 definitions/fedora-18/chef-client.sh create mode 120000 definitions/fedora-18/cleanup.sh create mode 100644 definitions/fedora-18/definition.rb create mode 120000 definitions/fedora-18/ks.cfg create mode 120000 definitions/fedora-18/minimize.sh create mode 120000 definitions/fedora-18/vagrant.sh diff --git a/definitions/.fedora/cleanup.sh b/definitions/.fedora/cleanup.sh new file mode 100644 index 000000000..c515ffa94 --- /dev/null +++ b/definitions/.fedora/cleanup.sh @@ -0,0 +1,5 @@ +#!/bin/bash -eux +yum -y erase gtk2 libX11 hicolor-icon-theme freetype +yum -y clean all +rm -rf VBoxGuestAdditions_*.iso VBoxGuestAdditions_*.iso.? +rm -f /tmp/chef*rpm diff --git a/definitions/.fedora/ks.cfg b/definitions/.fedora/ks.cfg new file mode 100644 index 000000000..7b71473d2 --- /dev/null +++ b/definitions/.fedora/ks.cfg @@ -0,0 +1,42 @@ +install +cdrom +lang en_US.UTF-8 +keyboard us +network --bootproto=dhcp +rootpw --iscrypted $1$damlkd,f$UC/u5pUts5QiU3ow.CSso/ +firewall --disabled +authconfig --enableshadow --passalgo=sha512 +selinux --disabled +timezone UTC +bootloader --location=mbr +text +skipx +zerombr +clearpart --all --initlabel +autopart +auth --useshadow --enablemd5 +firstboot --disabled +reboot + +%packages +@Core +@Development Tools +openssl-devel +readline-devel +zlib-devel +kernel-devel +wget +%end + +%post +# update root certs +wget -O/etc/pki/tls/certs/ca-bundle.crt http://curl.haxx.se/ca/cacert.pem +# vagrant +groupadd vagrant +useradd vagrant -g vagrant -G wheel -u 900 +echo "vagrant" | passwd --stdin vagrant +# sudo +echo 'Defaults:vagrant !requiretty' > /etc/sudoers.d/vagrant +echo '%vagrant ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers.d/vagrant +chmod 440 /etc/sudoers.d/vagrant +%end diff --git a/definitions/.fedora/session.rb b/definitions/.fedora/session.rb new file mode 100644 index 000000000..7a4d0dd4a --- /dev/null +++ b/definitions/.fedora/session.rb @@ -0,0 +1,13 @@ +require File.dirname(__FILE__) + "/../.common/session.rb" + +FEDORA_SESSION = + COMMON_SESSION.merge({ :boot_cmd_sequence => + [ ' text ks=http://%IP%:%PORT%/ks.cfg' ], + :kickstart_file => "ks.cfg", + :os_type_id => 'Fedora_64', + :memory_size=> "512", + :postinstall_files => [ "chef-client.sh", + "vagrant.sh", + "cleanup.sh", + "minimize.sh" ], + :shutdown_cmd => "/sbin/halt -h -p" }) diff --git a/definitions/fedora-18/chef-client.sh b/definitions/fedora-18/chef-client.sh new file mode 120000 index 000000000..635081810 --- /dev/null +++ b/definitions/fedora-18/chef-client.sh @@ -0,0 +1 @@ +../.common/chef-client.sh \ No newline at end of file diff --git a/definitions/fedora-18/cleanup.sh b/definitions/fedora-18/cleanup.sh new file mode 120000 index 000000000..1cf83b27e --- /dev/null +++ b/definitions/fedora-18/cleanup.sh @@ -0,0 +1 @@ +../.fedora/cleanup.sh \ No newline at end of file diff --git a/definitions/fedora-18/definition.rb b/definitions/fedora-18/definition.rb new file mode 100644 index 000000000..06dae1e80 --- /dev/null +++ b/definitions/fedora-18/definition.rb @@ -0,0 +1,16 @@ +require File.dirname(__FILE__) + "/../.fedora/session.rb" + +iso = "Fedora-18-x86_64-DVD.iso" + +session = + FEDORA_SESSION.merge( # :boot_cmd_sequence => + #[ ' linux text biosdevname=0 ks=http://%IP%:%PORT%/ks.cfg' ], + #:memory_size=> '480', + :iso_file => iso, + #:iso_md5 => "a991defc0a602d04f064c43290df0131", + :iso_src => "http://mirrors.kernel.org/fedora/releases/18/Fedora/x86_64/iso/#{iso}" + # Minimum RAM requirement for installation is 512MB. + #:memory_size=> '512', +) + +Veewee::Session.declare session diff --git a/definitions/fedora-18/ks.cfg b/definitions/fedora-18/ks.cfg new file mode 120000 index 000000000..15c8071a4 --- /dev/null +++ b/definitions/fedora-18/ks.cfg @@ -0,0 +1 @@ +../.fedora/ks.cfg \ No newline at end of file diff --git a/definitions/fedora-18/minimize.sh b/definitions/fedora-18/minimize.sh new file mode 120000 index 000000000..b3632ccbc --- /dev/null +++ b/definitions/fedora-18/minimize.sh @@ -0,0 +1 @@ +../.common/minimize.sh \ No newline at end of file diff --git a/definitions/fedora-18/vagrant.sh b/definitions/fedora-18/vagrant.sh new file mode 120000 index 000000000..702949639 --- /dev/null +++ b/definitions/fedora-18/vagrant.sh @@ -0,0 +1 @@ +../.common/vagrant.sh \ No newline at end of file From cd31cd6ffab1207e3d016902a99db547770c0639 Mon Sep 17 00:00:00 2001 From: Joseph Anthony Pasquale Holsten Date: Wed, 6 Feb 2013 23:01:19 +0000 Subject: [PATCH 2/2] fix dependencies for vbox additions, remove minor cruft --- definitions/.fedora/ks.cfg | 9 ++++++--- definitions/fedora-18/definition.rb | 9 ++------- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/definitions/.fedora/ks.cfg b/definitions/.fedora/ks.cfg index 7b71473d2..0decd94df 100644 --- a/definitions/.fedora/ks.cfg +++ b/definitions/.fedora/ks.cfg @@ -20,12 +20,15 @@ reboot %packages @Core -@Development Tools +bzip2 +gcc +kernel-devel +kernel-headers openssl-devel readline-devel -zlib-devel -kernel-devel +tar wget +zlib-devel %end %post diff --git a/definitions/fedora-18/definition.rb b/definitions/fedora-18/definition.rb index 06dae1e80..cb2d82dde 100644 --- a/definitions/fedora-18/definition.rb +++ b/definitions/fedora-18/definition.rb @@ -3,14 +3,9 @@ iso = "Fedora-18-x86_64-DVD.iso" session = - FEDORA_SESSION.merge( # :boot_cmd_sequence => - #[ ' linux text biosdevname=0 ks=http://%IP%:%PORT%/ks.cfg' ], - #:memory_size=> '480', - :iso_file => iso, - #:iso_md5 => "a991defc0a602d04f064c43290df0131", + FEDORA_SESSION.merge( :iso_file => iso, + :iso_md5 => "17d5c860bf9dc83e035882a7b33ffc77", :iso_src => "http://mirrors.kernel.org/fedora/releases/18/Fedora/x86_64/iso/#{iso}" - # Minimum RAM requirement for installation is 512MB. - #:memory_size=> '512', ) Veewee::Session.declare session