From 97b4ba82596ae5484079483afeaba7986958ecab Mon Sep 17 00:00:00 2001 From: Michael Neves Date: Wed, 20 Mar 2013 15:22:51 +0100 Subject: KERNEL_VERSION from system.inc gitignore and calc_size in fileutil calculates the build size of a module fix generate_target argument parsing add xfs to rootfs-stage31.conf added server sync option -s - Fix sshd module failing to set permissions on sshd config - Add all required packages for openSUSE to xorg module - Softlink sh to bash in rootfs-stage32, as some scripts might fail otherwise Thanks hwinfo but we don't need you anymore Added size log fix list_packet_files exiting loop when a packet wasnt installed remove flag checks, now done in setup_target check if kernel module is already built-in --- remote/modules/busybox/busybox.build | 27 ++++-------- remote/modules/hwinfo/hwinfo.build | 43 ++++++++++++------- remote/modules/hwinfo/hwinfo.conf | 2 + remote/modules/kdm/kdm.build | 2 +- remote/modules/kdm/kdm.conf | 2 +- .../modules/ldm-gtk-greeter/ldm-gtk-greeter.build | 31 ++++++-------- remote/modules/ldm/ldm.build | 30 ++++++-------- remote/modules/plymouth/plymouth.build | 22 ++++------ remote/modules/policykit-src/policykit.build | 48 ++++++++++------------ remote/modules/sshd/sshd.build | 11 ++--- remote/modules/systemd/systemd.build | 41 ++++++++---------- .../data/usr/share/xsessions/default.desktop | 10 +++++ remote/modules/vmchooser/vmchooser.build | 25 ++++------- remote/modules/xorg/xorg.build | 2 - remote/modules/xorg/xorg.conf.zypper | 5 ++- 15 files changed, 143 insertions(+), 158 deletions(-) create mode 100755 remote/modules/vmchooser/data/usr/share/xsessions/default.desktop (limited to 'remote/modules') diff --git a/remote/modules/busybox/busybox.build b/remote/modules/busybox/busybox.build index d11a3828..45bdd396 100644 --- a/remote/modules/busybox/busybox.build +++ b/remote/modules/busybox/busybox.build @@ -1,25 +1,16 @@ #!/bin/bash -fetch_source() -{ - [ ! -d src ] && mkdir src - if [ ! -e .fetched_source ]; then - git clone "${GIT}" src - touch .fetched_source - fi +fetch_source() { + git clone "${GIT}" src } -build() -{ - if [ ! -e .built ]; then - cd src - pinfo "Running make" - make || perror "failed." - pinfo "Running make install" - make CONFIG_PREFIX="${MODULE_DIR}"/build/"${PREFIX}" install || perror "failed" - cd - - touch .built - fi +build() { + cd src + pinfo "Running make" + make || perror "failed." + pinfo "Running make install" + make CONFIG_PREFIX="${MODULE_DIR}"/build/"${PREFIX}" install || perror "failed" + cd - &> /dev/null } post_copy() { diff --git a/remote/modules/hwinfo/hwinfo.build b/remote/modules/hwinfo/hwinfo.build index b2012a22..9cf7eb1e 100644 --- a/remote/modules/hwinfo/hwinfo.build +++ b/remote/modules/hwinfo/hwinfo.build @@ -1,23 +1,36 @@ +BIN_PATH=$(which hwinfo) + fetch_source() { - [ ! -d "${MODULE_DIR}/src" ] && mkdir -p "${MODULE_DIR}/src" - cd "${MODULE_DIR}/src" - git clone git://gitorious.org/opensuse/hwinfo.git - git clone git://gitorious.org/x86emu/libx86emu.git - cd - &> /dev/null + if [ -z ${BIN_PATH} ]; then + [ ! -d "${MODULE_DIR}/src" ] && mkdir -p "${MODULE_DIR}/src" + cd "${MODULE_DIR}/src" + git clone git://gitorious.org/opensuse/hwinfo.git + git clone git://gitorious.org/x86emu/libx86emu.git + cd - &> /dev/null + else + pinfo "Copying hwinfo from system." + fi } build() { - pdebug "Installing libx86emu in ${MODULE_DIR}/build..." - cd "${MODULE_DIR}/src/libx86emu" - EXTRA_FLAGS="-I${MODULE_DIR}/src/libx86emu/include" make || perror "libx86emu: make failed." - DESTDIR="${MODULE_DIR}"/build make install || perror "libx86emu: make install failed." - cd - &> /dev/null - pdebug "Installing hwinfo in ${MODULE_DIR}/build..." - cd "${MODULE_DIR}/src/hwinfo" - make || perror "hwinfo: make failed." - DESTDIR="${MODULE_DIR}/build" make install || perror "hwinfo: make install failed." - cd - &> /dev/null + if [ ! -z ${BIN_PATH} -a -e ${BIN_PATH} ]; then + tarcopy "$(get_link_chain ${BIN_PATH})" "${MODULE_BUILD_DIR}" + else + pdebug "Installing libx86emu in ${MODULE_BUILD_DIR}..." + cd "${MODULE_DIR}/src/libx86emu" + make || perror "libx86emu: make failed." + DESTDIR="${MODULE_BUILD_DIR}" make install || perror "libx86emu: make install failed." + cd - &> /dev/null + + pdebug "Installing hwinfo in ${MODULE_BUILD_DIR}..." + cd "${MODULE_DIR}/src/hwinfo" + # find libx86emu path + LIBX86EMU_DIR=$(dirname $(find ${MODULE_BUILD_DIR} -name libx86emu.so)) + EXTRA_FLAGS="-I${MODULE_BUILD_DIR}/usr/include" LIBRARY_PATH="${LIBX86EMU_DIR}" LD_LIBRARY_PATH="${LIBX86EMU_DIR}" make || pwarning "hwinfo: make failed." + DESTDIR="${MODULE_BUILD_DIR}" make install || pwarning "hwinfo: make install failed." + cd - &> /dev/null + fi } diff --git a/remote/modules/hwinfo/hwinfo.conf b/remote/modules/hwinfo/hwinfo.conf index af5783a2..2d3db99d 100644 --- a/remote/modules/hwinfo/hwinfo.conf +++ b/remote/modules/hwinfo/hwinfo.conf @@ -1 +1,3 @@ REQUIRED_BINARIES=" hwinfo" +REQUIRED_DEPENDENCIES=" flex + hwinfo" diff --git a/remote/modules/kdm/kdm.build b/remote/modules/kdm/kdm.build index 638f8088..9f2008f5 100644 --- a/remote/modules/kdm/kdm.build +++ b/remote/modules/kdm/kdm.build @@ -21,6 +21,6 @@ post_copy() { #copy required icons [ ! -z "$REQUIRED_SYSTEM_FILES" ] && tarcopy "$REQUIRED_SYSTEM_FILES" "$TARGET_BUILD_DIR" - gtk-update-icon-cache-3.0 "${TARGET_BUILD_DIR}/usr/share/icons/oxygen/" || perror "update-icon-cache-3.0 failed." + gtk-update-icon-cache-3.0 "${TARGET_BUILD_DIR}/usr/share/icons/oxygen/" || pwarning "update-icon-cache-3.0 failed." } diff --git a/remote/modules/kdm/kdm.conf b/remote/modules/kdm/kdm.conf index 75a84999..2ae5dd91 100644 --- a/remote/modules/kdm/kdm.conf +++ b/remote/modules/kdm/kdm.conf @@ -1,4 +1,4 @@ -REQUIRED_DEPENDENCIES="kdm" +REQUIRED_DEPENDENCIES="kdm kde-workspace-kgreet-plugins" REQUIRED_PACKAGES="kdm kde-workspace-kgreet-plugins" REQUIRED_BINARIES="" REQUIRED_DIRECTORIES=" /etc/dbus-1 diff --git a/remote/modules/ldm-gtk-greeter/ldm-gtk-greeter.build b/remote/modules/ldm-gtk-greeter/ldm-gtk-greeter.build index 7f02e281..27e5a592 100644 --- a/remote/modules/ldm-gtk-greeter/ldm-gtk-greeter.build +++ b/remote/modules/ldm-gtk-greeter/ldm-gtk-greeter.build @@ -1,30 +1,25 @@ #tool/distro specific functions for fetching, building and installing dependencies fetch_source () { - [ ! -e .fetched_source ] && download_untar "$URL" "src/" - touch .fetched_source + download_untar "$URL" "src/" } build () { - if [ ! -e .built ]; then - cd "src/$VERSION" - pinfo "Running configure" - ./configure --prefix="/" --datarootdir="/usr/share" || perror "failed." - pinfo "Running make" - make || perror "failed." - pinfo "Running make install" - DESTDIR="${MODULE_BUILD_DIR}" make install || perror "failed." + cd "src/$VERSION" + pinfo "Running configure" + ./configure --prefix="/" --datarootdir="/usr/share" || perror "failed." + pinfo "Running make" + make || perror "failed." + pinfo "Running make install" + DESTDIR="${MODULE_BUILD_DIR}" make install || perror "failed." - COPYLIST="list_dpkg_output" - [ -e "$COPYLIST" ] && rm "$COPYLIST" + COPYLIST="list_dpkg_output" + [ -e "$COPYLIST" ] && rm "$COPYLIST" - list_packet_files >> "$COPYLIST" - tarcopy "$(cat "$COPYLIST" | sort -u)" "${MODULE_BUILD_DIR}" + list_packet_files >> "$COPYLIST" + tarcopy "$(cat "$COPYLIST" | sort -u)" "${MODULE_BUILD_DIR}" - cd - - touch .built - - fi + cd - } post_copy() { diff --git a/remote/modules/ldm/ldm.build b/remote/modules/ldm/ldm.build index 0e73148c..e88f0b08 100644 --- a/remote/modules/ldm/ldm.build +++ b/remote/modules/ldm/ldm.build @@ -1,30 +1,26 @@ #tool/distro specific functions for fetching, building and installing dependencies fetch_source () { - [ ! -e .fetched_source ] && download_untar "$URL" "src/" - touch .fetched_source + download_untar "$URL" "src/" } build () { - if [ ! -e .built ]; then - cd "src/$VERSION" - pinfo "Running configure" - ./configure --prefix="/" --datarootdir="/usr/share" || perror "failed." - pinfo "Running make" - make || perror "failed." - pinfo "Running make install" - DESTDIR="${MODULE_BUILD_DIR}" make install || perror "failed." + cd "src/$VERSION" + pinfo "Running configure" + ./configure --prefix="/" --datarootdir="/usr/share" || perror "failed." + pinfo "Running make" + make || perror "failed." + pinfo "Running make install" + DESTDIR="${MODULE_BUILD_DIR}" make install || perror "failed." - COPYLIST="list_dpkg_output" + COPYLIST="list_dpkg_output" - [ -e "$COPYLIST" ] && rm "$COPYLIST" + [ -e "$COPYLIST" ] && rm "$COPYLIST" - list_packet_files >> "$COPYLIST" - tarcopy "$(cat "$COPYLIST" | sort -u)" "${MODULE_BUILD_DIR}" + list_packet_files >> "$COPYLIST" + tarcopy "$(cat "$COPYLIST" | sort -u)" "${MODULE_BUILD_DIR}" - cd - - touch .built - fi + cd - } post_copy() { diff --git a/remote/modules/plymouth/plymouth.build b/remote/modules/plymouth/plymouth.build index d5e9c594..1346f087 100644 --- a/remote/modules/plymouth/plymouth.build +++ b/remote/modules/plymouth/plymouth.build @@ -1,22 +1,18 @@ #!/bin/bash fetch_source() { - [ ! -e .fetched_source ] && download_untar "$URL" "src/" - touch .fetched_source + download_untar "$URL" "src/" } build() { - if [ ! -e .built ]; then - cd src/$VERSION - pinfo "Running configure" - ./configure --enable-systemd-integration --disable-gtk --disable-static --prefix=""|| perror "failed." - pinfo "Running make" - make || perror "failed" - pinfo "Running make install" - DESTDIR="${MODULE_BUILD_DIR}" make install || perror "failed" - cd - - touch .built - fi + cd src/$VERSION + pinfo "Running configure" + ./configure --enable-systemd-integration --disable-gtk --disable-static --prefix=""|| perror "failed." + pinfo "Running make" + make || perror "failed" + pinfo "Running make install" + DESTDIR="${MODULE_BUILD_DIR}" make install || perror "failed" + cd - } post_copy() { diff --git a/remote/modules/policykit-src/policykit.build b/remote/modules/policykit-src/policykit.build index 811d9b0c..26d1e27a 100644 --- a/remote/modules/policykit-src/policykit.build +++ b/remote/modules/policykit-src/policykit.build @@ -2,35 +2,31 @@ fetch_source () { - [ ! -e .fetched_source ] && download_untar "$URL" "src/" - touch .fetched_source + download_untar "$URL" "src/" } build () { - if [ ! -e .built ]; then - cd src/$VERSION - - [ ! -d "${MODULES_DIR}/systemd/build" ] && perror "systemd build directory not found. Build it first." - SYSTEMD_BUILD_DIR="${MODULES_DIR}/systemd/build" - pinfo "configuring..." - LIBSYSTEMD_LOGIN_LIBS="-L${SYSTEMD_BUILD_DIR}/usr/lib/" \ - LIBSYSTEMD_LOGIN_CFLAGS="-I${SYSTEMD_BUILD_DIR}/usr/include -I${SYSTEMD_BUILD_DIR}/usr/include/systemd -lsystemd-login -lsystemd-daemon" \ - ./configure --enable-libsystemd-login=yes --with-systemdsystemunitdir=/etc/systemd/system -prefix="/" --datarootdir="/usr/share" --enable-man-pages=no --enable-gtk-doc-html=no --enable-examples=no --enable-static=no - pinfo "calling make..." - make || perror "make failed." - [ ! -d "${MODULE_BUILD_DIR}" ] && mkdir -p "${MODULE_BUILD_DIR}" - pinfo "installing to ${MODULE_BUILD_DIR}..." - DESTDIR="${MODULE_BUILD_DIR}" make install || perror "make install failed..." - - COPYLIST="list_dpkg_output" - [ -e "$COPYLIST" ] && rm "$COPYLIST" - - list_packet_files >> "$COPYLIST" - tarcopy "$(cat "$COPYLIST" | sort -u)" "${MODULE_BUILD_DIR}" - - cd - - touch .built - fi + cd src/$VERSION + + [ ! -d "${MODULES_DIR}/systemd/build" ] && perror "systemd build directory not found. Build it first." + SYSTEMD_BUILD_DIR="${MODULES_DIR}/systemd/build" + pinfo "configuring..." + LIBSYSTEMD_LOGIN_LIBS="-L${SYSTEMD_BUILD_DIR}/usr/lib/" \ + LIBSYSTEMD_LOGIN_CFLAGS="-I${SYSTEMD_BUILD_DIR}/usr/include -I${SYSTEMD_BUILD_DIR}/usr/include/systemd -lsystemd-login -lsystemd-daemon" \ + ./configure --enable-libsystemd-login=yes --with-systemdsystemunitdir=/etc/systemd/system -prefix="/" --datarootdir="/usr/share" --enable-man-pages=no --enable-gtk-doc-html=no --enable-examples=no --enable-static=no + pinfo "calling make..." + make || perror "make failed." + [ ! -d "${MODULE_BUILD_DIR}" ] && mkdir -p "${MODULE_BUILD_DIR}" + pinfo "installing to ${MODULE_BUILD_DIR}..." + DESTDIR="${MODULE_BUILD_DIR}" make install || perror "make install failed..." + + COPYLIST="list_dpkg_output" + [ -e "$COPYLIST" ] && rm "$COPYLIST" + + list_packet_files >> "$COPYLIST" + tarcopy "$(cat "$COPYLIST" | sort -u)" "${MODULE_BUILD_DIR}" + + cd - } post_copy() { diff --git a/remote/modules/sshd/sshd.build b/remote/modules/sshd/sshd.build index 0b198c6c..89dcd386 100644 --- a/remote/modules/sshd/sshd.build +++ b/remote/modules/sshd/sshd.build @@ -4,9 +4,9 @@ fetch_source() { build() { - BIN_LOCATION=$(which sshd) - [ ! -z ${BIN_LOCATION} ] && BIN_LOCATION=$(readlink -f "$BIN_LOCATION") - if [ ! -z ${BIN_LOCATION} -a -e ${BIN_LOCATION} ]; then + local BIN_LOCATION="$(which sshd)" + [ ! -z "${BIN_LOCATION}" ] && BIN_LOCATION=$(readlink -f "$BIN_LOCATION") + if [ ! -z "${BIN_LOCATION}" -a -e "${BIN_LOCATION}" ]; then tarcopy "${BIN_LOCATION}" "${MODULE_BUILD_DIR}" else perror "'sshd' not found on the system! Please install it." @@ -14,7 +14,8 @@ build() { } post_copy() { - mkdir -p "${TARGET_BUILD_DIR}/var/run/sshd" + mkdir -p "${TARGET_BUILD_DIR}/var/run/sshd" # ubuntu + mkdir -p "${TARGET_BUILD_DIR}/var/lib/empty" # suse - chmod go-rwx "${TARGET_BUILD_DIR}/etc/ssh/*" + chmod go-rwx "${TARGET_BUILD_DIR}/etc/ssh/"* # no space, " before * } diff --git a/remote/modules/systemd/systemd.build b/remote/modules/systemd/systemd.build index 57fb705e..ee74d53a 100644 --- a/remote/modules/systemd/systemd.build +++ b/remote/modules/systemd/systemd.build @@ -1,34 +1,27 @@ #tool/distro specific functions for fetching, building and installing dependencies fetch_source () { - if [ ! -e .fetched_source ]; then - download_untar "$URL" "src/" - download_untar "$LIBKMOD_URL" "src/" - touch .fetched_source - fi + download_untar "$URL" "src/" + download_untar "$LIBKMOD_URL" "src/" } build () { - if [ ! -e .built ]; then - #build libkmod - cd "${MODULE_DIR}/src/$LIBKMOD_VERSION" - pwarning "$(pwd)" - ./configure - make || perror "make failed." - make install || perror "make install failed." - cd - &> /dev/null + #build libkmod + cd "${MODULE_DIR}/src/$LIBKMOD_VERSION" + ./configure + make || perror "make failed." + make install || perror "make install failed." + cd - &> /dev/null - #build systemd - cd "${MODULE_DIR}/src/$VERSION" - pinfo "calling configure" - ./configure --disable-manpages --enable-split-usr --sysconfdir="/etc" --enable-gtk-doc-html=no || perror "configure failed." - pinfo "calling make" - make || perror "make failed." - pinfo "calling make install" - DESTDIR="${MODULE_BUILD_DIR}" make install || perror "make install failed." - cd - &> /dev/null - touch .built - fi + #build systemd + cd "${MODULE_DIR}/src/$VERSION" + pinfo "calling configure" + ./configure --disable-manpages --enable-split-usr --sysconfdir="/etc" --enable-gtk-doc-html=no || perror "configure failed." + pinfo "calling make" + make || perror "make failed." + pinfo "calling make install" + DESTDIR="${MODULE_BUILD_DIR}" make install || perror "make install failed." + cd - &> /dev/null } post_copy() { diff --git a/remote/modules/vmchooser/data/usr/share/xsessions/default.desktop b/remote/modules/vmchooser/data/usr/share/xsessions/default.desktop new file mode 100755 index 00000000..c6a0f825 --- /dev/null +++ b/remote/modules/vmchooser/data/usr/share/xsessions/default.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Encoding=UTF-8 +Name=virtual machine chooser (default) +Name[de]=Virtuelle Maschine auswählen +Comment=This session starts the vm session chooser +Comment[de]=Diese Sitzung startet das Auswahlmenü für die vorhandenen Sitzungen +Exec=/openslx/bin/vmchooser +TryExec=/openslx/bin/vmchooser +Icon= +Type=Application diff --git a/remote/modules/vmchooser/vmchooser.build b/remote/modules/vmchooser/vmchooser.build index 536aa5d3..340b1d9a 100644 --- a/remote/modules/vmchooser/vmchooser.build +++ b/remote/modules/vmchooser/vmchooser.build @@ -1,24 +1,15 @@ #!/bin/bash -fetch_source() -{ - [ ! -d src ] && mkdir src - if [ ! -e .fetched_source ]; then - git clone "${GIT}" src - touch .fetched_source - fi +fetch_source() { + git clone "${GIT}" src } -build() -{ - if [ ! -e .built ]; then - cd src - pinfo "Running vmchooser buildscript" - . build.sh - pinfo "" - cd - - touch .built - fi +build() { + cd src + pinfo "Running vmchooser buildscript" + . build.sh + pinfo "" + cd - &> /dev/null } post_copy() { diff --git a/remote/modules/xorg/xorg.build b/remote/modules/xorg/xorg.build index 8026f2b2..34750ef5 100644 --- a/remote/modules/xorg/xorg.build +++ b/remote/modules/xorg/xorg.build @@ -15,7 +15,5 @@ build() { post_copy() { mkdir -p "${TARGET_BUILD_DIR}/etc/X11" [ ! -e ${TARGET_BUILD_DIR}/etc/X11/X ] && ln -s /usr/bin/Xorg ${TARGET_BUILD_DIR}/etc/X11/X - mkdir -p "${TARGET_BUILD_DIR}/var/lib/xkb" - cp /var/lib/xkb/server* "${TARGET_BUILD_DIR}/var/lib/xkb/" #|| perror "Copying /var/lib/xkb/server* to '${TARGET_BUILD_DIR}/var/lib/xkb/' failed." } diff --git a/remote/modules/xorg/xorg.conf.zypper b/remote/modules/xorg/xorg.conf.zypper index c5e21646..ba681c66 100644 --- a/remote/modules/xorg/xorg.conf.zypper +++ b/remote/modules/xorg/xorg.conf.zypper @@ -1,6 +1,9 @@ REQUIRED_PACKAGES=" xorg-x11 xorg-x11-server - xorg-x11-driver-input" + xorg-x11-driver-input + xorg-x11-driver-video + Mesa + xkeyboard-config" REQUIRED_BINARIES=" Xorg gtf cvt -- cgit v1.2.3-55-g7522