summaryrefslogtreecommitdiffstats
path: root/packaging/dpkg
diff options
context:
space:
mode:
authorOliver Tappe2007-06-15 17:10:01 +0200
committerOliver Tappe2007-06-15 17:10:01 +0200
commitefb225036e62ab95af6e5679011d112de4e4707d (patch)
tree5fc3672ea7549b4dd96071152b01be24b30b09ea /packaging/dpkg
parent* simplified use of PATH-variables to only the top-level set, all the (diff)
downloadcore-efb225036e62ab95af6e5679011d112de4e4707d.tar.gz
core-efb225036e62ab95af6e5679011d112de4e4707d.tar.xz
core-efb225036e62ab95af6e5679011d112de4e4707d.zip
* moved builddebianpackage into 'packaging'-folder, adjusted accordingly
Felix: again, please shout if you see any problems. git-svn-id: http://svn.openslx.org/svn/openslx/trunk@1168 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'packaging/dpkg')
-rwxr-xr-xpackaging/dpkg/builddebianpackage45
-rw-r--r--packaging/dpkg/default_files/control11
-rwxr-xr-xpackaging/dpkg/default_files/deinstall.sh7
-rwxr-xr-xpackaging/dpkg/default_files/install.sh14
-rw-r--r--packaging/dpkg/default_files/ld4-inst.141
-rw-r--r--packaging/dpkg/default_files/mkdxsinitrd.181
-rwxr-xr-xpackaging/dpkg/default_files/postinst9
-rwxr-xr-xpackaging/dpkg/default_files/prerm7
8 files changed, 215 insertions, 0 deletions
diff --git a/packaging/dpkg/builddebianpackage b/packaging/dpkg/builddebianpackage
new file mode 100755
index 00000000..5f8bafbd
--- /dev/null
+++ b/packaging/dpkg/builddebianpackage
@@ -0,0 +1,45 @@
+#!/bin/sh
+#
+# This script transforms the openslx project files to debians
+# binary package format .deb
+
+dpkg_deb=`which dpkg-deb`
+if [ -z "$dpkg_deb" ];then
+ echo "You need the program dpkg-deb (contained in package dpkg) to build a debian package"
+ exit
+fi
+
+# change into folder where we expect the Makefile:
+cd $(dirname $(readlink -f $0))/../..
+if [ ! -e ./Makefile ]; then
+ echo "There is no makefile in this programs directory (`pwd`)."
+ echo "Please run this script only embedded in the context of an openslx checkout."
+ exit
+fi
+
+export SLX_BUILD_PATH=/tmp/slx$$
+mkdir -p $SLX_BUILD_PATH
+# "make install" will install the slx software into $SLX_BUILD_PATH
+if make install; then
+ #Create Temporary working directory
+ mkdir -p $SLX_BUILD_PATH/DEBIAN
+ mkdir -p $SLX_BUILD_PATH/usr/share/man/man1
+ cp packaging/dpkg/default_files/control $SLX_BUILD_PATH/DEBIAN/
+ cp packaging/dpkg/default_files/prerm $SLX_BUILD_PATH/DEBIAN/
+ cp packaging/dpkg/default_files/postinst $SLX_BUILD_PATH/DEBIAN/
+ cp packaging/dpkg/default_files/*.1 $SLX_BUILD_PATH/usr/share/man/man1/
+ gzip -9 $SLX_BUILD_PATH/usr/share/man/man1/*
+
+ #Set permissions
+ find $SLX_BUILD_PATH -type d|xargs chmod 755
+
+ #Create the package
+ dpkg-deb --build $SLX_BUILD_PATH > /dev/null
+ . ./VERSIONS
+ cd packaging/dpkg
+ mv $SLX_BUILD_PATH.deb openslx_$OPENSLX_VERSION_STRING.deb
+ echo "Written 'openslx_$OPENSLX_VERSION_STRING.deb':"
+ ls -lh openslx_$OPENSLX_VERSION_STRING.deb
+fi
+#Clean up
+rm -rf $SLX_BUILD_PATH
diff --git a/packaging/dpkg/default_files/control b/packaging/dpkg/default_files/control
new file mode 100644
index 00000000..f4a8cec6
--- /dev/null
+++ b/packaging/dpkg/default_files/control
@@ -0,0 +1,11 @@
+Package: openslx
+Version: 4-1
+Section: base
+Priority: optional
+Architecture: all
+Depends: bash (>= 3.0), coreutils (>= 5.2.1), sed (>= 4.1.4), mawk (>= 1.3.3),
+ findutils (>= 4.2.22), perl (>= 5.8)
+Maintainer: Felix Endres <felix-ld4@256bit.org>
+Description: Stateles Linux Extensions Server Setup
+ This project provides a convenient way to setup a server for stateless
+ (possibly diskless) clients.
diff --git a/packaging/dpkg/default_files/deinstall.sh b/packaging/dpkg/default_files/deinstall.sh
new file mode 100755
index 00000000..6de275ac
--- /dev/null
+++ b/packaging/dpkg/default_files/deinstall.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+# Deinstall dxs
+rm -vrf /usr/share/dxs
+rm -vf /usr/sbin/mkdxsinitrd
+rm -vf /usr/sbin/ld4-inst
+rm -vf /usr/share/man/man1/mkdxsinitrd.1.gz
+echo "Done."
diff --git a/packaging/dpkg/default_files/install.sh b/packaging/dpkg/default_files/install.sh
new file mode 100755
index 00000000..cb090fa7
--- /dev/null
+++ b/packaging/dpkg/default_files/install.sh
@@ -0,0 +1,14 @@
+#!/bin/sh
+if [ "$EUID" -ne 0 ]; then
+ echo "You need to start this installer as user root"
+ exit
+fi
+
+cp -Rv dxs /usr/share/
+cp -v man/* /usr/share/man/man1/
+#Create links to provide the scripts to the user
+pushd /usr/sbin > /dev/null
+ln -vs ../share/dxs/installer/ld4-inst
+ln -vs ../share/dxs/initrd/mkdxsinitrd
+popd > /dev/null
+echo "Done."
diff --git a/packaging/dpkg/default_files/ld4-inst.1 b/packaging/dpkg/default_files/ld4-inst.1
new file mode 100644
index 00000000..9b32b744
--- /dev/null
+++ b/packaging/dpkg/default_files/ld4-inst.1
@@ -0,0 +1,41 @@
+.\" Man page for ld4-inst
+.\"
+.\" Copyright (C), 2006, Felix Endres
+.\"
+.\" You may distribute under the terms of the GNU General Public
+.\" License as specified in the file COPYING that comes with the man
+.\" distribution.
+.\"
+.\"
+.TH ld4-inst 1 "2006-05-05" "4.0.1" ""
+.LO 1
+.SH NAME
+ld4-inst \- Setup of the bootserver for a diskless client network environment
+.SH SYNTAX
+.B ld4-inst
+
+.SH DESCRIPTION
+ld
+.B ld4-inst
+guides the user through the setup of a server providing the operating system
+template to (diskless) clients booting via PXE.
+
+The steps taken are as follows:
+
+- Ask user about system specifics and desired results
+
+- Create the OS template by rsyncing from an installed instance
+
+- Create the initial ramdisk vor boottime configuration of the clients
+
+- If desired: Configure necessary servers (i.e tftp, nfs)
+
+.SH SEE ALSO
+.BR ld4-inst "(1).
+.SH BUGS
+The project is under heavy development, thus bugs are likely to appear.
+
+Your Feedback is appreciated.
+.SH AUTHOR
+dxs project manager is Dirk von Suchodoletz (dirk.von.suchodoletz@rz.uni-freiburg.de)
+This manpage was written by Felix Endres (felix-dxs@256bit.org)
diff --git a/packaging/dpkg/default_files/mkdxsinitrd.1 b/packaging/dpkg/default_files/mkdxsinitrd.1
new file mode 100644
index 00000000..4820aef7
--- /dev/null
+++ b/packaging/dpkg/default_files/mkdxsinitrd.1
@@ -0,0 +1,81 @@
+.\" Man page for mkdxsinitrd
+.\"
+.\" Copyright (C), 2006, Felix Endres
+.\"
+.\" You may distribute under the terms of the GNU General Public
+.\" License as specified in the file COPYING that comes with the man
+.\" distribution.
+.\"
+.\"
+.TH mkdxsinitrd 1 "2006-05-05" "4.0.1" ""
+.LO 1
+.SH NAME
+mkdxsinitrd \- erstellt eine initial ramdisk fuer diskless clients
+.SH SYNTAX
+.B mkdxsinitrd
+.RB [\| \-gh \|]
+.RB [\| \-k
+.IR Kernelversion\|]
+.RB [\| \-i
+.IR Pfad \|]
+.RB [\| \-f
+.IR Module \|]
+.RB [\| \-n
+.IR Module\|]
+.RB [\| \-r
+.IR Pfad \|]
+.RB [\| \-s
+.IR Bildgroesse \|]
+
+.SH BESCHREIBUNG
+Damit Clients ein Betriebssystem nutzen koennen dass ueber ein
+Netzwerk bereitgestellt wird, brauchen diese eine initial ramdisk,
+in der Vorkonfigurationsschritte stattfinden. Diese sind noetig,
+damit das Betriebssystem eine Umgebung vorfindet in der es seine
+gewohnte Initialisierung betreiben kann.
+.B mkdxsinitrd
+erstellt eine solche ramdisk, die von PXE-faehigen zum Booten benutzt
+werden kann.
+
+
+.SH OPTIONEN
+.TP
+.B \-g
+Benutze glibc als Basisbibliothek in der ramdisk.
+.TP
+.B \-h
+Zeige Informationen zur Benutzung.
+.TP
+.BI \-k\ Kernelversion
+.B mkdxsinitrd
+versucht die aktuellste Kernelversion zu finden. Falls dies nicht klappt,
+oder eine andere Kernelversion gewuenscht ist kann diese hier angegeben werden
+(funktioniert natuerlich nur fuer auf dem Hostsystem vorhandene Kernelversionen).
+.TP
+.BI \-i\ Pfad
+Optionale Angabe wo die erstellte ramdisk hingeschrieben werden soll.
+.TP
+.BI \-f\ Modulliste
+Kernelmodule die benutzt werden sollen um das Rootfilesystem ueber das dem Netzwerk zu mounten (z.B. nfs, nbd dnbd).
+.TP
+.BI \-n\ Modulliste
+Kernelmodule zum Betrieb der Clientnetzwerkkarten (z.B. e100 tg3 via-rhine).
+.TP
+.BI \-r\ Pfad
+Pfad zum Wurzelverzeichnis des zu exportierenden Betriebsystems (z.B. /nfsroot).
+.TP
+.BI \-s\ Bildgroesse
+Groessenangabe des splash images.
+.TP
+.BI \-d\ Name
+Name der Distribution der Betriebsystemvorlage
+.TP
+.BI \-v\ Version
+Versionskennung der Distribution der Betriebsystemvorlage
+
+.SH SIEHE AUCH
+.BR ld4-inst "(1).
+.SH FEHLER
+Sicherlich allerhand. Feedback ist sehr willkommen.
+.SH AUTOR
+Felix Endres (felix-dxs@256bit.org)
diff --git a/packaging/dpkg/default_files/postinst b/packaging/dpkg/default_files/postinst
new file mode 100755
index 00000000..daa52770
--- /dev/null
+++ b/packaging/dpkg/default_files/postinst
@@ -0,0 +1,9 @@
+#!/bin/sh
+set -e
+#
+if [ "$1" = "configure" ]; then
+ if [ -d /usr/doc -a ! -e /usr/doc/dxs -a -d /usr/share/doc/dxs ]; then
+ ln -sf ../share/doc/dxs /usr/doc/dxs
+ fi
+fi
+#
diff --git a/packaging/dpkg/default_files/prerm b/packaging/dpkg/default_files/prerm
new file mode 100755
index 00000000..6798eb5f
--- /dev/null
+++ b/packaging/dpkg/default_files/prerm
@@ -0,0 +1,7 @@
+#!/bin/sh
+set -e
+#
+if [ \( "$1" = "upgrade" -o "$1" = "remove" \) -a -L /usr/doc/dxs ]; then
+ rm -f /usr/doc/dxs
+fi
+#