diff --git a/etc/config.noarch b/etc/config.noarch index ef781dcf..f404d024 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 f34b8afe..499f7955 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 00000000..a7a0ef00 --- /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 00000000..eac67ab1 --- /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 e80a8221..a8fdf3a4 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):