Creating a log4cxx rpm

Hey Community,

since the last gcc update I can no longer use my old source rpm of log4cxx that I found on the net. As far as I know there is currently no supported version of this in the TW repos. I need it for a project. I checked out the latest source code from apache and I have build it locally (so it seems to work with the net C++ ABI).

Can someone give me some guidance how to package that code into an (source?) rpm? I’d make it available to the community of course.

Cheers

And what’s wrong with this one?
https://build.opensuse.org/package/show?project=devel%3Alibraries%3Ac_c%2B%2B&package=log4cxx4

You can find it on Search too:
http://software.opensuse.org/search?baseproject=openSUSE%3ATumbleweed&p=1&q=log4cxx
Btw, packaging questions (or questions how to use OBS) are probably better suited to the “Open Build Service” subforum, even if you want to build a package for Tumbleweed.
IMHO at least… :wink:

Oops, sorry. Copy and paste error… :shame:

That’s the correct link:
https://build.opensuse.org/package/show?project=devel%3Alibraries%3Ac_c%2B%2B&package=log4cxx

The problem is that I want to build it with -D_GLIBCXX_USE_CXX11_ABI=0 enabled.

The project is a maven project, which assumes some libs as system dependencies. Among them there is log4cxx. At the moment it is totally out of reach to rebuild every dependency (some might even be not open source). For this reason it is necessary to fix the syslib dependencies and then to enable the above mentioned flag globally. As maven will pull in dependencies that have been build before the ABI change it should work again.

Well, you can use that .src rpm, it should build. It does at the moment anyway.

Or branch it on OBS and modify it there, you can even submit your changes back then.
You should be able to login at http://build.opensuse.org/ with the same username/password as here, then you should see a “Branch package” link on the above page that will link it to your home repo where you can modify it as you please.

If you need further help, feel free to ask, or use the documentation links in OBS.

I will request a move to the “Open Build Service” subforum now though, as mentioned this is not really related to Tumbleweed per se. :wink:

Moving to OBS forum… temporarily closed.

Hi
Thread moved and reopened.

Thanks for moving.

For now I created a work-around (and had no time to pursue this): I had an older Tumbleweed on a different hard disk. I used this do create a chroot environment to compile and edit stuff at the same time.

However in the medium term I really would like to get this working again with gcc 5.1.1. I’d like to take the latest branch of apache log4cxx and turn it into an rpm.

I tried once to adapt a spec file of the devel c++ repo but this did not result in a working source rpm. I know the usual approach is to expect users to find out most thing on their own (especially for more advanced topics) but I would really appreciate some guidance here. Also: I have to do the same with the google test and mocking framework…

Cheers

Again, the current package in devel builds fine with gcc 5.1.1.
Just take that and change the build options…

Or am I misunderstanding something here?

I’d like to take the latest branch of apache log4cxx and turn it into an rpm.

I would start with branching the existing rpm on OBS. Update it to the latest version, and then fix possible build errors.
Should be easier than starting from scratch.

Although AFAICT the package in devel/c++ actually is the latest version. There hasn’t been any release since 0.10.0 in 2008…
https://logging.apache.org/log4cxx/download.html

You could update it to the latest svn snapshot though, if that’s what you want. OBS even allows to get the source automatically from the svn repo: [noparse]https://en.opensuse.org/openSUSE:Build_Service_Concept_SourceService[/noparse]

And just changing the build options is even easier when you branch on OBS.

I tried once to adapt a spec file of the devel c++ repo but this did not result in a working source rpm. I know the usual approach is to expect users to find out most thing on their own (especially for more advanced topics) but I would really appreciate some guidance here.

What is a “not-working source rpm”? :wink:

Hard to answer in general, without even knowing which spec file you adapted how.
But updating a package to the latest version shouldn’t be too hard:

  • branch the package
  • add the new source tar ball
  • modify the version in the spec file and maybe the source tarball filename if necessary
  • (add a changes entry)

In the ideal case, this should be all. If the package contains patches, you’ll have to check whether they are still needed and probably have to modify them that they apply cleanly to the updated version or remove them.
You can then even submit your changes back if you want to.

If you have problems, it’s best to ask specific questions.

See also: [noparse]https://en.opensuse.org/Portal:Packaging[/noparse]