/usr/portage

Specific env vars for Gentoo packages 0

Since Gentoo Portage introduced the package specific configuration in /etc/portage there was one thing I always missed: specifying environment variables per package. Some environment variables you might want to specify per package are CFLAGS, CXXFLAGS and FEATURES. Especially when you do debugging, some packages should not be stripped, which is the perfect use case for the FEATURES environment variable. While specifying USE-flags and keywords per package, the rest is not that easy. Christian Hoffmann dropped me a link to this mail: the tip there works fine. I’ve played around with it and implemented it slightly differently: first, I would like to be informed which environment files are read and second I changed the resolution order so that the specific configuration inherits from the more generic. So this is what my /etc/portage/bashrc looks like now:
[geshi lang=bash] for conf in ${PN} ${PN}-${PV} ${PN}-${PV}-${PR}; do env=/etc/portage/env/${CATEGORY}/${conf}.env if [[ -f ${env} ]]; then einfo "Reading specific environment from ${env}" . ${env} fi done [/geshi]
For dev-lang/php-5.2.6-r3 I can use three different files to customize the build environment: /etc/portage/env/dev-lang/php.env would apply for all PHP ebuilds, /etc/portage/env/dev-lang/php-5.2.6.env for all revision of the ebuild for 5.2.6 and /etc/portage/env/dev-lang/php-5.2.6-r2.env for the exact ebuild. My /etc/portage/env/dev-lang/php.env file now looks like this to disable stripping the binaries after emerging them and keeping the working directory for better backtraces:
[geshi lang=bash] FEATURES="${FEATURES} nostrip keepwork" [/geshi]

Filed under , , , & no comments & no trackbacks

Jabber for portage 0.0.5(.1) 1

portage-mod_jabber is a small elog module for Gentoo’s portage which provides Jabber notification for portage. It basically allows to receive notifications via jabber when elog events occur.

The new version of portage-mod_jabber fixes a deprecation warning with portage 2.2 (but works with older versions too) and introduces a new syntax for the JABBERFROM-variable: both node:pw@host.com/resource and node@host.com/resource:pw are allowed now.

Grab it while it’s hot!

Note: I’ve released 0.0.5.1 to fix an invalid exception catch. Catched LoadError instead of ImportError. That’s what happens when you confuse Python with Ruby.

Filed under , , , & one comment & no trackbacks

Jabber for portage 0.0.3 3

portage-mod_jabber is a small elog module for Gentoo’s portage which provides Jabber notification for portage. It basically allows to receive notifications via jabber when elog events occur. A few days ago #204125 was opened in the Gentoo bugtracker, which is obviously the wrong place to request features for software which is provided externally. But anyway, I took the idea of allowing the user to specify which Jabber resource to use and added the feature. Another facility in this context which might be helpful is to use hostname as a variable for the current hostname in the resource. So if you deploy a number of systems you can just specifiy “/systems/%hostname%” as the resource and the hostname will be replaced automatically. If you want to use this feature just edit /etc/make.conf and change PORTAGE_ELOG_JABBERFROM to something like user@host.com/resource:password. From now on, the version 0.0.3 is available here.

Hanno, would you mind bumping it?

Filed under , , , & three comments & no trackbacks

Portage-notification for Gentoo via Jabber 3

Getting notified via mail about recent warnings, information messages and error on your Gentoo system is good thing but getting notified via Jabber could be also helpful in some cases. The new notification framework of portage in the current 2.1-serie previews makes it easy and possible to implement somthing like this. To show how easy it is, I did it. You can see the result in the Gentoo Bugzilla. I am utilizing XMPPPY, a friendly Python-library to do so.

How to use?
1.) Install an ebuild of the 2.1-serie of sys-apps/portage
2.) Install dev-python/xmpppy
3.) Copy this file to /usr/lib/portage/pym/elog_modules/mod_jabber.py
4.) Edit /etc/make.conf and set the following options:
PORTAGE_ELOG_SYSTEM="jabber" PORTAGE_ELOG_JABBERFROM="sender@host.com:password" PORTAGE_ELOG_JABBERTO="jid1@host.com jid2@host.com admin@foo.com"

Update:
As of a request by solar and Jacub Moc I did a proper release which is availiable there and wrote an ebuild. All you have to do now is to install the ebuild and edit you configuration.

Filed under , , , , , , , & three comments & no trackbacks

About ejabberd, transports, lazy Gentoo-developers and the gloriousness of Schokokeks.org 7

We did it. I’m proud to announce the completed set of transports on Schokokeks.org, including MSN, ICQ, AIM, GaduGadu (just to have the longer cock than Mabber) and Yahoo!.


Continue reading "About ejabberd, transports, lazy Gentoo-developers and the gloriousness of Schokokeks.org"

Filed under , , , , , , , , , , , , , , , & seven comments & no trackbacks