summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Horák <dan@danny.cz>2010-11-02 15:30:34 +0100
committerDan Horák <dan@danny.cz>2010-11-02 15:30:34 +0100
commit52543aa7048b729a194a4987943ea7ae45f138cb (patch)
treed663d02cdd0e71918a6bb4b4ae9917723b50f451
downloadserver-spin-master.zip
server-spin-master.tar.gz
server-spin-master.tar.xz
initial import of http://dmach.fedorapeople.org/server-spin/HEADmaster
-rw-r--r--Fedora-Server-comps.xml348
-rw-r--r--create-spin.py83
2 files changed, 431 insertions, 0 deletions
diff --git a/Fedora-Server-comps.xml b/Fedora-Server-comps.xml
new file mode 100644
index 0000000..96abb44
--- /dev/null
+++ b/Fedora-Server-comps.xml
@@ -0,0 +1,348 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE comps PUBLIC "-//Red Hat, Inc.//DTD Comps info//EN" "comps.dtd">
+<comps>
+ <group>
+ <id>core</id>
+ <default>true</default>
+ <uservisible>false</uservisible>
+ <display_order>1024</display_order>
+ <name>Core</name>
+ <description>Smallest possible installation.</description>
+ <packagelist>
+ <packagereq type="mandatory">audit</packagereq>
+ <packagereq type="mandatory">basesystem</packagereq>
+ <packagereq type="mandatory">bash</packagereq>
+ <packagereq type="mandatory">coreutils</packagereq>
+ <packagereq type="mandatory">dhclient</packagereq>
+ <packagereq type="mandatory">e2fsprogs</packagereq>
+ <packagereq type="mandatory">fedora-release</packagereq>
+ <packagereq type="mandatory">filesystem</packagereq>
+ <packagereq type="mandatory">glibc</packagereq>
+ <packagereq type="mandatory">initscripts</packagereq>
+ <packagereq type="mandatory">logrotate</packagereq>
+ <packagereq type="mandatory">pam</packagereq>
+ <packagereq type="mandatory">passwd</packagereq>
+ <packagereq type="mandatory">policycoreutils</packagereq>
+ <packagereq type="mandatory">procps</packagereq>
+ <packagereq type="mandatory">rootfiles</packagereq>
+ <packagereq type="mandatory">rpm</packagereq>
+ <packagereq type="mandatory">rsyslog</packagereq>
+ <packagereq type="mandatory">selinux-policy-targeted</packagereq>
+ <packagereq type="mandatory">setup</packagereq>
+ <packagereq type="mandatory">shadow-utils</packagereq>
+ <packagereq type="mandatory">udev</packagereq>
+ <packagereq type="mandatory">util-linux-ng</packagereq>
+ <packagereq type="default">grub</packagereq>
+ <packagereq type="default">ppc64-utils</packagereq>
+ <packagereq type="default">s390utils</packagereq>
+ <packagereq type="default">sendmail</packagereq>
+ <packagereq type="default">silo</packagereq>
+ <packagereq type="default">yaboot</packagereq>
+ </packagelist>
+ </group>
+
+ <group>
+ <id>base</id>
+ <default>true</default>
+ <uservisible>true</uservisible>
+ <display_order>1024</display_order>
+ <name>Base</name>
+ <description>Base set of packages. Useful for creating small router/firewall boxes, for example.</description>
+ <packagelist>
+ <packagereq type="default">acl</packagereq>
+ <packagereq type="default">acpid</packagereq>
+ <packagereq type="default">at</packagereq>
+ <packagereq type="default">attr</packagereq>
+ <packagereq type="default">bzip2</packagereq>
+ <packagereq type="default">cpio</packagereq>
+ <packagereq type="default">cronie</packagereq>
+ <packagereq type="default">cronie-noanacron</packagereq>
+ <packagereq type="default">dhclient</packagereq>
+ <packagereq type="default">file</packagereq>
+ <packagereq type="default">findutils</packagereq>
+ <packagereq type="default">grep</packagereq>
+ <packagereq type="default">gzip</packagereq>
+ <packagereq type="default">iproute</packagereq>
+ <packagereq type="default">iptables</packagereq>
+ <packagereq type="default">iptables-ipv6</packagereq>
+ <packagereq type="default">iputils</packagereq>
+ <packagereq type="default">irqbalance</packagereq>
+ <packagereq type="default">less</packagereq>
+ <packagereq type="default">lsof</packagereq>
+ <packagereq type="default">man</packagereq>
+ <packagereq type="default">openssh-server</packagereq>
+ <packagereq type="default">openssh-clients</packagereq>
+ <packagereq type="default">pciutils</packagereq>
+ <packagereq type="default">postfix</packagereq>
+ <packagereq type="default">rsync</packagereq>
+ <packagereq type="default">sed</packagereq>
+ <packagereq type="default">smartmontools</packagereq>
+ <packagereq type="default">sudo</packagereq>
+ <packagereq type="default">tar</packagereq>
+ <packagereq type="default">time</packagereq>
+ <packagereq type="default">tmpwatch</packagereq>
+ <packagereq type="default">usbutils</packagereq>
+ <packagereq type="default">vim-minimal</packagereq>
+ <packagereq type="default">which</packagereq>
+ <packagereq type="default">xz</packagereq>
+ <packagereq type="default">yum</packagereq>
+ <packagereq type="default">yum-presto</packagereq>
+ <packagereq type="default">yum-utils</packagereq>
+ <packagereq type="default">yum-plugin-downloadonly</packagereq>
+ <packagereq type="default">xz</packagereq>
+ <packagereq type="optional">authconfig</packagereq>
+ <packagereq type="optional">bc</packagereq>
+ <packagereq type="optional">dos2unix</packagereq>
+ <packagereq type="optional">gpm</packagereq>
+ <packagereq type="optional">htop</packagereq>
+ <packagereq type="optional">logwatch</packagereq>
+ <packagereq type="optional">quota</packagereq>
+ <packagereq type="optional">rssh</packagereq>
+ <packagereq type="optional">system-config-firewall-tui</packagereq>
+ <packagereq type="optional">system-config-network-tui</packagereq>
+ <packagereq type="optional">tree</packagereq>
+ <packagereq type="optional">unzip</packagereq>
+ <packagereq type="optional">zip</packagereq>
+ </packagelist>
+ </group>
+
+ <group>
+ <id>console-internet</id>
+ <default>true</default>
+ <uservisible>true</uservisible>
+ <display_order>1024</display_order>
+ <name>Console Internet Tools</name>
+ <description></description>
+ <packagelist>
+ <packagereq type="default">curl</packagereq>
+ <packagereq type="default">wget</packagereq>
+ <packagereq type="optional">elinks</packagereq>
+ <packagereq type="optional">fetchmail</packagereq>
+ <packagereq type="optional">ftp</packagereq>
+ <packagereq type="optional">lftp</packagereq>
+ <packagereq type="optional">mutt</packagereq>
+ </packagelist>
+ </group>
+
+ <group>
+ <id>text-editors</id>
+ <default>false</default>
+ <uservisible>true</uservisible>
+ <display_order>1024</display_order>
+ <name>Text Editors</name>
+ <description></description>
+ <packagelist>
+ <packagereq type="default">nano</packagereq>
+ <packagereq type="default">vim-enhanced</packagereq>
+ <packagereq type="optional">ed</packagereq>
+ </packagelist>
+ </group>
+
+ <group>
+ <id>network-file-system-client</id>
+ <default>false</default>
+ <uservisible>true</uservisible>
+ <display_order>1024</display_order>
+ <name>Network File System Client</name>
+ <description></description>
+ <packagelist>
+ <packagereq type="default">nfs-utils</packagereq>
+ <packagereq type="optional">autofs</packagereq>
+ <packagereq type="optional">cifs-utils</packagereq>
+ <packagereq type="optional">nfs4-acl-tools</packagereq>
+ <packagereq type="optional">samba-client</packagereq>
+ </packagelist>
+ </group>
+
+ <group>
+ <id>network-server</id>
+ <default>false</default>
+ <uservisible>true</uservisible>
+ <display_order>1024</display_order>
+ <name>Network Server</name>
+ <description></description>
+ <packagelist>
+ <packagereq type="optional">bind</packagereq>
+ <packagereq type="optional">bind-chroot</packagereq>
+ <packagereq type="optional">bird</packagereq>
+ <packagereq type="optional">bird6</packagereq>
+ <packagereq type="optional">dhcp</packagereq>
+ <packagereq type="optional">dnsmasq</packagereq>
+ <packagereq type="optional">quagga</packagereq>
+ <packagereq type="optional">syslinux</packagereq>
+ <packagereq type="optional">tftp-server</packagereq>
+ <packagereq type="optional">xinetd</packagereq>
+ </packagelist>
+ </group>
+
+ <group>
+ <id>network-tools</id>
+ <default>false</default>
+ <uservisible>true</uservisible>
+ <display_order>1024</display_order>
+ <name>Networking Tools</name>
+ <description></description>
+ <packagelist>
+ <packagereq type="default">nc</packagereq>
+ <packagereq type="default">nc6</packagereq>
+ <packagereq type="default">nmap</packagereq>
+ <packagereq type="default">tcpdump</packagereq>
+ <packagereq type="default">telnet</packagereq>
+ <packagereq type="default">traceroute</packagereq>
+ <packagereq type="optional">arptables_jf</packagereq>
+ <packagereq type="optional">arpwatch</packagereq>
+ <packagereq type="optional">bind-utils</packagereq>
+ <packagereq type="optional">bridge-utils</packagereq>
+ <packagereq type="optional">ebtables</packagereq>
+ <packagereq type="optional">ethtool</packagereq>
+ <packagereq type="optional">ftp</packagereq>
+ <packagereq type="optional">iptraf</packagereq>
+ <packagereq type="optional">mtr</packagereq>
+ <packagereq type="optional">tftp</packagereq>
+ <packagereq type="optional">wireshark</packagereq>
+ <packagereq type="optional">wol</packagereq>
+ </packagelist>
+ </group>
+
+ <group>
+ <id>storage</id>
+ <default>false</default>
+ <uservisible>true</uservisible>
+ <display_order>1024</display_order>
+ <name>Storage and Filesystem Tools</name>
+ <description></description>
+ <packagelist>
+ <packagereq type="default">device-mapper</packagereq>
+ <packagereq type="default">lvm2</packagereq>
+ <packagereq type="optional">cryptsetup-luks</packagereq>
+ <packagereq type="optional">device-mapper-multipath</packagereq>
+ <packagereq type="optional">dmraid</packagereq>
+ <packagereq type="optional">gpart</packagereq>
+ <packagereq type="optional">hdparm</packagereq>
+ <packagereq type="optional">kpartx</packagereq>
+ <packagereq type="optional">lvm2-cluster</packagereq>
+ <packagereq type="optional">mdadm</packagereq>
+ <packagereq type="optional">parted</packagereq>
+ <packagereq type="optional">xfsdump</packagereq>
+ <packagereq type="optional">xfsprogs</packagereq>
+ </packagelist>
+ </group>
+
+ <group>
+ <id>web-server</id>
+ <default>false</default>
+ <uservisible>true</uservisible>
+ <display_order>1024</display_order>
+ <name>Web Server</name>
+ <description></description>
+ <packagelist>
+ <packagereq type="default">httpd</packagereq>
+ <packagereq type="default">mod_ssl</packagereq>
+ <packagereq type="optional">libmemcached</packagereq>
+ <packagereq type="optional">httpd-manual</packagereq>
+ <packagereq type="optional">memcached</packagereq>
+ <packagereq type="optional">mod_auth_kerb</packagereq>
+ <packagereq type="optional">mod_perl</packagereq>
+ <packagereq type="optional">mod_python</packagereq>
+ <packagereq type="optional">mod_wsgi</packagereq>
+ </packagelist>
+ </group>
+
+ <group>
+ <id>scm</id>
+ <default>false</default>
+ <uservisible>true</uservisible>
+ <display_order>1024</display_order>
+ <name>Souce Control Management</name>
+ <description>.</description>
+ <packagelist>
+ <packagereq type="optional">cvs</packagereq>
+ <packagereq type="optional">git</packagereq>
+ <packagereq type="optional">subversion</packagereq>
+ <packagereq type="optional">mercurial</packagereq>
+ </packagelist>
+ </group>
+
+ <group>
+ <id>file-server</id>
+ <default>false</default>
+ <uservisible>true</uservisible>
+ <display_order>1024</display_order>
+ <name>File Server</name>
+ <description></description>
+ <packagelist>
+ <packagereq type="optional">proftpd</packagereq>
+ <packagereq type="optional">pure-ftpd</packagereq>
+ <packagereq type="optional">samba</packagereq>
+ <packagereq type="optional">vsftpd</packagereq>
+ <packagereq type="optional">xferstats</packagereq>
+ </packagelist>
+ </group>
+
+ <group>
+ <id>mysql</id>
+ <default>false</default>
+ <uservisible>true</uservisible>
+ <display_order>1024</display_order>
+ <name>MySQL</name>
+ <description>MySQL database.</description>
+ <packagelist>
+ <packagereq type="default">mysql</packagereq>
+ <packagereq type="default">mysql-server</packagereq>
+ </packagelist>
+ </group>
+
+ <group>
+ <id>postgresql</id>
+ <default>false</default>
+ <uservisible>true</uservisible>
+ <display_order>1024</display_order>
+ <name>PostgreSQL</name>
+ <description>PostgreSQL database.</description>
+ <packagelist>
+ <packagereq type="default">postgresql</packagereq>
+ <packagereq type="default">postgresql-server</packagereq>
+ <packagereq type="optional">perl-DBD-Pg</packagereq>
+ <packagereq type="optional">postgresql-odbc</packagereq>
+ <packagereq type="optional">postgresql-python</packagereq>
+ <packagereq type="optional">postgresql-plperl</packagereq>
+ <packagereq type="optional">postgresql-plpython</packagereq>
+ <packagereq type="optional">python-psycopg2</packagereq>
+ </packagelist>
+ </group>
+
+ <category>
+ <id>base-system</id>
+ <display_order>99</display_order>
+ <name>Base System</name>
+ <description>Various core pieces of the system.</description>
+ <grouplist>
+ <groupid>base</groupid>
+ <groupid>console-internet</groupid>
+ </grouplist>
+ </category>
+
+ <category>
+ <id>servers</id>
+ <display_order>90</display_order>
+ <name>Servers</name>
+ <description>Software used for running network servers</description>
+ <grouplist>
+ <groupid>network-server</groupid>
+ <groupid>dns-server</groupid>
+ <groupid>server-cfg</groupid>
+ <groupid>news-server</groupid>
+ <groupid>web-server</groupid>
+ <groupid>smb-server</groupid>
+ <groupid>sql-server</groupid>
+ <groupid>directory-server</groupid>
+ <groupid>ftp-server</groupid>
+ <groupid>printing</groupid>
+ <groupid>mysql</groupid>
+ <groupid>mail-server</groupid>
+ <groupid>network-server</groupid>
+ <groupid>legacy-network-server</groupid>
+ </grouplist>
+ </category>
+
+</comps>
diff --git a/create-spin.py b/create-spin.py
new file mode 100644
index 0000000..8858769
--- /dev/null
+++ b/create-spin.py
@@ -0,0 +1,83 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+
+import os
+import yum.comps
+import kobo.shortcuts
+
+
+RELEASEVER = 14
+
+GROUPS = [
+ "core",
+ "base",
+ "console-internet",
+ "file-server",
+ "mysql",
+ "network-file-system-client",
+ "network-tools",
+ "network-server",
+ "postgresql",
+ "scm",
+ "storage",
+ "text-editors",
+ "web-server",
+]
+
+PACKAGES = [
+ "kernel",
+ "kernel-PAE",
+]
+
+WORK_DIR = "/var/tmp/server-spin"
+REPO_DIR = os.path.join(WORK_DIR, "repo")
+COMPOSE_DIR = os.path.join(WORK_DIR, "compose")
+SCRIPT_DIR = os.path.abspath(os.path.dirname(__file__))
+COMPS_FILE = os.path.join(SCRIPT_DIR, "Fedora-Server-comps.xml")
+KS_FILE = os.path.join(WORK_DIR, "fedora-server.ks")
+
+
+def read_comps_packages(comps_file, group=None):
+ comps_obj = yum.comps.Comps()
+ comps_obj.add(comps_file)
+ result = set()
+ for i in comps_obj.get_groups():
+ if group is None or i.groupid == group:
+ result.update(i.packages)
+ return sorted(result)
+
+
+def create_ks(groups, packages):
+ lines = []
+ lines.append("repo --name=fedora --mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-%d&arch=$basearch --ignoregroups=true" % RELEASEVER)
+ lines.append("repo --name=fedora-updates --mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=updates-released-f%d&arch=$basearch --ignoregroups=true" % RELEASEVER)
+ lines.append("repo --name=comps --baseurl=file://%s" % REPO_DIR)
+ lines.append("")
+ lines.append("%packages")
+ for i in sorted(groups):
+ lines.append("@%s" % i)
+ lines.extend(read_comps_packages(COMPS_FILE, i))
+ lines.append("")
+
+ lines.extend(sorted(packages))
+ lines.append("%end")
+ return "\n".join(lines)
+
+
+# remove old data first
+kobo.shortcuts.run("rm -rfv %s" % WORK_DIR, stdout=True, can_fail=True)
+
+os.makedirs(WORK_DIR)
+os.makedirs(REPO_DIR)
+os.makedirs(COMPOSE_DIR)
+
+# write a new kickstart
+kickstart = create_ks(groups=GROUPS, packages=PACKAGES)
+kobo.shortcuts.save_to_file(KS_FILE, kickstart)
+
+# create an empty repo to provide custom comps
+kobo.shortcuts.run("createrepo . -g %s" % COMPS_FILE, workdir=REPO_DIR, stdout=True)
+
+# run pungi
+kobo.shortcuts.run("pungi --config=%s --name=FedoraServer --nosource --nodebuginfo --nosplitmedia --destdir=%s" % (KS_FILE, COMPOSE_DIR), stdout=True)