Archive

Archive for February, 2008

Let’s Talk Portage

February 27th, 2008 wolfden Comments off

One of the scariest things people run into with Gentoo based systems is Portage. It’s not that scary if you just take 5 minutes and read through the material. So you just did a fresh install and have no idea how to install packages. Sabayon and Gentoo have wonderful package manager. Emerge is the client to Portage. We will use emerge to do what we want.

First thing you want to do as root - to do this, open up konsole and type su than

  • emerge –sync ——> this may take some time the first time. This is updating your package list so you can have access to the latest packages.
  • layman -S ——–> after the above is done it’s time to update your overlay package list so you can have access to it’s latest packages. “Overlays” are package trees for Portage.

After that is complete you are now ready to install the latest packages. You may issues both commands at same time by simply doing emerge –sync && layman -S. That one command will do the same as running both the commands above. So now lets say we want to install the package called foo.

  • emerge foo ——-> pretty tough huh? What if you just want to update foo since it’s already installed
  • emerge foo or emerge -u foo ———> either of those will work. The -u option also upgrades all dependencies of that package instead of just the package itself.
  • You should get into the habit of using the -av or -pv switches so you can see what is going to happen to your system before hand. emerge -av foo will ask with verbose before it actually installs and emerge -pv foo will just do a pretend with verbose and not actually install anything. You don’t want to spend 45 minutes compiling something to discover you forgot a flag or something.

Super now you are adding packages to your system. Installed something you don’t like?

  • emerge -C foo ——> will remove that package, but it doesn’t remove the dependencies it brought with it. You will have to use depclean for that, but you better know what you are doing before depclean as you will more than likely hose your system. Also note, Portage is case sensitive.

Lets say we want to install or uninstall several packages

  • emerge foo foo1 foo2 foo3 foo4 foo5 ——–> this will install each package one after another.
  • emerge –resume –skipfirst ——–> use this option if package foo2 fails in the above command, but you still want foo3 foo4 and foo5 to install. It will resume the installations, but will skip the package foo2.
  • emerge -C foo foo1 foo2 foo3 foo4 foo5 ——–> this will uninstall each package one after anther.

How to find a package in portage

  • emerge -s foo ——–> this will find all packages that contain foo. So if you want to install firefox and you are punching in emerge firefox and portage is going there are no ebuilds for firefox you will want to do a emerge -s firefox and you will discover that the package is really called mozilla-firefox.
  • I highly recommend you install eix as it is the king for searching portage. You don’t want to be without this great tool. It works for finding packages in overlays even. Don’t even think about it, just get it.
  • emerge eix && update-eix Than all you have to do is eix foo instead of emerge -s foo

Gentoo based systems are an install once and just maintain your system via portage. It takes a while to get the hang of doing system and world updates. You need to understand portage and listen to it as you can run into errors with compiling packages for various reason. You will need to search out the solution via gentoo, sabayon forum or bugzilla. It’s something that just comes to you as you use the operating system

  • emerge -uaDN –world —–> is the command you will want to get familiar with. After you have done your syncs this command will bring you current with portage. I highly recommend you take a look at a really nice script that will make your life easier for updating. This will do the above command and more, such as help work around blocks and packages that fail.
  • It’s not necessary to do this daily, but some do setup a cron job to run a world update. I personally do it like once a week. I guess do it as you feel you need to.
  • People frequently ask about an auto update notification. It’s pointless in the gentoo based world as portage changes every day. As I said, some people set up a cron job to run daily for a world update. You can see for yourself daily changes.
  • C0mpiling isn’t fast by any means. People are horrified to find out it took 40 minutes to install firefox. I just say back, try openoffice than, you’re talking 6 hours on a fairly decent machine. Luckily there is a binary version of openoffice in portage to ease the pain.
  • Sabayon Linux is developing a binary package manager that you can use in replace of portage. As of today, it is still in beta and is called entropy that uses the client equo to manage packages. Instead of emerge foo you will do equo install foo. You can even do world updates with equo, but keep in mind that entropy will not have the latest packages like portage will. It will be close to portage, but portage will always have the latest. So if you don’t want to compile your packages, entropy will be for you. There will be a GUI available with entropy also.
  • Speaking of GUI package managers, I don’t really recommend them. They all have their problems and are just not reliable. Many people have a GUI package manager and use it for browsing portage, but use the command line to actually install the package. Don’t be afraid to use the command line, it’s your most powerful tool you will get your hands on. When all else fails you can normally always depend on your command line. Learn it, can’t stress it enough.
  • Layman is another handy tool to have. Let’s face it, portage can not contain every single package out there. Overlays help solve this and you can even maintain your own personal overlay if you wish. So if a package is not in portage, check the overlays. You can use eix to search for packages in portage and overlays. Once you find the package, use layman to add your overlay and emerge your package.
    • eix foo
    • layman -a overlayname
    • emerge foo
  • Security aka GLSA is very well documented in the handbook.
    • glsa-check -t all - to see if effected
    • glsa-check -p $(glsa-check -t all) - to see what packages will be installed
    • glsa-check -f $(glsa-check -t all) - to apply updates

