Issue 89713 - gengal is broken failing to init UCB
Summary: gengal is broken failing to init UCB
Status: CLOSED FIXED
Alias: None
Product: Draw
Classification: Application
Component: code (show other issues)
Version: OOo 3.0 Beta
Hardware: All Unix, all
: P3 Trivial (vote)
Target Milestone: OOo 3.0.1
Assignee: jcn
QA Contact: issues@graphics
URL:
Keywords:
Depends on:
Blocks: 93339
  Show dependency tree
 
Reported: 2008-05-21 10:14 UTC by jcn
Modified: 2009-04-04 20:10 UTC (History)
8 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
fix: add gengalrc and remove dead code from gengal (4.69 KB, text/plain)
2008-06-03 09:42 UTC, jcn
no flags Details
gengal.sh workaround for upstream's split 3layer install (475 bytes, text/plain)
2009-01-06 12:49 UTC, jcn
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description jcn 2008-05-21 10:14:06 UTC
With the new install tree structure (openoffice.org3, openoffice.org/basis3.0),
the gengal utility is broken.

When running it, it exits with the message

$ ./gengal
Failed to init content broker
terminate called after throwing an instance of
'com::sun::star::uno::RuntimeException'

This problem, failing to init UCB, also stalls the development of the new xml
layout dialog engine, whose standalone test program breaks in the same way.
Comment 1 wolframgarten 2008-05-21 10:20:44 UTC
Reassigned. Please have a look.
Comment 2 mmeeks 2008-05-21 16:16:53 UTC
Stefan - we believe this is a direct consequence of the UNO re-work & package
splitting - that broke the bootstrapping logic used in this useful tool (for
gallery generation).

Can you have a quick read & suggest anything ?

Thanks.
Comment 3 kay.ramme 2008-05-22 13:13:16 UTC
Hi Michael, sorry for the delay ... I will have a look at it tomorrow ;-)

Comment 5 jcn 2008-06-03 09:42:53 UTC
Created attachment 54199 [details]
fix: add gengalrc and remove dead code from gengal
Comment 6 rene 2009-01-01 03:09:05 UTC
kr/sb: six months later and we still have this open. PING? Can we get this into
3.1 (or imho even 3.0.1, the 3-layer OOo broke it) please?
Comment 7 rene 2009-01-01 14:01:12 UTC
I think this should be fixed in 3.0.1, this is a regression in a externally-used
tools (e.g. for openclipart) to generate the gallery files.

This was even reported against beta, so there was time to fix it for 3.0, but as
usual, the responsible pepole didn't care...
Comment 8 rene 2009-01-01 14:11:32 UTC
.
Comment 9 rene 2009-01-01 14:14:46 UTC
done in cws fixgengal
Comment 10 andreschnabel 2009-01-01 15:22:35 UTC
reassign for verification
Comment 11 andreschnabel 2009-01-02 18:55:34 UTC
reopen -  in the cws build gengal is still not working

instead of: 
  Failed to init content broker
  terminate called after throwing an instance of
'com::sun::star::uno::RuntimeException'

I now get:
  terminate called after throwing an instance of
'com::sun::star::registry::InvalidRegistryException'
Comment 12 andreschnabel 2009-01-02 18:57:27 UTC
kr: please have a look and review the patch or reassign
Comment 13 Stephan Bergmann 2009-01-05 12:24:28 UTC
@jcn,rene:  Can anybody briefly explain what gengal is supposed to be doing?  It
was not identified as a relevant tool in the thread starting at
<http://www.openoffice.org/servlets/ReadMsg?list=dev&msgNo=19840> and the
back-then owner of this issue (mmeeks) had the issue laying around idle for half
a year (and it apparently at least slipped through my radar).  Is this tool of
any relevance today?
Comment 14 rene 2009-01-05 12:33:55 UTC
sb: *gen*erate *gal*eries. generaing the gallery files of OOo from a tool (e.g.
from a filelist of png)

yes, actievly used in openclipart packaging by various distros to create the
various files for OOo to appear in the Gallery.

Wrt your mail: maybe soone at that time noticed? Or didn't oversee what issues
the 3-layer OOo cause to gengal?

Right, and why has the issue be idle since half a year?

------- Additional comments from kr Thu May 22 12:13:16 +0000 2008 -------

Hi Michael, sorry for the delay ... I will have a look at it tomorrow ;-)

kr wanted to look at it...

