Coder Social home page Coder Social logo

install-freedos's Introduction

install-freedos

Set of scripts for dosemu2 that help with downloading and installing freedos userspace tools.

Boot dosemu2 and run insfdusr, that's all.

install-freedos's People

Contributors

andrewbird avatar jschwartzenberg avatar skitt avatar stsp avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

install-freedos's Issues

dosemu-setupfreedos Python helper script gets the wrong directory when used with "-v full"

Line 105:
cmddir = os.path.join(os.path.dirname(os.path.abspath(file)), '..', 'share', 'dosemu', 'commands', 'c')
Whereas it should be:
cmddir = os.path.join(os.path.dirname(os.path.abspath(file)), '..', '..', 'share', 'dosemu', 'commands', 'c')

Otherwise it gets the wrong directory to look for fdconfig.sys

The script gets installed into /usr/libexec/dosemu/dosemu-setupfreedos, while fdconfig.sys is in /usr/share/dosemu/dosemu2-cmds-0.3/c/fdconfig.sys - that's TWO '..' (directories) above /usr/libexec/dosemu/, not one.

As installed from the PPA package.

See the details in dosemu2/dosemu2#1599

install-freedos ended with: NameError: name 'FREEDOS_ARCHIVES' is not defined

Describe the bug
/usr/libexec/dosemu/dosemu-downloaddos -o freedos12 -d ~/fd12
resulted in:
Downloading extra FreeDOS userspace tools
Traceback (most recent call last):
File "/usr/libexec/dosemu/dosemu-downloaddos", line 234, in
download_dos(dos_to_download, destination)
File "/usr/libexec/dosemu/dosemu-downloaddos", line 196, in download_dos
download_FREEDOS_FULL_ARCHIVES(FREEDOS12_URL, destination)
File "/usr/libexec/dosemu/dosemu-downloaddos", line 99, in download_FREEDOS_FULL_ARCHIVES
for filename in FREEDOS_ARCHIVES:
NameError: name 'FREEDOS_ARCHIVES' is not defined

To Reproduce
Steps to reproduce the behaviour:
installed missing python3-tqdm dependency
Then:
paul@kasparno:/usr/lib/x86_64-linux-gnu$ /usr/libexec/dosemu/dosemu-downloaddos -l
freedos12 FreeDOS 1.2 (2016)
freedos12userspace FreeDOS 1.2 userspace (2016)
freedos11 FreeDOS 1.1 (2011)
freedos11userspace FreeDOS 1.1 userspace (2011)
paul@kasparno:/usr/lib/x86_64-linux-gnu$ mkdir ~/fd12
paul@kasparno:/usr/lib/x86_64-linux-gnu$ /usr/libexec/dosemu/dosemu-downloaddos -o freedos12 -d ~/fd12
Downloading https://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/distributions/1.2/repos/pkg-info/kernel.txt...
100%|████████████████████████████████████| 1163/1163 [00:00<00:00, 864123.22B/s]
Downloading https://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/distributions/1.2/repos/pkg-info/command.txt...
100%|██████████████████████████████████████| 661/661 [00:00<00:00, 830318.94B/s]
Downloading https://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/distributions/1.2/repos/pkg-info/touch.txt...
100%|█████████████████████████████████████| 874/874 [00:00<00:00, 1096566.47B/s]
Downloading https://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/distributions/1.2/repos/pkg-info/wcd.txt...
100%|█████████████████████████████████████| 861/861 [00:00<00:00, 1082847.30B/s]
Downloading FreeDOS kernel and FreeCOM...
Downloading https://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/distributions/1.2/repos/base/kernel.zip...
100%|████████████████████████████████| 733073/733073 [00:00<00:00, 940613.79B/s]
Downloading https://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/distributions/1.2/repos/base/command.zip...
100%|█████████████████████████████| 5085622/5085622 [00:02<00:00, 1762452.01B/s]
Downloading extra FreeDOS userspace tools
Traceback (most recent call last):
File "/usr/libexec/dosemu/dosemu-downloaddos", line 234, in
download_dos(dos_to_download, destination)
File "/usr/libexec/dosemu/dosemu-downloaddos", line 196, in download_dos
download_FREEDOS_FULL_ARCHIVES(FREEDOS12_URL, destination)
File "/usr/libexec/dosemu/dosemu-downloaddos", line 99, in download_FREEDOS_FULL_ARCHIVES
for filename in FREEDOS_ARCHIVES:
NameError: name 'FREEDOS_ARCHIVES' is not defined
paul@kasparno:/usr/lib/x86_64-linux-gnu$

