summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Rößler2013-06-25 14:21:58 +0200
committerChristian Rößler2013-06-25 14:21:58 +0200
commita6b4ce21d53013af61d341bf91ebad032ecc33bb (patch)
tree6c3362cc5166e38b7620e53c9e6a3f64708efaba
parentBetter detection of pango-querymodules/pango-querymodules-64 in case of 64bit OS (diff)
parent[pam] Remove required files which cannot be found (diff)
downloadtm-scripts-a6b4ce21d53013af61d341bf91ebad032ecc33bb.tar.gz
tm-scripts-a6b4ce21d53013af61d341bf91ebad032ecc33bb.tar.xz
tm-scripts-a6b4ce21d53013af61d341bf91ebad032ecc33bb.zip
Merge branch 'master' of git.openslx.org:openslx-ng/tm-scripts
-rw-r--r--.gitignore1
-rw-r--r--helper/kernel.inc10
-rw-r--r--remote/modules/pam/pam.conf6
-rw-r--r--remote/post-patch/ck-connector/fake-ck-connector.c55
-rwxr-xr-xremote/rootfs/rootfs-stage31/data/init5
-rwxr-xr-xremote/setup_target21
l---------remote/targets/stage32/hwinfo1
7 files changed, 86 insertions, 13 deletions
diff --git a/.gitignore b/.gitignore
index 21bf516c..e03b82dd 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,6 @@
*~
*.swp
+*.so
server/boot
server/remote_builds
src
diff --git a/helper/kernel.inc b/helper/kernel.inc
index a5989b15..af2af38b 100644
--- a/helper/kernel.inc
+++ b/helper/kernel.inc
@@ -105,6 +105,7 @@ copy_kernel_modules() {
copy_firmware() {
[ -z "${REQUIRED_FIRMWARE}" ] && perror "REQUIRED_FIRMWARE is empty. Check your config file."
+ local HORST=$(pwd)
check_kernel_build_dir
#
# process firmware list
@@ -153,13 +154,16 @@ copy_firmware() {
# which have to be copied to /lib/firmware/${KERNEL_NEW_VERSION}
if [ -d "${TARGET_BUILD_DIR}/lib/firmware/${KERNEL_VERSION}" ]; then
mkdir -p "${TARGET_BUILD_DIR}/lib/firmware/${KERNEL_NEW_VERSION}/"
- mv "${TARGET_BUILD_DIR}/lib/firmware/${KERNEL_VERSION}/"* "${TARGET_BUILD_DIR}/lib/firmware/${KERNEL_NEW_VERSION}/"
- rmdir "${TARGET_BUILD_DIR}/lib/firmware/${KERNEL_VERSION}/" || perror "something went very wrong..."
+ #mv -f "${TARGET_BUILD_DIR}/lib/firmware/${KERNEL_VERSION}/"* "${TARGET_BUILD_DIR}/lib/firmware/${KERNEL_NEW_VERSION}/"
+ cd "${TARGET_BUILD_DIR}/lib/firmware/${KERNEL_VERSION}" || perror "old kernel but no old kernel"
+ tarcopy "$(ls)" "${TARGET_BUILD_DIR}/lib/firmware/${KERNEL_NEW_VERSION}/"
+ cd -
+ rm -r "${TARGET_BUILD_DIR}/lib/firmware/${KERNEL_VERSION}" || perror "something went very wrong..."
else
pdebug "No ${TARGET_BUILD_DIR}/lib/firmware/${KERNEL_VERSION} directory, skipping the merge."
fi
- cd - >/dev/null
+ cd "$HORST"
}
copy_kernel() {
diff --git a/remote/modules/pam/pam.conf b/remote/modules/pam/pam.conf
index e5bd35c6..a3399190 100644
--- a/remote/modules/pam/pam.conf
+++ b/remote/modules/pam/pam.conf
@@ -30,12 +30,6 @@ REQUIRED_BINARIES="
rpc.gssd
rpc.idmapd
sslconnect
- mount.crypt
- umount.crypt
- mount.crypt_LUKS
- umount.crypt_LUKS
- mount.crypto_LUKS
- umount.crypto_LUKS
ldapsearch
"
REQUIRED_LIBRARIES="
diff --git a/remote/post-patch/ck-connector/fake-ck-connector.c b/remote/post-patch/ck-connector/fake-ck-connector.c
new file mode 100644
index 00000000..42fa1546
--- /dev/null
+++ b/remote/post-patch/ck-connector/fake-ck-connector.c
@@ -0,0 +1,55 @@
+#include <dbus/dbus.h>
+#include <sys/types.h>
+
+struct _CkConnector;
+typedef struct _CkConnector CkConnector;
+
+
+struct _CkConnector
+{
+ int refcount;
+ char *cookie;
+ dbus_bool_t session_created;
+ DBusConnection *connection;
+};
+
+void ck_connector_unref (CkConnector *connector)
+{
+ return;
+}
+
+CkConnector * ck_connector_ref (CkConnector *connector)
+{
+ return connector;
+}
+
+CkConnector * ck_connector_new (void)
+{
+ return (CkConnector*)1;
+}
+
+dbus_bool_t ck_connector_open_session (CkConnector *connector, DBusError *error)
+{
+ return 1;
+}
+
+dbus_bool_t ck_connector_open_session_with_parameters (CkConnector *connector, DBusError *error, const char *first_parameter_name, ...)
+{
+ return 1;
+}
+
+dbus_bool_t ck_connector_open_session_for_user (CkConnector *connector, uid_t user, const char *display_device, const char *x11_display, DBusError *error)
+{
+ return 1;
+}
+
+const char * ck_connector_get_cookie (CkConnector *connector)
+{
+ return NULL;
+}
+
+dbus_bool_t ck_connector_close_session (CkConnector *connector, DBusError *error)
+{
+ return 1;
+}
+
diff --git a/remote/rootfs/rootfs-stage31/data/init b/remote/rootfs/rootfs-stage31/data/init
index 586b21df..3a1087df 100755
--- a/remote/rootfs/rootfs-stage31/data/init
+++ b/remote/rootfs/rootfs-stage31/data/init
@@ -107,11 +107,14 @@ mount -n --move /dev/shm/uniontmp /mnt/uniontmp || drop_shell "Problem moving un
[ $DEBUG -ge 2 ] && drop_shell "Requested Debug Shell: after aufs'ing."
# Download config if available
+(
+sleep 1
/mnt/opt/openslx/bin/activate-sysconfig /mnt
+) &
# create udev rule for nic we booted from
cat > "/mnt/etc/udev/rules.d/70-net-boot-nic-name.rules" <<HEREEND
-SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="$MAC", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="br0"
+SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="$MAC", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
HEREEND
# create ip config
diff --git a/remote/setup_target b/remote/setup_target
index da4b7701..1638f392 100755
--- a/remote/setup_target
+++ b/remote/setup_target
@@ -315,7 +315,6 @@ post_process_target() {
#move systemd files from /lib to /etc/lib
pinfo "move systemd files from /lib/systemd to /etc/systemd"
-
if [ -d "${TARGET_BUILD_DIR}/lib/systemd" ]; then
cd "${TARGET_BUILD_DIR}/lib"
tarcopy "systemd" "${TARGET_BUILD_DIR}/etc"
@@ -323,7 +322,22 @@ post_process_target() {
rm -r "${TARGET_BUILD_DIR}/lib/systemd"
fi
+ # replace ck connector with fake one
+ local CK_LIBS=$(find "$TARGET_BUILD_DIR" -name "libck-connector.so*")
+ if [ -n "$CK_LIBS" ]; then
+ pinfo "Replacing libck-connector with dummy"
+ local SRC="$ROOT_DIR/remote/post-patch/ck-connector/fake-ck-connector.c"
+ local BIN="$ROOT_DIR/remote/post-patch/ck-connector/libck-connector.so"
+ if [ ! -s "$BIN" ]; then
+ gcc -O3 -shared -o "$BIN" "-I/usr/include/dbus-1.0" "-I/usr/lib/$ARCH_TRIPLET/dbus-1.0/include" "$SRC" || perror "Compiling fake libck-connector.so failed. Make sure libdbus-1-dev is installed."
+ fi
+ for OCCURENCE in $CK_LIBS; do
+ cp "$BIN" "$OCCURENCE" || perror "Frickeling ck-connector to $OCCURENCE failed."
+ done
+ fi
+
# figure out all relevant ld-paths
+ pinfo "Running ldconfig"
local LDTEMP="$TARGET_BUILD_DIR/ldconf-temp"
grep -h '^\s*/' /etc/ld.so.conf /etc/ld.so.conf.d/* > "$LDTEMP"
# TODO: Echo other stuff to $LDTEMP (but figure out if first or last match wins)
@@ -351,13 +365,16 @@ clean_modules() {
fi
set -- $(ls ${TARGET_DIR} | grep -v kernel)
fi
- cd ${TARGET_DIR}
+ cd "$TARGET_DIR"
while (( "$#" )); do
clean_module $(readlink -f $1)
shift
done
cd - &> /dev/null
+
+ # libck-connector cleanup
+ rm -f "$TARGET_DIR/post-patch/ck-connector/libck-connector.so"
}
clean_module() {
diff --git a/remote/targets/stage32/hwinfo b/remote/targets/stage32/hwinfo
deleted file mode 120000
index 6007a018..00000000
--- a/remote/targets/stage32/hwinfo
+++ /dev/null
@@ -1 +0,0 @@
-../../modules/hwinfo \ No newline at end of file