Bug#730702: flashybrid: Init script is loaded too late, prevents flashybrid from working

2013-11-28 Thread Thibaut VARENE
Package: flashybrid
Version: 0.17
Severity: normal
Tags: patch

Flashybrid init script is loaded too late in the boot process, rendering
the service unable to work since the underlying filesystem is already "busy"
(with files open for writing) at the time flashybrid tries to run.

Attached is a modified init script that starts in the "S" runlevel, as early
as possible in the boot process and fixes this issue.

I've also taken the liberty to quickly update the script to lsb functions.

HTH

T-Bone

-- System Information:
Debian Release: 7.2
Architecture: armhf (armv6l)

Kernel: Linux 3.6.11+ (PREEMPT)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/dash

Versions of packages flashybrid depends on:
ii  debconf [debconf-2.0]  1.5.49
ii  rsync  3.0.9-4

flashybrid recommends no packages.

flashybrid suggests no packages.

-- Configuration Files:
/etc/flashybrid/config changed [not included]
/etc/flashybrid/ramstore changed [not included]
/etc/flashybrid/ramtmp changed [not included]
/etc/init.d/flashybrid changed [included]

-- debconf information:
* flashybrid/remove:
#!/bin/sh

# Set up/shutdown the flashybrid system, including the ramdisk and partial
# directory bind mounts. This needs to run at the part of system bootup that
# mounts all the disks. It should also run at shutdown right before
# filesystems are unmounted.

# Licensed under the terms of GPL v2
#  Diego Iastrubni  2006
#  Joey Hess  2002-2006


### BEGIN INIT INFO
# Provides:  flashybrid
# Required-Start:$local_fs
# Required-Stop: $local_fs
# Should-Start:  
# Should-Stop:   
# Default-Start: S
# Default-Stop:  0 1 6
# X-Start-Before:$network
# X-Stop-Before: $network
# Short-Description: automates use of a flash disk as the root filesystem
# Description:   Flashybrid is a system to help in setting up and managing hybrid
#flash/disk/ram based Debian systems which can run most of the time
#using only a small flash disk for their root filesystem and do a useful,
#but limited task (such as being a router, or a PDA, or a rescue system
#on a USB keydrive). The flash can be as small as 32 mb, though 64 to 256
#mb is more comfortable.
### END INIT INFO

. /lib/lsb/init-functions

CONFDIR=/etc/flashybrid
if [ -e $CONFDIR/config ]; then
	. $CONFDIR/config
fi

ENABLED=no
if [ -e /etc/default/flashybrid ]; then
	. /etc/default/flashybrid
fi

if [ -z "$RAMMOUNT" ]; then
	exit 0
fi

is_mounted () {
	grep -q " $1 " /proc/mounts
}

case "$1" in
start)
	if [ "$ENABLED" != yes ]; then
		log_warning_msg "Not setting up flashybrid system: disabled."
		exit
	fi
	
	if [ ! -d "$RAMMOUNT" ] ; then
		log_failure_msg "Error, RAMMOUNT directory is not found ($RAMMOUNT)"
		exit 1
	fi
	
	log_daemon_msg "Setting up flashybrid system for"
		
	EXTRA_PARAMS=""
	
	if [ "xx$FLASH_MAX" != "xx" ]; then
	EXTRA_PARAMS=" -o size=$FLASH_MAX "
	fi
			
	# Set up ram disk to hold variable data.
	if ! is_mounted $RAMMOUNT; then
		mount tmpfs -t tmpfs $RAMMOUNT $EXTRA_PARAMS
	fi

	# Temporary directories on ram disk.
	cp $CONFDIR/ramtmp $RAMMOUNT/.fh-config-ramtmp
	for dir in $(grep -v '^#' $CONFDIR/ramtmp); do
		if [ -d $dir ]; then
		mkdir -p -m 1777 $RAMMOUNT/$dir
			if is_mounted $dir; then
umount $dir
			fi
			mount --bind $RAMMOUNT/$dir $dir
		fi
	done

	# when syncing we will use this configuration for restoring,
	# as the user may modify the configuration on the disk, and completely
	# mess up the system, eventually making his machine unusable
	cp $CONFDIR/ramstore $RAMMOUNT/.fh-config-ramstore
	
	# Copy data from flash to ram disk for these directories
	for dir in $(grep -v '^#' $CONFDIR/ramstore); do
		# Skip dirs that are not present.
		if [ -d $dir ]; then
			if [ "$VERBOSE" = yes ]; then
			log_progress_msg "$dir"
			fi
			
			ramdir=$RAMMOUNT$dir
			if is_mounted $dir; then
umount $dir
			fi
			
			if is_mounted $ramdir.flash; then
umount $ramdir.flash
			fi
			
			if [ ! -d $ramdir ]; then
mkdir -p ${ramdir%/*} # dirname
			cp -a $dir $ramdir
			fi			
			mkdir -p $ramdir.flash
			mount --bind $dir $ramdir.flash
			mount --bind $ramdir $dir
		fi
	done

	log_end_msg 0
	mountro
	;;

stop)
	if [ "$ENABLED" != yes ]; then
		log_warning_msg "Not shutting down flashybrid system: disabled."
		exit
	fi
	
	fh-sync
	mountrw
	;;

reload)
	echo "This target is available only for compatibility."
	echo "Gracefully exiting"
	;;

restart)
	echo "This target is available only for compatibility, and usually will fail to work"
	echo "If you really want to restart this service please try 'force-reload'."
	echo 
	echo "Gracefully exiting"
	;;

force-reload)
	$0 stop
	$0 start
	;;

*)
	echo "Usage: $0 {start|stop|restart|force-reload}"
	exit 1
;;
esac


Bug#730748: phoronix-test-suite: this package fails to show

2013-11-28 Thread Hughe Chung
Package: phoronix-test-suite
Version: v3.8.0
Severity: important
Tags: upstream

Dear Maintainer,
*** Please consider answering these questions, where appropriate ***

   * What led up to the situation?
   Running phoronix-test-suite in bash produces only the following error 
message and hangs.
   $ phoronix-test-suite list-tests

  [NOTICE] Array to string conversion in pts_client.php:1335

   Phoronix Test Suite v3.8.0
   Available Tests

   
   * What exactly did you do (or not do) that was effective (or
 ineffective)?
   I removed the pacakge.
   * What was the outcome of this action?
   * What outcome did you expect instead?

*** End of the template - remove these lines ***



-- System Information:
Debian Release: 7.2
  APT prefers stable
  APT policy: (1001, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 3.11-9.dmz.1-liquorix-amd64 (SMP w/6 CPU cores; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages phoronix-test-suite depends on:
pn  php5-cli  
pn  php5-gd   

phoronix-test-suite recommends no packages.

phoronix-test-suite suggests no packages.


-- 
To UNSUBSCRIBE, email to debian-qa-packages-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20131129030734.3817.88454.reportbug@theblue



Bug#730750: phoronix-test-suite: It asks extra packags during run-time.

2013-11-28 Thread Hughe Chung
Package: phoronix-test-suite
Version: 3.8.0-1
Severity: normal
Tags: upstream

Dear Maintainer,
*** Please consider answering these questions, where appropriate ***

   * What led up to the situation?
   * What exactly did you do (or not do) that was effective (or
 ineffective)?
   * What was the outcome of this action?
   * What outcome did you expect instead?

*** End of the template - remove these lines ***

To run a test, it needs to install additional data file.
The following command probably download the data file and related packages for
the test.
$ phoronix-test-suite install universe

Here is output result of above command.

[NOTICE] Array to string conversion in pts_client.php:1320

[NOTICE] Array to string conversion in pts_client.php:1320

[NOTICE] Array to string conversion in pts_client.php:1320

[NOTICE] Array to string conversion in pts_client.php:1320

[NOTICE] Array to string conversion in pts_client.php:1335

[NOTICE] Array to string conversion in pts_client.php:1335

[NOTICE] Array to string conversion in pts_client.php:1335
pts/ppracer-1.1.1 is not supported on this architecture: x86_64

The following dependencies are needed and will be installed: 

- ia32-libs
- libgtk2.0-dev
- libsdl1.2-dev
- libsdl-gfx1.2-dev
- libsdl-net1.2-dev
- libsdl-image1.2-dev
- libsdl-ttf2.0-dev
- freeglut3-dev
- libportaudio-dev
- gfortran
- libglew1.5-dev
- libfreeimage3
- libfreeimage-dev
- libjpeg62-dev
- libaio-dev
- perl
- perl-base
- perl-modules
- libsdl-perl
- libperl-dev
- libstdc++5
- libopenal-dev
- libvorbis-dev
- jam
- jam
- libqt4-dev
- libqt4-opengl-dev
- libpopt-dev
- libnuma-dev
- libfftw3-dev
- libblas-dev
- liblapack-dev
- libopenmpi-dev
- openmpi-bin
- cmake
- libboost-all-dev
- libasio-dev
- libbz2-dev

This process may take several minutes.
Password: 

=== End of output dump ===

trakcing the processes from start to finish

=== output dump ===
18539 pts/1S+ 0:00 /bin/sh /usr/bin/phoronix-test-suite install
universe
18541 pts/1S+ 0:00 php5 pts-core/phoronix-test-suite.php install
universe
18664 pts/0R+ 0:00 ps ax
26864 pts/0T  0:00 /bin/sh /usr/bin/phoronix-test-suite list-tests
26866 pts/0T  0:00 php5 pts-core/phoronix-test-suite.php list-tests
=== output end ===

I think phoronix-test-suite package itself installed properly. The real problem
is that it requires additional packages and data file for testing the system. 


-- System Information:
Debian Release: 7.2
  APT prefers stable
  APT policy: (1001, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 3.11-9.dmz.1-liquorix-amd64 (SMP w/6 CPU cores; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages phoronix-test-suite depends on:
ii  php5-cli  5.4.4-14+deb7u5
ii  php5-gd   5.4.4-14+deb7u5

phoronix-test-suite recommends no packages.

phoronix-test-suite suggests no packages.

-- no debconf information


-- 
To UNSUBSCRIBE, email to debian-qa-packages-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20131129035754.19034.69465.reportbug@theblue