Author Topic: Code::Blocks, Scintilla and Fedora  (Read 15575 times)

Offline Folco

  • Regular
  • ***
  • Posts: 337
    • Folco's blog (68k lover)
Code::Blocks, Scintilla and Fedora
« on: October 22, 2010, 06:03:16 pm »
yop,

A "bug" has been reported to Fedora : https://bugzilla.redhat.com/show_bug.cgi?id=644183
If you don't care about the distros which provide Code::Blocks packages, this is not important at all.

But Fedora will remove Code::Blocks from its repositories if they can't use their system Scintilla (not the bundled one).
This is the politic of Fedora : no soft may bundle its libraries, it MUST use shared libs.

So I don't know if there is a lot of changes in your version of (wx)Scintilla. Is it still important to keep a bundle of that libs ?

But perhaps this it not important at all for you... ?
Sorry for my english, I'm french
Kernel Extremist - PedroM power

Online oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 7787
Re: Code::Blocks, Scintilla and Fedora
« Reply #1 on: October 22, 2010, 06:41:15 pm »
Scintilla probably could be unbundled, but wxScintilla can't.
I think they would agree to leave it bundled.
<debugger plugin maintainer>
(most of the time I ignore long posts)

Offline jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 6665
    • Jens unofficial debian-repository for the Code::Blocks - IDE
Re: Code::Blocks, Scintilla and Fedora
« Reply #2 on: October 24, 2010, 03:06:01 pm »
We use a patched Scintilla to fit the needs of Code::Blocks, so a plain vanilla scintilla will not work.
« Last Edit: October 24, 2010, 03:23:49 pm by jens »
Regards

Jens  Debian - nightlies (and release) : http://apt.jenslody.de/ Fedora [18 - 20]- and CentOS/RedHat [5, 6 & 7] - nightlies : http://rpm.jenslody.de/

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1853
    • Biplab's Blog
Re: Code::Blocks, Scintilla and Fedora
« Reply #3 on: October 24, 2010, 03:18:49 pm »
But Fedora will remove Code::Blocks from its repositories if they can't use their system Scintilla (not the bundled one).
This is the politic of Fedora : no soft may bundle its libraries, it MUST use shared libs.

Another possible solution is we build wxscintilla as a static lib and link other *.so against it. This would increase the binary size. However we won't be violating Fedora rules. However I'm not sure of any immediate side effects.

Other devs- what do you think about it?
Be a part of the solution, not a part of the problem.

Offline jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 6665
    • Jens unofficial debian-repository for the Code::Blocks - IDE
Re: Code::Blocks, Scintilla and Fedora
« Reply #4 on: October 24, 2010, 03:28:18 pm »
Other devs- what do you think about it?
This should work, but I'm not sure if it would be enough for fedora.
If they just don't want shared libraries twice in the system, it will most likely be okay, but it can also be a problem with our own scintilla sources (harder to maintain in case of security problems or other issues).
Regards

Jens  Debian - nightlies (and release) : http://apt.jenslody.de/ Fedora [18 - 20]- and CentOS/RedHat [5, 6 & 7] - nightlies : http://rpm.jenslody.de/

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 8695
Re: Code::Blocks, Scintilla and Fedora
« Reply #5 on: October 24, 2010, 08:32:38 pm »
but it can also be a problem with our own scintilla sources (harder to maintain in case of security problems or other issues).
What do you mean by that? I didn't get it... we are already maintaining this ourselves, so what would be the difference?!

And yes: I agree with Biplab. But only if we believe Fedora is that important. I am not so much into Linux as you know so I cannot make such a decision. As long as Ubuntu is not based on Fedora it would be no problem for me (and only me).
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 6665
    • Jens unofficial debian-repository for the Code::Blocks - IDE
