Thursday, November 21, 2019

Sourcetrail is now free and open-source

Sourcetrail is very useful when you try to study/navigate large C++ codebases like @firebirdsql / @LibreOffice


Monday, October 28, 2019

Replication in Firebird 4: Configuration and practical examples

Replication is a long-awaited feature that allows the creating of reliable high-performance database replicas without user-defined triggers and with full DDL support. This talk presents the replication subsystem architecture, possible replication modes, their impact on performance and available tuning options. We'll demonstrate how to set up a simple standby configuration and use it in practice.


Download PDF

Firebird on the road from v4 to v5

This talk done at Firebird Conference 2019 describes the current state of the v4 development and reviews its key features (new data types, Batch API, timezones). Dimitry Yemanov spoke about the future of Firebird development, including the updated release plan and expected post-v4 features. Review of upcoming features for Firebird 5


Download PDF



Wednesday, October 02, 2019

Embedded Firebird 3 Framework on MacOSX

Paul Beach has finally managed to get around to preparing a mechanism for creating an embedded Firebird Framework on MacOSX.


If you can’t build Firebird from scratch you can download a copy of the embedded framework (currently Firebird 3.0.4) from IBPhoenix. (Approx 15mb)

32bit Embedded Framework

64bit Embedded Framework

Thursday, September 05, 2019

Understanding High Performance

Understanding High Performance via Michael Abrash's Graphics Programming Black Book

"Before we can create high-performance code, we must understand what high performance is. The objective (not always attained) in creating high-performance software is to make the software able to carry out its appointed tasks so rapidly that it responds instantaneously, as far as the user is concerned. In other words, high-performance code should ideally run so fast that any further improvement in the code would be pointless.
Notice that the above definition most emphatically does not say anything about making the software as fast as possible. It also does not say anything about using assembly language, or an optimizing compiler, or, for that matter, a compiler at all. It also doesn't say anything about how the code was designed and written. What it does say is that high-performance code shouldn't get in the user's way—and that's all.
That's an important distinction, because all too many programmers think that assembly language, or the right compiler, or a particular high-level language, or a certain design approach is the answer to creating high-performance code. They're not, any more than choosing a certain set of tools is the key to building a house. You do indeed need tools to build a house, but any of many sets of tools will do. You also need a blueprint, an understanding of everything that goes into a house, and the ability to use the tools.
Likewise, high-performance programming requires a clear understanding of the purpose of the software being built, an overall program design, algorithms for implementing particular tasks, an understanding of what the computer can do and of what all relevant software is doing—and solid programming skills, preferably using an optimizing compiler or assembly language. The optimization at the end is just the finishing touch, however."

Tuesday, September 03, 2019

ADO.NET provider 7.1.0.0 for Firebird is ready

New version 7.1.0.0 of ADO.NET provider for Firebird is ready for download. The main focus of this release is performance.

Wednesday, August 21, 2019

New version 7.0.0.0 of ADO.NET provider for Firebird is ready for download.

New version 7.0.0.0 of ADO.NET provider for Firebird is ready for download. The main focus of this release is wire encryption.

Monday, August 12, 2019

Firebird high-level native client for Node.js / TypeScript updated to v1.0.0

Firebird high-level native client for Node.js / TypeScript updated to v1.0.0

Thursday, April 18, 2019

Xubuntu 19.04: The Exhaustive Update

Xubuntu 19.04: The Exhaustive Update #Xubuntu #Xfce #DiscoDingo https://bluesabre.org/2019/04/18/xubuntu-19-04-the-exhaustive-update/

Thursday, February 21, 2019

Firebird 4.0 Beta 1 release is available for testing

Firebird Project announces the first Beta release of Firebird 4.0, the next major version of the Firebird relational database, which is now available for testing.

This Beta release arrives with features and improvements already implemented by the Firebird development team, as well as with countless bugfixes. Our users are appreciated giving it a try and providing feedback to the development mailing list. Apparent bugs can be reported directly to the bugtracker.

Beta releases are not encouraged for production usage or any other goals that require a stable system. They are, however, recommended for those users who want to help in identifying issues and bottlenecks thus allowing to progress faster through the Beta/RC stages towards the final release.

Please read the Release Notes carefully before installing and testing this Beta release.

Saturday, February 09, 2019

Pure Elixir database driver for Firebird

Pure Elixir database driver for Firebird

Firebird 4.0 Built-in logical replication

Firebird 4.0 implemented Built-in logical replication is now merged

Here is the pull request

https://github.com/FirebirdSQL/firebird/pull/182


We know that is a long standing feature request

Firebird 4.0 Changed travis distribution used to Ubuntu xenial.

Firebird 4.0 is using Ubuntu xenial on travis .
https://travis-ci.org/FirebirdSQL/firebird

.travis.yml looks a lot simpler after this change.

Build Status 
ps: Here is official Travis CI announcement: Ubuntu Xenial 16.04 is available

Tuesday, February 05, 2019

Max Transaction ID in Firebird



Firebird 3.0.x introduced 48-bit internal transaction IDs that are publicly (via API and MON$ tables) represented as 64-bit numbers. This makes the new limit roughly equal to 2.8*10^14 transactions, later it could be extended up to the 2^63 limit.


Related notice in Firebird 3.0.x release notes.
Related article about Posgtresql : How long will a 64 bit Transaction-ID last in PostgreSQL?

Friday, January 18, 2019

Understanding Debian: The Universal Operating System

"And my final test as to whether or not Debian succeeded was: could the founder step away from the project and could the project keep going because that is the only point at which you know that the project has basically taken a life of its own." ~ Ian Murdock


Wednesday, December 12, 2018

Compiz: Ubuntu Desktop's little known best friend

What i love in Ubuntu : woobly windows via compiz

compiz-scaleMac-3swipe



https://code.mradford.com/post/the-ubuntu-compiz-desktop/

Friday, October 05, 2018

Firebird 3.0.4 sub-release is available

Firebird Project is happy to announce general availability of Firebird 3.0.4 — the 4th point release in the Firebird 3.0 series.

This sub-release offers many bug fixes and also adds a few improvements, please refer to the Release Notes for the full list of changes. Binary kits for Windows, Linux and Android platforms are immediately available for download, Mac OS kits will follow shortly.

Wednesday, September 05, 2018

Firebird Visual Studio 2017 builds are added to AppVeyor

Firebird Visual Studio 2017 builds are added to AppVeyor for x64 and x86 Platforms

Build Status


Tuesday, July 24, 2018

Firebird has now automatic Windows builds with AppVeyor

Firebird has now AppVeyor CI builds, like we have them with travis, but

AppVeyor is for Windows related compilers (Visual Studio)


https://ci.appveyor.com/project/FirebirdSQL/firebird


Monday, July 23, 2018

Firebird 4.0: Time Zone feature documentation


Via Firebird-devel : Here is the first README version for the Time Zone feature in Firebird 4.0

https://github.com/FirebirdSQL/firebird/blob/master/doc/sql.extensions/README.time_zone.md

Monday, July 02, 2018

LibreOffice is now available for Haiku

LibreOffice is working and already can be installed via HaikuDepot.

Here is the full announcement

