Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Mon 15 Oct 2018, 21:45
All times are UTC - 4
 Forum index » House Training » Bugs ( Submit bugs )
Pet pinstall.sh script runs in frugal but not full install
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 3 of 3 [39 Posts]   Goto page: Previous 1, 2, 3
Author Message
perdido


Joined: 09 Dec 2013
Posts: 986
Location: ¿Altair IV , Just north of Eeyore Junction.?

PostPosted: 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. Smile
Back to top
View user's profile Send private message 
MochiMoppel


Joined: 26 Jan 2011
Posts: 1661
Location: Japan

PostPosted: 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
View user's profile Send private message 
rockedge


Joined: 11 Apr 2012
Posts: 829
Location: Connecticut, United States

PostPosted: 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
View user's profile Send private message Visit poster's website 
perdido


Joined: 09 Dec 2013
Posts: 986
Location: ¿Altair IV , Just north of Eeyore Junction.?

PostPosted: 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 Shocked

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
View user's profile Send private message 
MochiMoppel


Joined: 26 Jan 2011
Posts: 1661
Location: Japan

PostPosted: 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 Shocked .
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 Laughing
Back to top
View user's profile Send private message 
rcrsn51


Joined: 05 Sep 2006
Posts: 12324
Location: Stratford, Ontario

PostPosted: 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
View user's profile Send private message 
perdido


Joined: 09 Dec 2013
Posts: 986
Location: ¿Altair IV , Just north of Eeyore Junction.?

PostPosted: 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.
2018-09-15_193053.jpg
 Description   
 Filesize   12.01 KB
 Viewed   113 Time(s)

2018-09-15_193053.jpg

Back to top
View user's profile Send private message 
perdido


Joined: 09 Dec 2013
Posts: 986
Location: ¿Altair IV , Just north of Eeyore Junction.?

PostPosted: 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
View user's profile Send private message 
perdido


Joined: 09 Dec 2013
Posts: 986
Location: ¿Altair IV , Just north of Eeyore Junction.?

PostPosted: 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.
installpkg.sh.02-simpler-fix.gz
Description  MD5 acd8b88ca2e6d69c8f1d8ff4f79c4563
gz

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

 Download 
Filename  installpkg.sh.01.gz 
Filesize  37.29 KB 
Downloaded  9 Time(s) 
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 3 of 3 [39 Posts]   Goto page: Previous 1, 2, 3
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » Bugs ( Submit bugs )
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0830s ][ Queries: 13 (0.0198s) ][ GZIP on ]