Most distros use ooo-build anyway, which has the patch included, so...
Comment 15 rene 2009-01-05 12:35:20 UTC
sb: *gen*erate *gal*eries. generaing the gallery files of OOo from a tool (e.g.
from a filelist of png)

yes, actievly used in openclipart packaging by various distros to create the
various files for OOo to appear in the Gallery.

Wrt your mail: maybe soone at that time noticed? Or didn't oversee what issues
the 3-layer OOo cause to gengal?

Right, and why has the issue be idle since half a year?

------- Additional comments from kr Thu May 22 12:13:16 +0000 2008 -------

Hi Michael, sorry for the delay ... I will have a look at it tomorrow ;-)

kr wanted to look at it...

some ime later, jcn added a patch (and afair he was owner then). Still nothing
happening. (And that patch fwiw works in ooo-build).
Comment 16 Stephan Bergmann 2009-01-05 13:07:59 UTC
@rene:  No need to be offended (in case you are; your tone suggests you are).  I
just want to clarify how to proceed.

1  Is gengal needed when building OOo, or is it needed in an installed OOo? 
From your description ("generaing the gallery files of OOo from a tool") I would
assume the former, but oddly it is currently contained in the installation set.

2  How important is this for OOo 3.0.1, given that it is "actievly [sic] used in
openclipart packaging by various distros" and "[m]ost distros use ooo-build
anyway, which has the patch included"?
Comment 17 rene 2009-01-05 13:22:13 UTC
>@rene:  No need to be offended (in case you are; your tone suggests you are). 

I disagree. *You* copmlain about non-activity in months, but the non-acitity was
at your (or krs) side. Not mmeeks, not jcn.

Me personally didn't notice gengal was broken given that the time it was broken
also in ooo-build I didn't rebuild the openclipart packaages and then I already
had the fix :)

> 1  Is gengal needed when building OOo, or is it needed in an installed OOo? 
> From your description ("generaing the gallery files of OOo from a tool") I
> would assume the former, but oddly it is currently contained in the
> installation set.

Of course it should be in the installset. Where it should it be used from
anyway? For packages not doing anything with OOo except running gengal and
putting the files where they belong in the package?

(Of cuorse, IMHO it should be in -dev, which is done in my packages)

> 2  How important is this for OOo 3.0.1, given that it is "actievly [sic] used
in openclipart packaging by various distros"

as said, it's a) a regression to 2.4.1 (so it should have been fixed in 3.0
anyway), but as it isn't, it's still a regression and thus should be fixed in 3.0.1.

> and "[m]ost distros use ooo-build anyway, which has the patch included"?

Well, that's a point, but why leave it broken in vanilla? (BTW, for 3.1 I plan
a vanilla switch, at that case (means ASAP, because I currently do those
packages) I need gengal fixed in vanilla

Comment 18 rene 2009-01-05 13:31:32 UTC
> > 1  Is gengal needed when building OOo, or is it needed in an installed OOo? 
> > From your description ("generaing the gallery files of OOo from a tool") I
> > would assume the former, but oddly it is currently contained in the
> > installation set.
>
> Of course it should be in the installset. Where it should it be used from
> anyway? For packages not doing anything with OOo except running gengal and
> putting the files where they belong in the package?

So yes, it's (of course) the latter. The former would not make sense, how do you
generate the gallery files out of openclipart in the OOo build? When openclipart
is completeley separate? ;-)
Comment 19 Stephan Bergmann 2009-01-05 14:41:40 UTC
@rene:  I did not intend to appear complaining.  Anyway.

I still do not see why gengal needs to be part of a vanilla OOo installation set
(which might be ignorance on my part).  The problem is as follows:  If gengal
needs ucb/configmgr functionality, it needs bootstrap variables URE_BOOTSTRAP,
BRAND_BASE_DIR, OOO_BASE_DIR set.  The simplest way to achieve that is to have a
gengalrc next to gengal.bin that is a symlink to redirectrc in the brand layer
program directory.  However, as a basis layer by definition cannot point to a
corresponding brand layer (there might be multiple, varying over time), the only
sane solution would be to move gengal.bin from basis to brand layer (the gengal
wrapper script can probably be removed, anyway).  However, to keep the interface
between brand and basis layer small to ensure compatibility at the micro-version
level, that would in turn imply to split gengal into an executable in the brand
layer and the code itself in the basis layer, where the brand layer executable
just calls the code in the brand layer (cf. soffice.bin and libsofficeapp.so). 
Also, IMO it would be unfortunate to fill the brand layer program directory
(that should ideally only contain the stable interface of OOo that is of
relevance for clients) with tools that are apparently only needed in a very
special scenario (modifying an installed OOo to generate packages for a certain
Linux distro from the installed OOo) and might have uncertain interface stability.

