=^.^=

Portage Errors: touch: No such file or directory

karma

After updating coreutils you may encounter a problem using touch. This problem often manifests itself as a loop while trying to update other packages:

 *   Touching gcc/cstamp-h.in
 *   touch: setting times of `gcc/cstamp-h.in': No such file or directory
 *   make: *** [gcc/cstamp-h.in] Error 1
 *   Touching gcc/cstamp-h.in
 *   touch: setting times of `gcc/cstamp-h.in': No such file or directory
 *   make: *** [gcc/cstamp-h.in] Error 1
...

or a one-off event that breaks the merge:

touch: setting times of `config.h.in': No such file or directory
make: *** [config.h.in] Error 1
emake failed
 * ERROR: sys-process/psmisc-22.12 failed (compile phase):
 *   (no error message)
 * 
 * Call stack:
 *     ebuild.sh, line  56:  Called src_compile
 *   environment, line 2663:  Called die
 * The specific snippet of code:
 *       emake || die
 * 
 * If you need support, post the output of 'emerge --info =sys-process/psmisc-22.12',
 * the complete build log and the output of 'emerge -pqv =sys-process/psmisc-22.12'.
 * The complete build log is located at '/var/tmp/portage/sys-process/psmisc-22.12/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/sys-process/psmisc-22.12/temp/environment'.
 * S: '/var/tmp/portage/sys-process/psmisc-22.12/work/psmisc-22.12'

>>> Failed to emerge sys-process/psmisc-22.12,

This problem occurs on systems running kernels older than 2.6.22, where futimesat was introduced. This pops up a lot on my older Gentoo VMs for obvious reasons (wouldn't it be nice if we could have an up-to-date stable xen-sources package one day?).

You have four options:

Upgrade your kernel - this is the ideal solution but in an ideal world we all live forever and make too much money.

Disable sandbox - sandbox is intended to soften poorly written scripts. simply add -sandbox to your FEATURES variable. Not a big fan of this solution.

Replace touch with busybox's implementation - this is a neat trick but I have encountered problems using bb's touch in place of coreutils and the next time you update the symlink may get wiped out.

# rm /bin/touch && ln -s /bin/bb /bin/touch

Mask versions of coreutils newer than 8.5 - this is the ideologically correct way to take care of things if upgrading the kernel is not in your cards today.

# echo ">=sys-apps/coreutils-8.6" >> /etc/portage/package.mask

It's important that you remember to remove the mask once you do. Funnily enough, if you have already installed coreutils-8.6+ emerging 8.5 will fail due to the broken touch, in this case you may wish to temporarily use one of the other solutions to get it installed:

checking for struct utmpx.ut_exit.e_termination... yes
checking for struct utmp.ut_exit.e_termination... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible realloc... yes
checking for working re_compile_pattern... yes
checking whether rename honors trailing slash on destination... touch: setting times of `conftest.f': No such file or directory
configure: error: cannot create temporary files

!!! Please attach the following file when seeking support:
!!! /var/tmp/portage/sys-apps/coreutils-8.5/work/coreutils-8.5/config.log
 * ERROR: sys-apps/coreutils-8.5 failed (compile phase):
 *   econf failed
 * 
 * Call stack:
 *     ebuild.sh, line   56:  Called src_compile
 *   environment, line 2495:  Called econf '--with-packager=Gentoo' '--with-packager-version=8.5 (p1)' '--with-packager-bug-reports=http://bugs.gentoo.org/' '--enable-install-program=arch' '--enable-no-install-program=groups,hostname,kill,su,uptime' '--enable-largefile' '--disable-libcap' '--enable-nls' '--enable-acl' '--disable-xattr' '--without-gmp'
 *     ebuild.sh, line  557:  Called die
 * The specific snippet of code:
 *                      die "econf failed"
 * 
 * If you need support, post the output of 'emerge --info =sys-apps/coreutils-8.5',
 * the complete build log and the output of 'emerge -pqv =sys-apps/coreutils-8.5'.
 * The complete build log is located at '/var/tmp/portage/sys-apps/coreutils-8.5/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/sys-apps/coreutils-8.5/temp/environment'.
 * S: '/var/tmp/portage/sys-apps/coreutils-8.5/work/coreutils-8.5'

>>> Failed to emerge sys-apps/coreutils-8.5

Portage Errors: app-emulation/xen-tools NOT merged due to file collisions

karma

If you are updating your Xen installation from 3.x to 4.x you may encounter something like this:

>>> Installing (1 of 3) app-emulation/xen-tools-4.1.0-r1
 * This package will overwrite one or more files that may belong to other
 * packages (see list below). You can use a command such as `portageq
 * owners / ` to identify the installed package that owns a
 * file. If portageq reports that only one package owns a file then do
 * NOT file a bug report. A bug report is only useful if it identifies at
 * least two or more packages that are known to install the same file(s).
 * If a collision occurs and you can not explain where the file came from
 * then you should simply ignore the collision since there is not enough
 * information to determine if a real problem exists. Please do NOT file
 * a bug report at http://bugs.gentoo.org unless you report exactly which
 * two packages install the same file(s). Once again, please do NOT file
 * a bug report unless you have completely understood the above message.
 * 
 * Detected file collision(s):
 * 
 *      /usr/include/xen/COPYING
 *      /usr/include/xen/arch-ia64.h
 *      /usr/include/xen/arch-x86_32.h
 *      /usr/include/xen/arch-x86_64.h
 *      /usr/include/xen/callback.h
 *      /usr/include/xen/dom0_ops.h
 *      /usr/include/xen/domctl.h
 *      /usr/include/xen/elfnote.h
 *      /usr/include/xen/event_channel.h
 *      /usr/include/xen/features.h
 *      /usr/include/xen/grant_table.h
 *      /usr/include/xen/kexec.h
 *      /usr/include/xen/memory.h
 *      /usr/include/xen/nmi.h
 *      /usr/include/xen/physdev.h
 *      /usr/include/xen/platform.h
 *      /usr/include/xen/sched.h
 *      /usr/include/xen/sysctl.h
 *      /usr/include/xen/trace.h
 *      /usr/include/xen/vcpu.h
 *      /usr/include/xen/version.h
 *      /usr/include/xen/xen-compat.h
 *      /usr/include/xen/xen.h
 *      /usr/include/xen/xencomm.h
 *      /usr/include/xen/xenoprof.h
 *      /usr/include/xen/arch-x86/xen-x86_32.h
 *      /usr/include/xen/arch-x86/xen-x86_64.h
 *      /usr/include/xen/arch-x86/xen.h
 *      /usr/include/xen/foreign/ia64.h
 *      /usr/include/xen/foreign/x86_32.h
 *      /usr/include/xen/foreign/x86_64.h
 *      /usr/include/xen/hvm/e820.h
 *      /usr/include/xen/hvm/hvm_info_table.h
 *      /usr/include/xen/hvm/hvm_op.h
 *      /usr/include/xen/hvm/ioreq.h
 *      /usr/include/xen/hvm/params.h
 *      /usr/include/xen/hvm/save.h
 *      /usr/include/xen/io/blkif.h
 *      /usr/include/xen/io/console.h
 *      /usr/include/xen/io/fbif.h
 *      /usr/include/xen/io/kbdif.h
 *      /usr/include/xen/io/netif.h
 *      /usr/include/xen/io/pciif.h
 *      /usr/include/xen/io/protocols.h
 *      /usr/include/xen/io/ring.h
 *      /usr/include/xen/io/tpmif.h
 *      /usr/include/xen/io/xenbus.h
 *      /usr/include/xen/io/xs_wire.h
 *      /usr/include/xen/xsm/acm.h
 *      /usr/include/xen/xsm/acm_ops.h
 *      /usr/include/xen/xsm/flask_op.h
 * 
 * Searching all installed packages for file collisions...
 * 
 * Press Ctrl-C to Stop
 * 
 * app-emulation/xen-3.2.1
 *      /usr/include/xen/COPYING
 *      /usr/include/xen/arch-ia64.h
 *      /usr/include/xen/arch-x86_32.h
 *      /usr/include/xen/arch-x86_64.h
 *      /usr/include/xen/callback.h
 *      /usr/include/xen/dom0_ops.h
 *      /usr/include/xen/domctl.h
 *      /usr/include/xen/elfnote.h
 *      /usr/include/xen/event_channel.h
 *      /usr/include/xen/features.h
 *      /usr/include/xen/grant_table.h
 *      /usr/include/xen/kexec.h
 *      /usr/include/xen/memory.h
 *      /usr/include/xen/nmi.h
 *      /usr/include/xen/physdev.h
 *      /usr/include/xen/platform.h
 *      /usr/include/xen/sched.h
 *      /usr/include/xen/sysctl.h
 *      /usr/include/xen/trace.h
 *      /usr/include/xen/vcpu.h
 * 
 * Package 'app-emulation/xen-tools-4.1.0-r1' NOT merged due to file
 * collisions. If necessary, refer to your elog messages for the whole
 * content of the above message.

>>> Failed to install app-emulation/xen-tools-4.1.0-r1

This problem arises because the new version of xen-tools takes over installing some of the files the old version of xen used to:

# portageq owners / /usr/include/xen/COPYING
app-emulation/xen-3.2.1
        /usr/include/xen/COPYING

To fix, unmerge the old version of xen then emerge --update xen to install the new versions of the xen-tools and xen packages:

# emerge --unmerge xen
# emerge --update --deep --newuse xen

Portage Errors: app-emulation/xen-tools check_python FAILED

karma

You may run into something like this while updating or installing your Xen platform:

>>> Emerging (1 of 3) app-emulation/xen-tools-4.1.0-r1
* xen-4.1.0.tar.gz RMD160 SHA1 SHA256 size ;-) ...                                   [ ok ]
* Package:    app-emulation/xen-tools-4.1.0-r1
* Repository: gentoo
* Maintainer: [email protected]
* USE:        acm elibc_glibc flask kernel_linux pygrub userland_GNU x86
* FEATURES:   sandbox
>>> Unpacking source...
>>> Unpacking xen-4.1.0.tar.gz to /var/tmp/portage/app-emulation/xen-tools-4.1.0-r1/work
>>> Source unpacked in /var/tmp/portage/app-emulation/xen-tools-4.1.0-r1/work
>>> Preparing source in /var/tmp/portage/app-emulation/xen-tools-4.1.0-r1/work/xen-4.1.0 ...
* Applying xen-tools-3.4.0-network-bridge-broadcast.patch ...                        [ ok ]
* Applying xen-tools-3.3.0-nostrip.patch ...                                         [ ok ]
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/app-emulation/xen-tools-4.1.0-r1/work/xen-4.1.0 ...
>>> Source configured.
>>> Compiling source in /var/tmp/portage/app-emulation/xen-tools-4.1.0-r1/work/xen-4.1.0 ...
make -j2 -C tools
make: Entering directory `/var/tmp/portage/app-emulation/xen-tools-4.1.0-r1/work/xen-4.1.0/tools'
make[1]: Entering directory `/var/tmp/portage/app-emulation/xen-tools-4.1.0-r1/work/xen-4.1.0/tools'
make -C check all
make[2]: Entering directory `/var/tmp/portage/app-emulation/xen-tools-4.1.0-r1/work/xen-4.1.0/tools/check'
PYTHON=python LIBXENAPI_BINDINGS=n ACM_SECURITY=y ./chk build
Xen CHECK-BUILD  Mon Apr 11 16:19:03 EDT 2011
Checking check_crypto_lib: OK
Checking check_curl: unused, OK
Checking check_openssl_devel: OK
Checking check_python:
*** check_python FAILED: need python version >= 2.2
Checking check_python_devel: OK
Checking check_uuid_devel: OK
Checking check_xgettext: OK
Checking check_xml2: OK
Checking check_zlib_devel: OK
Checking check_zlib_lib: OK
make[2]: *** [check-build] Error 1
make[2]: Leaving directory `/var/tmp/portage/app-emulation/xen-tools-4.1.0-r1/work/xen-4.1.0/tools/check'
make[1]: *** [subdir-all-check] Error 2
make[1]: Leaving directory `/var/tmp/portage/app-emulation/xen-tools-4.1.0-r1/work/xen-4.1.0/tools'
make: *** [subdirs-all] Error 2
make: Leaving directory `/var/tmp/portage/app-emulation/xen-tools-4.1.0-r1/work/xen-4.1.0/tools'
emake failed
* ERROR: app-emulation/xen-tools-4.1.0-r1 failed (compile phase):
*   compile failed
*
* Call stack:
*     ebuild.sh, line  56:  Called src_compile
*   environment, line 4879:  Called die
* The specific snippet of code:
*       emake -C tools ${myopt} || die "compile failed";
*
* If you need support, post the output of 'emerge --info =app-emulation/xen-tools-4.1.0-r1',
* the complete build log and the output of 'emerge -pqv =app-emulation/xen-tools-4.1.0-r1'.
* The complete build log is located at '/var/tmp/portage/app-emulation/xen-tools-4.1.0-r1/temp/build.log'.
* The ebuild environment file is located at '/var/tmp/portage/app-emulation/xen-tools-4.1.0-r1/temp/environment'.
* S: '/var/tmp/portage/app-emulation/xen-tools-4.1.0-r1/work/xen-4.1.0'
 
>>> Failed to emerge app-emulation/xen-tools-4.1.0-r1, Log file:
 
>>>  '/var/tmp/portage/app-emulation/xen-tools-4.1.0-r1/temp/build.log'
 
* Messages for package app-emulation/xen-tools-4.1.0-r1:
 
* ERROR: app-emulation/xen-tools-4.1.0-r1 failed (compile phase):
*   compile failed
*
* Call stack:
*     ebuild.sh, line  56:  Called src_compile
*   environment, line 4879:  Called die
* The specific snippet of code:
*       emake -C tools ${myopt} || die "compile failed";
*
* If you need support, post the output of 'emerge --info =app-emulation/xen-tools-4.1.0-r1',
* the complete build log and the output of 'emerge -pqv =app-emulation/xen-tools-4.1.0-r1'.
* The complete build log is located at '/var/tmp/portage/app-emulation/xen-tools-4.1.0-r1/temp/build.log'.
* The ebuild environment file is located at '/var/tmp/portage/app-emulation/xen-tools-4.1.0-r1/temp/environment'.
* S: '/var/tmp/portage/app-emulation/xen-tools-4.1.0-r1/work/xen-4.1.0'

The problem is due to Xen's check-build not recognizing your Python 3x installation as "greater than or equal to 2.2." You can resolve this by temporarily switching your Python profile:

# eselect python list
Available Python interpreters:
  [1]   python2.4
  [2]   python2.5
  [3]   python2.6
  [4]   python3.1 *
# eselect python set 3

It might be advisable to run python-updater and any other updates you have before compiling xen-tools with python2x; once you switch back to the latest version of python xen-tools will be picked up by python-updater and fail to compile.

For more information please see my bug report at http://bugs.gentoo.org/show_bug.cgi?id=363299

Portage Errors: groupadd: invalid option -- 'r'

karma

You may encounter this error when installing packages that manage system groups if your installed version of shadow is older than version 4.1.4.2-r4:

>>> Installing (1 of 27) net-misc/dhcp-3.1.2_p1
 * Adding group 'dhcp' to your system ...
 *  - Groupid: next available
groupadd: invalid option -- 'r'
Usage: groupadd [options] GROUP

Options:
  -f, --force                   force exit with success status if the specified
                                group already exists
  -g, --gid GID                 use GID for the new group
  -h, --help                    display this help message and exit
  -K, --key KEY=VALUE           overrides /etc/login.defs defaults
  -o, --non-unique              allow create group with duplicate
                                (non-unique) GID

To fix, update shadow before continuing with your installation or upgrade:

# emerge --update shadow

Depending on the state of your system this may also update your PAM installation. It might be a good idea to run etc-update before moving on.

Fun with Vapour Part One: "Health E-Cigarette" Electronic Cigarette

karma

I wondered for a while if this topic would be best suited here but eventually concluded that electronic cigarettes are a clever way to hack smoking ;)

The electronic cigarette fad appeals to me on many levels, but foremost because I believe it is a perfect expression of a technologically advanced society applying just a modicum of its potential and common sense to conquer a problem that has gone needlessly unsolved for a very long time. It has long been known that cigarette addiction has more components than nicotine. Cessation tools like patches and gums have a failure rate somewhere on the order of 90% because they do not address the physical conditioning aspect. Part of the habit involves the weight of the cigarette in the fingers, the sensation of it on the lips and the smell taste and temperature of the gasses inhaled. Tactics like sucking on a lollipop rely on an oversimplified model of the problem while electronic cigarettes promise to provide a reasonably believable smoking experience whilst delivering adjustable amounts of nicotine - minus the myriad combustion products produced by a real cigarette.

The nicotine suspension or "e-juice" has three components: a food-safe glycerol base, food-safe flavouring and optionally a nicotine dose. The solution is vaporised on a battery-powered heating element so these chemicals are absorbed directly by the lungs without any combustion to alter them. The FDA and Health Canada have advised that electronic cigarettes are not safe and should be avoided and this has lead to a lot of conspiracy theorizing. When you consider that China has an awful reputation for exporting products containing heavy metals I find it becomes easy to understand their rationale. Nontheless, it is my humble opinion that something with the kind of potential that e-cigs have should be fast-tracked to federal testing - Health Canada would have a much more budgetary room to breathe if thousands of smokers didn't require treatment each year.

I have been a smoker since the age of 15 and I have never tried to quit. I really enjoy smoking; I like the way it feels, I like the way it looks and I like the way it tastes. Despite this, by most standards I'm a light smoker. I only smoke around half a pack of king size lights a day and tend to chip them half way to finish later. I am not explicitly setting out to quit smoking by switching to electronic cigarettes but I think it would be wonderful if that was the end result. I don't want to give up "smoking" in some form and I am hopeful e-cigs can give me that without the lung problems. This will be the first in a series of articles where I review the products I buy in the course of my adventure and share tips I have found helpful.

First up, the Health E-Cigarette:

This single cigarette kit cost $15.00USD including shipping on eBay. It took just over a month to arrive from Hong Kong, which is unusual as I'm used to seeing packages from the pacific rim in 2-3 weeks. I think eBay has some sort of restriction on selling e-cigs because most listings seem to be sporadic and end up user-deleted before their natural expiration.  This was actually the "backup" kit I had ordered; something in the back of my head told me there would be a problem with the one I wanted being delivered so I ordered this cheap one off of eBay the next day and sure enough I had to cancel my first oder due to incompetence. I was disappointed to find the cartridges that were included had no nicotine (and evidently no flavour though there is a mild off-cocnutty taste to them). Even if the vapour got me off these would never do it for me psychologically.

On the bright side, the included atomizer uses the angled "steel wool" sort of element which folks across the board indicate is better for "dipping" or "dripping" (applying e-juice directly to the element for more full-bodied hits) because it protrudes. I was expecting the cartridges to be composed of saturated foam but to my surprise they came in the form of plastic capsules with aluminum foil covering one end. I'm not particularly fond of this idea since the heating element is used to puncture the foil of the cartridge and as I understand it atomizers tend to break often. I also see these being a pain in the ass to refill for the same reason they tend to unload all of their juice if the cartridge is removed: a reliance on the "seal" made by the heating element pressed against the burst foil.

I'm not impressed with the amount of vapour this model produces. Interestingly, the atomizer has two holes and this video suggests covering one for better vapour production:

If there has been an increase on this unit the improvement has been minimal enough as to be intangible. Full disclosure: cutie in the vid sells these things.

In summary, I'm not very happy with my new e-cig on first impressions but I want to withhold judgement until I get some flavoured and nicotine-containing juice, which will hopefully make the vapour feel more full-bodied. This isn't the model I wanted to get anyway and I'm not completely put off; I'll be shopping around some more and plan to make my next purchase soon.