Bug#962247: Required Configuration Files Not Found

2020-06-07 Thread Nilesh Patra
Hi,

On Fri, 5 Jun 2020 at 14:30, Andreas Tille  wrote:

> Hi Dario,
>
> thanks a lot for your bug report.  To bad that nobody reported before
> this issue which seems pretty obvious.  May be everybody is using circos
> with the --conf option (as our autopkgtest is doing it as well) and thus
> the issue was hidden.
>
> On Fri, Jun 05, 2020 at 02:00:13AM +, Dario Strbenac wrote:
> > Package: circos
> > Version: 0.69.6
> >
> > I think this software has not been correctly packaged. Running the
> circos command with no parameters results in
> >
> >   The Config::General module reported the error
> >   Config::General The file "etc/colors_fonts_patterns.conf" does not
> exist
> >   within ConfigPath:
> >
>  
> /etc/circos.circos.circos/etc./usr/bin/etc./usr/bin/../etc./usr/bin/.../usr/bin!
> >   at /usr/share/perl5/Circos/Configuration.pm line 820
> >
> > The server administrator at university investigated the c and explains
> "The issue is that it looked for file etc/colors_fonts_patterns.conf in
> various places including current directory and in /etc/circos, when that
> file was present as /etc/circos/colors_fonts_patterns.conf (while circos
> tried the name /etc/circos/etc/colors_fonts_patterns.conf with an extra or
> bogus /etc/ in the middle)."
>
> I've patched the code and moved some additional config files from
> examples to /etc/circos which helped to solve all these issues.
> Unfortunately there is a remaining one.  @Nilesh or @Pranav:  Do you
> have time to fix this one:
>
> /tmp $ circos
> debuggroup summary 0.17s welcome to circos v0.69-8 15 Jun 2019 on Perl
> 5.030002
> debuggroup summary 0.17s current working directory /tmp
> debuggroup summary 0.17s command /usr/bin/circos [no flags]
> debuggroup summary 0.17s guessing configuration file
> debuggroup summary 0.17s found conf file /usr/share/circos/etc/circos.conf
>
>   *** CIRCOS ERROR ***
>
>   cwd: /tmp
>
>   command: /usr/bin/circos
>
>   CONFIGURATION FILE ERROR
>
>   Error parsing the configuration file. You used an <>
> directive,
>   but the FILE could not be found. This FILE is interpreted relative to the
>   configuration file in which the <> directive is used. Circos
> lookd
>   for the file in these directories
>
>   /usr/share/circos/etc
>
>   /etc/circos
>
>   /usr/share/circos/etc
>
>   /usr/share/circos/etc/etc
>
>   /usr/bin/etc
>
>   /usr/bin/../etc
>
>   /usr/bin/..
>
>   /usr/bin
>
>   The Config::General module reported the error
>
>   Config::General The file "/usr/share/circos/fonts.conf" does not exist
> within
>   ConfigPath:
>
> /usr/share/circos/etc./etc/circos./usr/share/circos/etc./usr/share/circos/etc/etc./usr/bin/etc./usr/bin/../etc./usr/bin/.../usr/bin!
>   at /usr/share/perl5/Circos/Configuration.pm line 820.
>
>   If you are having trouble debugging this error, first read the best
> practices
>   tutorial for helpful tips that address many common problems
>
>
> http://www.circos.ca/documentation/tutorials/reference/best_practices
>
>   The debugging facility is helpful to figure out what's happening under
> the
>   hood
>
>   http://www.circos.ca/documentation/tutorials/configuration/debugging
>
>   If you're still stumped, get support in the Circos Google Group.
>
>   http://groups.google.com/group/circos-data-visualization
>
>   Please include this error, all your configuration, data files and the
> version
>   of Circos you're running (circos -v). Do not email me directly -- please
> use
>   the group.
>
>   Stack trace:
>  at /usr/share/perl5/Circos/Error.pm line 425.
> Circos::Error::fatal_error("configuration", "cannot_find_include",
> "/usr/share/circos/etc\x{a}/etc/circos\x{a}/usr/share/circos/etc\x{a}/usr/"...,
> "Config::General The file \"/usr/share/circos/fonts.conf\" does "...)
> called at /usr/share/perl5/Circos/Configuration.pm line 826
>
> Circos::Configuration::loadconfiguration("/usr/share/circos/etc/circos.conf")
> called at /usr/share/perl5/Circos.pm line 148
> Circos::run("Circos", "_cwd", "/tmp", "_argv", "") called at
> /usr/bin/circos line 538
>
>
> I admit I'm running out of ideas why the file
>
>   Config::General The file "/usr/share/circos/fonts.conf" does not
> exist within
>
> is seeked instead of  "/usr/share/circos/etc/fonts.conf" - may be that's
> a cause of the patches I did in debian/patches/fix_config_path.patch.
>
> Unfortunately I'm a bit running out of time to hunt this down finally.
>

This was so because the config files are full of (relative) hardcoded
paths.
I read up the documentation, only to realise that the code just works that
way i.e. with hardcoded relative paths: the only way to prevent this is to
add an absolute hard-coded path.
Hence, I replaced all the hardcoded paths with the installation paths
(which is also, in a way hard-coded). But this will likely work on all(most
of) GNU/Linux distributions and I suppose that's what we care about.
I've pushed a patch, please take a look if it looks right to you.

Kind Regards,

Bug#962247: Required Configuration Files Not Found

2020-06-05 Thread Andreas Tille
Hi Dario,