In short, to me it looks like fixing gengal so that it can work as part of an
OOo installation set is nontrivial and has unwelcome consequences.  I think the
best fix would be to extract gengal from the OOo installation set and have it as
a separate tool.

For now, if you do need to call gengal, a workaround is to call it with

-env:URE_BOOTSTRAP=file:///opt/openoffice.org3/program/fundamentalrc
Comment 20 rene 2009-01-05 22:16:07 UTC
sb

> I still do not see why gengal needs to be part of a vanilla OOo installation 
> set (which might be ignorance on my part). 

It need to be either be in the OOo install set or in the OOo SDK install set.
Unless you operate it out completely as you suggest here:

> In short, to me it looks like fixing gengal so that it can work as part of an
< OOo installation set is nontrivial and has unwelcome consequences.  I think
> the best fix would be to extract gengal from the OOo installation set and
> have it as a separate tool.

Which still would work with an installed OOo.

> special scenario (modifying an installed OOo to generate packages for a certain
> Linux distro from the installed OOo) and might have uncertain interface
> stability.

Eh, no, you seem to misunderstand. The OOo build and OOo packages do nothing
with gengal - except installing it (at least for Debian (openclipart source
packages) , I know SUSE does it different and calls it after the OOo build).
In both scenarios, though, the gallery files get built and installed in
to OOos dirs. in separate packages if needed (Debian: openclipart-openoffice.org)

It's used like the SDK external tools. There's no "modifying an installed OOo".
And if you won't allow  that, how do you register clipart for the gallery
without needing to make the user do it hhimself or do it yourself when packaging?




 hrm, this could be, in ooo-build we have brand + basis in the same dir
(e.g. /usr/lib/openoffice) with the usual basis-link and ure-link dirs.
(basis-link -> basis3.0). 
Maybe it just works by chance in ooo-build because of this?

AFAIK, the only reliable paths on the 3-layer OOo are when they are accessed via
the link, which are intact..
Comment 21 Stephan Bergmann 2009-01-06 09:18:11 UTC
@rene:  I still do not understand who is supposed to call gengal, when.
Comment 22 jcn 2009-01-06 12:47:30 UTC
The reason it works in ooo-build is that it also works in fixgengal :-)

Looking at the gengalrc that is provided it is "obvious" that
OOO_INSTALL_PREFIX must be set.

Here's what I do:

   mkdir fixgengal && cd fixgengal
   ooo-cws-co fixgengal
   cd config_office && ./configure [..]
   ./bootstrap
   dmake
   dmake install DESTDIR=$(pwd)/ooo-cvs prefix=
   export OOO_INSTALL_PREFIX=$(pwd)/ooo-cvs/openoffice.org3
   ooo-cvs/openoffice.org/basis3.0/program/gengal

OOO_INSTALL_PREFIX is supposed to be set by the gengal.sh script,
but that does not work in upstream's split install.

I'm attaching a working but kind of ugly patch for gengal.sh,
I can imagine that someone who actually understands this
split 3layer install can clean it up now it works.
Comment 23 jcn 2009-01-06 12:49:45 UTC
Created attachment 59169 [details]
gengal.sh workaround for upstream's split 3layer install
Comment 24 rene 2009-01-06 13:36:52 UTC
> @rene:  I still do not understand who is supposed to call gengal, when.

? Didn't I already say that someone who wants to create a OOo gllery file calls
that? From wherever possible.

E.g. in Debian it's done via the openclipart package "build". After converting
svg->png:

                       xvfb-run -a /usr/lib/openoffice/program/gengal --name
"Animals" --path
"/home/rene/Debian/Pakete/openclipart/openclipart-0.18+dfsg//uild/usr/lib/openoffice/share/gallery"
--destdir "home/rene/Debian/Pakete/openclipart/openclipart-0.18+dfsg/build"
--number-from "70"
/usr/share/openclipart/png/animals/az-lizard_benji_park_01.png
/usr/share/openclipart/png/animals/birds/cormorant-md.png [...]

