Installing bugzilla at OpenSUSE
Posted: April 18, 2010 Filed under: development, Προγραμματισμος | Tags: bugzilla, mod_perl, OpenSUSE 3 Comments »Bugzilla is a Web-based general-purpose bugtracker and testing tool originally developed and used by the Mozilla project, and licensed under the Mozilla Public License. Released as open source software by Netscape Communications in 1998, it has been adopted by a variety of organizations for use as a defect tracker for both free and open source software and proprietary products. In this tutorial we will show how to install bugzilla at your linux box. My Linux version is OpenSUSE 11.0. In order to start we need to grab the latest GA version from the bugzilla official web site. Put your pointer at http://www.bugzilla.org/download/ and grab the latest tar.gz, store it somewhere on your local hard drive. We need several things preinstalled in our Linux box, but the first and most important is apache2 web server. Most of todays linux systems come with Apache installed. For OpenSUSE the default htdocs storage is under /srv/www.
Step 1. tar xzvf bugzilla-3.6.tar.gz
Step 2. cp -r bugzilla-3.6 /srv/www/htdocs/
Step 3. cd /srv/www/htdocs/
Step 4. mv bugzilla-3.6/ bugzilla
Step 5. chgrp www /srv/www/htdocs/bugzilla
Step 6. chmod g+x /srv/www/htdocs/bugzilla
In steps 1-6 we untar the bugzilla archive in our local drive. We copy the directory under our web server directory and we give rights to our ‘www’ group.
Some important things that we need to check before installing.
Step 7. Check to see if perl is installed in your system. The command perl -v will show the version of Perl, if any. If you don’t have Perl, follow a tutorial on how to get and install it in Linux.
Step 8. Setup your MySQL database in order to accomodate the bugs database. If you are not familiar with MySQL and it’s installation procedure and the first step to fine tune it please visit a previous post at this blog that explains this things in detail. Go to http://cateof.wordpress.com/2010/04/18/opensuse-and-mysql-the-first-steps/ for further details.
Step 9. Once you are OK with MySQL (bugzilla works with Postgres and Oracle as well) create a database user in order to access the bugs database. bugzilla creates a database called ‘bugs’ and it needs a user to access it. You can do it by using the root mysql user, however this is not too clever. Follow the tutorial I mentioned on Step 8 and create a user called ‘netuser’ that has access to everything in your databases, therefore the netuser will have permissions to change everything in the bugs DB.
Step 10: change your directory to /srv/www/htdocs/bugzilla and execute ./checksetup.pl –check-modules. This is the step that you will spend some time. Every PERL module checks for prerequisites and requires additional software to be installed. After the first parsing of this script you will be notified for the missing dependencies. In order to finish soon with this obstacle type the perl install-module.pl –all, in order the script to connect to the Internet and grab the additional modules from the PERL repo.
Step 11: Run ./checksetup.pl. Now the script will respond with a message that every module is OK, however you need to change some of your paramets in apache and bugzilla.
Step 12: Create a backup of localconfig file. Type cp localconfig localconfig.back
Step 13: Edit this file with the following editor and make some changes. You must change 3 variables:
- $webservergroup = ‘www’; //it was ‘apache’ by default
- $db_user = ‘netuser’; //it was bugs by default
- $db_pass = ‘a_password’; // it was blank by default
Step 14: Take a backup (cp httpd.conf http.conf.back) at your httpd.conf apache2 configuration file and make some changes with your favorite editor. At the end diffing the two files you must have the following changes:
dhcppc2:~ # diff /etc/apache2/httpd.conf /etc/apache2/httpd.conf.back
152,153c152,153
< #Options None //comment out the Options None
< AllowOverride All // and make AllowOverride to All from None
—
> Options None
> AllowOverride None
167c167
< DirectoryIndex index.html index.html.var index.php index.cgi // add index.php and index.cgi also
—
> DirectoryIndex index.html index.html.var
Step 15: At /etc/apache2 copy default-server.conf to default-server.conf.back. Make the following changes (I have pasted the output of the command diff default-server.conf default-server.conf.back.
dhcppc2:/etc/apache2 # diff default-server.conf default-server.conf.back
7c7
< AddHandler cgi-script .cgi //this line must be placed after the DocumentRoot “/srv/www/htdocs” line
—
>
22c22
< #Options None //comment out Options None
—
> Options None
26c26
< AllowOverride All // change All to None for AllowOverride
—
> AllowOverride None
Step 16: Enable mod_perl and restart apache. This is done with the following command
- a2enmod mod_perl //enable mod perl
- rcapache2 stop // stop apache
- rcapache2 start // start apache
- chkconfig -a apache2 //make apache start everytime the system starts (optional)
Step 17: Increase the max_allowed_packet at your MySQL configuration. Edit /etc/my.cnf and change max_allowed_packet to max_allowed_packet = 4M. This will permit 4meg attachments at your bugs. Restart mysql with /etc/init.d/mysql restart.
Run ./checksetup.pl at the bugzilla directory. Everything should work fine. Open your web browser and point to http://localhost/bugzilla/. Ready to go…
Apache Maven. Presentation
Posted: April 9, 2010 Filed under: development, Προγραμματισμος | Tags: Apache Maven Leave a comment »
1337 δολάρια για προγραμματιστικά σφάλματα στον Chrome
Posted: January 29, 2010 Filed under: Λειτουργικά, Προγραμματισμος | Tags: 1337, chrome, google Leave a comment »Η Google ανακοίνωσε ένα πρόγραμμα με το οποίο θα ενισχύσει την ασφάλεια του Chrome, δηλαδή του δωρεάν browser που παρέχει η ίδια εταιρία. Κάθε προγραμματιστής που βρίσκει bugs στην βάση του ανοιχτού κώδικα του Chrome θα ανταμείβεται από 500 μέχρι 1337 δολάρια. Η αμοιβή ποικίλει καθώς θα αξιολογείται το ειδικό βάρος στο κενό ασφαλείας. Εννοείται, ότι τα σφάλματα που οδηγούν στα μεγαλύτερα προβλήματα θα επιβραβεύσουν με περισσότερα χρήματα.
Στον πηγαίο κώδικα της εφαρμογής ήδη έχουν συνεισφέρει ερευνητές και μεμονωμένοι επαγγελματίες, αλλά σε κάθε περίπτωση το χρηματικό έπαθλο αποτελεί ένα διαφορετικό πόλο έλξης. Όμοια, τα προηγούμενα χρόνια η Mozilla Inc, που βρίσκεται πίσω από τον Firefox είχε επικηρύξει τα σφάλματα με 500 δολάρια.
Η Google θα αποζημιώσει εκτός από οικονομικά και ηθικά τους προγραμματιστές που θα ανακαλύψουν τρύπες στο λογισμικό. Κατά πάσα πιθανότητα θα αναφέρεται το όνομά τους στις εκδόσεις του λογισμικού, όπως εδώ στο τμήμα “Thank you”. Εάν βρείτε κάποιο bug μπορείτε να το αναφέρετε εδώ. Περισσότερα στην ανακοίνωση της Google.
I Have A Link (6)
Posted: January 15, 2010 Filed under: Προγραμματισμος | Tags: bookmark, development, Link, programming 1 Comment »
|
Eclipse Galileo proxy problem. Workaround solution
Posted: January 15, 2010 Filed under: Προγραμματισμος | Tags: development, eclipse, programming, proxy 14 Comments »It is a little bit unacceptable that you cannot access a proxy server via Eclipse by default. It blocks almost everything in a working
environment.
The severity of the bug is downgraded, since there is a workaround. Open the eclipse.ini file and add the following
-Dorg.eclipse.ecf.provider.filetransfer.excludeContributors=org.eclipse.ecf.provider.filetransfer.httpclient
In a few words the above command says that Eclipse can access the web via the *.pac files of the HTTP clients (eg Internet Explorer or Firefox).
To summarize:
- Add the above line at the ini file
- ensure that your default system http client (eg Internet Explorer) has proxy settings configured
- Go to Eclipse Window->Preferences->Network Connection and enter the proxy setting here as well
It should work with this workaround.
vim, open a file in a specific line
Posted: December 7, 2009 Filed under: ideas, Προγραμματισμος, Linux | Tags: vim 1 Comment »One of the things that if you try, then you cannot live without them. If you are spending time in the UNIX console and you are using vi as your editor, I am sure that you used grep in order to find a word in a text file. After the results came up to STDOUT you opened the file with vi and then you moved to the specific line.
So, go to your prompt. Use grep -n to print the line number along with the results. Then use vi -c LINE filename. This command will open the file filename at line LINE.
5 stars.
Apache Maven first step, repository central will be blacklisted
Posted: October 29, 2009 Filed under: Προγραμματισμος, javaee, maven | Tags: maven 1 Comment »I am doing some work with Apache Maven 2 today. Never touched this stuff before. I am following a tutorial at IBM developerWorks. However if you sitting behing a proxy you will receive a “repository central will be blacklisted” fatal error. The execution will fail. Although it seems that we are searching for a “I am feeling lucky” google response, this is not the case. I didn’t find a clear answer with the first glance.
If you are facing the same problem we need to set a proxy via the command line like this:
prompt>mvn … -DproxySet=true -DproxyHost=1.2.3.4 -DproxyPort=8080.
Setting the proxy details right is the solution here. You will be able now to create your first archetype.
Programmers are tiny gods
Posted: October 10, 2009 Filed under: Break, Προγραμματισμος Leave a comment »Turorial HelloWorld AIR application in Linux. Create a package from scratch
Posted: September 27, 2009 Filed under: DIY, Προγραμματισμος, Linux, WedDev | Tags: adobe air, adobe flex, SDK 9 Comments »I am running a Fedora 11 Linux in my laptop. These days I decided to spend some time reading about Adobe AIR/FLEX application frameworks. I don’t want to extend this article writing theory and arguments, however it is my feeling that these applications will be prefered in the near future from desktop users. I am reading a book from Wrox, Adobe AIR Create Modify and Reuse (2008) and the first milestone for the developer is to create a “blank” application that prints the canonical programming string to stdout, ie “Hello World”.
Based on the walk-through of this book I will try to describe the steps in order to run your first application in less that half an hour, including the download time of the prerequisites.
- First you need Adobe AIR run time. AIR stands for Adobe Integrated Runtime. Adobe AIR is a cross-platform runtime that runs desktop applications compiled under the AIR framework. Go to google.com and search for “Adobe AIR Linux”. The results will send you to the Adobe.com site for AIR. Download the appropriate file. Once you are down you must have a file called AdobeAIRInstaller.bin in your downloads directory. Make this executable and from the command line enter ./AdobeAIRInstaller.bin. A GUI application will be launched and will guide you for the AIR installation. You must be root in order to install. If care about disk quota you can delete the AdobeAIRInstaller.bin after this step.
- You now need to proceed to the installation of FLEX SDK. Adobe AIR is the runtime environment of your application and FLEX SDK contains the tools you need to compile, debug and deploy your HelloWorld application. Once again use google.com or search via adobe.com for FLEX 3 SDK. I downloaded flex_sdk_3.4.0.9271.zip and extracted the contents under /home/lefteris/flex. The download takes some time.
- Add the bin directory of FLEX SDK to your PATH. This is easy. Open ~/.bash_profile and append the new bin to your PATH variable. Like this PATH=$PATH:$HOME/bin:/home/lefteris/flex/bin. Save this file and use the source command in order to update your system without logging out. source ~/.bash_profile. Now you can use the binaries under flex/bin without using the absolute path at your prompt.
Now you need to type some code. Basically you need two files.
- a main file – this can be either an MXML (.mxml) or ActionScript (.as) file
- An application descriptor file using the XML markup
I created a directory HelloWorld in my workspace. The two files that we need for our minimal application are below.
[lefteris@localhost helloworld]$ cat HelloWorld.mxml
<?xml version=”1.0″ encoding=”utf-8″?>
<mx:WindowedApplication
xmlns:mx=”http://www.adobe.com/2006/mxml”
layout=”vertical”
windowComplete=”completeHandler();”>
<mx:Script>
<![CDATA[
// window has completed initial layout and is made visible.
private function completeHandler():void
{
}
]]>
</mx:Script>
<mx:Label text=”Hello World” />
</mx:WindowedApplication>
[lefteris@localhost helloworld]$ cat HelloWorld-app.xml
<?xml version=”1.0″ encoding=”UTF-8″?>
<application xmlns=”http://ns.adobe.com/air/application/1.0″>
<id>com.aircmr.HelloWorld</id>
<version>0.1</version>
<filename>HelloWorld</filename>
<name>Hello World</name>
<description>An AIR app to say Hello</description>
<initialWindow>
<content>HelloWorld.swf</content>
<title>Hello World</title>
<systemChrome>standard</systemChrome>
<transparent>false</transparent>
<visible>true</visible>
</initialWindow>
<installFolder>AIRCMR/HelloWorld</installFolder>
<programMenuFolder>AIRCMR</programMenuFolder>
</application>
So our dir contains HelloWorld.mxml and HelloWorld-app.xml. We are almost there. Ready to compile. cd to your dir and enter the following command
amxmlc -load-config “/home/lefteris/flex/frameworks/air-config.xml” -output HelloWorld.swf HelloWorld.mxml
This will compile your code and create the HelloWorld.swf. Perfect, now let’s run our first app. To launch and preview the application, run the AIR Debug Launcher (ADL) tool found in the /bin folder of your installation directory. A single argument of the application descriptor file is needed to run the ADL. If you look at the descriptor file (HelloWorld-app.xml), you’ll notice that the content value of the initialWindow element is set to the SWF you previously compiled. Type
adl HelloWorld.xml.
Unfortunatelly this did not work for me the first time I run it. I got the error “cannot execute binary file”. I searched a little bit and I realized that I needed to overlay the AIR SDK on top of the FLEX SDK in order to invoke the correct adl. The book described the procedure for MAC and Windows but not for Linux (that is the reason I am typing right now). So I browsed adobe’s blogs that indicates that we need AIR SDK for Linux. Again search for Adobe AIR SDK for Linux and you will conclude to have a new file under your Downloads directory called air_1.5_sdk.tbz2. Create a new directory for Adobe AIR SDK, mine is ~/airsdk move your tbz2 file here and trigger the command “tar jxvf ~/air_1.5_sdk.tbz2″. Now you need the next hack in order to make your stuff moving:
- cd bin
- mv adl adl_lin
- mv adt adt_lin
Don’t ask, do it. Remember that you came here, searching for direction creating a HelloWorld app, right?
Add the new bin directory to your PATH again. My path contains PATH=$PATH:$HOME/bin:/home/lefteris/flex/bin:/home/lefteris/airsdk/bin. So we are almost done:
[lefteris@localhost helloworld]$ ls
HelloWorld-app.xml HelloWorld.mxml HelloWorld.swf
[lefteris@localhost helloworld]$ adl_lin HelloWorld-app.xml
error while loading initial content
[lefteris@localhost helloworld]$
What went wrong? What is “error while loading initial content” message mean. This is a known bug/issue to Adobe and is already resolved. You need to make the last change before you launch your application. Open your HelloWorld-app.xml file and change the line <application xmlns=”http://ns.adobe.com/air/application/1.0″> to <application xmlns=”http://ns.adobe.com/air/application/1.5“>.
Now run adl_lin HelloWorld-app.xml again and this is it. We are done.

Hello World from AIR and FLEX
Our application is up and running. It just prints a message to the screen however it is an application. Close it by pressing ‘x’ at the top right corner.
Do you want to go a little bit further? In a few steps your project can be turned from a binary file to a complete package. Take 5 more minutes and you will not regret it. Let’s package our application. Go to your prompt and create a certificate in order to sign your applications. This will inform your client about your identity.
adt -certificate -cn HelloWorld 1024-RSA certificate.pfx password
You just created a certificate.pfx file in the current directory. Now let’s package.
adt -package -storetype pkcs12 -keystore certificate.pfx HelloWorld.air HelloWorld-app.xml HelloWorld.swf
Once prompted enter the password. Your directory now contains
a file called HelloWorld.air. Let’s try to install it. Double click the .air icon to launch the installer. Just a note here. I faced some problems at the beginning with the permissions and I ran the installer like this
[lefteris@localhost 1.0]$ pwd
/opt/Adobe AIR/Versions/1.0
[lefteris@localhost 1.0]$ ls
Adobe AIR Application Installer Adobe AIR Application Installer.swf airappinstaller libCore.so Resources
[lefteris@localhost 1.0]$ sudo Adobe\ AIR\ Application\ Installer /home/lefteris/714/air/helloworld/HelloWorld.air
as a sudoer things are always easier. Anyway either by double click or with the above sudo command you will see the following
Click the install button
select the directory you want to store the files of the application and press the “Continue” button.
Agree with the terms and conditions. You are done. Your application is installed in the system. Go to the your Menu and launch it
In case you need to uninstall it use the Adobe Uninstaller from your Menu
You see that Hello World is there. You may receive this error message if you try to uninstall this package:
meaning that you need to be root to uninstall. (try to do it using sudo).
Conclusion: We started this small project from scratch. We gathered all the prerequisites in order to create an *.air package, ie AIR/FLEX sdks AIR runtime, we wrote two simple scripts and we finally created a signed package.
I hope you liked this small tutorial. Please send me feedback.
Regards,
Lefteris
Russia’s New Holiday. The 256th day of the year becomes “Programmer’s day”
Posted: September 13, 2009 Filed under: ideas, Προγραμματισμος | Tags: programmer Leave a comment »Russia’s President Medvedev has declared a new holiday for his country. A new professional holiday – Day of the programmer, which will be celebrated on Sept. 13 if a leap year – September 12, announced the press office of head of state.Unofficially Programmer’s Day celebrated in the world for many years at the 256 th day of each year. The number 256 is chosen because it is the number of integers that can be expressed using a single eight-byte, and also is the maximum degree of 2, which is less than 365.