https://discuss.haiku-os.org/t/libreoffice-is-now-available-for-haiku/6917


Friday, June 15, 2018

C++ the Newest Old Language : presentation by Matt Godbolt (GOTO Chicago 2018)

This presentation was recorded at GOTO Chicago 2018 C++ is an old language only used by the unfortunate few that absolutely have to, right? Wrong! C++ is not the language it used to be: clunky, error-prone and lacking in tooling. A lot has changed in the last decade: three new language revisions, new compilers and all-new: [...] Download slides and read the full abstract here: https://gotochgo.com/2018/sessions/359


Friday, March 23, 2018

Vote for Firebird as Sourceforge Project of the month (May 2018)

Sourceforge is running a poll to elect its May’s Project of the Month, and Firebird is among the candidates.


To vote, you need to have an account (it is free to register) at sourceforge.net and go to this URL, and comment with the following line:

VOTE: firebird

Friday, February 16, 2018

Some of the few advantages of using Firebird 3.0.x is that performance was greatly improved vs 2.5.x

Here are a few related performance/tunning articles

In the first article Vlad does quite a few benchmarks between Firebird 2.5/3.0.0/3.0.2 releases . It's very nice that minor releases brings free speedups. He also shows Firebird 3.0.3 performance related changes and fixes and the future ones that are already in Firebird 4
 
 Firebird Performance, by Vlad Khorsun, Firebird Project
 Tuning Linux, Windows, and Firebird for heavy workload by Alex Kovyazin, IBSurgeon.
 Firebird 3: New in Database Statistics and New SQL execution plans, by Dmitry Kuzmenko, IBSurgeon
 Advanced Firebird Trace API, by Vlad Horsun, Firebird Project

Thursday, February 08, 2018

Firebird 3.0.3 Binary kits for macOS on both 32-bit and 64-bit platforms are immediately available for download

Firebird 3.0.3 Binary kits for macOS on both 32-bit and 64-bit platforms are immediately available for download

Monday, February 05, 2018

Firebird 3.0.3 sub-release is available

Firebird Project is happy to announce general availability of Firebird 3.0.3 — the third point release in the Firebird 3.0 series.

This sub-release offers many bug fixes (including fix for a recently reported security vulnerability) and also adds a few minor features and improvements, please refer to the Release Notes for the full list of changes. Binary kits for Windows and Linux on both 32-bit and 64-bit platforms are immediately available for download.

ps: Mac OS builds are coming soon

Thursday, February 01, 2018

In 2017, The Document Foundation (TDF) launched four tenders aimed at improving LibreOffice. Tender four is of interest to the Firebird community

In 2017, The Document Foundation (TDF) launched four tenders aimed at improving LibreOffice. Tender four is of interest to the Firebird community:

(4) Tender to implement HSQLDB binary format import in LibreOffice

(https://blog.documentfoundation.org/blog/2017/05/04/tender-implement-hsqldb-binary-format-import-libreoffice-201705-03/)


Collabora will develop a mechanism to import database files with high fidelity from the HSQLDB binary file format, which has been used inside many existing ODB files, by reading the Java serialization code, and writing a filter to import all data into LibreOffice Base. The objective is to remove the legacy Java/HSQLDB database and move to Firebird.


TDF will invest € 29,750.00

Wednesday, January 31, 2018

LibreOffice Firebird driver related changes

There were quite a few bugs fixed in the last two months related to Firebird driver in LibreOffice also interesting commits

Tamas Bunth commited : Add HSQLDB schema import.
He also fixed Bug 104734 - FIREBIRD: Add those field types that are not available with FB while they are available with Hsqldb.
Lionel Elie Mamane fixed Bug 104986 - Firebird: Function EXTRACT doesn't work with WEEKDAY, YEARDAY, MILLISECOND.
Tor Lillqvist fixed Bug 71007 - EDITING: Embedded Firebird - Impossible to set milliseconds in a timefield with GUI
Tamas Bunth fixed Bug 70425 - EDITING: Embedded Firebird - Copying integer values from Calc to Base impossible

Wednesday, October 25, 2017

Ubuntu 17.10 comes with Firebird 3.0.2

Ubuntu 17.10 is released and it comes with Firebird 3.0.2 (Latest stable version)

Thanks to Damyan  Ivanov and Debian project contributors to Firebird packages

Thursday, October 12, 2017

Visual Studio 2017 Version 15.4 Released


You can now use CMake for Linux C++ development in Visual Studio

That could be interesting in cross compiling Firebird from Windows side to Linux/WSL

https://blogs.msdn.microsoft.com/visualstudio/2017/10/10/visual-studio-2017-version-15-4-released/

Thursday, October 05, 2017

Firebird 3 on Apple IOS

One side effect of new Firebird 3.0.3 builds for Apple Macosx is that now there is a Mach-O dynamically linked shared library for arm_v7 that can be used on IOS.
You can ask for details on Firebird-devel 
ps: For Firebird 2.5.x there is a build on Paul's blog also Egor Pugin created Cmake files for IOS Builds (I didn't tested that route yet)

Wednesday, September 13, 2017

Firebird 4.0 Alpha 1 release is available for testing

Firebird Project announces the first Alpha release of Firebird 4.0, the next major version of the Firebird relational database, which is now available for testing.

ADO.NET provider 5.11.0.0 for Firebird is ready (with .NET Standard 2.0 support)

New version 5.11.0.0 of ADO.NET provider for Firebird is ready for download. This release is about .NET Standard 2.0. Now the .NET Standard 2.0, with all the new APIs supported, version is available. Another new feature is support for passing key over the wire for encrypted databases (you need to have server side plugin for this feature, i.e. this from IBPhoenix). New connection string property crypt key is available for that. The value is base64 encoded data representing the key.

Jaybird 3 with Firebird 3 embedded example

Mark Rotteveel published a guide and example program using Firebird 3 Embedded with Jaybird 3. The sample you can find it on https://github.com/mrotteveel/jaybird-embedded-example.

Tuesday, August 01, 2017

Firebird inside Firebird in DotNet External Engine (FbNetExternalEngine)

You can load any .NET code in FbNetExternalEngine also as Proof Of Concept you can also load Firebird Embedded inside that in server (Firebird inside Firebird in DotNet External Engine).

Friday, July 21, 2017

Firebird 3.0.3 for MacOSX (Beta)

A beta version of a 64bit Firebird 3.0.3 for MacOSX is now available as a download for those of you who might be interested in trying it. http://www.ibphoenix.com/download/firebird/30

Changing the HASH function (Firebird CORE-4436)

There is an interesting discussion on firebird-devel about changing and extending the hash function in Firebird (related to CORE-4436)

Thursday, July 13, 2017

Firebird support for Decfloat will be enabled in Firebird 4.0



Firebird support for Decfloat will be enabled in Firebird 4.0 (Can be tested with latest snapshots)

Decfloat is a new SQL:2016 standard type introduced by IBM in DB2

Firebird Documentation Funding 2017

Documentation Funding 2017 Reached 5000$ of the 5000$ Goal https://www.firebirdsql.org/en/doc-funding-2017/



