public inbox for linux-msdos@vger.kernel.org
 help / color / mirror / Atom feed
* How do I do a non-root install of dosemu?
@ 2008-04-28  2:58 Benjamin M. Schwartz
  2008-04-28 14:03 ` Bart Oldeman
  0 siblings, 1 reply; 3+ messages in thread
From: Benjamin M. Schwartz @ 2008-04-28  2:58 UTC (permalink / raw)
  To: linux-msdos

[-- Attachment #1: Type: text/plain, Size: 1590 bytes --]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I am attempting to port dosemu-1.4.0 to the OLPC operating system, Sugar,
so that we may inflict DOS on yet another generation of innocent children.
~ The key difficulty with this is the necessity of installing in a
non-default directory, in this case $SUGAR_BUNDLE_PATH/dosemu_install/

dosemu is theoretically relocatable, but I could not find any
documentation indicating what was required to relocate it.  By trial and
error, I have determined that I need to patch the dosemu shell script and
set the DOSEMU_LIB_DIR, DOSEMU_CONF_DIR, and DOSEMU_HDIMAGE_DIR envvars,
in addition to PATH and LD_LIBRARY_PATH.  I also have had to redirect the
etc/dosemu/drives/c and d symlinks.

Even after all this, I still get failures, as shown in the attached
failure log.  The first error is

ERROR: X support not compiled in or not found:
ERROR: /usr/lib/dosemu/libplugin_X.so: cannot open shared object file: No
such file or directory

This is very surprising, since I've set LD_LIBRARY_PATH in the launcher
script.

Another surprising error is

Error in built-in global.conf: (line 671) Disk-device/file
/var/lib/dosemu/drives/c doesn't exist.

Since I have explicitly set DOSEMU_HDIMAGE_DIR, I don't know why I still
see this.

What do I have to do to make a relocated installation work?

- --Ben
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFIFT1CUJT6e6HFtqQRAqABAJ0abW354vMEcWYC2wkSgE4KdR3f1QCgn0mg
GWTdB2cD5lm52Yi/5kNAtgs=
=hD/0
-----END PGP SIGNATURE-----

[-- Attachment #2: dosemu.log --]
[-- Type: text/plain, Size: 3117 bytes --]

groupadd: group 10003 exists

   You do not have the DOSEMU vga font installed and are running
   remote X. You need to install the vga font on your _local_ Xserver.
   Look at the readme for details. For now we start with an fixed font,
   which does not display all national characters correctly.
   ... be warned

ERROR: X support not compiled in or not found:
ERROR: /usr/lib/dosemu/libplugin_X.so: cannot open shared object file: No such file or directory

Welcome to DOSEMU 1.4.0.0, a DOS emulator for Linux.
Copyright (C) 1992-2006 the 'DOSEMU-Development-Team'.
This program is  distributed  in  the  hope that it will be useful,
but  WITHOUT  ANY  WARRANTY;   without even the implied warranty of
MERCHANTABILITY  or  FITNESS FOR A PARTICULAR PURPOSE. See the files
COPYING.DOSEMU and COPYING for more details.
Use  this  program  at  your  own  risk!

Press ENTER to confirm, and boot DOSEMU, or [Ctrl-C] to abort
DOSEMU will run on _this_ terminal.
To exit you need to execute 'exitemu' from within DOS,
because <Ctrl>-C and 'exit' won't work!

DOSEMU-FreeDOS is not available to boot DOSEMU.
Please enter the name of a Linux directory which contains a bootable DOS, or
press [Ctrl-C] to abort for manual installation of FreeDOS or another DOS, or
press [ENTER] to quit if you suspect an error after manual installation.

Creating symbolic link for A[���������q������7���������Ps���������_������Pq������ q������������h\b��� as /home/olpc/isolation/1/uid_to_home_dir/10014/data/.dosemu/drives/c
The DOSEMU part of the proprietary installation has been done.

Please make sure that you have a bootable DOS in 'A[���������q������7���������Ps���������_������Pq������ q������������h\b���'.
Read the documentation for details on what it must contain.
The DOSEMU support commands are available within
/var/lib/dosemu/drive_z on drive D:. You might want to use different
config.sys and autoexec.bat files with your DOS. For example, you can try
to copy D:\config.emu and D:\autoemu.bat to C:\, adjust them, and use the
$_emusys option in ~/.dosemurc.

Press ENTER to confirm, and boot DOSEMU, or [Ctrl-C] to abort
/home/olpc/Activities/DOSEMU.activity/launcher.sh: line 16:  2338 Segmentation fault      dosemu -E exitemu
cp: cannot create regular file `/home/olpc/isolation/1/uid_to_home_dir/10014/data/.dosemu/drive_c/': Is a directory

   You do not have the DOSEMU vga font installed and are running
   remote X. You need to install the vga font on your _local_ Xserver.
   Look at the readme for details. For now we start with an fixed font,
   which does not display all national characters correctly.
   ... be warned

