Jan 6, 2009

Sunrise's over Funtoo

Sunrise a Gentoo overlay is being added to Funtoo. So if you've got layman tracking sunrise and you're using funtoo you'll be able to delete sunrise from your overlays as I'll be merging sunrise's reviewed ebuilds daily.

The hardest part of the whole process was merging package.mask, use.local.desc and categories. Since this is new be on the lookout for bugs or problems.

Want to add an overlay to funtoo yourself? First, it'll have to be a git or svn overlay. If it's git you can skip steps involving git svn.

git svn clone uri://mysvnuri.tld

this imports an entire svn repository into git and will take a while, sunrise had import over 7000 commits. Next check to see if any changes need to be made to the structure of the overlay, in sunrise's case it's not branched properly... they had a subdirectory structure including reviewed and non-reviewed ebuilds, I had to remove that so the top level directory was that of a portdir for merging. if it's already in a nice portdir format move to the next step.

start by cd-ing into your funtoo portdir checkout, then run git pull uri://mygit-svn-cloned-repo, this will attempt to merge the 2 and most likely you will have conflicts. Resolve ebuild, and changelog conflicts first, these are easiest with git mergetool, imho, but don't try to use that to merge manifests. Instead of merging manifests just regenerate them with ebuild ebuildWithScrewedManifest digest. once you've resolved all conflicts run git commit. That's it your done. you've now merged an overlay into your local funtoo tree. If you'd like to see it in funtoo you'll have to talk to Dan Robbins. He's on #funtoo on freenode regularly.

Enjoy!

Dec 30, 2008

Recovering from a deleted /etc

Last night I inadvertently deleted /etc and had to recover my system which was still running, and for my own sanity avoid downtime. Everything was still running when I realized what had happened so without logging out most things would continue to if I didn't stop them.