install-freedos should depends on python3-tqdm

I have installed on Ubuntu 21.04 (have also seen this on GeckoLinux 15.3).
paul@kasparno:/usr/lib/x86_64-linux-gnu$ /usr/libexec/dosemu/dosemu-downloaddos
Traceback (most recent call last):
File "/usr/libexec/dosemu/dosemu-downloaddos", line 14, in
from tqdm import tqdm
ModuleNotFoundError: No module named 'tqdm'

fixed by:
$ sudo apt install python3-tqdm

wrong libexecdir on ubuntu

dosemu2 gets the libexecdir via dh_auto_configure.
But install-freedos only uses dh_auto_install and
doesn't get the libexecdir.
I tried the $(libexecdir) and $(prefix) variables,
but they do not exist in dh_auto_install.

@skitt could you please tell me how to access
the ubuntu directories in dh_auto_install
(eg for the packages w/o configure)?

Struggling to install userspace tools

On a fresh Ubuntu 22.04 I am struggling to install the userspace tools although I remember I recently was able to do it.
I am compiling dosemu2 pre9 from source and making use of comcom32 and fdpp-dev. Then I start dosemu once. After that I install the scripts
sudo apt-get install install-freedos
succeeds
0.1-2~202207251944~ubuntu22.04.1
dosemu then offers me to install userspace tools via insfdusr
which fails with

unix: /usr/local/libexec/dosemu/dosemu-installfreedosuserspace not found
freedos installation failed.

Obviously the requested directory doesn't exist on my system. What am I doing wrong?

files moved around

Seems like the scripts are broken again.
@andrewbird could you please
include them to the test-suite?
Otherwise we do not see the
breakages.

crash if dosemu not installed

Running dosemu from a build dir
w/o previously installing it, breaks
freedos installation:

Traceback (most recent call last):
  File "/usr/local/libexec/dosemu/dosemu-setupfreedos", line 108, in <module>
    info = subprocess.run(['dosemu', '-info'], stdout=subprocess.PIPE).stdout.de
code(sys.stdout.encoding).splitlines()[0]
  File "/usr/lib/python3.10/subprocess.py", line 501, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/usr/lib/python3.10/subprocess.py", line 969, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.10/subprocess.py", line 1845, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'dosemu'
freedos installation completed.
rmfdusr command can be used to remove installed freedos.

Crash on Debian 9: AttributeError: 'PosixPath' object has no attribute 'seek'

I did the following:

  • cloned this repo

  • pip3 install tqdm

  • in install-freedos directory: DESTDIR=$HOME/local.new prefix=/. make install

  • start DOSEMU2_EXTRAS_DIR=~/local.new/share/dosemu2-extras/ PYTHONPATH=~/local/lib/python3.9/site-packages/ ~/local.new/bin/dosemu -dumb

  • change to drive e:

  • insfdusr

The output ends with this exception:

Downloading https://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/distributions/1.2/repos/base/swsubst.zip...
100% 124022/124022 [00:00<00:00, 411798.54B/s]
Downloading https://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/distributions/1.2/repos/base/tree.zip...
100% 75827/75827 [00:00<00:00, 371600.66B/s]
Traceback (most recent call last):
  File "[...]/local.new/libexec/dosemu/dosemu-setupfreedos", line 135, in <module>
    for entry in zipfile.ZipFile(filename).namelist():
  File "/usr/lib/python3.5/zipfile.py", line 1026, in __init__
    self._RealGetContents()
  File "/usr/lib/python3.5/zipfile.py", line 1090, in _RealGetContents
    endrec = _EndRecData(fp)
  File "/usr/lib/python3.5/zipfile.py", line 241, in _EndRecData
    fpin.seek(0, 2)
AttributeError: 'PosixPath' object has no attribute 'seek'
E:\>

Add test downloads function

As mentioned here in the early part of this PR dosemu2/dosemu2#1702 Github actions is bandwidth limited. I'd like to be able to test install_freedos to be sure that the urls are current, but without actually doing the download. Do you think it would be possible to add a test option to the program?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.