The Firebird Project's 2017 project is to translate into English the Firebird Developer Guide, a Russian-language work sponsored by IBSurgeon and Moscow Exchange, edit and review it and publish it in the project's documentation library. For this project, as ever, we need funding. This is your opportunity to make it happen, by contributing whatever you can to our crowdfunding campaign.

Wednesday, April 26, 2017

HSQLDB binary format import



Tender approved in the budget by the TDF board


In order to remove the legacy Java / HSQLDB database completely, and move fully to Firebird in LibreOffice 5.4 it is necessary to be able to import old document data with high fidelity from the HSQLDB binary file format which we have used (for performance) inside so many of our existing ODB files. This task involves reading the existing (reasonably simple) Java serialization code, and writing an (import only) filter to import this data safely into base.


Thursday, April 20, 2017

LibreOffice bug #106866 is now fixed : When I change the field length of the result is multiplied by 4 each time (firebird, varchar)

Bunth Tamás committed a patch related to issue #106866: query character size instead of bytes

It has been pushed to "master":
It will be available in 5.4.0. The patch should be included in the daily builds available at 
More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds 
Affected users are encouraged to test the fix and report feedback.

Wednesday, January 18, 2017

Firebird bug CORE-5452 is fixed : Segfault when engine's dynamic library is unloaded right after closing worker threads


Firebird bug CORE-5452 is fixed http://tracker.firebirdsql.org/browse/CORE-5452

The issue was reported multiple times in Firebird devel list, I will mention here Damyan Ivanov (Debian) and Stephan Bergmann. (RedHat)

And related commit in Firebird 3.0 branch

https://github.com/FirebirdSQL/firebird/commit/40f782ae3e918c4f3842571ff8064be1c4f54961

Stephan Bergmann contributed the patch to LibreOffice in external/firebird

Saturday, December 17, 2016

LibreOffice bug #103074 : Implement Boolean Type for Firebird driver is now fixed


Bunth Tamás committed a patch related to issue #103074 : Implement Boolean Type for FB driver .
It has been pushed to "master":

It will be available in 5.4.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.

ps:
From the list a of Firebird integration blockers there are only a few left

Listed blockers:

   70425: EDITING: Embedded Firebird - Copying integer values from Calc to Base impossible  See dependency tree for bug 70425
   70506: EDITING: Embedded Firebird - Alias in queries are ignored  See dependency tree for bug 70506
   104316: FIREBIRD 3 : attempting to open a Firebird 3 embedded ODB database file fails to draw all UI elements, causes general LibreOffice UI malfunction

Saturday, December 03, 2016

Firebird 3 by default in LibreOffice 5.4

Lots of missing features & big bugs were fixed recently .
All of the blockers that were initially mentioned on tracking bug are now fixed.

Lionel mentioned that he added a few more blockers that needs to be fixed until Firebird will be switched by default :
I went over
https://bugs.documentfoundation.org/buglist.cgi?quicksearch=firebird
and added a few open bugs to the blocker bug
https://bugs.documentfoundation.org/51780
based on their description (and NEW instead of UNCONFIRMED status)
only, without reading the bug log in great detail.
Tamás Bunth (Wastack) agreed that 6 months time frame is more than enough to fix bugs that will appear
I agree, it would be reasonable to wait a half year. Until that we can
fix the already found and the upcoming bugs, solve the backward
incompatibility. Even if those can be solved quickly we can upgrade to
the c++ API. 
Another issue is importing old hsqldb databases without java installed

It requires making a read-only parser for the HSQLDB "cached" table
data format in another language than Java. Most definitely possible,
the format may even be better documented than "read the source code".


Service for migrating Firebird 2.5 format to Firebird 3.0

On Libreoffice Devel there is a thread about migration of the already created odb files with 2.5 databases inside (fdb) but also about the forward and backward compatibility of the Firebird backup archive (fbk).
https://lists.freedesktop.org/archives/libreoffice/2016-November/075953.html

Lionel added notes about upgrading in the wiki :

People trade privacy for convenience or the other way round all the time. People that in this case favor convenience can use the hypothetical web service. People that favor privacy can follow the instructions at
https://wiki.documentfoundation.org/Development/Base/FirebirdSQL#Older_Firebird_databases(which the web service should point towards for information).While I'm not exactly lobbying for this web service, we are a volunteer-driven organisation and if Tamás feels like doing it, all the merrier.



Wednesday, November 23, 2016

Lionel Elie Mamane committed a patch related to this issue tdf#101789 : Firebird 3 - fails to build on OSX 10.11.x with clang

Lionel Elie Mamane committed a patch related to this issue tdf#101789 Firebird 3 - fails to build on OSX 10.11.x with clang.

It has been pushed to "master": tdf#101789 work around DYLD_LIBRARY_PATH limitations on newer MacOS X.

An alternative fix has been in place ever since Stephan Bergmann commit " Allow external/firebird to be built with a custom SHELL under Mac OS X 10.11".

Tuesday, November 22, 2016

Bunth Tamás commited a few patches related to Firebird driver

Tamás committed a patch related to tdf#74172 issue.
Ensure prepared while setting numeric
It has been pushed to "master":
It will be available in 5.3.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours.
More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.

Another commit is just code refactoring : get table name from resultset simply. There is a much simpler way to access table name in ResultSetMetadata in Firebird sdbc.

Friday, November 11, 2016

Bunth Tamás commited a patch for LibreOffice bug #74172 : use DECIMAL and NUMERIC data types

 Bunth Tamás commited  a patch for bug #74172 use DECIMAL and NUMERIC data types

From the list a of Firebird integration blockers there are only a few left

Listed blockers:
  bug 69949 - table editor should support the autoincrement
  bug 71009 - relationship management not implemented in GUI
  bug 71251 - Creating table from default choices via wizard fails
  bug 74019 - Any table or select query having more than 10 fields fails
  bug 74172 - no data type DECIMAL/NUMERIC 
  bug 76072 - view creation not implemented

Thursday, May 26, 2016

Tensorflow and why i love it

I work for my paper for master degree (Artistic style Implementation with Tensor Flow) and i love Tensorflow



Here are a few reasons why : It's python also i can use it quite easily with my gpus (gtx) also it's distributed across servers using gRPC


Tensor Flow has a clean, modular architecture with multiple frontends and execution platforms. Details are in the white paper.






 python -m tensorflow.models.image.mnist.convolutional
