summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--remote/modules/systemd/systemd.build86
-rw-r--r--remote/modules/systemd/systemd.build.scientific178
-rw-r--r--remote/modules/systemd/systemd.build.scientific.README11
-rw-r--r--remote/modules/systemd/systemd.conf.scientific34
4 files changed, 214 insertions, 95 deletions
diff --git a/remote/modules/systemd/systemd.build b/remote/modules/systemd/systemd.build
index a5291677..3a5baf07 100644
--- a/remote/modules/systemd/systemd.build
+++ b/remote/modules/systemd/systemd.build
@@ -4,14 +4,6 @@ fetch_source () {
download_untar "$REQUIRED_URL" "src/"
download_untar "$REQUIRED_LIBKMOD_URL" "src/"
- # Another nice hack for Scientific Linux - experimental.
- if [ "$SYS_DISTRIBUTION" == "scientific" ]; then
- download_untar "$REQUIRED_UTILLINUX_URL" "src/" || perror "Cannot download util-linux!"
- download_untar "$REQUIRED_M4_URL" "src/" || perror "Cannot download m4 version $REQUIRED_AUTOMAKE_VERSION!"
- download_untar "$REQUIRED_AUTOCONF_URL" "src/" || perror "Cannot download autoconf version $REQUIRED_AUTOCONF_VERSION!"
- download_untar "$REQUIRED_AUTOMAKE_URL" "src/" || perror "Cannot download automake version $REQUIRED_AUTOMAKE_VERSION!"
- fi
-
# 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
@@ -26,84 +18,6 @@ build () {
make install || perror "kmod make install failed."
cd - &> /dev/null
- # Scientific Linux specials
- if [ "$SYS_DISTRIBUTION" == "scientific" ]; then
- pinfo "Scientific Linux detected ..." # Freude, schöner Götterfunke!
-
- # Some path mainpulations for followong utilities
- OLDPATH=$PATH
- export PATH="${MODULE_BUILD_DIR}/usr/local/bin/:$PATH" # autoconf etc. needs new m4 etc.
-
- # Utillinux stuff
- pinfo "Building util-linux"
- cd "${MODULE_DIR}/src/util-linux-$REQUIRED_UTILLINUX_VERSION"
- ./configure --disable-libuuid --disable-libmount --without-ncurses \
- --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."
- DESTDIR="${MODULE_BUILD_DIR}" make install || perror "util-linux make install failed."
- cd - &> /dev/null
-
- # Let's have some starting fun with m4, as we want systemd, which wants automake 1.13, which wants autoconf,
- # which wants m4 ...
- pinfo "Building m4 Version $REQUIRED_M4_VERSION."
- cd "${MODULE_DIR}/src/m4-$REQUIRED_M4_VERSION"
- ./configure || perror "./configure m4 failed."
- make || perror "m4 make failed."
- DESTDIR="${MODULE_BUILD_DIR}" make install || perror "m4 make install failed."
- cd - &> /dev/null
-
- # And have some more fun with autoconf, chain see above:
- pinfo "Building autoconf Version $REQUIRED_AUTOCONF_VERSION."
- cd "${MODULE_DIR}/src/autoconf-$REQUIRED_AUTOCONF_VERSION"
- ./configure || perror "./configure autoconf failed."
- make || perror "autoconf make failed."
- DESTDIR="${MODULE_BUILD_DIR}" make install || perror "autoconf make install failed."
- cd - &> /dev/null
-
- # Now let's have some fun with automake, as config.log/automake will whine later about SL's automake 1.11:
- # AUTOMAKE='${SHELL} [...] missing automake-1.13'. We use a newer automake than 1.11, if we are at it.
- # Link fun, as configure searches in /usr/local/bin, ignores PATH above, also 'share':
- ln -s "${MODULE_BUILD_DIR}/usr/local/bin/autom4te" /usr/local/bin/autom4te
- ln -s "${MODULE_BUILD_DIR}/usr/local/share/autoconf" /usr/local/share/autoconf
- # ... and manipulate perl library path, as else the libs will not be found by (system) perl:
- OLDPERL5LIB="$PERL5LIB"
- export PERL5LIB="${MODULE_BUILD_DIR}/usr/local/share/autoconf/:$PERL5LIB"
-
- pinfo "Building automake Version $REQUIRED_AUTOMAKE_VERSION."
- cd "${MODULE_DIR}/src/automake-$REQUIRED_AUTOMAKE_VERSION"
- ./configure || perror "./configure automake failed."
- make || perror "automake make failed."
- DESTDIR="${MODULE_BUILD_DIR}" make install || perror "automake 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
-
- # For later compiling systemd
- pinfo "-------------${MODULE_BUILD_DIR}--------------"
- CPPFLAGS="-I${MODULE_BUILD_DIR}/usr/include/"
- LDFLAGS="$LDFLAGS -L${MODULE_BUILD_DIR}/usr/lib/ -ldl"
- # LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${MODULE_BUILD_DIR}/usr/lib/"
- cd - &> /dev/null
-
- # ... and tidy our manipulations with path, perllib, links etc.
- export PERL5LIB="$OLDPERL5LIB"
- export PATH="$OLDPATH"
- unlink /usr/local/bin/autom4te
- unlink /usr/local/share/autoconf
- fi
-
#build systemd
pinfo "Building systemd"
cd "${MODULE_DIR}/src/$REQUIRED_VERSION"
diff --git a/remote/modules/systemd/systemd.build.scientific b/remote/modules/systemd/systemd.build.scientific
new file mode 100644
index 00000000..12170d81
--- /dev/null
+++ b/remote/modules/systemd/systemd.build.scientific
@@ -0,0 +1,178 @@
+#tool/distro specific functions for fetching, building and installing dependencies
+
+# Please read systemd.build.scientific.README before using this script!
+
+fetch_source () {
+ download_untar "$REQUIRED_URL" "src/"
+ download_untar "$REQUIRED_LIBKMOD_URL" "src/"
+
+ # Another nice hack for Scientific Linux - experimental.
+ if [ "$SYS_DISTRIBUTION" == "scientific" ]; then
+ download_untar "$REQUIRED_UTILLINUX_URL" "src/" || perror "Cannot download util-linux!"
+ download_untar "$REQUIRED_M4_URL" "src/" || perror "Cannot download m4 version $REQUIRED_AUTOMAKE_VERSION!"
+ download_untar "$REQUIRED_AUTOCONF_URL" "src/" || perror "Cannot download autoconf version $REQUIRED_AUTOCONF_VERSION!"
+ download_untar "$REQUIRED_AUTOMAKE_URL" "src/" || perror "Cannot download automake version $REQUIRED_AUTOMAKE_VERSION!"
+ download_untar "$REQUIRED_DBUS_URL" "src/" || perror "Cannot download dbus version $REQUIRED_DBUS_VERSION!"
+ fi
+
+ # 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
+}
+
+build () {
+
+ config_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 systemd failed."
+ }
+
+ #build libkmod
+ pinfo "Building libkmod"
+ cd "${MODULE_DIR}/src/$REQUIRED_LIBKMOD_VERSION"
+ ./configure || perror "./configure kmod failed."
+ make || perror "kmod make failed."
+ make install || perror "kmod make install failed."
+ cd - &> /dev/null
+
+ # Scientific Linux specials
+ if [ "$SYS_DISTRIBUTION" == "scientific" ]; then
+ pinfo "Scientific Linux detected ..." # Freude, schöner Götterfunke!
+
+ # Some path mainpulations for following utilities, save some envvars for later restituting
+ OLDPATH=$PATH
+ export PATH="${MODULE_BUILD_DIR}/sbin:${MODULE_BUILD_DIR}/usr/local/bin/:$PATH" # for stuff installed at BUILD_DIR.
+ OLDPKG_CONFIG_PATH="$PKG_CONFIG_PATH"
+ OLDCPPFLAGS="$CPPFLAGS"
+ OLDLDFLAGS="$LDFLAGS"
+
+ # Utillinux stuff
+ pinfo "Building util-linux"
+ cd "${MODULE_DIR}/src/$REQUIRED_UTILLINUX_VERSION"
+ ./configure --disable-libuuid --disable-libmount --without-ncurses \
+ --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."
+ DESTDIR="${MODULE_BUILD_DIR}" make install || perror "util-linux make install failed."
+ cd - &> /dev/null
+
+ # Let's have some starting fun with m4, as we want systemd, which wants automake 1.13, which wants autoconf,
+ # which wants m4 ...
+ pinfo "Building m4 Version $REQUIRED_M4_VERSION."
+ cd "${MODULE_DIR}/src/$REQUIRED_M4_VERSION"
+ ./configure || perror "./configure m4 failed."
+ make || perror "m4 make failed."
+ DESTDIR="${MODULE_BUILD_DIR}" make install || perror "m4 make install failed."
+ cd - &> /dev/null
+
+ # And have some more fun with autoconf, chain see above:
+ pinfo "Building autoconf Version $REQUIRED_AUTOCONF_VERSION."
+ cd "${MODULE_DIR}/src/$REQUIRED_AUTOCONF_VERSION"
+ ./configure || perror "./configure autoconf failed."
+ make || perror "autoconf make failed."
+ DESTDIR="${MODULE_BUILD_DIR}" make install || perror "autoconf make install failed."
+ cd - &> /dev/null
+
+ # Now let's have some fun with automake, as config.log/automake will whine later about SL's automake 1.11:
+ # AUTOMAKE='${SHELL} [...] missing automake-1.13'. We use a newer automake than 1.11, if we are at it.
+ # Link fun, as configure searches in /usr/local/bin, ignores PATH above, also 'share':
+ ln -s "${MODULE_BUILD_DIR}/usr/local/bin/autom4te" /usr/local/bin/autom4te
+ ln -s "${MODULE_BUILD_DIR}/usr/local/share/autoconf" /usr/local/share/autoconf
+ # ... and manipulate perl library path, as else the libs will not be found by (system) perl:
+ OLDPERL5LIB="$PERL5LIB"
+ export PERL5LIB="${MODULE_BUILD_DIR}/usr/local/share/autoconf/:$PERL5LIB"
+
+ pinfo "Building automake Version $REQUIRED_AUTOMAKE_VERSION."
+ cd "${MODULE_DIR}/src/$REQUIRED_AUTOMAKE_VERSION"
+ ./configure || perror "./configure automake failed."
+ make || perror "automake make failed."
+ DESTDIR="${MODULE_BUILD_DIR}" make install || perror "automake make install failed."
+ cd - &> /dev/null
+
+ # We are having so much compiling fun, why leave out dbus, then?
+ pinfo "Building dbus Version $REQUIRED_AUTOMAKE_VERSION."
+ cd "${MODULE_DIR}/src/$REQUIRED_DBUS_VERSION"
+ ./configure || perror "./configure dbus failed."
+ make || perror "dbus make failed."
+ DESTDIR="${MODULE_BUILD_DIR}" make install || perror "automake 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
+
+ # For compiling systemd later
+ export PKG_CONFIG_PATH="${MODULE_BUILD_DIR}/usr/lib/pkgconfig/:${MODULE_BUILD_DIR}/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH"
+ export CPPFLAGS="$CPPFLAGS -I${MODULE_BUILD_DIR}/usr/include/ -I${MODULE_BUILD_DIR}/usr/local/include/ -I${MODULE_BUILD_DIR}/usr/local/include/dbus-1.0 -I${MODULE_BUILD_DIR}/usr/local/lib/dbus-1.0/include/"
+ export LDFLAGS="$LDFLAGS -L${MODULE_BUILD_DIR}/usr/lib/ -L${MODULE_BUILD_DIR}/usr/local/lib/ -ldl"
+ ln -s ${MODULE_BUILD_DIR}/usr/local/include/dbus-1.0 /usr/local/include/dbus-1.0
+ ln -s ${MODULE_BUILD_DIR}/usr/local/lib/dbus-1.0 /usr/local/lib/dbus-1.0
+ cd - &> /dev/null
+
+ config_systemd
+
+ # ... and tidy our manipulations with path, perllib, links etc.
+ export PERL5LIB="$OLDPERL5LIB"
+ export PATH="$OLDPATH"
+ unlink /usr/local/bin/autom4te
+ unlink /usr/local/share/autoconf
+ unlink /usr/local/lib/dbus-1.0
+ unlink /usr/local/include/dbus-1.0
+ else
+ config_systemd # Non-Scientific-Linux branch
+ fi
+
+ pinfo "calling make"
+ make || perror "systemd make failed."
+ pinfo "calling make install"
+ DESTDIR="${MODULE_BUILD_DIR}" make install || perror "systemd make install failed."
+ cd - &> /dev/null
+
+
+ # Delete unneeded services
+ pinfo "Deleting unneeded services"
+ local SERVICE=
+ local OTHER=
+ for SERVICE in $REQUIRED_DISABLED_SERVICES; do
+ find "${MODULE_BUILD_DIR}" -name "$SERVICE" -exec rm -r {} \;
+ for OTHER in $(grep -l -r "$SERVICE" "$MODULE_BUILD_DIR/usr/lib/systemd/system"); do
+ sed -i -r "s#\s*$SERVICE\s*# #g" "$OTHER"
+ done
+ done
+}
+
+post_copy() {
+ # dont clear systemd log at startup
+ sed -i "s/TTYVTDisallocate=yes/TTYVTDisallocate=no/g" "${TARGET_BUILD_DIR}/usr/lib/systemd/system/getty@.service"
+
+ #old agetty version doesn't support --noclear option in getty service
+ if [ "x$(dpkg -s util-linux | grep Version: | cut -d' ' -f2)" == "x2.19.1-2ubuntu3" ];
+ then
+ sed -i.bak "s/ExecStart=-\/sbin\/agetty --noclear %I 38400 linux/ExecStart=-\/sbin\/agetty %I 38400 linux/g" "${TARGET_BUILD_DIR}/usr/lib/systemd/system/getty@.service"
+ fi
+
+ # add nfs to modules-load list
+ echo "nfs" > "${TARGET_BUILD_DIR}/etc/modules-load.d/nfs.conf"
+
+ # add pam_systemd.so to pam modules directory
+ if [ -e "${MODULE_BUILD_DIR}/usr/lib/security/pam_systemd.so" ]; then
+ cp "${MODULE_BUILD_DIR}/usr/lib/security/pam_systemd.so" "${TARGET_BUILD_DIR}/lib/security/"
+ else
+ pdebug "No such file: ${MODULE_BUILD_DIR}/usr/lib/security/pam_systemd.so"
+ fi
+}
+
diff --git a/remote/modules/systemd/systemd.build.scientific.README b/remote/modules/systemd/systemd.build.scientific.README
new file mode 100644
index 00000000..bad5a2d4
--- /dev/null
+++ b/remote/modules/systemd/systemd.build.scientific.README
@@ -0,0 +1,11 @@
+Building systemd under Scientific Linux 6.4
+
+Unfortunately this is not possible, as, at the end of a long chain
+of prerequisites (compiling autoconf, automake, m4, utillinux (blkid),
+dbus the last requisite cannot be met:
+udev-builtin-input_id.c:166: error: 'BTN_TRIGGER_HAPPY' undeclared.
+
+This 'BTN_TRIGGER_HAPPY' should be provided by kernel headers, but seems
+to be intruduced in the headers of kernel 2.6.34 (linux/input.h).
+
+Scientific Linux uses 2.6.32.
diff --git a/remote/modules/systemd/systemd.conf.scientific b/remote/modules/systemd/systemd.conf.scientific
index 71ab4267..54e62b96 100644
--- a/remote/modules/systemd/systemd.conf.scientific
+++ b/remote/modules/systemd/systemd.conf.scientific
@@ -1,5 +1,26 @@
-REQUIRED_VERSION="systemd-206"
+REQUIRED_VERSION="systemd-204"
REQUIRED_URL="http://www.freedesktop.org/software/systemd/${REQUIRED_VERSION}.tar.xz"
+
+REQUIRED_LIBKMOD_VERSION="kmod-12"
+REQUIRED_LIBKMOD_URL="http://www.kernel.org/pub/linux/utils/kernel/kmod/${REQUIRED_LIBKMOD_VERSION}.tar.gz"
+
+REQUIRED_UTILLINUX_VERSION="util-linux-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"
+
+REQUIRED_M4_VERSION="m4-1.4.16"
+REQUIRED_M4_URL="ftp://ftp.gnu.org/gnu/m4/${REQUIRED_M4_VERSION}.tar.xz"
+
+REQUIRED_AUTOCONF_VERSION="autoconf-2.69"
+REQUIRED_AUTOCONF_URL="ftp://ftp.gnu.org/gnu/autoconf/${REQUIRED_AUTOCONF_VERSION}.tar.xz"
+
+REQUIRED_AUTOMAKE_VERSION="automake-1.13"
+REQUIRED_AUTOMAKE_URL="ftp://ftp.gnu.org/gnu/automake/${REQUIRED_AUTOMAKE_VERSION}.tar.xz"
+
+REQUIRED_DBUS_VERSION="dbus-1.6.8"
+REQUIRED_DBUS_URL="http://dbus.freedesktop.org/releases/dbus/${REQUIRED_DBUS_VERSION}.tar.gz"
+
+
+
REQUIRED_INSTALLED_PACKAGES="
intltool
gperf
@@ -10,12 +31,7 @@ REQUIRED_INSTALLED_PACKAGES="
libxslt
libblkid-devel
libacl-devel
+ pam-devel
+ glib2-devel
+ expat-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"
-REQUIRED_M4_VERSION="1.4.16"
-REQUIRED_M4_URL="ftp://ftp.gnu.org/gnu/m4/m4-${REQUIRED_M4_VERSION}.tar.xz"
-REQUIRED_AUTOCONF_VERSION="2.69"
-REQUIRED_AUTOCONF_URL="ftp://ftp.gnu.org/gnu/autoconf/autoconf-${REQUIRED_AUTOCONF_VERSION}.tar.xz"
-REQUIRED_AUTOMAKE_VERSION="1.13"
-REQUIRED_AUTOMAKE_URL="ftp://ftp.gnu.org/gnu/automake/automake-${REQUIRED_AUTOMAKE_VERSION}.tar.xz"