environment_information 1.4.99

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of environment_information might be problematic. Click here for more details.

Files changed (80) hide show
  1. checksums.yaml +7 -0
  2. data/README.md +1287 -0
  3. data/bin/envi +7 -0
  4. data/bin/fast_envi +7 -0
  5. data/doc/README.gen +1044 -0
  6. data/doc/todo/TODO_FOR_THE_ENVIRONMENT_INFORMATION_PROJECT.md +48 -0
  7. data/environment_information.gemspec +135 -0
  8. data/lib/environment_information/base/base.rb +166 -0
  9. data/lib/environment_information/class/class.rb +2829 -0
  10. data/lib/environment_information/colours/colours.rb +224 -0
  11. data/lib/environment_information/colours/sfancy.rb +19 -0
  12. data/lib/environment_information/colours/simp.rb +19 -0
  13. data/lib/environment_information/constants/array_tracked_components.rb +210 -0
  14. data/lib/environment_information/constants/constants.rb +17 -0
  15. data/lib/environment_information/constants/encoding.rb +21 -0
  16. data/lib/environment_information/constants/error_line.rb +17 -0
  17. data/lib/environment_information/constants/file_constants.rb +102 -0
  18. data/lib/environment_information/constants/misc.rb +86 -0
  19. data/lib/environment_information/constants/namespace.rb +14 -0
  20. data/lib/environment_information/constants/newline.rb +16 -0
  21. data/lib/environment_information/constants/regex.rb +30 -0
  22. data/lib/environment_information/constants/temp_directory.rb +52 -0
  23. data/lib/environment_information/gui/gtk2/environment_information.rb +35 -0
  24. data/lib/environment_information/gui/gtk3/environment_information.rb +34 -0
  25. data/lib/environment_information/gui/libui/environment_information.rb +74 -0
  26. data/lib/environment_information/gui/shared_code/environment_information_module.rb +409 -0
  27. data/lib/environment_information/misc_components/README.md +3 -0
  28. data/lib/environment_information/misc_components/cflags.rb +36 -0
  29. data/lib/environment_information/misc_components/cpuinfo.rb +64 -0
  30. data/lib/environment_information/misc_components/operating_system.rb +54 -0
  31. data/lib/environment_information/misc_components/operating_system_bit_type.rb +42 -0
  32. data/lib/environment_information/misc_components/ram.rb +30 -0
  33. data/lib/environment_information/misc_components/rubygems_installation_directory.rb +54 -0
  34. data/lib/environment_information/misc_components/screen_resolution.rb +50 -0
  35. data/lib/environment_information/project/project.rb +27 -0
  36. data/lib/environment_information/queries/README.md +2 -0
  37. data/lib/environment_information/queries/complex_version.rb +273 -0
  38. data/lib/environment_information/queries/pkg_config.rb +125 -0
  39. data/lib/environment_information/queries/simple_version.rb +217 -0
  40. data/lib/environment_information/requires/require_asciitable.rb +15 -0
  41. data/lib/environment_information/requires/require_the_constants.rb +7 -0
  42. data/lib/environment_information/requires/require_the_environment_information_project.rb +23 -0
  43. data/lib/environment_information/requires/require_the_individual_misc_components.rb +30 -0
  44. data/lib/environment_information/requires/require_the_toplevel_methods.rb +22 -0
  45. data/lib/environment_information/toplevel_methods/autogenerate_all_relevant_methods.rb +152 -0
  46. data/lib/environment_information/toplevel_methods/cd.rb +16 -0
  47. data/lib/environment_information/toplevel_methods/e.rb +43 -0
  48. data/lib/environment_information/toplevel_methods/hash.rb +60 -0
  49. data/lib/environment_information/toplevel_methods/internet_is_available.rb +30 -0
  50. data/lib/environment_information/toplevel_methods/is_on_roebe.rb +16 -0
  51. data/lib/environment_information/toplevel_methods/menu.rb +90 -0
  52. data/lib/environment_information/toplevel_methods/misc.rb +322 -0
  53. data/lib/environment_information/toplevel_methods/n_subcommands.rb +31 -0
  54. data/lib/environment_information/toplevel_methods/prefix_to_use.rb +39 -0
  55. data/lib/environment_information/toplevel_methods/register_this_component_is_missing.rb +61 -0
  56. data/lib/environment_information/toplevel_methods/remote_url_of_this_program.rb +45 -0
  57. data/lib/environment_information/toplevel_methods/replay_from_the_stored_file.rb +84 -0
  58. data/lib/environment_information/toplevel_methods/return_alias_to.rb +30 -0
  59. data/lib/environment_information/toplevel_methods/return_pkgconfig_based_programs.rb +28 -0
  60. data/lib/environment_information/toplevel_methods/return_remote_gtk2_version.rb +54 -0
  61. data/lib/environment_information/toplevel_methods/return_simple_version_based_programs.rb +28 -0
  62. data/lib/environment_information/toplevel_methods/return_version_of_this_program.rb +182 -0
  63. data/lib/environment_information/toplevel_methods/show_all_available_components.rb +192 -0
  64. data/lib/environment_information/toplevel_methods/write_what_into.rb +24 -0
  65. data/lib/environment_information/version/version.rb +25 -0
  66. data/lib/environment_information/www/sinatra_interface.rb +213 -0
  67. data/lib/environment_information/www/webobject_interface.cgi +29 -0
  68. data/lib/environment_information/yaml/array_default_programs_on_linux.yml +15 -0
  69. data/lib/environment_information/yaml/array_lfs_core_programs.yml +37 -0
  70. data/lib/environment_information/yaml/array_science_cluster.yml +12 -0
  71. data/lib/environment_information/yaml/array_tracked_non_programs.yml +13 -0
  72. data/lib/environment_information/yaml/array_tracked_programs.yml +215 -0
  73. data/lib/environment_information/yaml/array_tracked_xorg_components.yml +37 -0
  74. data/lib/environment_information/yaml/colours.yml +3 -0
  75. data/lib/environment_information/yaml/query_to_use_for_the_individual_components.yml +264 -0
  76. data/lib/environment_information.rb +5 -0
  77. data/test/testing_environment_information.rb +26 -0
  78. data/test/testing_missing_components.rb +9 -0
  79. data/test/testing_prefix_for_the_environment_information_project.rb +20 -0
  80. metadata +177 -0