I tensorflow/stream_executor/dso_loader.cc:105] successfully opened CUDA library libcublas.so locally
I tensorflow/stream_executor/dso_loader.cc:105] successfully opened CUDA library libcudnn.so locally
I tensorflow/stream_executor/dso_loader.cc:105] successfully opened CUDA library libcufft.so locally
I tensorflow/stream_executor/dso_loader.cc:105] successfully opened CUDA library libcuda.so.1 locally
I tensorflow/stream_executor/dso_loader.cc:105] successfully opened CUDA library libcurand.so locally
Extracting data/train-images-idx3-ubyte.gz
Extracting data/train-labels-idx1-ubyte.gz
Extracting data/t10k-images-idx3-ubyte.gz
Extracting data/t10k-labels-idx1-ubyte.gz
I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:900] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
I tensorflow/core/common_runtime/gpu/gpu_init.cc:102] Found device 0 with properties:
name: GeForce GTX 750
major: 5 minor: 0 memoryClockRate (GHz) 1.0845
pciBusID 0000:01:00.0
Total memory: 2.00GiB
Free memory: 1.60GiB
I tensorflow/core/common_runtime/gpu/gpu_init.cc:126] DMA: 0
I tensorflow/core/common_runtime/gpu/gpu_init.cc:136] 0:   Y
I tensorflow/core/common_runtime/gpu/gpu_device.cc:755] Creating TensorFlow device (/gpu:0) -> (device: 0, name: GeForce GTX 750, pci bus id: 0000:01:00.0)
Initialized!
Step 0 (epoch 0.00), 23.4 ms
Minibatch loss: 12.054, learning rate: 0.010000
Minibatch error: 90.6%
Validation error: 84.6%
Step 100 (epoch 0.12), 19.2 ms
....
Minibatch loss: 1.595, learning rate: 0.006302
Minibatch error: 0.0%
Validation error: 0.8%
Step 8500 (epoch 9.89), 20.0 ms
Minibatch loss: 1.608, learning rate: 0.006302
Minibatch error: 1.6%
Validation error: 0.8%
Test error: 0.8%

After learning Theano now i can easily convert to TensorFlow
Here are few tutorials
https://github.com/nlintz/TensorFlow-Tutorials


Tuesday, April 19, 2016

Firebird 3.0 is released

Firebird Project is happy to announce general availability of Firebird 3.0 — the latest major release of the Firebird relational database.

The primary goals for Firebird 3.0 were to unify the server architecture and to improve support for SMP and multiple-core hardware platforms. Parallel objectives were to improve threading of engine processes and the options for sharing page cache across thread and connection boundaries.

Alongside these aims came new strategies to improve performance, query optimization, monitoring and scalability and to address the demand for more security options. A number of popular features were introduced into the SQL language, including the long-awaited support for the Boolean data type and the associated logical predications.

Read the Press Release for more information. Please refer to the Release Notes for the full list of changes. Binary kits for Windows and Linux on both 32-bit and 64-bit platforms are immediately available for download. MacOS X and other platforms will follow.

Friday, April 15, 2016

Firebird 3 final is about to be released


The source code was just tagged in the repository, so we can expect the final release being out in the next days.

One change in the new Firebird 3 OO examples api is addition of the Services example .


Friday, April 01, 2016

Good news : Firebird 3.0 builds and works now with libreoffice

It was the comments that I forgot in download.lst (I forgot to comment 2.5.5 and enable 3.0).
I have updated the patch and now it compiles fine on ubuntu 15.10 x64
https://gist.github.com/mariuz/bcde7f783b657b2465e5

Submited new gerrit
https://gerrit.libreoffice.org/23737



Here is manual test :)
./instdir/program/soffice

Icu error with Firebird 3.0 patch , testing lode script

I started refactoring firebird 3.0 patch and there are few issues with icu linking.
There are is no more --with-system-icu from the firebird configure options (Firebird on posix is using system icu : there is no icu no more in firebird tree).

So firebird is using the icu from libreoffice folder (downloaded to build libreoffice)
I will try to compile libo with --with-system-icu

On Windows 10 i started testing the lode script for setting up libo development 

Wednesday, March 30, 2016

Firebird 2.5 Patch to compile with Visual Studio 2015

Final Firebird 2.5 Patch to compile with Visual Studio 2015 is now merged
https://github.com/FirebirdSQL/firebird/pull/12

I will add a gerrit for libreoffice also https://patch-diff.githubusercontent.com/raw/FirebirdSQL/firebird/pull/12.patch

Gerrit for this patch is now created and added Lionel to the reviewers

https://gerrit.libreoffice.org/#/c/23738/


update: added patch with mod_loader changes for VC14 ,
removed external/firebird/firebird-vs2013.patch.1 is not needed anymore in 2.5.5 (applied upstream) ,
modified UnpackedTarball_firebird.mk apply firebird-msvc14.patch.1 only on Windows

ps: in Firebird tree i will send a pull request with icu small changes needed also new solutions for VS 2015 were merged earlier

Wednesday, March 23, 2016

Firebird 3.0 and MSVC14 build (good news)



I have tested the Firebird 3.0 and MSVC14 compiler and builds ok

https://github.com/FirebirdSQL/firebird/tree/B3_0_Release/builds/win32/msvc14


Tomorrow I will test also with firebird 2.5.x branch and i will check what patches are needed

Instructions for building it are located here

https://github.com/FirebirdSQL/firebird/blob/master/doc/README.build.msvc.html

and on the website

Thursday, August 06, 2015

Let's go back to the c , Firebird embedded backup service works

I have used an c based example for services api and seems that it works without a need for auth user



gcc backup_service.c -lfbembed

./a.out employee.fdb employee.fbk

Attach succeed

Start succeed

gbak:readied database employee.fdb for backup gbak:creating file employee.fbk

...

gbak:writing SQL roles gbak:writing names mapping gbak:closing file, committing, and finishing. 74752 bytes written

I will split the backup service function in two one for backup and one for restore then i will compare with my service example , maybe is a buffer truncation issue


Wednesday, July 15, 2015

Update firebird to version 2.5.4 is applied into LibreOffice master

There was a small issue with tinderbox and was reverted and then re-applied to master.

Rebuilding of indexes function is now removed from master (Using firebird backup format for .odb there is no need for rebuild indexes).

Thursday, July 02, 2015

JDK issues on OSX , ran the tests without Java

To run all the dbaccess tests On OSX I had to install jre 6 then jdk/jre 8 but still
dbaccess tests wouldn't run java popup still appeared even if the java -version showed
the proper 8 version , so for the moment i have disabled the java tests

./autogen.sh --without-java

Update:

Tests are finished and Firebird 2.5.4 update patch on gerrit is up for review
https://gerrit.libreoffice.org/16703

Tested on OSX 10.10.4 , Win 10 , Ubuntu 14.04

Wednesday, July 01, 2015

Debugging with ddd : crashes in rtl_ImplGetFastUTF8UnicodeLen

Found it where it crashes at line 645 in Connection.cxx
OUString aData(pResults + 3,
                           isc_vax_integer(pResults, 2),
                           RTL_TEXTENCODING_UTF8);
            
and here is the backtrace at line 634 in ustring.cxx
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7b7aebd in rtl_ImplGetFastUTF8UnicodeLen (pStr=0x7ffffffff000 , nLen=11582, ascii=0x7fffffffc4b8) at /home/mariuz/work/libo/sal/rtl/ustring.cxx:634
(gdb) frame 4
#4  0x00007fff96c9bce2 in connectivity::firebird::Connection::runBackupService (this=0x7fffac0a1400, nAction=1) at /home/mariuz/work/libo/connectivity/source/drivers/firebird/Connection.cxx:645
(gdb) frame 24
#24 0x00007ffff195e906 in SalFrame::CallCallback (this=0x10a7680, nEvent=22, pEvent=0x15fd5d0) at /home/mariuz/work/libo/vcl/inc/salframe.hxx:246
(gdb) frame 23
#23 0x00007ffff1586e00 in ImplWindowFrameProc (_pWindow=0x10a6ce0, nEvent=22, pEvent=0x15fd5d0) at /home/mariuz/work/libo/vcl/source/window/winproc.cxx:2578
(gdb) frame 5
#5  0x00007fff96c9c99c in connectivity::firebird::Connection::documentEventOccured (this=0x7fffac0a1400, _Event=...) at /home/mariuz/work/libo/connectivity/source/drivers/firebird/Connection.cxx:814
(gdb) frame 4
#4  0x00007fff96c9bce2 in connectivity::firebird::Connection::runBackupService (this=0x7fffac0a1400, nAction=1) at /home/mariuz/work/libo/connectivity/source/drivers/firebird/Connection.cxx:645

Tuesday, June 30, 2015

Backup file firebird.fbk file inside odb is 0 length

That could be the reason gerrit wasn't merged Connection::runBackupService didn't quite worked:
(Currently doesn't actually work, the backup service fails with gbak:Exiting before completion due to errors and no further error messages).
I need to debug the isc_action_svc_backup error

On odb save event now saves fbk instead of fdb

XDocumentEventListener documentEventOccured was registered for when save button is pressed

It was done on this line in Connection.cxx :
xBroadcaster->addDocumentEventListener(this);

The issue was on this part of the code 
xInputStream = OStorageHelper::GetInputStreamFromURL(m_sFirebirdURL, xContext);
Now replaced with
xInputStream = OStorageHelper::GetInputStreamFromURL(m_sFBKPath, xContext);

m_sFirebirdURL is the original fdb path 

m_sFirebirdURL = m_pDatabaseFileDir->GetFileName() + "/firebird.fdb";
m_sFBKPath = m_pDatabaseFileDir->GetFileName() + "/firebird.fbk";



Friday, June 26, 2015

Semi good news : New Database.odb contains firebird.fbk

The semi good news is that New Database.odb contains fbk file saved when a table is created and saved from Base
Here is the unziped New Database.odb



The bad news is the firebird.fbk is in fact firebird.fdb file , so the saved file is the database file instead of backup file (i renamed the fbk to fdb and can be open in flamerobin)

When i loaded the New Database.odb i got this backtrace

rogram received signal SIGSEGV, Segmentation fault.
0x00007ffff7b7b99d in rtl_ImplGetFastUTF8UnicodeLen (pStr=0x7ffffffff000 , nLen=18238, ascii=0x7fffffffb658) at /home/mariuz/work/libo/sal/rtl/ustring.cxx:610
610             unsigned char c = (unsigned char)*pStr;
(gdb) 

So i need to work on the save fbk to odb part

Thursday, June 25, 2015

The good news

The good news is firebird_empty.odb simple test is is ok (fdb file is created in tmp area and queries work) as seen in the trace https://gist.github.com/mariuz/ecfbab056136b8736bda
info:connectivity.firebird:3385:1:connectivity/source/drivers/firebird/Driver.cxx:54: FirebirdDriver_CreateInstance()
info:connectivity.firebird:3385:1:connectivity/source/drivers/firebird/Driver.cxx:166: connect(), URL: sdbc:embedded:firebird
info:connectivity.firebird:3385:1:connectivity/source/drivers/firebird/Connection.cxx:173: Temporary .fdb location:  /tmp/lu3385bwxulf.tmp/firebird.fdb
info:connectivity.firebird:3385:1:connectivity/source/drivers/firebird/DatabaseMetaData.cxx:851: getTypeInfo()
info:connectivity.firebird:3385:1:connectivity/source/drivers/firebird/Connection.cxx:883: buildTypeInfo(). Type info built.
info:connectivity.firebird:3385:1:connectivity/source/drivers/firebird/Connection.cxx:891: buildTypeInfo(). Closed.
info:connectivity.firebird:3385:1:connectivity/source/drivers/firebird/Statement.cxx:111: executeQuery(SELECT DISTINCT indices.RDB$INDEX_NAME FROM RDB$INDICES indices JOIN RDB$INDEX_SEGMENTS index_segments ON (indices.RDB$INDEX_NAME = index_segments.RDB$INDEX_NAME) JOIN RDB$RELATION_FIELDS relation_fields ON (index_segments.RDB$FIELD_NAME = relation_fields.RDB$FIELD_NAME) JOIN RDB$FIELDS fields ON (relation_fields.RDB$FIELD_SOURCE = fields.RDB$FIELD_NAME) WHERE (indices.RDB$SYSTEM_FLAG = 0) AND ((fields.RDB$FIELD_TYPE = 14)      OR (fields.RDB$FIELD_TYPE = 37)) AND (indices.RDB$INDEX_INACTIVE IS NULL OR indices.RDB$INDEX_INACTIVE = 0) )
info:connectivity.firebird:3385:1:connectivity/source/drivers/firebird/ResultSet.cxx:79: OResultSet().
info:connectivity.firebird:3385:1:connectivity/source/drivers/firebird/StatementCommonBase.cxx:111: close
info:connectivity.firebird:3385:1:connectivity/source/drivers/firebird/StatementCommonBase.cxx:111: close
We need to modify the file firebird_integer_x64le.odb used in the qa tests (dbaccess/qa/unit/firebird.cxx) to include a fbk instead of fdb http://lists.freedesktop.org/archives/libreoffice-commits/2013-September/057217.html

Tuesday, June 23, 2015

Debugging #72987 libreoffice patch

I started debugging the gerrit at the end of #72987
export DEBUGCPPUNIT=TRUE
export CPPUNITTRACE="gdb --args"
export VALGRIND=memcheck
make CppunitTest_dbaccess_firebird_test
make -j 4 -rs -f /home/mariuz/work/libo/Makefile.gbuild CppunitTest_dbaccess_firebird_test
Seems that gdb debugging is locked
Update: I needed to export only one of the bash env variables not all of them
export CPPUNITTRACE="gdb --args"
Here is a more readable backtrace

Monday, June 15, 2015

New small patch from libo for El Capitan

We need to apply the same patch upstream in 2.5 tree so I have asked Paul why the flag was needed and if it can be removed. So it can be safely removed also upstream.

Update : patch applied both in trunk and firebird 2.5.x release branch. gds_relay target was removed from darwin makefile comments (target was removed many years ago by Alex)

It should be removed from all makefiles in 2.5.x branch (seems to be removed in trunk)

Tuesday, June 09, 2015

osx fixed , redoing the gerrit patch

Yesterday i had an exam so i slowed down my pace for the moment

Saturday i have the last exam on this year (Advanced Methods in Data Analysis)

the osx issue is that bash firebird configure script detects host/target as i386-darwin on x86-64 osx

https://discussions.apple.com/thread/2245432
so we have to use the 2.5.2 trick and force the build for darwin_x86_64

i*86-*-darwin*)
    MAKEFILE_PREFIX=darwin_x86_64

I will redo the gerrit and send it again after i make shure that it builds on all machines

and remove the old one

Sunday, June 07, 2015

testing make qtcreator-ide-integration more patches are now upstream . osx architecture linked issue

in libo git folder you can now create qtcreator files

make qtcreator-ide-integration
cd sw
qtcreator sw.pro


parsing/indexing the project took a few seconds . I'm more used to qtcreator than to kdevelop



