Skip to main content

a silhouette of a person's head and shoulders, used as a default avatar

OpenSUSE 11.1 and Plesk 9.2.1 update

After more than three years of using Suse 9.3 with Plesk 8.1 on one of my VPS, I decided that it is time to update to OpenSUSE 11.1 with Plesk 9.2.1 control panel. The update process went very well, here are the steps involved:

1. create a full backup of your vps (databases, websites, accounts, emails, ...). I have used "tar" command for that.
2. in plesk 8.1 control panel, do a complete backup (you need plesk backup module to be installed), or if you prefer the command line you can use the following command:

# /usr/local/psa/bin/pleskbackup all

Since version 9.x, the structure of Parallels Plesk Panel backup has been changed. Plesk backup created with Plesk Backup Manager is not just one file but a number of files and directories under backups directory /var/lib/psa/dumps. So, you will need to convert your backup file created in plesk 8.1 to be compatible with plesk 9.x. It's a very simple process, see step 3.

3. convert the created backup file to be compatible with plesk 9.x

# /usr/local/psa/bin/pre9-backup-convert -v convert -d /var/lib/psa/dumps/

where /var/lib/psa/dumps/ is backups directory on the server with Parallels Plesk Panel 9

4. restore the backup files to use them with plesk 9.x. It can be done using the web interface, Home -> Backup Manager -> Server Repository, click the backup name to enter the backup details page and select the required restoration options and click Restore to start the restoration process.

If you would like to use command line to restore your domains, clients, server configuration, ... then you can use the following command:

# /usr/local/psa/bin/pleskrestore --restore /var/lib/psa/dumps/ -level server -verbose -debug

You can restore only clients or domains, for more options see:

# /usr/local/psa/bin/pleskrestore --help

Note: I had a small problem and I found that it is not possible to have a client with the same name as your name in Plesk Admin Profile. Maybe it is stupid, but I had some errors and only after I changed the name in Admin Profile (in Plesk control panel) to be different, I could restore without any problem everything.

I think that's all what I did, from what I remember. If something is missing I am sure you can find a lot of useful stuff using our friend google.

Other useful stuff:

1. Plesk 9.x support as well postfix, so if you want to change from qmail to postfix, try that:

# /usr/local/psa/bin/autoinstaller --select-release-current --install-component postfix

if you are not happy, you can switch back to qmail:

# /usr/local/psa/bin/autoinstaller --select-release-current --install-component qmail.

If you are not sure if you are using qmail or postfix there are many ways to find that, one is to look in Plesk Control Panel on the Services management page {Home -> Services Management} if you have SMTP Server (Postfix) or SMTP Server (QMail)

If you decide you want to switch back, simply, do it, the emails are not lost, don't worry.

2. Replace Horde webmail with AtMail

One of the many new features of Plesk 9, is the option to choose a different webmail client. The default webmail client Horde can be replaced if you are looking for something a bit lighter, AtMail. You need to install from Plesk Control Panel, both webmail clients, and to switch between them:

  • Log into Plesk.
  • Chose the domain which you want to use another webmail, enter on “Mail Accounts” page
  • Click the “Mail Settings” icon
  • Switch the “WebMail” to “AtMail (default is Horde)
  • Click “OK”

If you decide you want to switch back, simply reverse the procedure, the emails are not lost, don't worry.

That's all.

References:

http://kb.parallels.com/en/5819
http://kb.parallels.com/en/5801
http://kb.parallels.com/en/952
http://kb.parallels.com/en/5969
http://kb.parallels.com/en/5864

a silhouette of a person's head and shoulders, used as a default avatar

Atomic git

As I wrote in git-pull-mishap-and-git-clean, the problem with git is that, operations are non-atomic. For example, if a git-pull is interrupted, or fails due to lack of disk space or network problem, the resulting repository will be in an in between state. This is problematic. It would be nice if git operations are atomic, in this sense.

A solution could be to have the git repository inside another git repository. For example, have the linux-2.6.git repo inside another git repo, say git-o-git. When you do a pull in linux-2.6.git, and if it succeeds do a `git commit -a` in the outer git-o-git. If it fails for some reason, one can go back to previous version of linux-2.6.git repo by doing a `git clean -d -f` and `git checkout -f` in the outer git-o-git.