It’s definitely something you have to learn and see the Sabayon Linux wiki for even more information on Portage. Bookmark the gentoo wiki as it is full of howtos to follow. Follow the links posted in this post to explore more information. Use the package manager as much as you can as this will help maintain your system with ease. Things installed outside of the package manager are totally on their own and can cause problems.

Categories: Developers Tags:

Sabayon – package.use

February 26th, 2008 wolfden Comments off

There are 4 wonderful config files located in /etc/portage/ directory that everyone should get familiar with. These files will help control how your system is built. The four files are package.keywords, package.mask, package.unmask and package.use.

Let’s take a look at package.use. One thing you are gonna have to get to know is USE Flags. They determine how all your packages will be built. You can add and subtract support from a package by simply using this file. Your make.conf file contains USE flags that are being used globally through out the entire system. You should try to keep your global use flags to a minimum. This will cause less conflicts when using emerge/portage.

Lets take for example one of my favorite applications, app-admin/conky. It’s USE flags that it currently can be built with are ( X hddtemp mpd rss truetype vim-syntax wifi audacious bmpx ipv6 nano-syntax). To see what use flags you can use on a package, just do emerge -pv conky and it will display the information you need. So now I can decide which one I want to build conky with.

Installed versions: 1.4.9-r1(05:19:20 AM 02/09/2008)(X hddtemp mpd rss truetype vim-syntax wifi -audacious -bmpx -ipv6 -nano-syntax)

You can see from the above that I have built in support already for X hddtemp mpd rss truetype vim-syntax wifi and no support for audacious bmpx ipv6 nano-syntax. The - sign means it will not be built with that flag. So let’s say I don’t have wifi and I don’t use vim-syntax so I want to remove them. So as root:

echo “app-admin/conky -wifi -vim-syntax” >> /etc/portage/package.use

Than you will need to reinstall conky to have the effects take place.

emerge -av conky should display that the flags have changed and you should now see that -wifi -vim-syntax is indeed going to take place. If it’s not than issues emerge -avN conky the N stands for New Use to make portage more aware of change.

So let’s recap, it’s best to keep your global USE flags to a minimum and to take advantage of the package.use file to customize your packages. Why build stuff with stuff you don’t need? Save frustrations with portage by thinning down your make.conf. Welcome to the wonderful world of customization and complete control of your operating system!

Categories: Developers Tags:

Sabayon – package.mask

February 26th, 2008 wolfden Comments off

There are 4 wonderful config files located in /etc/portage/ directory that everyone should get familiar with. These files will help control how your system is built. The four files are package.keywords, package.mask, package.unmask and package.use.

Lets take a look at package.mask, it does exactly what is sounds like. You will use it to mask packages so they don’t install. Why would you want to do this you may ask. There is several reasons why and an example would be you are upgrading your system and you notice one of the files wanting to install has been reported as being broken so you don’t want that package to get upgraded. You will use package.mask to block that package from being upgraded. Lets look at an example of media-video/vlc. Currently the stable version is 0.8.6d-r1 but there is 0.9.0_alpha20080117 available and when I do a world update, it wants to pull the alpha version and I do not want. So I can simple tell portage no by doing as root:

echo “>media-video/vlc-0.8.6c” >> /etc/portage/package.mask

That is telling portage to ignore all package versions above media-video/vlc-0.8.6c version. Notice you can use the = < and > to influence your packages. If you are running out of the ~x86/~amd64 branch, you will frequent that file often. When the next stable release of vlc comes out, I will have to remove the line or change the version to get it so it will install. If you are specifying a version make sure you use the = < > signs, if you simply do a media-video/vlc-0.8.6c it will complain of an invalid package atom. When ever you see invalid package atom, you have entered the line wrong. Trust me, portage will let you know every time.

Categories: Developers Tags:

Sabayon – package.unmask

February 26th, 2008 wolfden Comments off

There are 4 wonderful config files located in /etc/portage/ directory that everyone should get familiar with. These files will help control how your system is built. The four files are package.keywords, package.mask, package.unmask and package.use.

Let’s take a look at package.mask. You’re going to run into something like >> app-admin/filewatcher-2.4.0 (masked by: package.mask) << notice the package.mask. It’s telling you that you need to unmask that particular version. It’s good practice to find out why that particular version is masked. It’s usually masked for a reason as it may cause breakage in the system some where. So if you unmask a file and weird things happen, you know why. In the package.unmask file you will simple add the package.  As root -  Example

echo “=app-admin/filewatcher-2.4.0″ >> /etc/portage/package.unmask

Notice you can use the = > and < signs with the config files to specify versions. You can’t do app-admin/filewatcher-2.4.0 as that will cause your system to complain of an invalid atom in your config file, instead use app-admin/filewatcher to use what they call a version less approach. This will unmask all versions regardless of version.

This is great for simple one on one packages, but what if you want to unmask a whole suite of packages such as KDE? KDE4 is a great example as it is masked and to unmask every package by hand would be a killer. They have a great tool called autounmask. You can simple emerge autounmask and use that for handling it. It will auto edit your config files adding each package that is needed to properly install the package. An example would be

autounmask kde-base/kde-meta-4.0.1 use the autounmask –help to see options. Than you can simply use the emerge command and install kde-meta, emerge kde-base/kde-meta

Again, please find out why packages are masked before hand to save yourself a headache later on.  Always remember you need root access to edit config files.

Categories: Developers Tags:

Sabayon – package.keywords

February 26th, 2008 wolfden Comments off

There are 4 wonderful config files located in /etc/portage/ directory that everyone should get familiar with. These files will help control how your system is built. The four files are package.keywords, package.mask, package.unmask and package.use.

Let’s take a look at package.keywords - it’s pretty simple, basically you use this for untested, svn packages. A great example is the Sabayon binary client equo. We have two versions of it available to us. We have the stable version and than we have the svn(testing) version. In order to use the svn version you have to edit the package.keywords file and add the package to it. You would add the line app-admin/equo ** or you may add the line using your architect like so, app-admin/equo ~x86 or app-admin/equo ~amd64. Any of the three will work the same, but remember you need to be root to edit any of these files. I normally open up a terminal and su and than fire up nano to edit the files. One can also use the echo command as root and add the line:

echo “app-admin/equo **” >> /etc/portage/package.keywords

How will you know when to use this file you may ask.  If you see something like >> gnome-extra/gdesklets-core-0.26 (masked by: ~keyword) << notice the ~keyword?  That is your sign to use the package.keywords file.

See?  Nothing complicated about that.

Categories: Developers Tags:

Spritz Package Manager 0.3 and 3.5 Loop2

February 22nd, 2008 lxnay 26 comments

A first yet basic (but cool) release of Spritz is going to hit our repository in the next hours. I’ve made some screenies you can watch below. Yeah, this is another milestone in the process of creating THE next-gen package manager :) . Other than this, 3.5 Loop2 will be released before the 10th of March 2008. Featuring a LOT of bug fixes, features, and so forth.

Image 1Image 2Image 3

Image 4Image 5Image 6

Image 7Image 8Image 9

Image 10Image 11Image 12

Image 13Image 14Image 15

Image 16

Categories: Development Tags:

Who told you that reading a license is boring?

February 20th, 2008 lxnay No comments

In the last 24 hours I implemented Licenses validation, whitelisting, masking and database support to Entropy. When I started, I tried to find out if someone (maybe crazy like me?) had already made a list of free (as in freedom and/or beer) software licenses. I didn’t dig too much and decided to have a look at /usr/portage/licenses. OMG, 811 licenses to read! Yeah, I read them all and I’ve found something really funny. So, Who told ya that reading a license is boring? Who told me that reading 811 licenses took half a day? Well, nobody (apart from netvandal – our beloved “Michele”).

ZOO license: (moooo! WTF, 1200bps!??!? And what’s all that “compiled” non-sense?)

- You are prohibited from making this program available for
downloading via telecommunications if you charge a total of
more than $7.00 per hour at 1200 bps.
- You are prohibited from distributing this program as compiled
code unless you also distribute the source code from which
the compiled code was derived. This restriction does not
apply if the compiled code was created by me.
- The above restrictions may be relaxed by special agreement;
please contact me for details.

7plus license (HAM HAM HAM, No way, No read. No nothing. Okay??):

*** 7PLUS is HAMWARE. No commercial use. No Sale. Pass on only in it's
*** entirety! There is no warranty for the proper functioning. Use at own
*** risk.
***
*** TABSIZE when editing: 2; don't insert real TABs (^I), use spaces instead.
***
*** When porting or modifying this source, make SURE it can still be compiled
*** on all systems! Do this by using #ifdef directives! Please let me know
*** about the modifications or portations, so I can include them in the origi-
*** nal 7PLUS source.

3ware License (get that software and discover these REALLY IMPORTANT trade secrets please!):

The software contains trade secrets and in order to protect them,
you may not de-compile, reverse engineer, disassemble, or otherwise reduce the
3ware Software to a human-perceivable form.

ZendFramework-1.1 (Did you know…?)

* Neither the name of Zend Technologies USA, Inc. nor the names of its
contributors may be used to endorse or promote products derived from this
software without specific prior written permission.

ZBL: ZIWTRA B00GIE LICENSE (ZBL) – (Translated: I am not guilty of making a horrible software)

2. You are not required to give credit to the original author.

YAZ (Remember, never write “index data” on your brochures):

* 2. The names of Index Data or the individual authors may not be used to
* endorse or promote products derived from this software without specific
* prior written permission.

xv (Note, I am going to change this comment before tomorrow at 9.00am. But the most important thing, is that we WANT MONEY, not your pathetic $50):

(Note: This has been changed, and hopefully clarified, from the 3.00
version of this info. Please read it.)
The latest version of XV (or at least a pointer to it) is available
via anonymous ftp on ftp.cis.upenn.edu, in the directory pub/xv. If
you're not sure if you have the latest version, or you are missing the
source or documentation for XV, PLEASE pick up the latest version of
the xv distribution. Do *not* send mail unless absolutely necessary
(ie, you don't have ftp capability).
This does *not* mean that you are required to register XV just because
you play with it on the workstation in your office. This falls under
the heading of 'personal use'. If you are a sysadmin, you can put XV
up in a public directory for your users amusement. Again, 'personal
use', albeit plural.
On the other hand, if you use XV in the course of doing your work,
whatever your 'work' may happen to be, you *must* register your
copy of XV. (Note: If you are a student, and you use XV to do
classwork or research, you should get your professor/teacher/advisor
to purchase an appropriate number of copies.)
Purchase orders for less than $50, while still accepted, are not
encouraged.
Please do *not* send electronic mail directly to the author, as he
gets more than enough as it is.

xtrans (I don’t accept your apologies!!! I will never do that!):

Our apologies if we missed anyone.

xshipwars (These ones have a modified modificating modificationing brain):

* Any modifications that you make (with the exception of individual or
partial distribution of compoents) must be accepted with written proof
by the authors -or- you may distribute with your modifications provided
that the modifications that you made are stated with reasonable
clarity along with the modified distribution.

xref.lisp (I’ve never used your software, it’s not that useful… (joking)):

This software is distributed in the hope that it will be useful (both
in and of itself and as an example of lisp programming)

xorg-xgml-doctools (It’s because they don’t give a shit man… it’s that simple! Someone should have told ya already):

This is a placeholder for a package whose license is not clear. Upstream has
not provided enough information to provide a license that covers this package.
If you're really interested, this placeholder usually only exists for smaller
packages and thus looking through the source code might reveal some copyrights
and other related information.

xorg-server (I had time to read 811 licenses, you don’t have time to read 2000 files, with probably the same header? So funny! ahah! In the end, you are right):

The normal process of generating licenses for modular X packages is to run
through all source files in an editor and copy all the copyright/license info
into the license file. However, in the case of xorg-server, there are almost
2000 source files. We're not paid enough to do that much work in a short
period of time. ;)

