[BlueOnyx:21616] Re: BlueOnyx on Raspberry Pi

Michael Stauber mstauber at blueonyx.it
Fri Dec 29 22:09:04 -05 2017


Hi Oliver,

> Just had some spare time and recompiled BlueOnyx for Raspberry 2 based
> on alternative arch image from Centos. 

That is really some nice work. Mad props to you!

> I am not sure if anyone has tried this before.

No idea. I didn't try that yet, as I have no Raspberry Pi. :p

> Since I have not seen latest BlueOnyx on Intel at all and I am not used
> to the svn structure, I am not sure if I got latest BlueOnyx code
> properly. For me it looks like a wild mixture of 5207/9/10.

The latest stable BlueOnyx release is 5209R for CentOS 7.

5210R is a temporary "work-in-progress" fork of the 5209R code in order
to make BlueOnyx IPv6 ready. The code under ...

http://devel.blueonyx.it/trac/browser/BlueOnyx/5210R

... is not yet fully functioning. Or like us Germans say: "Das Messer
steckt noch in der Sau." (The knife is still sticking in the pig) - like
the whole IP-Pooling functionality and the Reseller GUI pages aren't yet
fully transformed and some localizations are also missing for now. There
is also one lingering design flaw in how I store the IPv6 IP addresses
that needs to be resolved before this is really usable for anything but
experiments and conceptual testing.

As for understanding the SVN code tree:

5209R (CentOS 7 for x86) has some code communality with 5208R (EL6 for
x86). Hence the code tree for 5209R in SVN only has the modules that are
distinctly different from 5208R.

But if you look at the 5210R code tree you can see which modules 5209R
is supposed to have, as that code tree has all the required modules.
Because for IPv6 I had to make changes all across the board in almost
every module, so I copied all needed modules over to that tree. This
allowed me to make changes without temporarily "breaking" production
ready code for 5209R.

As for building BlueOnyx modules from the SVN sources for a new OS (or
the same OS, yet on a different architecture such as ARM) you just need
to check out the sources from SVN. Then you need the build dependencies,
which are defined here:

http://devel.blueonyx.it/trac/browser/BlueOnyx/5210R/platform/devel-tools/sausalito-devel-tools.spec

BuildRequires: glib-devel
Requires: cpp gcc glib-ghash imake subversion rpm-build autoconf
automake re2c glib-devel file-devel popt-devel rpm-devel libstdc++-devel
zlib-devel gcc-c++ libxml2-devel pam-devel glib2-devel flex bison

There are also some dependencies that are resolved via stuff that's not
in the CentOS repositories. Sometimes we grab them off Epel, from CPAN
or wherever else and we always build them ourselves from scratch from
good sources. The SRPMs for these can be found here:

http://devel.blueonyx.it/pub/BlueOnyx/SRPMS/

Building RPMs from anything in SVN is as simple as going into the
subdirectory of the module and running ...

svn update (to get the latest version from SVN)
make clean
make
make rpm

That should build the RPMs from the sources. However: You may need to
manually create the old style RPM directories under /usr/src/redhat/ or
(like I do) I just symlink /root/rpmbuild to /usr/src/redhat instead.

The somewhat tiresome part for any new build on a new architecture or OS
is of course: You usually can't just do a for-each loop and build the
whole tree in one go from top to bottom due to dependencies. You need to
build (and install) ...

/platform/devel-tools
/platform/i18n
/platform/palette
/utils/cce

... first and I don't offhand recall what the correct order is. Like
devel-tools first, then cce and afterwards palette and i18n. Once these
are built and installed you can build the rest.

In any case: If you need some help, let me know and I'll be glad to
answer any questions you have or can lend a hand with some things.

> If anyone is interested I can setup a clean repo to test and play
> around.

I think that is a great idea and I applaud your enthusiasm and the work
that you poured into this. If you got this far on your own with the
sources, then you're pretty good at what you do and I'd love to have you
on the team. :-)

I do have some questions, though:

Did you have to do any code changes to make some components from our SVN
compile on the Raspberry? I'm particularly curious about CCE and wonder
if it compiled there w/o any changes. I'd be really surprised if it did.

Likewise: Which glib-ghash and libmhash did you use to get it to build?
These usually cause me some grief whenever I roll up BlueOnyx for new
OS's, hence I'm wondering.

All in all: I think a BlueOnyx version for the Raspberry Pi is indeed a
worthwhile endeavor and if it runs stable and well, we'd love to bring
it under our umbrella and would love to offer it from our mirrors and
promote it via the BlueOnyx.it webpage. If you're willing, I can grant
you SVN write access and we can also set something up that you can
upload the RPMs for the Raspberry Pi to our toplevel YUM repository.

Likewise: PKGs for it could be offered through the BlueOnyx Shop,
although we would need to get a Pi ourselves in order to be able to do
the PKG builds on it.

However: As the Raspberry Pi version of 5209R on CentOS 7 (Arm32?
Altarch?) will use RPMs that are not binary compatible with 5209R on
CentOS 7 for x86 it needs a new "model" number and cannot use 5209R as
identifier. Otherwise people might end up buying PKGs in the shop with
the intent to run them on the Pi, yet they won't work, as they were
compiled on (and for) the CentOS 7 x86 version and not with the
Raspberry Pi in mind. The shop offers PKGs to clients bases on the model
number to make sure they get something that runs on their version of
BlueOnyx.

Hence some changes would need to be made to give it a different model
number. The model number is defined in
/platform/base-blueonyx.mod/Makefile. The question would be which model
number we'd like to use for that. 5210R is currently in temporary usage
(for development only), but will be recycled for usage once CentOS 8
comes out so that we have a clean and logical progression.

Hence I would suggest using 5109R for the Raspberry Pi version that runs
CentOS 7. That number is free and doesn't break the progression. Yet it
also indicates likeness with 5209R and also that there is the
possibility to "step up" from 5109R on the Pi to a "real" 5209R on x86
hardware in case the need outgrows the capability of the Pi.

In any case: Let's have a chat about this and I really applaud your
efforts and congratulate you to get this far on your own. That's quite
an achievement.

If you want, I can send you an invite to the BlueOnyx developer list.

-- 
With best regards

Michael Stauber



More information about the Blueonyx mailing list