Re: Code::Blocks, Scintilla and Fedora
« Reply #6 on: October 24, 2010, 08:49:30 pm »
I don't mean it's a problem for us, but probably for the fedora maintainers, because having two different sources (one for the official shared library and one inside C::B's sources) can be a problem.

The package maintainers normally have to react if possible security risks (or other system-relevant issues) are discovered, and they normally do not wait until upstream fixes the problem, they have to fix this immediately and that can be a problem for the person who maintains the C::B package for fedora.

But maybe they say, unless it's restricted to C::B, because of using a statically linked lib, it's no problem.
Regards

Jens  Debian - nightlies (and release) : http://apt.jenslody.de/ Fedora [18 - 20]- and CentOS/RedHat [5, 6 & 7] - nightlies : http://rpm.jenslody.de/

Online oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 7787
Re: Code::Blocks, Scintilla and Fedora
« Reply #7 on: October 24, 2010, 10:22:02 pm »
Jen, does Scintilla (not wxScintilla) has changes in svn?

I think that the lib will be marked bundled no matter if it is static or dynamic.

Some info why packagers hate bundled libs (gentoo related):

http://blog.flameeyes.eu/2009/01/02/bundling-libraries-for-despair-and-insecurity
http://blog.flameeyes.eu/2010/04/17/a-visible-case-against-bundled-libraries
<debugger plugin maintainer>
(most of the time I ignore long posts)

Offline jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 6665
    • Jens unofficial debian-repository for the Code::Blocks - IDE
Re: Code::Blocks, Scintilla and Fedora
« Reply #8 on: October 24, 2010, 10:43:13 pm »
Jen, does Scintilla (not wxScintilla) has changes in svn?

We use patched scintilla sources for several reasons.
If you search the wxscintilla folder in our svn-sources for C::B begin, you will find many changes, not only in wxScintilla and I think it's not possible to move all these changes into wxscintilla.
Many of the changes do not make sense in scintilla upstream, or will not be accepted (as the changebar-code).
So we will either be forced to use "our" scintilla or lose a lot of (basically) functionality, if we would switch to plain scintilla.
Regards

Jens  Debian - nightlies (and release) : http://apt.jenslody.de/ Fedora [18 - 20]- and CentOS/RedHat [5, 6 & 7] - nightlies : http://rpm.jenslody.de/

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 8695
Re: Code::Blocks, Scintilla and Fedora
« Reply #9 on: October 25, 2010, 07:23:14 am »
So we will either be forced to use "our" scintilla or lose a lot of (basically) functionality, if we would switch to plain scintilla.
I think we CAN go with a bundled version of scintilla. Basically we have forked both: wxScintilla and scintilla for our purposes. It makes no sense to me if due to Fedora "laws" forks would become basically forbidden. Especially in the case of wxScintilla which is no longer supported for ages meanwhile and where we wouldn't even have another option. To me the only solution is either a statically binding or forbid forks of software components which is the end of development. Period.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline SharkCZ

  • Almost regular
  • **
  • Posts: 127
Re: Code::Blocks, Scintilla and Fedora
« Reply #10 on: October 25, 2010, 09:03:47 am »
Fedora won't remove C::B if it uses a bundled copy of Scintilla/wxScintilla, but there are some rules that packages must follow - https://fedoraproject.org/wiki/Packaging/Guidelines#Duplication_of_system_libraries and https://fedoraproject.org/wiki/Packaging:No_Bundled_Libraries

If I understand correctly then C::B uses a modified versions of both, effectively using a fork. That's naturally not forbidden (and a reality in many other situations), but can be a bit unfortunate for the whole open-source world. So my question is - can the changes that you made be merged with the original libraries? And also - what is the canonical source for the libraries? Is it the wxWidgets project for wxScintilla (containing a copy of Scintilla)?
Code::Blocks package maintainer for Fedora and EPEL

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 8695
Re: Code::Blocks, Scintilla and Fedora
« Reply #11 on: October 25, 2010, 10:00:59 am »
So my question is - can the changes that you made be merged with the original libraries? And also - what is the canonical source for the libraries? Is it the wxWidgets project for wxScintilla (containing a copy of Scintilla)?
Well - for wxScintilla - this project is dead as the maintainer does not develop it actively anymore. So naturally there are a lot forks meanwhile to my knowledge, one in wxWidgets itself, one through wxCode and another one in C::B, even CodeLite has one.

For scintilla: Some of our modifications are e.g. based on a patch that was rejected by scintilla maintainers. So we need to stay with the fork. However, we maintain up-stream compatibility by using a quiet up-to-date version on scintilla, usually and marking every change done by C::B with a special tag in the source code. I'm afraid that's all we can do ATM.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1853
    • Biplab's Blog
Re: Code::Blocks, Scintilla and Fedora
« Reply #12 on: October 25, 2010, 04:21:20 pm »
I didn't get time to go through the issue. So I can't comment why they don't want to allow us to bundle patched source. But I'd like to mention few points-

1) Fedora is one of the popular Linux Distros. We should try our best to keep C::B listed in Fedora.
2) I read the bug report. Mozilla chardet is also mentioned there. AFAIK, it's not patched heavily.
3) Another possible solution (also mentioned in bug report) we switch to wxScintilla bundled with wx.

We can do item 3 only when we switch to wx-2.9 (pls correct me if I'm wrong) which seems a long way to go.
Be a part of the solution, not a part of the problem.

Offline jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 6665
    • Jens unofficial debian-repository for the Code::Blocks - IDE
Re: Code::Blocks, Scintilla and Fedora
« Reply #13 on: October 25, 2010, 04:39:21 pm »
I didn't get time to go through the issue. So I can't comment why they don't want to allow us to bundle patched source. But I'd like to mention few points-

1) Fedora is one of the popular Linux Distros. We should try our best to keep C::B listed in Fedora.
2) I read the bug report. Mozilla chardet is also mentioned there. AFAIK, it's not patched heavily.
3) Another possible solution (also mentioned in bug report) we switch to wxScintilla bundled with wx.

We can do item 3 only when we switch to wx-2.9 (pls correct me if I'm wrong) which seems a long way to go.
Item 3 will break many of our features, because we use patched scintilla and wxscintilla.
Mozilla chardet is not available as library as far as I know and can not be a problem therefore.
Regards

Jens  Debian - nightlies (and release) : http://apt.jenslody.de/ Fedora [18 - 20]- and CentOS/RedHat [5, 6 & 7] - nightlies : http://rpm.jenslody.de/

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1853
    • Biplab's Blog
Re: Code::Blocks, Scintilla and Fedora
« Reply #14 on: October 25, 2010, 05:22:58 pm »
Mozilla chardet is not available as library as far as I know and can not be a problem therefore.

You are right. :)
Be a part of the solution, not a part of the problem.