xf86-video-vermilion (did ya know? history history history… No, it wasn’t history, it was “developers developers developers developers”):

Intel funded Tungsten Graphics (http://www.tungstengraphics.com) to
develop this driver.

WTFPL-2 (This is my favorite one):

DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004

Copyright (C) 2004 Sam Hocevar
22 rue de Plaisance, 75014 Paris, France
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.

DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

0. You just DO WHAT THE FUCK YOU WANT TO.

Volano (as in, where’s the [X] button?):

Please read the following Agreement carefully.

VIGRA (VIAGRA? Probably what they got before starting to write this. So, take note, you, is you, yes, you!):

"You" is you, if you're thinking about using, copying, modifying or
distributing this Library.

ut2003 (Thanks thanks thanks. WTF? For what? Licensing?? Cramp? Styple? Isn’t that a serious license?):

1. Thanks. Congratulations and thank you for licensing our
software. We're sorry to cramp your style, but out lawyers tell
us that if we want to keep control and ownership of the cool
stuff we're developing, we have to make sure you understand and
agree that you are just getting a right to use it and that that
right is limited in certain ways. So here's what follows is what
you need to know and agree to.

Trolltech PUL 1.0 (even trolltech has a restricted license, bah, boring, I could have left this out):

(1) This Trolltech Personal Use License ("License") applies to software,
applications, and electronic and/or printed documentation (the
"Software") in the Qtopia suite of applications.

SVFL (It’s very, very, very free. That’s the point):

"Scott's Very Free License"

No-Problem-Bugroff (Houston, we’ve a problem! This placed 2nd on my personal ranking):

The "No problem Bugroff" license.

Richard Stallman of the Free Software Foundation devised, in addition
to some marvelous software, the GNU General Public License (GPL for
short). Or the CopyLeft it is sometimes called.

It is quite a revolutionary document, using the “copyright” tool to to
protect your right to use free software.

Unfortunately using copyright to protect free software is a lot like
using a Jackal to guard the hens.

In fact, various inconveniences relating to this have resulted in
modifications such as the LGPL (Library General Public License) and
more recently the NPL (Netscape Public License)

I call these matters mere inconveniences, the real damage will occur
when the Jackal’s, (sorry, I mean lawyers), actually get to test the
GPL in court for the first time.

Thus enter my version.

Its very simple.

Entirely consistent.

Completely unrestrictive.

Easy to apply.

The “No problem Bugroff” license is as follows…

mekanix (WTF is the SMS Power cause??? Who doesn’t have a SEGA 8-bit cartridge nowadays…):

Thanks. In this case, if you want to help further development and support
the author, you are welcome to register MEKA.

To do so, you will simply have to help the SMS Power cause. This can be
done by several ways. The first is to donate Sega 8-bit cartridges to us.
We would love that. Donating hardware is even more welcome. If you plan
to donate anything, be sure to e-mail me beforehand. And remember it is
not because a game or a system is common that I have it. I am actually
missing a billion of common game I would love to get.

BEER-WARE (My 3rd!!!!! This IS DA LICENSE. Approved by the Dutch ambassador Joost):
* ----------------------------------------------------------------------------
* "THE BEER-WARE LICENSE" (Revision 42):
* <phk@login.dkuug.dk> wrote this file. As long as you retain this notice you
* can do whatever you want with this stuff. If we meet some day, and you think
* this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
* ----------------------------------------------------------------------------

Categories: Development Tags:

eeePC, Gentoo, what else?

February 18th, 2008 lxnay No comments

eeePC, I’m still waiting for it, so not much to say apart the increasing excitement. I promise you to write more info as soon as I put my hands on it :)