On the firebird side , one more fix is now upstream .




I saw that we have an issue with osx patch



ld: warning: ignoring file ../temp/boot/jrd/dsc.o, file was built for unsupported file format ( 0xCF 0xFA 0xED 0xFE 0x07 0x00 0x00 0x01 0x03 0x00 0x00 0x00 0x01 0x00 0x00 0x00 ) which is not the architecture being linked (i386): ../temp/boot/jrd/dsc.o
http://ci.libreoffice.org/job/lo_gerrit_master/2971/Gerrit=Gerrit,Platform=MacOSX/consoleText

I will review what changed in the configure/makefile that triggered the issue

Saturday, June 06, 2015

Timo-T game modifications : environment effects, real time illumination, we've changed the lasers



A few modifications made these past few weeks, hope You like'em So we've played a little with the environment effects, real time illumination, we've changed the lasers, as You can see they look a lot different than they did before and we've optimized the shader to get some better reflections. Still need to implement a few minor things and solve a few bugs, but we are very excited with what we have so far. Hope You like it Leave us a comment with what Your thoughts are on this matter. Any feedback would be appreciated.


http://www.indiedb.com/games/timo-t/news/timo-t


Better view in the HD images area


http://www.indiedb.com/games/timo-t/images

Friday, June 05, 2015

#gsoc2015 for libreoffice update no #3 : patch has it's own brain (osx vs linux)

I worked on the finishing firebird 2.5.4 cygwin.msvc patch and i did also the up streaming (as much as i could from it)
I had an issue with patch created on linux didn't apply very well on osx (hunk issue)

I have prepared the gerrit for firebird 2.5.4 upgrade here https://gerrit.libreoffice.org/#/c/16103/

I solved the following rejects yesterday , i did my builds on all windows/osx/linux machines


2 out of 10 hunks FAILED -- saving rejects to file configure.in.rej
1 out of 2 hunks FAILED -- saving rejects to file src/jrd/gds.cpp.rej
1 out of 1 hunk FAILED -- saving rejects to file src/jrd/os/win32/mod_loader.cpp.rej



It was easier if patches where done for each file separated or as pull requests on github for easy cherry picking :)
Firebirdsql accepts now pull requests on github

Also i up-streamed some of the patches 
ps: i started importing the libo in kdevelop for easy debugging and it will take a while to import 

also started reviewing firebird endian issue and previous gerrit

Wednesday, May 27, 2015

#gsoc2015 for libreoffice update #2 - update firebird to 2.5.4 , osx builds ok



I have updated firebird 2.5.4 patch also with osx patches refactored (now is building ok on osx)






https://drive.google.com/file/d/0BwmDDYc8dMVzRllXM0pMYWRhWlpiOGRZSDNmMkxfekV2QlI0/view?usp=sharing



I still need to clean the cygwin msvc patch (work in progress)


it fais on cygwin on these lines






2 out of 10 hunks FAILED -- saving rejects to file configure.in.rej


[build CHK] cppu


1 out of 2 hunks FAILED -- saving rejects to file src/jrd/gds.cpp.rej


1 out of 1 hunk FAILED -- saving rejects to file src/jrd/os/win32/mod_loader.cpp.rej


[build CHK] cppuhelper


Patch FAILED: C:/sources/libo-core/external/firebird/firebird-cygwin-msvc.patch.1


C:/sources/libo-core/solenv/gbuild/UnpackedTarball.mk:166: recipe for target 'C:/sources/libo-core/workdir/UnpackedTarball/firebird.done' failed

Tuesday, May 26, 2015

#gsoc2015 for libreoffice update #1 - update firebird to 2.5.4

Jenkins tells us libo master fails to build on MacOS and MS Windows, in the firebird compilation.
These two will be merged into one request:
https://gerrit.libreoffice.org/#/c/15026/
Patch is applied upstream http://tracker.firebirdsql.org/browse/CORE-4475
https://gerrit.libreoffice.org/#/c/15029/

Also external/firebird/firebird-icu.patch is already applied upstream in 2.5.4 (it's an examples makefile  firebird/builds/posix/Makefile.in.examples)

https://github.com/FirebirdSQL/core/commit/ffde92d9517c99651f1d2acfe91b5f148ac3a638

On On MacOS X, the error after update seems to be that the Firebird build system uses a compiler switch that is not recognised by clang compiler. (needs to be removed also contributed upstream in 2.5..x tree)

Tuesday, May 19, 2015

Timo T gameplay video no #2



We have worked some more on our game, still have some work to do, but we do hope that we'll have a demo in a week or 2 (fingers crossed)... Until then enjoy the new video... We will gladly reply to each of you that comes with Feedback, questions and suggestions. Who knows maybe You'll give us some great ideas!


http://www.indiedb.com/games/timo-t/videos/timo-t-gameplay-21


Sunday, May 17, 2015

Firebird PHP Web Admin with Bootstrap 3.x

Here is one screenshot with new Firebird Web Admin interface



Compare with previous version


Saturday, May 16, 2015

Gibbous - A Cthulhu Adventure (Pre-Alpha Demo Footage)

Gibbous is a classic 2d point and click adventure, and yes it’s a Lucas Arts-like game. It also is, as the subtitle so unsubtle-y gives it away, a loving spoof of everything Lovecraftian, and then some.

Pre-Alpha demo footage



Wednesday, May 13, 2015

Timo-T puzzle game [WIP]



The Gameplay is relatively easy: You are a robot that has to press some buttons in a certain sequence in order to get to the next level (the buttons are just a sketch they are not final). Every level is time elapsing from 3-5 min per level. All the levels are basically on the same platform, the only difference is that the platforms are moving up and down and as U advance in the game it will be harder and harder because the higher levels will have certain paths which U must go on the and rest will be lava. There will be lasers as shown in the teaser and plasma bullets shot from the ceiling. The robot will have 2 special abilities with a cooldown meter and there will be power-ups like walk on lava for a few seconds and restore health. And of course the facility is built inside of a volcano.

Boxshot
http://www.indiedb.com/games/timo-t

Timo-T


Thursday, May 07, 2015

Installing Firebird Ruby driver on Windows 10 x64



Install firebird 2.5.4 x64 with fbclient copy to system dir (checked).
Install rubyinstaller 2.x x64
Download Devkit for ruby 2.x (x64 – 64bits only)
unzip it in C:\rubydevkit
open cmd.exe in start->run
cd rubydevkit
run ruby dk.rb init and ruby dk.rb install to bind it to ruby installations in your path.

Then gem install fb will go without issues after compilation.
After that you can install rails 4.2.x and ActiveRecord Firebird Adapter.

Tuesday, May 05, 2015

Firebird 2.5.4 Final for Ubuntu LTS releases is uploaded into Firebird stable ppa



Here you can find the latest stable release Firebird 2.5.4 for LTS supported Ubuntu releases.
Follow the Firebird 2.5.x guide for usage and installation.

ps:Also package for latest supported Ubuntu:15.04 is uploaded

Tuesday, April 28, 2015

Saturday, April 25, 2015

Ubuntu 15.04 allows systemd removal

One way to boot your ubuntu 15.04 faster is to switch to upstart and remove systemd

sudo apt-get install upstart-sysv

https://wiki.ubuntu.com/VividVervet/ReleaseNotes#Boot_and_service_management

Wednesday, February 18, 2015

CodeIgniter 3 (php framework) includes support for Firebird

The Userguide of Codeigniter 3 (still Release Candidate) mentions that now has support for Firebird:
Added Interbase / Firebird database support via the ibase driver.
This means that the installation package CI 3 includes it, although you could previously use Firebird in CodeiIgniter 2 by the driver developed by Carlos García ( https://github.com/cgarciagl/Firebird-for-Codeigniter ) .

 We are very happy that CodeIgniter 3 integrates support for Firebird,  In fact CodeIgniter is a stable platform where I (albringas)'ve done developments and with very good results.


To see the rest of the new features of CodeIgniter 3 these are the addresses: http://www.codeigniter.com/userguide3/
http://www.codeigniter.com/userguide3/changelog.html

I also put the direction of an article I wrote about using Firebird with CodeIgniter 2, in my blog: http://albringas.com/noticias/detalle/3103/ 

Monday, February 16, 2015

Building Firebird 3.0 Client / Embedded for Android Arm-32 bits

Download and install ndk  unzip in your home
install firebird build dependencies
sudo apt-get build-dep firebird3.0
sudo apt-get install libtommath-dev



export NDK=$HOME/android-ndk-r10e
echo $NDK

get the Firebird 3.0 source code from https://github.com/FirebirdSQL/firebird/tree/B3_0_Release

git clone https://github.com/FirebirdSQL/firebird.git
cd core 
git checkout B3_0_Release
./autogen.sh  --with-cross-build=android.arm --without-editline --enable-binreloc
make
There was a libedit.a linking error so i had to copy it manually
cp extern/editline/src/libedit.a gen/Release/firebird/lib/libedit.a
after that the libfbclient.so is created for arm

file  gen/buildroot/opt/firebird/lib/libfbclient.so.3.0.0 
gen/buildroot/opt/firebird/lib/libfbclient.so.3.0.0: ELF 64-bit LSB  shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=b6cb7db07fcad2475aa79352fb515cbe3ac44eea, stripped

Soon i will add a download link

ps: fbclient.so in 3.0 can be used as embedded

Monday, December 08, 2014

Firebird 3.0 Beta 1 release is available for testing



Firebird Project announces the first Beta release of Firebird 3.0, the next major version of the Firebird relational database, which is now available for testing.

This Beta release demonstrates the features and improvements currently under development by the Firebird development team. Our users are appreciated giving it a try and providing feedback to the development mailing list. Apparent bugs can be reported directly to the bugtracker.

Beta releases are not encouraged for production usage or any other goals that require a stable system. They are, however, recommended for those users who want to help in identifying issues and bottlenecks thus allowing to progress faster through the Beta/RC stages towards the final release.

Please read the Release Notes carefully before installing and testing this Beta release.

Friday, November 21, 2014

Node.JS and Firebird driver (node-firebird-libfbclient) installing on Amazon EC2 instance

Here are the notes on Installing node.js module for firebird
I assume Firebird was installed from source or from tar.gz and in a linux instance


wget https://nodejs.org/dist/v4.6.0/node-v4.6.0.tar.gz
tar -zxvf node-v4.6.0.tar.gz
cd  node-v4.6.*
./configure 
sudo make install

Next is time to install the firebird module (Firebird was installed from source in /opt/firebird2.5.x)

git clone git://github.com/xdenser/node-firebird-libfbclient.git
cd node-firebird-lib
export PATH=$PATH:/opt/firebird2.5.x/binfbclient/

npm -g install

create firebird db and test table in /tmp/nodedb.fdb with isql or isql-fb

SQL>CREATE DATABASE "localhost:/tmp/nodedb.fdb" user 'SYSDBA' password '*********';
SQL> CREATE TABLE TEST (ID INT NOT NULL PRIMARY KEY, NAME VARCHAR(20));
SQL> create generator gen_test_id;
SQL> SET GENERATOR gen_test_id TO 10;
SQL> set term !! ;
SQL> CREATE TRIGGER TEST_BI FOR TEST
CON> ACTIVE BEFORE INSERT POSITION 0
CON> AS
CON> BEGIN
CON> if (NEW.ID is NULL) then NEW.ID = GEN_ID(GEN_TEST_ID, 1);
CON> END!!
SQL> set term ; !!

Then write the test.js script to connect to it



you can observe that the id is auto incremented if you run it multiple time

node test.js 
[ { ID: 5, NAME: 'new one' },
  { ID: 11, NAME: 'new one' },
  { ID: 12, NAME: 'new one' },
  { ID: 13, NAME: 'new one' },
  { ID: 14, NAME: 'new one' } ]

also in the name you can put later the
browser or the ip in one of the columns


We build now the version for the web modifying the hello world version adding the firebird database glue



you can run it with
 node firebird_example.js

Rails On Firebird - status and follow the guide

Rails On Firebird - you need to check that Firebird active record adapter and ruby driver are installed
Install Rails 4.x :
 gem install rails
Generate a new Firebird Rails application
rails new firebird_app 
delete the generated database.yml sqlite config and use the one from bellow
Be aware about indentation
cat config/database.yml

Edit the project Gemfile and add the activerecord-fb-adapter gem:
gem 'activerecord-fb-adapter'
Then run:
bundle update
 rails generate scaffold Client name:string address:string email:string remark:text
  rake db:migrate
I have re-read the ruby guide
so i did these commands while following the official guide
rake db:create
but database was already created in flamerobin
script/generate controller home index
vi app/views/home/index.html.erb
and write something there, start the server with
rails s
and now you can see something in browser
http://localhost:3000/


I have created the table and one sequence in firebird db
CREATE TABLE posts (
id BIGINT NOT NULL PRIMARY KEY,
name VARCHAR(255),
title VARCHAR(255),
content VARCHAR(255),
timestamps timestamp
);
CREATE sequence POSTS_SEQ;

I have ran the scaffold again to generate the posts model/view/controller
script/generate scaffold Post name:string title:string content:text
and then
started the server
rails s

Of course I have modified the route and added an link as in tutorial and now i can add and modify blog posts
note: in new rails route is defined this way in config/routes.rb
map.root :controller => "home"

http://localhost:3000/posts






Follow the normal ActiveRecord conventions for table names, primary key columns, etc. The one “extra” you’ll need for Firebird is that you’ll have to create a generator for any tables that require a sequence-based primary key. The default naming convention is TABLENAME_SEQ. So if you have a users table, you would need to create a corresponding USERS_SEQ generator

You don't need to create before insert triggers ! rails reads the value from sequence and then increments it in ruby code, Yay!

Wednesday, July 09, 2014

Installing Android x86 4.4 on my eeepc with qemu

In fact is an re-install , i had 4.3 in dual boot with debian sid on my eeepc and i wanted to do an upgrade , the issue is that i don't have a usb stick to boot from it so i took another route

I have installed qemu and then downloaded the 4.4 iso from android x86 site and started this way to detect partitions on the main drive

qemu -boot d -cdrom android-x86-4.4-RC2.iso -hda /dev/sda

 format the partition already prepared in my case 15G /dev/sda4 also do not install grub if you want to modify it manually from debian partition


 After the install is finished you need to test it first that it works i mount /dev/sda4 to see the dir structure
mount /dev/sda4 /mnt
ls /mnt/
android-4.4-RC2  lost+found

so i have modified /etc/grub.d/40_custom this way
 menuentry "Android-x86 4.4" {
set root=(hd0,4) linux /android-4.4-RC2/kernel quiet root=/dev/ram0 androidboot_hardware=eeepc acpi_sleep=s3_bios,s3_mode SRC=/android-4.4-RC2 DATA= initrd /android-4.4-RC2/initrd.img
}

sudo update-grub2


 and restart choose the new android version

Monday, May 19, 2014

Fire Ruby - howto start with Firebird and Ruby on Ubuntu / Debian

This howto is about installing firebird ruby driver on Ubuntu or any Debian based distro
you might need some firebird dependencies and if you need the stable Firebird server  Firebird 2.5 guide to install it

The very basic firebird package to build only the driver is firebird2.5-dev

sudo apt-get install firebird2.5-dev git-core
and choose yes when asked
Then you need to install ruby and the recommended rails way is to use rbenv 

rbenv install 2.1.2
rbenv global 2.1.2
ruby -v
Best way is to install it from gem

gem install fb

Alternate way  is to build install our gem (latest build-able is located here )

git clone https://github.com/rowland/fb.git
cd fb/
gem build fb.gemspec


You will get something like this in terminal :
 Successfully built RubyGem
  Name: fb
  Version: 0.*.*
  File: fb-0.*.*.gem


Now is time to install it using the gem command

gem install fb-0.*.*.gem



Please read the README.
here is how i tested on my machine

Here is part of the example i ran on my pc

pico test.rb 


And here are the results for my ruby test
ruby test.rb 
ID: 0, Name: John 0
ID: 9, Name: John 9

What is next class ? RoR on Firebird

Monday, March 31, 2014

Compiling Linux Kernel Vanilla - Ubuntu/Debian way

Here is my guide on Compiling x.xx.x Vanilla Final - Ubuntu/Debian using the Debian way

This article is about compiling a kernel on Ubuntu systems. It describes how to build a custom kernel using the latest unmodified kernel sources from www.kernel.org (vanilla kernel) so that you are independent from the kernels supplied by your distribution.
Install the Required packages for building it
 
apt-get install git-core kernel-package fakeroot build-essential ncurses-dev
Then download latest kernel version
cd /usr/src
sudo su 
wget --continue http://www.kernel.org/pub/linux/kernel/v4.x/linux-4.xx.x.tar.bz2
tar jxvf linux-*.*.*.tar.bz2
cd linux-*.*.*

$ cp /boot/config-`uname -r` ./.config
$ make menuconfig

make-kpkg clean
fakeroot make-kpkg --initrd --append-to-version=-vanillaice kernel_image kernel_headers
cd ..
dpkg -i linux-image-*.*.*
dpkg -i linux-headers-*.*.*
sudo shutdown -r now

you can install the headers too from /usr/src/linux-headers-3.*.*-*
in my case i can show you how the packages are named
ls *.deb
linux-image-*.*.*-vanillaice_4.4.*-vanillaice-10.00.Custom_amd64.deb
linux-headers-*.*.*-vanillaice_4.4.*-vanillaice-10.00.Custom_amd64.deb

I also created a python script http://github.com/mariuz/kernelcompile

that can be used like this
git clone https://mariuz@github.com/mariuz/kernelcompile.git
cd kernelcompile
sudo ./kernel-compile.py

Friday, March 14, 2014

php5 and firebird pdo on ubuntu / debian

The recommendd method is to use the official php5 source from ubuntu or debian and build only the pdo firebird extension and install it
sudo apt-get install php5-dev firebird2.5-dev php-pear devscripts debget

You need to build the pdo extension from php from ubuntu source code here is the source for php package (apt-get source will do the job for any release)
apt-get source php5
cd php5-*
cd ext/pdo_firebird
phpize
sudo ln -s /usr/include/php5 /usr/include/php
./configure
make
sudo make install 

Check to have in php.ini to have the next lines also with phpinfo() function

sudo pico/vi /etc/php5/conf.d/pdo.ini
# configuration for php PDO module
extension=pdo.so
extension=pdo_firebird.so


php -i | grep PDO
PDO
PDO support => enabled
PDO drivers => firebird
PDO_Firebird
PDO Driver for Firebird/InterBase => enabled

you can also check in apache if all is correct
by creating a page in /var/www/pdo_info.php
with this content



then in the browser press F3 and search PDO
to check if all is ok with the driver then create one small example that loads the driver and then is connecting to the database server



after the driver is loaded now you can use the pdo as usual , here is the fetch example

Tuesday, November 26, 2013

Realocated sector count is 1 , should i fear ?

yesterday my hdd started to fail  (bad blocks from reading files) and from the raw read error rates i was worried that is already dead but it seems that seagate  ST9500325AS drives they do high error rates also one sector can be corrected it seems using filesystem vodoo
The self tests are only done for 10% and then they stop
Seems that only in Linux you can force it to write to a corrupted sector and fix the issue

A nice tool to read the smart values in human format is gsmartcontrol.

sudo apt-get install gsmartcontrol



Tuesday, October 01, 2013

Django Firebird and pyinstaller notes

After installing pyinstaller in python 2.7.x

pip  install pyinstaller
c:\\python27\\scripts\\pyinstaller --version

You need Firebird client installed : run firebird installer

pip install django
pip install fdb
pip install django-firebird

my application is using django-postman and is named that way

c:\\python27\\scripts\\pyinstaller -d --name=django_postman manage.py

I had a issue with Cookie and django 1.5.x (ImportError: No module named Cookie )

ls -lah
dist/django_postman/django_postman.exe
-rwxrwxr-x 1 mariuz mariuz 2.9M Oct  1 13:28 dist/django_postman/django_postman.exe

There are some issues with ctypes dependency support in fdb

So i had to modify in drive_c/Python27/Lib/site-packages/fdb/ibase.py

these lines

    #fb_library_name = find_library('fbclient.dll')
    fb_library_name = 'C:\\windows\\system32\\fbclient.dll'
else:
    fb_library_name = find_library('fbclient')
if sys.platform in ['win32', 'cygwin', 'os2', 'os2emx']:
#    fb_library = WinDLL(fb_library_name)
    fb_library = WinDLL('fbclient.dll')


here is my manage.py config

Flask and pyinstaller notice

I have started to test flask and pyinstaller setup in wine/linux

first i needed to install flask with pip

wine cmd.exe
c:\\python27\\scripts\\pip install flask

then after i have created the hello world flask needs to be added in the --hidden-import at command line like this

c:\\python27\\scripts\\pyinstaller --hidden-import=flask --onefile -d -y hello.py


and you can start it with
dist\hello.exe
* Running on http://127.0.0.1:5000/


Then load in your browser :) The size of the single file binary
 
ls -lah hello.exe 
-rwxrwxr-x 1 mariuz mariuz 5.6M Oct  1 18:03 hello.exe