In file included from built-in global.conf:676
                 from built-in global.conf:633
Error in built-in global.conf: (line 671) Disk-device/file /var/lib/dosemu/drives/c doesn't exist.
1 error(s) detected while parsing the configuration-file

[-- Attachment #3: dosemu.patch --]
[-- Type: text/plain, Size: 547 bytes --]

--- dosemu.orig	2008-04-28 00:34:11.000000000 +0000
+++ dosemu.mod	2008-04-28 00:35:51.000000000 +0000
@@ -6,9 +6,9 @@
 #
 
 # the below lines get patched, when a systemwide install is done
-SYSTEM_CONF_PATH=/etc/dosemu
-SYSTEM_XFONTS_PATH=/usr/share/dosemu/Xfonts
-SYSTEM_BIN_PATH=/usr/bin
+SYSTEM_CONF_PATH=$SUGAR_BUNDLE_PATH/dosemu_install/etc/dosemu
+SYSTEM_XFONTS_PATH=$SUGAR_BUNDLE_PATH/dosemu_install/usr/share/dosemu/Xfonts
+SYSTEM_BIN_PATH=$SUGAR_BUNDLE_PATH/dosemu_install/usr/bin
 
 get_binary() {
   BINARY=$SYSTEM_BIN_PATH/dosemu.bin

[-- Attachment #4: dosemu_launcher.sh --]
[-- Type: text/plain, Size: 737 bytes --]

#!/usr/bin/env sh
declare -x HOME="$SUGAR_ACTIVITY_ROOT/data"
#declare -x WINEDEBUG="warn+all"
declare -x DOTDIR="$HOME/.dosemu"
declare -x PATH="$SUGAR_BUNDLE_PATH/dosemu_install/usr/bin:$PATH"
declare -x LD_LIBRARY_PATH="$SUGAR_BUNDLE_PATH/dosemu_install/usr/lib:$WINEDLLPATH:$LD_LIBRARY_PATH"
declare -x DOSEMU_LIB_DIR="$SUGAR_BUNDLE_PATH/dosemu_install/usr/lib"
declare -x DOSEMU_CONF_DIR="$SUGAR_BUNDLE_PATH/dosemu_install/etc"
declare -x DOSEMU_HDIMAGE_DIR=$DOSEMU_CONF_DIR
if ! [ -e ~/.successfully_initialized ]
then
	dosemu -E exitemu #create directory structure, then exit
	cp -r $SUGAR_BUNDLE_PATH/drive_c/* $DOTDIR/drive_c/
	chmod -R g+rwx $DOTDIR
	touch ~/.successfully_initialized
fi
sh $SUGAR_BUNDLE_PATH/start_command.sh

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: How do I do a non-root install of dosemu?
  2008-04-28  2:58 How do I do a non-root install of dosemu? Benjamin M. Schwartz
@ 2008-04-28 14:03 ` Bart Oldeman
  2008-04-28 22:47   ` Benjamin M. Schwartz
  0 siblings, 1 reply; 3+ messages in thread
From: Bart Oldeman @ 2008-04-28 14:03 UTC (permalink / raw)
  To: bens; +Cc: linux-msdos

Hi,

the binary tgz distribution
http://prdownloads.sourceforge.net/dosemu/dosemu-1.4.0-bin.tgz?download
is an example of something that is relocatable, and is created using
the dist/mkbindist
script (see in there for instructions).

>  set the DOSEMU_LIB_DIR, DOSEMU_CONF_DIR, and DOSEMU_HDIMAGE_DIR envvars,
>  in addition to PATH and LD_LIBRARY_PATH.  I also have had to redirect the
>  etc/dosemu/drives/c and d symlinks.

DOSEMU looks in $HOME/.dosemu before /etc/dosemu, and see also below.

>  ERROR: X support not compiled in or not found:
>  ERROR: /usr/lib/dosemu/libplugin_X.so: cannot open shared object file: No
>  such file or directory

You can avoid this error by putting libplugin_*.so into the same
directory as dosemu.bin.
(it ignores LD_LIBRARY_PATH -- that is something that could be changed
though, of course)

>  Error in built-in global.conf: (line 671) Disk-device/file
>  /var/lib/dosemu/drives/c doesn't exist.
>
>  Since I have explicitly set DOSEMU_HDIMAGE_DIR, I don't know why I still
>  see this.

DOSEMU_HDIMAGE_DIR is ignored (but it is set as environment variable
by DOSEMU itself).
You'd need to give dosemu.bin the --Fimagedir option (see the man
page) to make it work;
also --Flibdir should give the directory corresponding to
../../share/dosemu (DOSEMU_LIB_DIR),
-n completely ignores dosemu.users and dosemu.conf, and -f lets you
override ~/.dosemurc.

Also, the patch below makes the script a bit more robust, and the
1.4.0.1 patch update makes dosemu a bit smarter about finding fonts.

--- dist/dosemu.bindist (revision 1844)
+++ dist/dosemu.bindist (working copy)
@@ -28,12 +28,17 @@
 "
       exit 1
     fi
-    mkdir -p $HOME/.dosemu/drive_c $HOME/.dosemu/drives
+    mkdir -p $HOME/.dosemu/drive_c/tmp $HOME/.dosemu/drives
     rm -f $HOME/.dosemu/drives/c $HOME/.dosemu/drives/d
     ln -sf $HOME/.dosemu/drive_c $HOME/.dosemu/drives/c
     ln -sf $BOOT_DIR_PATH/drive_z $HOME/.dosemu/drives/d
     cp -fp $BOOT_DIR_PATH/conf/autoexec.bat $BOOT_DIR_PATH/freedos/autoexec.bat
     cp -fp $BOOT_DIR_PATH/conf/config.sys $BOOT_DIR_PATH/freedos/config.sys
+    # the below two cp's are usually also done by dosemu.bin but are done here
+    # in case DOSEMU terminates leaving a disclaimer file behind, or
+    # if ~/.dosemu/disclaimer exists but ~/.dosemu/drives/c does not.
+    cp -fp $BOOT_DIR_PATH/conf/autoexec.bat $HOME/.dosemu/drive_c
+    cp -fp $BOOT_DIR_PATH/conf/config.sys $HOME/.dosemu/drive_c
   fi
   unset INSTALL
 }

Hope that helps
Bart

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: How do I do a non-root install of dosemu?
  2008-04-28 14:03 ` Bart Oldeman
@ 2008-04-28 22:47   ` Benjamin M. Schwartz
  0 siblings, 0 replies; 3+ messages in thread
From: Benjamin M. Schwartz @ 2008-04-28 22:47 UTC (permalink / raw)
  To: linux-msdos

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Bart Oldeman wrote:
| Hi,
|
| the binary tgz distribution
| http://prdownloads.sourceforge.net/dosemu/dosemu-1.4.0-bin.tgz?download
| is an example of something that is relocatable, and is created using
| the dist/mkbindist
| script (see in there for instructions).

That was unreasonably easy, and rendered all the other stuff unnecessary.

Thank you,
Ben Schwartz

P.S. If you're running an XO, emulated or otherwise, you may see the
result at http://dev.laptop.org/~bemasc/DOSEdit-1.xo
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFIFlQMUJT6e6HFtqQRAprVAJ9XxvlBjRt51r088NMgpLXj14z+EACbBAkK
YYE5BbZVGFFFz/BWWVCcvmI=
=1BTL
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-04-28 22:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-28  2:58 How do I do a non-root install of dosemu? Benjamin M. Schwartz
2008-04-28 14:03 ` Bart Oldeman
2008-04-28 22:47   ` Benjamin M. Schwartz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox