Thanks MochiMoppel.MochiMoppel wrote:Mystifies me also. I don't run any of the distros you mentioned and my environment is different, so I have no way to see the effect. Obviously installpkg.sh runs fine as it extracted the file to / and there is little in the way that could prevent it from executing the script. A short test on my system with a simulated full install showed no problems. My pinstall.sh worked fine.perdido wrote:The discussion has been about why can't rockedge and I get our pinstall.sh to run in a fully installed puppy when it runs and works in a frugal installed puppy?
If you like you can send me a PM. I'll try to walk you through the debugging process.
Bug- pinstall.sh runs in frugal but not full install [Fixed]
- perdido
- Posts: 1528
- Joined: Mon 09 Dec 2013, 16:29
- Location: ¿Altair IV , Just north of Eeyore Junction.?
- MochiMoppel
- Posts: 2084
- Joined: Wed 26 Jan 2011, 09:06
- Location: Japan
I don't expect pinstall scripts to work in full installs of any recent puppy (e.g. Dpup Stretch or UPup Bionic Beaver), all puppies that use an updated version of installpkg.sh.
In line 156 it now readswhich IMO is wrong. For PUPMODE 2 I would expect DIRECTSAVEPATH to be empty.
And then only 6 lines later a strange if commandAbsolutely no reason here to check if DIRECTSAVEPATH contains a value. A few lines earlier the author assigned a value. But no harm is done either.
If indeed this is a typo and the author meantto check for the existence of this directory, then also the rest of the code needs fixing.
The real problem with pinstall.sh scripts is that they are now expected in /tmp/petget/directsavepath/ while in fact they sit in / and wait for execution. For the same reason the stuff in / doesn't get deleted. Explains why it can be clicked on. And since the change was made only for PUPMODE 2 it explains why pinstall.sh in frugal installs still works.
Maybe this all makes sense and I'm simply too stupid to understand it ...
In line 156 it now reads
Code: Select all
DIRECTSAVEPATH="/tmp/petget/directsavepath"
And then only 6 lines later a strange if command
Code: Select all
if [ "$DIRECTSAVEPATH" ];then
rm -rf $DIRECTSAVEPATH
mkdir -p $DIRECTSAVEPATH
fi
If indeed this is a typo and the author meant
Code: Select all
[ -d "$DIRECTSAVEPATH" ]
The real problem with pinstall.sh scripts is that they are now expected in /tmp/petget/directsavepath/ while in fact they sit in / and wait for execution. For the same reason the stuff in / doesn't get deleted. Explains why it can be clicked on. And since the change was made only for PUPMODE 2 it explains why pinstall.sh in frugal installs still works.
Maybe this all makes sense and I'm simply too stupid to understand it ...
- perdido
- Posts: 1528
- Joined: Mon 09 Dec 2013, 16:29
- Location: ¿Altair IV , Just north of Eeyore Junction.?
This is both a relief and quite distressing that someone has modified the script and left no notes in it or even tested it for functionality afterMochiMoppel wrote:I don't expect pinstall scripts to work in full installs of any recent puppy (e.g. Dpup Stretch or UPup Bionic Beaver), all puppies that use an updated version of installpkg.sh.
In line 156 it now readswhich IMO is wrong. For PUPMODE 2 I would expect DIRECTSAVEPATH to be empty.Code: Select all
DIRECTSAVEPATH="/tmp/petget/directsavepath"
And then only 6 lines later a strange if commandAbsolutely no reason here to check if DIRECTSAVEPATH contains a value. A few lines earlier the author assigned a value. But no harm is done either.Code: Select all
if [ "$DIRECTSAVEPATH" ];then rm -rf $DIRECTSAVEPATH mkdir -p $DIRECTSAVEPATH fi
If indeed this is a typo and the author meantto check for the existence of this directory, then also the rest of the code needs fixing.Code: Select all
[ -d "$DIRECTSAVEPATH" ]
The real problem with pinstall.sh scripts is that they are now expected in /tmp/petget/directsavepath/ while in fact they sit in / and wait for execution. For the same reason the stuff in / doesn't get deleted. Explains why it can be clicked on. And since the change was made only for PUPMODE 2 it explains why pinstall.sh in frugal installs still works.
Maybe this all makes sense and I'm simply too stupid to understand it ...
modifying it
Much appreciated MM, and everyone else that contributed to this discussion - hopefully someday it will be fixed back to how it once worked.
.
- MochiMoppel
- Posts: 2084
- Joined: Wed 26 Jan 2011, 09:06
- Location: Japan
Test for functionality? Don't expect too much. Your first point is more bothering. Who did this and why?perdido wrote:This is both a relief and quite distressing that someone has modified the script and left no notes in it or even tested it for functionality after
modifying it .
Now look at the bright side: It's a bug, but it's a good bug. Prevents the automatic execution of pinstall scripts which IMO pose an unnecessary security risk. Fortunately you now can inspect the script and decide if you want to execute it or not. Sure you have to clean up, but that's a small price to pay for more security. This bug should become standard for frugal install, seriously
I don't understand that. If you are willing to trust the contents of the PET, why would you not also trust its pinstall script?MochiMoppel wrote:Now look at the bright side: It's a bug, but it's a good bug. Prevents the automatic execution of pinstall scripts which IMO pose an unnecessary security risk.
Supposedly, the PET builder added the script because it is required to make the install work correctly.
- perdido
- Posts: 1528
- Joined: Mon 09 Dec 2013, 16:29
- Location: ¿Altair IV , Just north of Eeyore Junction.?
This is an update to this problem - from woofce
https://github.com/puppylinux-woof-CE/w ... ts/testing
mavrothal is on the ball.
I'm going to try and download the updated installpkg.sh and see how it does.
https://github.com/puppylinux-woof-CE/w ... ts/testing
mavrothal is on the ball.
I'm going to try and download the updated installpkg.sh and see how it does.
- Attachments
-
- 2018-09-15_193053.jpg
- (12.01 KiB) Downloaded 381 times
- perdido
- Posts: 1528
- Joined: Mon 09 Dec 2013, 16:29
- Location: ¿Altair IV , Just north of Eeyore Junction.?
I have downloaded and tried both versions of the proposed new version of installpkg.sh from mavrothal in a full install Upup Bionic 18.05
It ran the pinstall.sh and puninstall.sh and did not leave relics in /
The "simpler fix" was submitted last so it is the latest version.
.
It ran the pinstall.sh and puninstall.sh and did not leave relics in /
The "simpler fix" was submitted last so it is the latest version.
.
Last edited by perdido on Thu 20 Sep 2018, 22:53, edited 2 times in total.
- perdido
- Posts: 1528
- Joined: Mon 09 Dec 2013, 16:29
- Location: ¿Altair IV , Just north of Eeyore Junction.?
These are the two versions of the updated installpgk.sh script available from woofce / commits / testing
for anybody else that is interested.
The script belongs in /usr/local/petget/
Rename to installpkg.sh and make executable.
for anybody else that is interested.
The script belongs in /usr/local/petget/
Rename to installpkg.sh and make executable.
- Attachments
-
- installpkg.sh.02-simpler-fix.gz
- MD5 acd8b88ca2e6d69c8f1d8ff4f79c4563
- (37.23 KiB) Downloaded 253 times
-
- installpkg.sh.01.gz
- MD5 e7a2ddae7f9faff1c62f9a507abbeac4
- (37.29 KiB) Downloaded 233 times