data/README.md ADDED
@@ -0,0 +1,1287 @@
1
+ [![forthebadge](https://forthebadge.com/images/badges/built-with-love.svg)](https://www.gobolinux.org/)
2
+ [![forthebadge](https://forthebadge.com/images/badges/made-with-ruby.svg)](https://www.ruby-lang.org/en/)
3
+ [![Gem Version](https://badge.fury.io/rb/environment_information.svg)](https://badge.fury.io/rb/environment_information)
4
+
5
+ ## About the environment_information gem
6
+
7
+ This project is called **EnvironmentInformation** (**environment information**).
8
+
9
+ Its primary goal is **to gather information about the environment that ruby is
10
+ presently running on** - in other words, **the host system** and its
11
+ capabilities.
12
+
13
+ This gathered information can then be shown to the user on the commandline,
14
+ or via a ruby-gtk widget, or via a sinatra-interface on the www. The main focus
15
+ for this project is on the **commandline-usage**, though. For example, the
16
+ file at **bin/fenvi**, which is part of this project, can be used to
17
+ quickly show all versions of different programs on the target computer
18
+ system.
19
+
20
+ To provide a short overview how this may look, taken on the **KDE konsole**
21
+ and **bash**, have a look at the following image on a black background:
22
+
23
+ ![alt text][screenshot1]
24
+ [screenshot1]: https://i.imgur.com/KiXIIVV.png
25
+
26
+ Invocation example:
27
+
28
+ fenvi
29
+
30
+ Generated output (only showing the first five entries):
31
+
32
+ atk 2.32.0
33
+ bash 5.0.0
34
+ binutils 2.32
35
+ bison 3.4.1
36
+ bzip2 1.0.8
37
+
38
+ Do note that by default **colours** will be used, so atk may appear
39
+ in green, and the associated version will be shown in a blue
40
+ colour (actually steelblue, by default). If you do not want to use
41
+ colours, you can disable them for the current invocation run, like
42
+ in this way:
43
+
44
+ envi --no-colours
45
+ envi --no-colors
46
+ envi --disable-colours
47
+ envi --disable-colors
48
+
49
+ Take note that you can tweak most of the behaviour of **EnvironmentInformation**
50
+ via specific **commandline flags**.
51
+
52
+ To obtain **a listing of the available options**, you can invoke the
53
+ main executable called **envi** (**bin/envi**) via:
54
+
55
+ envi --help
56
+
57
+ What is meant with the term **environment**?
58
+
59
+ **Definition**:
60
+
61
+ The term **environment**, within the context of the **environment_information gem**,
62
+ is **the (software) environment** that can be discovered by the ruby version
63
+ found within the **$PATH** variable, on the given computer system at hand.
64
+
65
+ Recall that there may be situations where there is more than one
66
+ version of ruby installed, on a given computer system, in different
67
+ locations - e. g. **/usr/bin/** versus **/usr/local/bin/**
68
+ versus **/home/** or **/opt/** setups. Thus, $PATH should be kept in mind in
69
+ the event that you have multiple ruby versions on the given computer system
70
+ at hand, as the incorrect ruby version may be discovered, in certain
71
+ situations. Furthermore keep also in mind that multiple binaries may exist
72
+ at the target system, e. g. bzip at /bin but also at /usr/bin or elsewhere.
73
+
74
+ Thus, I recommend to always ensure that **$PATH** is correctly set on the
75
+ target machine. First come, first serve, so it is a good advice to keep
76
+ PATH clean, and 'logical'.
77
+
78
+ At any rate, the **information** that will be gathered by the
79
+ **EnvironmentInformation** project may also be stored more persistently
80
+ in a **standalone .html file**, if you so desire to. This .html file
81
+ could then be used for static display of the information (but may
82
+ become quickly outdated, so keep this in mind as well).
83
+
84
+ The **Environment information** project may include any of the
85
+ following as its output:
86
+
87
+ - The **GCC Version** in use on the given computer host system.
88
+ - The (Linux) Kernel in use.
89
+ - Which Ruby Version is used.
90
+ - Which Rubygem version is used.
91
+ - The path to the rubygem directory.
92
+ - What the Host CPU Model is (on Linux at the least).
93
+ - What is the the **GTK*+, **GLIB*+ and **gdk-pixbuf** version, respectively.
94
+ - Which **dhcpcd version** is available.
95
+ - What Xorg components are available, such as libX11, libxcm, libxp,
96
+ libxau.
97
+
98
+ And so on and so forth - and a lot more.
99
+
100
+ Why are there many **different ways** to query the version of a locally
101
+ installed programs?
102
+
103
+ The main reason as to why **different ways** have to be supported is because
104
+ different software is installed in different ways, making use of
105
+ information in, well - different ways.
106
+
107
+ For example: not every software comes with a **.pc** file, so we can not
108
+ rely on .pc files uniformly for every installed program. Sometines no
109
+ commandline-binary is provided, so the **--version** flag can not be
110
+ used either; and if no .pc file exists for a given program, we may
111
+ have to query the name of the **.so files** (on a linux system),
112
+ and infer the version from that.
113
+
114
+ The main class in this project is **class EnvironmentInformation**,
115
+ which resides under **module EnvironmentInformation**.
116
+
117
+ The actual query of the version is done on the toplevel, so for example:
118
+
119
+ EnvironmentInformation.gcc?
120
+
121
+ would display the version of GCC at hand.
122
+
123
+ The code there will typically try to query .pc files via **pkg**-config,
124
+ but may sometimes try to infer the version from the .so file at hand,
125
+ and sometimes it will try to run the system binary (or an associated
126
+ binary) with a -V or -v or --version flag, and parse that output.
127
+
128
+ Typically the components that will be displayed, are handled by code
129
+ that resides in the file **display.rb**. The instance variable
130
+ **@display_these_components** keeps track of which components will
131
+ be displayed, so that information about these disparate programs
132
+ and components can be tracked.
133
+
134
+ There are in general only two entries that are of interest to
135
+ class EnvironmentInformation here:
136
+
137
+ (a) The name of the program.
138
+ (b) The associated specific program version, as String, of that program.
139
+
140
+ So, for example, we may see a key→value association like:
141
+
142
+ ruby => 2.5.1
143
+
144
+ If you need a **String** representation of the dataset then you can
145
+ use the method <b>.string?</b> or <b>.stringified</b>, which will give
146
+ you a **String** instead. The **.stringified** method exists
147
+ primarily due to **convenience** alone, for people who don't
148
+ want to do much conversion on their own and just be done with it).
149
+
150
+ There are various additional helper methods, such as a reader-method
151
+ called <b>.main_string?</b> or <b>.string</b> (they are equivalent to
152
+ one another, aka one is an alias).
153
+
154
+ This should allow you to re-use the information from this gem in
155
+ other projects, such as if you wish to get the String of all
156
+ available programs, and display this on a webpage. Or, alternatively,
157
+ just use a toplevel method call, such as:
158
+
159
+ EnvironmentInformation.glibc_version?
160
+
161
+ ## How to make use of the project
162
+
163
+ There are, essentially, three recommended ways how to use the main
164
+ class of this project:
165
+
166
+ (1)
167
+
168
+ From the commandline, just call **envi** directly and pass in
169
+ specific commands to this executable (optionally).
170
+
171
+ For instance: invoke the envi-executable with the argument "ALL"
172
+ or "--all" and the class will show all information that could
173
+ be found. This is personally my favourite way how to invoke
174
+ this class. I even combine it with "FALL" or "RALL" (**--really-all**
175
+ or **--really-everything**), which will also compare the programs
176
+ versions that are available, if the RBT project is available
177
+ (**gem install rbt**), and then inform me as to which programs
178
+ are **not** up-to-date on the local computer system at hand. This
179
+ then allows me to compile/install these programs. This idea came
180
+ to be because I liked the Linux from Scratch project a lot, and
181
+ there you may often have to upgrade programs.
182
+
183
+ Note that **--really-everything** may be hard to type. I suggest to
184
+ use an alias in that case, or just the upcased variant **FALL** or
185
+ **RALL**. See the file <b>menu.rb</b> for more aliases to that.
186
+
187
+ (2)
188
+
189
+ The other use case is the "embedded use", i.e. for use in a
190
+ <b>.cgi page</b> or perhaps for a ruby-on-rails webpage.
191
+
192
+ An example for the former follows:
193
+
194
+ _ = EnvironmentInformation.new(:do_not_run_yet) # The symbol allows us to prepare the class first.
195
+ _.set_n_tokens 58
196
+ _.disable_colours # <- Recommended, since the colours are thought for the commandline only.
197
+ _.be_silent
198
+ _.dont_show_ruby_stuff # <- If you do not need information about ruby.
199
+ _.run
200
+
201
+ But you do not have to instantiate a new object; you can
202
+ simply use another toplevel API, since as of September 2019.
203
+
204
+ (3)
205
+
206
+ For example, to query the glibc version, you could use this:
207
+
208
+ EnvironmentInformation.glibc? # => "2.29"
209
+
210
+ Which variant to prefer? This depends on your use case. If you
211
+ need more flexibility then you should use the class; if you
212
+ only need the version-string, number 3 may be best as it is
213
+ the simplest.
214
+
215
+ You can also display some additional information, such as the version
216
+ of GTK, Glib, Atk and Pango, by passing in "f" or "full" or "--full"
217
+ on the commandline, without the quotation marks.
218
+
219
+ See the help section to this this script, which can be invoked by
220
+ passing "help" or "--help" as argument to envi.
221
+
222
+ You can also pass this information through a block, if you would like to:
223
+
224
+ _ = EnvironmentInformation.new(:do_not_run_yet) {
225
+ n_tokens: 58,
226
+ use_colours: no,
227
+ be_silent: true
228
+ show_ruby_stuff: no
229
+ }
230
+ _.run
231
+
232
+ Do note that the following **API** also works, primarily due to
233
+ convenience - you can try it in **irb**, of course:
234
+
235
+ require 'environment_information'
236
+
237
+ EnvironmentInformation[]
238
+
239
+ The executable version for class EnvironmentInformation is called <b>envi</b>.
240
+ It will reside under **bin/envi** of this gem.
241
+
242
+ So you can invoke the script by typing "envi" from the commandline,
243
+ without the quotes; if you installed it as a gem into a prefix
244
+ other than /usr, it may be that the bin/ directory resides only
245
+ in that gem, though. Setting an alias may help in this case.
246
+
247
+ ## Colours used by the EnvironmentInformation project
248
+
249
+ Support for colours in the <b>environment_information</b> gem
250
+ is available through the following file:
251
+
252
+ environment_information/colours/colours.rb
253
+
254
+ Which, in turn, taps into the **colours** gem.
255
+
256
+ In theory other colour-related gems could be used as well, but this may
257
+ require someone to write support-code for this, in regards to other
258
+ gems.
259
+
260
+ Presently (August 2020; September 2022) this project <b>only</b> uses
261
+ the **colours** gem (**gem install colours**), though.
262
+
263
+ You can specifically **disable** the use of colours for the current
264
+ invocation run, for whatever the reasons, from the commandline,
265
+ via either:
266
+
267
+ envi --disable-colours
268
+ envi --disable-colors
269
+ envi --nocolours
270
+ envi --nocolors
271
+ envi --no-colours
272
+
273
+ envi --really-all --disable-colours
274
+ envi --really-all --disable-colors
275
+
276
+ envi --all --disable-colours
277
+ envi --all --disable-colors
278
+
279
+ Note that <b>envi</b> refers to <b>bin/envi</b>, which is distributed
280
+ as part of this gem.
281
+
282
+ Both UK and US spelling should work fine in regards to colours/colors;
283
+ use whicher variant you prefer.
284
+
285
+ Internally, the **@use_colours** variable is used to determine
286
+ whether colours are to be used for the main class of this gem.
287
+
288
+ You can query the current setting via the following toplevel
289
+ method (in ruby):
290
+
291
+ EnvironmentInformation.use_colours?
292
+
293
+ You can also query whether colours are used via <b>envi</b>
294
+ as well (the **bin/envi** file) from the commandline, via:
295
+
296
+ envi --use-colours?
297
+ envi --use-colors?
298
+
299
+ The default assumption for commandline use of this gem is that
300
+ the user uses a black/dark background in the terminal; and white
301
+ colour for the text, or at the least some light/bright colour.
302
+
303
+ Not every uses uses a black background, though. In these cases
304
+ the default colours used by the environment_gem are not optimal.
305
+
306
+ Because this may be a concern for some users, support was added
307
+ to the environment_information gem to allow them to use different
308
+ colours if they want to. So, not only can you disable colours
309
+ altogether, but you can also fine-tune them to your liking, if
310
+ you want to.
311
+
312
+ The file that will handle this is a .yml file and it normally
313
+ resides at:
314
+
315
+ environment_information/yaml/colours.yml
316
+
317
+ Currently (September 2022) it only covers two values - the
318
+ colour for the left-hand display, and the colour for the
319
+ right-hand display. This refers to the table-layout that
320
+ you can see when you use the environment_gem (bin/envi)
321
+ on the commandline. To the left side one will typically
322
+ see the name of the program; to the right side the version
323
+ of that program is shown. The two colour names used in
324
+ the .yml file will determine this. You can change the names
325
+ there; I use HTML colour names.
326
+
327
+ If the .yml file can not be found or is missing then the
328
+ two default colours in use will be <b>forestgreen</b>
329
+ (for the left side) and <b>steelblue</b> (for the
330
+ right side).
331
+
332
+ A third entry exists called <b>program_not_found</b>,
333
+ defaulting to <b>lightslategrey</b>. Most users probably may
334
+ not need to change this, but in the event that you would
335
+ like to, you can change it of course. In principle commandline
336
+ support could be added to change the colours on an ad-hoc
337
+ basis during a run of bin/envi, but for now I'll leave it
338
+ how it is. If someone wants to be able to fine-tune the colours
339
+ on the commandline, without wanting to modify the .yml file,
340
+ let me know; I'll add support in this case then.
341
+
342
+ Note that you can combine this in various means.
343
+
344
+ For instance, to show information about EVERY program,
345
+ and use a compact display without any newlines, while
346
+ also disabling colours, use the following:
347
+
348
+ envi --rall --oneliner --disable-colours
349
+
350
+ The following image shows how this looks:
351
+
352
+ <img src="https://i.imgur.com/dt3PhRY.png" style="margin: 2em">
353
+
354
+ Yes, this is not very elegant and hard(er) to read,
355
+ but imagine if you work on Linux runlevel 3, without
356
+ a GUI. In this case this can be convenient to have
357
+ in one terminal as you work.
358
+
359
+
360
+ ## fenvi
361
+
362
+ There is an executable at **bin/fast_envi**, as part of this gem, which
363
+ complements the executable at **bin/envi**. envi is simply an abbreviation
364
+ to "environment information"; and fenvi stands for "fast environment
365
+ information". That is exactly the primary use case for fenvi - it shall
366
+ allow for maximum speed, without "maximal usability". The latter means
367
+ that fenvi will not offer as much customization/flexibility as envi
368
+ does. In fact - the EnvironmentInformation project was rewritten in
369
+ **September 2019** precisely to make the whole project much more
370
+ performant and faster; the old code was too slow, for various reasons.
371
+ (Note: I am using an alias called fenvi that refers to fenvi; the
372
+ official name of the executable is **fast_envi** though.)
373
+
374
+ Nonetheless, **fenvi** also supports some commandline flags.
375
+
376
+ For example, if you wish to only show the registered xorg components
377
+ and their corresponding versions, then you can issue the following
378
+ flag:
379
+
380
+ fenvi --xorg
381
+
382
+ This would **show all xorg components**.
383
+
384
+ fenvi --help
385
+
386
+ Would show the help options. Right now this is limited to just two
387
+ options (or perhaps a bit more than that in the long run).
388
+
389
+ Another option is:
390
+
391
+ fenvi --compare-to-program-versions
392
+
393
+ This can be used to quickly compare the program versions of the
394
+ local computer system. Note that this functionality depends on
395
+ the RBT gem:
396
+
397
+ gem install rbt
398
+
399
+ ## Determining which programs should be shown on your own
400
+
401
+ You can decide to only show the version of some programs, via the
402
+ **commandline** specifically.
403
+
404
+ For example, say that you wish to see only the versions of **ruby**,
405
+ **python** and **perl**, then you could try the following:
406
+
407
+ envi --use-these-programs=ruby,python,perl
408
+
409
+ If you wish to display the local versions of **bash**, **binutils**
410
+ and **bison**, then you can try this:
411
+
412
+ envi --use-these-programs=bash,binutils,bison
413
+
414
+ If you wish to show all components that may be important for
415
+ the LFS (linux from scratch) project then you can use this:
416
+
417
+ envi --use-these-programs=bash,binutils,bison,flex,bzip2,coreutils,diffutils,find,awk,gcc,grep,gzip,linux,make,m4,patch,perl,python,sed,tar,texinfo,xz
418
+
419
+ Since that is a bit annoying to type (it's quite long), you can also
420
+ use the **fake-symbol** :lfs for this instead:
421
+
422
+ envi --use-these-programs=:lfs
423
+
424
+ Or, even simpler than that:
425
+
426
+ envi --lfs
427
+
428
+ In fact, this functionality has been added precisely to
429
+ avoid using a shell script, such as this one:
430
+
431
+ http://www.linuxfromscratch.org/lfs/view/development/chapter02/hostreqs.html
432
+
433
+ The name **fake-symbol** is given because via the commandline
434
+ you can only pass e. g. a String, not a Symbol, as bash does
435
+ not know what a Symbol is. So if a string has a leading :
436
+ then the EnvironmentInformation project will assume that the
437
+ user wanted to convey a **special meaning**.
438
+
439
+ If you do not wish to save any local file then invoke EnvironmentInformation
440
+ in this way:
441
+
442
+ envi --lfs --no-save
443
+
444
+ If you wish to show the local version of openssl as well, try
445
+ adding this commandline flag:
446
+
447
+ envi --openssl
448
+
449
+ ## xorg components
450
+
451
+ To display the registered **xorg components**, you could use any of
452
+ the following commandline flags:
453
+
454
+ envi --xorg-components
455
+ envi --xorg
456
+
457
+ Do note that not necessarily every xorg component is registered,
458
+ but most of the xorg-components should be covered by now.
459
+
460
+ ## Reading from a local file
461
+
462
+ The **EnvironmentInformation project** can read from a **local file**
463
+ containing the programs whose version you would like to show, on the
464
+ commandline.
465
+
466
+ The commandline invocation goes like this:
467
+
468
+ envi --read-from-this-file=/Depot/j/display_these_programs.md
469
+ envi --file=/Depot/j/display_these_programs.md
470
+ envi --input-from=/Depot/j/display_these_programs.md
471
+
472
+ The reason as to why this functionality has been made available
473
+ is so that people can use their own custom input to the main
474
+ class of this gem, if they would like to.
475
+
476
+ A requirement for this to work is that there is a corresponding
477
+ component that can query the version of a program. I am open for
478
+ suggestions what to add, if anything is missing, as well as
479
+ including a more generic way to make a query. Either way this
480
+ depends on others to make suggestions.
481
+
482
+ ## Sorting the components alphabetically
483
+
484
+ You can display the components in an alphabetical manner, if you
485
+ would like to, through this:
486
+
487
+ envi --sort-alphabetically
488
+
489
+ ## Sinatra interface
490
+
491
+ Since as of **May 2019** there is now a small sinatra "interface"
492
+ available.
493
+
494
+ To start it, try:
495
+
496
+ envi --sinatra
497
+
498
+ In order for this to work, you need to have sinatra installed, such as
499
+ via this way:
500
+
501
+ gem install sinatra
502
+
503
+ or
504
+
505
+ gem install sinatra --user-install # into the home directory
506
+
507
+ It is not a mandatory dependency for this gem, so it is not registered
508
+ to be a hard dependency in the **.gemspec** file.
509
+
510
+ ## The science cluster
511
+
512
+ There are also a few science-related applications, such as for hmmer
513
+ or relion. To query their versions specifically you can issue:
514
+
515
+ envi --science
516
+
517
+ ## Show the URL of every registered program
518
+
519
+ You can, if you like to, show the remote URLs to the different
520
+ programs, if you have the **RBT project** installed (**gem install rbt**).
521
+
522
+ Then, you should be able to do the following:
523
+
524
+ envi --everything --show-remote-url
525
+
526
+ This variant will not only display the local programs found,
527
+ but will additionally also show the **remote URLs** on the
528
+ commandline, on the right hand side, to the corresponding
529
+ program at hand.
530
+
531
+ ## Only display the operating system in use
532
+
533
+ If you are only interested in seeing the operating system, try
534
+ this **commandline flag**:
535
+
536
+ envi --os?
537
+
538
+ ## Showing additional programs on an ad-hoc basis
539
+
540
+ You can also show additional individual components via the **--additional**
541
+ flag, like this:
542
+
543
+ envi --additional=php,python,perl
544
+
545
+ This would display the local versions of the installed programs
546
+ **php**, **python** and **perl**. You can add any additional
547
+ program as you see fit there, separated via ',' character -
548
+ this will, however had, only work if that program has been
549
+ registered in the <b>environment_information</b> gem.
550
+
551
+ Note that since as of **September 2019** you can also add the name
552
+ of the component directly. For example, to show the version of
553
+ bash, you can invoke envi like this:
554
+
555
+ envi --bash
556
+
557
+ To also show php and python, you can do this:
558
+
559
+ envi --bash --php --python
560
+
561
+ Use whichever variant you prefer - the choices are up to the user.
562
+
563
+ ## Ruby-gtk bindings
564
+
565
+ A small **gtk-widget** exists, which can be started via either of:
566
+
567
+ envi --gui
568
+ envi --gtk
569
+
570
+ Note that this requires the **ruby-gtk package**, in particular
571
+ **gtk2**, and possibly also the gem called **gtk_paradise**.
572
+
573
+ Installing these could be done through the following commandline
574
+ invocations:
575
+
576
+ gem install gtk2
577
+ gem install gtk3
578
+ gem install gtk_paradise
579
+
580
+ You may need the "devel" packages (.h files) for this to work.
581
+
582
+ The **gtk** widget is really just extremely simple, and thus not too
583
+ terribly useful, since it lacks functionality; I only wanted to be
584
+ able to **embed this information** into other ruby-gtk applications.
585
+ At some point in the future, the functionality may be extended - but
586
+ for the time being, it will remain simple. **Simple is beautiful**,
587
+ too.
588
+
589
+ Presently (September 2019) the gtk-bindings in the
590
+ **environment_information** project only support **ruby-gtk2**,
591
+ but in the future I may switch to **ruby-gtk3** - or at the
592
+ least offer means for the user to decide which variant is
593
+ to be used.
594
+
595
+ ## No changelog entries any longer
596
+
597
+ In the past, changes to this project were listed specifically, together
598
+ with the date - a short changelog.
599
+
600
+ However had, most users are probably more interested in the options
601
+ and features that are supported as-is; the features that are available
602
+ right **now**. Seeing every unimportant change made in the long
603
+ forgotten past, is not that useful for most users. Additionally, for
604
+ **small projects**, a changelog is not really that worthwhile to be
605
+ had to begin with.
606
+
607
+ So, I have abandoned the concept of a changelog for this project. Do
608
+ note that if there is something noteworthy that has been changed, it
609
+ will be mentioned and documented here in this file (**README.md**)
610
+ anyway.
611
+
612
+ ## How to add new components/entries to this project
613
+
614
+ The file <b>environment_information/constants/array_tracked_components.rb</b>
615
+ keeps track over all available entries.
616
+
617
+ The method called **return_default_programs_on_a_linux_computer**,
618
+ defined in the file <b>environment_information/base/misc.rb</b>,
619
+ will add all the entries that are, assumingly, useful on a linux
620
+ computer by default.
621
+
622
+ If you want to change the entries, or add new ones, look there first.
623
+ If you wish to register a new program, you have to add it onto the
624
+ main Array (in the constants.rb file) first.
625
+
626
+ You will also have to add a method that does the actual **query**
627
+ part for the program version at hand, within the
628
+ <b>environment_information/individual_components/</b> subdirectory.
629
+
630
+ It may be simplest to just copy one of those .rb files, by giving it
631
+ the same name as the program you wish to see displayed. You will
632
+ then have to **change the content** of that method too, in that
633
+ new file, but this is quite trivial and takes at maximum five
634
+ minutes (for those who have not seen it before; it takes
635
+ significantly less time for those who already know what to change
636
+ there). Entries that come with **pkg-config .pc files** are even
637
+ simpler to add - this is much easier than manually parsing
638
+ **--version** flags.
639
+
640
+ In the future I may switch to a yaml file rather than hardcode
641
+ the entries in .rb directly, but for the time being, I will stick
642
+ to the method described above.
643
+
644
+ ## Short display variant
645
+
646
+ If you only wish to quickly view the most important information
647
+ about the local computer system, then you can use the following
648
+ variant:
649
+
650
+ envi --short
651
+
652
+ ## Caveats
653
+
654
+ Note that the **EnvironmentInformation** project has to sometimes guess
655
+ how to obtain the necessary information, in order to determine which
656
+ program is installed. For example, for programs such as **readline**
657
+ there is no trivial way to determine which version is used, to
658
+ **EnvironmentInformation** will attempt to read the .so files, and
659
+ determine the version from the .so files. This may fail, depending
660
+ on the setup of the host computer.
661
+
662
+ In general, the two best ways to determine the version of programs
663
+ are via a **--version** flag or simply by using **pkg-config** to
664
+ query the .pc file of the package. But this is not available for
665
+ all programs, so ultimately **EnvironmentInformation** may not
666
+ display completely accurate information on all given computer
667
+ systems.
668
+
669
+ ## Clearing the old dataset
670
+
671
+ Via **--clear** on the commandline you can remove all old entries.
672
+ This commandline flag thus resets **class EnvironmentInformation**
673
+ to a totally clean, fresh state. Internally the method .reset() will
674
+ be called on **class EnvironmentInformation**.
675
+
676
+ This allows you to show only one component, or a few components,
677
+ for example. The following example demonstrates this.
678
+
679
+ Say that you wish to show **only** **python** and **php**, thus
680
+ two programs only. Then you can use the following flag to achieve
681
+ this, in this order:
682
+
683
+ envi --clear --python --php
684
+
685
+ The order is important because --clear will clear at the moment
686
+ it occurs in **ARGV**, which holds the commandline-arguments
687
+ issued on the commandline by the user.
688
+
689
+ ## Which packages will be checked by default?
690
+
691
+ The following provides a list of packages that are presently,
692
+ in **October of 2019**, tracked.
693
+
694
+ In the past I did manually copy/paste the following listing, but
695
+ since as of 15th of October 2019, the list is **autogenerated** via
696
+ a macro.
697
+
698
+ This listing can be seen in the **file**:
699
+
700
+ environment_information/constants/array_tracked_components.rb
701
+
702
+ These are the following programs:
703
+
704
+ atk
705
+ automake
706
+ babl
707
+ bash
708
+ binutils
709
+ bison
710
+ boost
711
+ bubblewrap
712
+ busybox
713
+ bzip2
714
+ cairo
715
+ ccache
716
+ check
717
+ clang
718
+ clutter
719
+ cmake
720
+ colord
721
+ coreutils
722
+ curl
723
+ dbus
724
+ dhcpcd
725
+ diffutils
726
+ elfutils
727
+ emacs
728
+ enchant
729
+ ethtool
730
+ eudev
731
+ evince
732
+ exempi
733
+ expat
734
+ ffmpeg
735
+ fftw
736
+ file
737
+ findutils
738
+ flac
739
+ flatpak
740
+ flex
741
+ fluidsynth
742
+ fontconfig
743
+ freeipmi
744
+ freetype
745
+ fribidi
746
+ gawk
747
+ gc
748
+ gcc
749
+ gcr
750
+ gdb
751
+ gdkpixbuf
752
+ gegl
753
+ geocodeglib
754
+ gettext
755
+ ghostscript
756
+ gimp
757
+ git
758
+ gmime
759
+ gjs
760
+ glib
761
+ glibc
762
+ gmp
763
+ gnupg
764
+ gnuplot
765
+ gnutls
766
+ gperf
767
+ graphviz
768
+ grep
769
+ groff
770
+ gsettingsdesktopschemas
771
+ gsl
772
+ gtk2
773
+ gtk3
774
+ guile
775
+ gupnp
776
+ gzip
777
+ harfbuzz
778
+ hmmer
779
+ ibus
780
+ icewm
781
+ icu4c
782
+ imagemagick
783
+ intltool
784
+ isl
785
+ jasper
786
+ java
787
+ kde_frameworks
788
+ kmod
789
+ krb5
790
+ krita
791
+ lftp
792
+ libarchive
793
+ libassuan
794
+ libbytesize
795
+ libdazzle
796
+ libdrm
797
+ libepoxy
798
+ libgdata
799
+ libgee
800
+ libgpgerror
801
+ libgsf
802
+ libgtop
803
+ libgusb
804
+ libhandy
805
+ libical
806
+ libjpegturbo
807
+ libmbim
808
+ libpeas
809
+ libpsl
810
+ libqmi
811
+ librsvg
812
+ libsamplerate
813
+ libseccomp
814
+ libsecret
815
+ libsndfile
816
+ libtasn1
817
+ libtool
818
+ libunwind
819
+ libuv
820
+ libva
821
+ libvpx
822
+ libwebp
823
+ libwpe
824
+ libzip
825
+ linux
826
+ llvm
827
+ lynx
828
+ m4
829
+ make
830
+ mc
831
+ mlt
832
+ mozjs
833
+ mpc
834
+ mpfr
835
+ mtools
836
+ nasm
837
+ ncurses
838
+ neon
839
+ nettle
840
+ nghttp2
841
+ nginx
842
+ ninja
843
+ node
844
+ nspr
845
+ nss
846
+ openmpi
847
+ openssl
848
+ opusfile
849
+ pango
850
+ parted
851
+ patch
852
+ patchelf
853
+ pbbam
854
+ pcre
855
+ pcre2
856
+ perl
857
+ php
858
+ pipewire
859
+ pkgconfig
860
+ plzip
861
+ poppler
862
+ popt
863
+ python
864
+ qpdf
865
+ qt
866
+ r
867
+ readline
868
+ re2c
869
+ relion
870
+ rsync
871
+ ruby
872
+ rubygems
873
+ samtools
874
+ sed
875
+ screen
876
+ sharutils
877
+ simple-scan
878
+ strace
879
+ swig
880
+ sysstat
881
+ taglib
882
+ tar
883
+ tesseract
884
+ texinfo
885
+ tiff
886
+ tmux
887
+ unbound
888
+ v4lutils
889
+ valgrind
890
+ viennarna
891
+ vim
892
+ vte
893
+ wavpack
894
+ webkit2gtk
895
+ wget
896
+ wireshark
897
+ xfsprogs
898
+ xterm
899
+ xvid
900
+ xz
901
+ zlib
902
+
903
+
904
+ You can also display these programs dynamically, such as through the
905
+ following **API**:
906
+
907
+ require 'environment_information'
908
+
909
+ pp EnvironmentInformation.tracked_programs?
910
+
911
+ Note that since as of **March 2019**, environment_information will also attempt
912
+ to find out the installed version for **gmp**, **mpfr** and **mpc**. This
913
+ may fail, though, and will be silently ignored in these cases (at least
914
+ for the time being).
915
+
916
+ You can use the following method to display a list of all programs
917
+ that are registered, from the commandline:
918
+
919
+ envi --registered-components?
920
+
921
+ This will show every registered (and thus, available) component of this
922
+ project.
923
+
924
+ As of **February 2020**, this project tracks at the least 105 different
925
+ programs. More entries will be added in the future, but the primary
926
+ focus will be on a **Linux from Scratch** / **Beyond Linux from Scratch**
927
+ setup, so expect those programs that are installed first, to be added
928
+ next, too.
929
+
930
+ ## Querying the components that will be shown
931
+
932
+ You can query the components that will be shown, by issuing one of
933
+ the following commands:
934
+
935
+ envi --show-components?
936
+ envi --show-components
937
+
938
+ Note that this works exclusively, meaning that if you use this
939
+ commandline switch, then you will ONLY get a query of the
940
+ components that are available.
941
+
942
+ ## Replaying the information
943
+
944
+ Normally showing all information when issuing **envi --RALL** can take
945
+ quite some time; on my computer system 18 seconds, before the rewrite
946
+ in February 2020.
947
+
948
+ The reason as to why it takes that long is mostly because many different
949
+ files have to be queried; their --version flag has to be called or
950
+ their .pc file has to be checked, but most importantly querying data
951
+ from the **RBT project** currently takes way too long. This is not an
952
+ ideal situation, as nobody wants to wait.
953
+
954
+ Waiting 18 seconds is simply too long, though, but until that part in
955
+ RBT is improved, I have added a **--replay** functionality for **class
956
+ EnvironmentInformation** (via the commandline).
957
+
958
+ What this functionality does is to take an available (existing) .yml
959
+ file that holds the information from the last invocation run, and then
960
+ proceeds to display this information on the commandline to the user.
961
+ This will evidently be much faster, since the information has already
962
+ been stored before in a prior run.
963
+
964
+ This change required that the environment information project will
965
+ also generate a **.yml file** by default.
966
+
967
+ Note that this functionality is not yet complete; I will extend this
968
+ at a later time (written this part here as of **December 2019**).
969
+
970
+ You can disable saving into this .yml file via:
971
+
972
+ envi --no-yaml-file
973
+
974
+ To invoke the replay functionality, do:
975
+
976
+ envi --replay
977
+
978
+ ## Avoid the creation of local files
979
+
980
+ By default, the main class in this project may generate a few local
981
+ files. This may not always be wanted, or possible (e. g. in a
982
+ read-only filesystem), so an option has to exist that disables
983
+ this functionality.
984
+
985
+ That option is called **--no-save** and can be used like this:
986
+
987
+ envi --lfs --no-save
988
+
989
+ ## Using another prefix
990
+
991
+ By default, the environment_information project will assume that
992
+ the main prefix is / or /usr, respectively. In other words, it
993
+ will assume that, for example, the binary called "bison" will
994
+ reside at /usr/bin/bison. To be more correct, it will make use
995
+ of the PATH environment variable, but for most users this will
996
+ list /usr/bin/ first.
997
+
998
+ That way "bison --version" should work and be the same as
999
+ "/usr/bin/bison --version".
1000
+
1001
+ For pkg-config .pc files, the main target will usually then
1002
+ be at /usr/lib/pkgconfig/.
1003
+
1004
+ Note that the above is not always a correct assumption. For
1005
+ example, the **GoboLinux approach** uses the **/Programs/**
1006
+ hierarchy instead (but it also keeps legacy symlinks, so in
1007
+ fact GoboLinux works just like any other linux distribution too).
1008
+
1009
+ On my home setup, I tend to use /home/Programs/ since some
1010
+ time - mostly because I tend to relocate /home/ in general
1011
+ or may keep it on a separate partition.
1012
+
1013
+ For these latter use cases we require another way to quickly
1014
+ list all versions of different programs. On 14.01.2020
1015
+ support for this has been (partially) added.
1016
+
1017
+ Invoke this like so:
1018
+
1019
+ envi --work-on-programs-directory-only
1020
+
1021
+ Note that this would use /home/Programs/ right now, which
1022
+ is hardcoded - and thus not flexible.
1023
+
1024
+ I am aware of this limitation, so expect more code changes
1025
+ in the future to extend this functionality.
1026
+
1027
+ One key idea for this is to set up /home/Programs/Toolchain/
1028
+ and have that one work reliably to cross-compile different
1029
+ architectures, libc libraries and so forth. But for now,
1030
+ this subsection is a stub.
1031
+
1032
+ ## Rationale as to why some programs may work and some may not
1033
+
1034
+ Querying the specific version installed on a given computer
1035
+ system can be tricky. If a **.pc file** is available (**pkg-config**)
1036
+ then querying the version is quite trivial. If a **binary** is
1037
+ available then often **--version** or **-V** will work. But
1038
+ sometimes there is no binary, and no .pc file either. So what
1039
+ to do in such a case?
1040
+
1041
+ This is not simple to answer, since it may depend on the
1042
+ program at hand.
1043
+
1044
+ It may be possible to infer the proper version from the
1045
+ library at hand e. g. **/usr/lib/foobar.so.4.8.2**. Here
1046
+ we could assume that the version will be 4.8.2, but this
1047
+ is not necessarily guaranteed to work, either.
1048
+
1049
+ In the past, before the rewrite of this project in **February 2020**,
1050
+ the environment_information project had used code that would
1051
+ check for such conditions - for example, for **readline**,
1052
+ and look for specific .so files under **/usr/lib/** or
1053
+ elsewhere.
1054
+
1055
+ But the resulting code that had to be written for this, was not
1056
+ very elegant, and takes about 10-20 lines of code for checking
1057
+ this, including fall-backs, for each program that does not
1058
+ conform to --version or a .pc file. I am no longer sure whether
1059
+ it is worth to add that code, since it also may have to be
1060
+ maintained, and is not always perfect nor does it always work,
1061
+ depending on the computer system at hand. So, past this point,
1062
+ **environment_information** is not doing its best to query the
1063
+ version for all programs - it will try pkg-config and
1064
+ --version or -V in most cases, and if that fails then
1065
+ the environment_information project will assume that the
1066
+ program at hand is not installed.
1067
+
1068
+ This may be a **false negative**, but to me it appears
1069
+ to be better in the long run, in regards to maintainability
1070
+ of the whole project. After all one reason for the rewrite
1071
+ in 2020 was to simplify the whole project, and this objective
1072
+ has been achieved - all the commands are now stored in yaml
1073
+ files, and that is so much simpler to handle than the
1074
+ corresponding ruby methods that were used before that.
1075
+
1076
+ ## Adding new entries to EnvironmentInformation
1077
+
1078
+ New entries can be added into the following yaml file:
1079
+
1080
+ **query_to_use_for_the_individual_components.yml**
1081
+
1082
+ The two most commonly used variants there are version,
1083
+ for **bin/foo --version* invocations, and pkgconfig,
1084
+ for querying pkg-config .pc files. However had, many
1085
+ programs make use of different invocation variants,
1086
+ don't come with a .pc file, and have no binaries.
1087
+ Querying the correct version of such files is difficult
1088
+ since there is no standard. This is a reason why the
1089
+ code has to handle these cases.
1090
+
1091
+ But in principle, adding a new entry is as simple as
1092
+ adding a new line into that .yml file (and registering
1093
+ that component in a second .yml file).
1094
+
1095
+ ## The toplevel main hash
1096
+
1097
+ EnvironmentInformation tries to store the information that
1098
+ it has collected into a **hash**, which can be accessed like
1099
+ this quickly:
1100
+
1101
+ EnvironmentInformation.hash?
1102
+
1103
+ By default this hash is empty, so you have to fill it up
1104
+ first, if you want to do so, via the following method:
1105
+
1106
+ EnvironmentInformation.initialize
1107
+
1108
+ hash = EnvironmentInformation.hash? # ← and here you can query it
1109
+
1110
+ The hash can then be used as basis for reporting at a later time,
1111
+ or replaying that information via the **--replay** commandline
1112
+ switch to the executable.
1113
+
1114
+ ## Dependencies of the EnvironmentInformation project
1115
+
1116
+ The sole dependency for the **environment_information gem**
1117
+ is on the **colours** gem.
1118
+
1119
+ Up until the beginning of March 2020, the EnvironmentInformation
1120
+ project also depended on the **opn gem**. However had, I
1121
+ noticed that in a restricted environment installation of
1122
+ gems can be difficult, so I made opn **optional**. If you have
1123
+ it installed then EnvironmentInformation will still try to
1124
+ make use of the **Opn namespace**; and if it is not installed
1125
+ then EnvironmentInformation will simply **skip** Opn completely.
1126
+
1127
+ ## Rationale behind the different queries
1128
+
1129
+ As was already explained, different programs require different
1130
+ ways to determine which version is installed. Some projects
1131
+ would allow more than one way, such as the --version flag,
1132
+ but also querying .pc files. Ruby, for example, supports both
1133
+ --version, and comes with a .pc file (if you compiled it from
1134
+ source, at the least).
1135
+
1136
+ So, which way to choose?
1137
+
1138
+ In my opinion, .pc files are better than --version, for
1139
+ at the least two reasons:
1140
+
1141
+ - The resulting code to handle this is much simpler. .pc
1142
+ files are quite uniform, whereas the output of --version
1143
+ is very dissimilar between different programs.
1144
+
1145
+ - Another reason is that invoking the binary, just to
1146
+ do a --version, is actually more expensive (CPU-wise)
1147
+ than it is to query a simple text file, which is
1148
+ essentially what .pc files are. So this is another reason
1149
+ in favour of .pc files.
1150
+
1151
+ For these reasons, and a few smaller ones, the EnvironmentInformation
1152
+ project will try to prefer .pc files whenever that is possible.
1153
+ We may retain code that can handle --version calls, though,
1154
+ if they need a special way to query.
1155
+
1156
+ ## Querying all registered pkg-config entries
1157
+
1158
+ To show all registered pkg-config entries (with .pc files)
1159
+ do this:
1160
+
1161
+ envi --pkgconfig
1162
+
1163
+ If you want to obtain an Array of all outdated programs
1164
+ on the target computer system, try this method:
1165
+
1166
+ EnvironmentInformation.return_array_of_outdated_programs
1167
+
1168
+ You need to have initialized the main hash once, before
1169
+ being able to make use of that method.
1170
+
1171
+ ## Quickly showing the version of individual programs
1172
+
1173
+ You can show the version of individual programs
1174
+ like this:
1175
+
1176
+ envi --bash
1177
+ envi --brotli
1178
+
1179
+ This will only work if the program has been registered,
1180
+ though - so the second variant will not work.
1181
+
1182
+ Also take note that this will be ultra-short output,
1183
+ so nothing will be saved into a local file. The idea
1184
+ here is that the user only wants to see the version
1185
+ of the program at hand, such as the <b>bash shell</b>.
1186
+
1187
+ ## Aliases to program names
1188
+
1189
+ For several reasons it may be useful to define some aliases
1190
+ or shortcuts to registered names. For example, the input
1191
+ name **yacc** should point to the program called **bison**,
1192
+ and the input name **diff** should really be an abbreviation
1193
+ for **diffutils**. This allows the user to use the
1194
+ environment_information project in a more convenient manner.
1195
+
1196
+ Currently these aliases are hardcoded, defined in the
1197
+ method called **EnvironmentInformation.return_alias_to()**.
1198
+
1199
+ If no alias is found then the method will simply return
1200
+ the original input argument. This allows us to use this
1201
+ method as a 'sanitizer' or filter.
1202
+
1203
+ ## GUIs - Graphical User Interfaces
1204
+
1205
+ A few bindings exist, to ruby-gtk3 and ruby-libui. These are
1206
+ mostly just demos, proof-of-concept. They are not really very
1207
+ elegant or sophisticated - I really only wanted to show how
1208
+ to embed the information gained from the commandline via
1209
+ a GUI as well.
1210
+
1211
+ ## Support for KDE
1212
+
1213
+ If you have the RBT gem installed (gem install rbt) then you
1214
+ can invoke envi via:
1215
+
1216
+ envi --kde?
1217
+
1218
+ Since as of August 2022 this will try to show the versions
1219
+ of installed KDE applications.
1220
+
1221
+ This currently does not work very well; at a later point
1222
+ this will be polished and improved.
1223
+
1224
+ ## Bugs and other misbehaviours
1225
+
1226
+ I noticed a few bugs here and there over the years. For instance,
1227
+ sometimes there may not be any output and the program stops
1228
+ working suddenly. This sometimes happens because there is some
1229
+ error in the underlying way how EnvironmentInformation obtains
1230
+ the version-information. In the long run I intend to improve
1231
+ the situation, by no longer falling into such issues - but
1232
+ they are not easily reproducible on my system. Either way I
1233
+ added this subsection in November 2021, to lessen the confusion
1234
+ for users at the least a little bit. And, again, as said, in
1235
+ the long run the code will change so as to not run into such
1236
+ situations anymore.
1237
+
1238
+ To provide a specific example: there may be instances of
1239
+ emacs about, such as on antiX, which simply did not
1240
+ provide any output. When I compiled emacs from source, it
1241
+ worked fine - so always check that the program works as
1242
+ assumed it **should** work.
1243
+
1244
+
1245
+ ## Contact information and mandatory 2FA coming up in 2022
1246
+
1247
+ If your creative mind has ideas and specific suggestions to make this gem
1248
+ more useful in general, feel free to drop me an email at any time, via:
1249
+
1250
+ shevy@inbox.lt
1251
+
1252
+ Before that email I used an email account at Google gmail, but in **2021** I
1253
+ decided to slowly abandon gmail, for various reasons. In order to limit the
1254
+ explanation here, allow me to just briefly state that I do not feel as if I
1255
+ want to promote any Google service anymore when the user becomes the
1256
+ product (such as via data collection by upstream services). I feel this is
1257
+ a hugely flawed business model.
1258
+
1259
+ Do keep in mind that responding to emails may take some time, depending on
1260
+ the amount of work I may have at that moment.
1261
+
1262
+ In <b>2022</b> rubygems.org, or rather the corporate overlords who control the
1263
+ rubygems.org infrastructure these days, decided to make 2FA mandatory for every
1264
+ gem owner eventually: see
1265
+ https://blog.rubygems.org/2022/06/13/making-packages-more-secure.html
1266
+
1267
+ Mandatory 2FA will eventually be extended to all rubygems.org developers and
1268
+ maintainers. As I can not use 2FA, for reasons I will skip explaining here,
1269
+ this means that my projects will eventually be taken over by shopify (or,
1270
+ correspondingly, whoever effectively controls the rubygems.org ecosystem).
1271
+ At that point, I no longer have any control what is done to my projects
1272
+ since shopify (respectively those controlling the gems ecosystem) took away
1273
+ control here. Not sure at which point ruby became corporate-controlled -
1274
+ that was not the case several years ago.
1275
+
1276
+ Ruby also only allows 2FA users to participate on the issue tracker these
1277
+ days:
1278
+
1279
+ https://bugs.ruby-lang.org/issues/18800
1280
+
1281
+ (Note that this was changed a few months ago, so the last part is no
1282
+ longer valid - it is possible to register again without mandating
1283
+ 2FA. I will retain the above notice for a bit longer, though, as I feel
1284
+ we should not restrict communication via mandatory authentification
1285
+ in general. Fighting spam is a noble goal, but when it also means you
1286
+ lock out real human people then this is definitely NOT good.)
1287
+