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 Thu 20 Sep 2018, 21:57
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 1 of 3 [39 Posts]   Goto page: 1, 2, 3 Next
Author Message
perdido


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

PostPosted: Sat 25 Aug 2018, 13:35    Post subject:  Pet pinstall.sh script runs in frugal but not full install
Subject description: Why is this happening?
 

Created a small pet file. I used dir2pet to create pet

I can only get the pinstall.sh & puninstall.sh scripts to run in a frugal install.
The full install ignores them, making the pet unusable for the full install.

The scripts are not touched in the full install.

I tried adding sleep wait states to scripts with no effect. Thats why I believe the scripts are not touched. Confused

Tried it in bionic and xenial just to see if the scripts did anything in a full install, they did not.

I can't be the only person this has happened to.

.

Last edited by perdido on Mon 03 Sep 2018, 08:19; edited 4 times in total
Back to top
View user's profile Send private message 
perdido


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

PostPosted: Sat 25 Aug 2018, 14:38    Post subject:  

A little more, when running petget from terminal to install the pet the screens are different and the frugal install does not complete, but the full install does.

There is no reference to "nohup.out" in the full install.
It is my understanding there should be a "nohup.out" generated after the pinstall.sh initiates, it just catches the output from the pinstall script?

This is strange because both installs complete with just a mouse click on the pet using Rox but the full install will not run the pinstall script either way
Top pic is full install completing in terminal
Bottom pic is frugal install hanging in terminal at "nohup.out"

Please read the descriptions at top of pics for additional info
full-install1.png
 Description   Full install completing in terminal but not running pinstall script
Full install also completes with just a mouse click on pet using Rox
Neither of these installs run the pinstall script in the pet
 Filesize   94.13 KB
 Viewed   294 Time(s)

full-install1.png

frugal-install.jpg
 Description   Frugal install hanging in terminal on nohup.out file see pic but runs pinstall script, nohup.out file contains "Generating /root/.jwmrc..."
Frugal install fully installs with mouse click using Rox and runs pinstall script in the pet
 Filesize   42.58 KB
 Viewed   292 Time(s)

frugal-install.jpg

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


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

PostPosted: Sun 26 Aug 2018, 15:16    Post subject:  

Maybe someone can answer me this:

1.Why can't the pinstall.sh in a pet file run the command jwm -restart

2.Why can't the pinstall.sh in a pet file run the command wmrestart

3.Is there a way to disable fixmenus from automatically running atfter a pet gets installed?
I would be looking for some way of doing this from inside the .pet pinstall.sh

I havn't found diddly-squat about those issues though I can guess the window manager and
server are not allowed a restart to keep the puppy package manager running--- maybe.

Anyways, any insight provided will be appreciated.

.

Last edited by perdido on Wed 05 Sep 2018, 13:18; edited 1 time in total
Back to top
View user's profile Send private message 
bigpup


Joined: 11 Oct 2009
Posts: 11016
Location: Charleston S.C. USA

PostPosted: Sun 26 Aug 2018, 23:13    Post subject:  

Quote:
3.Is there a way to disable fixmenus from automatically running after a pet gets installed?

Why do you care?
If the pet package is a program.
If you put the required files, in the pet package, to make a menu entry for the program. Running fixmenus completes the install by updating the menu.
The program now has a menu entry.

If the pet package is not something that needs a menu entry and does not have required files to make a menu entry. Running fixmenus does nothing. and takes very little time to do nothing.
Basically it hurts nothing to run it.

_________________
I have found, in trying to help people, that the things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected Shocked
Back to top
View user's profile Send private message 
perdido


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

PostPosted: Mon 27 Aug 2018, 00:07    Post subject:  

bigpup wrote:
Quote:
3.Is there a way to disable fixmenus from automatically running after a pet gets installed?

Why do you care?
If the pet package is a program.
If you put the required files, in the pet package, to make a menu entry for the program. Running fixmenus completes the install by updating the menu.
The program now has a menu entry.

If the pet package is not something that needs a menu entry and does not have required files to make a menu entry. Running fixmenus does nothing. and takes very little time to do nothing.
Basically it hurts nothing to run it.



Pet package has desktop files, looking for a way to get the pinstall.sh and puninstall.sh running to completion in the full install. pinstall.sh hangs and when fixmenus runs it
throws stuff into the jwm menu that would not be there if pinstall.sh did not hang (the pinstall.sh rearranges some desktop files). But I don't think disabling fixmenus
can be done like that....

I wish you would have brought a bucket of information and dumped it in here Smile

If the pinstall.sh & puninstall.sh would run to completion in the full install like they do in the frugal install I would not have the fixmenus running problem. I've been to
the puppy graveyards looking for info LOL, pretty much gave up on the pet working in a full install. You would be suprised how little info there is about pinstall.sh

Thats my story and I'm sticking to it <g>

_________________
Giving with an expectation for return brings misery.
Back to top
View user's profile Send private message 
rockedge


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

PostPosted: Mon 27 Aug 2018, 12:09    Post subject:  

I have also encountered strange things happening with full installs and PET packages loading.

I also found very little on the pinstall.sh scripts....my PET packages depend heavily on the pinstall.sh script to import sql files to a mariadb or mysql server and create users for apache to stay in line with the programs I am making the PET's from.

I need something similar with loading sfs packages. Someone did tell me once a way to do this in an sfs ...I will need to dive into the forum to find it.
Back to top
View user's profile Send private message Visit poster's website 
perdido


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

PostPosted: Mon 27 Aug 2018, 18:21    Post subject:  

rockedge wrote:
I have also encountered strange things happening with full installs and PET packages loading.

I also found very little on the pinstall.sh scripts....my PET packages depend heavily on the pinstall.sh script to import sql files to a mariadb or mysql server and create users for apache to stay in line with the programs I am making the PET's from.

I need something similar with loading sfs packages. Someone did tell me once a way to do this in an sfs ...I will need to dive into the forum to find it.


Makes it impossible to manufacture a pet that does anything but copy files when installing to a full install.

I would like to see a way to run a pinstall.sh in either a pet or sfs when running a full install.
I guess that they are not used much and so are not missed at the user level.

I wonder if it is a bug or a feature? Confused

.

_________________
Giving with an expectation for return brings misery.
Back to top
View user's profile Send private message 
musher0

Joined: 04 Jan 2009
Posts: 12686
Location: Gatineau (Qc), Canada

PostPosted: Mon 27 Aug 2018, 22:33    Post subject:  

Hi guys.

Why do a full install of a distro that was designed for a frugal install? Why
don't you stick to the type of install PuppyLinux was designed for? Problem
solved, if you ask me.

Why do you want a Puppy to meow? It's a Puppy, for God's sake: it barks.
Let it be.

_________________
musher0
~~~~~~~~~~
Siempre será canción nueva... (V. Jara, Manifiesto)
Back to top
View user's profile Send private message 
perdido


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

PostPosted: Mon 27 Aug 2018, 23:09    Post subject:  

musher0 wrote:
Hi guys.

Why do a full install of a distro that was designed for a frugal install? Why
don't you stick to the type of install PuppyLinux was designed for? Problem
solved, if you ask me.

Why do you want a Puppy to meow? It's a Puppy, for God's sake: it barks.
Let it be.

Do you use pinstall.sh in pet packages you manufacture? Tell me the secret of how to make them run in a full install puppy linux?
What is the reason a pinstall.sh in a pet file runs in a frugal install but not in a full install?

.
Back to top
View user's profile Send private message 
musher0

Joined: 04 Jan 2009
Posts: 12686
Location: Gatineau (Qc), Canada

PostPosted: Tue 28 Aug 2018, 03:02    Post subject:  

Hi perdido.

I have used a pinstall.sh script on occasion in a pet archive, e.g. to install
and register a TTF font with fc-cache. Or to download a needed lib through
PPM on the tail of another prog.

But I never had your problem since I have never done a full instal of a
Puppy.

I don't which country this proverb is from, but here goes: "If you can't
move the boulder off the road, go around it."

If pinstall.sh can't do what you want in a full install, don't buck? It's not
worth redoing the entire petget for just one particular case.

Just suggesting:
-- Tell your user to run the pinstall.sh manually if the user has installed
Puppy as full install?
OR
-- Store pinstall.sh under a different name in /root/my-applications/bin or
/opt/local/bin, and inform the user to finish the install of your program
from there?
OR
-- Maybe the following is better, because it is a universal solution, not
dependent at all on pinstall.sh:

use a "first run" feature in a wrapper, so that the first time it is run, it
finishes the install? Something like
Code:
#!/bin/bash
if [ ! -f needed-file ];then
    finish-install.sh
