From 9fc83915a69eb2d87a8075e3b5872341da83df74 Mon Sep 17 00:00:00 2001 From: Christian Rößler Date: Thu, 1 Aug 2013 18:20:13 +0200 Subject: [german] Commented a caveat for non-Ubuntu/Debian distributions (locale-gen) --- remote/modules/german/german.build | 1 + 1 file changed, 1 insertion(+) diff --git a/remote/modules/german/german.build b/remote/modules/german/german.build index f7f19a84..6327815f 100644 --- a/remote/modules/german/german.build +++ b/remote/modules/german/german.build @@ -4,6 +4,7 @@ fetch_source() { build() { # Make sure uncompressed locales are present, so we can fetch german utf8 + # Cave: locale-gen is debian/ubunto-specific, so other distris _must_ have /usr/lib/locale/de_DE.utf8! if [ ! -d "/usr/lib/locale/de_DE.utf8" ]; then pinfo "Generating locales..." locale-gen --purge --no-archive || perror "Could not run locale-gen" -- cgit v1.2.3-55-g7522 From 54453eb2ae17e67b6abcf92747890d8a256da413 Mon Sep 17 00:00:00 2001 From: Christian Rößler Date: Fri, 2 Aug 2013 17:57:08 +0200 Subject: [setup_target] Commented hint for "dbus/dbus-arch-deps.h is missing to funct. post_process_target. (Needed by module dbus: post_process_target: Replacing libck-connector with dummy) --- remote/setup_target | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/remote/setup_target b/remote/setup_target index 2115d18e..f0722055 100755 --- a/remote/setup_target +++ b/remote/setup_target @@ -375,6 +375,11 @@ post_process_target() { fi # replace ck connector with fake one + # CAVE: On Scientific Lunux (6.4) and perhaps others: + # If include dbus/dbus-arch-deps.h is missing (file not found) either set a symb. link: + # /usr/include/dbus-1.0/dbus/dbus-arch-deps.h -> /usr/lib(64)/dbus-1.0/include/dbus/dbus-arch-deps.h + # or execute "pkg-config dbus-1 --cflags". + local CK_LIBS=$(find "$TARGET_BUILD_DIR" -name "libck-connector.so*") if [ -n "$CK_LIBS" ]; then pinfo "Replacing libck-connector with dummy" -- cgit v1.2.3-55-g7522 From 078c056e6d114a36c13e2d341242886f9ab6ea61 Mon Sep 17 00:00:00 2001 From: Christian Rößler Date: Mon, 5 Aug 2013 17:32:58 +0200 Subject: [openslx-update] Added update for scripts openslx-install, openslx-update, new version detection by md5, incl. check for md5 after download to detect transport errors, disk full etc. --- data/openslx-update | 53 +++++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 45 insertions(+), 8 deletions(-) diff --git a/data/openslx-update b/data/openslx-update index c7e24d30..9eecf749 100755 --- a/data/openslx-update +++ b/data/openslx-update @@ -17,7 +17,7 @@ function warning () { echo -e "\033[01;33m$@\033[00m" } - + ### Variablen ################################### # Web MIRROR="http://mltk.boot.openslx.org" @@ -28,12 +28,16 @@ PXECONFIG="$PXEDIR/default" PXETEMPLATE="/opt/openslx/templates/pxemenu-header" FILEPRAEFIX="openslx-" WWWDIR="/srv/openslx/www" +SLXSCRIPTS="openslx-install openslx-update" +SCRIPTPATH=$(dirname "$0") +SCRIPTBACKUPDIR=/root/backup # Konfigurationsdateien SERVERDEFAULTS="/opt/openslx/server-defaults" # Temporäres REMOTEINDEX="/tmp/mlversion" LOCALINDEX="/opt/openslx/local_version" WWWTEMP="/srv/openslx/www-temp" +DLFLAG=0 # if something was downloaded # Vars zum Überladen LOCAL_STABLE=0 LOCAL_TESTING=0 @@ -42,6 +46,8 @@ CRCCOMMAND=md5sum CRCEXTENSION=md5 # Mindestens freier Plattenplatz in Kilobytes MINSPACE=409600 # 400MB +# Allgemein +DATUM=$(date +%Y%m%d) trap "{ rm -f $REMOTEINDEX $WWWTEMP/* $WWWDIR/*.$CRCEXTENSION; }" SIGINT SIGTERM EXIT @@ -67,6 +73,7 @@ cp "$PXETEMPLATE" "$PXECONFIG" ERR=$?; [ $ERR -ne 0 ] && error "Kann PXE-Vorlage nicht umkopieren!" mkdir -p "$WWWTEMP" +print "Kopiere bestehende Dateien sicherheitshalber um..." cp -p "$WWWDIR/$FILEPRAEFIX"* "$WWWTEMP/" ERR=$?; [ $ERR -ne 0 ] && error "Kann bestehende Dateien nicht nach $WWWTEMP kopieren!" @@ -92,7 +99,7 @@ for REL in ${!AVAILABLE_*}; do continue fi # Download - wget -O "$WWWTEMP/$FILEPRAEFIX$FILE" "$MIRROR/$MIRRORDIR/$FILE" || { warning "Could not download $FILE"; continue; } + wget -O "$WWWTEMP/$FILEPRAEFIX$FILE" "$MIRROR/$MIRRORDIR/$FILE" && DLFLAG=1 || { warning "Could not download $FILE"; continue; } # Download md5 value wget -O "$WWWTEMP/$FILEPRAEFIX$FILE.$CRCEXTENSION" "$MIRROR/$MIRRORDIR/$FILE.$CRCEXTENSION" \ || { warning "Could not download $FILE.$CRCEXTENSION!"; continue; } @@ -133,10 +140,40 @@ done # If we are here, then we can assume everything went either right, or at least no fatal error happened. # So, we will move the stuff in $WWWTEMP to $WWWDIR. -print "Alles scheint ok - Bewege neue Abbilder zum Webserver." -mv "$WWWTEMP/"* "$WWWDIR/" -print "Done." -# print "Old files left over:" -# ls -alh "$WWWTEMP" +if [ "$DLFLAG" -ne 0 ]; then + print "Alles scheint ok - Bewege neue Abbilder zum Webserver." + mv "$WWWTEMP/"* "$WWWDIR/" + print "Neue Abbilder bewegt." +else + print "Keine Abbilder heruntergeladen - leere temporäres Verzeichnis $WWWTEMP." + rm -f "$WWWTEMP/"* +fi -exit 0 +# Update Scripts openslx-install and openslx-update, if possible. +if [ ! -d "$SCRIPTBACKUPDIR" ]; then + print "Erzeuge Sicherungsverzeichnis für Skripte $SCRIPTBACKUPDIR" + mkdir -p "$SCRIPTBACKUPDIR" || error "Kann Sicherungsverzeichnis für Skripte nicht erstellen!" +fi + +for FILE in openslx-update openslx-install; do + wget -O "$WWWTEMP/$FILE.$CRCEXTENSION" "$MIRROR/$MIRRORDIR/$FILE.$CRCEXTENSION" + CRCVALNEW=$(cat "$WWWTEMP/$FILE.$CRCEXTENSION"|cut -f 1 -d " ") + CRCVALOLD=$($CRCCOMMAND "$SCRIPTPATH/$FILE"|cut -f 1 -d " ") + if [ "$CRCVALNEW" == "$CRCVALOLD" ]; then + print "$SCRIPTPATH/$FILE - kein Update notwendig." + continue + else + wget -O "$WWWTEMP/$FILE" "$MIRROR/$MIRRORDIR/$FILE" + if [ $($CRCCOMMAND "$WWWTEMP/$FILE"|cut -f 1 -d " ") != "$CRCVALNEW" ]; then + warning "$SCRIPTPATH/$FILE konnte nicht upgedatet werden ($CRCEXTENSION-Fehler)!" + continue + else + print "$SCRIPTPATH/$FILE wird upgedatet - $CRCEXTENSION ok." + print "Alte Version $SCRIPTPATH/$FILE gesichert nach: $SCRIPTBACKUPDIR/$FILE.$DATUM." + mv "$SCRIPTPATH/$FILE" "$SCRIPTBACKUPDIR/$FILE.$DATUM" + chmod u+x "$WWWTEMP/$FILE" # sonst wg. wget keine exec-bit + mv "$WWWTEMP/$FILE" "$SCRIPTPATH" + fi + fi +done +exit 0 -- cgit v1.2.3-55-g7522 From 1251d0b2227cb196e12fca2dfa81e6e5de895111 Mon Sep 17 00:00:00 2001 From: Christian Rößler Date: Mon, 5 Aug 2013 18:20:28 +0200 Subject: [systemd.build] Added switch for Scientific Linux: Patching configure. This is solely experimental and will vanish again - hopefully. --- remote/modules/systemd/systemd.build | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/remote/modules/systemd/systemd.build b/remote/modules/systemd/systemd.build index 8052ca4e..e481f74e 100644 --- a/remote/modules/systemd/systemd.build +++ b/remote/modules/systemd/systemd.build @@ -20,6 +20,16 @@ build () { #build systemd pinfo "Building systemd" cd "${MODULE_DIR}/src/$REQUIRED_VERSION" + + # patching configure for Scientific Linux - cave - ugly hack! + if [ "$SYS_DISTRIBUTION" == "scientific" ]; then + pinfo "Scientific Linux detected; patching systemd/configure..." + sed 's/dbus-1 >= 1.3.2/dbus-1 >= 1.2.24/g' configure > configure.patched + mv configure configure.orig + mv configure.patched configure + chmod +x configure + fi + pinfo "calling configure" ./configure --disable-manpages --enable-split-usr --sysconfdir="/etc" --enable-gtk-doc-html=no --disable-nls --disable-microhttpd --disable-bootchart --disable-quotacheck --disable-hostnamed --disable-timedated --disable-localed --disable-coredump --disable-keymap --without-python --enable-blkid --enable-acl --enable-pam|| perror "configure failed." pinfo "calling make" -- cgit v1.2.3-55-g7522 From 64897cb8ce345ede9c620da8aa47d2bcae94106e Mon Sep 17 00:00:00 2001 From: Christian Rößler Date: Tue, 6 Aug 2013 14:02:41 +0200 Subject: [openslx-update] Minor additions: +var SLXSCRIPTS, +mktemp --- data/openslx-update | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/data/openslx-update b/data/openslx-update index 9eecf749..cb46b258 100755 --- a/data/openslx-update +++ b/data/openslx-update @@ -34,7 +34,7 @@ SCRIPTBACKUPDIR=/root/backup # Konfigurationsdateien SERVERDEFAULTS="/opt/openslx/server-defaults" # Temporäres -REMOTEINDEX="/tmp/mlversion" +REMOTEINDEX=$(mktemp /tmp/mlversionXXX) LOCALINDEX="/opt/openslx/local_version" WWWTEMP="/srv/openslx/www-temp" DLFLAG=0 # if something was downloaded @@ -155,7 +155,7 @@ if [ ! -d "$SCRIPTBACKUPDIR" ]; then mkdir -p "$SCRIPTBACKUPDIR" || error "Kann Sicherungsverzeichnis für Skripte nicht erstellen!" fi -for FILE in openslx-update openslx-install; do +for FILE in $SLXSCRIPTS; do wget -O "$WWWTEMP/$FILE.$CRCEXTENSION" "$MIRROR/$MIRRORDIR/$FILE.$CRCEXTENSION" CRCVALNEW=$(cat "$WWWTEMP/$FILE.$CRCEXTENSION"|cut -f 1 -d " ") CRCVALOLD=$($CRCCOMMAND "$SCRIPTPATH/$FILE"|cut -f 1 -d " ") -- cgit v1.2.3-55-g7522 From 96aaa39bd2db526e252a359a6ac0c2fd012c0132 Mon Sep 17 00:00:00 2001 From: Christian Rößler Date: Tue, 6 Aug 2013 15:03:19 +0200 Subject: [systemd] conf for Scientific Linux --- remote/modules/systemd/systemd.conf.scientific | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 remote/modules/systemd/systemd.conf.scientific diff --git a/remote/modules/systemd/systemd.conf.scientific b/remote/modules/systemd/systemd.conf.scientific new file mode 100644 index 00000000..cbda26fc --- /dev/null +++ b/remote/modules/systemd/systemd.conf.scientific @@ -0,0 +1,16 @@ +REQUIRED_VERSION="systemd-206" +REQUIRED_URL="http://www.freedesktop.org/software/systemd/${REQUIRED_VERSION}.tar.xz" +# REQUIRED_URL="http://www.freedesktop.org/software/systemd/${REQUIRED_VERSION}.tar.bz2" +REQUIRED_INSTALLED_PACKAGES=" + intltool + gperf + pkgconfig + libcap-devel + libudev-devel + dbus-devel + libxslt + libblkid-devel + libacl-devel +" +REQUIRED_UTILLINUX_VERSION="2.23" +REQUIRED_UTILLINUX_URL="ftp://ftp.kernel.org/pub/linux/utils/util-linux/v${REQUIRED_UTILLINUX_VERSION}/util-linux-${REQUIRED_UTILLINUX_VERSION}.tar.xz" -- cgit v1.2.3-55-g7522 From 1c5c88c87077e83e7d8b52dea3f3824995fd951d Mon Sep 17 00:00:00 2001 From: Christian Rößler Date: Tue, 6 Aug 2013 15:03:53 +0200 Subject: [kdm] conf for Scientific Linux --- remote/modules/kdm/kdm.conf.scientific | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 remote/modules/kdm/kdm.conf.scientific diff --git a/remote/modules/kdm/kdm.conf.scientific b/remote/modules/kdm/kdm.conf.scientific new file mode 100644 index 00000000..d61cc8d6 --- /dev/null +++ b/remote/modules/kdm/kdm.conf.scientific @@ -0,0 +1,20 @@ +REQUIRED_INSTALLED_PACKAGES=" + kdm +" +REQUIRED_CONTENT_PACKAGES=" + kdm +" +REQUIRED_BINARIES="" +REQUIRED_DIRECTORIES+=" + /usr/$LIB64/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 + /usr/share/icons/default.kde4/index.theme +" -- cgit v1.2.3-55-g7522 From 847956b9c51a00653bdfaa2b9a591bfe586cfaf6 Mon Sep 17 00:00:00 2001 From: Christian Rößler Date: Tue, 6 Aug 2013 15:04:32 +0200 Subject: [german] conf for Scientific Linux --- remote/modules/german/german.conf.scientific | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 remote/modules/german/german.conf.scientific diff --git a/remote/modules/german/german.conf.scientific b/remote/modules/german/german.conf.scientific new file mode 100644 index 00000000..88ac0d27 --- /dev/null +++ b/remote/modules/german/german.conf.scientific @@ -0,0 +1,8 @@ +REQUIRED_INSTALLED_PACKAGES=" + libX11-data + glibc-common +" +REQUIRED_CONTENT_PACKAGES=" + libX11-data" +REQUIRED_BINARIES="" +REQUIRED_FILES="" -- cgit v1.2.3-55-g7522 From de076c7eb22a58860345749a8a17b063649ba589 Mon Sep 17 00:00:00 2001 From: Christian Rößler Date: Tue, 6 Aug 2013 15:05:58 +0200 Subject: [systemd] .build: Experimental: Special cases fir Scientific Linux --- remote/modules/systemd/systemd.build | 30 +++++++++++++++++++++++++----- 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/remote/modules/systemd/systemd.build b/remote/modules/systemd/systemd.build index e481f74e..710c4ea6 100644 --- a/remote/modules/systemd/systemd.build +++ b/remote/modules/systemd/systemd.build @@ -3,6 +3,10 @@ fetch_source () { download_untar "$REQUIRED_URL" "src/" download_untar "$REQUIRED_LIBKMOD_URL" "src/" + + # Another nice hack for Scientific Linux - experimental. + [ "$SYS_DISTRIBUTION" == "scientific" ] && download_untar "$REQUIRED_UTILLINUX_URL" "src/" + # Patch PATH environment sed -s -i -r 's#"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin(:/sbin:/bin)?"#& ":/opt/openslx/usr/sbin:/opt/openslx/usr/bin:/opt/openslx/sbin:/opt/openslx/bin"#g' src/systemd-*/src/core/main.c sed -s -i -r 's#"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"#& ":/opt/openslx/usr/sbin:/opt/openslx/usr/bin:/opt/openslx/sbin:/opt/openslx/bin"#g' src/systemd-*/src/nspawn/nspawn.c @@ -17,19 +21,35 @@ build () { make install || perror "kmod make install failed." cd - &> /dev/null - #build systemd - pinfo "Building systemd" - cd "${MODULE_DIR}/src/$REQUIRED_VERSION" - - # patching configure for Scientific Linux - cave - ugly hack! + # Scientific Linux specials if [ "$SYS_DISTRIBUTION" == "scientific" ]; then + # Utillinux stuff + penfo "Building util-linux" + cd "${MODULE_DIR}/src/util-linux-$REQUIRED_UTILLINUX_VERSION" + ./configure --prefix=${MODULE_DIR}/build --exec-prefix=${MODULE_DIR}/build --disable-libuuid --disable-libmount \ + --disable-mount --disable-losetup --disable-cytune --disable-fsck --disable-partx --disable-uuidd \ + --disable-mountpoint --disable-fallocate --disable-unshare --disable-nsenter --disable-setpriv \ + --disable-eject --disable-agetty --disable-cramfs --disable-bfs --disable-fdformat --disable-hwclock \ + --disable-wdctl --disable-switch_root --disable-pivot_root --disable-kill --disable-utmpdump --disable-raw \ + --disable-rename --disable-login --disable-sulogin --disable-su --disable-runuser --disable-ul --disable-more \ + --disable-pg --disable-schedutils --disable-wall --disable-bash-completion \ + || perror "./configure util-linux failed." + make || perror "util-linux make failed." + make install || perror "util-linux make install failed." + + # patching configure for Scientific Linux - cave - ugly hack! pinfo "Scientific Linux detected; patching systemd/configure..." + cd "${MODULE_DIR}/src/$REQUIRED_VERSION" sed 's/dbus-1 >= 1.3.2/dbus-1 >= 1.2.24/g' configure > configure.patched mv configure configure.orig mv configure.patched configure chmod +x configure fi + + #build systemd + pinfo "Building systemd" + cd "${MODULE_DIR}/src/$REQUIRED_VERSION" pinfo "calling configure" ./configure --disable-manpages --enable-split-usr --sysconfdir="/etc" --enable-gtk-doc-html=no --disable-nls --disable-microhttpd --disable-bootchart --disable-quotacheck --disable-hostnamed --disable-timedated --disable-localed --disable-coredump --disable-keymap --without-python --enable-blkid --enable-acl --enable-pam|| perror "configure failed." pinfo "calling make" -- cgit v1.2.3-55-g7522 From e40ae9d127bcecd32046eecd775d343ace882a14 Mon Sep 17 00:00:00 2001 From: Christian Rößler Date: Tue, 6 Aug 2013 15:35:39 +0200 Subject: [systemd] .build: Experimental: Special cases for Scientific Linux: systemd configure options --- remote/modules/systemd/systemd.build | 40 ++++++++++++++++++++++++++---------- 1 file changed, 29 insertions(+), 11 deletions(-) diff --git a/remote/modules/systemd/systemd.build b/remote/modules/systemd/systemd.build index 710c4ea6..a5f9ef3b 100644 --- a/remote/modules/systemd/systemd.build +++ b/remote/modules/systemd/systemd.build @@ -36,6 +36,7 @@ build () { || perror "./configure util-linux failed." make || perror "util-linux make failed." make install || perror "util-linux make install failed." + cd - &> /dev/null # patching configure for Scientific Linux - cave - ugly hack! pinfo "Scientific Linux detected; patching systemd/configure..." @@ -44,18 +45,35 @@ build () { mv configure configure.orig mv configure.patched configure chmod +x configure - fi - + cd - &> /dev/null - #build systemd - pinfo "Building systemd" - cd "${MODULE_DIR}/src/$REQUIRED_VERSION" - pinfo "calling configure" - ./configure --disable-manpages --enable-split-usr --sysconfdir="/etc" --enable-gtk-doc-html=no --disable-nls --disable-microhttpd --disable-bootchart --disable-quotacheck --disable-hostnamed --disable-timedated --disable-localed --disable-coredump --disable-keymap --without-python --enable-blkid --enable-acl --enable-pam|| perror "configure failed." - pinfo "calling make" - make || perror "make failed." - pinfo "calling make install" - DESTDIR="${MODULE_BUILD_DIR}" make install || perror "make install failed." + #build systemd for Scientific Linux + pinfo "Building systemd" + cd "${MODULE_DIR}/src/$REQUIRED_VERSION" + pinfo "calling configure" + ./configure --prefix=${MODULE_DIR}/build --exec-prefix=${MODULE_DIR}/build --datadir=${MODULE_DIR}/build \ + --disable-manpages --enable-split-usr --sysconfdir="/etc" --enable-gtk-doc-html=no --disable-nls \ + --disable-microhttpd --disable-bootchart --disable-quotacheck --disable-hostnamed --disable-timedated \ + --disable-localed --disable-coredump --disable-keymap --without-python --enable-blkid --enable-acl --enable-pam \ + || perror "configure failed." + pinfo "calling make" + make || perror "make failed." + pinfo "calling make install" + DESTDIR="${MODULE_BUILD_DIR}" make install || perror "make install failed." + else + #build systemd + pinfo "Building systemd" + cd "${MODULE_DIR}/src/$REQUIRED_VERSION" + pinfo "calling configure" + ./configure --disable-manpages --enable-split-usr --sysconfdir="/etc" --enable-gtk-doc-html=no --disable-nls \ + --disable-microhttpd --disable-bootchart --disable-quotacheck --disable-hostnamed --disable-timedated \ + --disable-localed --disable-coredump --disable-keymap --without-python --enable-blkid --enable-acl --enable-pam \ + || perror "configure failed." + pinfo "calling make" + make || perror "make failed." + pinfo "calling make install" + DESTDIR="${MODULE_BUILD_DIR}" make install || perror "make install failed." + fi cd - &> /dev/null # Delete unneeded services pinfo "Deleting unneeded services" -- cgit v1.2.3-55-g7522