diff options
author | Oliver Tappe | 2007-06-17 12:29:17 +0200 |
---|---|---|
committer | Oliver Tappe | 2007-06-17 12:29:17 +0200 |
commit | 9ba85d5dc63dfd1e16b9ec85d532fe89ee58fd9b (patch) | |
tree | 176dc068777af9af1119c55648ec73e78517393e /Makefile | |
parent | Enabled busybox option to allow longer filenames in tar archives (see (diff) | |
download | core-9ba85d5dc63dfd1e16b9ec85d532fe89ee58fd9b.tar.gz core-9ba85d5dc63dfd1e16b9ec85d532fe89ee58fd9b.tar.xz core-9ba85d5dc63dfd1e16b9ec85d532fe89ee58fd9b.zip |
largish change with respect to configurable paths:
* instead of supporting configurable paths at different hierarchy levels,
there are now only five configurable folder:
+ base-path (/opt/openslx), fixed at installation time
+ config-path (/etc/opt/openslx), fixed at installation time
+ private-path (/var/opt/openslx), freely configurable by user
+ public-path (/srv/openslx), freely configurable by user
+ temp-path (/tmp), freely configurable by user
this closes ticket#143
* several holes have been plugged concerning the creation of folders
before they are accessed, closing ticket#142
* the functionality of generating config default folders has been moved
from the Makefile into a new Perl-module (ConfigFolder.pm), in order
to be available to the Perl-scripts, too
* slxsettings has been changed to reflect the nature of base-path and
config-path as fixed paths
git-svn-id: http://svn.openslx.org/svn/openslx/trunk@1172 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 91 |
1 files changed, 38 insertions, 53 deletions
@@ -23,20 +23,12 @@ endif ifeq ($(SLX_BASE_PATH),) SLX_BASE_PATH = /opt/openslx endif -SLX_BIN_PATH = ${SLX_BASE_PATH}/bin -SLX_SHARE_PATH = ${SLX_BASE_PATH}/share -SLX_VMWARE_PATH = ${SLX_BASE_PATH}/vmware - ifeq ($(SLX_PRIVATE_PATH),) SLX_PRIVATE_PATH = /var/opt/openslx endif - ifeq ($(SLX_PUBLIC_PATH),) SLX_PUBLIC_PATH = /srv/openslx endif -SLX_EXPORT_PATH = ${SLX_PUBLIC_PATH}/export -SLX_TFTPBOOT_PATH = ${SLX_PUBLIC_PATH}/tftpboot - ifeq ($(SLX_TEMP_PATH),) SLX_TEMP_PATH = /tmp endif @@ -138,34 +130,34 @@ supported."; \ echo "Installing OpenSLX project files"; \ mkdir -p $(SLX_BUILD_PATH)$(SLX_CONFIG_PATH) \ -p $(SLX_BUILD_PATH)$(SLX_BASE_PATH)/lib \ - -p $(SLX_BUILD_PATH)$(SLX_BIN_PATH) \ - -p $(SLX_BUILD_PATH)$(SLX_SHARE_PATH)/templates \ - -p $(SLX_BUILD_PATH)$(SLX_SHARE_PATH)/initramfs \ - -p $(SLX_BUILD_PATH)$(SLX_SHARE_PATH)/busybox \ - -p $(SLX_BUILD_PATH)$(SLX_SHARE_PATH)/squashfs \ + -p $(SLX_BUILD_PATH)$(SLX_BASE_PATH)/bin \ + -p $(SLX_BUILD_PATH)$(SLX_BASE_PATH)/share/templates \ + -p $(SLX_BUILD_PATH)$(SLX_BASE_PATH)/share/initramfs \ + -p $(SLX_BUILD_PATH)$(SLX_BASE_PATH)/share/busybox \ + -p $(SLX_BUILD_PATH)$(SLX_BASE_PATH)/share/squashfs \ -p $(SLX_BUILD_PATH)$(SLX_PRIVATE_PATH)/config/default/initramfs \ -p $(SLX_BUILD_PATH)$(SLX_PRIVATE_PATH)/config/default/rootfs \ - -p $(SLX_BUILD_PATH)$(SLX_SHARE_PATH)/themes \ + -p $(SLX_BUILD_PATH)$(SLX_BASE_PATH)/share/themes \ -p $(SLX_BUILD_PATH)${USR_BIN_PATH}; @ # copy license @cp COPYING $(SLX_BUILD_PATH)$(SLX_BASE_PATH)/; @ # copy initramfs generator scripts (and inject SLX_CONFIG_PATH, SLX_BASE_PATH on the way): - @cp ./initramfs/mkdxsinitrd $(SLX_BUILD_PATH)$(SLX_BIN_PATH)/; \ + @cp ./initramfs/mkdxsinitrd $(SLX_BUILD_PATH)$(SLX_BASE_PATH)/bin/; \ sed -e "s,@@@SLX_CONFIG_PATH@@@,$(SLX_CONFIG_PATH)," \ -e "s,@@@SLX_BASE_PATH@@@,$(SLX_BASE_PATH)," \ - -i $(SLX_BUILD_PATH)$(SLX_BIN_PATH)/mkdxsinitrd; + -i $(SLX_BUILD_PATH)$(SLX_BASE_PATH)/bin/mkdxsinitrd; @ # copy all PERL-scripts and their required modules: - @cp bin/slx* $(SLX_BUILD_PATH)$(SLX_BIN_PATH)/; \ - cp config-db/slx* $(SLX_BUILD_PATH)$(SLX_BIN_PATH)/; \ - cp installer/slx* $(SLX_BUILD_PATH)$(SLX_BIN_PATH)/; \ + @cp bin/slx* $(SLX_BUILD_PATH)$(SLX_BASE_PATH)/bin/; \ + cp config-db/slx* $(SLX_BUILD_PATH)$(SLX_BASE_PATH)/bin/; \ + cp installer/slx* $(SLX_BUILD_PATH)$(SLX_BASE_PATH)/bin/; \ tar --exclude=.svn -cp -C lib OpenSLX \ | tar -xp -C $(SLX_BUILD_PATH)$(SLX_BASE_PATH)/lib; \ tar --exclude=.svn --exclude *.example \ -cp -C lib distro-info \ - | tar -xp -C $(SLX_BUILD_PATH)$(SLX_SHARE_PATH); \ + | tar -xp -C $(SLX_BUILD_PATH)$(SLX_BASE_PATH)/share; \ tar --exclude=.svn --exclude prereqfiles --exclude trusted-package-keys/* \ -cp -C lib distro-info \ | tar -xp -C $(SLX_BUILD_PATH)$(SLX_CONFIG_PATH); \ @@ -175,53 +167,46 @@ supported."; \ | tar -xp -C $(SLX_BUILD_PATH)$(SLX_BASE_PATH)/lib; \ @ # link all binaries & scripts into user-path: - @ln -sf $(SLX_BIN_PATH)/slx* $(SLX_BUILD_PATH)$(USR_BIN_PATH)/; \ - ln -sf $(SLX_BIN_PATH)/mkdxsinitrd $(SLX_BUILD_PATH)$(USR_BIN_PATH)/; \ + @ln -sf $(SLX_BASE_PATH)/bin/slx* $(SLX_BUILD_PATH)$(USR_BIN_PATH)/; \ + ln -sf $(SLX_BASE_PATH)/bin/mkdxsinitrd $(SLX_BUILD_PATH)$(USR_BIN_PATH)/; \ @ # copy shareable data: @cd initramfs/initrd-stuff; tar --exclude=.svn -cp * | \ - tar -xp -C $(SLX_BUILD_PATH)$(SLX_SHARE_PATH)/initramfs; cd ../..; \ + tar -xp -C $(SLX_BUILD_PATH)$(SLX_BASE_PATH)/share/initramfs; cd ../..; \ tar --exclude=.svn -cp -C initramfs distro-specs | \ - tar -xp -C $(SLX_BUILD_PATH)$(SLX_SHARE_PATH); \ + tar -xp -C $(SLX_BUILD_PATH)$(SLX_BASE_PATH)/share; \ cp -p config-db/PXE-template.example \ $(SLX_BUILD_PATH)$(SLX_CONFIG_PATH)/; \ cp -a installer/default_files/machine-setup.default \ - $(SLX_BUILD_PATH)$(SLX_SHARE_PATH)/templates/; \ + $(SLX_BUILD_PATH)$(SLX_BASE_PATH)/share/templates/; \ cp -a installer/default_files/hwdata/{pcitable.local,Cards.local} \ - $(SLX_BUILD_PATH)$(SLX_SHARE_PATH)/templates/; \ + $(SLX_BUILD_PATH)$(SLX_BASE_PATH)/share/templates/; \ tar --exclude=.svn -cp -C installer/default_files tftpboot | \ - tar -xp -C $(SLX_BUILD_PATH)$(SLX_SHARE_PATH); \ + tar -xp -C $(SLX_BUILD_PATH)$(SLX_BASE_PATH)/share; \ cd theming; tar --exclude=.svn -cp * | \ - tar -xp -C $(SLX_BUILD_PATH)$(SLX_SHARE_PATH)/themes; cd ..; \ + tar -xp -C $(SLX_BUILD_PATH)$(SLX_BASE_PATH)/share/themes; cd ..; \ cp -pP tools/busybox{,.links,.x86_64,.i586} \ - $(SLX_BUILD_PATH)$(SLX_SHARE_PATH)/busybox/; \ - cp -p tools/mksquashfs $(SLX_BUILD_PATH)$(SLX_SHARE_PATH)/squashfs/; \ + $(SLX_BUILD_PATH)$(SLX_BASE_PATH)/share/busybox/; \ + cp -p tools/mksquashfs $(SLX_BUILD_PATH)$(SLX_BASE_PATH)/share/squashfs/; \ - @ # create pre-/postinit scripts for us in initramfs: - @echo -e "#!/bin/sh\n#\n# This script allows the local admin to \ -extend the\n# capabilities at the beginning of the initramfs (stage3). \ -The toolset is rather\n# restricted and you have to keep in mind that \ -stage4 rootfs has the\n# prefix '/mnt'." \ - > $(SLX_BUILD_PATH)$(SLX_PRIVATE_PATH)/config/default/initramfs/preinit.local; \ - echo -e "#!/bin/sh\n#\n# This script allows the local admin to \ -extend the\n# capabilities at the end of the initramfs (stage3). The \ -toolset is rather\n# restricted and you have to keep in mind that stage4 \ -rootfs has the\n# prefix '/mnt'. But you might use some special slx \ -functions via\n# inclusion: '. /etc/functions' ..." \ - > $(SLX_BUILD_PATH)$(SLX_PRIVATE_PATH)/config/default/initramfs/postinit.local; \ - chmod u+x $(SLX_BUILD_PATH)$(SLX_PRIVATE_PATH)/config/default/initramfs/*init.local; \ + @ # create default config folder hierarchy: + @perl -Ilib -e 'use OpenSLX::ConfigFolder; createConfigFolderForDefaultSystem();' @ # create complete default settings and empty local settings file: @echo -e "# default setup for OpenSLX-installation\ +\n\ +\n# paths that are fixed at packaging/installation time:\ \nSLX_BASE_PATH=${SLX_BASE_PATH}\ \nSLX_CONFIG_PATH=${SLX_CONFIG_PATH}\ +\n\ +\n# paths which can be adjusted after installation:\ \nSLX_PRIVATE_PATH=${SLX_PRIVATE_PATH}\ \nSLX_PUBLIC_PATH=${SLX_PUBLIC_PATH}\ \nSLX_TEMP_PATH=${SLX_TEMP_PATH}\n" \ - > $(SLX_BUILD_PATH)$(SLX_SHARE_PATH)/settings.default; \ + > $(SLX_BUILD_PATH)$(SLX_BASE_PATH)/share/settings.default; \ test -e $(SLX_BUILD_PATH)$(SLX_CONFIG_PATH)/settings || \ echo -e "# Local setup for OpenSLX (overrides default settings).\ -\n#\n# Please look at $(SLX_SHARE_PATH)/settings.default and the docs to learn\ +\n#\n# Please look at $(SLX_BASE_PATH)/share/settings.default and the docs to learn\ \n# about the available options.\n" \ > $(SLX_BUILD_PATH)$(SLX_CONFIG_PATH)/settings; \ @@ -236,9 +221,9 @@ functions via\n# inclusion: '. /etc/functions' ..." \ OPENSLX_SVN_SNAPSHOT="1"; \ . ./VERSIONS; \ echo -e "#! /bin/sh\n\necho $${OPENSLX_VERSION_STRING}" \ - > $(SLX_BUILD_PATH)${SLX_BIN_PATH}/slxversion; \ - chmod a+x $(SLX_BUILD_PATH)${SLX_BIN_PATH}/slxversion; \ - ln -sf $(SLX_BIN_PATH)/slxversion $(SLX_BUILD_PATH)$(USR_BIN_PATH)/; \ + > $(SLX_BUILD_PATH)$(SLX_BASE_PATH)/bin/slxversion; \ + chmod a+x $(SLX_BUILD_PATH)$(SLX_BASE_PATH)/bin/slxversion; \ + ln -sf $(SLX_BASE_PATH)/bin/slxversion $(SLX_BUILD_PATH)$(USR_BIN_PATH)/; \ @ # set default db-type: @DEFAULT_DB_TYPE=$$(cat DEFAULT-DB-TYPE); \ @@ -248,11 +233,11 @@ functions via\n# inclusion: '. /etc/functions' ..." \ vmware_install: @# we should read the config file here or better have a separate @# script for installing vmware related stuff - @echo "Installing VMware files to $(SLX_VMWARE_PATH)" - @mkdir -p $(SLX_VMWARE_PATH)/templ \ - -p $(SLX_VMWARE_PATH)/vmsessions/kdm - @cp -a vmware/* $(SLX_VMWARE_PATH)/templ/ - @echo -e "Please configure your exports (add $(SLX_VMWARE_PATH) to your list).\nCopy your *.vmdk files into $(SLX_VMWARE_PATH). For interactive mode add for each virtual machine (*.vmdk) a .desktop file into ./vmsessions (example file $(SLX_VMWARE_PATH)/templ/desktop.template). Don't forget to install Xdialog!" + @echo "Installing VMware files to $(SLX_BASE_PATH)/vmware" + @mkdir -p $(SLX_BASE_PATH)/vmware/templ \ + -p $(SLX_BASE_PATH)/vmware/vmsessions/kdm + @cp -a vmware/* $(SLX_BASE_PATH)/vmware/templ/ + @echo -e "Please configure your exports (add $(SLX_BASE_PATH)/vmware to your list).\nCopy your *.vmdk files into $(SLX_BASE_PATH)/vmware. For interactive mode add for each virtual machine (*.vmdk) a .desktop file into ./vmsessions (example file $(SLX_BASE_PATH)/vmware/templ/desktop.template). Don't forget to install Xdialog!" uninstall: @echo "Uninstalling openslx.org project files but keeping configs \ |