Package: debirf Version: 0.34 Severity: normal Dear Maintainer,
Installing gpm in a debirf instance results in an error : $ debirf make minimal [ ... ] $ debirf enter minimal # apt-get update # apt-get install gpm [ ... ] Unpacking gpm (1.20.4-6.1) ... E: Sub-process /usr/bin/dpkg returned an error code (1) The postinst script tries to set up a link under /dev (lines 51-55 - gpm version 1.20.4-6.1) : if [ -n "$repeat_type" ] && [ "$repeat_type" != "none" ]; then ln -s gpmdata /dev/mouse else ln -s ${device#/dev/} /dev/mouse fi It fails because of insufficient permissions to write in /dev on the build machine (#686881 is similar in trying to make directories under /dev) This error doesn't occur if I make use of a wrapper as ln_in_dev.sh below : $ export FAKECHROOT_CMD_SUBST=/bin/ln=$(readlink -f ln_in_dev.sh) $ debirf enter minimal # apt-get install gpm [ ... ] Setting up gpm (1.20.4-6.1) ... Creating config file /etc/gpm.conf with new version open: No such file or directory ioctl: Bad file descriptor [ ok ] Stopping mouse interface server: gpm. [....] Starting mouse interface server: gpm/etc/init.d/gpm: 66: /etc/init.d/gpm: cannot open /dev/input/mice: No such file invoke-rc.d: initscript gpm, action "restart" failed. dpkg: error processing package gpm (--configure): subprocess installed post-installation script returned error exit status 2 E: Sub-process /usr/bin/dpkg returned an error code (1) The second error occurs when gpm is started (on the build machine !) by the postinst script (lines 90-94) : db_get gpm/restart if [ "$RET" = true ] || /usr/lib/gpm/gpm_has_mouse_control; then # Note, yes, this is restart, its ment to be.. invoke-rc.d gpm restart fi We may disable /usr/lib/gpm/gpm_has_mouse_control : $ export FAKECHROOT_CMD_SUBST="${FAKECHROOT_CMD_SUBST:+${FAKECHROOT_CMD_SUBST}:}/usr/lib/gpm/gpm_has_mouse_control=/bin/false" (Or we may solve #754470. But gpm_has_mouse_control triggers a message anyway : open: No such file or directory ioctl: Bad file descriptor ) Regards, JH Chatenet File ln_in_dev.sh : ----------8<-------------------8<-------------------- #!/bin/bash # ln # # Wrapper for /bin/ln. # Write in /dev outside of fakechroot environment. # May be needed to install gpm. fakechroot_wrapper_base="$FAKECHROOT_BASE_ORIG" # is /dev an excluded path ? dev_is_excluded=` IFS=: for target_d in $FAKECHROOT_EXCLUDE_PATH; do if [ "$target_d" = "/dev" ]; then echo "1" exit fi done echo "0" ` # link name make_replacement() { filename="$1" # is it a relative path ? if [ "${filename#/}" = "$filename" ]; then absfilename=$(readlink -m "$filename") filename="$absfilename" fi # is a symlink to be created in /dev ? if [ "$filename" = "/dev" -o "${filename#/dev/}" != "$filename" ]; then replacement="${fakechroot_wrapper_base}${filename}" fi } # walk through command line arguments is_replacement_needed() { is_symbolic=0 ln_arg_nr=0 # parse options while [ $# -gt 0 ]; do ln_arg_nr=$(($ln_arg_nr + 1)) case "$1" in -s|--symbolic) is_symbolic=1 shift ;; -t|--target-directory) fourth_form=1 make_replacement "$2" if [ -n "$replacement" ]; then replacement_nr=$(($ln_arg_nr + 1)) fi shift 2 ;; --target-directory=*) fourth_form=1 make_replacement "${1#--target-directory=}" if [ -n "$replacement" -a -z "$replacement_nr" ]; then replacement_nr=$ln_arg_nr replacement="--target-directory=$replacement" fi shift ;; --) shift break ;; -*) shift ;; *) break ;; esac done if [ "$is_symbolic" = "0" ]; then replacement= replacement_nr= return elif [ "$fourth_form" = "1" ]; then # fourth syntactical form in the man page return elif [ $# -eq 1 ]; then # second syntactical form in the man page make_replacement "." if [ -n "$replacement" ]; then replacement_nr=$(($ln_arg_nr + 1)) fi else # first or third syntactical form in the man page ln_arg_nr=$(($ln_arg_nr + $# - 1)) shift $(($# - 1 )) make_replacement "$1" if [ -n "$replacement" ]; then replacement_nr=$ln_arg_nr fi fi } # calculate a replacement of destination if [ $dev_is_excluded -eq 1 ]; then is_replacement_needed "$@" fi # set up the link if [ -n "$replacement_nr" ]; then ln "${@:1:$(($replacement_nr - 1))}" "$replacement" "${@:$(($replacement_nr + 1))}" else env -u FAKECHROOT_BASE_ORIG FAKECHROOT_BASE="$fakechroot_wrapper_base" ln "$@" fi ----------8<-------------------8<-------------------- -- System Information: Debian Release: jessie/sid APT prefers testing APT policy: (500, 'testing') Architecture: amd64 (x86_64) Kernel: Linux 3.2.0-4-amd64 (SMP w/2 CPU cores) Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968) Shell: /bin/sh linked to /bin/dash Versions of packages debirf depends on: ii apt 1.0.9.2 ii cpio 2.11+dfsg-2 ii debootstrap 1.0.63 ii fakechroot 2.17.2-1 ii fakeroot 1.20.1-1.1 ii klibc-utils 2.0.4-1.1 Versions of packages debirf recommends: ii grub-common 2.00-22 ii lsb-release 4.1+Debian13 ii xorriso 1.3.2-1.1 debirf suggests no packages. -- no debconf information -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org