armdevvel / mxe-SHARED

MXE (M cross environment) for ARM32 Windows development (shared libraries)
Other
7 stars 4 forks source link

Deployment (integrate deployment tools as MXE components) #19

Open treeswift opened 1 year ago

treeswift commented 1 year ago
treeswift commented 1 year ago

Analysis and proposal:

treeswift commented 1 year ago

Intermediate progress: make snakeoil in subsystem/deployment (commit b7134c1188b621754a4416e27136a95f42cb7be4 ) produces usr/bin/selfsign.sh <file> that signs any PE32 binary in place; if the file is not a PE32 binary, it's left alone. All the needed certificates are automatically generated; all signatures are backdated to Y2K and stay valid at least until Y3K; every tool is run in place, no services and no network activity are involved.

Known issues (probably harmless but annoying):

make: Circular /home/lxe/Code/mxe-shared/usr/x86_64-pc-linux-gnu/installed/cc <- /home/lxe/Code/mxe-shared/usr/x86_64-pc-linux-gnu/installed/snakeoil dependency dropped.
make: Circular download-x86_64-pc-linux-gnu~cc <- download-x86_64-pc-linux-gnu~snakeoil dependency dropped.

I wanted to make snakeoil a prerequisite of every $(MXE_TARGETS) target (and thus made cc depend on it) but must have messed up the dependencies. @pahaze, would appreciate if you take a look.

In the meantime, I am porting bash/apt/dpkg (and tar if tar is involved) and adding the catch-up hook as described above.

treeswift commented 1 year ago

Commit 1d7ffe3ec3c6cb0a0632a934ebdbe0f8f06e4953 in subsystem/deployment provides implicit signing.

treeswift commented 1 year ago

https://github.com/armdevvel/mxe-SHARED/pull/23 for wget

treeswift commented 1 year ago

https://github.com/armdevvel/mxe-SHARED/pull/24 for perl

treeswift commented 1 year ago

https://github.com/armdevvel/mxe-SHARED/pull/27 for tar

treeswift commented 1 year ago

NSSM (Never Surrender Service Manager) progress tracked here: https://github.com/treeswift/nssm/issues/1

treeswift commented 1 year ago

https://github.com/armdevvel/mxe-SHARED/pull/30 for nssm

treeswift commented 1 year ago

Narrowing down our sshd/telnetd options.

  1. dropbear is simple and its fork() use cases are trivial (it's possible to make sure that only one successor survives). Ditto tinyssh.
  2. KPym uses a Jurassic version of cryptlib (which itself has a messy license + one has to file a form to get source code), but is otherwise well adapted to Windows. Should be relatively easy to fork and adapt it to libssh (LGPL, but I'll bite the bullet).
  3. An open source Windows friendly telnetd should be actually be good enough for development/debugging. Unfortunately, hk-telnet-server (the best option I could find) doesn't have published source code (same "e-mail us and let's talk" approach).

Advancing in all three directions, mainly in (1) and (2).

treeswift commented 12 months ago

Related: https://github.com/armdevvel/mxe-SHARED/issues/42

treeswift commented 12 months ago

Note: I checked sshd/sftp as completed, but rsyncd is still a nice to have.

treeswift commented 11 months ago

Consider https://github.com/void-linux/xbps as the package manager of choice (evaluate).

Reason: xbps is 2-clause BSD while dpkg is GPL.

treeswift commented 10 months ago

Toybox aliases are now created as batch files, e.g. renice.cmd. Since there are no regular-file symlinks on NTFS (only directory symlinks implemented as reparse points), the nearest replacement seems to be hardlinks. Hardlinks packed into archives become regular files. A temporary solution may involve toybox's self-registration in the directory of its deployment as its whitelisted aliases. A permanent solution would involve a post-install script (the earlier we have xbps, the better).

This is, so far, one of the two primary use cases of a post-install script, the other one being sshd registration as a service.