How to split a repository in git

We've decided in Smoltland that having a git repo would be a better idea. We were using Mercurial up till now, but as git seems to be the more popular choice in Fedoraland, it seems like it would be a good decision. Mercurial is actually a great system, and there are many aspects about it that I like, but there are a few features I feel I would use in they were available. Also, since git is more popular, it's more likely that when we have questions, we'll get an answer rather than 'hmm.... that's funny, git does this differently'.

I also think it's a good idea to split up the client and the server into two separate repositories, and therefore decided to do a bit of experimenting.

The process of converting a repo from hg to git is well documented. It was simple, and I used the script here: http://permalink.gmane.org/gmane.comp.version-control.git/36601

Splitting a repo was a bit harder though, but after some searching, I came across this link here: http://log.emmanuelebassi.net/archives/2007/09/when-the-levee-breaks/

I had to make a few changes though.

yankee@dao:~/Projekten/Python/Smolt$ git filter-branch --tree-filter 'rm -rf benchmarks database .hgtags .project .pydevproject .settings smoon' HEAD
Rewrite d644ecb4d74fc0ca3245239dae97f051f825fdb1 (668/668)
Ref 'refs/heads/master' was rewritten

These refs were rewritten:

yankee@dao:~/Projekten/Python/Smolt$ ls
benchmarks client database doc GPL README smoon TODO

yankee@dao:~/Projekten/Python/Smolt$ git reset --hard
HEAD is now at dc4a914... 2007-12-11 Piotr Drąg (via raven@fedoraproject.org)

yankee@dao:~/Projekten/Python/Smolt$ git gc --aggressive
Generating pack...
Done counting 3633 objects.
Deltifying 3633 objects...
100% (3633/3633) done
Writing 3633 objects...
100% (3633/3633) done
Total 3633 (delta 2463), reused 0 (delta 0)
Pack pack-79afd8906cd79a2c59c60cd152e71988d0384452 created.
Removing unused objects 100%...
Done.

yankee@dao:~/Projekten/Python/Smolt$ git prune

yankee@dao:~/Projekten/Python/Smolt$ ls -a
. .. client doc .git GPL .hg .hgignore .hgsigs README TODO

yankee@dao:~/Projekten/Python/Smolt$

This had a few extra added benefits. I got rid of some cruft that happened to be sitting around. While rewriting a repository like this on a regular basis is not a good idea, there are a few times you need to do this. The documentation for git-filter-branch is also good for removing copyrighted files, and other nasty things, that you do not have the rights to distribute.

The end result is that I have a repo that is just the client.

UPDATE: I should mention, backup everything first! These changes are permanent to the working directory, and if you should decide you want to go back, you must make a backup. Remember, git does use hashes to identify updates, so if you need a particular version, save the hash. But that's just common git sense.

CatTroll

Nope, this isn't some obscure Finnish Folk Metal band. It's about one of my cats.

So you're sitting in a forum, as far as sitting in an electronic web page goes, which is probably something only my cat fully understands, and there's some troll lurking about being as contentious as possible. And by troll, I mean anyone, because we all like being contentious these days, or am I wrong? You're lining up the thoughts in your head as how to maximise insult when suddenly your cat jumps into your lap. Her name is Black Pearl and she's very cute. Suddenly the tension melts, and you can think of nothing but warm cuddly thoughts for this alleged troll. You're thinking of letting the troll off just this once, perhaps brining the world that one bit closer to Nirvana and World Peace. Hey, you never know. Maybe one of these days we can use stem cells to give pigs wings.

And then she digs her claws into your leg. BAM, and boy does he get it. Might as well get back to doing that paper. There'll be no flying bacon for dinner tonight.

Smolt and Privacy

One of the biggest issues with Smolt that seems to draw a lot of conversation and controversy is privacy. Everyone is justifiably worried that Smolt could be used to track the total hardware capacity of anyone by IP address, and I agree, the potential for abuse is very real. The beauty of Open Source lets anyone poke around Smolt's source code and see that none of our databases have any conspicuously named fields 'submitter_ip' or 'suckers_ip'. This is certainly far greater than many other web applications out there, such as Gmail and Microsoft Live Whatever, who certainly won't release source code as a matter of internal IP. Certainly, there is a bit of doubt, because once we deploy Smolt on the server, no one but a select few Red Hat employees can see it.