It should be possible to add wrapper scripts to `git` and do this auto magically. May be it could be called as git WC, as it is built on top of git porcelain, which is built on top of git plumbing commands. ;-)

Has anyone tried this already?
a silhouette of a person's head and shoulders, used as a default avatar

GIT pull mishap and git clean

When I was doing a `git pull` from a remote repo, I ran out of disk space, which resulted in errors like

Updating ce8a742..faf80d6
error: git checkout-index: unable to write file drivers/usb/gadget/s3c-hsotg.c
error: git checkout-index: unable to write file drivers/usb/gadget/u_audio.c
error: git checkout-index: unable to write file drivers/usb/gadget/u_audio.h


Freed some disk space and re-ran the `git-pull`. But it failed saying

$ git pull
Updating ce8a742..faf80d6
error: Untracked working tree file 'Documentation/ABI/testing/sysfs-bus-pci-devices-cciss' would be overwritten by merge.


Some of the files were created by the previous pull, but they are considered untracked files as the previous pull failed. `git pull -f` didnt help as git was reluctant to delete my untracked files.

Deleting huge list of files one by one was a pain. I was thinking of doing a git status to get the list of untracked files and deleting them. But Jony rescued me by telling me about `git clean` which can delete all the untracked files!

But I would really like to see a way to pull/checkout and over-write the untracked files, so that other untracked files, which will not be over-written, need not be deleted. Is there a way to do it?

a silhouette of a person's head and shoulders, used as a default avatar

GDB Scripting : A short article for a internal magazine

I wrote a small article for a internal magazine and few of my friends wanted me to post it to this blog.

This is for people who are new to GDB and still exploring itz features. So if you’ve used GDB for more than few weeks please ignore and skip 🙂

GDB – Scripting

A good majority of novice programmers tend to use printf functions to trace function calls and to printout the debug data. This forces you to change the code and compile again and again. To eliminate these superfluous tasks from your day-to-day work, use GDB. The GDB has facilities for scripting and helps in saving plenty of your time.

Tracing Function Calls

If you want to know whether a function is called or not, create a break point and write a simple script.

<code>

#Set the breakpoint

(gdb) b mapi_sync

Breakpoint 1 at 0x7fffd75f36e2: file camel-mapi-folder.c, line 741

#Tell GDB what to do when the breakpoint is reached

(gdb) commands

Type commands for when breakpoint 1 is hit, one per line.

End with a line saying just “end”.

> continue

> end

(gdb)

</code>

continue – Come out of break and continue

end – terminate command list

Run the program now. The GDB prints the function name when the breakpoint is hit and automatically continues running the program.

Breakpoint 1, mapi_sync (folder=0xc9c1a0, expunge=0, ex=0xf3a0c0) at camel-mapi-folder.c:741

741             CamelMapiStore *mapi_store = CAMEL_MAPI_STORE (folder->parent_store);

Using the GDB Scripts for Analyzing the Data

Suppose that you have a singly-linked list that has strings in it. At some point, you might want to know the contents of the list. To do this, use the GDB scripting instead of adding the debug statements in your code.

<code>

#Example for gslist traversal.

define p_gslist_str

set $list = ($arg0)

while ((GSList *)$list->next != 0)

p (char *)(GSList *)$list->data

set $list = (GSList *)$list->next

end

end

document p_gslist_str

p_gslist_str <list>: Dumps the strings in a GSList

end

</code>

Add the above snippet into a file and load it into the GDB as follows:

<code>

(gdb) source /home/jjohnny/scripts/gdb/gslist.gdb

</code>

Now, anywhere you want to take a look in the GSList, simply break and

<code>

(gdb) p_gslist_str server_uid_list

$17 = 0x7fffd81101b0 “7666BC1E000000015870BD1E00000001”

$18 = 0x7fffd810e330 “7666BC1E000000015970BD1E00000001”

$19 = 0x7fffd810cbe0 “7666BC1E000000015C70BD1E00000001”

</code>

Simple scripts thus can save you a lot of time from adding or removing the debugging statements from your code. Now go ahead and create a suite of scripts to aid the library you are writing.

More cool developer tricks later. Have fun !

— End —

Thanks to Radhika for editing the article.

Btw when is Archer branch  (Python scripting) getting into GDB ? I’ve been using it a bit .

GDB

– Scripting

A good majority of novice programmers tend to use printf functions to trace function calls and to printout the debug data. This forces you to change the code and compile again and again. To eliminate these superfluous tasks from your day-to-day work, use GDB, the GNU Project Debugger. The GDB has facilities for scripting and helps in saving plenty of your time.
Tracing Function Calls
If you want to know whether a function is called or not, create a break point and write a simple script.
<code>
#Set the breakpoint
(gdb) b mapi_sync
Breakpoint 1 at 0x7fffd75f36e2: file camel-mapi-folder.c, line 741
#Tell GDB what to do when the breakpoint is reached
(gdb) commands
Type commands for when breakpoint 1 is hit, one per line.
End with a line saying just “end”.
> continue
> end
(gdb)
</code>
continue – Come out of break and continue
end – terminate command list
Run the program now. The GDB prints the function name when the breakpoint is hit and automatically continues running the program.
Breakpoint 1, mapi_sync (folder=0xc9c1a0, expunge=0, ex=0xf3a0c0) at camel-mapi-folder.c:741
741             CamelMapiStore *mapi_store = CAMEL_MAPI_STORE (folder->parent_store);
Using the GDB Scripts for Analyzing the Data
Suppose that you have a singly-linked list that has strings in it. At some point, you might want to know the contents of the list. To do this, use the GDB scripting instead of adding the debug statements in your code to print out the data.
</code>
#Example for gslist traversal.
define p_gslist_str
set $list = ($arg0)
while ((GSList *)$list->next != 0)
p (char *)(GSList *)$list->data
set $list = (GSList *)$list->next
end
end
document p_gslist_str
p_gslist_str <list>: Dumps the strings in a GSList
end
</code>
Add the above snippet into a file and load it into the GDB as follows:
<code>
(gdb) source /home/jjohnny/scripts/gdb/gslist.gdb
</code>
Now, anywhere you want to take a look in the GSList, simply break
<code>
(gdb) p_gslist_str server_uid_list
$17 = 0x7fffd81101b0 “7666BC1E000000015870BD1E00000001”
$18 = 0x7fffd810e330 “7666BC1E000000015970BD1E00000001”
$19 = 0x7fffd810cbe0 “7666BC1E000000015C70BD1E00000001”
</code>
Simple scripts thus can save you a lot of time from adding or removing the debugging statements from your code.
Now go ahead and create a suite of scripts to aid the library you are writing.
More cool developer tricks later. Have fun !
a silhouette of a person's head and shoulders, used as a default avatar

On wlan and browser authenticated internet

Nowadays more and more organisations will use an intercepting proxy to give you access to internet. Last week I had the pleasure to use again such a system. To use is an exaggeration as my opensuse 11.1 box with kde4.3 rc1 connected to the wireless network (network manager) but refused to give me access to the authentication page in the browser.

I did all the decent tests that my brain and time allowed me. Checked the ip, checked gateway and checked dns. They seemed ok.

To make frustration even bigger I was able to connect to th very same network with a kde4.3 beta1.

a silhouette of a person's head and shoulders, used as a default avatar

a silhouette of a person's head and shoulders, used as a default avatar

Update

Was at LinuxTag in Berlin last weekenend.

Two main goals fulfilled:
- Met and talked to the Redhat security folks, who I had never met before in RL. All the Opensource security guys cooperate and work together friendly, it was nice meeting them.
- Hold another talk on Wine in front of a full hall again. Should have shown demos perhaps. Thanks for listening! me in front and the audience. Also on Flickr (follow stream right).

Otherwise lots of work and business as usual, just more of it ... tiring.

Also saw my newborn niece for the first time 2 weeks ago while visiting parents. And yummy strawberry pie.

Otherwise I rewrote the libgphoto2 object handling on the trainride and committed it. It allows greater flexibility in dynamic loading of the objectinformation from the cameras, on-demand loading, and features binary search. Still not happy with some of the datastructures.

the avatar of Sandy Armstrong

See you in Gran Canaria!

Pounding a bowl of cereal. Almost time to leave for my flight!

On Sunday I'll be giving a talk about the UI Automation spec, and the work of the Mono Accessibility team. If you're an a11y nerd, or your day job is Winforms or Silverlight app development and you want to automate that shit on Windows and Linux, or you just don't believe that I am currently bearded and want to confirm for yourself, please check it out.

I'd also love to talk to people about Snowy, Free web services, GNOME's online desktop strategy, Batman, and the future of Tomboy.

Dark Victory is really good so far. Doesn't stand on its own...you need to read The Long Halloween first (and therefore should read Year One before that).

A few weeks ago I drafted a blog with updates on Snowy, and just ran out of time to finish it up and post it. But there is some basic info I want to share, so here's an updated excerpt:

We are really excited about all of the positive feedback we're hearing about Snowy, and the upcoming Tomboy Online service. We were reluctant to announce the project before we could confidently host it, but based on the excellent feedback and participation we've received so far, it's clear that we did the right thing by announcing early.

The day I blogged about Snowy, I left for San Diego to participate in my friends' wedding. When I returned on Monday, I had a lot of catching up to do! Here are some of the recent happenings:
  • Brad set up a Snowy mailing list, and a Snowy product in GNOME bugzilla.
  • Og Maciel has begun work on a virtual appliance for Snowy, and in the process of doing so has helped to unearth some bugs (our first mailing list activity). Thanks Og!
  • Ryan Paul of Ars Technica fame as written a great article about the current state of Snowy.
  • Rodrigo Moya and Stuart Langridge have continued to help us refine our REST API, as they work on implementing it for Ubuntu One. Stuart contributed patches to upgrade our authentication from HTTP basic to OAuth, and I finally pushed it upstream, along with corresponding support in Tomboy (based on some handy dandy code from Bojan Rajkovic). I am really grateful for their help!
  • We have our first localization! Thanks to Viatcheslav Ivanov for diving in.
  • The Midgard project has implemented our REST API as well, and intends to add support to Conboy (Tomboy ported to C on Maemo) as well.
This is all after less than a week of Snowy "going public"! This is an encouraging sign that we are on the right track with API design and modularity of implementation.

So that is my updated paste from the draft. The rest was all technical details on the design of the API, and how much Rodrigo, Stuart, and Brad all rock, etc etc. I'll post about that soon...for now I'm going to focus on getting a demo server up for you all to play with!

For those to whom I owe a drink, your day of reckoning approaches!

a silhouette of a person's head and shoulders, used as a default avatar

.NET/Mono Code Camp in Tarragona, Spain



It's official: there will be a .NET/Mono Code Camp in Spain in October. The proposal was made some months ago by CatDotNet, a local .NET user group. Several other .NET user groups quickly joined. The initial idea was to do a traditional Microsoft.NET Code Camp, but I though it would be a good chance of putting together .NET and Mono developers, since after all we have a lot to share. Everybody thought this was an awesome idea.

This will be a good chance for learning and sharing knowledge about .NET and Mono, but I'd also like it to be a meeting point for the Spanish Mono community. I'll be there giving some talks, and I hope other Mono hackers can come too. If you want to propose a talk, or you want to contribute please join the official forum.

More info about the Code Camp in the official web site: www.codecamp.es.

a silhouette of a person's head and shoulders, used as a default avatar

BEEP, BEEP, BEEP

It's been a long time since i've blogged, been around with exams and twitting a lot. And because i'm an OSS lover i also created an account on identi.ca.

On Brasero we introduced a couple of nice features (from Philippe) what will be available on 2.28.x stable releases such as:
- Use Brasero as a single instance application using libunique
- Split burning backend into a new library called libbrasero-burn
- Split some utilities into a new library called libbrasero-utils

- Data spanning
- Added NetBSD support to libbrasero-media
-  New UI to show a more intuitive disc space
- Lot's and lot's of bug fixes.

Brasero is also on GSOC but i'll leave it to our student Alexey to blog and show his progress on his great work!