environment_information 1.4.89

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 (94) hide show
  1. checksums.yaml +7 -0
  2. data/README.md +1276 -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 +159 -0
  9. data/lib/environment_information/class/add.rb +187 -0
  10. data/lib/environment_information/class/colours.rb +283 -0
  11. data/lib/environment_information/class/constants.rb +35 -0
  12. data/lib/environment_information/class/environment_information.rb +51 -0
  13. data/lib/environment_information/class/help.rb +90 -0
  14. data/lib/environment_information/class/html.rb +78 -0
  15. data/lib/environment_information/class/initialize.rb +177 -0
  16. data/lib/environment_information/class/menu.rb +465 -0
  17. data/lib/environment_information/class/misc.rb +897 -0
  18. data/lib/environment_information/class/opn.rb +33 -0
  19. data/lib/environment_information/class/register_sigint.rb +20 -0
  20. data/lib/environment_information/class/reset.rb +217 -0
  21. data/lib/environment_information/class/ruby.rb +79 -0
  22. data/lib/environment_information/class/run.rb +61 -0
  23. data/lib/environment_information/class/show_display_and_report.rb +355 -0
  24. data/lib/environment_information/colours/colours.rb +211 -0
  25. data/lib/environment_information/colours/sfancy.rb +19 -0
  26. data/lib/environment_information/colours/simp.rb +19 -0
  27. data/lib/environment_information/constants/array_tracked_components.rb +210 -0
  28. data/lib/environment_information/constants/constants.rb +17 -0
  29. data/lib/environment_information/constants/encoding.rb +21 -0
  30. data/lib/environment_information/constants/error_line.rb +17 -0
  31. data/lib/environment_information/constants/file_constants.rb +102 -0
  32. data/lib/environment_information/constants/misc.rb +86 -0
  33. data/lib/environment_information/constants/namespace.rb +14 -0
  34. data/lib/environment_information/constants/newline.rb +16 -0
  35. data/lib/environment_information/constants/regex.rb +30 -0
  36. data/lib/environment_information/constants/temp_directory.rb +52 -0
  37. data/lib/environment_information/gui/gtk2/environment_information.rb +35 -0
  38. data/lib/environment_information/gui/gtk3/environment_information.rb +34 -0
  39. data/lib/environment_information/gui/libui/environment_information.rb +74 -0
  40. data/lib/environment_information/gui/shared_code/environment_information_module.rb +409 -0
  41. data/lib/environment_information/misc_components/README.md +3 -0
  42. data/lib/environment_information/misc_components/cflags.rb +36 -0
  43. data/lib/environment_information/misc_components/cpuinfo.rb +64 -0
  44. data/lib/environment_information/misc_components/operating_system.rb +54 -0
  45. data/lib/environment_information/misc_components/operating_system_bit_type.rb +42 -0
  46. data/lib/environment_information/misc_components/ram.rb +30 -0
  47. data/lib/environment_information/misc_components/rubygems_installation_directory.rb +54 -0
  48. data/lib/environment_information/misc_components/screen_resolution.rb +50 -0
  49. data/lib/environment_information/project/project.rb +27 -0
  50. data/lib/environment_information/queries/README.md +2 -0
  51. data/lib/environment_information/queries/complex_version.rb +272 -0
  52. data/lib/environment_information/queries/pkg_config.rb +125 -0
  53. data/lib/environment_information/queries/simple_version.rb +217 -0
  54. data/lib/environment_information/requires/require_asciitable.rb +15 -0
  55. data/lib/environment_information/requires/require_the_constants.rb +7 -0
  56. data/lib/environment_information/requires/require_the_environment_information_project.rb +23 -0
  57. data/lib/environment_information/requires/require_the_individual_misc_components.rb +30 -0
  58. data/lib/environment_information/requires/require_the_toplevel_methods.rb +22 -0
  59. data/lib/environment_information/toplevel_methods/autogenerate_all_relevant_methods.rb +152 -0
  60. data/lib/environment_information/toplevel_methods/cd.rb +16 -0
  61. data/lib/environment_information/toplevel_methods/e.rb +43 -0
  62. data/lib/environment_information/toplevel_methods/hash.rb +60 -0
  63. data/lib/environment_information/toplevel_methods/internet_is_available.rb +30 -0
  64. data/lib/environment_information/toplevel_methods/is_on_roebe.rb +16 -0
  65. data/lib/environment_information/toplevel_methods/menu.rb +90 -0
  66. data/lib/environment_information/toplevel_methods/misc.rb +309 -0
  67. data/lib/environment_information/toplevel_methods/n_subcommands.rb +31 -0
  68. data/lib/environment_information/toplevel_methods/prefix_to_use.rb +39 -0
  69. data/lib/environment_information/toplevel_methods/register_this_component_is_missing.rb +61 -0
  70. data/lib/environment_information/toplevel_methods/remote_url_of_this_program.rb +45 -0
  71. data/lib/environment_information/toplevel_methods/replay_from_the_stored_file.rb +84 -0
  72. data/lib/environment_information/toplevel_methods/return_alias_to.rb +30 -0
  73. data/lib/environment_information/toplevel_methods/return_pkgconfig_based_programs.rb +28 -0
  74. data/lib/environment_information/toplevel_methods/return_remote_gtk2_version.rb +54 -0
  75. data/lib/environment_information/toplevel_methods/return_simple_version_based_programs.rb +28 -0
  76. data/lib/environment_information/toplevel_methods/return_version_of_this_program.rb +182 -0
  77. data/lib/environment_information/toplevel_methods/show_all_available_components.rb +192 -0
  78. data/lib/environment_information/toplevel_methods/write_what_into.rb +24 -0
  79. data/lib/environment_information/version/version.rb +25 -0
  80. data/lib/environment_information/www/sinatra_interface.rb +213 -0
  81. data/lib/environment_information/www/webobject_interface.cgi +29 -0
  82. data/lib/environment_information/yaml/array_default_programs_on_linux.yml +15 -0
  83. data/lib/environment_information/yaml/array_lfs_core_programs.yml +37 -0
  84. data/lib/environment_information/yaml/array_science_cluster.yml +12 -0
  85. data/lib/environment_information/yaml/array_tracked_non_programs.yml +13 -0
  86. data/lib/environment_information/yaml/array_tracked_programs.yml +207 -0
  87. data/lib/environment_information/yaml/array_tracked_xorg_components.yml +37 -0
  88. data/lib/environment_information/yaml/colours.yml +3 -0
  89. data/lib/environment_information/yaml/query_to_use_for_the_individual_components.yml +256 -0
  90. data/lib/environment_information.rb +5 -0
  91. data/test/testing_environment_information.rb +26 -0
  92. data/test/testing_missing_components.rb +9 -0
  93. data/test/testing_prefix_for_the_environment_information_project.rb +20 -0
  94. metadata +191 -0
