-
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathREADME.sh.out.txt
617 lines (326 loc) · 29 KB
/
README.sh.out.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
Ubiquitous Bash (public domain, no copyright, CC0)
Multiplatform structured programming middleware.
_ DIRECTORIES _
*) Call script (recursively with new or imported session), files, and other programs from same directory as script location.
*) Safe removal of temporary directories. Process termination trapping - SIGTERM, SIGINT, etc.
_ MODULAR _
*) Create new software projects by 'fork' script.
*) Hierarchical dependency declaration. Inclusion of either all or only desired functions and tests.
*) Override at runtime by '_local/ops.sh' and similar files.
_ OPERATING SYSTEM and VIRTUALIZATION _
*) Bootable OS, LiveISO, LiveUSB building and customization simultaneously through ChRoot, rsync, BIOS, UEFI, VirtualBox, Qemu, convertible to/from Docker.
*) Hibernation and/or persistent filesystems within LiveISO, LiveUSB, as native bootable alternative to virtualization provided 'save state' or 'nonpersistence'.
*) Application virtualization (and graphical applications) through several fallback backends ('_userChRoot', '_userVBox', '_userQemu', '_userDocker') .
*) Guest program to launch, translated fileparameters, and network filesystem mappings indicated by batch and shell scripts from 'hostToGuestISO' temporary CDROM disc file.
*) Groups of virtual machines portability forced by '_labVBox' (notably useful with PFSense to simulate complete WAN network configuration at high fidelity).
*) Consistent apparent location of project directory through '_abstractfs' (notably used by 'arduinoUbiquitous' to make firmware builds portable).
*) Home directory portability, and persistence or nonpersistence, forced by '_fakeHome' (notably used by 'webClient' to force browser instances).
*) Legacy OS portability through '_winehere' and '_dosbox' .
*) MSW compatibility integrated by portable 'ubcp' 'ubiquitous bash cygwin portable' and 'anchor' 'shortcut' batch files simultaneously interpretable as bash script (due to interleaved 'comment' characters).
*) Linux Kernel configuration review, tradeoffs, and recommendations ('_kernelConfig_desktop', '_kernelConfig_mobile', '_kernelConfig_panel').
*) Hardware support (eg. 'Lenovo x220t', 'Huion h1060p', etc) .
_ INTER-PROCESS COMMUNICATION _
*) Multiple-input multiple-output directory pipes, triple buffers, and searchable 3D coordinate spaces, interfacing between programs through 'MetaEngine' .
*) 'Broadcast' software bus 'queue' more similar to hardware bus (eg. 'CAN bus', 'UART', 'I2C', etc) emulating 'shared pair of wires'.
*) Pipes automatically recreated through '_demand_broadcastPipe_aggregatorStatic', '_aggregator_read', '_aggregator_write' .
*) Triple buffers directory through '_demand_broadcastPipe_page', '_page_read', '_page_write' .
*) Database IPC through '_db_read', '_db_write' (may track Virtual Machine or other simulated hardware UART serial ports to connect through software IPC).
*) Network adapters through '_aggregatorStatic_socket_unix_server', '_aggregatorStatic_socket_unix_client', '_aggregatorStatic_socket_tcp_server', '_aggregatorStatic_socket_tcp_client', '_page_socket_tcp_server', '_page_socket_tcp_client', '_page_socket_unix_server', '_page_socket_unix_client' .
_ DEV _
*) Situational awareness command-line Bash and Python prompts after '_setupUbiquitous' .
*) Equation solver ('c', '_clc') added to Bash and Python prompts after '_setupUbiquitous' ('Qalculate' and 'GNU Octave' backends).
*) Python to Bash and Bash to Python bindings with Ubiquitous Bash functions (eg. ' print(_getScriptAbsoluteFolder()) ' )
*) Build dependencies, compiling, and calling other build systems (eg. cmake).
_ REMOTE _
*) NAT public services and inbound SSH fallbacks. AutoSSH robust configuration, automatic restart, tested over multiple years.
*) SSH automatic multi-path and multi-hop.
*) VNC to existing (ie. '_detect_x11') and new (ie. 'x11vnc') display sessions, through SSH commands without installed service.
*) Cloud - 'rclone', 'aws', 'gcloud', 'digitalocean', 'linode', etc (notably cloud services may efficiently build, test, and distribute software).
Much more functionality exists than listed here. At approximately ~1500 function declarations, ~20000 lines of shell script code, ~1MB (~1 million characters), years of intense development, and years of thorough testing, Ubiquitous Bash exists to resolve many very significant and substantial software issues.
'_page'PageBreak -H-H-H-H- PageBreak -H-H-H-H- PageBreak -H-H-H-H- PageBreak -H-H-H-H- PageBreak
_ Demonstrations _
__ Situational Awareness Command-Line Bash and Python Prompts __
(pictured right)
'_picture' 'zImage_commandPrompt.png' '485px'
__ Linux Application Virtualization __
'_cells_begin'
'_cells_row_begin'
'_cells_speck_begin' '460px'
[0;37;100m[0;34m ./ubiquitous_bash.sh _userQemu leafpad ./CC0_license.txt [0m[0m
'_cells_speck_end'
'_cells_row_end'
'_cells_end'
'_image' 'zImage_userQemu_window_nix.png' '275px'
__ MSW Application Virtualization __
'_cells_begin'
'_cells_row_begin'
'_cells_speck_begin' '485px'
[0;37;100m[0;34m ./ubiquitous_bash.sh _userVBox notepad.exe ./CC0_license.txt [0m[0m
'_cells_speck_end'
'_cells_row_end'
'_cells_end'
'_image' 'zImage_userVBox_window_MSW.png' '275px'
__ Queue Inter-Process Communication __
'_picture' 'zImage_queue_experiment.jpg' '485px'
(pictured right)
__ _test-shell __
'_cells_begin'
'_cells_row_begin'
'_cells_speck_begin' '460px'
[0;34m './ubiquitous_bash.sh' '_test-shell' '2>/dev/null' [0m
[0;37;100m# [1;32;46m Sanity... [0m[0m
[0;37;100m# [1;32;46m PASS [0m[0m
[0;37;100m# [1;32;46m Permissions... [0m[0m
[0;37;100m# [1;32;46m PASS [0m[0m
[0;37;100m# [1;32;46m Argument length... [0m[0m
[0;37;100m# [1;32;46m PASS [0m[0m
[0;37;100m# [1;32;46m Absolute pathfinding... [0m[0m
[0;37;100m# [1;32;46m PASS [0m[0m
'_cells_speck_end'
'_cells_row_end'
'_cells_end'
__ VM - Create and Multiplatform __
Virtualization commands (at least '_userVBox', '_editVBox) may be usable from both GNU/Linux and Cygwin/MSW hosts. Cygwin/MSW hosts should be sufficient for end-user applications under narrow conditions, though such functionality may be more robust and complete from GNU/Linux hosts. Developers using MSW (ie. for VR software reasons) are strongly encouraged to use GNU/Linux guest with nested virtualization as a GNU/Linux host and workstation. At least VMWare Workstation installed at a MSW host can provide nested virtualization compatible with a guest installation of VirtualBox.
[0;37;100m[0;34m export vmSize=24576 [0m[0m
[0;37;100m[0;34m ./_bin.bat ./ubiquitous_bash.sh _createRawImage [0m[0m
[0;37;100m[0;34m ./_bin.bat ./ubiquitous_bash.sh _img_to_vdi [0m[0m
[0;37;100m[0;34m ./_bin.bat ./ubiquitous_bash.sh _userVBox [0m[0m
'_page'PageBreak -H-H-H-H- PageBreak -H-H-H-H- PageBreak -H-H-H-H- PageBreak -H-H-H-H- PageBreak
_ Examples _
__ DIRECTORIES, MODULAR __
___ BOM_designer ___
Hierarchical text-based Bill-of-Materials. Finds all all files with extensions '.lbom.csv', '.lbom.txt', '*.lbom' . Compiles a consolidated list.
___ gEDA_designer ___
Designer. Extensively automates integration and manufacturing specification files (eg. PDF, CAD model, 'gerber', PCB photolithography masks, etc).
___ scriptedIllustrator ___
From shell script to interleaved self-modifying shell script and markup of 'html', 'pdf', 'mediawiki', 'markdown', etc.
https://github.com/mirage335/scriptedIllustrator
__ OPERATING SYSTEM and VIRTUALIZATION __
___ arduinoUbiquitous ___
Both '_abstractfs' and '_fakeHome' contain 'Arduino', related programs, and libraries, to create firmware projects with portability comparable to "makefile" or "cmake" projects. External debug tool interfaces (eg. 'gdb', 'ddd') are also integrated.
https://github.com/mirage335/arduinoUbiquitous
___ webClient ___
Forces browser profile portability and multi-instance through '_fakeHome'.
https://github.com/mirage335/webClient
___ freecad-assembly2 ___
FreeCAD assembly2 and a2plus module portability through '_fakeHome'.
https://github.com/mirage335/freecad-assembly2
___ kit-raspi ___
RasPi and x64 bootable OS, LiveISO, LiveUSB building and customization mostly through '_chroot', 'cp -a', 'rsync' .
https://github.com/mirage335/ubiquitous_bash/tree/master/_lib/kit/raspi
__ INTER-PROCESS COMMUNICATION __
___ metaBus ___
Reference implementation illustrating connecting multiple programs through 'MetaEngine' .
https://github.com/mirage335/metaBus
__ DEV __
___ pcb-ioAutorouter ___
Compiles and contains installation of 'pcb' with patch for 'autorouter' compatibility.
__ REMOTE __
___ CoreAutoSSH ___
Remote logical network configuration . Automatic SSH multi-path and multi-hop.
https://github.com/mirage335/CoreAutoSSH
'_page'PageBreak -H-H-H-H- PageBreak -H-H-H-H- PageBreak -H-H-H-H- PageBreak -H-H-H-H- PageBreak
_ Usage _
[0;37;100m[0;34m./ubiquitous_bash.sh[0m
[0;37;100m./ubiquitous_bash.sh _test[0m
[0;37;100m./ubiquitous_bash.sh _setup [0m[0m
Projects using Ubiquitous Bash as a git submodule can be created by 'fork' script. Examples of common modifications to such projects are available at '_lib/kit' directory. Project name, and developer name, must be set by editing 'fork' script appropriately.
[0;37;100m[0;34m# Move 'fork' to a different directory and edit appropriately.[0m
[0;37;100m./fork [0m[0m
__ Python __
[0;37;100m[0;34m./ubiquitous_bash.sh _python[0m
[0;37;100mprint(_getScriptAbsoluteFolder())[0m
[0;37;100m_bin("_getAbsoluteFolder .")[0m
[0;37;100m_bin("_getAbsoluteLocation .")[0m
[0;37;100m_clc('1 + 2')[0m
[0;37;100m_qalculate('1 + 2')[0m
[0;37;100m_octave('1 + 2')[0m
[0;37;100mprint(_octave_solve('(y == x * 2, x)' ))[0m
[0;37;100m_bash( '-i' )[0m
[0;37;100m_python[0m
[0;37;100mexit()[0m
[0;37;100mexit[0m
[0;37;100mexit() [0m[0m
__ NixOS (nix-shell) __
[0;37;100m[0;34mns [0m[0m
Automatic installation through _test , _getMinimal , etc, for GNU/Linux, etc. Shortcut functions for 'nix-shell' , etc .
__ rclone, croc, sshf, vncf __
[0;37;100m[0;34mrclone [0m[0m
[0;37;100m[0;34mcroc [0m[0m
Automatic installation through _test , _getMinimal , etc, for GNU/Linux, etc. Normally usable through Cygwin/MSW if in path (ie. if installed by 'chocolatey').
[0;37;100m[0;34msshf user@IPaddr [0m[0m
[0;37;100m[0;34mvncf IPaddr [0m[0m
Force remote access - vncf in particular will attempt root (ie. display manager GUI) by default, or user session. Especially compatible with 'rotten_install' cloud init scripts, and can connect to cloud Server/VPS by reused IP address and SSH public key. Cygwin/MSW users must install native vncviewer from 'TigerVNC' installer package .
__ Support __
Ubiquitous Bash is supported on an *urgent basis*, nominally *immediate*, due to long established dependability and uses. Any support request will be attended to ASAP. Please do not hesitate to contact maintainer "mirage335" by any means.
Bug reports, feature requests, forks, and especially pull requests, are highly welcome. Please keep in mind "defense in depth" and explicit tests are preferred measures to ensure against regressions. Ubiquitous Bash GitHub repository is monitored frequently if not in real time.
'_page'PageBreak -H-H-H-H- PageBreak -H-H-H-H- PageBreak -H-H-H-H- PageBreak -H-H-H-H- PageBreak
_ Design _
Entry points for developers are described here. To understand Ubiquitous Bash, often it will be necessary to search for these bits of shell code in 'ubiquitous_bash.sh' or other related files.
[0;37;100m[0;34m_findFunction() {[0m
[0;37;100mfind . -not -path "./_local/*" -name '*.sh' -type f -size -3000k -exec grep -n "$@" '{}' /dev/null \;[0m
[0;37;100m} [0m[0m
__ DIRECTORIES __
Script absolute 'location', script absolute 'folder', unique "sessionid", will be set, and temporary directories created, as specified by structure/globalvars.sh .
[0;37;100m[0;34mexport sessionid=$(_uid)[0m
[0;37;100mexport scriptAbsoluteLocation=$(_getScriptAbsoluteLocation)[0m
[0;37;100mexport scriptAbsoluteFolder=$(_getScriptAbsoluteFolder)[0m
[0;37;100m[[ "$tmpSelf" == "" ]] && export tmpSelf="$scriptAbsoluteFolder"[0m
[0;37;100mexport safeTmp="$tmpSelf""$tmpPrefix"/w_"$sessionid" [0m[0m
New "sessionid" is commonly obtained to separate temporary directories. Temporary directories are created by '_start', removed by '_stop'. Process termination signal (eg. SIGTERM, SIGINT) calls '_stop'.
[0;37;100m[0;34m_userFakeHome_procedure() {[0m
[0;37;100mexport actualFakeHome="$instancedFakeHome"[0m
[0;37;100mexport fakeHomeEditLib="false"[0m
[0;37;100m_fakeHome "$@"[0m
[0;37;100m}[0m
[0;37;100m_userFakeHome_sequence() {[0m
[0;37;100m_start[0m
[0;37;100m_userFakeHome_procedure "$@"[0m
[0;37;100m_stop $?[0m
[0;37;100m}[0m
[0;37;100m_userFakeHome() {[0m
[0;37;100m"$scriptAbsoluteLocation" _userFakeHome_sequence "$@"[0m
[0;37;100m}[0m
[0;37;100m"$scriptAbsoluteLocation" _userFakeHome /bin/true || _stop 1 [0m[0m
__ MODULAR __
After 'fork' script has created a new project, new code may be added to the usual files in the '_prog' directory among other places. These and other desired shell script fragments are 'compiled' .
Typical program entry point is usually '_main()' defined through '_prog/program.sh' file.
[0;37;100m[0;34m./compile.sh [0m[0m
Another possibility is to edit 'lean.sh' directly. Such is strictly monolithic and inconvenient to upgrade, not recommended for most software projects which tend to become quite large rather quickly.
[0;37;100m[0;34mexport ub_setScriptChecksum_disable='true'[0m
[0;37;100m#...[0m
[0;37;100m#####Entry[0m
[0;37;100m#...[0m
[0;37;100m_main "$@" [0m[0m
Any function name with '_' as first character, can be called externally as first parameter to script.
[0;37;100m[0;34m./ubiquitous_bash.sh _echo echo [0m[0m
'Complete' 'Ubiquitous Bash' '_test' will test (and install for some 'Linux' 'distributions' ie. 'Debian') such complicated dependencies as 'VirtualBox' and 'Docker'.
[0;37;100m[0;34m./ubiquitous_bash.sh _test[0m
[0;37;100m./ubiquitous_bash.sh _setup [0m[0m
'_page'PageBreak -H-H-H-H- PageBreak -H-H-H-H- PageBreak -H-H-H-H- PageBreak -H-H-H-H- PageBreak
_ Version _
v3.113
Semantic versioning is applied. Major version numbers (v2.x) indicate a compatible API. Minor numbers indicate the current feature set has been tested for usability. Any git commits not tagged with a version number may be technically considered unstable development code. New functions present in git commits may be experimental.
In most user environments, the latest git repository code will provide the strongest reliability guarantees. Extra safety checks are occasionally added as possible edge cases are discovered.
_ Conventions _
*) Assign ports in ranges 55000-65499 and 50025-53999 to specialized internal servers with opsauto procedures.
*) Strictly single use ports are by default assigned in range 54000-54999 .
'_page'PageBreak -H-H-H-H- PageBreak -H-H-H-H- PageBreak -H-H-H-H- PageBreak -H-H-H-H- PageBreak
_ Safety _
*) DANGER: Do NOT 'open' 'loopback' backends (eg. _openImage, _openChRoot, _openVBoxRaw ) as read/write (ie. 'edit' instead of 'user') if reboot has occurred while open. Wrong 'loopback' 'device' may be overwritten. All 'loopback' backends are intended ONLY for developers or for building 'operating system images'. End-user activity should never cause a call to a loopback device, even indirectly.
*) Nevertheless, significant safety checks are in place to reduce risk of data loss in any way other than 'loopback' 'device' conflict. If the specific data referenced by a 'loopback' 'device' is time-consuming to recreate, consider '_bupStore' as 'version control' 'backup'.
*) VirtualBox raw image backend is complicated, possibly fallible, and may not be compatible with MSW hosts. End-users should instead use a file converted to 'VDI', with a copy of the 'raw' file for Qemu as a fallback if necessary.
*) Cloud backends may still be experimental if workable at all.
*) Docker backends have not proven fundamentally or frequently useful, and thus may not be recently tested for interoperability (eg. with VirtualBox, UEFI, LiveISO, LiveUSB etc).
*) Obviously, safeRMR is not foolproof. Use this function to guard against systematic errors, not carelessness.
*) Test any modifications to safeRMR in a safe place.
*) A few commands and internal functions, eg. "type" and "_timeout", are used to ensure consistent behavior across platforms.
*) Interdependencies between functions within the ubiquitous_bash library may not be documented. Test lean configurations in a safe place.
*) ChRoot based virtualization by itself does not provide any security guarantees, especially under Linux hosts. Destruction of host filesystem is possible, especially for any guest filesystem that has been bind mounted.
*) RasPi image must be closed properly (if opened by chroot) before flashing. Doing so will re-enable platform specific "/etc/ld.so.preload" configuration.
*) Images opened in docker must be closed properly to be bootable.
*) Launching "user" ChRoot as root user has not yet been extensively tested.
*) Shared resource locking (eg. disk images for ChRoot, QEMU, VBox) is handled globally. Do NOT attempt to launch a virtual machine with one backend while still open in another. Likewise, separate virtual machines should be handled as separate projects.
*) Do NOT add empty functions anywhere, as this will cause the script to crash before doing anything. At least include a do-nothing command (ie. /bin/true).
*) Each project using ubiquitous_bash should incorporate it statically. Dynamic system-wide linking with other projects is STRONGLY discouraged. However, projects based upon ubiquitous_bash might be suitable for system-wide installation if designed with this in mind.
*) Anchors pointing at non-existent functions may cause themselves to be executed by the "ubiquitous_bash.sh" script they point to - resulting in an endless loop. However, the worst case scenario is generally limited to user log file spam.
*) WARNING: Do NOT export specimen directories as part of Eclipse projects. ONLY export project files, and reference specimen directories relative to the workspace path variable. Symlinks to temporary and scope directories may not be intended for the recursive copy that would result. New users do not need to worry about this until they know what it means.
*) Atom packages are not necessarily safe for portable operation. At least "Command Toolbar" makes reference to absolute file paths. Atom packages installed with "apm", as would be done for git submodules, also make reference to absolute file paths. Atom cannot be relied upon as a general purpose project specific IDE.
For "Command Toolbar, a workaround is to delete, and manually edit, "_lib/app/atom/home/.atom/command-toolbar.json" .
'_page'PageBreak -H-H-H-H- PageBreak -H-H-H-H- PageBreak -H-H-H-H- PageBreak -H-H-H-H- PageBreak
_ Future Work _
*) Voice commands using Pocket Sphinx and limited vocabulary. Specifically NOT a 'digital assistant'.
*) Voice feedback.
*) Replace all use of 'losetup' with 'dmsetup' uniquely named 'dm-linear' 'devices', after ' blockdev --getsz ', as with 'packetDrive' .
*) Demonstrate ability to preserve less dependable SSDs (ie. typical SD Cards) by automatically detecting usable '/dev/shm' as "$metaDir" (derived from "$metaTmp") location.
*) Self-contained SAMBA server would provide useful virtualization compatibility guarantees if tightly integrated. QEMU seems to already include a solution using similar methods.
*) Self-contained SSH server (not requiring full virtualization images) would allow full self-testing of SSH procedures.
*) Merge HostedXen, and other related virtualization methods into ubiquitous bash.
*) Support shutdown hooks through init daemons other than systemd.
*) Service/cron installation hooks.
*) Support Xen (xl) as a virtualization backend.
*) Support LXC as a virtualization backend.
*) Integrate AppImage build scripts.
*) Investigate Kubernetes integration - https://kubernetes.io .
*) Investigate HyperKit relevance - https://github.com/moby/hyperkit .
*) Investigate RancherVM relevance - https://github.com/rancher/vm .
*) Investigate LXD relevance - https://www.ubuntu.com/containers/lxd .
*) Document FireJail and AppImage examples.
*) Set up host architecture specific hello binary compilation and switching.
*) Add type check to open/close functions (if not already present), preventing, among other things, collisions between virtualization platforms.
*) Self-hosted snippet manager. Possibly as 'Konsole' shortcuts.
*) Graphical DRAKON and/or Blockly/SigBlockly examples.
*) Nested userChRoot in userChRoot . Beware, this bizarre scenario might cause guest corruption, a mess of mounts, or worse.
*) Hard and soft cpu, memory, swap, I/O, and storage limits on all subprocesses independent of full virtualization.
*) Automatically adjust limits and priorities based on system latency impacts correlated to program operation.
*) Demonstrate backgrounding in _main as a means to launch multiple daemonized services under control of a single script instance.
*) MSW(/Cygwin) may benefit from reimplementations as simple 'C' programs, due to apparently relatively high CPU usage caused by "bash" script loops under Cygwin. However, due to the absolute portability of 'reference' "bash" implementation, expense of any rewrites, and very limited functionality needed by MSW, such should only be done in an unlikely extreme abundance of resources and/or extreme necessity.
*) MSW(/Cygwin) 'tripleBuffer' "bash" implementation may benefit from a simple 'C' program to create/read/write(/delete) files as shared memory files. A precompiled binary may be usable.
*) Dynamically reading/writing from/to multiple pipes/TCP/sockets (new pipes added/removed without resetting existing pipes) may be possible for a binary C program with multiple threads. Such a binary program must nevertheless be built by 'Ubiquitous Bash', provided with 'Ubiquitous Bash' ( _bin/ ) , and architecture overridden by 'Ubiquitous Bash' (ie. precompiled binaries for '-amd64' , '-armel' , etc , must be aliased by a single shell script function ).
*) Reference packetization implementation.
*) Reference peripheral identification implementation.
*) Simple one-input-multiple-output shared memory 'tripleBuffer' channel to 'publish' high performance data streams (eg. VR compositor frames) by most recent page.
'_page'PageBreak -H-H-H-H- PageBreak -H-H-H-H- PageBreak -H-H-H-H- PageBreak -H-H-H-H- PageBreak
_ Known Issues _
*) Typical TCP/IP and related software cannot be configured for resilience under packet corruption, heavy packet loss, multi-second latency, or address/ap roaming. SSH in particular may fail erratically due to packet corruption. A proxy handling these issues through named pipes and tcpwrappers may not be possible, nor may it be feasible to workaround such SSH failures. Best to upload "$scriptAbsoluteLocation" and call entire function at server side with only one remote SSH command.
https://stackoverflow.com/questions/28643392/bash-scripting-permanent-pipe
*) Some ChRoot mounting functions are in fact generic, and should be renamed as such after audit.
*) Nested virtualization needs further testing and documentation, especially beyond QEMU.
*) ChRoot close function might have a path to exit true while mounts are still active.
*) KWrite under ChRoot may lock up the mounts, preventing _closeChRoot from working. Error messages suggest PulseAudio is not working normally. Nevertheless, cleanup seems to take place through the systemd hook upon shutdown.
*) LeafPad sometimes fails to launch from Docker container, apparently due to X11 issues. Not a problem for all graphical applications apparently (eg. 'xmessage').
*) BashDB is given a "frame 0" command to show large file source code window in emacs "realgud".
*) Order of termination does not strictly seem to preserve parent scripts with uncooperative children, when "_daemonAction" is used to terminate all daemon processes. This has the effect of allowing uncooperative children to interfere with logging and stop processes the parent may need to implement in non-'emergency' situations.
*) SSH over Tor through "_proxyTor_direct" has not been tested as is under MSW/Cygwin hosts. With the adoption of socat instead of netcat, this should be straightforward.
*) An error has been thrown to standard error upon shutdown in some rare cases. Preventative measures are now believed to be effective, however, as the error is intermittent, bug reports are encouraged. Without sufficiently concise and relevant information, this may not be resolvable.
realpath: .../ubiquitous_bash/w_.../.ssh/.../cautossh: No such file or directory
find: '.../ubiquitous_bash/w_.../.ssh/.../w_...': No such file or directory
'_page'PageBreak -H-H-H-H- PageBreak -H-H-H-H- PageBreak -H-H-H-H- PageBreak -H-H-H-H- PageBreak
_ Reference _
https://developer.apple.com/library/content/documentation/Darwin/Conceptual/index.html
https://en.wikipedia.org/wiki/Software_architecture
https://en.wikipedia.org/wiki/Middleware
https://bugs.eclipse.org/bugs/show_bug.cgi?id=122945
https://superuser.com/questions/163957/is-eclipse-installation-portable
https://www.suse.com/support/kb/doc/?id=7007602
https://en.wikipedia.org/wiki/CPU_shielding
https://wiki.linuxfoundation.org/realtime/documentation/howto/tools/cpu-partitioning/irqbalanced
https://wiki.linuxfoundation.org/realtime/documentation/howto/tools/cpu-partitioning/cpusets
https://en.wikipedia.org/wiki/Scene_graph
https://github.com/PipelineAI/pipeline
https://wiki.bash-hackers.org/scripting/obsolete
https://novnc.com/info.html
https://novnc.com/screenshots.html
https://docs.unrealengine.com/en-US/InteractiveExperiences/UMG/UserGuide/WidgetTypeReference/WebBrowser/index.html
https://www.highfidelity.com/blog/vnc-in-vr-synchronized-virtual-desktops-49bc4fc428e7
https://github.com/shellinabox/shellinabox
https://uploadvr.com/virtc-virtual-desktop/
https://docs.microsoft.com/en-us/windows-server/remote/remote-desktop-services/clients/remote-desktop-web-client-admin
https://www.youtube.com/watch?v=NYEyyVDsapw
https://en.wikipedia.org/wiki/HashiCorp
https://en.wikipedia.org/wiki/Terraform_(software)
https://www.terraform.io/docs/language/index.html
https://en.wikipedia.org/wiki/Vagrant_(software)
https://learn.hashicorp.com/tutorials/packer/docker-get-started-provision
https://wiki.debian.org/Vagrant
'Libvirt is a good provider for Vagrant because it's faster than VirtualBox and it's in the main repository.'
https://unix.stackexchange.com/questions/297792/how-complex-can-a-program-be-written-in-pure-bash
https://docs.docker.com/engine/admin/volumes/volumes/
'While bind mounts are dependent on the directory structure of the host machine, volumes are completely managed by Docker.'
https://winaero.com/pin-a-batch-file-to-the-start-menu-or-taskbar-in-windows-10/
' cmd /c "full path to your batch file" '
'_page'PageBreak -H-H-H-H- PageBreak -H-H-H-H- PageBreak -H-H-H-H- PageBreak -H-H-H-H- PageBreak
_ Credit _
*) Thanks to "rocky" for workaround to bashdb/emacs issue - https://github.com/realgud/realgud/issues/205#issuecomment-354851601 .
_ Included Works _
*) MAKEDEV . Obtained from Debian Stretch. For all details, see _presentation/MAKEDEV .
*) GoSu . See https://github.com/tianon/gosu . Binaries and signatures may be included in repository. License, GPLv3 . License text at https://www.gnu.org/licenses/gpl-3.0.en.html .
*) Firefox .
*) geth
*) parity
*) ethminer
_ Bundle _
Larger files (eg. emacs configuration, blockchain) are not included with 'ubiquitous bash' directly, or as a submodule. If needed, 'clone' to '_bundle' directory (which is ignored).
git clone --depth 1 --recursive [email protected]:mirage335/ubiquitous_bash_bundle.git _bundle
_ Copyright _
All content in this folder not owned by other authors is intended to be public domain. Other copyright notices may be provided as templates. See license.txt for details.