I run a mix of stable and unstable. If you are on one or the other you will probably be able to simply extract /etc from a recent tarball, I tried doing this from drobbins builds but it was ineffective. After some other attempts I extracted a whole stable tarball from last weeks build. This allowed me to be able to compile with portage (which wasn't working with just /etc). I then had to systematically rebuild system, fixing problems as I came upon them, ultimately I had to rebuild gcc twice because I use -march=core2 which is not available in the current stable gcc. several packages wouldn't emerge even at this point so I had to use emerge --resume --skipfirst a couple of times. One of the bigger problem was the world file (where all packages I've added are listed) was lost. it's made things a bit more complicated that simply doing an emerge -aveDbk world once system was fixed.

I could have easily resolved this had I been using buildpkg. instead this is taking hours to clean up and rebuilding everything to restore all lost /etc files. Fortunately I didn't lose any of my settings because I keep /etc files I modify backed up in a git repository hosted by github.

Dec 21, 2008

sync target support

Here I explain why emerge --sync should return to it's original sync form.

I think emerge sync should have the ability to have a target. Currently emerge --sync has a target of the SYNC variable in make.conf or the default hardcoded. However, git support is being added to portage. git is a very powerful tool, and the Funtoo project uses it to manage it's full portage tree. git doesn't work like rsync, it's not so straight forward as rsync uri, which is effectively what emerge sync is doing. git supports branches. The current implementation of git in portage effectively does git pull ... which is great... you know if you pull from the default.

I don't, and I'm not sure I'd always want to, it'd be great to be able to change tree's on the fly with a more distributed model. If I want to test funtoo without pulling it's tree into mine I could emerge sync funtoo funtoo.org, or I could switch to gentoo by doing an emerge sync rsync://rsync.gentoo.org/gentoo-portage and none of this will change the default or require configuring in make.conf.

Biggest reason to do this is branches though. what if I have a development branch and I need to test something... I, in theory should be able to change the branch quickly. with git I will have to cd to PORTDIR then run checkout. with portages current implementation I'll have to reconfigure some of git and then do a sync. However, if I were able to add a target to it I could easily do emerge sync origin development or emerge sync origin master.

The SYNC variable and maybe some GIT_BRANCH variable could still define defaults while adding a target would make development and testing easier for developers and testers respectively.

--sync should be sync

emerge sync never should have become emerge --sync, of course 2 years ago I thought it was the right thing, it isn't though, live and learn. sync is currently an argument with the syntax of an option.



What's the difference?

An argument is what the command, or executable operates on. Some examples

cp file0 file1 copies file0 to file1.

ls list the current working directory

ls dir0 lists directory dir0



Right, so how is --sync an argument and not an option?

Options effect how commands operate on arguments. For example

cp file0 file1 will overwrite file1 if it exists.

cp --interactive file0 file1 will prompt to overwrite if file1 exists.

ls -R will list any files and directories off the current working directory recursively.

ls -R dir0 will list any files and directories off dir0 recursively.



I still don't understand why sync isn't an option, it isn't a file so wouldn't it be an option?

Well that's basically what I used to think, not a file not an argument. It's not true to understand better I suggest picking up a version control system (e.g. svn) and seeing how you can have arguments that aren't files. Example

svn checkout -r 1346 checkout revision 1346

See the -r switch is an option that operates on the checkout argument to the svn command.



Starting to get it...

--sync currently doesn't affect any target, doesn't change a thing but isn't a 'default' either (some options are just there for explicitness and are in effect unless another option is there.

Dec 19, 2008

types of use flags

Ok so I have yet another idea for portage and other portage like package managers. actually this is probably more aimed at EAPI. Different types of USE flags. The 2 I'm thinking of off the top of my head could be described as volatile and non-volatile. Basically a use flag marked volatile means a package needs to be recompiled if it gets changed one marked non-volatile most likely just pulls in another dependency or copies files such as documentation. I'm sure this feature could have lots of uses I'm not thinking of.

Dec 12, 2008

Download Book, The Ruining of a Good Feature

1-3 Months ago Safari Books finally started allowing you to download full books in pdf. It used to be that you had to download chapters of books in pdf. This was annoying even if you had tokens to do it. Tokens are Safari Books way of making sure we aren't pirating en masse, you get 5 tokens a month and can only keep 3 months worth. So now we can download full books how nice? right?

Well it would be except the only books you can download without buying more tokens are pocket references, those cost 6 tokens, so over 1 months worth. Most books are 16 tokens and I think I saw an 18 token one. I'm sorry but this is just GREEDY, I currently pay $439.99 a year for this service, isn't that enough for me to be able to download 4 books a year?

I probably wouldn't be complaining about this if they allowed you to keep all unspent tokens, I have about 2 years worth now. I actually asked for that.


We would like to inform you that according to Safari terms of service, we will not be able to reinstate the unused tokens.


No, of course not, and I knew that when I asked, but it didn't hurt to ask, or point out that I've used virtually no tokens over 2 years of subscription.

Well O'reilly since I find that this is just pure greed, I won't be renewing my subscription.

Maybe I'm wrong? you know to think that I shouldn't have to pay extra to download a few normal books? what do you think?

Dec 11, 2008

Regen2 development has officially begun

That's right I'm putting my money where my mouth is. It's small but the first 2 packages when into the regen2 tree this morning. They are MySQL 5.1.30 which was added because the gentoo maintainer refused to add it do to instability. I agree that it is unstable, but we have ~M Hard Masked packages for that reason. It has been added as ~M. The other app added is qsynergy, the ebuild was already on portage and I know it to be good so I added it to the tree, I'll probably stabilize it in a few weeks.

Since Regen2 is a fork of Funtoo you can enjoy all the benefits of Funtoo's changes in my tree, and I will try to get mine accepted into Funtoo.

In the future I will be building stable Regen2 tarballs, although only stage3's.

Nov 29, 2008

PostgreSQL \edit and Syntax Highlighting

If you've ever used \edit with PostgreSQL you've probably noticed that it's not using syntax highlighting that your favorite editor most likely supports. I've wondered why this is for a while, Postgres uses vim on my system which supports robust highlighting among other things.

I had a few things suggested to me, such as setting putting settings in my .vimrc, most of which would have forced filetype=sql on files that weren't sql, and would have been active outside of psql.

When you have a question what's the first thing you should do? RTFM. The answer was in the man page all along.


Tip: psql searches the environment variables PSQL_EDITOR,
EDITOR, and VISUAL (in that order) for an editor to use.
If all of them are unset, vi is used on Unix systems,
notepad.exe on Windows systems.


so how does this solve the problem? well the only program that uses PSQL_EDITOR is Postgres, and most editors allow you to specify options at startup. In the case of vim, if you want to have use filetype=sql for the default filetype for \edit all you have to do is


export PSQL_EDITOR='vim -c "set ft=sql"'


of course if you don't use vim or you want to set some different options you'll have to read the documentation for your editor, or operating system.

Nov 17, 2008

Finally Linux gets something first

... and it's something we didn't build. We get lots of things first but we usually build them. We never get proprietary software first. At best we get proprietary software the same day. Generally we get it months later. However, today linux takes another giant step towards being the dominant next OS, we are the first to receive 64-bit flash from adobe. Windows isn't getting it, Mac OS X isn't getting it, we are.

Nov 8, 2008

The Motherboard I want doesn't exist

My Desktop is dieing and needs to be replaced. So I'm working on researching the parts I'd need to replace it. As any good IT person knows, the motherboard is the most important decision to make when building a computer. Theirs a good chance that someone reading this will cry out I'm wrong.

The reason the Motherboard is the most important decision is it dictates the potential of the whole computer. For example the motherboard on my existing system has an AGP video card slot, I can't buy one of the latest and greatest video cards because it doesn't support it. Motheboard dictates everything from the power supply you buy to video card, ram and processor, and more.

So why is it I can't find a motherboard that I want? well... I have pretty complex requirements.

First, it has to work on Linux. That actually isn't that difficult but it does require a little research making sure all components are supported under Linux, and they have to be supported well, I don't want half-assed support that's going to take me a week to get working. I also have several seemingly incompatible hardware requirements.

I want a dual socket motherboard that supports recent quad core processors, ideally processors that have on chip virtualization features.

My next requirement is that I wanted an onboard graphics chipset that is supported by linux with open source drivers. The best choice for this is the intel line of chipsets. The latest being the Intel GMA 4500 HD. Now I have a problem, I can't find a SINGLE board that is Dual Socket and has onboard intel video (actually I think I did find one but the processor support was capped at like p4 or something). So why is it I can't get a system like this? Intel makes all these parts and yet they don't have an offering.

The last thing I want is onboard raid 0/1/10 that will work with my linux system without too much finagling. Advice has been given to me that I should ignore that and just use linux's raid (or buy a true hw raid card).

I also have some requirements for pci* slots but they are less strict, 1+ 16x pcie (for a future video card), 1+ 4x pcie or 1+ pci-x (for hw raid card in the future), 1+ pci (depends on onboard sound... I have a good audigy card that will work for me if the onboard isn't better than it).

So it seems I'll have to sacrifice some requirements. Chances are I'll do some heavy video card research so I can dump the intel video requirement.