data/README.md ADDED
@@ -0,0 +1,1276 @@
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 **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
+ coreutils
721
+ curl
722
+ dbus
723
+ dhcpcd
724
+ diffutils
725
+ elfutils
726
+ emacs
727
+ enchant
728
+ ethtool
729
+ eudev
730
+ evince
731
+ exempi
732
+ expat
733
+ ffmpeg
734
+ fftw
735
+ file
736
+ findutils
737
+ flac
738
+ flatpak
739
+ flex
740
+ fluidsynth
741
+ fontconfig
742
+ freeipmi
743
+ freetype
744
+ fribidi
745
+ gawk
746
+ gc
747
+ gcc
748
+ gcr
749
+ gdb
750
+ gdkpixbuf
751
+ gegl
752
+ geocodeglib
753
+ gettext
754
+ ghostscript
755
+ gimp
756
+ git
757
+ gmime
758
+ gjs
759
+ glib
760
+ glibc
761
+ gmp
762
+ gnupg
763
+ gnuplot
764
+ gnutls
765
+ gperf
766
+ graphviz
767
+ grep
768
+ groff
769
+ gsettingsdesktopschemas
770
+ gsl
771
+ gtk2
772
+ gtk3
773
+ guile
774
+ gupnp
775
+ gzip
776
+ harfbuzz
777
+ hmmer
778
+ icewm
779
+ icu4c
780
+ imagemagick
781
+ intltool
782
+ jasper
783
+ java
784
+ kde_frameworks
785
+ kmod
786
+ krb5
787
+ krita
788
+ lftp
789
+ libarchive
790
+ libassuan
791
+ libbytesize
792
+ libdazzle
793
+ libdrm
794
+ libepoxy
795
+ libgdata
796
+ libgee
797
+ libgpgerror
798
+ libgsf
799
+ libgtop
800
+ libhandy
801
+ libical
802
+ libjpegturbo
803
+ libmbim
804
+ libpeas
805
+ libpsl
806
+ libqmi
807
+ librsvg
808
+ libsamplerate
809
+ libseccomp
810
+ libsecret
811
+ libsndfile
812
+ libtasn1
813
+ libtool
814
+ libunwind
815
+ libuv
816
+ libva
817
+ libvpx
818
+ libwebp
819
+ libwpe
820
+ libzip
821
+ linux
822
+ llvm
823
+ lynx
824
+ m4
825
+ make
826
+ mc
827
+ mlt
828
+ mozjs
829
+ mpc
830
+ mpfr
831
+ mtools
832
+ nasm
833
+ ncurses
834
+ neon
835
+ nettle
836
+ nghttp2
837
+ nginx
838
+ ninja
839
+ node
840
+ nss
841
+ openssl
842
+ opusfile
843
+ pango
844
+ parted
845
+ patch
846
+ patchelf
847
+ pbbam
848
+ pcre
849
+ pcre2
850
+ perl
851
+ php
852
+ pipewire
853
+ pkgconfig
854
+ plzip
855
+ poppler
856
+ popt
857
+ python
858
+ qpdf
859
+ qt
860
+ r
861
+ readline
862
+ re2c
863
+ relion
864
+ rsync
865
+ ruby
866
+ rubygems
867
+ samtools
868
+ sed
869
+ screen
870
+ sharutils
871
+ simple-scan
872
+ strace
873
+ swig
874
+ sysstat
875
+ tar
876
+ texinfo
877
+ tiff
878
+ tmux
879
+ unbound
880
+ v4lutils
881
+ valgrind
882
+ viennarna
883
+ vim
884
+ vte
885
+ wavpack
886
+ webkit2gtk
887
+ wget
888
+ wireshark
889
+ xfsprogs
890
+ xterm
891
+ xvid
892
+ xz
893
+ zlib
894
+
895
+
896
+ You can also display these programs dynamically, such as through the
897
+ following **API**:
898
+
899
+ require 'environment_information'
900
+
901
+ pp EnvironmentInformation.tracked_programs?
902
+
903
+ Note that since as of **March 2019**, environment_information will also attempt
904
+ to find out the installed version for **gmp**, **mpfr** and **mpc**. This
905
+ may fail, though, and will be silently ignored in these cases (at least
906
+ for the time being).
907
+
908
+ You can use the following method to display a list of all programs
909
+ that are registered, from the commandline:
910
+
911
+ envi --registered-components?
912
+
913
+ This will show every registered (and thus, available) component of this
914
+ project.
915
+
916
+ As of **February 2020**, this project tracks at the least 105 different
917
+ programs. More entries will be added in the future, but the primary
918
+ focus will be on a **Linux from Scratch** / **Beyond Linux from Scratch**
919
+ setup, so expect those programs that are installed first, to be added
920
+ next, too.
921
+
922
+ ## Querying the components that will be shown
923
+
924
+ You can query the components that will be shown, by issuing one of
925
+ the following commands:
926
+
927
+ envi --show-components?
928
+ envi --show-components
929
+
930
+ Note that this works exclusively, meaning that if you use this
931
+ commandline switch, then you will ONLY get a query of the
932
+ components that are available.
933
+
934
+ ## Replaying the information
935
+
936
+ Normally showing all information when issuing **envi --RALL** can take
937
+ quite some time; on my computer system 18 seconds, before the rewrite
938
+ in February 2020.
939
+
940
+ The reason as to why it takes that long is mostly because many different
941
+ files have to be queried; their --version flag has to be called or
942
+ their .pc file has to be checked, but most importantly querying data
943
+ from the **RBT project** currently takes way too long. This is not an
944
+ ideal situation, as nobody wants to wait.
945
+
946
+ Waiting 18 seconds is simply too long, though, but until that part in
947
+ RBT is improved, I have added a **--replay** functionality for **class
948
+ EnvironmentInformation** (via the commandline).
949
+
950
+ What this functionality does is to take an available (existing) .yml
951
+ file that holds the information from the last invocation run, and then
952
+ proceeds to display this information on the commandline to the user.
953
+ This will evidently be much faster, since the information has already
954
+ been stored before in a prior run.
955
+
956
+ This change required that the environment information project will
957
+ also generate a **.yml file** by default.
958
+
959
+ Note that this functionality is not yet complete; I will extend this
960
+ at a later time (written this part here as of **December 2019**).
961
+
962
+ You can disable saving into this .yml file via:
963
+
964
+ envi --no-yaml-file
965
+
966
+ To invoke the replay functionality, do:
967
+
968
+ envi --replay
969
+
970
+ ## Avoid the creation of local files
971
+
972
+ By default, the main class in this project may generate a few local
973
+ files. This may not always be wanted, or possible (e. g. in a
974
+ read-only filesystem), so an option has to exist that disables
975
+ this functionality.
976
+
977
+ That option is called **--no-save** and can be used like this:
978
+
979
+ envi --lfs --no-save
980
+
981
+ ## Using another prefix
982
+
983
+ By default, the environment_information project will assume that
984
+ the main prefix is / or /usr, respectively. In other words, it
985
+ will assume that, for example, the binary called "bison" will
986
+ reside at /usr/bin/bison. To be more correct, it will make use
987
+ of the PATH environment variable, but for most users this will
988
+ list /usr/bin/ first.
989
+
990
+ That way "bison --version" should work and be the same as
991
+ "/usr/bin/bison --version".
992
+
993
+ For pkg-config .pc files, the main target will usually then
994
+ be at /usr/lib/pkgconfig/.
995
+
996
+ Note that the above is not always a correct assumption. For
997
+ example, the **GoboLinux approach** uses the **/Programs/**
998
+ hierarchy instead (but it also keeps legacy symlinks, so in
999
+ fact GoboLinux works just like any other linux distribution too).
1000
+
1001
+ On my home setup, I tend to use /home/Programs/ since some
1002
+ time - mostly because I tend to relocate /home/ in general
1003
+ or may keep it on a separate partition.
1004
+
1005
+ For these latter use cases we require another way to quickly
1006
+ list all versions of different programs. On 14.01.2020
1007
+ support for this has been (partially) added.
1008
+
1009
+ Invoke this like so:
1010
+
1011
+ envi --work-on-programs-directory-only
1012
+
1013
+ Note that this would use /home/Programs/ right now, which
1014
+ is hardcoded - and thus not flexible.
1015
+
1016
+ I am aware of this limitation, so expect more code changes
1017
+ in the future to extend this functionality.
1018
+
1019
+ One key idea for this is to set up /home/Programs/Toolchain/
1020
+ and have that one work reliably to cross-compile different
1021
+ architectures, libc libraries and so forth. But for now,
1022
+ this subsection is a stub.
1023
+
1024
+ ## Rationale as to why some programs may work and some may not
1025
+
1026
+ Querying the specific version installed on a given computer
1027
+ system can be tricky. If a **.pc file** is available (**pkg-config**)
1028
+ then querying the version is quite trivial. If a **binary** is
1029
+ available then often **--version** or **-V** will work. But
1030
+ sometimes there is no binary, and no .pc file either. So what
1031
+ to do in such a case?
1032
+
1033
+ This is not simple to answer, since it may depend on the
1034
+ program at hand.
1035
+
1036
+ It may be possible to infer the proper version from the
1037
+ library at hand e. g. **/usr/lib/foobar.so.4.8.2**. Here
1038
+ we could assume that the version will be 4.8.2, but this
1039
+ is not necessarily guaranteed to work, either.
1040
+
1041
+ In the past, before the rewrite of this project in **February 2020**,
1042
+ the environment_information project had used code that would
1043
+ check for such conditions - for example, for **readline**,
1044
+ and look for specific .so files under **/usr/lib/** or
1045
+ elsewhere.
1046
+
1047
+ But the resulting code that had to be written for this, was not
1048
+ very elegant, and takes about 10-20 lines of code for checking
1049
+ this, including fall-backs, for each program that does not
1050
+ conform to --version or a .pc file. I am no longer sure whether
1051
+ it is worth to add that code, since it also may have to be
1052
+ maintained, and is not always perfect nor does it always work,
1053
+ depending on the computer system at hand. So, past this point,
1054
+ **environment_information** is not doing its best to query the
1055
+ version for all programs - it will try pkg-config and
1056
+ --version or -V in most cases, and if that fails then
1057
+ the environment_information project will assume that the
1058
+ program at hand is not installed.
1059
+
1060
+ This may be a **false negative**, but to me it appears
1061
+ to be better in the long run, in regards to maintainability
1062
+ of the whole project. After all one reason for the rewrite
1063
+ in 2020 was to simplify the whole project, and this objective
1064
+ has been achieved - all the commands are now stored in yaml
1065
+ files, and that is so much simpler to handle than the
1066
+ corresponding ruby methods that were used before that.
1067
+
1068
+ ## Adding new entries to EnvironmentInformation
1069
+
1070
+ New entries can be added into the following yaml file:
1071
+
1072
+ **query_to_use_for_the_individual_components.yml**
1073
+
1074
+ The two most commonly used variants there are version,
1075
+ for **bin/foo --version* invocations, and pkgconfig,
1076
+ for querying pkg-config .pc files. However had, many
1077
+ programs make use of different invocation variants,
1078
+ don't come with a .pc file, and have no binaries.
1079
+ Querying the correct version of such files is difficult
1080
+ since there is no standard. This is a reason why the
1081
+ code has to handle these cases.
1082
+
1083
+ But in principle, adding a new entry is as simple as
1084
+ adding a new line into that .yml file (and registering
1085
+ that component in a second .yml file).
1086
+
1087
+ ## The toplevel main hash
1088
+
1089
+ EnvironmentInformation tries to store the information that
1090
+ it has collected into a **hash**, which can be accessed like
1091
+ this quickly:
1092
+
1093
+ EnvironmentInformation.hash?
1094
+
1095
+ By default this hash is empty, so you have to fill it up
1096
+ first, if you want to do so, via the following method:
1097
+
1098
+ EnvironmentInformation.initialize
1099
+
1100
+ hash = EnvironmentInformation.hash? # ← and here you can query it
1101
+
1102
+ The hash can then be used as basis for reporting at a later time,
1103
+ or replaying that information via the **--replay** commandline
1104
+ switch to the executable.
1105
+
1106
+ ## Dependencies of the EnvironmentInformation project
1107
+
1108
+ The sole dependency for the **environment_information gem**
1109
+ is on the **colours** gem.
1110
+
1111
+ Up until the beginning of March 2020, the EnvironmentInformation
1112
+ project also depended on the **opn gem**. However had, I
1113
+ noticed that in a restricted environment installation of
1114
+ gems can be difficult, so I made opn **optional**. If you have
1115
+ it installed then EnvironmentInformation will still try to
1116
+ make use of the **Opn namespace**; and if it is not installed
1117
+ then EnvironmentInformation will simply **skip** Opn completely.
1118
+
1119
+ ## Rationale behind the different queries
1120
+
1121
+ As was already explained, different programs require different
1122
+ ways to determine which version is installed. Some projects
1123
+ would allow more than one way, such as the --version flag,
1124
+ but also querying .pc files. Ruby, for example, supports both
1125
+ --version, and comes with a .pc file (if you compiled it from
1126
+ source, at the least).
1127
+
1128
+ So, which way to choose?
1129
+
1130
+ In my opinion, .pc files are better than --version, for
1131
+ at the least two reasons:
1132
+
1133
+ - The resulting code to handle this is much simpler. .pc
1134
+ files are quite uniform, whereas the output of --version
1135
+ is very dissimilar between different programs.
1136
+
1137
+ - Another reason is that invoking the binary, just to
1138
+ do a --version, is actually more expensive (CPU-wise)
1139
+ than it is to query a simple text file, which is
1140
+ essentially what .pc files are. So this is another reason
1141
+ in favour of .pc files.
1142
+
1143
+ For these reasons, and a few smaller ones, the EnvironmentInformation
1144
+ project will try to prefer .pc files whenever that is possible.
1145
+ We may retain code that can handle --version calls, though,
1146
+ if they need a special way to query.
1147
+
1148
+ ## Querying all registered pkg-config entries
1149
+
1150
+ To show all registered pkg-config entries (with .pc files)
1151
+ do this:
1152
+
1153
+ envi --pkgconfig
1154
+
1155
+ If you want to obtain an Array of all outdated programs
1156
+ on the target computer system, try this method:
1157
+
1158
+ EnvironmentInformation.return_array_of_outdated_programs
1159
+
1160
+ You need to have initialized the main hash once, before
1161
+ being able to make use of that method.
1162
+
1163
+ ## Quickly showing the version of individual programs
1164
+
1165
+ You can show the version of individual programs
1166
+ like this:
1167
+
1168
+ envi --bash
1169
+ envi --brotli
1170
+
1171
+ This will only work if the program has been registered,
1172
+ though - so the second variant will not work.
1173
+
1174
+ Also take note that this will be ultra-short output,
1175
+ so nothing will be saved into a local file. The idea
1176
+ here is that the user only wants to see the version
1177
+ of the program at hand, such as the <b>bash shell</b>.
1178
+
1179
+ ## Aliases to program names
1180
+
1181
+ For several reasons it may be useful to define some aliases
1182
+ or shortcuts to registered names. For example, the input
1183
+ name **yacc** should point to the program called **bison**,
1184
+ and the input name **diff** should really be an abbreviation
1185
+ for **diffutils**. This allows the user to use the
1186
+ environment_information project in a more convenient manner.
1187
+
1188
+ Currently these aliases are hardcoded, defined in the
1189
+ method called **EnvironmentInformation.return_alias_to()**.
1190
+
1191
+ If no alias is found then the method will simply return
1192
+ the original input argument. This allows us to use this
1193
+ method as a 'sanitizer' or filter.
1194
+
1195
+ ## GUIs - Graphical User Interfaces
1196
+
1197
+ A few bindings exist, to ruby-gtk3 and ruby-libui. These are
1198
+ mostly just demos, proof-of-concept. They are not really very
1199
+ elegant or sophisticated - I really only wanted to show how
1200
+ to embed the information gained from the commandline via
1201
+ a GUI as well.
1202
+
1203
+ ## Support for KDE
1204
+
1205
+ If you have the RBT gem installed (gem install rbt) then you
1206
+ can invoke envi via:
1207
+
1208
+ envi --kde?
1209
+
1210
+ Since as of August 2022 this will try to show the versions
1211
+ of installed KDE applications.
1212
+
1213
+ This currently does not work very well; at a later point
1214
+ this will be polished and improved.
1215
+
1216
+ ## Bugs and other misbehaviours
1217
+
1218
+ I noticed a few bugs here and there over the years. For instance,
1219
+ sometimes there may not be any output and the program stops
1220
+ working suddenly. This sometimes happens because there is some
1221
+ error in the underlying way how EnvironmentInformation obtains
1222
+ the version-information. In the long run I intend to improve
1223
+ the situation, by no longer falling into such issues - but
1224
+ they are not easily reproducible on my system. Either way I
1225
+ added this subsection in November 2021, to lessen the confusion
1226
+ for users at the least a little bit. And, again, as said, in
1227
+ the long run the code will change so as to not run into such
1228
+ situations anymore.
1229
+
1230
+ To provide a specific example: there may be instances of
1231
+ emacs about, such as on antiX, which simply did not
1232
+ provide any output. When I compiled emacs from source, it
1233
+ worked fine - so always check that the program works as
1234
+ assumed it **should** work.
1235
+
1236
+
1237
+ ## Contact information and mandatory 2FA coming up in 2022
1238
+
1239
+ If your creative mind has ideas and specific suggestions to make this gem
1240
+ more useful in general, feel free to drop me an email at any time, via:
1241
+
1242
+ shevy@inbox.lt
1243
+
1244
+ Before that email I used an email account at Google gmail, but in **2021** I
1245
+ decided to slowly abandon gmail for various reasons. In order to limit this
1246
+ explanation here, allow me to just briefly state that I do not feel as if I
1247
+ want to promote any Google service anymore, for various reasons.
1248
+
1249
+ Do keep in mind that responding to emails may take some time, depending on
1250
+ the amount of work I may have at that moment.
1251
+
1252
+ In 2022 rubygems.org decided to make 2FA mandatory for every gem owner:
1253
+ see https://blog.rubygems.org/2022/06/13/making-packages-more-secure.html
1254
+
1255
+ As I can not use 2FA, for reasons I will skip explaining here (see
1256
+ various github issue discussions in the past), this effectively means that
1257
+ Betty Li and others who run the show at rubygems.org will perma-ban me
1258
+ from using rubygems as a developer.
1259
+
1260
+ As I disagree with that decision completely, this will mean that all my
1261
+ gems will be removed from rubygems.org prior to that sunset date, e. g.
1262
+ before they permanently lock me out from the code that I used
1263
+ to maintain. It is pointless to want to discuss this with them anymore -
1264
+ they have made up their minds and decided that you can only use
1265
+ the code if 2FA is in place, even though the code itself works just
1266
+ fine. If you don't use 2FA you are effectively locked out from your
1267
+ own code; I consider this a malicious attack. See also how they limited
1268
+ discussions to people with mandatory 2FA on the ruby-bugtracker, thus
1269
+ banning everyone permanently without 2FA:
1270
+
1271
+ https://bugs.ruby-lang.org/issues/18800
1272
+
1273
+ Guess it may indeed be time to finally abandon ruby - not because
1274
+ ruby is a bad language, but there are people now in charge who
1275
+ really should not be part of ruby in the first place.
1276
+