--- ibmasm-utils-3.0.orig/debian/ibmasm-utils.prerm +++ ibmasm-utils-3.0/debian/ibmasm-utils.prerm @@ -0,0 +1,13 @@ +#!/bin/sh + +if [ -x /etc/init.d/ibmasm ]; then + if [ -x /usr/sbin/invoke-rc.d ]; then + invoke-rc.d --quiet ibmasm stop + else + /etc/init.d/ibmasm stop + fi +fi + +#DEBHELPER# + +exit 0 --- ibmasm-utils-3.0.orig/debian/docs +++ ibmasm-utils-3.0/debian/docs @@ -0,0 +1 @@ +src/README --- ibmasm-utils-3.0.orig/debian/compat +++ ibmasm-utils-3.0/debian/compat @@ -0,0 +1 @@ +5 --- ibmasm-utils-3.0.orig/debian/ibmasm-utils.ibmasm.init +++ ibmasm-utils-3.0/debian/ibmasm-utils.ibmasm.init @@ -0,0 +1,75 @@ +#! /bin/bash +### BEGIN INIT INFO +# Provides: ibmasm +# Required-Start: $network $local_fs $remote_fs +# Required-Stop: +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Start/Stop ibmasm driver. +### END INIT INFO + + +# Source function library. +. /lib/lsb/init-functions + +RETVAL=0 +prog=ibmsphalt +pidfile="/var/run/ibmsphalt.pid" +lockfile="/var/lock/subsys/ibmasm" + +start() { + # Make sure the module (ibmasm) is loaded and its fs is exported. + if grep -v -q ibmasmfs /proc/filesystems; then + modprobe ibmasm || exit 1 + fi + + log_action_msg "Waiting for ibmasm device to appear (2 seconds timeout)" + TIMEOUT=2 + for ((i=0; i<$TIMEOUT; i++)); do + DEVICE=`/usr/bin/evnode -n "ibmasm RSA I remote mouse"` + if [ ! -z $DEVICE ]; then + TIMEOUT="ok" + break; + fi + echo -n ". " + sleep 1 + done + # Check the timeout. If not changed, then no device found. + if [ $TIMEOUT == "10" ]; then + log_action_msg "No device detected. Aborted." + return 1 + fi +} + +stop() { + echo -n $"Stopping ibmasm: " + /sbin/ibmspdown && rm -f /var/log/subsys/ibmasm +} + + +restart() { + stop + start +} + +case "$1" in + start) + start + ;; + stop) + stop + ;; + reload|restart|force-reload) + restart + ;; + status) + status $prog + RETVAL=$? + ;; + condrestart) + [ -f $lockfile ] && restart || : + ;; + *) + echo $"Usage: $0 {start|stop|status|restart|force-reload|condrestart}" + exit 1 +esac --- ibmasm-utils-3.0.orig/debian/copyright +++ ibmasm-utils-3.0/debian/copyright @@ -0,0 +1,28 @@ +This package was debianized by Chuck Short on +Tue, 29 Jan 2008 11:04:25 -0500. + +It was downloaded from + +Upstream Authors are Max Asbck and Vernon Mauery + +Copyright is: + +Copyright (C) IBM Corporation, 2005 + +License: + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + +The Debian packaging is (C) 2008, Chuck Short and +is licensed under the GPL, see `/usr/share/common-licenses/GPL'. --- ibmasm-utils-3.0.orig/debian/ibmasm-utils.postinst +++ ibmasm-utils-3.0/debian/ibmasm-utils.postinst @@ -0,0 +1,27 @@ +#!/bin/sh + +set -e + +case "$1" in +configure) + ldconfig + ;; +abort-upgrade|abort-remove|abort-deconfigure) + ;; + +*) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + + if [ -x /usr/sbin/invoke-rc.d ]; then + invoke-rc.d --quiet ibmasm start || true + else + /etc/init.d/ibmasm start || true + fi + + +#DEBHELPER# + +exit 0 --- ibmasm-utils-3.0.orig/debian/ibmasm-utils.lintian +++ ibmasm-utils-3.0/debian/ibmasm-utils.lintian @@ -0,0 +1,5 @@ +ibmasm-utils: binary-without-manpage usr/bin/evnode +ibmasm-utils: binary-without-manpage sbin/ibmspdown +ibmasm-utils: binary-without-manpage sbin/ibmsphalt +ibmasm-utils: binary-without-manpage sbin/ibmspup +ibmasm-utils: no-shlibs-control-file usr/lib/libsysSp.so.3.0 --- ibmasm-utils-3.0.orig/debian/rules +++ ibmasm-utils-3.0/debian/rules @@ -0,0 +1,72 @@ +#!/usr/bin/make -f + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +BUILD_DIR = debian/build + +srcfiles := $(filter-out debian, $(wildcard * .[^.]*)) +configure: configure-stamp +configure-stamp: + dh_testdir + # Add here commands to configure the package. + mkdir -p $(BUILD_DIR)/source + cp -a $(srcfiles) $(BUILD_DIR)/source + touch configure-stamp + + +build: build-stamp + +build-stamp: configure-stamp + dh_testdir + + # Add here commands to compile the package. + $(MAKE) -C $(BUILD_DIR)/source/src + touch $@ + +clean: + dh_testdir + dh_testroot + rm -rf $(BUILD_DIR) + rm -f build-stamp configure-stamp + + # Add here commands to clean up after the build process. + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + # Add here commands to install the package into debian/ibmasm-utils. + $(MAKE) -C $(BUILD_DIR)/source/src ROOT=$(CURDIR)/debian/ibmasm-utils install + mkdir -p $(CURDIR)/debian/ibmasm-utils/usr/lib + install -m 644 $(BUILD_DIR)/source/src/api/libsysSp.so.3.0 $(CURDIR)/debian/ibmasm-utils/usr/lib + install -D -m 644 debian/ibmasm-utils.lintian $(CURDIR)/debian/ibmasm-utils/usr/share/lintian/overrides/ibmasm-utils + +# Build architecture-independent files here. +binary-indep: build install +# We have nothing to do by default. + +# Build architecture-dependent files here. +binary-arch: build install + dh_testdir + dh_testroot + dh_installchangelogs + dh_installdocs + dh_installexamples + dh_installinit --name ibmasm -- defaults 20 21 + dh_installman + dh_link + dh_strip + dh_compress + dh_fixperms + dh_installdeb + dh_shlibdeps -a + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install configure --- ibmasm-utils-3.0.orig/debian/ibmasm-utils.postrm +++ ibmasm-utils-3.0/debian/ibmasm-utils.postrm @@ -0,0 +1,22 @@ +#!/bin/bash + +set -e + +case "$1" in + remove) + ldconfig + update-rc.d ibmasm remove >/dev/null || true + ;; + + purge|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) + ;; + + *) + echo "postrm called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +#DEBHELPER# + +exit 0 --- ibmasm-utils-3.0.orig/debian/control +++ ibmasm-utils-3.0/debian/control @@ -0,0 +1,14 @@ +Source: ibmasm-utils +Section: admin +Priority: extra +Maintainer: Chuck Short +Build-Depends: debhelper (>= 5) +Standards-Version: 3.7.3 + +Package: ibmasm-utils +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Conflicts: ibmasm +Description: IBM Advanced System Management Drivers + This package contains the tools necessary to set up the IBM + Advanced System Management Drives. --- ibmasm-utils-3.0.orig/debian/dirs +++ ibmasm-utils-3.0/debian/dirs @@ -0,0 +1 @@ +usr/bin --- ibmasm-utils-3.0.orig/debian/changelog +++ ibmasm-utils-3.0/debian/changelog @@ -0,0 +1,58 @@ +ibmasm-utils (3.0-1ubuntu9) lucid; urgency=low + + * rebuild rest of main for armel armv7/thumb2 optimization; + UbuntuSpec:mobile-lucid-arm-gcc-v7-thumb2 + + -- Alexander Sack Fri, 05 Mar 2010 04:36:20 +0100 + +ibmasm-utils (3.0-1ubuntu8) karmic; urgency=low + + * No-change rebuild to gain FORTIFY defaults. + + -- Kees Cook Sat, 09 May 2009 10:20:33 -0700 + +ibmasm-utils (3.0-1ubuntu7) hardy; urgency=low + + * debian/ibmasm-utils.ibmasm.init. + - Fix init script. (LP: #214456) + + -- Chuck Short Thu, 10 Apr 2008 08:25:51 -0400 + +ibmasm-utils (3.0-1ubuntu6) hardy; urgency=low + + * Conflict on ibmasm. (LP: #214456) + + -- Chuck Short Wed, 09 Apr 2008 13:40:25 -0400 + +ibmasm-utils (3.0-1ubuntu5) hardy; urgency=low + + * + + -- Chuck Short Wed, 09 Apr 2008 13:33:56 -0400 + +ibmasm-utils (3.0-1ubuntu4) hardy; urgency=low + + * Cleaned up debian/rules file. + + -- Chuck Short Wed, 02 Apr 2008 07:40:59 -0400 + +ibmasm-utils (3.0-1ubuntu3) hardy; urgency=low + + * Made nearly linitan clean. + * Improved build infrastructure. + * Added sonames. + + -- Chuck Short Fri, 14 Mar 2008 10:34:09 -0400 + +ibmasm-utils (3.0-1ubuntu2) hardy; urgency=low + + * Added init script to start ibmasm at boot. + + -- Chuck Short Fri, 01 Feb 2008 14:04:10 -0500 + +ibmasm-utils (3.0-1ubuntu1) hardy; urgency=low + + * Initial release. + + -- Chuck Short Tue, 29 Jan 2008 11:04:25 -0500 + --- ibmasm-utils-3.0.orig/src/Makefile +++ ibmasm-utils-3.0/src/Makefile @@ -7,6 +7,5 @@ cd init; $(MAKE) install: - cd api; $(MAKE) install cd bin; $(MAKE) install cd init; $(MAKE) install --- ibmasm-utils-3.0.orig/src/api/Makefile +++ ibmasm-utils-3.0/src/api/Makefile @@ -2,17 +2,19 @@ api_object = libibmasm.o api_lib = libsysSp.so -CFLAGS = -g -Wall -fPIC +CFLAGS = -g -Wall -fPIC -fno-stack-protector all: $(api_lib) install: install -d $(ROOT)/$(_LIB) - install $(api_lib) $(ROOT)/$(_LIB) - + install $(api_lib).$(VERSION) $(ROOT)/$(_LIB)/$(api_lib).$(VERSION) + (cd $(ROOT)/$(_LIB); ln -s $(api_lib).$(VERSION) $(api_lib)) + $(api_lib): $(api_object) - $(LD) -shared -soname,libsysSp.so -o $@ $(api_object) + $(CC) $(CFLAGS) $(LDFLAGS) -shared -fPIC -Wl,-soname,$(api_lib).3.0 -o $(api_lib).3.0 $? + ln -s $(api_lib).3.0 $(api_lib) clean: rm -f $(api_object) --- ibmasm-utils-3.0.orig/src/bin/halt/ibmsphalt.c +++ ibmasm-utils-3.0/src/bin/halt/ibmsphalt.c @@ -27,6 +27,7 @@ #include #include +#include #define N_IGNORE 13 static unsigned char *ignore[N_IGNORE] = { --- ibmasm-utils-3.0.orig/src/init/ibmspup +++ ibmasm-utils-3.0/src/init/ibmspup @@ -1,6 +1,6 @@ #!/bin/bash -if ps -e | grep -qe "X\|kdm"; then +if ps -e | grep -qe "X\|kdm\|gdm"; then echo "X must not be running while loading the ibmasm driver" echo "Kill X and try again." exit 1 @@ -20,7 +20,7 @@ done echo DEVICE=`evnode -n "ibmasm RSA I remote mouse"` -XCONFIG="/etc/X11/XF86Config" +XCONFIG="/etc/X11/xorg.conf" if [ -e $XCONFIG ]; then TMPFILE=`mktemp /tmp/ibmspupX.XXXXXXXXXX` || exit 1 AWKFILE=`mktemp /tmp/ibmspupAWK.XXXXXXXXXX` || exit 1 --- ibmasm-utils-3.0.orig/src/init/ibmspdown +++ ibmasm-utils-3.0/src/init/ibmspdown @@ -1,6 +1,6 @@ #!/bin/bash -/sbin/killproc /sbin/ibmsphalt +/usr/bin/killall /sbin/ibmsphalt /bin/umount /var/lib/ibmasm 2>/dev/null /sbin/modprobe -q -r ibmasm