So again, it'a tool for registering whatever cliparts to  OOos gallery. Called
from wherever it's needed/wanted (at Debian in the openclipart build, for SuSE
afaik in the OOo build itself after everything is installed etc and they then
rely on the already packages openclipart and generate the files for the gallaery).

In all times they end up in a package which installs the files in the correct
location.
Comment 25 rene 2009-01-06 13:38:25 UTC
jcn: hrm, good point :) I don't know how I oversaw this, how embarassing
Comment 26 rene 2009-01-06 13:44:10 UTC
jcn: patch committed (with a minor comment change)
Comment 27 Stephan Bergmann 2009-01-06 14:14:26 UTC
@jcn:  As I already wrote (#desc20) it does not work to have a basis layer
reference a brand layer.  Hence, the attached gengal.sh-3layer.diff is not an
acceptable, clean solution.

@rene:  I am *still* not confident I do understand exactly the scenarios in
which gengal is supposed to be called.

If it is intended to be called by arbitrary clients of OOo to import gallery
data into an OOo installation (similarly to unopkg being called by arbitrary
clients to import extensions) then it should be moved to the brand layer program
directory (i.e., become part of the stable OOo interface, like unopkg etc.). 
However, in that case, I would like to see general consensus that such a tool
should be maintained in the stable OOo interface (one could also imagine that
unopkg could offer this functionality, for example); ka, as gallery expert,
please speak up.

If, on the other hand, gengal is only supposed to be called in certain
restricted scenarios that can be subsumed under the broad category of producing
OOo installations, then I would still argue to remove gengal from the OOo
installation set and instead making it available (in whatever form appropriate)
during such production of OOo installations.
Comment 28 Stephan Bergmann 2009-01-06 14:24:21 UTC
@rene:  In any event, if the attached gengal-three-layer-install-scp2+svx.diff
is going to be integrated into OOo 3.0.1, the new gid_File_Profile_Gengal is
missing a PATCH flag (see
<http://www.openoffice.org/servlets/ReadMsg?list=dev&msgNo=23009>) and should be
added to a module (like gid_Module_Root_Files_2 that already contains the other
two gengal files).
Comment 29 andreschnabel 2009-01-06 14:25:25 UTC
@sb:

I agree, that the current patches are no clean solution - but they fix (or
implement a workaround) for the people who actually request gengal to be working:
- linux distros who use go-oo
- linux distros who hopefully will use vanilla ooo

at the moment we ship a fully broken gengal. So any fix that improves the
situation is imho acceptable, as long as it does not introduce other regressions.

The rest of the discussion tends to be academic. 

I'd suggest to implement the workaround as suggested by jcn, include it in 3.0.1
(if cws gets approved) and file another issue for a clean solution (where
everyone is free to work on).

Comment 30 rene 2009-01-06 14:28:38 UTC
> jcn:  As I already wrote (#desc20) it does not work to have a basis layer
> reference a brand layer.  Hence, the attached gengal.sh-3layer.diff is not an
> acceptable, clean solution.

As long as it works...  Clean is not always equivalent with "working". We can
get a clean thing for 3.1 if you invest the time. We have a working solution now...

> @rene:  I am *still* not confident I do understand exactly the scenarios in
> which gengal is supposed to be called.

Then think.

> If it is intended to be called by arbitrary clients of OOo to import gallery
> data into an OOo installation (similarly to unopkg being called by arbitrary
> clients to import extensions) then it should be moved to the brand layer
> program directory (i.e., become part of the stable OOo interface, like unopkg
> etc.). 

Yes, it basically does. It does not import them directly, though but just
creates the files OOo expects and you can then put it into the dir. Like when
you would create them out of the OOo UI:

/.
/usr
/usr/lib
/usr/lib/openoffice
/usr/lib/openoffice/share
/usr/lib/openoffice/share/gallery
/usr/lib/openoffice/share/gallery/sg89.sdv
[...]


> If, on the other hand, gengal is only supposed to be called in certain
> restricted scenarios that can be subsumed under the broad category of
> producing OOo installations, then I would still argue to remove gengal from
> the OOo installation set and instead making it available (in whatever form>
> appropriate) during such production of OOo installations.

E.g. the SDK. It's just additional .sgv/.thm/.sdv files.

Again: the OOo install is the same, it's just additional files put there by
whoever elese, like when the usert would create a new Gallery item via the UI.

I dont argue for it staying in the main install, it also can be in the SDK
(that's what I actually have in Debian), but it has to stay and be available
(and work).
Comment 31 rene 2009-01-06 14:35:47 UTC
sb: (wrt scp2) yes, thanks. fixed
Comment 32 Stephan Bergmann 2009-01-06 14:45:25 UTC
@andreschnabel:  I agree with you.  Except for the point that the discussion is
academic.  It is vital that OOo has a well-defined interface.  This very issue
shows that an unclear interface causes unnecessary fuss, late in the game.

@rene:  Just to make it clear:  I am not going to invest into a clean solution.
 Others might (ka?).
Comment 33 rene 2009-01-06 14:52:08 UTC
> @andreschnabel:  I agree with you.  Except for the point that the discussion is
> academic.  It is vital that OOo has a well-defined interface.  This very issue
> shows that an unclear interface causes unnecessary fuss, late in the game.

It caused fuss early in the game. in 3.0.0 beta. That you didn't do anything
even as there was a patch available (which admittedly needed a small fix) is not
my problem. It would have been a blocker for 3.0.0 already. So it's now one for
3.0.1.

Wrt the stable interface you might be right, just move it to the sdk deb and we
can get rid of the discussions, can we? Of course we can't do this 3.0.1 but for
3.1.

> @rene:  Just to make it clear:  I am not going to invest into a clean
> solution. Others might (ka?).

ka doesn't even do his job of getting important OOO300 changes to DEV300, so no,
I don't think he will do this.

I would volunteer for moving it to the SDK deb (same dir, though), but that's
all I would do.
Comment 34 Stephan Bergmann 2009-01-06 15:19:08 UTC
@rene:  I do not really care where this tool ends up, and in what form.  (I only
wanted to prevent it from becoming part of the stable OOo interface if it would
have been a mistake to make it part of that interface, which I still do not
know.)  If you want to move it to SDK, please get in contact with the SDK
maintainers.
Comment 35 kay.ramme 2009-01-06 16:06:23 UTC
For whatever reasonI can not find a program called "gengal" anywhere in my OOo 2.4.1 installation of 
my Ubuntu 8.10, but anyway ...

If I understand correctly, the gengal tool origins somewhere around Kai Ahrens (may be CL?). As some 
of the distros seem to use it for generating galleries, we should raise it's state from "unclear" to 
somewhat like "official" and we may want to add it to the standard tests.

Looking at the code and the included "help" it seems, that "gengal" just generates these galleries as 
requested by some command line arguments, it does _not_ seem to register anything into any 
particular OOo installation (which then likely would have been the brand layer). Being able to run that 
even from the base dir would thus be fully sufficient.

I am going to discuss this tomorrow with Stephen B. to see if we somehow can achieve this.
 
Comment 36 rene 2009-01-06 16:10:11 UTC
CCing jsc. Ok with moving gengal to the SDK for 3,1?
Comment 37 rene 2009-01-06 16:12:03 UTC
kr:
> For whatever reasonI can not find a program called "gengal" anywhere in my OOo
> 2.4.1 installation of  my Ubuntu 8.10, but anyway ...

Because as I said in this issue various time, we have moved it to the
openoffice.org-dev package. I never said in this issue it *MUST* be in the
normal OOo install. sb talked about "installset" and the SDK also has one.
Comment 38 kay.ramme 2009-01-06 16:26:07 UTC
Hi Rene, I missed that ... took me already a while to read all the comments ;-) Though I think if you (or 
anybody else) had taken the chance to set the scene (as multiple times requested by SB), may be 
including some usage examples etc., it would have been much easier for us (SB, KR) and even may be 
others to understand what the use of this particular tool is, even if it is so obvious to you.

 
Comment 39 rene 2009-01-06 16:26:22 UTC
kr:

> If I understand correctly, the gengal tool origins somewhere around Kai Ahrens
> (may be CL?). As some 

No, Was done by Novell in 2.0.x times: issue 49174.
Credits where credits belong.
Comment 40 andreschnabel 2009-01-06 21:25:51 UTC
verified in fixgengal


notice: 
the patch fixes the current request (be able to run gengal in vanilla
openoffice.org instalation on unix) - not less but also not more. Eg.g. gengal
would still fail for other brands (e.g. broffice.org ...)

I set verified - for still open problems we should focus on issue 97814
Comment 41 andreschnabel 2009-04-04 20:10:49 UTC
ok in 3.1 - closed