So what is it about Smolt that turns it into a pariah web app when I start requesting comments on some great ideas people bring up? This past week, one of the file systems people mentioned it would be interesting to see statistics on the file system of choice per distribution. Red Hat has had their hands invested in ext3 and their gfs, but other distros tend to favour flavours like reiserfs, jfs, and even xfs. Nothing beats real world statistics to get a real idea of what works and what doesn't work.

On friday, I posted [1] to the fedora-devel-list, and I got comments on everything but file systems. I'm not upset that people are aware of these issues, and keep bringing them up, but I don't quite understand why there is all this confusion about what Smolt does. We're so used to using Google, Wikipedia, Comcast, and Internet backbone physically in the US, that most of the time we don't think twice about what people might be storing about us, but when one extra tiny bit of tracking is brought up, there's nothing but confusion.

[1] http://www.redhat.com/archives/rhl-devel-list/2007-November/msg00604.html

In order to clear up any confusion, I've decided we need to become more mainstream. I certainly can't make Smolt a household work, as I'm not sure what it would mean to sit there smolting in your kitchen while the chocolate chip cookies are in the oven. But we certainly can start by having a privacy policy.

I've put together a few notes as what should be considered a privacy policy, and I want to run it by a few of the internal Red Hat people before I unleash it on the community, just for legal sanity. But here's my next RFC.

What would you put, oh dear lazyweb, on your privacy policy? Remember, we never store IP addresses inside Smolt, although Red Hat maintains the rights to monitor incoming traffic to their machines, and no information can be used from Smolt to be traced back to any particular machine. You require some private bits only the client has.

Werewolf!

In Werewolf? I commented that werewolves are the most awesome things ever. They are in fact the greatest thing that ${deity_list} have/has ever created. Apparently the Fedora Developers realize this as well, which can be seen here. Right now I'm running Fedora on both my boxen, and pretty much ignore Debian and Ubuntu anyways, since Fedora lately has been more interesting. To encourage lycanthropy en masse, I am hereby resigning all status as a Debian Addict for the next six months.

Lawsuits and Language

I got a funny shock this morning, when I turned on my computer and my Mugshot thingy told me that RH is being sued. I think the most interesting part about this, is experiencing it from the point of view I got from the internship I did at RH. If I were just doing things the old way, I would have most likely found out sometime really late this evening when I do my daily OSNews read.

Instead, the first thing I see is Greg DeKoenigsburg's post, and that practically the whole world (all 10 people) have read it. As I'm sitting there working on a debate project for school, more and more posts and blurbs keep showing up on Mugshot, to the point that I end up looking into it just a bit for the debate project, which coincidentally happens to be on international debate treaties. It will certainly make things more interesting this coming Monday.

Finally, I get a chance to sit down and read up on what's going on. I realize, I know who Mark Webbink is, I know what's at stake, and I know exactly what Novell and Red Hat are going to have to stand for, and stand up to. (Curiously, they are in the same boat despite having two very different outlooks on Open Source in general.) Ultimately, thanks to the things I learnt from Red Hat, it's actually very exciting!

(Dare I say more interesting than a Steelers game?)

Anyways... I just want to mention, the world is multilingual, and it's great that p.fp.o is. I also enjoy the chance I get to work on the languages I do know, as if I'm not being swarmed with class work already. It is a great opportunity for any language students, and even non language students, or even just human beings in general to see how technology shapes the language we use, and how other languages cope with technological terms and vocabulary coming out of an English dominated world.

Werewolf?

Werewolves are the most awesomest thing ever. If Fedora 8 becomes the Werewolf Edition, I'm going to completely ignore Debian and Ubuntu up till Fedora 9. (Well, I'll read the news, but they won't be installed anymore, with the exception of my very stable file server.) So vote Pedro ... I mean Werewolf.

20 Minutes with Rawhide

