diff options
Diffstat (limited to 'remote')
61 files changed, 369 insertions, 74 deletions
diff --git a/remote/includes/distribution.inc b/remote/includes/distribution.inc index 7a7be738..137da7ef 100644 --- a/remote/includes/distribution.inc +++ b/remote/includes/distribution.inc @@ -18,7 +18,7 @@ detect_distribution () { PACKET_MANAGER="zypper" PACKET_HANDLER="rpm" ;; - scientific) + scientific|fedora) PACKET_MANAGER="yum" PACKET_HANDLER="rpm" ;; diff --git a/remote/includes/kernel.inc b/remote/includes/kernel.inc index dc7f7f12..3acb1810 100644 --- a/remote/includes/kernel.inc +++ b/remote/includes/kernel.inc @@ -28,9 +28,12 @@ get_kernel_version () { # set empty SYS_UTS_RELEASE and SYS_KERNEL SYS_UTS_RELEASE="(unknown)" SYS_KERNEL="$(echo "$SYS_UTS_RELEASE" | grep -o -E '^[0-9\.]+')" + # System kernel version + SYSTEM_KERNEL_LONG=$(uname -r) + SYSTEM_KERNEL_SHORT=$(grep -o -E '^[0-9\.]+' <<<$SYSTEM_KERNEL_LONG) } -check_kernel_base_dir() { +check_kernel_base_dir () { # check if KERNEL_BASE_DIR was set, if not we don't know # whether kernel-openslx or kernel-system has been built @@ -46,7 +49,7 @@ check_kernel_base_dir() { } -copy_kernel_modules() { +copy_kernel_modules () { pinfo "Copying kernel modules for kernel ${KERNEL_CURRENT_VERSION}..." [ -z "${REQUIRED_KERNEL_MODULES}" ] && perror "REQUIRED_KERNEL_MODULES is empty. Check your config file." [ -z "${KERNEL_HEADERS_PATH}" ] && perror "KERNEL_HEADERS_PATH is empty. Kernel headers appears to be missing." @@ -128,7 +131,7 @@ copy_kernel_modules() { cd "${OLD_DIR}" || perror "Could not cd back to ${OLD_DIR}." } -copy_firmware() { +copy_firmware () { pinfo "Copying firmware for kernel ${KERNEL_CURRENT_VERSION}..." [ -z "${REQUIRED_FIRMWARE}" ] && perror "REQUIRED_FIRMWARE is empty. Check your config file." @@ -205,7 +208,7 @@ copy_firmware() { cd "${OLD_DIR}" || perror "Could not cd back to ${OLD_DIR}." } -copy_kernel() { +copy_kernel () { check_kernel_base_dir local TOOL_STR="$TOOL_STR copy_kernel:" diff --git a/remote/includes/packagemanager.inc b/remote/includes/packagemanager.inc index 66013807..63acf270 100644 --- a/remote/includes/packagemanager.inc +++ b/remote/includes/packagemanager.inc @@ -98,34 +98,36 @@ install_packages() { [ $# -eq 0 ] && perror "Sanity check failed: no argument given to install_package" local PACKAGE_LIST="$@" local INSTALLED_PACKAGES="" + local LRET="" for PKG in ${PACKAGE_LIST}; do # check if installed: # this is done mainly for performance reasons, even though - # reinstalling all packages is a valid possibility too... + # reinstalling all packages is a valid possibility too... if [ "x$PACKET_HANDLER" == "xdpkg" ]; then dpkg -l ${PKG} > /dev/null 2>&1 + LRET=$? elif [ "x$PACKET_HANDLER" == "xrpm" ]; then - rpm -ql ${PKG} > /dev/null 2>&1 + rpm -ql "${PKG}" > /dev/null 2>&1 + LRET=$? else perror "No packet manager / handler determined, this should not happen!" fi - local LRET=$? if [ "x$LRET" == "x0" ]; then # check if it is completly installed, not just leftover configuration files if [ "x$PACKET_HANDLER" == "xdpkg" ]; then - local INSTALL_STATUS=$(dpkg -l $PKG | grep $PKG | cut -c1-2) + local INSTALL_STATUS=$(dpkg -l "${PKG}" | grep "${PKG}" | cut -c1-2) if [[ $INSTALL_STATUS != "ii" ]]; then pinfo "$PKG is either missing or a meta-package! Installing it to be sure..." - install_package $PKG + install_package "${PKG}" else # package installed - pdebug "$PKG installed!" + pdebug "${PKG} installed!" fi elif [ "x$PACKET_HANDLER" == "xrpm" ]; then # TODO: blindly install again for now - install_package $PKG + rpm -q "${PKG}" >/dev/null 2>&1 || install_package "${PKG}" fi else # package not installed diff --git a/remote/includes/system.inc b/remote/includes/system.inc index bcdaed23..17a80761 100644 --- a/remote/includes/system.inc +++ b/remote/includes/system.inc @@ -21,6 +21,7 @@ if [ "$(uname -m)x" = "x86_64x" ]; then case $SYS_DISTRIBUTION in ubuntu | debian) LIB64="lib" ;; opensuse) LIB64="lib64" ;; + fedora) LIB64="lib64" ;; *) perror "Cannot set LIB64, SYS_DISTRIBUTION: $SYS_DISTRIBUTION unknown!" ;; esac AMD64_I386=amd64 diff --git a/remote/includes/useradd.inc b/remote/includes/useradd.inc index 352da606..29a9c39a 100644 --- a/remote/includes/useradd.inc +++ b/remote/includes/useradd.inc @@ -16,7 +16,7 @@ . "${ROOT_DIR}/helper/string.inc" -NAME_REGEX='^[a-z][-a-z0-9]*$' +declare -r NAME_REGEX='^[a-z][-a-z0-9]*$' # Generate a UID for a given USERNAME. Return existing UID if possible, generate new one otherwise generate_uid() @@ -150,7 +150,7 @@ add_user() { pinfo "Created user $USER" elif [ "$PASSWORD" != "*" ]; then # update user's password - sed -i -r "s#^${USER}:[^:]*:(.*)\$#${USER}:${PASSWORD}:\1#g" "${_SHADOW}" + sed -i -r "s#^${USER}:[^:]*:(.*)\$"'#'"${USER}:${PASSWORD}:\1#g" "${_SHADOW}" pinfo "Updated password of $USER" fi [ -z "${_GID}" ] && pinfo "Created group $GROUP" && echo "${GROUP}:x:${GROUPID}:" >> "${_GROUP}" diff --git a/remote/modules/alsa/module.conf.fedora b/remote/modules/alsa/module.conf.fedora new file mode 100644 index 00000000..4ea213db --- /dev/null +++ b/remote/modules/alsa/module.conf.fedora @@ -0,0 +1,13 @@ +REQUIRED_INSTALLED_PACKAGES=" + alsa-utils + alsa-lib +" +REQUIRED_CONTENT_PACKAGES=" + alsa-utils + alsa-lib +" +REQUIRED_DIRECTORIES=" + /usr/share/alsa +" + +# libasound2 diff --git a/remote/modules/beamergui/module.build b/remote/modules/beamergui/module.build index 26059615..2ff35bfc 100644 --- a/remote/modules/beamergui/module.build +++ b/remote/modules/beamergui/module.build @@ -13,7 +13,7 @@ build() { mkdir -p "$MODULE_BUILD_DIR/opt/openslx/bin" cd "${MODULE_BUILD_DIR}/opt/openslx/bin" || perror "Could not cd!" pinfo "Running qmake" - qmake "$SRCDIR/src/beamergui.pro" -r -spec linux-g++ || perror "'qmake' failed (e.g. not installed)." + qmake-qt4 "$SRCDIR/src/beamergui.pro" -r -spec linux-g++ || perror "'qmake-qt4' failed (e.g. not installed)." pinfo "Running make" make || perror "'make' failed." } diff --git a/remote/modules/beamergui/module.conf.fedora b/remote/modules/beamergui/module.conf.fedora new file mode 100644 index 00000000..8b46942d --- /dev/null +++ b/remote/modules/beamergui/module.conf.fedora @@ -0,0 +1,8 @@ +REQUIRED_INSTALLED_PACKAGES=" +qt-devel +libXrandr-devel +" +REQUIRED_CONTENT_PACKAGES=" +qt-devel +libXrandr +" diff --git a/remote/modules/busybox/module.build b/remote/modules/busybox/module.build index 727a334c..135ba8a1 100644 --- a/remote/modules/busybox/module.build +++ b/remote/modules/busybox/module.build @@ -1,8 +1,7 @@ fetch_source() { - git clone "${REQUIRED_GIT}" src || perror "Could not clone busybox git" + git clone --depth 1 "${REQUIRED_GIT}" --branch "$REQUIRED_BRANCH" src || perror "Could not clone busybox git" cd src || perror "Could not cd to src" - git checkout "$REQUIRED_BRANCH" || perror "Could not checkout requested branch" # Patch image centering if not patched yet if ! grep -q "bcenter_image" "miscutils/fbsplash.c"; then git apply "../fbsplash-center.patch" || perror "Could not apply busybox patch for fbsplash image centering" diff --git a/remote/modules/busybox/module.conf b/remote/modules/busybox/module.conf index 6acfa16c..82d1731e 100644 --- a/remote/modules/busybox/module.conf +++ b/remote/modules/busybox/module.conf @@ -2,6 +2,6 @@ REQUIRED_GIT="git://git.busybox.net/busybox" REQUIRED_BRANCH="1_22_1" REQUIRED_BINARIES="busybox" REQUIRED_DIRECTORIES=" - /bin - /sbin + /usr/bin + /usr/sbin " diff --git a/remote/modules/cups/module.conf.fedora b/remote/modules/cups/module.conf.fedora new file mode 100644 index 00000000..6b028b11 --- /dev/null +++ b/remote/modules/cups/module.conf.fedora @@ -0,0 +1,12 @@ +REQUIRED_INSTALLED_PACKAGES=" + cups + cups-libs + foomatic-filters + ghostscript +" +REQUIRED_CONTENT_PACKAGES=" + cups + cups-libs + foomatic-filters + ghostscript +" diff --git a/remote/modules/dbus/module.conf.fedora b/remote/modules/dbus/module.conf.fedora new file mode 100644 index 00000000..f38f590f --- /dev/null +++ b/remote/modules/dbus/module.conf.fedora @@ -0,0 +1,4 @@ +REQUIRED_CONTENT_PACKAGES=" + dbus +" + diff --git a/remote/modules/idleaction/module.conf.fedora b/remote/modules/idleaction/module.conf.fedora new file mode 100644 index 00000000..d368cbd8 --- /dev/null +++ b/remote/modules/idleaction/module.conf.fedora @@ -0,0 +1,6 @@ +REQUIRED_INSTALLED_PACKAGES=" + libX11-devel + libXScrnSaver-devel + xorg-x11-proto-devel +" + diff --git a/remote/modules/kdm/data/etc/kde b/remote/modules/kdm/data/etc/kde new file mode 120000 index 00000000..5a94165b --- /dev/null +++ b/remote/modules/kdm/data/etc/kde @@ -0,0 +1 @@ +kde4
\ No newline at end of file diff --git a/remote/modules/kdm/data/usr/share/config/kdm b/remote/modules/kdm/data/usr/share/config/kdm new file mode 120000 index 00000000..8f0c47bd --- /dev/null +++ b/remote/modules/kdm/data/usr/share/config/kdm @@ -0,0 +1 @@ +/etc/kde4/kdm
\ No newline at end of file diff --git a/remote/modules/kdm/module.conf.fedora b/remote/modules/kdm/module.conf.fedora new file mode 100644 index 00000000..59bfacb7 --- /dev/null +++ b/remote/modules/kdm/module.conf.fedora @@ -0,0 +1,26 @@ +REQUIRED_INSTALLED_PACKAGES=" + kdm + kgreeter-plugins + oxygen-icon-theme +" +REQUIRED_CONTENT_PACKAGES=" + kdm + kgreeter-plugins +" +REQUIRED_BINARIES="" +REQUIRED_DIRECTORIES=" + /usr/bin + /usr/share/kde4/services + /usr/$LIB64/kde4 + /usr/libexec/kde4 +" +REQUIRED_FILES="" +REQUIRED_LIBRARIES="" +#non-standard vars +REQUIRED_SYSTEM_FILES=" + /usr/share/icons/oxygen/16x16/actions/system-reboot.png + /usr/share/icons/oxygen/16x16/actions/system-shutdown.png + /usr/share/icons/oxygen/16x16/actions/dialog-cancel.png + /usr/share/icons/oxygen/index.theme +" + diff --git a/remote/modules/kdm/module.conf.ubuntu b/remote/modules/kdm/module.conf.ubuntu index b91d00e0..660b3a1e 100644 --- a/remote/modules/kdm/module.conf.ubuntu +++ b/remote/modules/kdm/module.conf.ubuntu @@ -20,7 +20,7 @@ REQUIRED_DIRECTORIES+=" /etc/kde4/kdm " # non-standard vars -REQUIRED_SYSTEM_FILES+=" +REQUIRED_SYSTEM_FILES+=" /usr/share/kde4/apps/kdm/pics/shutdown.png /usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf /usr/share/fonts/truetype/ubuntu-font-family/Ubuntu-R.ttf diff --git a/remote/modules/kernel-system/module.build b/remote/modules/kernel-system/module.build index 91dc4d35..d698db22 100644 --- a/remote/modules/kernel-system/module.build +++ b/remote/modules/kernel-system/module.build @@ -10,8 +10,14 @@ get_kernel_version(){ declare -rg KERNEL_NEW_VERSION="$KERNEL_CURRENT_VERSION" 2>/dev/null # check linux headers directory - if [ -d "/usr/src/linux-headers-$(uname -r)" ]; then - declare -rg KERNEL_HEADERS_PATH="/usr/src/linux-headers-$(uname -r)" 2>/dev/null + if [ -d "/lib/modules/$KERNEL_CURRENT_VERSION/build" ]; then + declare -rg KERNEL_HEADERS_PATH="/lib/modules/$KERNEL_CURRENT_VERSION/build" 2>/dev/null + elif [ -d "/lib/modules/$KERNEL_CURRENT_VERSION/source" ]; then + declare -rg KERNEL_HEADERS_PATH="/lib/modules/$KERNEL_CURRENT_VERSION/source" 2>/dev/null + elif [ -d "/usr/src/linux-headers-$KERNEL_CURRENT_VERSION" ]; then + declare -rg KERNEL_HEADERS_PATH="/usr/src/linux-headers-$KERNEL_CURRENT_VERSION" 2>/dev/null + elif [ -d "/usr/src/kernels/$KERNEL_CURRENT_VERSION" ]; then + declare -rg KERNEL_HEADERS_PATH="/usr/src/kernels/$KERNEL_CURRENT_VERSION" 2>/dev/null else # fetch source did not install the headers correctly. perror "kernel headers for $KERNEL_CURRENT_VERSION not found! Re-build the kernel-system module" @@ -19,7 +25,7 @@ get_kernel_version(){ # check kernel modules/firmware directory if [ -d "/lib/modules/${KERNEL_CURRENT_VERSION}" -a \ - -d "/lib/firmware/${KERNEL_CURRENT_VERSION}" ]; then + -d "/lib/firmware" ]; then # The expected paths exists, set KERNEL_BASE_DIR to / declare -rg KERNEL_BASE_DIR="/" 2>/dev/null else @@ -52,11 +58,13 @@ build() { # simply copy the kernel from the running system # to the build directory as it is. local KERNEL_SYSTEM_PATH="" + local BOOT_IMAGE="" # 1st "parse" /proc/cmdline for the kernel name for i in $(cat /proc/cmdline); do - [[ "$i" =~ ^BOOT_IMAGE=.* ]] && local BOOT_IMAGE="$(basename $(echo $i|cut -c 12-))" + [[ "$i" == BOOT_IMAGE=* ]] && BOOT_IMAGE="$(basename "${i#BOOT_IMAGE=}")" done + [ -z "${BOOT_IMAGE}" ] && local BOOT_IMAGE="$(uname -r)" # exit if KERNEL_SYSTEM_FILENAME is empty, should not happen [ -z "${BOOT_IMAGE}" ] && perror "Could not determine the full path to the running kernel..." @@ -64,14 +72,14 @@ build() { # now find it in KERNEL_SYSTEM_SEARCH_PATH # NOTE: this variable should be expanded in the future if new locations are to be searched local KERNEL_SYSTEM_SEARCH_PATH="/boot" - local KERNEL_SYSTEM_SEARCH_RESULTS="$(find "${KERNEL_SYSTEM_SEARCH_PATH}" -type f -iname "*${BOOT_IMAGE}*")" + local KERNEL_SYSTEM_SEARCH_RESULTS="$(find "${KERNEL_SYSTEM_SEARCH_PATH}" -type f -name "${BOOT_IMAGE}")" if [ "$(echo $KERNEL_SYSTEM_SEARCH_RESULTS|wc -w)" -eq 1 ]; then # we found the running kernel path KERNEL_SYSTEM_PATH="${KERNEL_SYSTEM_SEARCH_RESULTS}" else # we found more than one, shouldn't happen... - perror "Found more than one kernel named '${BOOT_IMAGE}' inside '${KERNEL_SYSTEM_SEARCH_PATH}'." + perror "Found no or more than one kernel named '${BOOT_IMAGE}' in '${KERNEL_SYSTEM_SEARCH_PATH}'." fi # at this point, we should definitly have KERNEL_SYSTEM_PATH, check just in case :) diff --git a/remote/modules/kernel-system/module.conf.fedora b/remote/modules/kernel-system/module.conf.fedora new file mode 100644 index 00000000..cf683784 --- /dev/null +++ b/remote/modules/kernel-system/module.conf.fedora @@ -0,0 +1,6 @@ +REQUIRED_INSTALLED_PACKAGES=" + kernel-headers +" +REQUIRED_CONTENT_PACKAGES=" + kernel-headers +" diff --git a/remote/modules/kernel/aufs3-standalone b/remote/modules/kernel/aufs3-standalone new file mode 160000 +Subproject 0b4a532fc19edd562b3417914dd1346f96ea482 diff --git a/remote/modules/kernel/kernel-system b/remote/modules/kernel/kernel-system new file mode 120000 index 00000000..041dc99f --- /dev/null +++ b/remote/modules/kernel/kernel-system @@ -0,0 +1 @@ +../../modules/kernel-system
\ No newline at end of file diff --git a/remote/modules/kernel/module.build b/remote/modules/kernel/module.build index 979ce742..9270024d 100644 --- a/remote/modules/kernel/module.build +++ b/remote/modules/kernel/module.build @@ -1,6 +1,6 @@ get_kernel_version() { # determine kernel version that will be running in the generated system - if [ -e "$MODULES_DIR/kernel/ksrc/include/generated/utsrelease.h" ]; then + if [ -e "$MODULES_DIR/kernel/ksrc/include/generated/utsrelease.h" ]; then # declare kernel version stuff declare -rg SYS_UTS_RELEASE=$(grep 'UTS_RELEASE' "$MODULES_DIR/kernel/ksrc/include/generated/utsrelease.h" | awk -F '"' '{print $2}') declare -rg SYS_KERNEL=$(echo "$SYS_UTS_RELEASE" | grep -o -E '^[0-9\.]+') @@ -23,7 +23,7 @@ get_kernel_version() { fetch_source() { pdebug "getting kernel sources via git ...." [ -d ./ksrc ] && rm -rf ./ksrc # slightly brutal ... - git clone --depth 1 ${REQUIRED_GIT} ksrc || perror "Could not clone kernel git." + git clone --depth 1 "${REQUIRED_GIT}" -b "${REQUIRED_GIT_BRANCH}" ksrc || perror "Could not clone kernel git." # check for aufs local RSL=$(find ksrc/ -type d -name aufs) if [ -z "$RSL" ]; then diff --git a/remote/modules/kernel/module.conf.fedora b/remote/modules/kernel/module.conf.fedora new file mode 100644 index 00000000..53e6ccb6 --- /dev/null +++ b/remote/modules/kernel/module.conf.fedora @@ -0,0 +1,3 @@ +REQUIRED_GIT_BRANCH="v${SYSTEM_KERNEL_SHORT}" +REQUIRED_GIT="git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git" + diff --git a/remote/modules/kernel/module.conf.opensuse b/remote/modules/kernel/module.conf.opensuse index a66564fe..cdf57cc7 100644 --- a/remote/modules/kernel/module.conf.opensuse +++ b/remote/modules/kernel/module.conf.opensuse @@ -1,2 +1,3 @@ -REQUIRED_GIT_BRANCH="-b openSUSE-${SYS_VERSION}" -REQUIRED_GIT="git://kernel.opensuse.org/kernel.git $REQUIRED_GIT_BRANCH" +REQUIRED_GIT_BRANCH="openSUSE-${SYS_VERSION}" +REQUIRED_GIT="git://kernel.opensuse.org/kernel.git" + diff --git a/remote/modules/nscd/module.conf.fedora b/remote/modules/nscd/module.conf.fedora new file mode 100644 index 00000000..4a61cc19 --- /dev/null +++ b/remote/modules/nscd/module.conf.fedora @@ -0,0 +1,6 @@ +REQUIRED_INSTALLED_PACKAGES=" + nscd +" +REQUIRED_CONTENT_PACKAGES=" + nscd +" diff --git a/remote/modules/openbox/module.conf.fedora b/remote/modules/openbox/module.conf.fedora new file mode 100644 index 00000000..f919f3b3 --- /dev/null +++ b/remote/modules/openbox/module.conf.fedora @@ -0,0 +1,11 @@ +REQUIRED_INSTALLED_PACKAGES=" + openbox + pango +" +REQUIRED_CONTENT_PACKAGES=" + openbox + pango +" +REQUIRED_DIRECTORIES+=" + /usr/$LIB64 +" diff --git a/remote/modules/pam/module.build b/remote/modules/pam/module.build index c6d92510..3f0d8861 100644 --- a/remote/modules/pam/module.build +++ b/remote/modules/pam/module.build @@ -4,7 +4,7 @@ fetch_source() { # get pam-script source download_untar "$REQUIRED_PAM_SCRIPT_URL" "src/" # Distribution switch: openSuse 13.1 has no package nss-ldap: - if [[ "$SYS_DISTRIBUTION" == "opensuse" && "$SYS_VERSION" == "13.1" ]]; then + if [ -n "$REQUIRED_NSS_LDAPD_URL" ]; then pinfo "Downloading $REQUIRED_NSS_LDAPD_URL ..." download_untar "$REQUIRED_NSS_LDAPD_URL" "src/" fi @@ -35,7 +35,7 @@ build() { ./configure --prefix=/ --sysconfdir=/etc/pam-script --libdir="$(dirname ${PAM_UNIX_LOCATION:1})" || perror "pam-script: ./configure failed." make DESTDIR="${MODULE_BUILD_DIR}" install || perror "pam-script: make install to ${MODULE_BUILD_DIR} failed." # openSuse 13.1 has no package nss-pam-ldapd. So, we compile it. - if [[ "$SYS_DISTRIBUTION" == "opensuse" && "$SYS_VERSION" == "13.1" ]]; then + if [ -n "$REQUIRED_NSS_LDAPD_URL" ]; then cd "${MODULE_DIR}/src/$REQUIRED_NSS_LDAPD_VERSION" pinfo "compiling pam-nss-ldapd for openSuse 13.1 ..." ./configure || perror "openSuse 13.1 - pam-nss-ldapd: ./configure failed." diff --git a/remote/modules/pam/module.conf.fedora b/remote/modules/pam/module.conf.fedora new file mode 100644 index 00000000..b2eb3421 --- /dev/null +++ b/remote/modules/pam/module.conf.fedora @@ -0,0 +1,42 @@ +REQUIRED_NSS_LDAPD_VERSION="nss-pam-ldapd-0.8.13" +REQUIRED_NSS_LDAPD_URL="http://arthurdejong.org/nss-pam-ldapd/${REQUIRED_NSS_LDAPD_VERSION}.tar.gz" + +REQUIRED_INSTALLED_PACKAGES=" + pam + pam_krb5 + pam-devel + nss-mdns + libnfsidmap + openssl-devel + openldap-clients + nfs-utils + glibc + pam-devel + openldap-devel + krb5-devel +" +REQUIRED_CONTENT_PACKAGES=" + pam + pam_krb5 + pam-devel + nss-mdns + libnfsidmap + openldap-clients + nfs-utils + glibc +" +REQUIRED_LIBRARIES+=" + libnss_compat + libnss_db + libnss_dns + libnss_files + libnss_nis +" +REQUIRED_DIRECTORIES+=" + /$LIB64 + /usr/$LIB64 +" +REQUIRED_SYSTEM_FILES+=" + /$LIB64/security +" + diff --git a/remote/modules/pam/module.conf.opensuse b/remote/modules/pam/module.conf.opensuse index adef3174..dfc50e1e 100644 --- a/remote/modules/pam/module.conf.opensuse +++ b/remote/modules/pam/module.conf.opensuse @@ -3,6 +3,7 @@ REQUIRED_INSTALLED_PACKAGES=" pam_krb5 pam-devel nss-pam-ldapd + nss-mdns pam-modules libopenssl-devel openldap2-client diff --git a/remote/modules/pam/module.conf.opensuse.13.1 b/remote/modules/pam/module.conf.opensuse.13.1 index 9fe1de17..d4435999 100644 --- a/remote/modules/pam/module.conf.opensuse.13.1 +++ b/remote/modules/pam/module.conf.opensuse.13.1 @@ -10,6 +10,7 @@ REQUIRED_INSTALLED_PACKAGES=" pam_krb5 pam-devel pam-modules + nss-mdns libopenssl-devel openldap2-client nfsidmap diff --git a/remote/modules/polkit/module.conf.fedora b/remote/modules/polkit/module.conf.fedora new file mode 100644 index 00000000..3d4d965d --- /dev/null +++ b/remote/modules/polkit/module.conf.fedora @@ -0,0 +1,12 @@ +REQUIRED_INSTALLED_PACKAGES=" + js-1.8.5 +" +REQUIRED_CONTENT_PACKAGES=" + js-1.8.5 + polkit +" +REQUIRED_DIRECTORIES+=" + /usr/lib/polkit-1 + /var/lib/polkit +" + diff --git a/remote/modules/printergui/module.conf b/remote/modules/printergui/module.conf index 17203d3e..39e64b16 100644 --- a/remote/modules/printergui/module.conf +++ b/remote/modules/printergui/module.conf @@ -4,6 +4,4 @@ REQUIRED_BINARIES=" printergui printpwgui " -REQUIRED_SYSTEM_FILES=" -" diff --git a/remote/modules/printergui/module.conf.fedora b/remote/modules/printergui/module.conf.fedora new file mode 100644 index 00000000..f1f55014 --- /dev/null +++ b/remote/modules/printergui/module.conf.fedora @@ -0,0 +1,5 @@ +REQUIRED_INSTALLED_PACKAGES=" + cups-devel + qt-devel +" + diff --git a/remote/modules/printergui/module.conf.opensuse b/remote/modules/printergui/module.conf.opensuse index 2d4c7a95..478d0a71 100644 --- a/remote/modules/printergui/module.conf.opensuse +++ b/remote/modules/printergui/module.conf.opensuse @@ -1,7 +1,5 @@ REQUIRED_INSTALLED_PACKAGES=" -cups-devel -libqt4-devel -" -REQUIRED_CONTENT_PACKAGES=" -cups-devel + cups-devel + libqt4-devel " + diff --git a/remote/modules/printergui/module.conf.ubuntu b/remote/modules/printergui/module.conf.ubuntu index 54123003..73c89910 100644 --- a/remote/modules/printergui/module.conf.ubuntu +++ b/remote/modules/printergui/module.conf.ubuntu @@ -2,6 +2,4 @@ REQUIRED_INSTALLED_PACKAGES=" libcups2-dev libqt4-dev " -REQUIRED_CONTENT_PACKAGES=" - libcups2-dev -" + diff --git a/remote/modules/redsocks/module.conf.fedora b/remote/modules/redsocks/module.conf.fedora new file mode 100644 index 00000000..fcc0fb45 --- /dev/null +++ b/remote/modules/redsocks/module.conf.fedora @@ -0,0 +1,3 @@ +REQUIRED_INSTALLED_PACKAGES=" + libevent-devel +" diff --git a/remote/modules/rsyslogd/module.conf b/remote/modules/rsyslogd/module.conf index ba36aadf..207f0a1d 100644 --- a/remote/modules/rsyslogd/module.conf +++ b/remote/modules/rsyslogd/module.conf @@ -4,3 +4,6 @@ REQUIRED_BINARIES=" REQUIRED_FILES=" /etc/rsyslog.conf " +REQUIRED_DIRECTORIES=" + /usr/$LIB64/rsyslog +" diff --git a/remote/modules/rsyslogd/module.conf.debian b/remote/modules/rsyslogd/module.conf.debian index 79aba761..6f3cb891 100644 --- a/remote/modules/rsyslogd/module.conf.debian +++ b/remote/modules/rsyslogd/module.conf.debian @@ -1,6 +1,3 @@ REQUIRED_CONTENT_PACKAGES=" rsyslog " -REQUIRED_DIRECTORIES=" - /usr/lib/rsyslog -" diff --git a/remote/modules/rsyslogd/module.conf.fedora b/remote/modules/rsyslogd/module.conf.fedora new file mode 100644 index 00000000..6f3cb891 --- /dev/null +++ b/remote/modules/rsyslogd/module.conf.fedora @@ -0,0 +1,3 @@ +REQUIRED_CONTENT_PACKAGES=" + rsyslog +" diff --git a/remote/modules/rsyslogd/module.conf.opensuse b/remote/modules/rsyslogd/module.conf.opensuse index 51ce0e47..6d7a3c99 100644 --- a/remote/modules/rsyslogd/module.conf.opensuse +++ b/remote/modules/rsyslogd/module.conf.opensuse @@ -4,6 +4,3 @@ REQUIRED_CONTENT_PACKAGES=" REQUIRED_BINARIES+=" rsyslog-service-prepare " -REQUIRED_DIRECTORIES=" - /usr/$LIB64/rsyslog -" diff --git a/remote/modules/rsyslogd/module.conf.ubuntu b/remote/modules/rsyslogd/module.conf.ubuntu index 79aba761..ac8df362 100644 --- a/remote/modules/rsyslogd/module.conf.ubuntu +++ b/remote/modules/rsyslogd/module.conf.ubuntu @@ -1,6 +1,4 @@ REQUIRED_CONTENT_PACKAGES=" rsyslog " -REQUIRED_DIRECTORIES=" - /usr/lib/rsyslog -" + diff --git a/remote/modules/smartctl/module.conf.fedora b/remote/modules/smartctl/module.conf.fedora new file mode 100644 index 00000000..d699f2f0 --- /dev/null +++ b/remote/modules/smartctl/module.conf.fedora @@ -0,0 +1,6 @@ +REQUIRED_CONTENT_PACKAGES=" + smartmontools +" +REQUIRED_INSTALLED_PACKAGES=" + smartmontools +" diff --git a/remote/modules/smbclient/module.build b/remote/modules/smbclient/module.build index dc28dd26..ec2c80fe 100644 --- a/remote/modules/smbclient/module.build +++ b/remote/modules/smbclient/module.build @@ -9,6 +9,7 @@ build() { list_packet_files >> "$COPYLIST" tarcopy "$(cat "$COPYLIST" | sort -u)" "${MODULE_BUILD_DIR}" + mkdir -p "${MODULE_BUILD_DIR}/usr/lib/cups/backend" || perror "Could not create '${MODULE_BUILD_DIR}/usr/lib/cups/backend'" local BIN_LOCATION="$(which smbspool)" if [ ! -z "${BIN_LOCATION}" -a -e "${BIN_LOCATION}" ]; then ln -sf "${BIN_LOCATION}" "${MODULE_BUILD_DIR}/usr/lib/cups/backend/smb" diff --git a/remote/modules/smbclient/module.conf.fedora b/remote/modules/smbclient/module.conf.fedora new file mode 100644 index 00000000..f524d100 --- /dev/null +++ b/remote/modules/smbclient/module.conf.fedora @@ -0,0 +1,9 @@ +REQUIRED_INSTALLED_PACKAGES=" + samba-client +" +REQUIRED_CONTENT_PACKAGES=" + samba-client +" +REQUIRED_FILES=" + /usr/lib/cups/backend/smb +" diff --git a/remote/modules/sshd/data/etc/tmpfiles.d/sshd.conf b/remote/modules/sshd/data/etc/tmpfiles.d/sshd.conf index 77e6e459..ffb34ca6 100644 --- a/remote/modules/sshd/data/etc/tmpfiles.d/sshd.conf +++ b/remote/modules/sshd/data/etc/tmpfiles.d/sshd.conf @@ -1,2 +1,3 @@ d /var/run/sshd 0755 root root +d /var/empty/sshd 0755 root root diff --git a/remote/modules/systemd/module.conf.fedora b/remote/modules/systemd/module.conf.fedora new file mode 100644 index 00000000..9232ea5f --- /dev/null +++ b/remote/modules/systemd/module.conf.fedora @@ -0,0 +1,11 @@ +REQUIRED_INSTALLED_PACKAGES=" + intltool + gperf + libcap-devel + libudev-devel + dbus-devel + libxslt + libblkid-devel + libacl-devel + glib2-devel +" diff --git a/remote/modules/systemd/module.conf.opensuse b/remote/modules/systemd/module.conf.opensuse index 9326a7dc..965333c4 100644 --- a/remote/modules/systemd/module.conf.opensuse +++ b/remote/modules/systemd/module.conf.opensuse @@ -1,7 +1,6 @@ REQUIRED_INSTALLED_PACKAGES=" intltool gperf - pkg-config libcap-devel libudev-devel dbus-1-devel diff --git a/remote/modules/systemd/module.conf.ubuntu b/remote/modules/systemd/module.conf.ubuntu index 2768b51c..e5dff817 100644 --- a/remote/modules/systemd/module.conf.ubuntu +++ b/remote/modules/systemd/module.conf.ubuntu @@ -2,7 +2,6 @@ REQUIRED_INSTALLED_PACKAGES=" intltool gperf dbus - pkg-config libcap-dev libudev-dev libdbus-1-dev diff --git a/remote/modules/udisks/module.build b/remote/modules/udisks/module.build index ab9df016..6a8ff7b0 100644 --- a/remote/modules/udisks/module.build +++ b/remote/modules/udisks/module.build @@ -7,11 +7,8 @@ build () { COPYLIST="list_dpkg_output" rm -f "$COPYLIST" - list_packet_files >> "$COPYLIST" + list_packet_files >> "$COPYLIST" tarcopy "$(cat "$COPYLIST" | sort -u)" "$MODULE_BUILD_DIR" - if [ -d "$MODULE_BUILD_DIR/lib/udev" ]; then - cp -a "$MODULE_BUILD_DIR/lib/udev" "$MODULE_BUILD_DIR/usr/lib/" || perror "Could not move /lib/udev to /usr/lib/udev" - fi mkdir -p "$MODULE_BUILD_DIR/etc/systemd/system/basic.target.wants" "$MODULE_BUILD_DIR/usr/share/dbus-1/system-services" local FOUND=no local BINARY=$(find "$MODULE_BUILD_DIR" -name udisksd -executable | head -n 1) diff --git a/remote/modules/udisks/module.conf.fedora b/remote/modules/udisks/module.conf.fedora new file mode 100644 index 00000000..abf12be7 --- /dev/null +++ b/remote/modules/udisks/module.conf.fedora @@ -0,0 +1,7 @@ +REQUIRED_INSTALLED_PACKAGES=" + udisks2 +" +REQUIRED_CONTENT_PACKAGES=" + udisks2 +" + diff --git a/remote/modules/vmchooser/module.conf.fedora b/remote/modules/vmchooser/module.conf.fedora new file mode 100644 index 00000000..d012e561 --- /dev/null +++ b/remote/modules/vmchooser/module.conf.fedora @@ -0,0 +1,3 @@ +REQUIRED_INSTALLED_PACKAGES=" + qt-devel +" diff --git a/remote/modules/xorg/module.conf.fedora b/remote/modules/xorg/module.conf.fedora new file mode 100644 index 00000000..5cb5a594 --- /dev/null +++ b/remote/modules/xorg/module.conf.fedora @@ -0,0 +1,69 @@ +# xkbutils, xkbprint, setxkbmap, xkbevd for 64-bit openSuse +REQUIRED_INSTALLED_PACKAGES=" + xorg-x11-server-Xorg + xorg-x11-drv-vmware + xorg-x11-drv-ati + xorg-x11-drv-nouveau + xorg-x11-drv-intel + xorg-x11-drv-i740 + xorg-x11-drv-vesa + xorg-x11-drv-fbdev + xorg-x11-drv-modesetting + xorg-x11-drv-vmmouse + xorg-x11-drv-wacom + xorg-x11-drv-evdev + xorg-x11-drv-keyboard + xorg-x11-drv-mouse + xorg-x11-drv-synaptics + xorg-x11-drv-void + xkeyboard-config + dejavu-sans-fonts + libxcb + mesa-dri-drivers + mesa-libGL + xorg-x11-xkb-utils + xorg-x11-xkb-extras + pixman + xorg-x11-server-utils +" +REQUIRED_CONTENT_PACKAGES=" + xorg-x11-server-Xorg + xorg-x11-drv-vmware + xorg-x11-drv-ati + xorg-x11-drv-nouveau + xorg-x11-drv-intel + xorg-x11-drv-i740 + xorg-x11-drv-vesa + xorg-x11-drv-fbdev + xorg-x11-drv-modesetting + xorg-x11-drv-vmmouse + xorg-x11-drv-wacom + xorg-x11-drv-evdev + xorg-x11-drv-keyboard + xorg-x11-drv-mouse + xorg-x11-drv-synaptics + xorg-x11-drv-void + xkeyboard-config + dejavu-sans-fonts + libxcb + mesa-dri-drivers + mesa-libGL + xorg-x11-xkb-utils + xorg-x11-xkb-extras + pixman + xorg-x11-server-utils +" +REQUIRED_LIBRARIES=" + libxcb-glx + libIntelXvMC + i965_dri + vmwgfx_dri + i915_dri + libpixman-1 +" +REQUIRED_DIRECTORIES+=" + /usr/bin + /usr/lib/udev + /usr/$LIB64/xorg + /usr/share/fonts +" diff --git a/remote/rootfs/rootfs-stage31/data/inc/activate_sysconfig b/remote/rootfs/rootfs-stage31/data/inc/activate_sysconfig index 036e90ad..5a97d7ac 100644 --- a/remote/rootfs/rootfs-stage31/data/inc/activate_sysconfig +++ b/remote/rootfs/rootfs-stage31/data/inc/activate_sysconfig @@ -75,6 +75,7 @@ HEREEND # fetch_sysconfig +. "${CONFIG}-remote" fetch_config_files update_sysconfig true diff --git a/remote/rootfs/rootfs-stage31/data/init b/remote/rootfs/rootfs-stage31/data/init index f49b3000..699c68ff 100755 --- a/remote/rootfs/rootfs-stage31/data/init +++ b/remote/rootfs/rootfs-stage31/data/init @@ -80,7 +80,9 @@ bench_event "STAGE32" "Downloaded stage 3.2" # copy files needed for stage3.2 to FUTURE_ROOT echo "Copying busybox etc. to stage32..." -tar -cp "/bin" "/sbin" "/inc/functions" | tar -xp -C "${FUTURE_ROOT}/opt/openslx/" +cp -a "/usr/bin" "/usr/sbin" "${FUTURE_ROOT}/opt/openslx/" +mkdir -p "${FUTURE_ROOT}/opt/openslx/inc" +cp -a "/inc/functions" "${FUTURE_ROOT}/opt/openslx/inc/" # set the SLX_ROOT_PASS if given in config if [ ! -z "$SLX_ROOT_PASS" ]; then diff --git a/remote/rootfs/rootfs-stage31/module.build b/remote/rootfs/rootfs-stage31/module.build index c9346603..bc45b6fd 100644 --- a/remote/rootfs/rootfs-stage31/module.build +++ b/remote/rootfs/rootfs-stage31/module.build @@ -4,7 +4,7 @@ fetch_source() { } build() { - local COPYLIST BIN_LOCATION DRM_MODULES FILE BIN MODNAME PCI_FILE ALIAS VENDOR DEVICE + local COPYLIST BIN_LOCATION DRM_MODULES FILE BIN MODNAME PCI_FILE ALIAS VENDOR DEVICE LIB COPYLIST="list_binaries_and_files" [ -e "$COPYLIST" ] && rm -f "$COPYLIST" for BIN in $REQUIRED_BINARIES; do @@ -14,7 +14,7 @@ build() { done mkdir -p "$MODULE_BUILD_DIR/lib" - find /lib /lib64 /usr/lib /usr/lib64 \( -name "libnss_dns*" -o -name "libresolv*" \) -exec cp -a {} "$MODULE_BUILD_DIR/lib/" \; + find /lib /lib64 /usr/lib /usr/lib64 \( -name "libnss_dns*" -o -name "libresolv*" \) >> "$COPYLIST" tarcopy "$(cat "$COPYLIST" | sort -u)" "$MODULE_BUILD_DIR" diff --git a/remote/rootfs/rootfs-stage32/data/lib/terminfo/l/linux b/remote/rootfs/rootfs-stage32/data/etc/terminfo/l/linux Binary files differindex 48d722f8..48d722f8 100644 --- a/remote/rootfs/rootfs-stage32/data/lib/terminfo/l/linux +++ b/remote/rootfs/rootfs-stage32/data/etc/terminfo/l/linux diff --git a/remote/rootfs/rootfs-stage32/data/etc/terminfo/x/xterm b/remote/rootfs/rootfs-stage32/data/etc/terminfo/x/xterm Binary files differnew file mode 100644 index 00000000..438b1581 --- /dev/null +++ b/remote/rootfs/rootfs-stage32/data/etc/terminfo/x/xterm diff --git a/remote/rootfs/rootfs-stage32/data/etc/terminfo/x/xterm-256color b/remote/rootfs/rootfs-stage32/data/etc/terminfo/x/xterm-256color Binary files differnew file mode 100644 index 00000000..b934be06 --- /dev/null +++ b/remote/rootfs/rootfs-stage32/data/etc/terminfo/x/xterm-256color 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 +" diff --git a/remote/setup_target b/remote/setup_target index 77a9f62d..f76c7831 100755 --- a/remote/setup_target +++ b/remote/setup_target @@ -256,6 +256,7 @@ generate_target() { initial_checks + local DIR TARGET=$1 && shift TARGET_DIR="${MODE_DIR}/targets/${TARGET}" TARGET_BUILD_DIR="${MODE_DIR}/builds/${TARGET}" @@ -267,6 +268,10 @@ generate_target() { perror "Target directory cannot be named 'builds' or 'modules'." pdebug "Generating '$TARGET_BUILD_DIR' for '$TARGET'" + for DIR in lib lib64 bin sbin; do + mkdir -p "${TARGET_BUILD_DIR}/usr/${DIR}" || perror "Could not create '${TARGET_BUILD_DIR}/usr/${DIR}'" + [ -L "${TARGET_BUILD_DIR}/${DIR}" ] || ln -s "usr/${DIR}" "${TARGET_BUILD_DIR}/${DIR}" || perror "Could not symlink '${TARGET_BUILD_DIR}/${DIR}' to 'usr/${DIR}" + done # if no arguments assume all. if [ "x$1" = "x" -o "x$1" = "xall" ]; then @@ -366,6 +371,11 @@ process_module() { fi # Process module mkdir -p "${MODULE_BUILD_DIR}" || perror "Could not create build dir" + local DIR + for DIR in lib lib64 bin sbin; do + mkdir -p "${MODULE_BUILD_DIR}/usr/${DIR}" || perror "Could not create '${MODULE_BUILD_DIR}/usr/${DIR}'" + [ -L "${MODULE_BUILD_DIR}/${DIR}" ] || ln -s "usr/${DIR}" "${MODULE_BUILD_DIR}/${DIR}" || perror "Could not symlink '${MODULE_BUILD_DIR}/${DIR}' to 'usr/${DIR}" + done pdebug "## Reading config of $MODULE" read_config # Check if this module has a dependency that wasn't built yet: @@ -446,13 +456,6 @@ process_module() { post_process_target() { local TOOL_STR="$TOOL_STR post_process_target:" - if [ -d "${TARGET_BUILD_DIR}/lib/systemd" ]; then - pwarning "/lib/systemd exists in the generated target. It is not advisable to fetch existing" - pwarning "systemd service files from the template system, as it might conflict with generated" - pwarning "ones. In fact, some systems don't even use systemd so there might be no existing" - pwarning "service files. Please generate your own service file and place it in /etc/systemd." - pwarning "All files in /lib/systemd will be ignored." - fi # figure out all relevant ld-paths pinfo "Running ldconfig" @@ -562,7 +565,9 @@ strip_recursive() { # copies static data files from <MODULE>/data/ to <TARGET_BUILD_DIR> copy_static_data() { [ ! -d "${MODULE_DIR}/data" ] && pinfo "${MODULE} has no static 'data' directory." && return - cp -r "${MODULE_DIR}/data/"* ${TARGET_BUILD_DIR} || perror "Could not copy static data of ${MODULE}" + cd "${MODULE_DIR}/data/" || perror "could not cd to '${MODULE_DIR}/data/'" + tarcopy "$(find . -type f -o -type l)" "${TARGET_BUILD_DIR}" + cd - } # Copies files with their absolute paths in $REQUIRED_SYSTEM_FILES to $TARGET_BUILD_DIR |
