From d1f5aedd76df437a08f3283fa00bc8a9dab7fa2b Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Fri, 4 Jul 2014 14:46:20 +0200 Subject: "Fedora Support", step 1 -> Several changes: 1) Make sure /bin /sbin /lib and /lib64 are ALWAYS symlinks to /usr/XXX, no matter what the current distribution does. 2) Make sure nobody and nogroup exist. 3) Fix various modules making assumptions that are not true on every distro. 4) Add symlinks to kdm module since fedora is looking for kdmrc in yet another spot. 5) Add detection of fedora, support its package manager What still breaks: dnbd3 Other distros might not work now, they need adaption to changed logic in some modules. --- .../rootfs/rootfs-stage32/data/etc/terminfo/l/linux | Bin 0 -> 1790 bytes .../rootfs/rootfs-stage32/data/etc/terminfo/x/xterm | Bin 0 -> 3371 bytes .../rootfs-stage32/data/etc/terminfo/x/xterm-256color | Bin 0 -> 3437 bytes .../rootfs/rootfs-stage32/data/lib/terminfo/l/linux | Bin 1790 -> 0 bytes remote/rootfs/rootfs-stage32/module.build | 11 +++++------ remote/rootfs/rootfs-stage32/module.conf.fedora | 18 ++++++++++++++++++ 6 files changed, 23 insertions(+), 6 deletions(-) create mode 100644 remote/rootfs/rootfs-stage32/data/etc/terminfo/l/linux create mode 100644 remote/rootfs/rootfs-stage32/data/etc/terminfo/x/xterm create mode 100644 remote/rootfs/rootfs-stage32/data/etc/terminfo/x/xterm-256color delete mode 100644 remote/rootfs/rootfs-stage32/data/lib/terminfo/l/linux create mode 100644 remote/rootfs/rootfs-stage32/module.conf.fedora (limited to 'remote/rootfs/rootfs-stage32') diff --git a/remote/rootfs/rootfs-stage32/data/etc/terminfo/l/linux b/remote/rootfs/rootfs-stage32/data/etc/terminfo/l/linux new file mode 100644 index 00000000..48d722f8 Binary files /dev/null and b/remote/rootfs/rootfs-stage32/data/etc/terminfo/l/linux differ diff --git a/remote/rootfs/rootfs-stage32/data/etc/terminfo/x/xterm b/remote/rootfs/rootfs-stage32/data/etc/terminfo/x/xterm new file mode 100644 index 00000000..438b1581 Binary files /dev/null and b/remote/rootfs/rootfs-stage32/data/etc/terminfo/x/xterm differ diff --git a/remote/rootfs/rootfs-stage32/data/etc/terminfo/x/xterm-256color b/remote/rootfs/rootfs-stage32/data/etc/terminfo/x/xterm-256color new file mode 100644 index 00000000..b934be06 Binary files /dev/null and b/remote/rootfs/rootfs-stage32/data/etc/terminfo/x/xterm-256color differ diff --git a/remote/rootfs/rootfs-stage32/data/lib/terminfo/l/linux b/remote/rootfs/rootfs-stage32/data/lib/terminfo/l/linux deleted file mode 100644 index 48d722f8..00000000 Binary files a/remote/rootfs/rootfs-stage32/data/lib/terminfo/l/linux and /dev/null differ diff --git a/remote/rootfs/rootfs-stage32/module.build b/remote/rootfs/rootfs-stage32/module.build index 86a47fd4..90820f3f 100644 --- a/remote/rootfs/rootfs-stage32/module.build +++ b/remote/rootfs/rootfs-stage32/module.build @@ -40,7 +40,7 @@ build() { pinfo "Searching libraries from config file in system... (could take some time)" for LIB in ${REQUIRED_LIBRARIES} do - # lib + lib64: Ugly hack, will be replaced by a better solution + # lib + lib64: Ugly hack, will be replaced by a better solution for LIB_LOCATION in $(find /lib/ /lib64/ -name "${LIB}.so*") do get_link_chain "${LIB_LOCATION}" >> "${FILELIST}" @@ -89,11 +89,8 @@ post_copy() { # set terminal to linux as it defaults to xterm which messes up ssh sessions add_env TERM "linux" - # copy static files - cp -r "${MODULE_DIR}"/data/* "${TARGET_BUILD_DIR}" || perror "Copying static files from data/* failed." - # quick fix for /etc/fstab - echo "# no configuration" >> "${TARGET_BUILD_DIR}/etc/fstab" + [ ! -e "${TARGET_BUILD_DIR}/etc/fstab" ] && echo "# no configuration" > "${TARGET_BUILD_DIR}/etc/fstab" # link /etc/mtab, needed for systemd [ ! -e "${TARGET_BUILD_DIR}/etc/mtab" ] && ln -s "/proc/self/mounts" "${TARGET_BUILD_DIR}/etc/mtab" @@ -103,8 +100,10 @@ post_copy() { # quick fix for missing group in /etc/group add_group "lock" + add_group "nogroup" + add_user "nobody" - # setup root accoun + # setup root account USER=root add_user DEMO_ID="$(USER=demo PASSWORD=demo USERHOME=/home/demo USERSHELL=/bin/bash add_user)" diff --git a/remote/rootfs/rootfs-stage32/module.conf.fedora b/remote/rootfs/rootfs-stage32/module.conf.fedora new file mode 100644 index 00000000..d714a2c7 --- /dev/null +++ b/remote/rootfs/rootfs-stage32/module.conf.fedora @@ -0,0 +1,18 @@ +REQUIRED_INSTALLED_PACKAGES=" + ntpdate + nfs-utils + xfsprogs + squashfs-tools + jfsutils + curl + xvidtune + xterm +" +REQUIRED_CONTENT_PACKAGES=" +" +REQUIRED_DIRECTORIES=" + /usr/$LIB64/xtables +" +REQUIRED_FILES+=" + /usr/share/X11/app-defaults/Xvidtune +" -- cgit v1.2.3-55-g7522