Xsane: remove run-as-root warning

Xsane has a running-as-root warning dialog at startup. I have always removed that from the source and created a PET.

However, now the official Xsane package of the compatible-distro (ex: Ubuntu repos in case of Precise Puppy) can be used.
If the official package is chosen to be builtin with Woof, the file FIXUPHACK in the xsane template will modify the xsane binary executable. If the user uses the Puppy Package Manager to install an official Xsane package in a running Puppy, the script /usr/local/petget/hacks-postinstall.sh will remove the warning.

Here is the relevant portion in hacks-postinstall.sh:
 xsane*) #130122

#xsane puts up a warning msg at startup if running as root, remove it...
#this code is also in file FIXUPHACK in xsane template (in Woof).
#WARNING: this may only work for x86 binary.
if [ -f /usr/bin/bbe ];then #bbe is a sed-like utility for binary files.
if [ -f /usr/bin/xsane ];then
bbe -e 's/\x6b\x00getuid/\x6b\x00getpid/' /usr/bin/xsane > /tmp/xsane-temp1
mv -f /tmp/xsane-temp1 /usr/bin/xsane
chmod 755 /usr/bin/xsane
fi
fi
;;


Not sure, it might be OK for arm binary also.

Woof commit:
http://bkhome.org/fossil/woof2.cgi/info/ce9fd71f75


Posted on 22 Jan 2013, 9:15


Comments:

Posted on 22 Jan 2013, 11:57 by Ted Dog
New 8G/1G MeLe Family
Still looking forward to a new Arm puppy for the Mele A1000. And I came across a new 1000/2000G version with 8G storage and 1G of RAM. Also picked up a UPS for my Mele A1000. it lasted over 12hours on a fully charged battery. Its for cellphones, tablets and such but has 2A 5V ports and PSP plug which runs MeLe. EZOPower Black 3-Port Ultra High-capacity Portable External Rechargeable Backup Battery


Posted on 22 Jan 2013, 19:06 by BarryK
Re Mele A1000
I have got the Mele setup on my desk, that's what I have been compiling on recently, creating some armv7 PETs.

I am running the Ubuntu image that was originally provided. I did a quick look, disappointed that no-one has really "run with the ball" for Linux on the Mele. The latest work seems to be back in June/July 2012.

I don't recall all the problems -- I do recall a problem with the sata interface (it didn't work). I subscribe to the Rhombus-Tech mail list, and I don't recall any posts about later versions of Linux that fix the sata and other problems.



Posted on 22 Jan 2013, 19:17 by BarryK
Re EZOPower
Ted Dog,
Yes, it looks nice:
http://www.amazon.com/EZOPower-High-capacity-Rechargable-10000mAh-Blackberry/dp/B005XQSN9G



Posted on 22 Jan 2013, 20:22 by DrOwl2
Test post
'DrOwl2' has registered for the blog.



Posted on 24 Jan 2013, 8:00 by don570
Foxconn bribery
ZDNet article....
Foxconn Technology Group is cooperating with Chinese authorities to investigate claims of employees accepting bribes from supply chain partners.

In a statement to ZDNet, the manufacturer said law enforcement officials had been brought in to work with its internal audit team as part of the probe into the illegal practices.

The comments come after a report by Taiwan's Next Magazine claimed a Foxconn manager was arrested for seeking bribes from local suppliers.



Posted on 25 Jan 2013, 7:58 by 01micko
probepart bug
With newer kernels, audio cd's are handled a bit differently in /proc/partitions. As a consequence they are not showing an icon on the rox desktop.

Here is a proposed patch, (the first part is basically irrelevant, as I thought maybe the bug was a missing space.)

--- probepart.orig	2013-01-25 08:48:49.393357681 +1000

+++ probepart 2013-01-25 08:48:09.796689059 +1000
@@ -92,7 +92,7 @@
if [ "$FSTYPE" = "iso9660" ];then
opticalPATTERN='^/dev/'"$DEVICE"
if [ "`grep "$opticalPATTERN" /proc/mounts`" = "" ];then
- cddetect_quick -d/dev/${DEVICE} >/dev/null 2>&1 #very fast.
+ cddetect_quick -d /dev/${DEVICE} >/dev/null 2>&1 #very fast.
#...returns 0 if disc inserted, else 255.
[ $? -ne 0 ] && FSTYPE="unknown"
fi
@@ -122,7 +122,12 @@
#[ "$FSTYPE" = "" ] && FSTYPE="unknown"

#for compatibility with old probepart from antonio gallo...
- [ "$FSTYPE" = "unknown" ] && FSTYPE="none"
+ if [ "$FSTYPE" = "unknown" ];then #130124
+ cddetect_quick -d /dev/${DEVICE} &>/dev/null
+ if [ "$?" = 0 ];then FSTYPE="iso9660"
+ else FSTYPE="none"
+ fi
+ fi
[ "$FSTYPE" = "udf" ] && FSTYPE="iso9660" #120601 jemimah: mount udf as iso9660.

[ "$SUNITS" = "" ] && SIZE=$(($SIZE*2)) #want 512 byte blocks.



re: http://murga-linux.com/puppy/viewtopic.php?p=679757#679757

tlc and brown_mouse have reported it on IRC too.


Posted on 25 Jan 2013, 8:55 by jrb
Off topic Woof BABYBUILD
Hi Barry,
I was just using the 4babybuild script in woof of 19Jan2013 and noticed it didn't work with 3.xxxx kernels. Looking deeper I saw line 19
KERNELVER="`ls -1 rootfs-complete/lib/modules | grep '^2' | head -n 1`"
limited it to the 2.xxxx series kernels so I changed it to
KERNELVER2="`ls -1 rootfs-complete/lib/modules | grep '^2' | head -n 1`"

KERNELVER3="`ls -1 rootfs-complete/lib/modules | grep '^3' | head -n 1`"
if [ ! $KERNELVER2="" ]
then
KERNELVER=$KERNELVER2
else
KERNELVER=$KERNELVER3
fi
Seems to work fine with both sets of kernels now.

Cheers, J

BTW: it removed an impressive 17MB from my ISO


Posted on 25 Jan 2013, 18:29 by disciple
Xsane fix - thanks
Thanks for the script,
That warning nonsense is rather annoying in other distros, but I don't scan enough to have bothered sorting it out!