summaryrefslogtreecommitdiffstats
path: root/remote
diff options
context:
space:
mode:
authorJonathan Bauer2013-08-06 15:37:16 +0200
committerJonathan Bauer2013-08-06 15:37:16 +0200
commit10f36c2caada79078924a28956043a926d009c82 (patch)
tree01b7a700fc1b8acd62338363b2a6e5488b390098 /remote
parent[clone_stage4] fix path to logging.inc (diff)
parent[systemd] .build: Experimental: Special cases for Scientific Linux: (diff)
downloadtm-scripts-10f36c2caada79078924a28956043a926d009c82.tar.gz
tm-scripts-10f36c2caada79078924a28956043a926d009c82.tar.xz
tm-scripts-10f36c2caada79078924a28956043a926d009c82.zip
Merge branch 'master' of git.openslx.org:openslx-ng/tm-scripts
Diffstat (limited to 'remote')
-rw-r--r--remote/modules/german/german.build1
-rw-r--r--remote/modules/german/german.conf.scientific8
-rw-r--r--remote/modules/kdm/kdm.conf.scientific20
-rw-r--r--remote/modules/systemd/systemd.build66
-rw-r--r--remote/modules/systemd/systemd.conf.scientific16
-rwxr-xr-xremote/setup_target5
6 files changed, 107 insertions, 9 deletions
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"
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=""
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
+"
diff --git a/remote/modules/systemd/systemd.build b/remote/modules/systemd/systemd.build
index 8052ca4e..a5f9ef3b 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,15 +21,59 @@ build () {
make install || perror "kmod make install failed."
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."
+ # 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."
+ cd - &> /dev/null
+
+ # 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
+ cd - &> /dev/null
+
+ #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"
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"
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"