environment_information 1.4.96

Sign up to get free protection for your applications and to get access to all the features.

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 +1278 -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 +309 -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 +213 -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 +262 -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,1278 @@
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
+ jasper
785
+ java
786
+ kde_frameworks
787
+ kmod
788
+ krb5
789
+ krita
790
+ lftp
791
+ libarchive
792
+ libassuan
793
+ libbytesize
794
+ libdazzle
795
+ libdrm
796
+ libepoxy
797
+ libgdata
798
+ libgee
799
+ libgpgerror
800
+ libgsf
801
+ libgtop
802
+ libgusb
803
+ libhandy
804
+ libical
805
+ libjpegturbo
806
+ libmbim
807
+ libpeas
808
+ libpsl
809
+ libqmi
810
+ librsvg
811
+ libsamplerate
812
+ libseccomp
813
+ libsecret
814
+ libsndfile
815
+ libtasn1
816
+ libtool
817
+ libunwind
818
+ libuv
819
+ libva
820
+ libvpx
821
+ libwebp
822
+ libwpe
823
+ libzip
824
+ linux
825
+ llvm
826
+ lynx
827
+ m4
828
+ make
829
+ mc
830
+ mlt
831
+ mozjs
832
+ mpc
833
+ mpfr
834
+ mtools
835
+ nasm
836
+ ncurses
837
+ neon
838
+ nettle
839
+ nghttp2
840
+ nginx
841
+ ninja
842
+ node
843
+ nspr
844
+ nss
845
+ openmpi
846
+ openssl
847
+ opusfile
848
+ pango
849
+ parted
850
+ patch
851
+ patchelf
852
+ pbbam
853
+ pcre
854
+ pcre2
855
+ perl
856
+ php
857
+ pipewire
858
+ pkgconfig
859
+ plzip
860
+ poppler
861
+ popt
862
+ python
863
+ qpdf
864
+ qt
865
+ r
866
+ readline
867
+ re2c
868
+ relion
869
+ rsync
870
+ ruby
871
+ rubygems
872
+ samtools
873
+ sed
874
+ screen
875
+ sharutils
876
+ simple-scan
877
+ strace
878
+ swig
879
+ sysstat
880
+ taglib
881
+ tar
882
+ texinfo
883
+ tiff
884
+ tmux
885
+ unbound
886
+ v4lutils
887
+ valgrind
888
+ viennarna
889
+ vim
890
+ vte
891
+ wavpack
892
+ webkit2gtk
893
+ wget
894
+ wireshark
895
+ xfsprogs
896
+ xterm
897
+ xvid
898
+ xz
899
+ zlib
900
+
901
+
902
+ You can also display these programs dynamically, such as through the
903
+ following **API**:
904
+
905
+ require 'environment_information'
906
+
907
+ pp EnvironmentInformation.tracked_programs?
908
+
909
+ Note that since as of **March 2019**, environment_information will also attempt
910
+ to find out the installed version for **gmp**, **mpfr** and **mpc**. This
911
+ may fail, though, and will be silently ignored in these cases (at least
912
+ for the time being).
913
+
914
+ You can use the following method to display a list of all programs
915
+ that are registered, from the commandline:
916
+
917
+ envi --registered-components?
918
+
919
+ This will show every registered (and thus, available) component of this
920
+ project.
921
+
922
+ As of **February 2020**, this project tracks at the least 105 different
923
+ programs. More entries will be added in the future, but the primary
924
+ focus will be on a **Linux from Scratch** / **Beyond Linux from Scratch**
925
+ setup, so expect those programs that are installed first, to be added
926
+ next, too.
927
+
928
+ ## Querying the components that will be shown
929
+
930
+ You can query the components that will be shown, by issuing one of
931
+ the following commands:
932
+
933
+ envi --show-components?
934
+ envi --show-components
935
+
936
+ Note that this works exclusively, meaning that if you use this
937
+ commandline switch, then you will ONLY get a query of the
938
+ components that are available.
939
+
940
+ ## Replaying the information
941
+
942
+ Normally showing all information when issuing **envi --RALL** can take
943
+ quite some time; on my computer system 18 seconds, before the rewrite
944
+ in February 2020.
945
+
946
+ The reason as to why it takes that long is mostly because many different
947
+ files have to be queried; their --version flag has to be called or
948
+ their .pc file has to be checked, but most importantly querying data
949
+ from the **RBT project** currently takes way too long. This is not an
950
+ ideal situation, as nobody wants to wait.
951
+
952
+ Waiting 18 seconds is simply too long, though, but until that part in
953
+ RBT is improved, I have added a **--replay** functionality for **class
954
+ EnvironmentInformation** (via the commandline).
955
+
956
+ What this functionality does is to take an available (existing) .yml
957
+ file that holds the information from the last invocation run, and then
958
+ proceeds to display this information on the commandline to the user.
959
+ This will evidently be much faster, since the information has already
960
+ been stored before in a prior run.
961
+
962
+ This change required that the environment information project will
963
+ also generate a **.yml file** by default.
964
+
965
+ Note that this functionality is not yet complete; I will extend this
966
+ at a later time (written this part here as of **December 2019**).
967
+
968
+ You can disable saving into this .yml file via:
969
+
970
+ envi --no-yaml-file
971
+
972
+ To invoke the replay functionality, do:
973
+
974
+ envi --replay
975
+
976
+ ## Avoid the creation of local files
977
+
978
+ By default, the main class in this project may generate a few local
979
+ files. This may not always be wanted, or possible (e. g. in a
980
+ read-only filesystem), so an option has to exist that disables
981
+ this functionality.
982
+
983
+ That option is called **--no-save** and can be used like this:
984
+
985
+ envi --lfs --no-save
986
+
987
+ ## Using another prefix
988
+
989
+ By default, the environment_information project will assume that
990
+ the main prefix is / or /usr, respectively. In other words, it
991
+ will assume that, for example, the binary called "bison" will
992
+ reside at /usr/bin/bison. To be more correct, it will make use
993
+ of the PATH environment variable, but for most users this will
994
+ list /usr/bin/ first.
995
+
996
+ That way "bison --version" should work and be the same as
997
+ "/usr/bin/bison --version".
998
+
999
+ For pkg-config .pc files, the main target will usually then
1000
+ be at /usr/lib/pkgconfig/.
1001
+
1002
+ Note that the above is not always a correct assumption. For
1003
+ example, the **GoboLinux approach** uses the **/Programs/**
1004
+ hierarchy instead (but it also keeps legacy symlinks, so in
1005
+ fact GoboLinux works just like any other linux distribution too).
1006
+
1007
+ On my home setup, I tend to use /home/Programs/ since some
1008
+ time - mostly because I tend to relocate /home/ in general
1009
+ or may keep it on a separate partition.
1010
+
1011
+ For these latter use cases we require another way to quickly
1012
+ list all versions of different programs. On 14.01.2020
1013
+ support for this has been (partially) added.
1014
+
1015
+ Invoke this like so:
1016
+
1017
+ envi --work-on-programs-directory-only
1018
+
1019
+ Note that this would use /home/Programs/ right now, which
1020
+ is hardcoded - and thus not flexible.
1021
+
1022
+ I am aware of this limitation, so expect more code changes
1023
+ in the future to extend this functionality.
1024
+
1025
+ One key idea for this is to set up /home/Programs/Toolchain/
1026
+ and have that one work reliably to cross-compile different
1027
+ architectures, libc libraries and so forth. But for now,
1028
+ this subsection is a stub.
1029
+
1030
+ ## Rationale as to why some programs may work and some may not
1031
+
1032
+ Querying the specific version installed on a given computer
1033
+ system can be tricky. If a **.pc file** is available (**pkg-config**)
1034
+ then querying the version is quite trivial. If a **binary** is
1035
+ available then often **--version** or **-V** will work. But
1036
+ sometimes there is no binary, and no .pc file either. So what
1037
+ to do in such a case?
1038
+
1039
+ This is not simple to answer, since it may depend on the
1040
+ program at hand.
1041
+
1042
+ It may be possible to infer the proper version from the
1043
+ library at hand e. g. **/usr/lib/foobar.so.4.8.2**. Here
1044
+ we could assume that the version will be 4.8.2, but this
1045
+ is not necessarily guaranteed to work, either.
1046
+
1047
+ In the past, before the rewrite of this project in **February 2020**,
1048
+ the environment_information project had used code that would
1049
+ check for such conditions - for example, for **readline**,
1050
+ and look for specific .so files under **/usr/lib/** or
1051
+ elsewhere.
1052
+
1053
+ But the resulting code that had to be written for this, was not
1054
+ very elegant, and takes about 10-20 lines of code for checking
1055
+ this, including fall-backs, for each program that does not
1056
+ conform to --version or a .pc file. I am no longer sure whether
1057
+ it is worth to add that code, since it also may have to be
1058
+ maintained, and is not always perfect nor does it always work,
1059
+ depending on the computer system at hand. So, past this point,
1060
+ **environment_information** is not doing its best to query the
1061
+ version for all programs - it will try pkg-config and
1062
+ --version or -V in most cases, and if that fails then
1063
+ the environment_information project will assume that the
1064
+ program at hand is not installed.
1065
+
1066
+ This may be a **false negative**, but to me it appears
1067
+ to be better in the long run, in regards to maintainability
1068
+ of the whole project. After all one reason for the rewrite
1069
+ in 2020 was to simplify the whole project, and this objective
1070
+ has been achieved - all the commands are now stored in yaml
1071
+ files, and that is so much simpler to handle than the
1072
+ corresponding ruby methods that were used before that.
1073
+
1074
+ ## Adding new entries to EnvironmentInformation
1075
+
1076
+ New entries can be added into the following yaml file:
1077
+
1078
+ **query_to_use_for_the_individual_components.yml**
1079
+
1080
+ The two most commonly used variants there are version,
1081
+ for **bin/foo --version* invocations, and pkgconfig,
1082
+ for querying pkg-config .pc files. However had, many
1083
+ programs make use of different invocation variants,
1084
+ don't come with a .pc file, and have no binaries.
1085
+ Querying the correct version of such files is difficult
1086
+ since there is no standard. This is a reason why the
1087
+ code has to handle these cases.
1088
+
1089
+ But in principle, adding a new entry is as simple as
1090
+ adding a new line into that .yml file (and registering
1091
+ that component in a second .yml file).
1092
+
1093
+ ## The toplevel main hash
1094
+
1095
+ EnvironmentInformation tries to store the information that
1096
+ it has collected into a **hash**, which can be accessed like
1097
+ this quickly:
1098
+
1099
+ EnvironmentInformation.hash?
1100
+
1101
+ By default this hash is empty, so you have to fill it up
1102
+ first, if you want to do so, via the following method:
1103
+
1104
+ EnvironmentInformation.initialize
1105
+
1106
+ hash = EnvironmentInformation.hash? # ← and here you can query it
1107
+
1108
+ The hash can then be used as basis for reporting at a later time,
1109
+ or replaying that information via the **--replay** commandline
1110
+ switch to the executable.
1111
+
1112
+ ## Dependencies of the EnvironmentInformation project
1113
+
1114
+ The sole dependency for the **environment_information gem**
1115
+ is on the **colours** gem.
1116
+
1117
+ Up until the beginning of March 2020, the EnvironmentInformation
1118
+ project also depended on the **opn gem**. However had, I
1119
+ noticed that in a restricted environment installation of
1120
+ gems can be difficult, so I made opn **optional**. If you have
1121
+ it installed then EnvironmentInformation will still try to
1122
+ make use of the **Opn namespace**; and if it is not installed
1123
+ then EnvironmentInformation will simply **skip** Opn completely.
1124
+
1125
+ ## Rationale behind the different queries
1126
+
1127
+ As was already explained, different programs require different
1128
+ ways to determine which version is installed. Some projects
1129
+ would allow more than one way, such as the --version flag,
1130
+ but also querying .pc files. Ruby, for example, supports both
1131
+ --version, and comes with a .pc file (if you compiled it from
1132
+ source, at the least).
1133
+
1134
+ So, which way to choose?
1135
+
1136
+ In my opinion, .pc files are better than --version, for
1137
+ at the least two reasons:
1138
+
1139
+ - The resulting code to handle this is much simpler. .pc
1140
+ files are quite uniform, whereas the output of --version
1141
+ is very dissimilar between different programs.
1142
+
1143
+ - Another reason is that invoking the binary, just to
1144
+ do a --version, is actually more expensive (CPU-wise)
1145
+ than it is to query a simple text file, which is
1146
+ essentially what .pc files are. So this is another reason
1147
+ in favour of .pc files.
1148
+
1149
+ For these reasons, and a few smaller ones, the EnvironmentInformation
1150
+ project will try to prefer .pc files whenever that is possible.
1151
+ We may retain code that can handle --version calls, though,
1152
+ if they need a special way to query.
1153
+
1154
+ ## Querying all registered pkg-config entries
1155
+
1156
+ To show all registered pkg-config entries (with .pc files)
1157
+ do this:
1158
+
1159
+ envi --pkgconfig
1160
+
1161
+ If you want to obtain an Array of all outdated programs
1162
+ on the target computer system, try this method:
1163
+
1164
+ EnvironmentInformation.return_array_of_outdated_programs
1165
+
1166
+ You need to have initialized the main hash once, before
1167
+ being able to make use of that method.
1168
+
1169
+ ## Quickly showing the version of individual programs
1170
+
1171
+ You can show the version of individual programs
1172
+ like this:
1173
+
1174
+ envi --bash
1175
+ envi --brotli
1176
+
1177
+ This will only work if the program has been registered,
1178
+ though - so the second variant will not work.
1179
+
1180
+ Also take note that this will be ultra-short output,
1181
+ so nothing will be saved into a local file. The idea
1182
+ here is that the user only wants to see the version
1183
+ of the program at hand, such as the <b>bash shell</b>.
1184
+
1185
+ ## Aliases to program names
1186
+
1187
+ For several reasons it may be useful to define some aliases
1188
+ or shortcuts to registered names. For example, the input
1189
+ name **yacc** should point to the program called **bison**,
1190
+ and the input name **diff** should really be an abbreviation
1191
+ for **diffutils**. This allows the user to use the
1192
+ environment_information project in a more convenient manner.
1193
+
1194
+ Currently these aliases are hardcoded, defined in the
1195
+ method called **EnvironmentInformation.return_alias_to()**.
1196
+
1197
+ If no alias is found then the method will simply return
1198
+ the original input argument. This allows us to use this
1199
+ method as a 'sanitizer' or filter.
1200
+
1201
+ ## GUIs - Graphical User Interfaces
1202
+
1203
+ A few bindings exist, to ruby-gtk3 and ruby-libui. These are
1204
+ mostly just demos, proof-of-concept. They are not really very
1205
+ elegant or sophisticated - I really only wanted to show how
1206
+ to embed the information gained from the commandline via
1207
+ a GUI as well.
1208
+
1209
+ ## Support for KDE
1210
+
1211
+ If you have the RBT gem installed (gem install rbt) then you
1212
+ can invoke envi via:
1213
+
1214
+ envi --kde?
1215
+
1216
+ Since as of August 2022 this will try to show the versions
1217
+ of installed KDE applications.
1218
+
1219
+ This currently does not work very well; at a later point
1220
+ this will be polished and improved.
1221
+
1222
+ ## Bugs and other misbehaviours
1223
+
1224
+ I noticed a few bugs here and there over the years. For instance,
1225
+ sometimes there may not be any output and the program stops
1226
+ working suddenly. This sometimes happens because there is some
1227
+ error in the underlying way how EnvironmentInformation obtains
1228
+ the version-information. In the long run I intend to improve
1229
+ the situation, by no longer falling into such issues - but
1230
+ they are not easily reproducible on my system. Either way I
1231
+ added this subsection in November 2021, to lessen the confusion
1232
+ for users at the least a little bit. And, again, as said, in
1233
+ the long run the code will change so as to not run into such
1234
+ situations anymore.
1235
+
1236
+ To provide a specific example: there may be instances of
1237
+ emacs about, such as on antiX, which simply did not
1238
+ provide any output. When I compiled emacs from source, it
1239
+ worked fine - so always check that the program works as
1240
+ assumed it **should** work.
1241
+
1242
+
1243
+ ## Contact information and mandatory 2FA coming up in 2022
1244
+
1245
+ If your creative mind has ideas and specific suggestions to make this gem
1246
+ more useful in general, feel free to drop me an email at any time, via:
1247
+
1248
+ shevy@inbox.lt
1249
+
1250
+ Before that email I used an email account at Google gmail, but in **2021** I
1251
+ decided to slowly abandon gmail, for various reasons. In order to limit the
1252
+ explanation here, allow me to just briefly state that I do not feel as if I
1253
+ want to promote any Google service anymore when the user becomes the
1254
+ product (such as via data collection by upstream services). I feel this is
1255
+ a hugely flawed business model.
1256
+
1257
+ Do keep in mind that responding to emails may take some time, depending on
1258
+ the amount of work I may have at that moment.
1259
+
1260
+ In <b>2022</b> rubygems.org, or rather the corporate overlords who control the
1261
+ rubygems.org infrastructure these days, decided to make 2FA mandatory for every
1262
+ gem owner eventually: see
1263
+ https://blog.rubygems.org/2022/06/13/making-packages-more-secure.html
1264
+
1265
+ Mandatory 2FA will eventually be extended to all rubygems.org developers and
1266
+ maintainers. As I can not use 2FA, for reasons I will skip explaining here,
1267
+ this means that my projects will eventually be taken over by shopify (or,
1268
+ correspondingly, whoever effectively controls the rubygems.org ecosystem).
1269
+ At that point, I no longer have any control what is done to my projects
1270
+ since shopify (respectively those controlling the gems ecosystem) took away
1271
+ control here. Not sure at which point ruby became corporate-controlled -
1272
+ that was not the case several years ago.
1273
+
1274
+ Ruby also only allows 2FA users to participate on the issue tracker these
1275
+ days:
1276
+
1277
+ https://bugs.ruby-lang.org/issues/18800
1278
+