How do you trigger a build at svn repoA when a commit is done in repoB?

I wonder if anyone has experience in a subversion-based software build system with the scenario below:

  • you have an svn repository (we’ll call this repoA) that defines an svn:external (this would be repoB)
  • Upon commit to either repoA or repoB, a trigger to build on repoA will happen

Based on what I understood from subversion hooks, this would roughly do the job:

  • repoA
    • there will be a post-revprop-change hook that would trigger the build on repoA when a predefined property(let’s arbitrarily call this extern:changed) is changed. The said property will be set by the post-commit in repoB
    • there will be a post-commit hook that would trigger build on itself whenever there is a commit.
  • repoB
    - there will be a post-commit hook that would set the property(extern:changed) on repoA.

I have only tried doing post-commit and pre-commit hooks before so this is a bit new to me.

Will keep you posted when I discover the answer plus corrections/validations to my solution assumptions above but if anyone can chime in before I post mine, that would be greatly appreciated.

Posted in scm | Tagged , , , | View Comments

Multiple values on svn:externals

In my more than 4 years of working on a subversion repository and svn versioned projects, I could only count the number of times I used svn:externals. I think only in my test repos.

So now that I had to summon what I know, I had to go google the syntax of svn:externals. For those new to subversion or even on versioning software, svn:external is a property (think of metadata) of repository that defines an external repository that is needed by the parent repo. Meaning, projectA could define component1, component2, component3, etc and each could reside in each external repository. Think of it as if each component has a symbolic link from the parent repo projectA. When projectA is checked-out, the defined external repositories are checked-out as well.

The process is a bit confusing to me so I’d like to document it on my blog so I don’t have to dig through Google again…at least for those common stuffs that I need.

In most cases, defining just one external repo would suffice.

To declare more than one external repo(using the sample scenario above and with assuming your are inside projectA’s working copy) you’d use the command:


$ svn propset svn:externals "comp1 http://svn.tld.com/repo/component1
comp2 http://svn.tld.com/repo/component2
comp3 http://svn.tld.com/repo/component3" .

Take note of the dot (.) on the last part above and that each external repos has to be separated by a newline.

Using the command above, it would mean that in your working copy of projectA, you are defining 3 external repositories: that of component1, component2 and component3 and during checkout, it would be automatically placed inside comp1, comp2 and comp3 respectively.

Commit your changes to make it permanent in the repo.

$ svn ci -m"adding svn:externals for projectA"

When you check the value for svn:externals

$ svn proplist svn:externals http://svn.tld.com/repo .

You should see the 3 external repositories defined.

Try updating your working copy:

$ svn up

See for yourself what happens…

Posted in scm | Tagged , , , | View Comments

Is Yahoo bowing out to Google?

It’s been a while since I’ve tried yahoo mail and when I got to the site, I was surprised to see below:

Google on Yahoo?

What is Google doing in Yahoo?

Wow, is this really a sign that Yahoo is no longer contending Google’s dominance and not considering it a major competitor. In the first place, they already stopped their search technology in favor of Microsoft’s Bing + the Ads serving is already outsourced to Microsoft. So there’s no more point in fighting Google.

A quick google search revealed that this was recently launched and in Yahoo’s words:

By supporting user sign-in to Yahoo! through Facebook and Google, we streamline the Yahoo! user identity creation process and can further personalize user experience across Yahoo! services. Commenting on a Yahoo! News article, playing Yahoo! Fantasy Sports, or interacting with photos on Flickr — now users can do all this with their existing Facebook or Google IDs. Returning users who are already signed in to Facebook or Google can benefit from the “one-click” sign-in to Yahoo!, no longer required to enter ID and password. You can initiate the “one-click” sign-in simply by clicking on the “Sign in with: Facebook or Google” icon on the Yahoo! login screen. You are then signed in to Yahoo!, ready to participate fully.

Very noble…Good Karma for Yahoo! :)

Posted in web | Tagged , , , | View Comments

Alternative DNS when your ISP’s DNS is problematic

There are two DNS I try to use when my internet connection is problematic:

I always prefer Google’s FREE DNS as I could retrieve it easily from memory:
8.8.8.8 & 8.8.4.4

OpenDNS is good also specially that you can filter some traffic manually like you don’t want to get into porn sites or you are maintaining an office internet, you may want to block facebook access and that’s fairly easy to do. OpenDNS’ DNS are as follows:
208.67.222.222 & 208.67.220.220

If you are on a Unix-like OS, like Mac or Linux, you can easily add it on /etc/resolv.conf

Posted in DNS | Tagged , | View Comments

.eu like for ASEAN by 2015

The Philippines agrees to proposal of Malaysia to have a single domain (perhaps “.sea” for SouthEast Asia) and “Internet exchange” so as to boost internet connectivity across the region…

Read more on ASEAN Central

Posted in domaining-news | Tagged , | View Comments

Subversion post-commit hook basic

Ever wonder how to create a post-commit hook in subversion? That’s so easy. All you have to do is peek into your repositories’ hooks directory. Meaning, you will need to go to the directory where your repositories are located and look into the “hook” subdirectory. For instance, if your repository is “projectA” located in “/var/svn/repos” you will have to look into “/var/svn/repos/projectA/hooks”.

Inside the “hooks” directory, you will see “post-commit.tmpl”. That’s the post-commit template. Open that file and read the comments. But if you don’t want to read the comments, then all you need to take note are the following:

  • A post-commit hook has only “post-commit” as the name. In Windows, it could either be post-commit.bat or post-commit.exe
  • At least, the owner of the group is the same as the user that runs httpd(I’m assuming here that your svn server runs through apache or other http server)
  • post-commit must be executable by the file owner
  • 1st parameter to post commit is the REPO_PATH in our example, it is /var/svn/repos/projectA
  • 2nd parameter is the revision number just committed.
  • when using external programs inside post-commit and other hooks, use the full path(example: to use awk you will use something like /usr/bin/awk)
  • if you need to display something on the user’s screen after a commit, make sure to send a return 1(or in error) and pass standard output(file descriptor 1) to standard error (file descriptor 2)

Let’s have an example for you to have something to start on. Suppose you are asked to say “Thank you” for every commit, you would do the following:

  1. vi /var/svn/repos/projectA/hooks/post-commit
  2. Put the following inside
  3.    #!/bin/bash
    
       /bin/echo "Thank you" 1>&2
       exit 1
    
  4. Save the file and quit(in vi, it would be then :wq)
  5. Assuming ‘apache’ is the owner of httpd, you will run “chown apache /var/svn/repos/projectA/hooks/post-commit”
  6. Make post-commit executable using the command “chmod u+x /var/svn/repos/projectA/hooks/post-commit”

On a working copy of projectA, make some changes and commit. If you followed the instructions above, you wil see something like:

buggedtech$ vi test1
buggedtech$ svn ci -m"test"
Sending        test1
Transmitting file data .
Committed revision 4.

Warning: post-commit hook failed (exit code 1) with output:
Thank You
Posted in scm | Tagged , , , | View Comments

Virtualization for Smart Phones?

If you’ve heard about virtualization, you’ll directly associate it with workstations or servers that has a lot of processing power. Virtualization makes sense for big companies given that machines gets super powerful(in procesing power) while most of the processing needs of a team is roughly a quarter of that power.

On the other hand, phones are becoming a mini computer. Look at the iPhone, Android-based phones, Blackberry etc. With a lot of extra processing power on so called smart phones, I won’t be surprised VMWare has started virtualizing the phones starting with an Android-based LG phone. Will the iPhone be next? Most likely. To quote their senior director for mobile technology, Srinivas Krishnamurti (as told to Network World), VMWare has no intention of limiting itself to LG, and it is “talking to a lot of OEMs and carrier partners.”

Posted in virtualization | Tagged , , | View Comments

What’s up? It’s almost June 2009…

Yikes, it’s been around 2 months since I made a target post for March 2009. But well, it’s just a target ;) .

But really, I’m having a hard time coping up with blog post duties and doing useful stuffs. I would want to document what I do but I don’t want to spend too much time documenting it….so yes, I’m still documenting techie stuffs and what I think is useful for tech person but in a much simplified and easier form.

I’m most active in delicious.com(bookmarking and tagging sites) and twitter.com(as I can just fire up my terminal and tweet in less than a minute).

If you are on friendfeed, you can subscribe to all my posts on twitter and delicious.

Posted in Uncategorized | View Comments

Liar vs Truthful Mail Server

Once upon a time, when spam was not yet an “in thing”, mail servers where all truthful. A mail server that sends an email to another for a non-existing address always receives a notice from its peer that says “Sorry buddy, I can’t find it in my address list.” Years later, the demons(spammers) found out about sending junk mails or spam. So, the IT gods(email admin) brainstormed on how to contain the inbox chaos.

Many ideas where submitted but only two suggestions emerged with the most number of supporters:
A. Accept all mails but throw away those destined for a non-existing inbox
B. Still send the “mail not found error” and wait for the spammers to change heart.

Both proposals have valid points. Proposal A supporters contends that they should never make the demon’s job easier by telling them which address exist on a mail server and which one does not. Proposal B supporters though points out that it’s against the mail server standard not to reply appropriately.

The two groups where not able to come to terms and so, we have today mail servers that don’t tell the truth.

So, how do you know which type of mail server it is that you’re dealing with? It’s fairly easy. Using some of the tools online that checks for mail server responses, like what’s in my email checker bookmarks:

  • Check how the mail server responds to a random email address such as “asdfa3q2xcy53c323das4yux@buggedtech.com” or asdf3s6ydq34xy7wec23572@buggedtech.com (please replace buggedtech.com with the domain name of the email you are checking, the one after the @)
  • If the mail server responds with something like “email address ok” to random email addresses you used in #1, then, that’s a liar mail server. Otherwise, it’s truthful.
Posted in mail-server | Tagged | View Comments

Target posts for March 2009

Since starting this blog, I only managed to have a handful of post but with several drafts. Rarely do I have readers but who will be interested in tracking my posts if I don’t have new post to offer them? But well, I haven’t committed to posting every now and then.

I created this blog as a personal space plus and an extension of my professional stuffs. Hopefully by end of March, I will be able add relevant posts like:

Liar vs Truthful Mail Server – Explain the 2 types of mail servers, a useful info in checking if an email address exist.
* Checking Existence of Email Address – I consistently received questions from my colleagues if this and that email address exist or why they received a bounce message and what it means.

I’m targetting 2 posts each month. I know, it’s a very low expectation but I don’t write as fast as I could think. But even with 2 per month, I will have added 20 by end of 2009. Not bad, specially if it’s quality post and not just a summary of other’s post.

Posted in Uncategorized | View Comments