From 103a835267fa18f69c464cf11e4fd8ec8af3d669 Mon Sep 17 00:00:00 2001 From: "Julian C. Dunn" Date: Thu, 30 Oct 2014 09:17:46 -0400 Subject: [PATCH 01/11] Update travis to use newest Packer --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index ac7198ef4..145d632d2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,7 @@ rvm: - 2.1.2 -before_install: wget --no-check-certificate https://dl.bintray.com/mitchellh/packer/packer_0.7.1_linux_amd64.zip && unzip -d packer packer_0.7.1_linux_amd64.zip +before_install: wget --no-check-certificate https://dl.bintray.com/mitchellh/packer/packer_0.7.2_linux_amd64.zip && unzip -d packer packer_0.7.2_linux_amd64.zip before_script: export PATH=$PATH:$PWD/packer script: bundle exec thor packer:validate From 3653fdacbd4cb419d0510333d4065b618aacfb7f Mon Sep 17 00:00:00 2001 From: Scott Hain Date: Wed, 5 Nov 2014 11:01:21 -0500 Subject: [PATCH 02/11] Updated solaris 10 defs for u5 and u11 --- packer/floppy/solaris10/S99startup.sh | 2 + packer/floppy/solaris10/awesome_prof | 5 + ...ris-10-x86.json => solaris-10.11-x86.json} | 0 packer/solaris-10.5-x86.json | 118 ++++++++++++++++++ 4 files changed, 125 insertions(+) rename packer/{solaris-10-x86.json => solaris-10.11-x86.json} (100%) create mode 100644 packer/solaris-10.5-x86.json diff --git a/packer/floppy/solaris10/S99startup.sh b/packer/floppy/solaris10/S99startup.sh index 24ecadc01..f0cc9f711 100644 --- a/packer/floppy/solaris10/S99startup.sh +++ b/packer/floppy/solaris10/S99startup.sh @@ -16,6 +16,8 @@ useradd -m -s /usr/bin/bash -d /home/vagrant -G vagrant vagrant # set password - there is no way to set a password non-interactively perl -pi -e 's/vagrant:UP/vagrant:VrvarmJYR3SHs/g' /etc/shadow +# defaults to a locked account, unlock it +passwd -u vagrant # set up ssh mkdir /home/vagrant/.ssh diff --git a/packer/floppy/solaris10/awesome_prof b/packer/floppy/solaris10/awesome_prof index 583913ed8..bc5afc1f5 100644 --- a/packer/floppy/solaris10/awesome_prof +++ b/packer/floppy/solaris10/awesome_prof @@ -1,8 +1,13 @@ install_type initial_install system_type standalone +filesys any 5000 / +filesys any 5000 /opt cluster SUNWCrnet add package SUNWwgetr add package SUNWwgetu add +package SUNWgss add +package SUNWgssk add +package SUNWgssc add package SUNWsshdr add package SUNWsshdu add package SUNWsshcu add diff --git a/packer/solaris-10-x86.json b/packer/solaris-10.11-x86.json similarity index 100% rename from packer/solaris-10-x86.json rename to packer/solaris-10.11-x86.json diff --git a/packer/solaris-10.5-x86.json b/packer/solaris-10.5-x86.json new file mode 100644 index 000000000..6aaace6fb --- /dev/null +++ b/packer/solaris-10.5-x86.json @@ -0,0 +1,118 @@ +{ + "variables": { + "README": "You must download the automated installer iso from the following page, and then place it somewhere that packer can fetch it", + "DOWNLOAD_SITE": "http://www.oracle.com/technetwork/server-storage/solaris10/downloads/index.html", + "mirror": "./packer_cache", + "chef_version": "provisionerless" + }, + "provisioners": [ + { + "type": "shell", + "execute_command": "/opt/csw/bin/sudo {{.Path}}", + "scripts": [ + "scripts/solaris10/post_install.sh", + "scripts/solaris10/vmtools.sh", + "scripts/solaris10/minimize.sh" + ] + } + ], + "builders": [ + { + "type": "virtualbox-iso", + "boot_command": [ + "e", + "e", + "", + "", + "", + " - install", + "b" + ], + "floppy_files": [ + "floppy/solaris10/sysidcfg", + "floppy/solaris10/awesome_prof", + "floppy/solaris10/rules.ok", + "floppy/solaris10/S99startup.sh", + "floppy/solaris10/finish.sh" + ], + "boot_wait": "5s", + "disk_size": 15360, + "guest_os_type": "Solaris_64", + "http_directory": "http/solaris-10", + "iso_checksum": "c810e1bc5dc96c93004a98665c2f5834", + "iso_checksum_type": "md5", + "iso_url": "{{user `mirror`}}/sol-10-u5-ga-x86-dvd.iso", + "ssh_username": "vagrant", + "ssh_password": "vagrant", + "ssh_port": 22, + "ssh_wait_timeout": "50000s", + "shutdown_command": "/opt/csw/bin/sudo /usr/sbin/init 5", + "shutdown_timeout": "10m", + "guest_additions_mode": "upload", + "virtualbox_version_file": ".vbox_version", + "vm_name": "packer-solaris-10u5-x86_64", + "output_directory": "packer-solaris-10u5-x86_64-virtualbox", + "vboxmanage": [ + [ + "modifyvm", + "{{.Name}}", + "--memory", + "1536" + ], + [ + "modifyvm", + "{{.Name}}", + "--cpus", + "1" + ] + ] + }, + { + "type": "vmware-iso", + "boot_command": [ + "e", + "e", + "", + "", + "", + " - install", + "b" + ], + "floppy_files": [ + "floppy/solaris10/sysidcfg", + "floppy/solaris10/awesome_prof", + "floppy/solaris10/rules.ok", + "floppy/solaris10/S99startup.sh", + "floppy/solaris10/finish.sh" + ], + "boot_wait": "5s", + "disk_size": 15360, + "guest_os_type": "solaris10-64", + "http_directory": "http/solaris-10", + "iso_checksum": "c810e1bc5dc96c93004a98665c2f5834", + "iso_checksum_type": "md5", + "iso_url": "{{user `mirror`}}/sol-10-u5-ga-x86-dvd.iso", + "ssh_username": "vagrant", + "ssh_password": "vagrant", + "ssh_port": 22, + "ssh_wait_timeout": "50000s", + "shutdown_command": "/opt/csw/bin/sudo /usr/sbin/init 5", + "shutdown_timeout": "10m", + "vm_name": "packer-solaris-10u5-x86_64", + "output_directory": "packer-solaris-10u5-x86_64-vmware", + "tools_upload_flavor": "solaris", + "tools_upload_path": "/home/vagrant/solaris.iso", + "vmx_data": { + "cpuid.coresPerSocket": "1", + "memsize": "1536", + "numvcpus": "1" + } + } + ], + "post-processors": [ + { + "output": "../builds/{{.Provider}}/solaris-10.5-x86-{{user `chef_version`}}.box", + "type": "vagrant" + } + ] +} From f3c91c6d2cc2ef8b7c0b213b5bb09be02dc5e46d Mon Sep 17 00:00:00 2001 From: Yvonne Lam Date: Thu, 13 Nov 2014 12:46:22 -0800 Subject: [PATCH 03/11] Minimal support for a compilation environment. --- packer/floppy/solaris10/awesome_prof | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packer/floppy/solaris10/awesome_prof b/packer/floppy/solaris10/awesome_prof index bc5afc1f5..4d758ad6c 100644 --- a/packer/floppy/solaris10/awesome_prof +++ b/packer/floppy/solaris10/awesome_prof @@ -16,3 +16,8 @@ package SUNWgcmn add package SUNWuiu8 add package SUNWbash add package SUNWtoo add +# minimal support for build environment +package SUNWarc add +package SUNWhea add +package SUNWlibm add +package SUNWscpu add From c13283e364b43241604ae7c94768c16e498ef962 Mon Sep 17 00:00:00 2001 From: "Julian C. Dunn" Date: Fri, 14 Nov 2014 13:55:06 -0800 Subject: [PATCH 04/11] Update to FreeBSD 10.1. Closes #292. Also, newer FreeBSDs don't need to load geom_mbr and zfs explicitly; it's already built into the kernel. ASSUME_ALWAYS_YES takes a boolean, not an integer now --- ...0.0-amd64.json => freebsd-10.1-amd64.json} | 44 +++++++------------ ...-10.0-i386.json => freebsd-10.1-i386.json} | 44 +++++++------------ .../{freebsd-10.0 => freebsd-10.1}/install.sh | 0 packer/scripts/freebsd/postinstall.sh | 11 +---- 4 files changed, 33 insertions(+), 66 deletions(-) rename packer/{freebsd-10.0-amd64.json => freebsd-10.1-amd64.json} (76%) rename packer/{freebsd-10.0-i386.json => freebsd-10.1-i386.json} (76%) rename packer/http/{freebsd-10.0 => freebsd-10.1}/install.sh (100%) diff --git a/packer/freebsd-10.0-amd64.json b/packer/freebsd-10.1-amd64.json similarity index 76% rename from packer/freebsd-10.0-amd64.json rename to packer/freebsd-10.1-amd64.json index 371712997..7fe1ff679 100644 --- a/packer/freebsd-10.0-amd64.json +++ b/packer/freebsd-10.1-amd64.json @@ -22,10 +22,6 @@ "type": "virtualbox-iso", "boot_command": [ "", - "load geom_mbr", - "", - "load zfs", - "", "boot -s", "", "", @@ -33,15 +29,15 @@ "mdmfs -s 100m md1 /tmp", "mdmfs -s 100m md2 /mnt", "dhclient -l /tmp/dhclient.lease.em0 em0", - "fetch -o /tmp/install.sh http://{{ .HTTPIP }}:{{ .HTTPPort }}/freebsd-10.0/install.sh && chmod +x /tmp/install.sh && /tmp/install.sh {{ .Name }}" + "fetch -o /tmp/install.sh http://{{ .HTTPIP }}:{{ .HTTPPort }}/freebsd-10.1/install.sh && chmod +x /tmp/install.sh && /tmp/install.sh {{ .Name }}" ], "boot_wait": "10s", "disk_size": 10140, "guest_os_type": "FreeBSD_64", "http_directory": "http", - "iso_checksum": "9c377b4a4e63443c0b210080694de26133e6a276eddb07c7e00e1c9aebd84109", + "iso_checksum": "0c3d64ce48c3ef761761d0fea07e1935e296f8c045c249118bc91a7faf053a6b", "iso_checksum_type": "sha256", - "iso_url": "{{user `mirror`}}/releases/amd64/amd64/ISO-IMAGES/10.0/FreeBSD-10.0-RELEASE-amd64-disc1.iso", + "iso_url": "{{user `mirror`}}/releases/amd64/amd64/ISO-IMAGES/10.1/FreeBSD-10.1-RELEASE-amd64-disc1.iso", "ssh_username": "vagrant", "ssh_password": "vagrant", "ssh_port": 22, @@ -49,8 +45,8 @@ "shutdown_command": "echo 'shutdown -p now' > shutdown.sh; cat 'shutdown.sh' | su -", "guest_additions_path": "VBoxGuestAdditions_{{.Version}}.iso", "virtualbox_version_file": ".vbox_version", - "vm_name": "packer-freebsd-10.0-amd64", - "output_directory": "packer-freebsd-10.0-amd64-virtualbox", + "vm_name": "packer-freebsd-10.1-amd64", + "output_directory": "packer-freebsd-10.1-amd64-virtualbox", "vboxmanage": [ [ "modifyvm", "{{.Name}}", "--memory", "512" ], [ "modifyvm", "{{.Name}}", "--cpus", "1" ] @@ -60,10 +56,6 @@ "type": "vmware-iso", "boot_command": [ "", - "load geom_mbr", - "", - "load zfs", - "", "boot -s", "", "", @@ -72,22 +64,22 @@ "mdmfs -s 100m md2 /mnt", "dhclient -l /tmp/dhclient.lease.em0 em0", "", - "fetch -o /tmp/install.sh http://{{ .HTTPIP }}:{{ .HTTPPort }}/freebsd-10.0/install.sh && chmod +x /tmp/install.sh && /tmp/install.sh {{ .Name }}" + "fetch -o /tmp/install.sh http://{{ .HTTPIP }}:{{ .HTTPPort }}/freebsd-10.1/install.sh && chmod +x /tmp/install.sh && /tmp/install.sh {{ .Name }}" ], "boot_wait": "10s", "disk_size": 10140, "guest_os_type": "freebsd-64", "http_directory": "http", - "iso_checksum": "9c377b4a4e63443c0b210080694de26133e6a276eddb07c7e00e1c9aebd84109", + "iso_checksum": "0c3d64ce48c3ef761761d0fea07e1935e296f8c045c249118bc91a7faf053a6b", "iso_checksum_type": "sha256", - "iso_url": "{{user `mirror`}}/releases/amd64/amd64/ISO-IMAGES/10.0/FreeBSD-10.0-RELEASE-amd64-disc1.iso", + "iso_url": "{{user `mirror`}}/releases/amd64/amd64/ISO-IMAGES/10.1/FreeBSD-10.1-RELEASE-amd64-disc1.iso", "ssh_username": "vagrant", "ssh_password": "vagrant", "ssh_port": 22, "ssh_wait_timeout": "10000s", "shutdown_command": "echo 'shutdown -p now' > shutdown.sh; cat 'shutdown.sh' | su -", - "vm_name": "packer-freebsd-10.0-amd64", - "output_directory": "packer-freebsd-10.0-amd64-vmware", + "vm_name": "packer-freebsd-10.1-amd64", + "output_directory": "packer-freebsd-10.1-amd64-vmware", "tools_upload_flavor": "freebsd", "vmx_data": { "memsize": "512", @@ -99,10 +91,6 @@ "type": "parallels-iso", "boot_command": [ "", - "load geom_mbr", - "", - "load zfs", - "", "boot -s", "", "", @@ -110,15 +98,15 @@ "mdmfs -s 100m md1 /tmp", "mdmfs -s 100m md2 /mnt", "dhclient -l /tmp/dhclient.lease.em0 em0", - "fetch -o /tmp/install.sh http://{{ .HTTPIP }}:{{ .HTTPPort }}/freebsd-10.0/install.sh && chmod +x /tmp/install.sh && /tmp/install.sh {{ .Name }}" + "fetch -o /tmp/install.sh http://{{ .HTTPIP }}:{{ .HTTPPort }}/freebsd-10.1/install.sh && chmod +x /tmp/install.sh && /tmp/install.sh {{ .Name }}" ], "boot_wait": "10s", "disk_size": 10140, "guest_os_type": "freebsd", "http_directory": "http", - "iso_checksum": "9c377b4a4e63443c0b210080694de26133e6a276eddb07c7e00e1c9aebd84109", + "iso_checksum": "0c3d64ce48c3ef761761d0fea07e1935e296f8c045c249118bc91a7faf053a6b", "iso_checksum_type": "sha256", - "iso_url": "{{user `mirror`}}/releases/amd64/amd64/ISO-IMAGES/10.0/FreeBSD-10.0-RELEASE-amd64-disc1.iso", + "iso_url": "{{user `mirror`}}/releases/amd64/amd64/ISO-IMAGES/10.1/FreeBSD-10.1-RELEASE-amd64-disc1.iso", "ssh_username": "vagrant", "ssh_password": "vagrant", "ssh_port": 22, @@ -126,8 +114,8 @@ "shutdown_command": "echo 'shutdown -p now' > shutdown.sh; cat 'shutdown.sh' | su -", "parallels_tools_mode": "disable", "prlctl_version_file": ".prlctl_version", - "vm_name": "packer-freebsd-10.0-amd64", - "output_directory": "packer-freebsd-10.0-amd64-parallels", + "vm_name": "packer-freebsd-10.1-amd64", + "output_directory": "packer-freebsd-10.1-amd64-parallels", "prlctl": [ [ "set", "{{.Name}}", "--memsize", "512" ], [ "set", "{{.Name}}", "--cpus", "1" ], @@ -139,7 +127,7 @@ ], "post-processors": [ { - "output": "../builds/{{.Provider}}/opscode_freebsd-10.0_chef-{{user `chef_version`}}.box", + "output": "../builds/{{.Provider}}/opscode_freebsd-10.1_chef-{{user `chef_version`}}.box", "override": { "parallels": { "vagrantfile_template": "vagrantfile_templates/parallels/freebsd.rb" diff --git a/packer/freebsd-10.0-i386.json b/packer/freebsd-10.1-i386.json similarity index 76% rename from packer/freebsd-10.0-i386.json rename to packer/freebsd-10.1-i386.json index 9f9c14b51..e02514985 100644 --- a/packer/freebsd-10.0-i386.json +++ b/packer/freebsd-10.1-i386.json @@ -22,10 +22,6 @@ "type": "virtualbox-iso", "boot_command": [ "", - "load geom_mbr", - "", - "load zfs", - "", "boot -s", "", "", @@ -33,15 +29,15 @@ "mdmfs -s 100m md1 /tmp", "mdmfs -s 100m md2 /mnt", "dhclient -l /tmp/dhclient.lease.em0 em0", - "fetch -o /tmp/install.sh http://{{ .HTTPIP }}:{{ .HTTPPort }}/freebsd-10.0/install.sh && chmod +x /tmp/install.sh && /tmp/install.sh {{ .Name }}" + "fetch -o /tmp/install.sh http://{{ .HTTPIP }}:{{ .HTTPPort }}/freebsd-10.1/install.sh && chmod +x /tmp/install.sh && /tmp/install.sh {{ .Name }}" ], "boot_wait": "10s", "disk_size": 10140, "guest_os_type": "FreeBSD", "http_directory": "http", - "iso_checksum": "2c09643b3f79c703e424c03408882369025cec655c24a6d81ee073081ee75ebc", + "iso_checksum": "fe31790b762b01c99791d33e7fd9ab97323654785ce21f588116c8b4eb381cd0", "iso_checksum_type": "sha256", - "iso_url": "{{user `mirror`}}/releases/i386/i386/ISO-IMAGES/10.0/FreeBSD-10.0-RELEASE-i386-disc1.iso", + "iso_url": "{{user `mirror`}}/releases/i386/i386/ISO-IMAGES/10.1/FreeBSD-10.1-RELEASE-i386-disc1.iso", "ssh_username": "vagrant", "ssh_password": "vagrant", "ssh_port": 22, @@ -49,8 +45,8 @@ "shutdown_command": "echo 'shutdown -p now' > shutdown.sh; cat 'shutdown.sh' | su -", "guest_additions_path": "VBoxGuestAdditions_{{.Version}}.iso", "virtualbox_version_file": ".vbox_version", - "vm_name": "packer-freebsd-10.0-i386", - "output_directory": "packer-freebsd-10.0-i386-virtualbox", + "vm_name": "packer-freebsd-10.1-i386", + "output_directory": "packer-freebsd-10.1-i386-virtualbox", "vboxmanage": [ [ "modifyvm", "{{.Name}}", "--memory", "512" ], [ "modifyvm", "{{.Name}}", "--cpus", "1" ] @@ -60,10 +56,6 @@ "type": "vmware-iso", "boot_command": [ "", - "load geom_mbr", - "", - "load zfs", - "", "boot -s", "", "", @@ -72,22 +64,22 @@ "mdmfs -s 100m md2 /mnt", "dhclient -l /tmp/dhclient.lease.em0 em0", "", - "fetch -o /tmp/install.sh http://{{ .HTTPIP }}:{{ .HTTPPort }}/freebsd-10.0/install.sh && chmod +x /tmp/install.sh && /tmp/install.sh {{ .Name }}" + "fetch -o /tmp/install.sh http://{{ .HTTPIP }}:{{ .HTTPPort }}/freebsd-10.1/install.sh && chmod +x /tmp/install.sh && /tmp/install.sh {{ .Name }}" ], "boot_wait": "10s", "disk_size": 10140, "guest_os_type": "freebsd", "http_directory": "http", - "iso_checksum": "2c09643b3f79c703e424c03408882369025cec655c24a6d81ee073081ee75ebc", + "iso_checksum": "fe31790b762b01c99791d33e7fd9ab97323654785ce21f588116c8b4eb381cd0", "iso_checksum_type": "sha256", - "iso_url": "{{user `mirror`}}/releases/i386/i386/ISO-IMAGES/10.0/FreeBSD-10.0-RELEASE-i386-disc1.iso", + "iso_url": "{{user `mirror`}}/releases/i386/i386/ISO-IMAGES/10.1/FreeBSD-10.1-RELEASE-i386-disc1.iso", "ssh_username": "vagrant", "ssh_password": "vagrant", "ssh_port": 22, "ssh_wait_timeout": "10000s", "shutdown_command": "echo 'shutdown -p now' > shutdown.sh; cat 'shutdown.sh' | su -", - "vm_name": "packer-freebsd-10.0-i386", - "output_directory": "packer-freebsd-10.0-i386-vmware", + "vm_name": "packer-freebsd-10.1-i386", + "output_directory": "packer-freebsd-10.1-i386-vmware", "tools_upload_flavor": "freebsd", "vmx_data": { "memsize": "512", @@ -99,10 +91,6 @@ "type": "parallels-iso", "boot_command": [ "", - "load geom_mbr", - "", - "load zfs", - "", "boot -s", "", "", @@ -110,15 +98,15 @@ "mdmfs -s 100m md1 /tmp", "mdmfs -s 100m md2 /mnt", "dhclient -l /tmp/dhclient.lease.em0 em0", - "fetch -o /tmp/install.sh http://{{ .HTTPIP }}:{{ .HTTPPort }}/freebsd-10.0/install.sh && chmod +x /tmp/install.sh && /tmp/install.sh {{ .Name }}" + "fetch -o /tmp/install.sh http://{{ .HTTPIP }}:{{ .HTTPPort }}/freebsd-10.1/install.sh && chmod +x /tmp/install.sh && /tmp/install.sh {{ .Name }}" ], "boot_wait": "10s", "disk_size": 10140, "guest_os_type": "freebsd", "http_directory": "http", - "iso_checksum": "2c09643b3f79c703e424c03408882369025cec655c24a6d81ee073081ee75ebc", + "iso_checksum": "fe31790b762b01c99791d33e7fd9ab97323654785ce21f588116c8b4eb381cd0", "iso_checksum_type": "sha256", - "iso_url": "{{user `mirror`}}/releases/i386/i386/ISO-IMAGES/10.0/FreeBSD-10.0-RELEASE-i386-disc1.iso", + "iso_url": "{{user `mirror`}}/releases/i386/i386/ISO-IMAGES/10.1/FreeBSD-10.1-RELEASE-i386-disc1.iso", "ssh_username": "vagrant", "ssh_password": "vagrant", "ssh_port": 22, @@ -126,8 +114,8 @@ "shutdown_command": "echo 'shutdown -p now' > shutdown.sh; cat 'shutdown.sh' | su -", "parallels_tools_mode": "disable", "prlctl_version_file": ".prlctl_version", - "vm_name": "packer-freebsd-10.0-amd64", - "output_directory": "packer-freebsd-10.0-i386-parallels", + "vm_name": "packer-freebsd-10.1-amd64", + "output_directory": "packer-freebsd-10.1-i386-parallels", "prlctl": [ [ "set", "{{.Name}}", "--memsize", "512" ], [ "set", "{{.Name}}", "--cpus", "1" ], @@ -139,7 +127,7 @@ ], "post-processors": [ { - "output": "../builds/{{.Provider}}/opscode_freebsd-10.0_chef-{{user `chef_version`}}.box", + "output": "../builds/{{.Provider}}/opscode_freebsd-10.1_chef-{{user `chef_version`}}.box", "override": { "parallels": { "vagrantfile_template": "vagrantfile_templates/parallels/freebsd.rb" diff --git a/packer/http/freebsd-10.0/install.sh b/packer/http/freebsd-10.1/install.sh similarity index 100% rename from packer/http/freebsd-10.0/install.sh rename to packer/http/freebsd-10.1/install.sh diff --git a/packer/scripts/freebsd/postinstall.sh b/packer/scripts/freebsd/postinstall.sh index b18744af3..195bcedff 100644 --- a/packer/scripts/freebsd/postinstall.sh +++ b/packer/scripts/freebsd/postinstall.sh @@ -18,7 +18,7 @@ env PAGER=/bin/cat /tmp/freebsd-update install #Install sudo, curl and ca_root_nss if [ $freebsd_major -gt 9 ]; then # Use pkgng - env ASSUME_ALWAYS_YES=1 pkg bootstrap + env ASSUME_ALWAYS_YES=true pkg bootstrap pkg update pkg install -y sudo pkg install -y curl @@ -58,12 +58,3 @@ EOT pw groupadd vboxusers pw groupmod vboxusers -m vagrant -echo "==============================================================================" -echo "NOTE: FreeBSD - Vagrant" -echo "When using this basebox you need to do some special stuff in your Vagrantfile" -echo "1) Enable HostOnly network" -echo ' config.vm.network "private_network", ip: "192.168.33.10"' -echo "2) Use nfs instead of shared folders" -echo ' config.vm.synced_folder "v-root", "/vagrant", :nfs => true' -echo "=============================================================================" -exit From 85d83ef945411a418c80621bec2bbb2d6249c1b4 Mon Sep 17 00:00:00 2001 From: "Julian C. Dunn" Date: Sun, 16 Nov 2014 10:03:19 -0800 Subject: [PATCH 05/11] Fixed incorrect output filename. --- packer/freebsd-10.1-i386.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packer/freebsd-10.1-i386.json b/packer/freebsd-10.1-i386.json index e02514985..409ab32a6 100644 --- a/packer/freebsd-10.1-i386.json +++ b/packer/freebsd-10.1-i386.json @@ -127,7 +127,7 @@ ], "post-processors": [ { - "output": "../builds/{{.Provider}}/opscode_freebsd-10.1_chef-{{user `chef_version`}}.box", + "output": "../builds/{{.Provider}}/opscode_freebsd-10.1-i386_chef-{{user `chef_version`}}.box", "override": { "parallels": { "vagrantfile_template": "vagrantfile_templates/parallels/freebsd.rb" From ceb3c7afa261103700c6da892edb6a17333f4f33 Mon Sep 17 00:00:00 2001 From: "Julian C. Dunn" Date: Mon, 17 Nov 2014 21:58:22 -0500 Subject: [PATCH 06/11] Updated FreeBSD boxes to 10.1 in README. Also, i386 boxes are now available. --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1d5301e1b..41765931e 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,8 @@ These baseboxes were all built using a Mac OS X host running VirtualBox 4.3.16, * [opscode-fedora-20](http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_fedora-20_chef-provisionerless.box) * [opscode-freebsd-9.3-i386](http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_freebsd-9.3-i386_chef-provisionerless.box) * [opscode-freebsd-9.3](http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_freebsd-9.3_chef-provisionerless.box) -* [opscode-freebsd-10](http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_freebsd-10.0_chef-provisionerless.box) +* [opscode-freebsd-10.1](http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_freebsd-10.1_chef-provisionerless.box) +* [opscode-freebsd-10.1-i386](http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_freebsd-10.1-i386_chef-provisionerless.box) * [opscode-opensuse-13.1-i386](http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_opensuse-13.1-i386_chef-provisionerless.box) * [opscode-opensuse-13.1](http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_opensuse-13.1-x86_64_chef-provisionerless.box) * [opscode-ubuntu-10.04-i386](http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_ubuntu-10.04-i386_chef-provisionerless.box) @@ -73,7 +74,8 @@ these boxes. Using `--provider vmware_fusion`, will not. * [opscode-fedora-20](http://opscode-vm-bento.s3.amazonaws.com/vagrant/vmware/opscode_fedora-20_chef-provisionerless.box) * [opscode-freebsd-9.3-i386](http://opscode-vm-bento.s3.amazonaws.com/vagrant/vmware/opscode_freebsd-9.3-i386_chef-provisionerless.box) * [opscode-freebsd-9.3](http://opscode-vm-bento.s3.amazonaws.com/vagrant/vmware/opscode_freebsd-9.3_chef-provisionerless.box) -* [opscode-freebsd-10](http://opscode-vm-bento.s3.amazonaws.com/vagrant/vmware/opscode_freebsd-10.0_chef-provisionerless.box) +* [opscode-freebsd-10.1](http://opscode-vm-bento.s3.amazonaws.com/vagrant/vmware/opscode_freebsd-10.1_chef-provisionerless.box) +* [opscode-freebsd-10.1-i386](http://opscode-vm-bento.s3.amazonaws.com/vagrant/vmware/opscode_freebsd-10.1-i386_chef-provisionerless.box) * [opscode-opensuse-13.1-i386](http://opscode-vm-bento.s3.amazonaws.com/vagrant/vmware/opscode_opensuse-13.1-i386_chef-provisionerless.box) * [opscode-opensuse-13.1](http://opscode-vm-bento.s3.amazonaws.com/vagrant/vmware/opscode_opensuse-13.1-x86_64_chef-provisionerless.box) * [opscode-ubuntu-10.04-i386](http://opscode-vm-bento.s3.amazonaws.com/vagrant/vmware/opscode_ubuntu-10.04-i386_chef-provisionerless.box) From f8a00145db4f0564c4466ce7c3e1bac8feeb736f Mon Sep 17 00:00:00 2001 From: "Julian C. Dunn" Date: Thu, 20 Nov 2014 11:24:37 -0500 Subject: [PATCH 07/11] Implement support for SLES 12. Closes #294. --- .../http/sles-12/sles-12-x86_64-autoinst.xml | 984 ++++++++++++++++++ packer/scripts/sles/cleanup.sh | 6 + packer/scripts/sles/remove-dvd-source.sh | 26 +- packer/scripts/sles/unsupported-modules.sh | 4 + packer/sles-12-x86_64.json | 146 +++ 5 files changed, 1157 insertions(+), 9 deletions(-) create mode 100644 packer/http/sles-12/sles-12-x86_64-autoinst.xml create mode 100644 packer/scripts/sles/cleanup.sh create mode 100644 packer/scripts/sles/unsupported-modules.sh create mode 100644 packer/sles-12-x86_64.json diff --git a/packer/http/sles-12/sles-12-x86_64-autoinst.xml b/packer/http/sles-12/sles-12-x86_64-autoinst.xml new file mode 100644 index 000000000..b4287770f --- /dev/null +++ b/packer/http/sles-12/sles-12-x86_64-autoinst.xml @@ -0,0 +1,984 @@ + + + + + + + + + + hd0 + /dev/sda + + + + true + resume=/dev/sda1 splash=silent quiet showopts + showopts apm=off noresume edd=off powersaved=off nohz=off highres=off processor.max_cstate=1 nomodeset x11failsafe + false + false + false + true + 0 + SLES12 + true + auto + false + 8 + + + + ahci + + + ata_piix + + + ata_generic + + + jbd + + + mbcache + + + grub2 + + + + YaST_Default_CA + YaST Default CA (vagrant-sles-12-x64) + US + + + + ENTER PASSWORD HERE + vagrant-sles-12-x64.vagrantup.com + postmaster@vagrantup.com + + false + + + false + + + no + no + no + + + + + + + + + no + yes + no + no + + no + yes + no + yes + no + no + no + + + + + + + + + + + + + + + + + + + true + true + + + + + false + + + none + + + + true + true + true + true + false + true + + + + + + true + 100 + x + users + + + + true + 32 + x + public + + + + true + 42 + x + trusted + + + + true + 7 + x + lp + + + + true + 498 + x + sshd + + + + true + 54 + x + lock + + + + true + 20 + x + cdrom + + + + true + 65534 + x + nogroup + nobody + + + true + 6 + x + disk + + + + true + 499 + x + messagebus + + + + true + 40 + x + games + + + + true + 62 + x + man + + + + true + 496 + x + polkitd + + + + true + 5 + x + tty + + + + true + 9 + x + kmem + + + + true + 19 + x + floppy + + + + true + 17 + x + audio + + + + true + 10 + x + wheel + + + + true + 0 + x + root + + + + true + 65533 + x + nobody + + + + true + 8 + x + www + + + + true + 15 + x + shadow + + + + true + 22 + x + utmp + + + + true + 3 + x + sys + + + + true + 14 + x + uucp + + + + true + 495 + x + nscd + + + + true + 497 + x + tape + + + + true + 2 + x + daemon + + + + true + 43 + x + modem + + + + true + 49 + x + ftp + + + + true + 21 + x + console + + + + true + 12 + x + mail + + + + true + 13 + x + news + + + + true + 41 + x + xok + + + + true + 33 + x + video + + + + true + 16 + x + dialout + + + + true + 1 + x + bin + daemon + + + + + + 127.0.0.1 + + localhost + + + + ::1 + + localhost ipv6-localhost ipv6-loopback + + + + fe00::0 + + ipv6-localnet + + + + ff00::0 + + ipv6-mcastprefix + + + + ff02::1 + + ipv6-allnodes + + + + ff02::2 + + ipv6-allrouters + + + + ff02::3 + + ipv6-allhosts + + + + + + false + 208M-:104M + + + + yes + lzo + 31 + 64 + yes + 5 + + + + file:///var/crash + + + + + 3 + + + + + + + + AUTO + + + false + vagrantup.com + vagrant-sles-12-x64 + auto + + vagrantup.com + + true + + + + dhcp + eth0 + yes + auto + no + + + true + false + + false + false + + + + + /dev/sda + true + + + true + false + swap + true + defaults + false + swap + device + 130 + 1 + + false + 1561492992 + + + true + false + btrfs + true + false + / + device + 131 + 2 + + false + 19895844352 + + boot/grub2/i386-pc + boot/grub2/x86_64-efi + home + opt + srv + tmp + usr/local + var/crash + var/lib/mailman + var/lib/named + var/lib/pgsql + var/log + var/opt + var/spool + var/tmp + + + + + CT_DISK + all + + + + false + + + + localhost, 127.0.0.1 + + + + + + true + true + 0 + + + true + true + 0 + + + true + true + 0 + + + true + true + 0 + + + + graphical + + + + sshd + + + + + + glibc + openssh + grub2 + syslinux + snapper + sles-release + SuSEfirewall2 + kexec-tools + perl-Bootloader-YAML + kernel-default-devel + sudo + gcc + wget + perl + make + + + Minimal + apparmor + + + adaptec-firmware + atmel-firmware + augeas-lenses + bash-completion + bash-doc + cifs-utils + cups-libs + ipw-firmware + mpt-firmware + postfix + samba-libs + ucode-intel + + + + UTC + UTC + + + + 100 + video,dialout + /home + -1 + /bin/bash + /etc/skel + 022 + + + + true + vagrant + 100 + /home/vagrant + + + + + 99999 + 0 + 7 + + /bin/bash + 1000 + $2y$05$NA1Li9ZKJOLRW5mMTXm6/e5r8dltWS5RpDZpvHrI82aLE00V51tdi + vagrant + + + true + News system + 13 + /etc/news + + + + + + + + + /bin/bash + 9 + * + news + + + true + bin + 1 + /bin + + + + + + + + + /bin/bash + 1 + * + bin + + + true + FTP account + 49 + /srv/ftp + + + + + + + + + /bin/bash + 40 + * + ftp + + + true + WWW daemon apache + 8 + /var/lib/wwwrun + + + + + + + + + /bin/false + 30 + * + wwwrun + + + true + User for polkitd + 496 + /var/lib/polkit + + + + + + + + + /sbin/nologin + 497 + ! + polkitd + + + true + Manual pages viewer + 62 + /var/cache/man + + + + + + + + + /bin/bash + 13 + * + man + + + true + Daemon + 2 + /sbin + + + + + + + + + /bin/bash + 2 + * + daemon + + + true + root + 0 + /root + + + + + + + + + /bin/bash + 0 + $6$UgKtUD0AUMIA$VWLyc2Uvl0Lk6xxfTuoRb0/jrhZ9IJG/Gtx/DkZUEWZm.JYO1Q1fvPo6gDxQAHp38kQ1DG1vNGRgu2T/z/vih. + root + + + true + nobody + 65533 + /var/lib/nobody + + + + + + + + + /bin/bash + 65534 + * + nobody + + + true + Mailer daemon + 12 + /var/spool/clientmqueue + + + + + + + + + /bin/false + 8 + * + mail + + + true + openslp daemon + 2 + /var/lib/empty + + + + + + + + + /sbin/nologin + 494 + ! + openslp + + + true + User for D-Bus + 499 + /var/run/dbus + + + + + + + + + /bin/false + 499 + ! + messagebus + + + true + User for nscd + 495 + /run/nscd + + + + + + + + + /sbin/nologin + 496 + ! + nscd + + + true + user for rpcbind + 65534 + /var/lib/empty + + + + + + + + + /sbin/nologin + 495 + ! + rpc + + + true + Games account + 100 + /var/games + + + + + + + + + /bin/bash + 12 + * + games + + + true + SSH daemon + 498 + /var/lib/sshd + + + + + + + + + /bin/false + 498 + ! + sshd + + + true + Unix-to-Unix CoPy system + 14 + /etc/uucp + + + + + + + + + /bin/bash + 10 + * + uucp + + + true + Printing daemon + 7 + /var/spool/lpd + + + + + + + + + /bin/bash + 4 + * + lp + + + diff --git a/packer/scripts/sles/cleanup.sh b/packer/scripts/sles/cleanup.sh new file mode 100644 index 000000000..9bc9f828c --- /dev/null +++ b/packer/scripts/sles/cleanup.sh @@ -0,0 +1,6 @@ +#!/bin/sh +# These were only needed for building VMware/Virtualbox extensions: +zypper --non-interactive rm --clean-deps gcc kernel-default-devel +zypper clean +rm -rf VBoxGuestAdditions_*.iso VBoxGuestAdditions_*.iso.? +rm -f /tmp/chef*rpm diff --git a/packer/scripts/sles/remove-dvd-source.sh b/packer/scripts/sles/remove-dvd-source.sh index ba16b68e9..632fa6cbc 100644 --- a/packer/scripts/sles/remove-dvd-source.sh +++ b/packer/scripts/sles/remove-dvd-source.sh @@ -6,16 +6,24 @@ else arch_suffix=x86 fi +oslevel=`grep VERSION /etc/SuSE-release | awk '{ print $3 }'` patchlevel=`grep PATCHLEVEL /etc/SuSE-release | awk '{ print $3 }'` -if [ $patchlevel == '2' ]; then - repo_ver="11.2.2-1.234" -elif [ $patchlevel == '3' ]; then - repo_ver="11.3.3-1.138" -else - echo "Failed to remove DVD source; don't know how to deal with patchlevel $patchlevel" - exit 1 + +if [ $oslevel == '11' ]; then + if [ $patchlevel == '2' ]; then + repo_ver="11.2.2-1.234" + elif [ $patchlevel == '3' ]; then + repo_ver="11.3.3-1.138" + else + echo "Failed to remove DVD source; don't know how to deal with patchlevel $patchlevel" + exit 1 + fi + zypper removerepo "SUSE-Linux-Enterprise-Server-11-SP$patchlevel $repo_ver" + zypper addrepo "http://demeter.uni-regensburg.de/SLES11SP$patchlevel-$arch_suffix/DVD1/" "SLES11SP$patchlevel-$arch_suffix DVD1 Online" +elif [ $oslevel == '12' ]; then + zypper removerepo "SLES12-12-$patchlevel" + zypper addrepo "http://demeter.uni-regensburg.de/SLES12-$arch_suffix/DVD1/" "SLES12-12-$patchlevel-$arch_suffix DVD1 Online" + zypper addrepo "http://demeter.uni-regensburg.de/SLES12-$arch_suffix/DVD2/" "SLES12-12-$patchlevel-$arch_suffix DVD2 Online" fi -zypper removerepo "SUSE-Linux-Enterprise-Server-11-SP$patchlevel $repo_ver" -zypper addrepo "http://demeter.uni-regensburg.de/SLES11SP$patchlevel-$arch_suffix/DVD1/" "SLES11SP$patchlevel-$arch_suffix DVD1 Online" zypper refresh diff --git a/packer/scripts/sles/unsupported-modules.sh b/packer/scripts/sles/unsupported-modules.sh new file mode 100644 index 000000000..8fa7e032b --- /dev/null +++ b/packer/scripts/sles/unsupported-modules.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +# Enable unsupported kernel modules, so vboxguest can install +sed -i -e 's#^allow_unsupported_modules 0#allow_unsupported_modules 1#' /etc/modprobe.d/10-unsupported-modules.conf diff --git a/packer/sles-12-x86_64.json b/packer/sles-12-x86_64.json new file mode 100644 index 000000000..a269997d0 --- /dev/null +++ b/packer/sles-12-x86_64.json @@ -0,0 +1,146 @@ +{ + "builders": [ + { + "boot_command": [ + "", + "linux netdevice=eth0 netsetup=dhcp install=cd:/", + " lang=en_US autoyast=http://{{ .HTTPIP }}:{{ .HTTPPort }}/sles-12/sles-12-x86_64-autoinst.xml", + " textmode=1", + "" + ], + "boot_wait": "10s", + "disk_size": 20480, + "guest_additions_path": "VBoxGuestAdditions_{{.Version}}.iso", + "guest_os_type": "OpenSUSE_64", + "http_directory": "http", + "iso_checksum": "58086fca0441b1d44c7a51c5ee64e1bd4365466fcee48ec92c4f39d07739aeed", + "iso_checksum_type": "sha256", + "iso_url": "{{user `mirror`}}/SLE-12-Server-DVD-x86_64-GM-DVD1.iso", + "output_directory": "packer-sles-12-x86_64-virtualbox", + "shutdown_command": "echo 'vagrant'|sudo -S /sbin/halt -h -p", + "ssh_password": "vagrant", + "ssh_port": 22, + "ssh_username": "vagrant", + "ssh_wait_timeout": "10000s", + "type": "virtualbox-iso", + "vboxmanage": [ + [ + "modifyvm", + "{{.Name}}", + "--memory", + "480" + ], + [ + "modifyvm", + "{{.Name}}", + "--cpus", + "1" + ] + ], + "virtualbox_version_file": ".vbox_version", + "vm_name": "packer-sles-12-x86_64" + }, + { + "boot_command": [ + "", + "linux netdevice=eth0 netsetup=dhcp install=cd:/", + " lang=en_US autoyast=http://{{ .HTTPIP }}:{{ .HTTPPort }}/sles-12/sles-12-x86_64-autoinst.xml", + " textmode=1", + "" + ], + "boot_wait": "10s", + "disk_size": 20480, + "guest_os_type": "sles11-64", + "http_directory": "http", + "iso_checksum": "58086fca0441b1d44c7a51c5ee64e1bd4365466fcee48ec92c4f39d07739aeed", + "iso_checksum_type": "sha256", + "iso_url": "{{user `mirror`}}/SLE-12-Server-DVD-x86_64-GM-DVD1.iso", + "output_directory": "packer-sles-12-sp3-x86_64-vmware", + "shutdown_command": "echo 'vagrant'|sudo -S /sbin/halt -h -p", + "ssh_password": "vagrant", + "ssh_port": 22, + "ssh_username": "vagrant", + "ssh_wait_timeout": "10000s", + "tools_upload_flavor": "linux", + "type": "vmware-iso", + "vm_name": "packer-sles-12-sp3-x86_64", + "vmx_data": { + "cpuid.coresPerSocket": "1", + "memsize": "480", + "numvcpus": "1" + } + }, + { + "boot_command": [ + "", + "linux netdevice=eth0 netsetup=dhcp install=cd:/", + " lang=en_US autoyast=http://{{ .HTTPIP }}:{{ .HTTPPort }}/sles-12/sles-12-x86_64-autoinst.xml", + " textmode=1", + "" + ], + "boot_wait": "10s", + "disk_size": 20480, + "parallels_tools_flavor": "lin", + "guest_os_type": "suse", + "http_directory": "http", + "iso_checksum": "58086fca0441b1d44c7a51c5ee64e1bd4365466fcee48ec92c4f39d07739aeed", + "iso_checksum_type": "sha256", + "iso_url": "{{user `mirror`}}/SLE-12-Server-DVD-x86_64-GM-DVD1.iso", + "output_directory": "packer-sles-12-x86_64-parallels", + "shutdown_command": "echo 'vagrant'|sudo -S /sbin/halt -h -p", + "ssh_password": "vagrant", + "ssh_port": 22, + "ssh_username": "vagrant", + "ssh_wait_timeout": "10000s", + "type": "parallels-iso", + "prlctl": [ + [ + "set", + "{{.Name}}", + "--memsize", + "480" + ], + [ + "set", + "{{.Name}}", + "--cpus", + "1" + ] + ], + "prlctl_version_file": ".prlctl_version", + "vm_name": "packer-sles-12-x86_64" + } + ], + "post-processors": [ + { + "output": "../builds/{{.Provider}}/opscode_sles-12_chef-{{user `chef_version`}}.box", + "type": "vagrant" + } + ], + "provisioners": [ + { + "environment_vars": [ + "CHEF_VERSION={{user `chef_version`}}" + ], + "execute_command": "echo 'vagrant' | {{.Vars}} sudo -S -E sh '{{.Path}}'", + "scripts": [ + "scripts/common/sshd.sh", + "scripts/common/vagrant.sh", + "scripts/sles/unsupported-modules.sh", + "scripts/common/vmtools.sh", + "scripts/common/chef.sh", + "scripts/sles/sudoers.sh", + "scripts/sles/zypper-locks.sh", + "scripts/sles/remove-dvd-source.sh", + "scripts/sles/cleanup.sh", + "scripts/common/minimize.sh" + ], + "type": "shell" + } + ], + "variables": { + "chef_version": "provisionerless", + "mirror": "http://cdn2.novell.com/prot/Q_VbW21BiB4~" + } +} + From 1b961b46464996fa3a9011f054b1aaffb58b1ab8 Mon Sep 17 00:00:00 2001 From: "Julian C. Dunn" Date: Tue, 25 Nov 2014 18:18:31 -0500 Subject: [PATCH 08/11] Convert FreeBSD 9 to use pkgng. Closes #296. --- packer/scripts/freebsd/postinstall.sh | 21 ++++++++++----------- packer/scripts/freebsd/vmtools.sh | 3 +-- 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/packer/scripts/freebsd/postinstall.sh b/packer/scripts/freebsd/postinstall.sh index 195bcedff..d741ad298 100644 --- a/packer/scripts/freebsd/postinstall.sh +++ b/packer/scripts/freebsd/postinstall.sh @@ -15,19 +15,18 @@ chmod +x /tmp/freebsd-update env PAGER=/bin/cat /tmp/freebsd-update fetch env PAGER=/bin/cat /tmp/freebsd-update install -#Install sudo, curl and ca_root_nss -if [ $freebsd_major -gt 9 ]; then - # Use pkgng - env ASSUME_ALWAYS_YES=true pkg bootstrap - pkg update - pkg install -y sudo - pkg install -y curl - pkg install -y ca_root_nss -else - # Use old pkg - pkg_add -r sudo curl ca_root_nss +# always use pkgng - pkg_add is EOL as of 1 September 2014 +env ASSUME_ALWAYS_YES=true pkg bootstrap +if [ $freebsd_major -lt 10 ]; then + echo WITH_PKGNG=yes >> /etc/make.conf fi +#Install sudo, curl and ca_root_nss +pkg update +pkg install -y sudo +pkg install -y curl +pkg install -y ca_root_nss + # Emulate the ETCSYMLINK behavior of ca_root_nss; this is for FreeBSD 10, where fetch(1) was # massively refactored and doesn't come with SSL CAcerts anymore ln -sf /usr/local/share/certs/ca-root-nss.crt /etc/ssl/cert.pem diff --git a/packer/scripts/freebsd/vmtools.sh b/packer/scripts/freebsd/vmtools.sh index 1d7b9a5b8..9927f1760 100644 --- a/packer/scripts/freebsd/vmtools.sh +++ b/packer/scripts/freebsd/vmtools.sh @@ -1,11 +1,10 @@ #!/bin/sh freebsd_major=`uname -r | awk -F. '{ print $1 }'` +pkg_command="pkg install -y" if [ $freebsd_major -gt 9 ]; then - pkg_command="pkg install -y" perl_pkg="perl5" else - pkg_command="pkg_add -r" perl_pkg="perl" fi From 4370586c5b310114e45d7f65c4399d6ffff2a4de Mon Sep 17 00:00:00 2001 From: "Julian C. Dunn" Date: Wed, 26 Nov 2014 22:55:13 -0500 Subject: [PATCH 09/11] Update to OpenSuSE 13.2. Closes #298 --- .../autoinst.xml | 104 +++++++----------- ...13.1-i386.json => opensuse-13.2-i386.json} | 39 ++++--- ...-x86_64.json => opensuse-13.2-x86_64.json} | 39 ++++--- packer/scripts/opensuse/cleanup.sh | 6 +- packer/scripts/opensuse/remove-dvd-source.sh | 13 +-- packer/scripts/opensuse/services.sh | 5 - 6 files changed, 84 insertions(+), 122 deletions(-) rename packer/http/{opensuse-13.1 => opensuse-13.2}/autoinst.xml (72%) rename packer/{opensuse-13.1-i386.json => opensuse-13.2-i386.json} (77%) rename packer/{opensuse-13.1-x86_64.json => opensuse-13.2-x86_64.json} (77%) delete mode 100644 packer/scripts/opensuse/services.sh diff --git a/packer/http/opensuse-13.1/autoinst.xml b/packer/http/opensuse-13.2/autoinst.xml similarity index 72% rename from packer/http/opensuse-13.1/autoinst.xml rename to packer/http/opensuse-13.2/autoinst.xml index 27243fe0a..1f16ef216 100644 --- a/packer/http/opensuse-13.1/autoinst.xml +++ b/packer/http/opensuse-13.2/autoinst.xml @@ -40,57 +40,59 @@ UTC Etc/UTC - + /dev/sda true true false - ext4 - 131 + swap true defaults false - /boot + swap device - 131 + 130 1 + false 512M true false - ext4 - 131 + btrfs true - defaults false / device 131 2 + false max - - - true - false - swap - 130 - true - defaults - false - swap - device - 130 - 3 - false - 512M + + boot/grub2/i386-pc + boot/grub2/x86_64-efi + home + opt + srv + tmp + usr/local + var/crash + var/lib/mailman + var/lib/named + var/lib/pgsql + var/log + var/opt + var/spool + var/tmp + + CT_DISK all @@ -106,8 +108,8 @@ true true - local - linux + vagrantup.com + opensuse-13.2-x64 @@ -124,8 +126,8 @@ - false - false + true + true @@ -139,61 +141,36 @@ kernel-default-devel gcc make - less - vim sudo - screen yast2 yast2-firstboot zypper yast2-trans-en_US wget curl - iproute2 - ifplugd - kexec-tools - libdaemon0 - libnl1 - libxslt-tools - cryptsetup-mkinitrd grub2-branding-openSUSE - rsyslog sw_management yast2_install_wf - base + minimal_base + bash-completion + telnet virtualbox-guest-kmp-default virtualbox-guest-tools - - - - - sshd - 3 5 - + + graphical + + + + sshd + - - - - - - - - + 100 @@ -201,7 +178,6 @@ systemctl start rsyslog - 100 diff --git a/packer/opensuse-13.1-i386.json b/packer/opensuse-13.2-i386.json similarity index 77% rename from packer/opensuse-13.1-i386.json rename to packer/opensuse-13.2-i386.json index f0a72f200..c31586bf4 100644 --- a/packer/opensuse-13.1-i386.json +++ b/packer/opensuse-13.2-i386.json @@ -4,7 +4,7 @@ "boot_command": [ "", "linux netsetup=dhcp install=cd:/", - " lang=en_US autoyast=http://{{ .HTTPIP }}:{{ .HTTPPort }}/opensuse-13.1/autoinst.xml", + " lang=en_US autoyast=http://{{ .HTTPIP }}:{{ .HTTPPort }}/opensuse-13.2/autoinst.xml", " textmode=1", "" ], @@ -13,10 +13,10 @@ "guest_additions_path": "VBoxGuestAdditions_{{.Version}}.iso", "guest_os_type": "OpenSUSE", "http_directory": "http", - "iso_checksum": "1bd6223430910f6d5a168d4e19171462", - "iso_checksum_type": "md5", - "iso_url": "{{user `mirror`}}/13.1/iso/openSUSE-13.1-DVD-i586.iso", - "output_directory": "packer-opensuse-13.1-i386-virtualbox", + "iso_checksum": "2ec28606829d6408efc5a79b70d1da738fdc09de", + "iso_checksum_type": "sha1", + "iso_url": "{{user `mirror`}}/13.2/iso/openSUSE-13.2-DVD-i586.iso", + "output_directory": "packer-opensuse-13.2-i386-virtualbox", "shutdown_command": "echo 'vagrant'|sudo -S /sbin/halt -h -p", "ssh_password": "vagrant", "ssh_port": 22, @@ -38,13 +38,13 @@ ] ], "virtualbox_version_file": ".vbox_version", - "vm_name": "packer-opensuse-13.1-i386" + "vm_name": "packer-opensuse-13.2-i386" }, { "boot_command": [ "", "linux netsetup=dhcp install=cd:/", - " lang=en_US autoyast=http://{{ .HTTPIP }}:{{ .HTTPPort }}/opensuse-13.1/autoinst.xml", + " lang=en_US autoyast=http://{{ .HTTPIP }}:{{ .HTTPPort }}/opensuse-13.2/autoinst.xml", " textmode=1", "" ], @@ -52,10 +52,10 @@ "disk_size": 20480, "guest_os_type": "opensuse", "http_directory": "http", - "iso_checksum": "1bd6223430910f6d5a168d4e19171462", - "iso_checksum_type": "md5", - "iso_url": "{{user `mirror`}}/13.1/iso/openSUSE-13.1-DVD-i586.iso", - "output_directory": "packer-opensuse-13.1-i386-vmware", + "iso_checksum": "2ec28606829d6408efc5a79b70d1da738fdc09de", + "iso_checksum_type": "sha1", + "iso_url": "{{user `mirror`}}/13.2/iso/openSUSE-13.2-DVD-i586.iso", + "output_directory": "packer-opensuse-13.2-i386-vmware", "shutdown_command": "echo 'vagrant'|sudo -S /sbin/shutdown -h 1", "ssh_password": "vagrant", "ssh_port": 22, @@ -63,7 +63,7 @@ "ssh_wait_timeout": "10000s", "tools_upload_flavor": "linux", "type": "vmware-iso", - "vm_name": "packer-opensuse-13.1-i386", + "vm_name": "packer-opensuse-13.2-i386", "vmx_data": { "cpuid.coresPerSocket": "1", "memsize": "480", @@ -74,7 +74,7 @@ "boot_command": [ "", "linux netsetup=dhcp install=cd:/", - " lang=en_US autoyast=http://{{ .HTTPIP }}:{{ .HTTPPort }}/opensuse-13.1/autoinst.xml", + " lang=en_US autoyast=http://{{ .HTTPIP }}:{{ .HTTPPort }}/opensuse-13.2/autoinst.xml", " textmode=1", "" ], @@ -82,10 +82,10 @@ "disk_size": 20480, "guest_os_type": "opensuse", "http_directory": "http", - "iso_checksum": "1bd6223430910f6d5a168d4e19171462", - "iso_checksum_type": "md5", - "iso_url": "{{user `mirror`}}/13.1/iso/openSUSE-13.1-DVD-i586.iso", - "output_directory": "packer-opensuse-13.1-i386-parallels", + "iso_checksum": "2ec28606829d6408efc5a79b70d1da738fdc09de", + "iso_checksum_type": "sha1", + "iso_url": "{{user `mirror`}}/13.2/iso/openSUSE-13.2-DVD-i586.iso", + "output_directory": "packer-opensuse-13.2-i386-parallels", "shutdown_command": "echo 'vagrant'|sudo -S /sbin/halt -h -p", "ssh_password": "vagrant", "ssh_port": 22, @@ -108,12 +108,12 @@ ] ], "prlctl_version_file": ".prlctl_version", - "vm_name": "packer-opensuse-13.1-i386" + "vm_name": "packer-opensuse-13.2-i386" } ], "post-processors": [ { - "output": "../builds/{{.Provider}}/opscode_opensuse-13.1-i386_chef-{{user `chef_version`}}.box", + "output": "../builds/{{.Provider}}/opscode_opensuse-13.2-i386_chef-{{user `chef_version`}}.box", "type": "vagrant" } ], @@ -128,7 +128,6 @@ "scripts/common/vagrant.sh", "scripts/common/vmtools.sh", "scripts/common/chef.sh", - "scripts/opensuse/services.sh", "scripts/opensuse/sudoers.sh", "scripts/opensuse/zypper-locks.sh", "scripts/opensuse/remove-dvd-source.sh", diff --git a/packer/opensuse-13.1-x86_64.json b/packer/opensuse-13.2-x86_64.json similarity index 77% rename from packer/opensuse-13.1-x86_64.json rename to packer/opensuse-13.2-x86_64.json index bb2b4faec..09421722c 100644 --- a/packer/opensuse-13.1-x86_64.json +++ b/packer/opensuse-13.2-x86_64.json @@ -4,7 +4,7 @@ "boot_command": [ "", "linux netsetup=dhcp install=cd:/", - " lang=en_US autoyast=http://{{ .HTTPIP }}:{{ .HTTPPort }}/opensuse-13.1/autoinst.xml", + " lang=en_US autoyast=http://{{ .HTTPIP }}:{{ .HTTPPort }}/opensuse-13.2/autoinst.xml", " textmode=1", "" ], @@ -13,10 +13,10 @@ "guest_additions_path": "VBoxGuestAdditions_{{.Version}}.iso", "guest_os_type": "OpenSUSE_64", "http_directory": "http", - "iso_checksum": "1096c9c67fc8a67a94a32d04a15e909d", - "iso_checksum_type": "md5", - "iso_url": "{{user `mirror`}}/13.1/iso/openSUSE-13.1-DVD-x86_64.iso", - "output_directory": "packer-opensuse-13.1-x86_64-virtualbox", + "iso_checksum": "a1bd237ccfb07939953a9681607c99c00bc78d5d", + "iso_checksum_type": "sha1", + "iso_url": "{{user `mirror`}}/13.2/iso/openSUSE-13.2-DVD-x86_64.iso", + "output_directory": "packer-opensuse-13.2-x86_64-virtualbox", "shutdown_command": "echo 'vagrant'|sudo -S /sbin/halt -h -p", "ssh_password": "vagrant", "ssh_port": 22, @@ -38,13 +38,13 @@ ] ], "virtualbox_version_file": ".vbox_version", - "vm_name": "packer-opensuse-13.1-x86_64" + "vm_name": "packer-opensuse-13.2-x86_64" }, { "boot_command": [ "", "linux netsetup=dhcp install=cd:/", - " lang=en_US autoyast=http://{{ .HTTPIP }}:{{ .HTTPPort }}/opensuse-13.1/autoinst.xml", + " lang=en_US autoyast=http://{{ .HTTPIP }}:{{ .HTTPPort }}/opensuse-13.2/autoinst.xml", " textmode=1", "" ], @@ -52,10 +52,10 @@ "disk_size": 20480, "guest_os_type": "opensuse-64", "http_directory": "http", - "iso_checksum": "1096c9c67fc8a67a94a32d04a15e909d", - "iso_checksum_type": "md5", - "iso_url": "{{user `mirror`}}/13.1/iso/openSUSE-13.1-DVD-x86_64.iso", - "output_directory": "packer-opensuse-13.1-x86_64-vmware", + "iso_checksum": "a1bd237ccfb07939953a9681607c99c00bc78d5d", + "iso_checksum_type": "sha1", + "iso_url": "{{user `mirror`}}/13.2/iso/openSUSE-13.2-DVD-x86_64.iso", + "output_directory": "packer-opensuse-13.2-x86_64-vmware", "shutdown_command": "echo 'vagrant'|sudo -S /sbin/shutdown -h 1", "ssh_password": "vagrant", "ssh_port": 22, @@ -63,7 +63,7 @@ "ssh_wait_timeout": "10000s", "tools_upload_flavor": "linux", "type": "vmware-iso", - "vm_name": "packer-opensuse-13.1-x86_64", + "vm_name": "packer-opensuse-13.2-x86_64", "vmx_data": { "cpuid.coresPerSocket": "1", "memsize": "480", @@ -74,7 +74,7 @@ "boot_command": [ "", "linux netsetup=dhcp install=cd:/", - " lang=en_US autoyast=http://{{ .HTTPIP }}:{{ .HTTPPort }}/opensuse-13.1/autoinst.xml", + " lang=en_US autoyast=http://{{ .HTTPIP }}:{{ .HTTPPort }}/opensuse-13.2/autoinst.xml", " textmode=1", "" ], @@ -82,10 +82,10 @@ "disk_size": 20480, "guest_os_type": "opensuse", "http_directory": "http", - "iso_checksum": "1096c9c67fc8a67a94a32d04a15e909d", - "iso_checksum_type": "md5", - "iso_url": "{{user `mirror`}}/13.1/iso/openSUSE-13.1-DVD-x86_64.iso", - "output_directory": "packer-opensuse-13.1-x86_64-parallels", + "iso_checksum": "a1bd237ccfb07939953a9681607c99c00bc78d5d", + "iso_checksum_type": "sha1", + "iso_url": "{{user `mirror`}}/13.2/iso/openSUSE-13.2-DVD-x86_64.iso", + "output_directory": "packer-opensuse-13.2-x86_64-parallels", "shutdown_command": "echo 'vagrant'|sudo -S /sbin/halt -h -p", "ssh_password": "vagrant", "ssh_port": 22, @@ -108,12 +108,12 @@ ] ], "prlctl_version_file": ".prlctl_version", - "vm_name": "packer-opensuse-13.1-x86_64" + "vm_name": "packer-opensuse-13.2-x86_64" } ], "post-processors": [ { - "output": "../builds/{{.Provider}}/opscode_opensuse-13.1-x86_64_chef-{{user `chef_version`}}.box", + "output": "../builds/{{.Provider}}/opscode_opensuse-13.2-x86_64_chef-{{user `chef_version`}}.box", "type": "vagrant" } ], @@ -128,7 +128,6 @@ "scripts/common/vagrant.sh", "scripts/common/vmtools.sh", "scripts/common/chef.sh", - "scripts/opensuse/services.sh", "scripts/opensuse/sudoers.sh", "scripts/opensuse/zypper-locks.sh", "scripts/opensuse/remove-dvd-source.sh", diff --git a/packer/scripts/opensuse/cleanup.sh b/packer/scripts/opensuse/cleanup.sh index 2e466416d..f83c0b645 100644 --- a/packer/scripts/opensuse/cleanup.sh +++ b/packer/scripts/opensuse/cleanup.sh @@ -1,7 +1,3 @@ #!/bin/bash -eux # These were only needed for building VMware/Virtualbox extensions: -zypper -n rm -u binutils gcc make site-config patterns-openSUSE-yast2_install_wf -# backlist i2c_piix4 - VirtualBox has no smbus -echo "blacklist i2c_piix4" > /etc/modprobe.d/100-blacklist-i2c_piix4.conf -# remove all kernels except current running -rpm -qa | grep kernel-default | grep -v `uname -r | awk -F"-" '{print $1"-"$2}'` | xargs rpm -ehv +zypper -n rm -u binutils gcc make perl ruby kernel-default-devel kernel-devel diff --git a/packer/scripts/opensuse/remove-dvd-source.sh b/packer/scripts/opensuse/remove-dvd-source.sh index adbf70616..f851a3e14 100644 --- a/packer/scripts/opensuse/remove-dvd-source.sh +++ b/packer/scripts/opensuse/remove-dvd-source.sh @@ -1,11 +1,8 @@ #!/bin/sh -eux -zypper removerepo "openSUSE-13.1-1.10" -rpm --import http://download.opensuse.org/distribution/13.1/repo/oss/gpg-pubkey-3dbdc284-4be1884d.asc -rpm --import http://download.opensuse.org/distribution/13.1/repo/oss/gpg-pubkey-307e3d54-4be01a65.asc -zypper ar http://download.opensuse.org/distribution/13.1/repo/oss/ opensuse-13.1-oss -zypper ar http://download.opensuse.org/distribution/13.1/repo/non-oss/ opensuse-13.1-non-oss -zypper ar http://download.opensuse.org/update/13.1/ opensuse-13.1-update -zypper ar http://download.opensuse.org/update/13.1-non-oss/ opensuse-13.1-update-non-oss +zypper removerepo "openSUSE-13.2-0" +zypper ar http://download.opensuse.org/distribution/13.2/repo/oss/ openSUSE-13.2-Oss +zypper ar http://download.opensuse.org/distribution/13.2/repo/non-oss/ openSUSE-13.2-Non-Oss +zypper ar http://download.opensuse.org/update/13.2/ openSUSE-13.2-Update +zypper ar http://download.opensuse.org/update/13.2-non-oss/ openSUSE-13.2-Update-Non-Oss zypper refresh -zypper update -y diff --git a/packer/scripts/opensuse/services.sh b/packer/scripts/opensuse/services.sh deleted file mode 100644 index 51891328b..000000000 --- a/packer/scripts/opensuse/services.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh -eux - -systemctl enable sshd -systemctl enable network -systemctl enable rsyslog \ No newline at end of file From ce22ae91cc7511ebcd96b8576f8dd010cbe176ed Mon Sep 17 00:00:00 2001 From: Rickard von Essen Date: Thu, 27 Nov 2014 13:26:04 +0100 Subject: [PATCH 10/11] #299 OpenSUSE 13.2 should specify netdevice=eth0 --- packer/opensuse-13.2-i386.json | 2 +- packer/opensuse-13.2-x86_64.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packer/opensuse-13.2-i386.json b/packer/opensuse-13.2-i386.json index c31586bf4..38739e592 100644 --- a/packer/opensuse-13.2-i386.json +++ b/packer/opensuse-13.2-i386.json @@ -73,7 +73,7 @@ { "boot_command": [ "", - "linux netsetup=dhcp install=cd:/", + "linux netsetup=dhcp netdevice=eth0 install=cd:/", " lang=en_US autoyast=http://{{ .HTTPIP }}:{{ .HTTPPort }}/opensuse-13.2/autoinst.xml", " textmode=1", "" diff --git a/packer/opensuse-13.2-x86_64.json b/packer/opensuse-13.2-x86_64.json index 09421722c..f5f0f4900 100644 --- a/packer/opensuse-13.2-x86_64.json +++ b/packer/opensuse-13.2-x86_64.json @@ -73,7 +73,7 @@ { "boot_command": [ "", - "linux netsetup=dhcp install=cd:/", + "linux netsetup=dhcp netdevice=eth0 install=cd:/", " lang=en_US autoyast=http://{{ .HTTPIP }}:{{ .HTTPPort }}/opensuse-13.2/autoinst.xml", " textmode=1", "" From 1d520d4744149d215e5f1903bfbf41cb8dfc075f Mon Sep 17 00:00:00 2001 From: Yves Vogl Date: Mon, 15 Dec 2014 17:34:46 +0100 Subject: [PATCH 11/11] Removed some more unnecessary firmware packages --- packer/http/centos-7.0/ks.cfg | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/packer/http/centos-7.0/ks.cfg b/packer/http/centos-7.0/ks.cfg index 23fb4f5f3..55763e889 100644 --- a/packer/http/centos-7.0/ks.cfg +++ b/packer/http/centos-7.0/ks.cfg @@ -44,15 +44,24 @@ bzip2 -ipw2200-firmware -ivtv-firmware -iwl100-firmware +-iwl105-firmware +-iwl135-firmware -iwl1000-firmware +-iwl2000-firmware +-iwl2030-firmware +-iwl3160-firmware -iwl3945-firmware -iwl4965-firmware -iwl5000-firmware -iwl5150-firmware -iwl6000-firmware -iwl6000g2a-firmware +-iwl6000g2b-firmware -iwl6050-firmware +-iwl7260-firmware -libertas-usb8388-firmware +-libertas-sd8686-firmware +-libertas-sd8787-firmware -ql2100-firmware -ql2200-firmware -ql23xx-firmware