summaryrefslogtreecommitdiffstats
path: root/remote/tools
diff options
context:
space:
mode:
authorJonathan Bauer2012-12-11 15:11:41 +0100
committerJonathan Bauer2012-12-11 15:11:41 +0100
commitd3bb9107163e622fe9f2702e1a6572746f149d36 (patch)
tree0763b6d740d7365808496055493577ebc4faad90 /remote/tools
parentREQUIRED_FILES can be path or filename, searching accordingly. Added base too... (diff)
downloadtm-scripts-d3bb9107163e622fe9f2702e1a6572746f149d36.tar.gz
tm-scripts-d3bb9107163e622fe9f2702e1a6572746f149d36.tar.xz
tm-scripts-d3bb9107163e622fe9f2702e1a6572746f149d36.zip
reworked setup-tools, generation of base dir structure of stage3.2 with tool named base
Diffstat (limited to 'remote/tools')
-rw-r--r--remote/tools/base/README3
-rw-r--r--remote/tools/base/base.build72
-rw-r--r--remote/tools/base/base.conf71
-rw-r--r--remote/tools/base/build.base34
-rw-r--r--remote/tools/busybox/busybox.build (renamed from remote/tools/busybox/build.busybox)6
-rw-r--r--remote/tools/busybox/busybox.conf6
-rw-r--r--remote/tools/dbus/build.dbus23
-rw-r--r--remote/tools/dbus/dbus.build47
-rw-r--r--remote/tools/dbus/dbus.conf22
-rw-r--r--remote/tools/plymouth/plymouth.build (renamed from remote/tools/plymouth/build.plymouth)4
-rw-r--r--remote/tools/plymouth/plymouth.conf19
-rw-r--r--remote/tools/systemd/build.systemd33
-rw-r--r--remote/tools/systemd/data/debug-shell.service33
-rw-r--r--remote/tools/systemd/systemd.build42
-rw-r--r--remote/tools/systemd/systemd.conf326
-rw-r--r--remote/tools/udev/build.udev24
-rw-r--r--remote/tools/udev/udev.build48
-rw-r--r--remote/tools/udev/udev.conf153
18 files changed, 409 insertions, 557 deletions
diff --git a/remote/tools/base/README b/remote/tools/base/README
index 44ce10a1..39d10af1 100644
--- a/remote/tools/base/README
+++ b/remote/tools/base/README
@@ -10,5 +10,6 @@ lib/i386-linux-gnu/libpam*
lib/i386-linux-gnu/libutil*
lib/i386-linux-gnu/security/*
-
Install libc6 package?
+
+Add debug-shell.service
diff --git a/remote/tools/base/base.build b/remote/tools/base/base.build
new file mode 100644
index 00000000..b694f13c
--- /dev/null
+++ b/remote/tools/base/base.build
@@ -0,0 +1,72 @@
+install_dependencies() {
+ :
+}
+
+fetch_source() {
+ :
+}
+
+build() {
+
+ BUILDDIR=$TOOL_DIR/$TOOL/build
+ [ ! -d $BUILDDIR ] && mkdir -p $BUILDDIR
+
+ FILELIST="list_binaries_and_files"
+ [ -e $FILELIST ] && rm $FILELIST
+
+ for BIN in $REQUIRED_BINARIES
+ do
+ echo $(which $BIN) >> $FILELIST
+ done
+
+ for LIB in $REQUIRED_LIBRARIES
+ do
+ for LIB_LOCATION in $(locate $LIB|grep ^/lib/)
+ do
+ echo $LIB_LOCATION >> $FILELIST
+ done
+ done
+
+ for FILE in $REQUIRED_DIRECTORIES
+ do
+ [ ! -f $FILE ] && echo $FILE >> $FILELIST
+ done
+ for FILE in $REQUIRED_FILES
+ do
+ [ ! -d $FILE ] && echo $FILE >> $FILELIST
+ done
+
+ # copy needed files from libc6
+ #for FILE in $(dpkg -L libc6|grep -v share/man)
+ #do
+ # [ ! -d $FILE ] && echo $FILE >> $FILELIST
+ #done
+
+ tar -cpv $(cat $FILELIST) | tar -xpv -C $BUILDDIR &>/dev/null
+}
+
+post_copy() {
+
+ # make basic directory structure
+ mkdir -p $INIT_DIR/{bin,dev,proc,lib,etc,mnt,sys,var/run,var/lock,var/log,run/lock,run/shm}
+
+ # copy devices from running system
+ cp -a /dev/{console,kmsg,mem,null,shm,tty,tty0,tty1,tty9,fb0,urandom,zero} \
+ $INIT_DIR/dev
+
+ # set /etc/environment to include /openslx/bin and /openslx/sbin
+ echo "PATH=\"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/openslx/sbin:/openslx/bin\"" \
+ > $INIT_DIR/etc/environment
+
+ # copy pam modules, TODO: better way to find arch-dependant interfix...
+ tar -cpv $(dirname $(locate pam_unix.so|grep ^/lib/)) | tar -xpv -C $INIT_DIR &>/dev/null
+
+ # link /etc/mtab, needed for systemd
+ ln -s /proc/self/mounts $INIT_DIR/etc/mtab
+
+ # quick fix for missing group in /etc/group
+ echo "lock:x:128:" >> $INIT_DIR/etc/group
+
+ # set root password
+ sed -i "s/root:.*/root:\$6\$QGcBjw6e\$sJvGXBfKuNd4Cx5\.aVxJT7PCq\/AWrP\/JLgvDHBGN164Rp2HRIENPQzieO\/2ctlQS7yRgWwaWTqJkZr7Uq37af1:15657:0:99999:7:::/g" $INIT_DIR/etc/shadow
+}
diff --git a/remote/tools/base/base.conf b/remote/tools/base/base.conf
index 061418f8..fb4aebc3 100644
--- a/remote/tools/base/base.conf
+++ b/remote/tools/base/base.conf
@@ -1,27 +1,44 @@
-REQUIRED_BINARIES="bash
-agetty
-cat
-false
-loadkeys
-setfont
-login
-sulogin
-mount
-umount
-rm
-ldd
-strace"
-REQUIRED_FILES="/etc/passwd
-/etc/shadow
-/etc/group
-/etc/hostname
-/etc/issue
-/etc/localtime
-/etc/mtab
-/etc/nsswitch.conf
-/etc/pam.*
-/etc/securetty
-/etc/security/*
-/etc/systemd/*
-/etc/default/locale
-/etc/fstab"
+REQUIRED_BINARIES=" bash
+ agetty
+ cat
+ false
+ loadkeys
+ setfont
+ login
+ sulogin
+ mount
+ umount
+ rm
+ ldd
+ strace"
+REQUIRED_LIBRARIES=" libcap
+ libcidn
+ libcom_err
+ libcrypt
+ libcrypto
+ libnsl
+ libnss_compat
+ libnss_dns
+ libnss_files
+ libnss_hesiod
+ libnss_nis
+ libnss_nisplus
+ libpam
+ libutil
+ libtinfo"
+REQUIRED_DIRECTORIES=" /etc/pam.d
+ /etc/security"
+REQUIRED_FILES=" /etc/passwd
+ /etc/shadow
+ /etc/group
+ /etc/hostname
+ /etc/environment
+ /etc/pam.conf
+ /etc/issue
+ /etc/localtime
+ /etc/login.defs
+ /etc/nsswitch.conf
+ /etc/securetty
+ /etc/default/locale
+ /etc/fstab
+ /etc/mtab"
diff --git a/remote/tools/base/build.base b/remote/tools/base/build.base
deleted file mode 100644
index b6324d47..00000000
--- a/remote/tools/base/build.base
+++ /dev/null
@@ -1,34 +0,0 @@
-install_dependencies() {
- :
-}
-
-fetch_source() {
- :
-}
-
-build() {
- if [ ! -e .built ]; then
- [ ! -d $TOOL_DIR/$TOOL/build ] && mkdir -p $TOOL_DIR/$TOOL/build
- FILELIST="filelist"
- for bin in $REQUIRED_BINARIES
- do
- echo $(which $bin) >> $FILELIST
- done
- for file in $REQUIRED_FILES
- do
- echo $file >> $FILELIST
- done
-
- touch .built
- tar -cpv $(cat $FILELIST) | tar -xpv -C $TOOL_DIR/$TOOL/build &>/dev/null
-
- # quick fix for /etc/mtab
- ln -s /proc/self/mounts $TOOL_DIR/$TOOL/build/etc/mtab
-
- # quick fix for missing group in /etc/group
- echo "lock:x:128:" >> $TOOL_DIR/$TOOL/build/etc/group && echo "FIXED GROUP"
-
- sed -i.bak "s/root:.*/root:\$6\$QGcBjw6e\$sJvGXBfKuNd4Cx5\.aVxJT7PCq\/AWrP\/JLgvDHBGN164Rp2HRIENPQzieO\/2ctlQS7yRgWwaWTqJkZr7Uq37af1:15657:0:99999:7:::/g" $TOOL_DIR/$TOOL/build/etc/shadow
-
- fi
-}
diff --git a/remote/tools/busybox/build.busybox b/remote/tools/busybox/busybox.build
index 3738de96..7f6fe850 100644
--- a/remote/tools/busybox/build.busybox
+++ b/remote/tools/busybox/busybox.build
@@ -2,7 +2,7 @@
install_dependencies()
{
- :
+ :
}
fetch_source()
@@ -25,3 +25,7 @@ build()
touch .built
fi
}
+
+post_copy() {
+ :
+}
diff --git a/remote/tools/busybox/busybox.conf b/remote/tools/busybox/busybox.conf
index 612541c4..bcfc4bf5 100644
--- a/remote/tools/busybox/busybox.conf
+++ b/remote/tools/busybox/busybox.conf
@@ -1,5 +1,7 @@
GIT=git://git.openslx.org/openslx/tools/busybox
DEPS=""
TARGET_DIR="openslx"
-REQUIRED_BINARIES="busybox"
-REQUIRED_FILES="setsid addgroup cp echo ip login mt rm sync adduser cpio egrep ipaddr ls mv rmdir tar ash date false iplink lsattr netstat run-parts touch dd fdflush iproute lsblk nice sed true cat delgroup fgrep iprule mkdir pidof setarch umount catv deluser getopt iptunnel mknod ping setserial uname chattr df grep kill mktemp pipe_progress sh usleep chgrp dmesg gunzip linux32 more printenv sleep vi chmod gzip mount ps linux64 stty watch chown dnsdomainname dumpkmap hostname ln mountpoint pwd su zcat [ [[ ar arping awk basename chrt chsum clear cmp crontab cut dc diff dirname dos2unix du eject env expr ether-wake fdformat find fold free fuser head hostid id install killall killall5 last less logname lsof lspci md5sum mesg microcom mkfifo nohup nslookup od passwd patch printf readlink realpath reset resize seq sha1sum sha256sum sha512sum sort strings tail tee telnet test tftp time top tr traceroute tty uniq unix2dos unzip uptime uudecode uuencode vlock wc wget which who whoami xargs yes pivot_root rtstat runlevel udhcpc insmod halt getty devmem fsck hdparm ifconfig ifdown ifup klogd loadkmap losetup lsmod makedevs mdev modprobe nameif rmmod route setconsole start-stop-daemon sulogin swapoff swapon switch_root sysctl syslogd vconfig watchdog loadfont rdate setlogcons chroot crond dnsd inetd dnbd3"
+REQUIRED_BINARIES=" busybox"
+REQUIRED_DIRECTORIES=" /$TARGET_DIR/bin
+ /$TARGET_DIR/sbin
+ /$TARGET_DIR/usr"
diff --git a/remote/tools/dbus/build.dbus b/remote/tools/dbus/build.dbus
deleted file mode 100644
index a2ad0f89..00000000
--- a/remote/tools/dbus/build.dbus
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/bash
-
-install_dependencies() {
- echo "No dependencies."
-}
-
-fetch_source() {
- echo "Extracting from running system..."
-}
-
-build() {
-
- COPYLIST="filestocopy"
-
- for FILE in $(dpkg -L dbus | grep -v share/doc | grep -v share/man)
- do
- [ ! -d $FILE ] && echo $FILE >> $COPYLIST
- done
-
- # prepare target dir
- [ ! -d $TOOL_DIR/$TOOL/build ] && mkdir -p $TOOL_DIR/$TOOL/build
- tar -cpv $(cat $COPYLIST) | tar -xpv -C $TOOL_DIR/$TOOL/build
-}
diff --git a/remote/tools/dbus/dbus.build b/remote/tools/dbus/dbus.build
new file mode 100644
index 00000000..cd4812cd
--- /dev/null
+++ b/remote/tools/dbus/dbus.build
@@ -0,0 +1,47 @@
+#!/bin/bash
+
+install_dependencies() {
+ echo "No dependencies."
+}
+
+fetch_source() {
+ echo "Extracting from running system..."
+}
+
+build() {
+
+ BUILDDIR=$TOOL_DIR/$TOOL/build
+
+ COPYLIST="list_dpkg_output"
+ [ -e $COPYLIST ] && rm $COPYLIST
+
+ for FILE in $(dpkg -L dbus | grep -v share/doc | grep -v share/man)
+ do
+ [ ! -d $FILE ] && echo $FILE >> $COPYLIST
+ done
+
+ # prepare target dir & copy there
+ [ ! -d $BUILDDIR ] && mkdir -p $BUILDDIR
+ tar -cpv $(cat $COPYLIST|sort -u) | tar -xpv -C $BUILDDIR
+
+ # fix path: everything in lib/systemd to usr/lib/systemd
+ cd $BUILDDIR
+
+ TARLIST="list_files_to_fix_prefix"
+ [ -f $TARLIST ] && rm $TARLIST
+
+ # find files and symlinks with wrong prefix
+ for FILE in $(find . -type f -o -type l|grep ^./lib/systemd)
+ do
+ echo $FILE >> $TARLIST
+ done
+ # copy found files to usr/*
+ [ ! -d $BUILDDIR/usr ] && mkdir -p $BUILDDIR/usr
+ tar -cpv $(cat $TARLIST|sort -u) | tar -xpv -C $BUILDDIR/usr
+ # delete original location
+ rm -rf ./lib/systemd
+ cd -
+}
+post_copy() {
+ :
+}
diff --git a/remote/tools/dbus/dbus.conf b/remote/tools/dbus/dbus.conf
index 1d3e2916..f18d675f 100644
--- a/remote/tools/dbus/dbus.conf
+++ b/remote/tools/dbus/dbus.conf
@@ -1,12 +1,10 @@
-REQUIRED_BINARIES="dbus-cleanup-sockets
-dbus-daemon
-dbus-uuidgen
-dbus-monitor
-dbus-send"
-REQUIRED_FILES="session.conf
-system.conf
-dbus
-dbus.conf
-dbus.service
-dbus.socket
-dbus-daemon-launch-helper"
+REQUIRED_BINARIES=" dbus-cleanup-sockets
+ dbus-daemon
+ dbus-uuidgen
+ dbus-monitor
+ dbus-send
+ dbus-daemon-launch-helper"
+REQUIRED_DIRECTORIES=" /etc/dbus-1
+ /usr/lib/systemd/system"
+REQUIRED_FILES=" /etc/default/dbus
+ /etc/init/dbus.conf"
diff --git a/remote/tools/plymouth/build.plymouth b/remote/tools/plymouth/plymouth.build
index 479d9aa5..9217be78 100644
--- a/remote/tools/plymouth/build.plymouth
+++ b/remote/tools/plymouth/plymouth.build
@@ -27,3 +27,7 @@ build() {
touch .built
fi
}
+
+post_copy() {
+ :
+}
diff --git a/remote/tools/plymouth/plymouth.conf b/remote/tools/plymouth/plymouth.conf
index 450466ab..91252be6 100644
--- a/remote/tools/plymouth/plymouth.conf
+++ b/remote/tools/plymouth/plymouth.conf
@@ -1,5 +1,18 @@
VERSION=plymouth-0.8.6.1
URL=http://www.freedesktop.org/software/plymouth/releases/${VERSION}.tar.bz2
-DEPS="libpng-dev libpango1.0-dev libcairo-dev libgtk2.0-dev libdrm-dev"
-REQUIRED_BINARIES="plymouth plymouthd"
-REQUIRED_FILES=""
+DEPS=" libpng-dev
+ libpango1.0-dev
+ libcairo-dev
+ libgtk2.0-dev
+ libdrm-dev"
+REQUIRED_BINARIES=" plymouth
+ plymouthd"
+REQUIRED_DIRECTORIES=" /lib/systemd/system
+ /usr/local/bin
+ /usr/local/etc
+ /usr/local/include
+ /usr/local/lib/plymouth
+ /usr/local/libexec
+ /usr/local/sbin
+ /usr/local/share/plymouth
+ /usr/local/var"
diff --git a/remote/tools/systemd/build.systemd b/remote/tools/systemd/build.systemd
deleted file mode 100644
index af57f8da..00000000
--- a/remote/tools/systemd/build.systemd
+++ /dev/null
@@ -1,33 +0,0 @@
-#tool/distro specific functions for fetching, building and installing dependencies
-
-fetch_source ()
-{
- if [ ! -e .fetched_source ]; then
- [ ! -d src ] && mkdir src
- wget $URL
- tar xJf $VERSION.tar.xz -C src/
- rm $VERSION.tar.xz
- touch .fetched_source
- fi
-}
-
-install_dependencies()
-{
- # quick fix for missing libkmod repo...
- add-apt-repository --force-yes ppa:pitti/systemd
- apt-get update --force-yes
- apt-get install --force-yes $DEPS
-}
-
-build ()
-{
- if [ ! -e .built ]; then
- cd src/$VERSION
- ./configure --disable-manpages
- make
- [ ! -d $TOOL_DIR/$TOOL/build ] && mkdir -p $TOOL_DIR/$TOOL/build
- DESTDIR=$TOOL_DIR/$TOOL/build make install
- cd -
- touch .built
- fi
-}
diff --git a/remote/tools/systemd/data/debug-shell.service b/remote/tools/systemd/data/debug-shell.service
new file mode 100644
index 00000000..2aa98d3c
--- /dev/null
+++ b/remote/tools/systemd/data/debug-shell.service
@@ -0,0 +1,33 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=Early root shell on tty9 FOR DEBUGGING ONLY
+Documentation=man:sushell(8)
+DefaultDependencies=no
+IgnoreOnIsolate=yes
+
+[Service]
+Environment=TERM=linux
+ExecStart=@sushell@
+Restart=always
+RestartSec=0
+StandardInput=tty
+TTYPath=/dev/tty9
+TTYReset=yes
+TTYVHangup=yes
+KillMode=process
+IgnoreSIGPIPE=no
+# bash ignores SIGTERM
+KillSignal=SIGHUP
+
+# Unset locale for the console getty since the console has problems
+# displaying some internationalized messages.
+Environment=LANG= LANGUAGE= LC_CTYPE= LC_NUMERIC= LC_TIME= LC_COLLATE= LC_MONETARY= LC_MESSAGES= LC_PAPER= LC_NAME= LC_ADDRESS= LC_TELEPHONE= LC_MEASUREMENT= LC_IDENTIFICATION=
+
+[Install]
+WantedBy=sysinit.target
diff --git a/remote/tools/systemd/systemd.build b/remote/tools/systemd/systemd.build
new file mode 100644
index 00000000..5b361472
--- /dev/null
+++ b/remote/tools/systemd/systemd.build
@@ -0,0 +1,42 @@
+#tool/distro specific functions for fetching, building and installing dependencies
+
+fetch_source () {
+ if [ ! -e .fetched_source ]; then
+ [ ! -d src ] && mkdir src
+ wget $URL
+ tar xJf $VERSION.tar.xz -C src/
+ rm $VERSION.tar.xz
+ touch .fetched_source
+ fi
+}
+
+install_dependencies() {
+ # quick fix for missing libkmod repo...
+ add-apt-repository --yes ppa:pitti/systemd
+ apt-get update --force-yes
+ apt-get install --force-yes $DEPS
+}
+
+build () {
+ if [ ! -e .built ]; then
+ cd src/$VERSION
+ ./configure --disable-manpages
+ make
+ [ ! -d $TOOL_DIR/$TOOL/build ] && mkdir -p $TOOL_DIR/$TOOL/build
+ DESTDIR=$TOOL_DIR/$TOOL/build make install
+ cd -
+ touch .built
+ fi
+}
+
+post_copy() {
+ #debug shell on tty9
+ cp $TOOL_DIR/$TOOL/data/debug-shell.service $INIT_DIR/usr/lib/systemd/system
+ ln -s ../debug-shell.service $INIT_DIR/usr/lib/systemd/system/sysinit.target.wants
+
+ # dont clear systemd log at startup
+ sed -i.bak "s/ExecStart=-\/sbin\/agetty %I 38400/ExecStart=-\/sbin\/agetty --noclear %I 38400/g" \
+ $INIT_DIR/usr/lib/systemd/system/getty@.service
+ sed -i.bak "s/TTYVTDisallocate=yes/TTYVTDisallocate=no/g" \
+ $INIT_DIR/usr/lib/systemd/system/getty@.service
+}
diff --git a/remote/tools/systemd/systemd.conf b/remote/tools/systemd/systemd.conf
index 0bcd18eb..e4effae2 100644
--- a/remote/tools/systemd/systemd.conf
+++ b/remote/tools/systemd/systemd.conf
@@ -1,268 +1,62 @@
VERSION=systemd-43
URL=http://www.freedesktop.org/software/systemd/${VERSION}.tar.xz
-DEPS="intltool gperf libcap-dev dbus libudev-dev pkg-config libdbus-1-dev libkmod-dev"
-REQUIRED_BINARIES="systemd
-systemctl
-systemd-ask-password
-systemd-analyze
-systemd-cat
-systemd-cgls
-systemd-cgtop
-systemd-journalctl
-systemd-loginctl
-systemd-machine-id-setup
-systemd-notify
-systemd-nspawn
-systemd-stdio-bridge
-systemd-tmpfiles
-systemd-tty-ask-password-agent
-systemd
-systemd-ac-power
-systemd-binfmt
-systemd-cgroups-agent
-systemd-coredump
-systemd-detect-virt
-systemd-fsck
-systemd-hostnamed
-systemd-initctl
-systemd-journald
-systemd-localed
-systemd-logind
-systemd-modules-load
-systemd-multi-seat-x
-systemd-quotacheck
-systemd-random-seed
-systemd-readahead-collect
-systemd-readahead-replay
-systemd-remount-api-vfs
-systemd-reply-password
-systemd-shutdown
-systemd-shutdownd
-systemd-sysctl
-systemd-timedated
-systemd-timestamp
-systemd-uaccess
-systemd-update-utmp
-systemd-user-sessions
-systemd-vconsole-setup"
-REQUIRED_FILES="org.freedesktop.hostname1.conf
-org.freedesktop.locale1.conf
-org.freedesktop.login1.conf
-org.freedesktop.systemd1.conf
-org.freedesktop.timedate1.conf
-70-uaccess.rules
-71-seat.rules
-73-seat-late.rules
-99-systemd.rules
-system.conf
-systemd-journald.conf
-systemd-bash-completion.sh
-system.conf
-systemd-journald.conf
-systemd-logind.conf
-user.conf
-getty@tty1.service
-remote-fs.target
-user
-sd-daemon.h
-sd-id128.h
-sd-journal.h
-sd-login.h
-sd-messages.h
-coredump.conf
-autovt@.service
-basic.target
-bluetooth.target
-console-shell.service
-ctrl-alt-del.target
-dbus-org.freedesktop.hostname1.service
-dbus-org.freedesktop.locale1.service
-dbus-org.freedesktop.login1.service
-dbus-org.freedesktop.timedate1.service
-default.target
-dev-hugepages.mount
-dev-mqueue.mount
-emergency.service
-emergency.target
-final.target
-fsck-root.service
-fsck@.service
-getty@.service
-getty.target
-graphical.target
-halt.service
-halt.target
-http-daemon.target
-kexec.service
-kexec.target
-local-fs-pre.target
-local-fs.target
-mail-transfer-agent.target
-media.mount
-multi-user.target
-network.target
-nss-lookup.target
-poweroff.service
-poweroff.target
-printer.target
-proc-sys-fs-binfmt_misc.automount
-proc-sys-fs-binfmt_misc.mount
-quotacheck.service
-quotaon.service
-reboot.service
-reboot.target
-remote-fs-pre.target
-remote-fs.target
-remount-rootfs.service
-rescue.service
-rescue.target
-rpcbind.target
-runlevel0.target
-runlevel1.target
-runlevel2.target
-runlevel3.target
-runlevel4.target
-runlevel5.target
-runlevel6.target
-serial-getty@.service
-shutdown.target
-sigpwr.target
-smartcard.target
-sockets.target
-sound.target
-swap.target
-sys-fs-fuse-connections.mount
-sysinit.target
-sys-kernel-config.mount
-sys-kernel-debug.mount
-sys-kernel-security.mount
-syslog.socket
-syslog.target
-systemd-ask-password-console.path
-systemd-ask-password-console.service
-systemd-ask-password-wall.path
-systemd-ask-password-wall.service
-systemd-binfmt.service
-systemd-hostnamed.service
-systemd-initctl.service
-systemd-initctl.socket
-systemd-journald.service
-systemd-journald.socket
-systemd-localed.service
-systemd-logind.service
-systemd-modules-load.service
-systemd-random-seed-load.service
-systemd-random-seed-save.service
-systemd-readahead-collect.service
-systemd-readahead-done.service
-systemd-readahead-done.timer
-systemd-readahead-replay.service
-systemd-remount-api-vfs.service
-systemd-shutdownd.service
-systemd-shutdownd.socket
-systemd-sysctl.service
-systemd-timedated.service
-systemd-tmpfiles-clean.service
-systemd-tmpfiles-clean.timer
-systemd-tmpfiles-setup.service
-systemd-update-utmp-runlevel.service
-systemd-update-utmp-shutdown.service
-systemd-user-sessions.service
-systemd-vconsole-setup.service
-time-sync.target
-umount.target
-user@.service
-var-lock.mount
-var-run.mount
-systemd-tmpfiles-clean.timer
-fsck-root.service
-media.mount
-remount-rootfs.service
-systemd-remount-api-vfs.service
-var-lock.mount
-var-run.mount
-getty.target
-systemd-ask-password-wall.path
-systemd-logind.service
-systemd-user-sessions.service
-systemd-update-utmp-runlevel.service
-systemd-update-utmp-runlevel.service
-systemd-update-utmp-runlevel.service
-systemd-update-utmp-runlevel.service
-systemd-update-utmp-runlevel.service
-systemd-random-seed-save.service
-systemd-update-utmp-shutdown.service
-systemd-initctl.socket
-systemd-journald.socket
-systemd-shutdownd.socket
-dev-hugepages.mount
-dev-mqueue.mount
-proc-sys-fs-binfmt_misc.automount
-sys-fs-fuse-connections.mount
-sys-kernel-config.mount
-sys-kernel-debug.mount
-sys-kernel-security.mount
-systemd-ask-password-console.path
-systemd-binfmt.service
-systemd-journald.service
-systemd-modules-load.service
-systemd-random-seed-load.service
-systemd-sysctl.service
-systemd-tmpfiles-setup.service
-systemd-vconsole-setup.service
-bluetooth.target
-default.target
-exit.service
-exit.target
-printer.target
-shutdown.target
-sockets.target
-sound.target
-legacy.conf
-systemd.conf
-tmp.conf
-x11.conf
-org.freedesktop.hostname1.xml
-org.freedesktop.locale1.xml
-org.freedesktop.systemd1.Automount.xml
-org.freedesktop.systemd1.Device.xml
-org.freedesktop.systemd1.Job.xml
-org.freedesktop.systemd1.Manager.xml
-org.freedesktop.systemd1.Mount.xml
-org.freedesktop.systemd1.Path.xml
-org.freedesktop.systemd1.Service.xml
-org.freedesktop.systemd1.Snapshot.xml
-org.freedesktop.systemd1.Socket.xml
-org.freedesktop.systemd1.Swap.xml
-org.freedesktop.systemd1.Target.xml
-org.freedesktop.systemd1.Timer.xml
-org.freedesktop.systemd1.Unit.xml
-org.freedesktop.timedate1.xml
-org.freedesktop.systemd1.service
-org.freedesktop.hostname1.service
-org.freedesktop.locale1.service
-org.freedesktop.login1.service
-org.freedesktop.systemd1.service
-org.freedesktop.timedate1.service
-org.freedesktop.hostname1.policy
-org.freedesktop.locale1.policy
-org.freedesktop.login1.policy
-org.freedesktop.systemd1.policy
-org.freedesktop.timedate1.policy
-kbd-model-map
-libsystemd-daemon.la
-libsystemd-daemon.so
-libsystemd-daemon.so.0
-libsystemd-daemon.so.0.0.1
-libsystemd-id128.la
-libsystemd-id128.so
-libsystemd-id128.so.0
-libsystemd-id128.so.0.0.2
-libsystemd-journal.la
-libsystemd-journal.so
-libsystemd-journal.so.0
-libsystemd-journal.so.0.0.2
-libsystemd-login.la
-libsystemd-login.so
-libsystemd-login.so.0
-libsystemd-login.so.0.2.0"
+DEPS=" intltool
+ gperf
+ dbus
+ pkg-config
+ libcap-dev
+ libudev-dev
+ libdbus-1-dev
+ libkmod-dev"
+REQUIRED_BINARIES=" systemd
+ systemctl
+ systemd-ask-password
+ systemd-analyze
+ systemd-cat
+ systemd-cgls
+ systemd-cgtop
+ systemd-journalctl
+ systemd-loginctl
+ systemd-machine-id-setup
+ systemd-notify
+ systemd-nspawn
+ systemd-stdio-bridge
+ systemd-tmpfiles
+ systemd-tty-ask-password-agent
+ systemd
+ systemd-ac-power
+ systemd-binfmt
+ systemd-cgroups-agent
+ systemd-coredump
+ systemd-detect-virt
+ systemd-fsck
+ systemd-hostnamed
+ systemd-initctl
+ systemd-journald
+ systemd-localed
+ systemd-logind
+ systemd-modules-load
+ systemd-multi-seat-x
+ systemd-quotacheck
+ systemd-random-seed
+ systemd-readahead-collect
+ systemd-readahead-replay
+ systemd-remount-api-vfs
+ systemd-reply-password
+ systemd-shutdown
+ systemd-shutdownd
+ systemd-sysctl
+ systemd-timedated
+ systemd-timestamp
+ systemd-uaccess
+ systemd-update-utmp
+ systemd-user-sessions
+ systemd-vconsole-setup"
+REQUIRED_DIRECTORIES=" /usr/lib
+ /usr/etc
+ /usr/include
+ /usr/share/dbus-1
+ /usr/share/polkit-1
+ /etc/dbus-1/system.d
+ /lib/udev/rules.d"
+REQUIRED_FILES=" /usr/share/systemd/kbd-model-map"
diff --git a/remote/tools/udev/build.udev b/remote/tools/udev/build.udev
deleted file mode 100644
index 5ae37220..00000000
--- a/remote/tools/udev/build.udev
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/bin/bash
-
-install_dependencies() {
- echo "No dependencies."
-}
-
-fetch_source() {
- echo "Extracting from running system..."
-}
-
-build() {
-
- COPYLIST="filestocopy"
-
- for FILE in $(dpkg -L udev | grep -v share/doc | grep -v share/man)
- do
- [ ! -d $FILE ] && echo $FILE >> $COPYLIST
- done
-
- # prepare target dir
- [ ! -d $TOOL_DIR/$TOOL/build ] && mkdir -p $TOOL_DIR/$TOOL/build
- tar -cpv $(cat $COPYLIST) | tar -xpv -C $TOOL_DIR/$TOOL/build
-}
-
diff --git a/remote/tools/udev/udev.build b/remote/tools/udev/udev.build
new file mode 100644
index 00000000..c949d748
--- /dev/null
+++ b/remote/tools/udev/udev.build
@@ -0,0 +1,48 @@
+#!/bin/bash
+
+install_dependencies() {
+ echo "No dependencies."
+}
+
+fetch_source() {
+ echo "Extracting from running system..."
+}
+
+build() {
+
+ BUILDDIR=$TOOL_DIR/$TOOL/build
+
+ COPYLIST="list_dpkg_output"
+ [ -e $COPYLIST ] && rm $COPYLIST
+
+ for FILE in $(dpkg -L udev | grep -v share/doc | grep -v share/man)
+ do
+ [ ! -d $FILE ] && echo $FILE >> $COPYLIST
+ done
+
+ # prepare target dir & copy there
+ [ ! -d $BUILDDIR ] && mkdir -p $BUILDDIR
+ tar -cpv $(cat $COPYLIST|sort -u) | tar -xpv -C $BUILDDIR
+
+ # fix path: everything in lib/systemd to usr/lib/systemd
+ cd $BUILDDIR
+
+ TARLIST="list_files_to_fix_prefix"
+ [ -f $TARLIST ] && rm $TARLIST
+
+ # find files and symlinks with wrong prefix
+ for FILE in $(find . -type f -o -type l|grep ^./lib/systemd)
+ do
+ echo $FILE >> $TARLIST
+ done
+ # copy found files to usr/*
+ [ ! -d $BUILDDIR/usr ] && mkdir -p $BUILDDIR/usr
+ tar -cpv $(cat $TARLIST|sort -u) | tar -xpv -C $BUILDDIR/usr
+ # delete original location
+ rm -rf ./lib/systemd
+ cd -
+}
+
+post_copy() {
+ :
+}
diff --git a/remote/tools/udev/udev.conf b/remote/tools/udev/udev.conf
index 8562fef6..2f8b4286 100644
--- a/remote/tools/udev/udev.conf
+++ b/remote/tools/udev/udev.conf
@@ -1,131 +1,22 @@
-REQUIRED_BINARIES="findkeyboards
-accelerometer
-scsi_id
-v4l_id
-firmware
-udev-acl
-keymap
-ata_id
-mtd_probe
-write_cd_rules
-write_net_rules
-pci-db
-cdrom_id
-usb-db
-collect
-udev
-udevadm
-udevd"
-REQUIRED_FILES="udev.conf
-udevmonitor.conf
-udev-finish.conf
-udev-fallback-graphics.conf
-udevtrigger.conf
-udev.py
-udev
-hewlett-packard-compaq_elitebook
-medion-fid2060
-genius-slimstar-320
-asus
-fujitsu-amilo_pa_2548
-module-asus-w3j
-hewlett-packard
-acer
-hewlett-packard-pavilion
-lenovo-thinkpad_x200_tablet
-module-lenovo
-logitech-wave
-acer-aspire_5920g
-fujitsu-esprimo_mobile_v6
-lenovo-thinkpad-usb-keyboard-trackpoint
-hewlett-packard-2510p_2530p
-module-ibm
-acer-aspire_5720
-compaq-e_evo
-dell-latitude-xt2
-acer-aspire_8930
-dell
-ibm-thinkpad-usb-keyboard-trackpoint
-samsung-other
-zepto-znote
-fujitsu-amilo_li_2732
-samsung-sq1us
-maxdata-pro_7000
-lenovo-thinkpad_x6_tablet
-acer-travelmate_c300
-samsung-sx20s
-medionnb-a555
-everex-xt5000
-logitech-wave-pro-cordless
-hewlett-packard-tx2
-toshiba-satellite_m30x
-fujitsu-amilo_si_1520
-lg-x110
-fujitsu-amilo_pro_v3205
-inventec-symphony_6.0_7.0
-onkyo
-lenovo-3000
-module-sony
-module-sony-vgn
-hewlett-packard-tablet
-module-sony-old
-dell-xps
-hp-other
-common-volume-keys
-dell-touchpad
-samsung-other
-samsung-90x3a
-toshiba-satellite_a110
-olpc-xo
-fujitsu-amilo_pro_edition_v3505
-acer-aspire_6920
-toshiba-satellite_a100
-logitech-wave-cordless
-lenovo-ideapad
-oqo-model2
-micro-star
-fujitsu-esprimo_mobile_v5
-hewlett-packard-presario-2100
-60-persistent-storage.rules
-75-cd-aliases-generator.rules
-75-probe_mtd.rules
-95-keymap.rules
-60-persistent-storage-tape.rules
-75-tty-description.rules
-60-cdrom_id.rules
-60-persistent-v4l.rules
-78-graphics-card.rules
-75-net-description.rules
-61-accelerometer.rules
-50-udev-default.rules
-40-ia64.rules
-60-persistent-serial.rules
-60-persistent-input.rules
-50-firmware.rules
-70-udev-acl.rules
-95-udev-late.rules
-42-qemu-usb.rules
-75-persistent-net-generator.rules
-60-persistent-alsa.rules
-95-keyboard-force-release.rules
-40-ppc.rules
-80-drivers.rules
-78-sound-card.rules
-rule_generator.functions
-hotplug.functions
-keyboard-force-release.sh
-udev-kernel.socket
-udev-trigger.service
-udev.service
-udev-control.socket
-udev-settle.service
-udevtrigger
-udevmonitor
-udev-finish
-udev
-udev-fallback-graphics
-udev-acl.ck
-udev-kernel.socket
-udev-control.socket
-udev-trigger.service
-udev.service"
+REQUIRED_BINARIES=" accelerometer
+ scsi_id
+ v4l_id
+ firmware
+ udev-acl
+ keymap
+ ata_id
+ mtd_probe
+ write_cd_rules
+ write_net_rules
+ pci-db
+ cdrom_id
+ usb-db
+ collect
+ udev
+ udevadm
+ udevd"
+REQUIRED_DIRECTORIES=" /etc/udev
+ /lib/udev
+ /usr/lib/systemd/system"
+REQUIRED_FILES=" /usr/lib/ConsoleKit/run-seat.d/udev-acl.ck
+ /lib/udev/findkeyboards"