View Issue Details

IDProjectCategoryView StatusLast Update
0005012Talerobsolete componentpublic2018-04-15 20:34
ReporterChristian Grothoff Assigned ToMarcello Stanisci  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Platformi7OSDebian GNU/LinuxOS Versionsqueeze
Product Versiongit (master) 
Target Version0.5Fixed in Version0.5 
Summary0005012: bank looks in wrong directory for default configuration
DescriptionAt least in the test_bank_api, it prints:

2017-05-15 08:47:43,430 talerconfig WARNING can't read config directory '/home/grothoff/lib/share/taler/config.d'

which is wrong as "lib/" should not be there!

Consequently, it then prints warnings like:
2017-05-15 08:47:43,432 talerconfig WARNING Configuration is missing option 'max_debt' in section 'bank', falling back to '50 KUDOS'
2017-05-15 08:47:43,432 talerconfig WARNING Configuration is missing option 'max_debt_bank' in section 'bank', falling back to '0 KUDOS'
Steps To ReproduceNote that I have

TALER_PREFIX=/home/grothoff/lib (!)

which _is_ allowed (as it might be lib64/) and the (GNUnet) spec for PREFIX says that the code must check for lib/lib32/lib64 and strip it of the prefix.
TagsNo tags attached.

Activities

Marcello Stanisci

2017-05-30 11:11

reporter   ~0012192

Can't reproduce this..

Christian Grothoff

2017-05-30 11:25

manager   ~0012193

Did you explicitly set your TALER_PREFIX environment variable to include /lib/?

Marcello Stanisci

2017-11-03 16:09

reporter   ~0012540

Now I did, and still can't reproduce. Here's the reason: in my prefix-end-with-lib/share/taler/config.d there actually is a bank.conf, so the config loader doesn't complain. In your case, you must have used some buggy 'make install' which didn't put any file in there.

To answer your question: no, the config loader doesn't strip the final /lib part from the prefix.

Anyways, I couldn't find those GNUnet specs you mentioned, so is the final '/lib' part to be removed only for the config's destination, or for everything (executables/libraries/etc.)?

Christian Grothoff

2017-11-03 20:46

manager   ~0012545

Well, for libraries obviously not, as they are in /lib/ (or /lib32/ or /lib64/, which is why we need the prefix to contain /lib/ in the first place). Executables that are found in /lib/libexec/ also need the /lib/. But for /share/ stuff, /lib/ needs to be stripped.

Marcello Stanisci

2017-11-04 11:24

reporter   ~0012546

Ok. As of libraries, I thought the right behaviour is to have --prefix=<x> and then 'make install' will install libraries in <x>/lib; you are never supposed to specify the final /lib in your prefix (unless you really want stuff to be in <x>/lib/lib), right?

To recap: you ask that, whenever the user specifies a <x>/lib prefix, we strip the final /lib part from it with regard to /share/ stuff, and do NOT add a second /lib with regard to libraries and "libexec" executables.

But what about executables (like taler-bank-manage)? I don't think we want them in <x>/lib/bin.

Isn't it easier/more-obvious to just obey what the user gives as prefix and don't strip/add anything?

Christian Grothoff

2017-11-04 11:54

manager   ~0012547

Yes, --prefix=<X> will install to <X>/lib/. But if you set TALER_PREFIX (the environment variable), you _may_ set it to <X>/lib/ instead of just <X>. This is needed as on some platforms, the /lib/ ends up being /lib64/ or /lib32/ or /libGODKNOWSWHAT/, and so the TALER_PREFIX envrionment-variable override allows us to find out what GODKNOWSWHAT is. (Fortunately, we usually don't need TALER_PREFIX at all!)

Christian Grothoff

2017-11-04 11:55

manager   ~0012548

(Just to clarify: this is not about changing where the installation process installs files, it is about the way the Python code interprets the TALER_PREFIX environment variable!).

Marcello Stanisci

2017-11-04 21:27

reporter   ~0012564

Should be fixed by now (e22f7049d..).

Issue History

Date Modified Username Field Change
2017-05-15 10:46 Christian Grothoff New Issue
2017-05-15 10:46 Christian Grothoff Status new => assigned
2017-05-15 10:46 Christian Grothoff Assigned To => Marcello Stanisci
2017-05-30 11:11 Marcello Stanisci Note Added: 0012192
2017-05-30 11:25 Christian Grothoff Note Added: 0012193
2017-10-23 10:55 Christian Grothoff Severity major => minor
2017-11-03 16:09 Marcello Stanisci Note Added: 0012540
2017-11-03 20:46 Christian Grothoff Note Added: 0012545
2017-11-04 11:24 Marcello Stanisci Note Added: 0012546
2017-11-04 11:54 Christian Grothoff Note Added: 0012547
2017-11-04 11:55 Christian Grothoff Note Added: 0012548
2017-11-04 21:27 Marcello Stanisci Note Added: 0012564
2017-11-04 21:27 Marcello Stanisci Status assigned => resolved
2017-11-04 21:27 Marcello Stanisci Resolution open => fixed
2017-11-06 19:16 Christian Grothoff Fixed in Version => 0.5
2017-11-06 19:16 Christian Grothoff Target Version => 0.5
2018-04-15 20:34 Christian Grothoff Status resolved => closed
2022-08-23 20:26 Christian Grothoff Category bank (demonstrator) => py bank (demonstrator, obsolete)
2023-12-03 01:23 Christian Grothoff Category py bank (demonstrator, obsolete) => obsolete componet
2023-12-11 20:08 Florian Dold Category obsolete componet => obsolete component