# Meaning: if the needed file is not found, fetch and install it.
# Maybe here you can add an info box telling the user why the wait on
# 1st run.
fi
# Once the file is there, the section above is skipped on any run
# afterwards. And the app is run with no delay:
blabla-prog

BTW, does your app install properly on a frugally installed Pup?

IHTH.

_________________
musher0
~~~~~~~~~~
Siempre será canción nueva... (V. Jara, Manifiesto)
Back to top
View user's profile Send private message 
bigpup


Joined: 11 Oct 2009
Posts: 11016
Location: Charleston S.C. USA

PostPosted: Tue 28 Aug 2018, 08:10    Post subject:  

Maybe the question should be what exactly is in the pinstall.sh?

Post the contents.
Could be something in it that is trying to do something wrong for a full install Puppy.

_________________
I have found, in trying to help people, that the things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected Shocked
Back to top
View user's profile Send private message 
mikeslr


Joined: 16 Jun 2008
Posts: 2622
Location: 500 seconds from Sol

PostPosted: Tue 28 Aug 2018, 10:15    Post subject: Adding my 2 Cents  

Hi All,

Like musher0, I only run frugal installs. Musher0, however, asked "Why do a full install of a distro that was designed for a frugal install?" I thought the only exception to the general recommendation to use Frugal installs to be if you had a RAM-challenged computer, e.g. 256 Mbs or less. But recently someone --perdido perhaps-- suggested that Full installs present a better environment for compiling. Knowing nothing about compiling I have no reason to doubt that. But I don't see how that relates to the current problem of Full installs not ever executing pinstall.sh.

I discovered the lack of documentation/explanations regarding pinstall.sh under another circumstance when they cease to function. If you convert a pet to an SFS, a pinstall.sh of the pet will be copied to the into the SFS but, as far I know, isn't executed when the SFS is loaded or ever.

When I discovered that, I thought perhaps it would be necessary to write some type of "run-once" script to be placed in /root/Startup: check to see if the commands in the script had already be executed, and if not execute them. Way beyond my scripting skills. Fortunately, I don't recall any converted-SFS that failed to function as expected. Which left me wondering under what circumstances are pinstall.shs actually necessary.

mikesLr
Back to top
View user's profile Send private message 
rockedge


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

PostPosted: Tue 28 Aug 2018, 11:15    Post subject:  

Quote:
Which left me wondering under what circumstances are pinstall.shs actually necessary.



the PET being installed contains Apache (or updated Hiawatha), mariaDB, PHP (either 5 or 7) and ZoneMinder

to get all of this ready to actually run after installation 2 users must be created. (there is a way to use webuser:webgroup that is already present)
www-data and mysql. MariaDB needs extra steps to be installed which includes creating the database tables for the mysql server to run AND the zoneminder database zm_create.sql needs to be loaded. and a mysql user for zoneminder needs to be created. then the sql is imported. the mariaDB need a script "mysql_install_db to run, a root user and password need to be set, the mysqld daemon must be started for of the further configuration to happen. then several directories must be created and permissions for 5 directories must be changed to the web server user created earlier. All in all there are about 20 lines (which I have shortened) in the zoneminder-130.4.pet pinstall.sh script that without it you're on your own getting it started....defeats the pupose of the PET in the first place.
I could post a copy of the pinstall.sh for this PET which the PET itself is around 262 megs in size.

Last edited by rockedge on Tue 28 Aug 2018, 11:26; edited 2 times in total
Back to top
View user's profile Send private message Visit poster's website 
perdido


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

PostPosted: Tue 28 Aug 2018, 11:17    Post subject:  

Hi musher0,

First off, I'm not a coder. I don't write programs but I can change configuration files to get programs set up. I would not know where to put your wrapper.

Thanks for taking this issue more seriously, seems there is something broken somewhere in the full install concerning petget & pinstall.sh

musher0 wrote:

BTW, does your app install properly on a frugally installed Pup?

IHTH.


Well yes it does, it has been mentioned several times in this thread.
There are examples posted of installing the pet in terminal using petget in the 2nd post, whole bunch of verbosity
going on in the full install until it fully completes and leaves the pinstall.sh & puninstall.sh & pet.specs in the root directory(they should not get left there)

The problem is only that the pinstall.sh does not run in a full install.
A full install is supposed to run it, as far as I can tell by what little documemtation there is about the pinstall.sh

The best documentation I have found is this little snippit from Barry Kauler
Code:
The post-install script
This is an optional script that you would have to create yourself. Very few PET packages need this. Ditto for the post-uninstall script.

But, if you did need to create a "pinstall.sh" script, here are some notes:

The post-install script needs further clarification. There is no difference between a standalone PET package and a PET package in the Unleashed suite, except for where they are used. Unleashed packages are used to create a Puppy live-CD ISO file, whereas standalone PET packages are are available on the Internet for individual download and installation by the PETget package manager.
In both cases, the post-install script will be executed after the package has been installed.

Here is the basic format, taken from the Dillo web browser package:

#!/bin/sh
#post-install script.
#creatuppy: current directory is rootfs-complete, which has the final filesystem.
#pupget: current directory is /.
#dillo is by default the default internal html viewer.
#if no other browser, then dillo will also have to be the default web browser...
if [ "`ls -1 ./usr/local/bin/ | grep --extended-regexp "opera|mozstart|links|hv3"`" = "" ];then
 echo "Configuring Dillo as the default web browser..."
  echo '#!/bin/sh' > ./usr/local/bin/defaultbrowser
  echo 'exec dillo "$@"' >> ./usr/local/bin/defaultbrowser
 echo -n "dillo" > /tmp/rightbrwsr.txt
fi

It is important to know what the "current directory" is when execution enters the script. In the Unleashed environment, directory "rootfs-complete" has the just-created complete Puppy filesystem, and rootfs-complete/ is the current directory when the script is entered.
However, when the package is downloaded and installed with PETget, the current directory is the top of the running Puppy filesystem, that is, "/".
That is why the script has a dot on front of "/usr/local/bin", so that it will work in both cases.

That "dot in front" is the only special thing that you need to remember when creating a "pinstall.sh" script.


That is from the puppy graveyard of things lost & forgotten. Luckily archive.org bot traversed that page and saved it.Whole page here PET packages

That was last updated - PAGE UPDATED: Feb 17, 2007, for Puppy v2.14+ only, when pet packages were a new concept and had replaced .pup packages in puppy 2.14

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


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

PostPosted: Tue 28 Aug 2018, 11:33    Post subject:  

bigpup wrote:
Maybe the question should be what exactly is in the pinstall.sh?

Post the contents.
Could be something in it that is trying to do something wrong for a full install Puppy.


Sure, here is one version per instructions from BK
Code:
#!/bin/sh
mv ./usr/share/applications/icon_switcher.desktop ./usr/share/applications/icon_switcher.desktop.bak
mv ./usr/share/applications/icon_switcher.desktop.new ./usr/share/applications/icon_switcher.desktop
mv ./usr/share/applications/Desktop-drive-icons.desktop ./usr/share/applications/Desktop-drive-icons.desktop.bak
mv ./usr/share/applications/Desktop-drive-icons.desktop.new ./usr/share/applications/Desktop-drive-icons.desktop
mv ./usr/share/applications/pdesktop.desktop ./usr/share/applications/pdesktop.desktop.bak
mv ./usr/share/applications/ptheme.desktop ./usr/share/applications/ptheme.desktop.bak


And here is another version without "the dot" in front of the absolute paths
Code:
#!/bin/sh
mv /usr/share/applications/icon_switcher.desktop /usr/share/applications/icon_switcher.desktop.bak
mv /usr/share/applications/icon_switcher.desktop.new /usr/share/applications/icon_switcher.desktop
mv /usr/share/applications/Desktop-drive-icons.desktop /usr/share/applications/Desktop-drive-icons.desktop.bak
mv /usr/share/applications/Desktop-drive-icons.desktop.new /usr/share/applications/Desktop-drive-icons.desktop
mv /usr/share/applications/pdesktop.desktop /usr/share/applications/pdesktop.desktop.bak
mv /usr/share/applications/ptheme.desktop /usr/share/applications/ptheme.desktop.bak


The pet installs a couple desktop files with the extension "new"
The script changes the existing similarily named desktop files to the extension ".bak" and
replaces them with the desktop files with the "new" extension by removing the .new using "mv" to change the names.

Now you can see why fixmenus is an issue if the pinstall.sh does not run, it leaves non-working programs in the menu.

.
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 3 [39 Posts]   Goto page: 1, 2, 3 Next
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.1177s ][ Queries: 12 (0.0119s) ][ GZIP on ]