<commit_before># Build a basic CentOS 6 AMI
lang en_US.UTF-8
keyboard us
timezone US/Eastern
auth --useshadow --enablemd5
selinux --enforcing
firewall --enabled --ssh
bootloader --timeout=1 
network --bootproto=dhcp --device=eth0 --onboot=on
services --enabled=network


# Uncomment the next line
# to make the root password be password
# By default the root password is emptied
#rootpw password

#
# Define how large you want your rootfs to be
# NOTE: S3-backed AMIs have a limit of 10G
#
part / --size 1280 --fstype ext3

#
# Repositories
repo --name=CentOS6-Base --mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=os
repo --name=CentOS6-Updates --mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=updates
repo --name=EPEL --mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=$basearch


#
#
# Add all the packages after the base packages
#
%packages --nobase --instLangs=en
@core
system-config-firewall-base
audit
pciutils
bash
coreutils
kernel-xen
grub
e2fsprogs
passwd
policycoreutils
chkconfig
rootfiles
yum
vim-minimal
acpid
openssh-clients
openssh-server
curl
cloud-init
sudo
epel-release
-kernel-firmware
-iwl6050-firmware
-aic94xx-firmware
-iwl6000-firmware
-iwl5150-firmware
-ql2200-firmware
-libertas-usb8388-firmware
-ipw2100-firmware
-atmel-firmware
-iwl3945-firmware
-xorg-x11-drv-ati-firmware
-ql2500-firmware
-rt61pci-firmware
-ipw2200-firmware
-iwl6000g2a-firmware
-bfa-firmware
-iwl1000-firmware
-iwl100-firmware
-iwl5000-firmware
-ql2400-firmware
-rt73usb-firmware
-ql23xx-firmware
-iwl4965-firmware
-ql2100-firmware
-ivtv-firmware
-zd1211-firmware

#Allow for dhcp access
dhclient
iputils

%end

#
# Add custom post scripts after the base post.
#
%post
%end

# more ec2-ify
%post --erroronfail

# create ec2-user
/usr/sbin/useradd ec2-user
/bin/echo -e 'ec2-user\tALL=(ALL)\tNOPASSWD: ALL' >> /etc/sudoers

# disable root password based login
cat >> /etc/ssh/sshd_config << EOF
PermitRootLogin without-password
UseDNS no
EOF

# disable zerconf route
cat >> /etc/sysconfig/network << EOF
NOZEROCONF=yes
EOF
%end
<commit_msg>Add console=ttyS0 to default EMI boot parameters<commit_after># Build a basic CentOS 6 AMI
lang en_US.UTF-8
keyboard us
timezone US/Eastern
auth --useshadow --enablemd5
selinux --enforcing
firewall --enabled --ssh
bootloader --timeout=1 --append="console=ttyS0"
network --bootproto=dhcp --device=eth0 --onboot=on
services --enabled=network


# Uncomment the next line
# to make the root password be password
# By default the root password is emptied
#rootpw password

#
# Define how large you want your rootfs to be
# NOTE: S3-backed AMIs have a limit of 10G
#
part / --size 1280 --fstype ext3

#
# Repositories
repo --name=CentOS6-Base --mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=os
repo --name=CentOS6-Updates --mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=updates
repo --name=EPEL --mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=$basearch


#
#
# Add all the packages after the base packages
#
%packages --nobase --instLangs=en
@core
system-config-firewall-base
audit
pciutils
bash
coreutils
kernel-xen
grub
e2fsprogs
passwd
policycoreutils
chkconfig
rootfiles
yum
vim-minimal
acpid
openssh-clients
openssh-server
curl
cloud-init
sudo
epel-release
-kernel-firmware
-iwl6050-firmware
-aic94xx-firmware
-iwl6000-firmware
-iwl5150-firmware
-ql2200-firmware
-libertas-usb8388-firmware
-ipw2100-firmware
-atmel-firmware
-iwl3945-firmware
-xorg-x11-drv-ati-firmware
-ql2500-firmware
-rt61pci-firmware
-ipw2200-firmware
-iwl6000g2a-firmware
-bfa-firmware
-iwl1000-firmware
-iwl100-firmware
-iwl5000-firmware
-ql2400-firmware
-rt73usb-firmware
-ql23xx-firmware
-iwl4965-firmware
-ql2100-firmware
-ivtv-firmware
-zd1211-firmware

#Allow for dhcp access
dhclient
iputils

%end

#
# Add custom post scripts after the base post.
#
%post
%end

# more ec2-ify
%post --erroronfail

# create ec2-user
/usr/sbin/useradd ec2-user
/bin/echo -e 'ec2-user\tALL=(ALL)\tNOPASSWD: ALL' >> /etc/sudoers

# disable root password based login
cat >> /etc/ssh/sshd_config << EOF
PermitRootLogin without-password
UseDNS no
EOF

# disable zerconf route
cat >> /etc/sysconfig/network << EOF
NOZEROCONF=yes
EOF
%end

{'fraction_non_alphanumeric': 0.11256728293938685, 'fraction_numerical': 0.047741633512754504, 'mean_word_length': 4.500643500643501, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 15, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6518800', 'n_tokens_mistral': 1826, 'n_tokens_neox': 1641, 'n_words': 391}