Coder Social home page Coder Social logo

emulate's People

Contributors

mario-campos avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

emulate's Issues

Dynamically expand disks and filesystems

The issue here is that the image download takes a significant amount of time (anecdotally, 30-60 seconds). The image itself is of a 14 GB disk. But, per @jcs, if we could initially make the image's disk only as big as necessary (2 GB?) and then dynamically expand it at run-time using Vagrant, we could see a nice performance improvement.

Fortunately, Vagrant and Virtualbox have (experimental) support for this: https://www.vagrantup.com/docs/disks.

However, once Vagrant expands the disk, something (the guest?) will have to expand the partition and then the guest will have to expand the file system. Some guests, like OpenBSD, do not have great support for this. Others, like NetBSD and FreeBSD, do.

  1. Vagrant: expand "disk."
  2. Expand partition.
  3. Guest: Expand file system.

The other point to keep in mind is that this will have the most impact from having a one-partition disk, so that all the "file systems" can make use of the new space. So, this will require some changes to the Packer HCL files to adjust their installation layout.

OpenBSD-latest is out of date

I noticed that when running the CI it tries fetching packages for OpenBSD 7.1 from the mirror which are no longer available since it is out of support now that 7.3 is out.

It would be nice if you could update -latest to 7.3.

OpenBSD and NetBSD random failures

Hi,

it looks like something changed in github's CI and I am seeing lots of random CI failures for emulate.

https://github.com/openiked/openiked-portable/actions/runs/7033906227/
https://github.com/NetworkConfiguration/dhcpcd/actions/runs/6573789362

I can't tell what is going wrong but jobs randomly timeout or crash. It has gotten so bad that the emulated runners are basically constantly broken: https://github.com/NetworkConfiguration/dhcpcd/actions

Any idea what's happening there and how we could fix it?

Use newer runners

I expect GitHub will deprecate macos-10.15 eventually and we want to be off of that by then. Linux is pretty fast and (in my personal experience) I think GitHub assigns jobs to ubuntu-latest runners faster than it does to macos-* runners.

We could also just switch to macos-latest or macos-11. We just need to get off of macos-10.15.

Hijacking bash

  • Use BASH_ENV or some other pre-execution "initializer."
    • Ideal: Use BASH_ENV to access the first BASH_SOURCE or $@ from bash?
    • Find files recently created (< 1 minute age) that end in ".sh".
    • Use procfs, ps, or something else, to find the command line of the first bash shell.
  • Use PATH and/or EXECIGNORE to give preference to a different "bash" executable.
    • What if the bash process is executed with the absolute path, and not with $PATH?
  • Spawn a process that polls for new shell scripts being created and replaces them as soon as they are created.
    • This is very "racey" (subject to race conditions) and unreliable because it depends on the implementation of the runner.
  • Replace /bin/bash with an executable program that hijacks the script argument and forwards it to the guest. This method is proven, but 1) requires privilege and 2) does not work on macOS (due to its System Integrity Protection).
    • This is the current method of hijacking.

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.