thanks a lot for your bug report.  To bad that nobody reported before
this issue which seems pretty obvious.  May be everybody is using circos
with the --conf option (as our autopkgtest is doing it as well) and thus
the issue was hidden.

On Fri, Jun 05, 2020 at 02:00:13AM +, Dario Strbenac wrote:
> Package: circos
> Version: 0.69.6
> 
> I think this software has not been correctly packaged. Running the circos 
> command with no parameters results in 
> 
>   The Config::General module reported the error
>   Config::General The file "etc/colors_fonts_patterns.conf" does not exist
>   within ConfigPath:
>   
> /etc/circos.circos.circos/etc./usr/bin/etc./usr/bin/../etc./usr/bin/.../usr/bin!
>   at /usr/share/perl5/Circos/Configuration.pm line 820
> 
> The server administrator at university investigated the c and explains "The 
> issue is that it looked for file etc/colors_fonts_patterns.conf in various 
> places including current directory and in /etc/circos, when that file was 
> present as /etc/circos/colors_fonts_patterns.conf (while circos tried the 
> name /etc/circos/etc/colors_fonts_patterns.conf with an extra or bogus /etc/ 
> in the middle)."

I've patched the code and moved some additional config files from
examples to /etc/circos which helped to solve all these issues.
Unfortunately there is a remaining one.  @Nilesh or @Pranav:  Do you
have time to fix this one:

/tmp $ circos
debuggroup summary 0.17s welcome to circos v0.69-8 15 Jun 2019 on Perl 5.030002
debuggroup summary 0.17s current working directory /tmp
debuggroup summary 0.17s command /usr/bin/circos [no flags]
debuggroup summary 0.17s guessing configuration file
debuggroup summary 0.17s found conf file /usr/share/circos/etc/circos.conf

  *** CIRCOS ERROR ***

  cwd: /tmp

  command: /usr/bin/circos

  CONFIGURATION FILE ERROR

  Error parsing the configuration file. You used an <> directive,
  but the FILE could not be found. This FILE is interpreted relative to the
  configuration file in which the <> directive is used. Circos lookd
  for the file in these directories

  /usr/share/circos/etc

  /etc/circos

  /usr/share/circos/etc

  /usr/share/circos/etc/etc

  /usr/bin/etc

  /usr/bin/../etc

  /usr/bin/..

  /usr/bin

  The Config::General module reported the error

  Config::General The file "/usr/share/circos/fonts.conf" does not exist within
  ConfigPath:
  
/usr/share/circos/etc./etc/circos./usr/share/circos/etc./usr/share/circos/etc/etc./usr/bin/etc./usr/bin/../etc./usr/bin/.../usr/bin!
  at /usr/share/perl5/Circos/Configuration.pm line 820.

  If you are having trouble debugging this error, first read the best practices
  tutorial for helpful tips that address many common problems

  http://www.circos.ca/documentation/tutorials/reference/best_practices

  The debugging facility is helpful to figure out what's happening under the
  hood

  http://www.circos.ca/documentation/tutorials/configuration/debugging

  If you're still stumped, get support in the Circos Google Group.

  http://groups.google.com/group/circos-data-visualization

  Please include this error, all your configuration, data files and the version
  of Circos you're running (circos -v). Do not email me directly -- please use
  the group.

  Stack trace:
 at /usr/share/perl5/Circos/Error.pm line 425.
Circos::Error::fatal_error("configuration", "cannot_find_include", 
"/usr/share/circos/etc\x{a}/etc/circos\x{a}/usr/share/circos/etc\x{a}/usr/"..., 
"Config::General The file \"/usr/share/circos/fonts.conf\" does "...) called at 
/usr/share/perl5/Circos/Configuration.pm line 826

Circos::Configuration::loadconfiguration("/usr/share/circos/etc/circos.conf") 
called at /usr/share/perl5/Circos.pm line 148
Circos::run("Circos", "_cwd", "/tmp", "_argv", "") called at 
/usr/bin/circos line 538


I admit I'm running out of ideas why the file

  Config::General The file "/usr/share/circos/fonts.conf" does not exist 
within

is seeked instead of  "/usr/share/circos/etc/fonts.conf" - may be that's
a cause of the patches I did in debian/patches/fix_config_path.patch.

Unfortunately I'm a bit running out of time to hunt this down finally.


Question to the bug reporter Dario since you was talking about some
server installation:  Assumed we would solve the issue which should be
not that hard finally - would it help if we would create a backport of
the fixed package?  Please let us know.

Kind regards

 Andreas.

-- 
http://fam-tille.de



Bug#962247: Required Configuration Files Not Found

2020-06-04 Thread Dario Strbenac
Package: circos
Version: 0.69.6

I think this software has not been correctly packaged. Running the circos 
command with no parameters results in 

  The Config::General module reported the error
  Config::General The file "etc/colors_fonts_patterns.conf" does not exist
  within ConfigPath:
  
/etc/circos.circos.circos/etc./usr/bin/etc./usr/bin/../etc./usr/bin/.../usr/bin!
  at /usr/share/perl5/Circos/Configuration.pm line 820

The server administrator at university investigated the c and explains "The 
issue is that it looked for file etc/colors_fonts_patterns.conf in various 
places including current directory and in /etc/circos, when that file was 
present as /etc/circos/colors_fonts_patterns.conf (while circos tried the name 
/etc/circos/etc/colors_fonts_patterns.conf with an extra or bogus /etc/ in the 
middle)."

--
Dario Strbenac
University of Sydney
Camperdown NSW 2050
Australia