Over the past couple of weeks, I've been watching my preferred distribution of choice, Debian, crud itself into a hole, watching random packages disappear. It seems NetworkManager is only working on my laptop on a wing and a prayer, and hibernate works sometimes. It's very strange, since I had similar problems with Fedora 7 on the Thinkpad Redhat loaned me over the summer. Debian worked like a charm.

So I had every plan of giving Fedora 8 a spin, and if it worked well, using it while I am busy with school. Instead I decided to take the plunge a bit early, and installed 7.91 on my machine. If you're a journalist or aggregator of some kind, bear in mind my setup is not the stereotypical clean box, but a real world working system, with all the little quirks that are involved. My system is a Gateway MX6931, with everything split up via LVM. I maintain three seperate primary partitions, each 100mb each that can be used as boot partitions for three different OSes. Currently they are Debian Etch, CentOS 5 (which is by far the most stable and pleasant to use), and Fedora Rawhide. The last is an LVM Physical Volume that holds everything else. Each OS gets 10G, a 15G home partition, and a 40G partition for music and an ever changing list of movies.

The installer worked perfectly. I was easily able to create new volumes, mount the old home directory, use the same swap partition, etc... Since I am letting Debian manage the grub instance on the MBR, I had to add those in manually, but letting Fedora manage the boot sector on its own boot partition lets me see exactly what I need to copy and paste. There was a small hangup in the installer when it couldn't figure out why the pre-existing home volume didn't have SELinux contexts. Some minutes of hard drive and CD chugging later, I was able to boot up into first boot quite easily.

This is where I hit the first snag. SELinux didn't like my home volume. So much went wrong. To start, every file on it had the 'nfs_t' context, which I assumed was the arbitrary default. Debian does not even use SELinux, which is a shame really, although, last I heard, Coughbuntu is going to be setting up AppArmor. While it'll be interesting to see how those two compete, for the love of a bearded hippy and all that might have some very sentimental meaning, these two competing standards is going to make it difficult to share volumes between OSes. I would have loved to have been able to load up 'home' and 'media' right away, and had a working Fedora desktop with all of my personal settings from the beginning. So a bit of SELinux foo later, I was able to mount /home properly, only to find the second SNAFU. I presume this is old territory, and no one has been able to coordinate this properly, but the UIDs and GIDs, (the file permissions,) on my files were messed up. Now every time I boot up into Debian or Fedora after using the other, I will have to change the permissions on each one just to logon. It's a shame, because I use a very consistent user name and password scheme across several computers, and being able to retain permissions at least by user name makes life much easier for me, and presumable someone else as well.

These problems aside, loading the Gnome desktop was *fast*. I got a few random error messages, one about the keyboard settings, a couple more about the lack of Iceweasel, but everything was retained, down to keyboard shortcuts. This is one very good testament to the reliability of Linux vs. the Wintendo world. A bit of tinkering, and I can see the new Nodoka theme. Kudos the the artwork team, and Martin Sourada in particular. It's a little glossy for my tastes, but it's also very clean already, and I can only hope there will be more good things coming from this. Font rendering also seems much better to me, even at the low DPIs I like to use. I had alot of fun experimenting with the different fonts I've accumulated being able to see them render nicely in Linux for the first time. The only catch is Firefox, which seems to render everything at a few DPI points lower than everything else. Two minutes of Google and a tinkering of layout.dpi.css later, Firefox is rendering everything a little bigger, but I can live with it for now.

The only other severe problem I've found is power management. The Gnome team has put alot of effort into this, and it works great. And by great, I mean it's horrible. I can actually set the brightness of my laptop monitor to any setting I want, for the first time ever in Linux. What ever piece of code is managing this though is constantly trying to set modes that don't exist. When I plug and unplug my laptop, the screen flickers black as it turns the bulb on and off trying to get to its new setting. This is probably going to cause lots of wear and tear on the mercury bulb inside, and is probably not a good thing. A bug report is definitely forthcoming.

Otherwise, so far Fedora 8 is shaping up to be an amazing release. Pulseaudio is working great, Hooverphonic sounds awesome, Smolt Rocks (shameless plug), and apparently Snati is the most common name for a dog in Iceland. You pronounce that like you might describe nasal fluids.