The real reason that led me writing this blog post is to clarify my previous statements on Gentoo, Portage status and ebuilds. The Gentoo-KDE team misunderstood my words in two ways:

1) I didn’t write about KDE4 ebuilds themselves, they’re good if not perfect and I want to thank Philantrop and his team for all the hard work and community support.
2) I didn’t write that all gentoo devs are morons, absolutely, there are great guys there, I know some of you and frankly, I just think there are two kinds of developers, reality-disconnected/arrogants and quite, yet kind busy bees. Those are zmedico, he goes straight to the point, a great guy, Philantrop, our KDE4 hero, hkBst, always kind and many others I don’t have much time to write about at the moment (sorry!).

I really think that there would be really something to do to help Gentoo get back to glory. Open the Portage tree, moving it to a distributed SCM (git, mercurial?) and allow “child” projects to join its maintenance. In few words: work together, without bias, without anger. See how the Linux kernel source code is currently handled, each project could have its own tree, each project could pull or push stuff from one to another and the best stuff merged into the official one. If you really want a new great Gentoo, together we can, great potential is already “in place” :)

Just my 0,02€. Make your offer :)

Categories: Development Tags:

KDE 4.0.1, 3.5 Loop2, Entropy, eeePC

February 14th, 2008 lxnay No comments

Hi all,
there are a lot of things I need to tell you and I have about 15 minutes to write them all.
Let’s start:

1) KDE 4.0.1 is hitting our Entropy repository (yay!), it’s still masked and will be kept this way until 4.1, strictly following Gentoo policy. You could ask why, I have an answer that probably no Gentoo dev will ever tell you: ebuilds. There are a lot of ebuilds with broken DEPEND/PDEPEND/RDEPEND: in two ways, first they didn’t get a proper *DEPEND split (have a look at x11-libs/qt-3.3.8-r4, NO RDEPEND declared => do you think I also have time to report every single bug? No, sorry, I don’t have much, I can’t be in charge of it too), second, some ebuilds don’t respect slots in *DEPEND, some contain atoms like “>=kde-base/kdelibs-3.5.5″,”kde-base/kdelibs” instead of: “=kde-base/kdelibs-3.5*” or the new way “kde-base/kdelibs:3.5″.  So, those are, I bet the main reasons to keep KDE 4.0.x masked on Gentoo. Things that could be fixed by just using grep and having 1-2 spare hours.

2) 3.5 Loop2, yeah, I think we’ll have the second beta for the end of February. Unfortunately, donations are slowing down and I had to dedicate a little bit more time to something more remunerative. I wouldn’t ask much, but to pay bills, I need about 1000€/month. Anyway, don’t worry Red Bull is helping and we’re still on track, with EXCITING THINGS coming (read below)

3) Entropy: what I can say, it’s getting better and better, faster, stabler and Spritz is on the way and will hit our repositories before Loop2. I’ve rewritten the caching infrastructure, added dynamic library brekages check, improved memory usage (now reduced at about 15-20Mb, worst case). The TODO list is always long, we got crazy ideas every day, like the trick I’ve found to reduce repository database by a good 65%, from 13,5Mb to 6,3 by using a combination of internal tables compression and LZMA (.7z, which is 10% better than bzip2). Most of this stuff is already implemented but we need to wait a little to allow old clients to continue to work. It’s just a matter of enabling it.

4) eeePC, it’s coming! Exciting things will happen, stay tuned! :)

Categories: Development Tags: