[lorax] Added some packages and config files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Also fixed the modules symlink
---
 etc/config.noarch        |    9 +++++++--
 setup.py                 |    5 +++++
 share/etc/libuser.conf   |   10 ++++++++++
 share/etc/selinux/config |    2 ++
 src/pylorax/images.py    |   12 ++++++++++--
 5 files changed, 34 insertions(+), 4 deletions(-)
 create mode 100644 share/etc/libuser.conf
 create mode 100644 share/etc/selinux/config

diff --git a/etc/config.noarch b/etc/config.noarch
index ef781dc..f404d02 100644
--- a/etc/config.noarch
+++ b/etc/config.noarch
@@ -2,10 +2,15 @@
 
 packages:
     anaconda kernel *firmware* man hal wget samba-client gfs2-utils nfs-utils
-    ntfs-3g rsyslog ethtool openssh openssh-server strace
-    xorg-x11-server-Xorg xorg-x11-drivers
+    ntfs-3g rsyslog ethtool openssh openssh-server strace udev
+    xorg-x11-server-Xorg xorg-x11-server-utils xorg-x11-drivers
+    xorg-x11-xauth xorg-x11-font-utils xorg-x11-fonts-misc
+    dejavu-sans-fonts dejavu-sans-mono-fonts fontconfig freetype
+    fonts-ISO8859-2
+    gtk2 gtk2-engines gnome-themes metacity
     device-mapper device-mapper-libs
     device-mapper-multipath device-mapper-multipath-libs
+    selinux-policy-targeted
 
 modules:
     sunrpc lockd floppy cramfs loop edd pcspkr squashfs
diff --git a/setup.py b/setup.py
index f34b8af..499f795 100644
--- a/setup.py
+++ b/setup.py
@@ -2,6 +2,7 @@
 
 from distutils.core import setup
 from glob import glob
+import os
 
 
 data_files = [("/etc/lorax", glob("etc/config.*")),
@@ -9,6 +10,10 @@ data_files = [("/etc/lorax", glob("etc/config.*")),
               ("/etc/lorax/templates", glob("etc/templates/*"))
               ]
 
+for root, dnames, fnames in os.walk("share"):
+    for fname in fnames:
+        data_files.append((root.replace("share", "/usr/share/lorax", 1),
+                           [os.path.join(root, fname)]))
 
 setup(name="lorax",
       version="0.1",
diff --git a/share/etc/libuser.conf b/share/etc/libuser.conf
new file mode 100644
index 0000000..a7a0ef0
--- /dev/null
+++ b/share/etc/libuser.conf
@@ -0,0 +1,10 @@
+[defaults]
+skeleton = /mnt/sysimage/etc/skel
+mailspooldir = /mnt/sysimage/var/mail
+crypt_style = md5
+modules = files shadow
+create_modules = files shadow
+[files]
+directory = /mnt/sysimage/etc
+[shadow]
+directory = /mnt/sysimage/etc
diff --git a/share/etc/selinux/config b/share/etc/selinux/config
new file mode 100644
index 0000000..eac67ab
--- /dev/null
+++ b/share/etc/selinux/config
@@ -0,0 +1,2 @@
+SELINUX=permissive
+SELINUXTYPE=targeted
diff --git a/src/pylorax/images.py b/src/pylorax/images.py
index e80a822..a8fdf3a 100644
--- a/src/pylorax/images.py
+++ b/src/pylorax/images.py
@@ -130,7 +130,7 @@ export PS1 PATH
         libmoddir = os.path.dirname(libmod)
         if not os.path.isdir(libmoddir):
             os.makedirs(libmoddir)
-        os.symlink("/modules", libmod)
+        os.symlink("../modules", libmod)
 
         # copy all modules to the initrd tree
         os.makedirs(os.path.dirname(dst_moddir))
@@ -217,7 +217,7 @@ export PS1 PATH
         libfwdir = os.path.dirname(libfw)
         if not os.path.isdir(libfwdir):
             os.makedirs(libfwdir)
-        os.symlink("/firmware", libfw)
+        os.symlink("../firmware", libfw)
 
         # copy additional firmware
         fw = [("ipw2100", "ipw2100*"),
@@ -649,6 +649,10 @@ class Install(BaseImageClass):
                      "libdir": self.conf.libdir}
         self.parse_template(self.template_file, variables)
 
+        # copy custom files
+        self.pinfo("copying custom files")
+        self.copy_custom_files()
+
         installimg = os.path.join(self.workdir, "install.img")
         if os.path.isfile(installimg):
             os.unlink(installimg)
@@ -828,6 +832,10 @@ class Install(BaseImageClass):
                 os.unlink(link)
                 os.symlink(newtarget, link)
 
+    def copy_custom_files(self):
+        scopy_(src_root=self.conf.datadir, src_path="*",
+               dst_root=self.dsttree, dst_path="")
+
 
 class Boot(BaseImageClass):
 
-- 
1.6.6

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux