Author |
Message |
perdido

Joined: 09 Dec 2013 Posts: 1439 Location: ¿Altair IV , Just north of Eeyore Junction.?
|
Posted: Wed 29 Aug 2018, 11:37 Post subject:
|
|
MochiMoppel wrote: | 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? |
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.
If you like you can send me a PM. I'll try to walk you through the debugging process. |
Thanks MochiMoppel.
|
Back to top
|
|
 |
MochiMoppel

Joined: 26 Jan 2011 Posts: 1944 Location: Japan
|
Posted: Thu 30 Aug 2018, 09:08 Post subject:
|
|
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 reads Code: | DIRECTSAVEPATH="/tmp/petget/directsavepath" | which IMO is wrong. For PUPMODE 2 I would expect DIRECTSAVEPATH to be empty.
And then only 6 lines later a strange if command
Code: | if [ "$DIRECTSAVEPATH" ];then
rm -rf $DIRECTSAVEPATH
mkdir -p $DIRECTSAVEPATH
fi | Absolutely 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 meant
Code: | [ -d "$DIRECTSAVEPATH" ] | to 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 ...
|
Back to top
|
|
 |
rockedge

Joined: 11 Apr 2012 Posts: 1351 Location: Connecticut, United States
|
Posted: Thu 30 Aug 2018, 09:32 Post subject:
|
|
MochiMoppel that is an interesting find. what you say makes sense...time to look at the code closer.
|
Back to top
|
|
 |
perdido

Joined: 09 Dec 2013 Posts: 1439 Location: ¿Altair IV , Just north of Eeyore Junction.?
|
Posted: Fri 31 Aug 2018, 07:37 Post subject:
|
|
MochiMoppel 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 reads Code: | DIRECTSAVEPATH="/tmp/petget/directsavepath" | which IMO is wrong. For PUPMODE 2 I would expect DIRECTSAVEPATH to be empty.
And then only 6 lines later a strange if command
Code: | if [ "$DIRECTSAVEPATH" ];then
rm -rf $DIRECTSAVEPATH
mkdir -p $DIRECTSAVEPATH
fi | Absolutely 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 meant
Code: | [ -d "$DIRECTSAVEPATH" ] | to 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 ... |
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
Much appreciated MM, and everyone else that contributed to this discussion - hopefully someday it will be fixed back to how it once worked.
.
_________________ Giving with an expectation for return brings misery.
|
Back to top
|
|
 |
MochiMoppel

Joined: 26 Jan 2011 Posts: 1944 Location: Japan
|
Posted: Thu 06 Sep 2018, 07:22 Post subject:
|
|
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 . | Test for functionality? Don't expect too much. Your first point is more bothering. Who did this and why?
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
|
Back to top
|
|
 |
rcrsn51

Joined: 05 Sep 2006 Posts: 12807 Location: Stratford, Ontario
|
Posted: Thu 06 Sep 2018, 11:28 Post subject:
|
|
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. |
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?
Supposedly, the PET builder added the script because it is required to make the install work correctly.
|
Back to top
|
|
 |
perdido

Joined: 09 Dec 2013 Posts: 1439 Location: ¿Altair IV , Just north of Eeyore Junction.?
|
Posted: Sun 16 Sep 2018, 09:31 Post subject:
|
|
This is an update to this problem - from woofce
https://github.com/puppylinux-woof-CE/woof-CE/commits/testing
mavrothal is on the ball.
I'm going to try and download the updated installpkg.sh and see how it does.
Description |
|
Filesize |
12.01 KB |
Viewed |
310 Time(s) |

|
|
Back to top
|
|
 |
perdido

Joined: 09 Dec 2013 Posts: 1439 Location: ¿Altair IV , Just north of Eeyore Junction.?
|
Posted: Sun 16 Sep 2018, 18:45 Post subject:
|
|
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.
.
Last edited by perdido on Thu 20 Sep 2018, 18:53; edited 2 times in total
|
Back to top
|
|
 |
perdido

Joined: 09 Dec 2013 Posts: 1439 Location: ¿Altair IV , Just north of Eeyore Junction.?
|
Posted: Sun 16 Sep 2018, 19:06 Post subject:
|
|
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.
Description |
MD5 acd8b88ca2e6d69c8f1d8ff4f79c4563
|

Download |
Filename |
installpkg.sh.02-simpler-fix.gz |
Filesize |
37.23 KB |
Downloaded |
177 Time(s) |
Description |
MD5 e7a2ddae7f9faff1c62f9a507abbeac4
|

Download |
Filename |
installpkg.sh.01.gz |
Filesize |
37.29 KB |
Downloaded |
169 Time(s) |
|
Back to top
|
|
 |
|