Bind mounts do the same job as links. Links are better.!

For discussions about programming, programming questions/advice, and projects that don't really have anything to do with Puppy.
Message
Author
amigo
Posts: 2629
Joined: Mon 02 Apr 2007, 06:52

#76 Post by amigo »

"./unionfs-fuse -o cow,allow_other $Pkg/$Pkg.w=RW:$uFS:/=RO $Pkg/$Pkg.u"
That's incomplete -you have no =?? assignment for the '$uFS' part. It should be:
$Pkg/$Pkg.w=RW:$uFS=RO:/=RO

The allow_other may not be needed when things are working correctly. Were, when running as a user, only the user could do the unmount, unless allow_root was specified. But that was only a problem when I still had hanging mounts.

User avatar
sunburnt
Posts: 5090
Joined: Wed 08 Jun 2005, 23:11
Location: Arizona, U.S.A.

#77 Post by sunburnt »

I didn`t put the full command as it was so long. $uFS has the app. and lib. layers in it.
Here`s the full command with $uFS expanded:

Code: Select all

./unionfs-fuse -o cow,allow_root geeqie_1.0-10_i386/geeqie_1.0-10_i386.w=RW:geeqie_1.0-10_i386/lib=RO:geeqie_1.0-10_i386/geeqie_1.0-10_i386.a=RO:/=RO geeqie_1.0-10_i386/geeqie_1.0-10_i386.u
The union is made correctly, there`s no error from it, and I can see all of the layers looking into: geeqie_1.0-10_i386/geeqie_1.0-10_i386.u
From my web reading it appears that unionfs-fuse is the problem with the permissions, it`s stopping falsechroot from exec. in it.
I thought the file /etc/fuse.conf was it as it fixed that person`s problem, but even it didn`t make any difference.
Another web page said it needed "dev" and that fixed that person`s problem with permissions.
So I tried adding: ,use_ino,suid,dev. in various arrangements. And tried another one: default_permissions
Nothing changes the error.

amigo
Posts: 2629
Joined: Mon 02 Apr 2007, 06:52

#78 Post by amigo »

You don't post there the full command that you gave for fakechrrot, but as I recall, it would seem you may be missing the command to run
in the chroot.
I just built geeqie from source using src2pkg and set up a chroot with unionfs-fs and fakechrooted in there and it worked fine -took about 5 minutes to build and twenty seconds to set up and run the chroot.

What happens when you manually create the union and chroot in there with no command to run?
unionfs-fuse -o cow rw=RW:app=RO:/=RO union
fakechroot chroot union
(then which geeqie and then simply geeqie)

I'm having zero problems using this method for everything I've tried here... except for that weirdness with chrome having to do with all the dbus, etc mess. Nothing else has complained at all.

User avatar
sunburnt
Posts: 5090
Joined: Wed 08 Jun 2005, 23:11
Location: Arizona, U.S.A.

#79 Post by sunburnt »

Hey amigo; Just me fumbling around here... :roll:
The run file:

Code: Select all

./fakechroot $uMt $@
./setup &
$uMt is exported from setup as it`s needed again to unmount the union.

I just manually mounted the Geeqie Sq. file, it shows good in mnt. dir.
Then the union, checked that geeqie-standard ( exec. ) is in it. Good.
Checked union for libs.: libexiv2.so.11.0.0 and libstdc++.so.6.0.0. Good.
Then I created a blank file in the Write dir. and it shows in the union dir.
Then ran the chroot. Still the permission error...

Code: Select all

sh-4.1# ./fakechroot geeqie_1.0-10_i386/geeqie_1.0-10_i386.u geeqie-standard
env: can't execute 'geeqie_1.0-10_i386/geeqie_1.0-10_i386.u': Permission denied
sh-4.1# 
Odd item is ROX filer doesn`t want to show down to the libstdc++..... libs.
It`ll show the other lib. fine, but in scrolling down it stops before the end.
So I did "ls" on the libs. and it says they`re where they`re supposed to be.
And I did readlink on the links just to check everything, and they`re good.

User avatar
sunburnt
Posts: 5090
Joined: Wed 08 Jun 2005, 23:11
Location: Arizona, U.S.A.

#80 Post by sunburnt »

Just set $LD_LIBRARY_PATH to the AppPkg /lib dir. and Geeqie ran.
It errors about Puppy being "old".

Code: Select all

sh-4.1# /mnt/sda3/AppPkg/build/a.AppPkg/.AppPkg/geeqie_1.0-10_i386/geeqie_1.0-10_i386.build/usr/bin/geeqie-standard
!!! This is a friendly warning.
!!! The version of GTK+ in use now is older than when Geeqie was compiled.
!!!  compiled with GTK+-2.24
!!!   running with GTK+-2.20
!!! Geeqie may quit unexpectedly with a relocation error.
Could not init LIRC support

** (geeqie-standard:24742): WARNING **: invalid menu path item FileOpsSection 

** (geeqie-standard:24742): WARNING **: invalid menu path item FileOpsSection 
sh-4.1# 
If you post the commands you used for the union and fakechroot I can manually try it again.

unionfs-fuse isn`t clear about a few items:
--nonempty = I assume it`s talking about the "union dir." being not empty.
--allow_other = I assume this allows anybody access "including root".
--allow_root = And this allows root only.

User avatar
sunburnt
Posts: 5090
Joined: Wed 08 Jun 2005, 23:11
Location: Arizona, U.S.A.

#81 Post by sunburnt »

I booted to Puppy5.4.X.5 Precise, was using Puppy5.3-005.
The errors changed, what a surprise...

Code: Select all

#######  Run:  geeqie_1.0-10_i386

mount: warning: geeqie_1.0-10_i386/geeqie_1.0-10_i386.a seems to be mounted read-only.
###  Unionfs-Fuse geeqie_1.0-10_i386/geeqie_1.0-10_i386.w=RW:geeqie_1.0-10_i386/lib=RO:geeqie_1.0-10_i386/geeqie_1.0-10_i386.a=RO:/=RO geeqie_1.0-10_i386/geeqie_1.0-10_i386.u

geeqie_1.0-10_i386/geeqie_1.0-10_i386.a 

/tmp/AppPkg/geeqie_1.0-10_i386.u/usr/lib/libexiv2.so.11
/tmp/AppPkg/geeqie_1.0-10_i386.u/usr/lib/libexiv2.so.11.0.0
/tmp/AppPkg/geeqie_1.0-10_i386.u/usr/lib/libstdc++.so.6
/tmp/AppPkg/geeqie_1.0-10_i386.u/usr/lib/libstdc++.so.6.0.16

getopt: unrecognized option '--version'
BusyBox v1.19.3 (2011-11-09 07:34:50 WST) multi-call binary.

Usage: getopt [OPTIONS]

	-a,--alternative		Allow long options starting with single -
	-l,--longoptions=longopts	Long options to be recognized
	-n,--name=progname		The name under which errors are reported
	-o,--options=optstring		Short options to be recognized
	-q,--quiet			Disable error reporting by getopt(3)
	-Q,--quiet-output		No normal output
	-s,--shell=shell		Set shell quoting conventions
	-T,--test			Test for getopt(1) version
	-u,--unquoted			Don't quote the output

fakechroot: preload library not found, aborting.
# #######  End:  geeqie_1.0-10_i386

/tmp/AppPkg/geeqie_1.0-10_i386.u
geeqie_1.0-10_i386/geeqie_1.0-10_i386.a
# BUT... No permission error. It looks like fakechroot ran, but it had an error.
So it seems Puppy5.3 isn`t a good one to use. Lucid and Precise don`t mix well...
I noticed that Puppy5.4.X.5 has the newer libs. that I had put in the AppPkg/lib dir.

My Chrome AppPkg works in Puppy5.4.X.5, I`m posting this from it.

I need another distro. to use, but I can`t find a smallish Debian or Ubuntu live-CD.

# Amigo... What Linux distro. do you use? ### Maybe you`ll try it with Puppy?
.

amigo
Posts: 2629
Joined: Mon 02 Apr 2007, 06:52

#82 Post by amigo »

"./fakechroot geeqie_1.0-10_i386/geeqie_1.0-10_i386.u geeqie-standard"
should be:
"./fakechroot chroot geeqie_1.0-10_i386/geeqie_1.0-10_i386.u geeqie-standard"

As I said, geeqie_1.0-10_i386/geeqie_1.0-10_i386.u, being in the first spot, is being interpreted as the command to run.

My distro: I eat my own dog food, running KISS-5.0, all built and packaged from scratch. If you really wanna know how things work, you need to start with something like slackware or arch -normally installed to a hrad-disk without any initrd or any schnick-schnack. Once you understand the boot process fully, then study their installer which uses a pretty big initrd. Once you understand the difference in boot procedure, then you are qualified to start assembling your own from other peoples components -to make it do what you want. When 'what you want' is no longer with others' pieces, then you learn to build your own packages. It doesn't really matter what the package format is -the most important things will be the same, or nearly, from one pkg format to the next.

I've been rolling my own for several years now, and really like it because it takes the upgrade pressure off. The bad thing about arch or gentoo, in particular, is that you never get finished upgrading your system, so you never have any time to learn about other things -like what makes it tick and how to change that.

As for that getopts error, try playing around with the code in fakechroot which checks that -comment out the line 'getopts --version' and the normal options (the first set) and see if pups' getopt will work with the second set of options:

Code: Select all

#getopttest=`getopt --version`
#case $getopttest in
    #getopt*)
        # GNU getopt
        #opts=`getopt -q -l lib: -l use-system-libs -l config-dir: -l environment -l version -l help -- +l:sc:e:vh "$@"`
       # ;;
    #*)
        # POSIX getopt ?
        opts=`getopt l:sc:e:vh "$@"`
       # ;;
#esac
If you're gonna use fakechroot on pupish systems, then you'll need to fix it before distributing it, so that it works. Of course, simply changing the shebang works fine also, as we've seen.
Yes, expect different errors depending on which OS & variant is being used. In the case of puppy, this means 534 main versions with 12756 variants -each with its' own errors. LOL

User avatar
sunburnt
Posts: 5090
Joined: Wed 08 Jun 2005, 23:11
Location: Arizona, U.S.A.

#83 Post by sunburnt »

Well that must have been the right thing needed. On Puppy5.4.X.5 the VT went into a race.
My usual Puppy threw a pile of errors, and neither Puppy would reboot afterwards.
Yeah, I`d say fakechroot needs some work alright.
It`s late and I`m busy tomorrow so I`ll try again later in the day.
Thanks amigo...

amigo
Posts: 2629
Joined: Mon 02 Apr 2007, 06:52

#84 Post by amigo »

Ouch, guess I should have proposed a safer way to find out which getopts syntax would work with busybox-as-sh.

Post Reply