Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1401864
  • 博文数量: 343
  • 博客积分: 13098
  • 博客等级: 上将
  • 技术积分: 2862
  • 用 户 组: 普通用户
  • 注册时间: 2005-07-06 00:35
文章存档

2012年(131)

2011年(31)

2010年(53)

2009年(23)

2008年(62)

2007年(2)

2006年(36)

2005年(5)

分类: 虚拟化

2012-08-06 01:42:33

把node 2.5的kickstart文件dump出来了,后面会分析下:


  1. repo --name=local --baseurl=file:///root/ovirt/ovirt-cache/ovirt
  2. #version=DEVEL
  3. # Firewall configuration
  4. firewall --disabled
  5. repo --name="f17" --mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-17&arch=x86_64
  6. repo --name="f17-updates" --mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-f17&arch=x86_64
  7. repo --name="ovirt-stable-repo" --baseurl=http://ovirt.org/releases/stable/rpm/Fedora/17
  8. device virtio_blk
  9. device virtio_pci
  10. device scsi_wait_scan
  11. device dm-multipath
  12. device dm-round-robin
  13. device dm-emc
  14. device dm-rdac
  15. device dm-hp-sw
  16. device scsi_dh_rdac
  17. device 3w-9xxx
  18. device 3w-sas
  19. device 3w-xxxx
  20. device a100u2w
  21. device aacraid
  22. device aic79xx
  23. device aic94xx
  24. device arcmsr
  25. device atp870u
  26. device be2iscsi
  27. device bfa
  28. device BusLogic
  29. device cciss
  30. device cxgb3i
  31. device dc395x
  32. device fnic
  33. device gdth
  34. device hpsa
  35. device hptiop
  36. device imm
  37. device initio
  38. device ips
  39. device libosd
  40. device libsas
  41. device libsrp
  42. device lpfc
  43. device megaraid
  44. device megaraid_mbox
  45. device megaraid_mm
  46. device megaraid_sas
  47. device mpt2sas
  48. device mvsas
  49. device osd
  50. device osst
  51. device pm8001
  52. device pmcraid
  53. device qla1280
  54. device qla2xxx
  55. device qla4xxx
  56. device qlogicfas408
  57. device stex
  58. device tmscsim
  59. device ums-sddr09
  60. device ums-realtek
  61. device ums-sddr55
  62. device ums-isd200
  63. device ums-alauda
  64. device ums-freecom
  65. device ums-cypress
  66. device ums-jumpshot
  67. device ums-onetouch
  68. device ums-karma
  69. device ums-usbat
  70. device ums-datafab
  71. device ums-eneub6250
  72. # System authorization information
  73. auth --useshadow --enablemd5
  74. # System keyboard
  75. keyboard us
  76. # System language
  77. lang en_US.UTF-8
  78. # SELinux configuration
  79. selinux --disabled
  80. # Installation logging level
  81. logging --level=info

  82. # System services
  83. services --enabled="auditd,ntpd,ntpdate,iptables,network,rsyslog,multipathd,snmpd,ovirt-early,ovirt,ovirt-post,ovirt-cim,anyterm,collectd,libvirtd,cgconfig"
  84. # System timezone
  85. timezone --isUtc UTC
  86. # System bootloader configuration
  87. bootloader --append="check rootflags=ro crashkernel=512M-2G:64M,2G-:128M elevator=deadline install quiet rd_NO_LVM" --location=mbr --timeout=30
  88. # Disk partitioning information
  89. part / --fstype="ext2" --size=1280

  90. %post
  91. echo "Starting Kickstart Post"
  92. PATH=/sbin:/usr/sbin:/bin:/usr/bin
  93. export PATH

  94. # cleanup rpmdb to allow non-matching host and chroot RPM versions
  95. rm -f /var/lib/rpm/__db*

  96. echo "Creating shadow files"
  97. # because we aren't installing authconfig, we aren't setting up shadow
  98. # and gshadow properly. Do it by hand here
  99. pwconv
  100. grpconv

  101. echo "Lock root account"
  102. passwd -l root

  103. # set SELinux booleans
  104. # rhbz#502779 restrict certain memory protection operations
  105. # keep allow_execmem on for grub
  106. # rhbz#642209 allow virt images on NFS
  107. semanage boolean -m -S targeted -F /dev/stdin << \EOF_semanage
  108. allow_execstack=0
  109. virt_use_nfs=1
  110. EOF_semanage

  111. # make sure we don't autostart virbr0 on libvirtd startup
  112. rm -f /etc/libvirt/qemu/networks/autostart/default.xml

  113. # rhevh uses libvirtd upstart job, sysv initscript must not interfere
  114. rm -f /etc/rc.d/init.d/libvirtd

  115. # remove the /etc/krb5.conf file; it will be fetched on bootup
  116. rm -f /etc/krb5.conf

  117. # Remove the default logrotate daily cron job
  118. # since we run it every 10 minutes instead.
  119. rm -f /etc/cron.daily/logrotate

  120. # root's bash profile
  121. cat >> /root/.bashrc << \EOF_bashrc
  122. # aliases used for the temporary
  123. function mod_vi() {
  124.   /bin/vi $@
  125.   restorecon -v $@ >/dev/null 2>&1
  126. }

  127. function mod_yum() {
  128.   if [ "$1" == "--force" ]; then
  129.       echo $@ > /dev/null
  130.       shift
  131.       /usr/bin/yum $@
  132.   else
  133.       printf "\nUsing yum is not supported\n\n"
  134.   fi
  135. }

  136. alias ping='ping -c 3'
  137. alias yum="mod_yum"
  138. export MALLOC_CHECK_=1
  139. export LVM_SUPPRESS_FD_WARNINGS=0
  140. EOF_bashrc

  141. # directories required in the image with the correct perms
  142. # config persistance currently handles only regular files
  143. mkdir -p /root/.ssh
  144. chmod 700 /root/.ssh
  145. mkdir -p /boot
  146. mkdir -p /boot-kdump
  147. mkdir -p /config
  148. mkdir -p /data
  149. mkdir -p /data2
  150. mkdir -p /live
  151. mkdir -p /liveos
  152. mkdir -p /root/.uml
  153. mkdir -p /var/cache/multipathd
  154. touch /var/lib/random-seed
  155. echo "/dev/HostVG/Config /config ext4 defaults,noauto,noatime 0 0" >> /etc/fstab

  156. # Create wwids file to prevent an error on boot, rhbz #805570
  157. mkdir -p /etc/multipath
  158. touch /etc/multipath/wwids
  159. chmod 0600 /etc/multipath/wwids

  160. # prepare for STATE_MOUNT in rc.sysinit
  161. augtool << \EOF_readonly-root
  162. set /files/etc/sysconfig/readonly-root/STATE_LABEL CONFIG
  163. set /files/etc/sysconfig/readonly-root/STATE_MOUNT /config
  164. set /files/etc/sysconfig/readonly-root/READONLY yes
  165. save
  166. EOF_readonly-root

  167. # comment out /etc/* entries in rwtab to prevent overlapping mounts
  168. sed -i '/^files    \/etc*/ s/^/#/' /etc/rwtab
  169. cat > /etc/rwtab.d/ovirt << \EOF_rwtab_ovirt
  170. files    /etc
  171. dirs    /var/lib/multipath
  172. dirs    /var/lib/net-snmp
  173. dirs /var/lib/dnsmasq
  174. files    /root/.ssh
  175. dirs    /root/.uml
  176. dirs    /root/.virt-manager
  177. dirs    /home/admin/.virt-manager
  178. files    /var/cache/libvirt
  179. files    /var/empty/sshd/etc/localtime
  180. files    /var/lib/libvirt
  181. files /var/lib/multipath
  182. files /var/cache/multipathd
  183. empty    /mnt
  184. empty    /live
  185. files    /boot
  186. empty    /boot-kdump
  187. empty    /cgroup
  188. files    /var/lib/yum
  189. files    /var/cache/yum
  190. EOF_rwtab_ovirt

  191. # fix iSCSI/LVM startup issue
  192. sed -i 's/node\.session\.initial_login_retry_max.*/node.session.initial_login_retry_max = 60/' /etc/iscsi/iscsid.conf

  193. #lvm.conf should use /dev/mapper and /dev/sdX devices
  194. # and not /dev/dm-X devices
  195. sed -i 's/preferred_names = \[ "^\/dev\/mpath\/", "^\/dev\/mapper\/mpath", "^\/dev\/\[hs\]d" \]/preferred_names = \[ "^\/dev\/mapper", "^\/dev\/\[hsv\]d" \]/g' /etc/lvm/lvm.conf

  196. # unset AUDITD_LANG to prevent boot errors
  197. sed -i '/^AUDITD_LANG*/ s/^/#/' /etc/sysconfig/auditd

  198. # kdump configuration
  199. augtool << \EOF_kdump
  200. set /files/etc/sysconfig/kdump/KDUMP_BOOTDIR /boot-kdump
  201. set /files/etc/sysconfig/kdump/MKDUMPRD_ARGS --allow-missing
  202. save
  203. EOF_kdump

  204. cat > /etc/snmp/snmpd.conf << \EOF_snmpd
  205. master agentx
  206. dontLogTCPWrappersConnects yes
  207. rwuser root auth .1
  208. EOF_snmpd

  209. # add admin user for configuration ui
  210. useradd admin
  211. usermod -G wheel admin
  212. usermod -s /usr/libexec/ovirt-admin-shell admin
  213. echo "%wheel    ALL=(ALL)    NOPASSWD: ALL" >> /etc/sudoers

  214. # load modules required by crypto swap
  215. cat > /etc/sysconfig/modules/swap-crypt.modules << \EOF_swap-crypt
  216. #!/bin/sh

  217. modprobe aes >/dev/null 2>&1
  218. modprobe dm_mod >/dev/null 2>&1
  219. modprobe dm_crypt >/dev/null 2>&1
  220. modprobe cryptoloop >/dev/null 2>&1
  221. modprobe cbc >/dev/null 2>&1
  222. modprobe sha256 >/dev/null 2>&1

  223. EOF_swap-crypt
  224. chmod +x /etc/sysconfig/modules/swap-crypt.modules

  225. #strip out all unncesssary locales
  226. localedef --list-archive | grep -v -i -E 'en_US.utf8' |xargs localedef --delete-from-archive
  227. mv /usr/lib/locale/locale-archive /usr/lib/locale/locale-archive.tmpl
  228. /usr/sbin/build-locale-archive

  229. # use static RPC ports, to avoid collisions
  230. augtool << \EOF_nfs
  231. set /files/etc/sysconfig/nfs/RQUOTAD_PORT 875
  232. set /files/etc/sysconfig/nfs/LOCKD_TCPPORT 32803
  233. set /files/etc/sysconfig/nfs/LOCKD_UDPPORT 32769
  234. set /files/etc/sysconfig/nfs/MOUNTD_PORT 892
  235. set /files/etc/sysconfig/nfs/STATD_PORT 662
  236. set /files/etc/sysconfig/nfs/STATD_OUTGOING_PORT 2020
  237. save
  238. EOF_nfs

  239. # sosreport fixups for node image:
  240. # use .pyc for plugins enumeration, .py is blacklisted
  241. # include *-release
  242. patch --fuzz 3 -d /usr/lib/python2.*/site-packages/sos -p0 << \EOF_sos_patch
  243. --- sosreport.py.orig    2011-04-07 11:51:40.000000000 +0000
  244. +++ sosreport.py    2011-07-06 13:26:44.000000000 +0000
  245. @@ -428,8 +428,8 @@
  246.  
  247.      # validate and load plugins
  248.      for plug in plugins:
  249. - plugbase = plug[:-3]
  250. - if not plug[-3:] == '.py' or plugbase == "__init__":
  251. + plugbase = plug[:-4]
  252. + if not plug[-4:] == '.pyc' or plugbase == "__init__":
  253.              continue
  254.          try:
  255.              if GlobalVars.policy.validatePlugin(pluginpath + plug):
  256. --- plugins/general.py.orig 2011-02-09 15:25:48.000000000 +0000
  257. +++ plugins/general.py 2011-07-06 23:13:32.000000000 +0000
  258. @@ -25,8 +25,7 @@
  259.                    ("all_logs", "collect all log files defined in syslog.conf", "", False)]
  260.  
  261.      def setup(self):
  262. - self.addCopySpec("/etc/redhat-release")
  263. - self.addCopySpec("/etc/fedora-release")
  264. + self.addCopySpec("/etc/*-release")
  265.          self.addCopySpec("/etc/inittab")
  266.          self.addCopySpec("/etc/sos.conf")
  267.          self.addCopySpec("/etc/sysconfig")
  268. EOF_sos_patch
  269. python -m compileall /usr/lib/python2.*/site-packages/sos

  270. # XXX someting is wrong with readonly-root and dracut
  271. # see modules.d/95rootfs-block/mount-root.sh
  272. sed -i "s/defaults,noatime/defaults,ro,noatime/g" /etc/fstab

  273. echo "StrictHostKeyChecking no" >> /etc/ssh/ssh_config

  274. #mount kernel debugfs
  275. echo "debugfs /sys/kernel/debug debugfs auto 0 0" >> /etc/fstab

  276. # create .virt-manager directories for readonly root
  277. mkdir -p /root/.virt-manager /home/admin/.virt-manager

  278. #symlink virt-manager-tui pointer file to .pyc version
  279. sed -i "s/tui.py/tui.pyc/g" /usr/bin/virt-manager-tui

  280. #symlink ovirt-config-setup into $PATH
  281. ln -s /usr/libexec/ovirt-config-setup /usr/sbin/setup


  282. #set NETWORKING off by default
  283. augtool << \EOF_NETWORKING
  284. set /files/etc/sysconfig/network/NETWORKING no
  285. save
  286. EOF_NETWORKING

  287. # disable SSH password auth by default
  288. # set ssh timeouts for increased security
  289. augtool << \EOF_sshd_config
  290. set /files/etc/ssh/sshd_config/PasswordAuthentication no
  291. set /files/etc/ssh/sshd_config/ClientAliveInterval 900
  292. set /files/etc/ssh/sshd_config/ClientAliveCountMax 0
  293. save
  294. EOF_sshd_config

  295. #CIM related changes
  296. # set read-only
  297. echo "readonly = true;" > /etc/libvirt-cim.conf
  298. useradd -G sfcb cim

  299. # disable yum repos by default
  300. augtool << \EOF_yum
  301. set /files/etc/yum.repos.d/fedora.repo/fedora/enabled 0
  302. set /files/etc/yum.repos.d/fedora-updates.repo/updates/enabled 0
  303. save
  304. EOF_yum
  305.     touch /etc/resolv.conf

  306.     # set up qemu daemon to allow outside VNC connections
  307.     sed -i -e 's/^[[:space:]]*#[[:space:]]*\(vnc_listen = "0.0.0.0"\).*/\1/' \
  308.        /etc/libvirt/qemu.conf

  309.     # disable mdns/avahi
  310.     sed -i -e 's/^[[:space:]]*#[[:space:]]*\(mdns_adv = 0\).*/\1/' \
  311.        /etc/libvirt/qemu.conf

  312. #ovirt_setup_anyterm()
  313.    # configure anyterm
  314.    cat >> /etc/sysconfig/anyterm << \EOF_anyterm
  315. ANYTERM_CMD="sudo /usr/bin/virsh console %p"
  316. ANYTERM_LOCAL_ONLY=false
  317. EOF_anyterm

  318.    # permit it to run the virsh console
  319.    echo "anyterm ALL=NOPASSWD: /usr/bin/virsh console *" >> /etc/sudoers

  320. # systemd configuration
  321. # set default runlevel to multi-user(3)

  322. rm -rf /etc/systemd/system/default.target
  323. ln -sf /lib/systemd/system/multi-user.target /etc/systemd/system/default.target
  324. systemctl enable ovirt-firstboot.service >/dev/null 2>&1

  325. echo "Configuring IPTables"
  326. # here, we need to punch the appropriate holes in the firewall
  327. cat > /etc/sysconfig/iptables << \EOF
  328. # oVirt automatically generated firewall configuration
  329. *filter
  330. :INPUT ACCEPT [0:0]
  331. :FORWARD ACCEPT [0:0]
  332. :OUTPUT ACCEPT [0:0]
  333. -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
  334. -A INPUT -p icmp -j ACCEPT
  335. -A INPUT -i lo -j ACCEPT
  336. #vdsm
  337. -A INPUT -p tcp --dport 54321 -j ACCEPT
  338. # SSH
  339. -A INPUT -p tcp --dport 22 -j ACCEPT
  340. # guest consoles
  341. -A INPUT -p tcp -m multiport --dports 5634:6166 -j ACCEPT
  342. # migration
  343. -A INPUT -p tcp -m multiport --dports 49152:49216 -j ACCEPT
  344. # snmp
  345. -A INPUT -p udp --dport 161 -j ACCEPT
  346. #
  347. -A INPUT -j REJECT --reject-with icmp-host-prohibited
  348. -A FORWARD -m physdev ! --physdev-is-bridged -j REJECT --reject-with icmp-host-prohibited
  349. COMMIT
  350. EOF
  351. # configure IPv6 firewall, default is all ACCEPT
  352. cat > /etc/sysconfig/ip6tables << \EOF
  353. # oVirt automatically generated firewall configuration
  354. *filter
  355. :INPUT ACCEPT [0:0]
  356. :FORWARD ACCEPT [0:0]
  357. :OUTPUT ACCEPT [0:0]
  358. -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
  359. -A INPUT -p ipv6-icmp -j ACCEPT
  360. -A INPUT -i lo -j ACCEPT
  361. # SSH
  362. -A INPUT -p tcp --dport 22 -j ACCEPT
  363. # guest consoles
  364. -A INPUT -p tcp -m multiport --dports 5634:6166 -j ACCEPT
  365. # migration
  366. -A INPUT -p tcp -m multiport --dports 49152:49216 -j ACCEPT
  367. # snmp
  368. -A INPUT -p udp --dport 161 -j ACCEPT
  369. # unblock ipv6 dhcp response
  370. -A INPUT -p udp --dport 546 -j ACCEPT
  371. -A INPUT -j REJECT --reject-with icmp6-adm-prohibited
  372. -A FORWARD -m physdev ! --physdev-is-bridged -j REJECT --reject-with icmp6-adm-prohibited
  373. COMMIT
  374. EOF

  375. python -m compileall /usr/share/virt-manager

  376. echo "Configuring SELinux"
  377. # custom module for node specific rules
  378. mkdir /tmp/SELinux
  379. cd /tmp/SELinux
  380. cat > ovirt.te << \EOF_OVIRT_TE
  381. module ovirt 1.0;
  382. require {
  383.     type initrc_t;
  384.     type initrc_tmp_t;
  385.     type mount_t;
  386.     type setfiles_t;
  387.     type shadow_t;
  388.     type unconfined_t;
  389.     type passwd_t;
  390.     type user_tmp_t;
  391.     type var_log_t;
  392.     type consoletype_t;
  393.     type net_conf_t;
  394.     type collectd_t;
  395.     type virt_etc_t;
  396.     type loadkeys_t;
  397.     type initrc_tmp_t;
  398.     class file { append mounton open getattr read execute ioctl lock entrypoint write };
  399.     class fd { use };
  400.     class process { sigchld signull transition noatsecure siginh rlimitinh getattr };
  401.     class fifo_file { getattr open read write append lock ioctl };
  402.     class filesystem getattr;
  403.     class dir { getattr search open read lock ioctl };
  404.     class socket { read write };
  405.     class tcp_socket { read write };
  406.     class udp_socket { read write };
  407.     class rawip_socket { read write };
  408.     class netlink_socket { read write };
  409.     class packet_socket { read write };
  410.     class unix_stream_socket { read write create ioctl getattr lock setattr append bind connect getopt setopt shutdown connectto };
  411.     class unix_dgram_socket { read write };
  412.     class appletalk_socket { read write };
  413.     class netlink_route_socket { read write };
  414.     class netlink_firewall_socket { read write };
  415.     class netlink_tcpdiag_socket { read write };
  416.     class netlink_nflog_socket { read write };
  417.     class netlink_xfrm_socket { read write };
  418.     class netlink_selinux_socket { read write };
  419.     class netlink_audit_socket { read write };
  420.     class netlink_ip6fw_socket { read write };
  421.     class netlink_dnrt_socket { read write };
  422.     class netlink_kobject_uevent_socket { read write };
  423.     class tun_socket { read write };
  424.     class chr_file { getattr read write append ioctl lock open };
  425.     class lnk_file { getattr read };
  426.     class sock_file { getattr write open append };
  427. }
  428. allow mount_t shadow_t:file mounton;
  429. allow setfiles_t initrc_tmp_t:file append;
  430. allow setfiles_t net_conf_t:file read;
  431. allow consoletype_t var_log_t:file append;
  432. allow passwd_t user_tmp_t:file write;
  433. # Unknown on F17 brctl_t:
  434. #allow brctl_t net_conf_t:file read;
  435. # Suppose because of collectd libvirt plugin
  436. allow collectd_t virt_etc_t:file read;
  437. # Suppose because etc is on tmpfs
  438. allow loadkeys_t initrc_tmp_t:file read;

  439. type ovirt_exec_t;
  440. init_daemon_domain(unconfined_t,ovirt_exec_t)
  441. EOF_OVIRT_TE
  442. cat > ovirt.fc << \EOF_OVIRT_FC
  443. /etc/rc\.d/init\.d/ovirt-firstboot -- gen_context(system_u:object_r:ovirt_exec_t)
  444. /etc/rc\.d/init\.d/ovirt-post -- gen_context(system_u:object_r:ovirt_exec_t)
  445. EOF_OVIRT_FC
  446. make NAME=targeted -f /usr/share/selinux/devel/Makefile
  447. semodule -v -i ovirt.pp
  448. cd /
  449. rm -rf /tmp/SELinux
  450. echo "-w /etc/shadow -p wa" >> /etc/audit/audit.rules

  451. # Workaround for vdsm needing /etc/ovirt-node-image-release
  452. ln -s /etc/system-release /etc/ovirt-node-image-release
  453. %end

  454. %post --nochroot
  455. PRODUCT='oVirt Node Hypervisor'
  456. PRODUCT_SHORT='oVirt Node Hypervisor'
  457. PACKAGE=ovirt-node-iso
  458. VERSION=2.5.0
  459. RELEASE=999.100000.fc17
  460. if [ -f "ovirt-authorized_keys" ]; then
  461.   echo "Adding authorized_keys to Image"
  462.   mkdir -p $INSTALL_ROOT/root/.ssh
  463.   cp -v ovirt-authorized_keys $INSTALL_ROOT/root/.ssh/authorized_keys
  464.   chown -R root:root $INSTALL_ROOT/root/.ssh
  465.   chmod 755 $INSTALL_ROOT/root/.ssh
  466.   chmod 644 $INSTALL_ROOT/root/.ssh/authorized_keys
  467. fi

  468. echo "Fixing boot menu"
  469. # remove quiet from Node bootparams, added by livecd-creator
  470. sed -i -e 's/ quiet//' $LIVE_ROOT/isolinux/isolinux.cfg

  471. # Remove Verify and Boot option
  472. sed -i -e '/label check0/{N;N;N;d;}' $LIVE_ROOT/isolinux/isolinux.cfg

  473. # Rename Boot option to Install or Upgrade
  474. sed -i 's/^ menu label Boot$/ menu label Install or Upgrade/' $LIVE_ROOT/isolinux/isolinux.cfg

  475. # add serial console boot entry
  476. menu=$(mktemp)
  477. awk '
  478. /^label linux0/ { linux0=1 }
  479. linux0==1 && $1=="append" {
  480.   append0=$0
  481. }
  482. linux0==1 && $1=="label" && $2!="linux0" {
  483.   linux0=2
  484.   print "label install (basic video)"
  485.   print " menu label Install (Basic Video)"
  486.   print " kernel vmlinuz0"
  487.   print append0" nomodeset "
  488.   print "label serial-console"
  489.   print " menu label Install or Upgrade with serial console"
  490.   print " kernel vmlinuz0"
  491.   print append0" console=ttyS0,115200n8 "
  492.   print "label reinstall"
  493.   print " menu label Reinstall"
  494.   print " kernel vmlinuz0"
  495.   print append0" reinstall "
  496.   print "label reinstall (basic video)"
  497.   print " menu label Reinstall (Basic Video)"
  498.   print " kernel vmlinuz0"
  499.   print append0" reinstall nomodeset "
  500.   print "label reinstall-serial"
  501.   print " menu label Reinstall with serial console"
  502.   print " kernel vmlinuz0"
  503.   print append0" reinstall console=ttyS0,115200n8 "
  504.   print "label uninstall"
  505.   print " menu label Uninstall"
  506.   print " kernel vmlinuz0"
  507.   print append0" uninstall "
  508. }
  509. { print }
  510. ' $LIVE_ROOT/isolinux/isolinux.cfg > $menu
  511. # change the title
  512. sed -i -e '/^menu title/d' $menu
  513. echo "say This is the $PRODUCT $VERSION ($RELEASE)" > $LIVE_ROOT/isolinux/isolinux.cfg
  514. echo "menu title ${PRODUCT_SHORT} $VERSION ($RELEASE)" >> $LIVE_ROOT/isolinux/isolinux.cfg
  515. cat $menu >> $LIVE_ROOT/isolinux/isolinux.cfg
  516. rm $menu
  517. cp $INSTALL_ROOT/usr/share/ovirt-node/syslinux-vesa-splash.jpg $LIVE_ROOT/isolinux/splash.jpg

  518. # store image version info in the ISO and rootfs
  519. cat > $LIVE_ROOT/isolinux/version <<EOF
  520. PRODUCT='$PRODUCT'
  521. PRODUCT_SHORT='${PRODUCT_SHORT}'
  522. PRODUCT_CODE=$PRODUCT_CODE
  523. RECIPE_SHA256=$RECIPE_SHA256
  524. RECIPE_RPM=$RECIPE_RPM
  525. PACKAGE=$PACKAGE
  526. VERSION=$VERSION
  527. RELEASE=$RELEASE
  528. EOF
  529. cp $LIVE_ROOT/isolinux/version $INSTALL_ROOT/etc/default/

  530. # overwrite user visible banners with the image versioning info
  531. cat > $INSTALL_ROOT/etc/$PACKAGE-release <<EOF
  532. $PRODUCT release $VERSION ($RELEASE)
  533. EOF
  534. ln -snf $PACKAGE-release $INSTALL_ROOT/etc/redhat-release
  535. ln -snf $PACKAGE-release $INSTALL_ROOT/etc/system-release
  536. cp $INSTALL_ROOT/etc/$PACKAGE-release $INSTALL_ROOT/etc/issue
  537. echo "Kernel \r on an \m (\l)" >> $INSTALL_ROOT/etc/issue
  538. cp $INSTALL_ROOT/etc/issue $INSTALL_ROOT/etc/issue.net

  539. NAME=$(grep CDLABEL $LIVE_ROOT/isolinux/isolinux.cfg |head -n1|sed -r 's/^.*CDLABEL\=([a-zA-Z0-9_\.-]+) .*$/\1/g')

  540. #setup efi boot menu
  541. cat > $LIVE_ROOT/EFI/BOOT/BOOTX64.conf <<EOF
  542. default=0
  543. splashimage=/EFI/BOOT/splash.xpm.gz
  544. timeout 30
  545. hiddenmenu
  546. title Install or Upgrade
  547.   kernel /isolinux/vmlinuz0 root=live:CDLABEL=$NAME rootfstype=auto ro liveimg check rootflags=ro crashkernel=512M-2G:64M,2G-:128M elevator=deadline install quiet rd_NO_LVM rd.luks=0 rd.md=0 rd.dm=0
  548.   initrd /isolinux/initrd0.img
  549. title Install or Upgrade (Basic Video)
  550.   kernel /isolinux/vmlinuz0 root=live:CDLABEL=$NAME rootfstype=auto ro liveimg check rootflags=ro crashkernel=512M-2G:64M,2G-:128M elevator=deadline install quiet rd_NO_LVM rd.luks=0 rd.md=0 rd.dm=0
  551.   initrd /isolinux/initrd0.img
  552. title Install or Upgrade with serial console
  553.   kernel /isolinux/vmlinuz0 root=live:CDLABEL=$NAME rootfstype=auto ro liveimg check rootflags=ro crashkernel=512M-2G:64M,2G-:128M elevator=deadline install quiet rd_NO_LVM rd.luks=0 rd.md=0 rd.dm=0 console=ttyS0,115200n8
  554.   initrd /isolinux/initrd0.img
  555. title Reinstall
  556.   kernel /isolinux/vmlinuz0 root=live:CDLABEL=$NAME rootfstype=auto ro liveimg check rootflags=ro crashkernel=512M-2G:64M,2G-:128M elevator=deadline install quiet rd_NO_LVM rd.luks=0 rd.md=0 rd.dm=0 reinstall
  557.   initrd /isolinux/initrd0.img
  558. title Reinstall (Basic Video)
  559.   kernel /isolinux/vmlinuz0 root=live:CDLABEL=$NAME rootfstype=auto ro liveimg check rootflags=ro crashkernel=512M-2G:64M,2G-:128M elevator=deadline install quiet rd_NO_LVM rd.luks=0 rd.md=0 rd.dm=0 reinstall
  560.   initrd /isolinux/initrd0.img
  561. title Reinstall with serial console
  562.   kernel /isolinux/vmlinuz0 root=live:CDLABEL=$NAME rootfstype=auto ro liveimg check rootflags=ro crashkernel=512M-2G:64M,2G-:128M elevator=deadline install quiet rd_NO_LVM rd.luks=0 rd.md=0 rd.dm=0 reinstall console=ttyS0,115200n8
  563.   initrd /isolinux/initrd0.img
  564. title Uninstall
  565.   kernel /isolinux/vmlinuz0 root=live:CDLABEL=$NAME rootfstype=auto ro liveimg check rootflags=ro crashkernel=512M-2G:64M,2G-:128M elevator=deadline install quiet rd_NO_LVM rd.luks=0 rd.md=0 rd.dm=0 uninstall
  566.   initrd /isolinux/initrd0.img
  567. title Start $PRODUCT in basic graphics mode.
  568.   kernel /isolinux/vmlinuz0 root=live:CDLABEL=$NAME rootfstype=auto ro liveimg check rootflags=ro crashkernel=512M-2G:64M,2G-:128M elevator=deadline install quiet rd_NO_LVM rd.luks=0 rd.md=0 rd.dm=0 nomodeset
  569.   initrd /isolinux/initrd0.img
  570. EOF

  571. %end

  572. %post --interpreter=image-minimizer --nochroot
  573. droprpm system-config-*
  574. keeprpm system-config-keyboard-base
  575. droprpm libsemanage-python

  576. droprpm mkinitrd
  577. droprpm isomd5sum
  578. droprpm checkpolicy
  579. droprpm make
  580. droprpm setools-libs-python
  581. droprpm setools-libs

  582. droprpm gamin
  583. droprpm pm-utils
  584. droprpm usermode
  585. droprpm vbetool
  586. droprpm ConsoleKit
  587. droprpm hdparm
  588. droprpm linux-atm-libs
  589. droprpm mtools
  590. droprpm syslinux
  591. droprpm wireless-tools
  592. droprpm radeontool
  593. droprpm libicu
  594. droprpm gnupg2
  595. droprpm fedora-release-notes
  596. droprpm fedora-logos

  597. # rhbz#641494 - drop unnecessary rpms pulled in from libguestfs-winsupport
  598. droprpm fakechroot
  599. droprpm fakechroot-libs
  600. droprpm fakeroot
  601. droprpm fakeroot-libs
  602. droprpm febootstrap

  603. # cronie pulls in exim (sendmail) which pulls in all kinds of perl deps
  604. droprpm exim
  605. droprpm perl*
  606. # keep libperl for snmpd
  607. keeprpm perl-libs
  608. droprpm postfix
  609. droprpm mysql*

  610. droprpm sysklogd

  611. # pam complains when this is missing
  612. keeprpm ConsoleKit-libs

  613. # kernel modules minimization

  614. # filesystems
  615. drop /lib/modules/*/kernel/fs
  616. keep /lib/modules/*/kernel/fs/ext*
  617. keep /lib/modules/*/kernel/fs/mbcache*
  618. keep /lib/modules/*/kernel/fs/squashfs
  619. keep /lib/modules/*/kernel/fs/jbd*
  620. keep /lib/modules/*/kernel/fs/btrfs
  621. keep /lib/modules/*/kernel/fs/cifs*
  622. keep /lib/modules/*/kernel/fs/fat
  623. keep /lib/modules/*/kernel/fs/nfs
  624. keep /lib/modules/*/kernel/fs/nfs_common
  625. keep /lib/modules/*/kernel/fs/fscache
  626. keep /lib/modules/*/kernel/fs/lockd
  627. keep /lib/modules/*/kernel/fs/nls/nls_utf8.ko
  628. keep /lib/modules/*/kernel/fs/configfs/configfs.ko
  629. # autofs4 configfs exportfs *fat *jbd mbcache.ko nls xfs
  630. #*btrfs cramfs *ext2 *fscache *jbd2 *nfs squashfs
  631. # cachefiles dlm *ext3 fuse jffs2 *nfs_common ubifs
  632. # cifs ecryptfs *ext4 gfs2 *lockd nfsd udf

  633. # network
  634. drop /lib/modules/*/kernel/net
  635. keep /lib/modules/*/kernel/net/802*
  636. keep /lib/modules/*/kernel/net/bridge
  637. keep /lib/modules/*/kernel/net/core
  638. keep /lib/modules/*/kernel/net/ipv*
  639. keep /lib/modules/*/kernel/net/key
  640. keep /lib/modules/*/kernel/net/llc
  641. keep /lib/modules/*/kernel/net/netfilter
  642. keep /lib/modules/*/kernel/net/rds
  643. keep /lib/modules/*/kernel/net/sctp
  644. keep /lib/modules/*/kernel/net/sunrpc
  645. #*802 atm can ieee802154 *key *netfilter rfkill *sunrpc xfrm
  646. #*8021q bluetooth *core *ipv4 *llc phonet sched wimax
  647. # 9p *bridge dccp *ipv6 mac80211 *rds *sctp wireless

  648. drop /lib/modules/*/kernel/sound

  649. # drivers
  650. drop /lib/modules/*/kernel/drivers
  651. keep /lib/modules/*/kernel/drivers/ata
  652. keep /lib/modules/*/kernel/drivers/block
  653. keep /lib/modules/*/kernel/drivers/cdrom
  654. keep /lib/modules/*/kernel/drivers/char
  655. keep /lib/modules/*/kernel/drivers/cpufreq
  656. keep /lib/modules/*/kernel/drivers/dca
  657. keep /lib/modules/*/kernel/drivers/dma
  658. keep /lib/modules/*/kernel/drivers/edac
  659. keep /lib/modules/*/kernel/drivers/firmware
  660. keep /lib/modules/*/kernel/drivers/idle
  661. keep /lib/modules/*/kernel/drivers/infiniband
  662. keep /lib/modules/*/kernel/drivers/input/misc/uinput.ko
  663. keep /lib/modules/*/kernel/drivers/md
  664. keep /lib/modules/*/kernel/drivers/message
  665. keep /lib/modules/*/kernel/drivers/net
  666. drop /lib/modules/*/kernel/drivers/net/pcmcia
  667. drop /lib/modules/*/kernel/drivers/net/wireless
  668. drop /lib/modules/*/kernel/drivers/net/ppp*
  669. keep /lib/modules/*/kernel/drivers/pci
  670. keep /lib/modules/*/kernel/drivers/scsi
  671. keep /lib/modules/*/kernel/drivers/staging/ramzswap
  672. keep /lib/modules/*/kernel/drivers/uio
  673. keep /lib/modules/*/kernel/drivers/usb
  674. drop /lib/modules/*/kernel/drivers/usb/atm
  675. drop /lib/modules/*/kernel/drivers/usb/class
  676. drop /lib/modules/*/kernel/drivers/usb/image
  677. drop /lib/modules/*/kernel/drivers/usb/misc
  678. drop /lib/modules/*/kernel/drivers/usb/serial
  679. keep /lib/modules/*/kernel/drivers/usb/storage
  680. keep /lib/modules/*/kernel/drivers/vhost
  681. keep /lib/modules/*/kernel/drivers/virtio
  682. keep /lib/modules/*/kernel/drivers/watchdog

  683. # acpi *cpufreq hid leds mtd ?regulator uwb
  684. #*ata crypto ?hwmon *md *net* rtc *vhost
  685. # atm *dca ?i2c media ?parport *scsi* video
  686. # auxdisplay *dma *idle memstick *pci ?serial *virtio
  687. #*block *edac ieee802154 *message pcmcia ?ssb watchdog
  688. # bluetooth firewire *infiniband ?mfd platform *staging xen
  689. #*cdrom *firmware input misc ?power ?uio
  690. #*char* ?gpu isdn mmc ?pps *usb

  691. drop /usr/share/zoneinfo
  692. keep /usr/share/zoneinfo/UTC

  693. drop /etc/alsa
  694. drop /usr/share/alsa
  695. drop /usr/share/awk
  696. drop /usr/share/vim
  697. drop /usr/share/anaconda
  698. drop /usr/share/backgrounds
  699. drop /usr/share/wallpapers
  700. drop /usr/share/kde-settings
  701. drop /usr/share/gnome-background-properties
  702. drop /usr/share/dracut
  703. drop /usr/share/setuptool
  704. drop /usr/share/hwdata/MonitorsDB
  705. drop /usr/share/hwdata/oui.txt
  706. drop /usr/share/hwdata/videoaliases
  707. drop /usr/share/hwdata/videodrivers
  708. drop /usr/share/firstboot
  709. drop /usr/share/lua
  710. drop /usr/share/kde4
  711. drop /usr/share/pixmaps
  712. drop /usr/share/icons
  713. drop /usr/share/fedora-release
  714. drop /usr/share/tabset
  715. drop /usr/share/augeas/lenses/tests
  716. drop /usr/share/augeas/lenses/dist/*
  717. # generic includes
  718. keep /usr/share/augeas/lenses/dist/build.aug
  719. keep /usr/share/augeas/lenses/dist/hosts.aug
  720. keep /usr/share/augeas/lenses/dist/inifile.aug
  721. keep /usr/share/augeas/lenses/dist/modprobe.aug
  722. keep /usr/share/augeas/lenses/dist/rx.aug
  723. keep /usr/share/augeas/lenses/dist/sep.aug
  724. keep /usr/share/augeas/lenses/dist/shellvars.aug
  725. keep /usr/share/augeas/lenses/dist/spacevars.aug
  726. keep /usr/share/augeas/lenses/dist/sysctl.aug
  727. keep /usr/share/augeas/lenses/dist/util.aug
  728. # whitelist only relevant lenses
  729. keep /usr/share/augeas/lenses/dist/buildd.aug
  730. keep /usr/share/augeas/lenses/dist/cgconfig.aug
  731. keep /usr/share/augeas/lenses/dist/cgrules.aug
  732. keep /usr/share/augeas/lenses/dist/cron.aug
  733. keep /usr/share/augeas/lenses/dist/dhclient.aug
  734. keep /usr/share/augeas/lenses/dist/dnsmasq.aug
  735. keep /usr/share/augeas/lenses/dist/ethers.aug
  736. keep /usr/share/augeas/lenses/dist/exports.aug
  737. keep /usr/share/augeas/lenses/dist/fstab.aug
  738. keep /usr/share/augeas/lenses/dist/group.aug
  739. keep /usr/share/augeas/lenses/dist/grub.aug
  740. keep /usr/share/augeas/lenses/dist/inittab.aug
  741. keep /usr/share/augeas/lenses/dist/iptables.aug
  742. keep /usr/share/augeas/lenses/dist/json.aug
  743. keep /usr/share/augeas/lenses/dist/krb5.aug
  744. keep /usr/share/augeas/lenses/dist/limits.aug
  745. keep /usr/share/augeas/lenses/dist/logrotate.aug
  746. keep /usr/share/augeas/lenses/dist/lokkit.aug
  747. keep /usr/share/augeas/lenses/dist/modules_conf.aug
  748. keep /usr/share/augeas/lenses/dist/multipath.aug
  749. keep /usr/share/augeas/lenses/dist/ntp.aug
  750. keep /usr/share/augeas/lenses/dist/pam.aug
  751. keep /usr/share/augeas/lenses/dist/passwd.aug
  752. keep /usr/share/augeas/lenses/dist/resolv.aug
  753. keep /usr/share/augeas/lenses/dist/securetty.aug
  754. keep /usr/share/augeas/lenses/dist/services.aug
  755. keep /usr/share/augeas/lenses/dist/shellvars_list.aug
  756. keep /usr/share/augeas/lenses/dist/sshd.aug
  757. keep /usr/share/augeas/lenses/dist/sudoers.aug
  758. keep /usr/share/augeas/lenses/dist/utill.aug
  759. keep /usr/share/augeas/lenses/dist/yum.aug
  760. drop /usr/share/tc
  761. drop /usr/share/emacs
  762. drop /usr/share/info
  763. drop /usr/src
  764. drop /usr/etc
  765. drop /usr/games
  766. drop /usr/include
  767. keep /usr/include/python2.*
  768. drop /usr/local
  769. drop /usr/sbin/dell*
  770. keep /usr/sbin/build-locale-archive
  771. drop /usr/sbin/glibc_post_upgrade.*
  772. drop /usr/lib*/tc
  773. drop /usr/lib*/tls
  774. drop /usr/lib*/sse2
  775. drop /usr/lib*/pkgconfig
  776. drop /usr/lib*/nss
  777. drop /usr/lib*/games
  778. drop /usr/lib*/alsa-lib
  779. drop /usr/lib*/krb5
  780. drop /usr/lib*/hal
  781. drop /usr/lib*/gio
  782. # syslinux
  783. drop /usr/share/syslinux
  784. # glibc-common locales
  785. drop /usr/lib/locale
  786. keep /usr/lib/locale/locale-archive
  787. keep /usr/lib/locale/usr/share/locale/en_US
  788. # pango
  789. drop /usr/lib*/pango
  790. drop /usr/lib*/libpango*
  791. drop /usr/lib*/libthai*
  792. drop /usr/share/libthai
  793. drop /etc/pango
  794. drop /usr/bin/pango*
  795. # hal
  796. drop /usr/bin/hal-disable-polling
  797. drop /usr/bin/hal-is-caller-locked-out
  798. drop /usr/bin/hal-is-caller-privileged
  799. drop /usr/bin/hal-lock
  800. drop /usr/bin/hal-set-property
  801. drop /usr/bin/hal-setup-keymap
  802. # openssh
  803. drop /usr/bin/sftp
  804. drop /usr/bin/slogin
  805. drop /usr/bin/ssh-add
  806. drop /usr/bin/ssh-agent
  807. drop /usr/bin/ssh-keyscan
  808. # docs
  809. drop /usr/share/omf
  810. drop /usr/share/gnome
  811. drop /usr/share/doc
  812. keep /usr/share/doc/*-firmware-*
  813. drop /usr/share/locale/
  814. keep /usr/share/locale/en_US
  815. drop /usr/share/man
  816. drop /usr/share/X11
  817. drop /usr/share/i18n
  818. drop /boot/*
  819. keep /boot/efi
  820. drop /var/lib/builder
  821. drop /usr/sbin/rhn_register
  822. drop /usr/sbin/*-channel

  823. drop /usr/share/selinux

  824. drop /usr/lib*/libboost*
  825. keep /usr/lib*/libboost_program_options.so*
  826. keep /usr/lib*/libboost_filesystem.so*
  827. keep /usr/lib*/libboost_thread-mt.so*
  828. keep /usr/lib*/libboost_system.so*
  829. drop /usr/kerberos
  830. keep /usr/kerberos/bin/kinit
  831. keep /usr/kerberos/bin/klist
  832. drop /lib/firmware
  833. keep /lib/firmware/3com
  834. keep /lib/firmware/acenic
  835. keep /lib/firmware/adaptec
  836. keep /lib/firmware/advansys
  837. keep /lib/firmware/bnx2
  838. keep /lib/firmware/bnx2x
  839. keep /lib/firmware/bnx2x*
  840. keep /lib/firmware/cxgb3
  841. keep /lib/firmware/cxgb4
  842. keep /lib/firmware/e100
  843. keep /lib/firmware/myricom
  844. keep /lib/firmware/ql*
  845. keep /lib/firmware/sun
  846. keep /lib/firmware/tehuti
  847. keep /lib/firmware/tigon
  848. keep /lib/firmware/cbfw_fc.bin
  849. keep /lib/firmware/ctfw_cna.bin
  850. keep /lib/firmware/ctfw_fc.bin
  851. keep /lib/firmware/aic94xx-seq.fw

  852. drop /lib/kbd/consolefonts
  853. drop /etc/pki/tls
  854. keep /etc/pki/tls/openssl.cnf
  855. drop /etc/pki/java
  856. drop /etc/pki/nssdb

  857. # minimize net-snmp
  858. drop /etc/rc.d/init.d/snmptrapd
  859. drop /etc/snmp/snmptrapd.conf
  860. drop /etc/sysconfig/snmptrapd
  861. drop /usr/sbin/snmptrapd
  862. drop /usr/bin/net-snmp-create-v3-user
  863. drop /usr/bin/snmpconf
  864. drop /usr/share/snmp/snmpconf-data

  865. #desktop files
  866. drop /etc/xdg/autostart/restorecond.desktop

  867. #ebtables depends on perl
  868. drop /sbin/ebtables-save
  869. drop /sbin/ebtables-restore

  870. # remove bogus kdump script (rpmdiff complains)
  871. drop /etc/kdump-adv-conf

  872. #cim
  873. droprpm tog-pegasus
  874. droprpm tog-pegasus-libs
  875. droprpm mailcap
  876. droprpm openslp

  877. #remove rpms added by dmraid
  878. droprpm ConsoleKit
  879. droprpm checkpolicy
  880. droprpm dmraid-events
  881. droprpm gamin
  882. droprpm gnupg2
  883. droprpm hdparm
  884. droprpm isomd5sum
  885. droprpm libicu
  886. droprpm libsemanage-python
  887. droprpm linux-atm-libs
  888. droprpm make
  889. droprpm mtools
  890. droprpm mysql-libs
  891. droprpm perl
  892. droprpm perl-Module-Pluggable
  893. droprpm perl-Net-Telnet
  894. droprpm perl-PathTools
  895. droprpm perl-Pod-Escapes
  896. droprpm perl-Pod-Simple
  897. droprpm perl-Scalar-List-Utils
  898. droprpm perl-hivex
  899. droprpm perl-macros
  900. droprpm setools-libs
  901. droprpm setools-libs-python
  902. droprpm sgpio
  903. droprpm syslinux
  904. droprpm system-config-firewall-base
  905. droprpm usermode

  906. #NFS Server
  907. droprpm rpcbind
  908. drop /usr/sbin/rpc.idmapd
  909. drop /usr/bin/rpcgen
  910. drop /usr/sbin/rpc.gssd
  911. drop /usr/sbin/rpc.idmapd
  912. drop /usr/sbin/rpc.mountd
  913. drop /usr/sbin/rpc.nfsd
  914. drop /usr/sbin/rpc.svcgssd
  915. drop /usr/sbin/rpcdebug
  916. keep /usr/share/virt-manager
  917. %end

  918. %post
  919. echo "Removing python source files"
  920. find /usr -name '*.py' -exec rm -f {} \;
  921. find /usr -name '*.pyo' -exec rm -f {} \;

  922. %end

  923. %post
  924. echo -n "Creating manifest"
  925. # Create post-image processing manifests
  926. rpm -qa --qf '%{name}-%{version}-%{release}.%{arch} (%{SIGPGP:pgpsig})\n' | \
  927.     sort > /manifest-rpm.txt
  928. rpm -qa --qf '%{sourcerpm}\n' | sort -u > /manifest-srpm.txt
  929. # collect all included licenses rhbz#601927
  930. rpm -qa --qf '%{license}\n' | sort -u > /manifest-license.txt
  931. # dependencies
  932. rpm -qa | xargs -n1 rpm -e --test 2> /manifest-deps.txt
  933. echo -n "."

  934. # Takes about 4min
  935. #find / -xdev -print -exec rpm -qf {} \; > /manifest-owns.txt
  936. # Alternative takes about 8sec, results are slightly different
  937. {
  938.     # Get all owned files
  939.     rpm -qa | while read PKG
  940.     do
  941.         rpm -ql $PKG | while read FIL
  942.         do
  943.             [[ -e "$FIL" ]] && echo $FIL
  944.         done | sed "s#\$#\t\t\t$PKG#"
  945.     done
  946.     # Get all files on fs and mark them as not owned
  947.     find / -xdev | sed "s#\$#\t\t\tNot owned by any package.#"
  948. # Just keep the first occurence of a file entry
  949. # Unowned files will just occur once,
  950. # owned once twice (just the firts entry is kept)
  951. } | sort -u -k1,1 | sed "s#\t\t\t#\n#" > /manifest-owns.txt


  952. # this one is kept in root for ovirt-rpmquery
  953. rpm -qa --qf '%{NAME}\t%{VERSION}\t%{RELEASE}\t%{BUILDTIME}\n' | \
  954.     sort > /rpm-qa.txt
  955. echo -n "."

  956. du -akx --exclude=/var/cache/yum / > /manifest-file.txt
  957. du -x --exclude=/var/cache/yum / > /manifest-dir.txt
  958. echo -n "."
  959. bzip2 /manifest-deps.txt /manifest-owns.txt /manifest-file.txt /manifest-dir.txt
  960. echo -n "."

  961. %end

  962. %post --nochroot
  963. # Move manifests to ISO
  964. mv $INSTALL_ROOT/manifest-* $LIVE_ROOT/isolinux
  965. echo "done"

  966. # only works on x86, x86_64
  967. if [ "$(uname -i)" = "i386" -o "$(uname -i)" = "x86_64" ]; then
  968.     if [ ! -d $LIVE_ROOT/LiveOS ]; then mkdir -p $LIVE_ROOT/LiveOS ; fi
  969.     cp /usr/bin/livecd-iso-to-disk $LIVE_ROOT/LiveOS
  970.     cp /usr/bin/livecd-iso-to-pxeboot $LIVE_ROOT/LiveOS
  971. fi
  972. %end

  973. %packages --excludedocs --nobase
  974. /usr/sbin/lokkit
  975. PyPAM
  976. acpid
  977. aic94xx-firmware
  978. anyterm
  979. audit
  980. bc
  981. bfa-firmware
  982. biosdevname
  983. checkpolicy
  984. collectd-virt
  985. cracklib-python
  986. cryptsetup-luks
  987. db4
  988. device-mapper-multipath
  989. dhclient
  990. dmraid
  991. dosfstools
  992. dracut-fips
  993. dracut-network
  994. e2fsprogs
  995. efibootmgr
  996. eject
  997. ethtool
  998. febootstrap-supermin-helper
  999. file
  1000. gdb
  1001. generic-logos
  1002. glusterfs-client
  1003. grub-efi
  1004. hdparm
  1005. hwdata
  1006. irqbalance
  1007. isomd5sum
  1008. kernel
  1009. kexec-tools
  1010. kpartx
  1011. kvm
  1012. less
  1013. libguestfs
  1014. libguestfs-tools-c
  1015. libmlx4
  1016. libvirt-cim
  1017. lsof
  1018. lsscsi
  1019. ltrace
  1020. make
  1021. net-snmp
  1022. newt-python
  1023. numactl
  1024. openssh-clients
  1025. openssh-server
  1026. ovirt-node
  1027. passwd
  1028. patch
  1029. pciutils
  1030. plymouth
  1031. plymouth-graphics-libs
  1032. plymouth-plugin-label
  1033. plymouth-plugin-two-step
  1034. plymouth-scripts
  1035. plymouth-system-theme
  1036. plymouth-theme-charge
  1037. policycoreutils
  1038. policycoreutils-python
  1039. psmisc
  1040. python
  1041. python-gudev
  1042. python-hivex
  1043. python-libguestfs
  1044. python-libs
  1045. python-setuptools
  1046. python-virtinst
  1047. qemu-kvm-tools
  1048. ql2100-firmware
  1049. ql2200-firmware
  1050. ql23xx-firmware
  1051. ql2400-firmware
  1052. ql2500-firmware
  1053. rootfiles
  1054. rpm-python
  1055. sblim-sfcb
  1056. selinux-policy-targeted
  1057. setools-console
  1058. sos
  1059. strace
  1060. sudo
  1061. sysfsutils
  1062. sysstat
  1063. system-config-keyboard-base
  1064. systemtap-runtime
  1065. tcpdump
  1066. usbutils
  1067. vconfig
  1068. vdsm-cli
  1069. vdsm-reg
  1070. vhostmd
  1071. vim-minimal
  1072. virt-manager-tui
  1073. yum
  1074. -audit-libs-python
  1075. -authconfig
  1076. -cpio
  1077. -fedora-logos
  1078. -fedora-release
  1079. -fedora-release-notes
  1080. -gzip
  1081. -libselinux-python
  1082. -libuser
  1083. -mtools
  1084. -newt
  1085. -parted
  1086. -prelink
  1087. -setserial
  1088. -tar
  1089. -usermode
  1090. -ustr
  1091. -which
  1092. -wireless-tools

  1093. %end

阅读(1734) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~