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 Wed 30 Jul 2014, 23:59
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Unsorted
mkdotpup: a new script to make dotpup and register it
Moderators: deshlab, Flash, GuestToo, Ian, JohnMurga, Lobster
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 2 [30 Posts]   Goto page: 1, 2 Next
Author Message
drj

Joined: 26 Jun 2005
Posts: 41

PostPosted: Wed 29 Jun 2005, 13:43    Post subject:  mkdotpup: a new script to make dotpup and register it  

I wrote a bash script to create dotpup package from a filelist. it generates potpup.sh (needs to customize pre/post tasks) and then *.pup package. when the package installed, it also registers with PupGet.

usage:

1. create a filelist for all files in the package. The filename should be
packagename-release-filelist
for example: mrxvt-0.3.13-filelist

Content of mrxvt-0.3.13-filelist:

# All files to be distributed, in ABSOLUTE PATH
/usr/X11R6/bin/mrxvt
/usr/lib/libutempter.so.1.1.1
/usr/X11/share/pixmaps/mrxvt.xpm
/usr/X11/share/pixmaps/mrxvt.png
/usr/X11/share/pixmaps/mrxvt-root.xpm
/usr/X11/share/pixmaps/mrxvt-root.png

2. customize mkdotpup for pre/post tasks

3. execute
./bkdotpup mrxvt-0.3.13-filelist

4 package mrxvt-0.3.13.pup will be created

5. when install, mrxvt-0.3.13 will also be registered with PupGet and shows up in PupGet Package Manager

enjoy

PS: somehow I can not upload the script (the extension array is not allowed). I am copy&paste it here. it is small

#============ Cut =========================
#!/bin/bash
#
# This script makes dotpup package for Puppy Linux.
# version 0.0.1, DrJ, 06/29/2005
#
# It takes one argument as following format: packagename-release-filelist
# example: ./mkdotpup mrxvt-0.3.13-filelist
#
#

# minimum check
if (( $# != 1 ))
then
echo -e "Usage: \n./mkdotpup packagename-release-filelist \n"
exit 1
else
PACKAGE=${1%-filelist}
fi

# tar all files
cat ${PACKAGE}-filelist | grep "^/" > /tmp/${PACKAGE}.files
echo "/tmp/${PACKAGE}.files" >> /tmp/${PACKAGE}.files
cat /tmp/${PACKAGE}.files | tar czvpPf ${PACKAGE}.tar.gz -T -

# do the md5sums
md5sum -b ${PACKAGE}.tar.gz >> md5sum.txt

# make dotpup (actually zip) file
rm -f ${PACKAGE}.pup
zip -9 ${PACKAGE}.pup ${PACKAGE}.tar.gz md5sum.txt


# Customize pre/post-unzip tasks to fit your package
#
# create dotpup.sh
PNAME=${PACKAGE%%-*}
PSIZE=`du ${PACKAGE}.pup|cut -f "1"`
cat > dotpup.sh <<EOF
#!/bin/bash
#
# all regular shell tricks go

# pre-unzip tasks
#

# unzip the files using absolute paths, normally no changes needed
tar -xzpvP --no-same-owner -f ${PACKAGE}.tar.gz

# post-unzip tasks
#
ln -sf /usr/lib/libutempter.so.1.1.1 /usr/lib/libutempter.so
ln -sf /usr/lib/libutempter.so.1.1.1 /usr/lib/libutempter.so.0

# Register with PupGet as an alien package
echo '"${PNAME}" "${PACKAGE}" on "XLIBAPPS ${PSIZE}K" \\' >> /root/.packages/alienpackages.txt
echo "${PACKAGE}" > /root/.packages/${PACKAGE}.keyword
mv /tmp/${PACKAGE}.files /root/.packages/${PACKAGE}.files

exit 0

EOF
# End of customization

# add dotpup.sh to the package
chmod +x dotpup.sh
zip -u ${PACKAGE}.pup dotpup.sh

#clean-up
rm -f dotpup.sh ${PACKAGE}.tar.gz md5sum.txt /tmp/${PACKAGE}.files

exit 0

#============ Cut =========================
mrxvt-0.3.13.pup
Description  multi-tabbled rxvt (terminal)
pup

 Download 
Filename  mrxvt-0.3.13.pup 
Filesize  133.84 KB 
Downloaded  774 Time(s) 

Last edited by drj on Tue 12 Jul 2005, 12:52; edited 1 time in total
Back to top
View user's profile Send private message 
papaschtroumpf


Joined: 17 Jun 2005
Posts: 250

PostPosted: Wed 29 Jun 2005, 14:09    Post subject:  

That's a good start.
You now need to add code to have the program register itself in the menus, most DotPups don't.
Sample code can be found in my FTP server package ( http://www.murga.org/%7Epuppy/viewtopic.php?p=4475#4475 ) for examples on how to register a program with fvwm95, jwm and icewm menus. Easy enough to add other WMs.
I found the easiest way to add oneself to the menu is to look for an entry that is part of the unleashed suite becuase it will always be in the file even if it's commented out.
For example my ftp server inserts itself before the LinNeighbourhood entry, even if LinNeighbourhood is not installed.

_________________
Mandriva LE 2005 user and puppy newbie
Back to top
View user's profile Send private message 
drj

Joined: 26 Jun 2005
Posts: 41

PostPosted: Wed 29 Jun 2005, 15:05    Post subject:  

yeah, it is on my list

I am kind of in a waiting mood, for 1.0.4 and VL5Std. I am in VMWare session.


papaschtroumpf wrote:
That's a good start.
You now need to add code to have the program register itself in the menus, most DotPups don't.
Sample code can be found in my FTP server package ( http://www.murga.org/%7Epuppy/viewtopic.php?p=4475#4475 ) for examples on how to register a program with fvwm95, jwm and icewm menus. Easy enough to add other WMs.
I found the easiest way to add oneself to the menu is to look for an entry that is part of the unleashed suite becuase it will always be in the file even if it's commented out.
For example my ftp server inserts itself before the LinNeighbourhood entry, even if LinNeighbourhood is not installed.
Back to top
View user's profile Send private message 
Flash
Official Dog Handler


Joined: 04 May 2005
Posts: 10948
Location: Arizona USA

PostPosted: Wed 29 Jun 2005, 15:08    Post subject:  

So, should I put this in the index, or consider it a beta release and leave it out for now?
Back to top
View user's profile Send private message 
Bruce B


Joined: 18 May 2005
Posts: 11080
Location: The Peoples Republic of California

PostPosted: Wed 29 Jun 2005, 17:07    Post subject:  

Flash, it a nice script. I don't think the script is as important, as is the idea of registering the dotpups under certain circumstances.

People making the dotpups should get the idea that they need to register the dotpups when using /usr (actually /root/.usr), because they will be deleted in installation type 1 Puppy upgrades.

As for my own computer, I don't really care, because I do a fresh install when I upgrade. Also, I save the dotpups, and they are very easy to install.

I wonder, if the user modifications to the jvm and fvwm95 menus get lost when an upgrade is made? I would think so. Anyone know for sure?

In answer to your question, I humbly suggest: Put it in the index as a discussion on registering dotpup files.

Also, drj is sharp and creative with his scripting and dotpup making, especially considering he or she is just starting making dotpups. An asset to us dotpup lovers. I hope he sticks around.
Back to top
View user's profile Send private message 
Bruce B


Joined: 18 May 2005
Posts: 11080
Location: The Peoples Republic of California

PostPosted: Wed 29 Jun 2005, 17:34    Post subject:  

I installed and inspected mrxvt-0.3.13.pup and it looks good IMO.

I think people wanting to register dotpups might want to study this package.

Disclaimer: I consider GuestToo the world's foremost expert on dotpups, not me for sure.

Here is the portion of dotpup.sh which registers the the package

Code:
# Register with PupGet as an alien package
echo '"mrxvt" "mrxvt-0.3.13" on "XLIBAPPS 135K" \'>>/root/.packages/alienpackages.txt
echo "mrxvt-0.3.13" > /root/.packages/mrxvt-0.3.13.keyword
mv /tmp/mrxvt-0.3.13.files /root/.packages/mrxvt-0.3.13.files
Back to top
View user's profile Send private message 
papaschtroumpf


Joined: 17 Jun 2005
Posts: 250

PostPosted: Wed 29 Jun 2005, 17:58    Post subject:  

One important thing could be missing in the registration with PupGet, or for a DotPup in general: the cleanup stage on installation.

PupGet will automatically delete the files in the XXXX.files list, but that's all the cleanup it does. Depending on your application you may need to do more significant cleanup when it gets removed (for example removing the menu entries). You can reacte a XXXX.remove script in the .packages dirctory (see the betaftpd package example).

DotPups only do the cleanup that you script for them.

Of course it ets even trickier when you deal with libraries since other applications may rely on them and installing/uninstalling the package may break others if you remove the libraries.



As anyone made a Dotpup to Unleashed script? I really want to have some things on the CD from the start rather than adding them on later (such as mrxvrt as a replacment for rxvt)

_________________
Mandriva LE 2005 user and puppy newbie
Back to top
View user's profile Send private message 
Bruce B


Joined: 18 May 2005
Posts: 11080
Location: The Peoples Republic of California

PostPosted: Wed 29 Jun 2005, 19:10    Post subject:  

Different window managers of course operate differently.

I use icewm and it has some pretty cool features as explained below:

For example, if an application is removed it will not show up in the menu. The menu doesn't need to be modified to accomodate application removal.

Also, if whoever writes the menu (to date it has been GuestToo), anticipates certain applications may get installed, (which he does), he can included them in the menu. Then, if the application gets installed, it will show up automatically.
Back to top
View user's profile Send private message 
papaschtroumpf


Joined: 17 Jun 2005
Posts: 250

PostPosted: Wed 29 Jun 2005, 22:24    Post subject:  

you can't make Dotpups that only work properly on icewm. Well, you can, I suppose, but that's not very user friendly, unless iceWM brcomes the officla puppy WM Very Happy

That's one of the problems about adding a bunch of windows managers to puppy. (see this thread about how that could be addressed)

Even with iceWM you still would need to add your app to the menu file, unless GuestToo's crystal ball is really good. Razz

Inserting menu items is really not that hard, one if these days I'll write instructioms/sctips for doing in, unless someone beats me to it.

_________________
Mandriva LE 2005 user and puppy newbie
Back to top
View user's profile Send private message 
Bruce B


Joined: 18 May 2005
Posts: 11080
Location: The Peoples Republic of California

PostPosted: Wed 29 Jun 2005, 22:38    Post subject:  

papaschtroumpf wrote:
you can't make Dotpups that only work properly on icewm. Well, you can, I suppose, but that's not very user friendly, unless iceWM brcomes the officla puppy WM Very Happy

That's one of the problems about adding a bunch of windows managers to puppy. (see this thread about how that could be addressed)

Even with iceWM you still would need to add your app to the menu file, unless GuestToo's crystal ball is really good. Razz

Inserting menu items is really not that hard, one if these days I'll write instructioms/sctips for doing in, unless someone beats me to it.


Good, I'm glad to learn that it is not hard to write the menu item scripts. Due to the fact that it is not hard, as you state, it shouldn't take much waiting on our part for you to write those scripts? I hope.

I appreciate that you are helping to solve these problems.
Back to top
View user's profile Send private message 
Guest
Guest


PostPosted: Thu 30 Jun 2005, 08:59    Post subject:  

heartly thanks for your comments

Honestly I chose Puppy Linux over other small distributions (say DSL, Feather ) due to the fact Puppy was young (~ 2 years, otherwise we should calll it DOG Laughing ) and there were some edges need to be polished. Hopefully my experience (10 yrs with Linux and making breads in IT) could be of assistance here

Bruce B wrote:

Also, drj is sharp and creative with his scripting and dotpup making, especially considering he or she is just starting making dotpups. An asset to us dotpup lovers. I hope he sticks around.
Back to top
drj

Joined: 26 Jun 2005
Posts: 41

PostPosted: Thu 30 Jun 2005, 09:07    Post subject:  

Should iceWM be the official WM for Puppy, along with xp theme, it COULD be a XP/Windows95 machine (was it the reason to use fvwm95 originally, so that Windows users would be at ease?). iceWM menu management (auto hide when appl is not available has 1 point plus over fvwm95)

do we know how many use iceWM as default WM?

papaschtroumpf wrote:
you can't make Dotpups that only work properly on icewm. Well, you can, I suppose, but that's not very user friendly, unless iceWM brcomes the officla puppy WM Very Happy
Back to top
View user's profile Send private message 
drj

Joined: 26 Jun 2005
Posts: 41

PostPosted: Thu 30 Jun 2005, 15:04    Post subject:  

OK Flash, you can put mrxvt to your index. The new make will add entry to all three WMs (ice, fvwm95 and jwm)

still don't know how to post the script (mkdotpup)

Edit:
correct typo and upload mkdotpup script


Flash wrote:
So, should I put this in the index, or consider it a beta release and leave it out for now?
mkdotpup.gz
Description  script to make dotpup package
gz

 Download 
Filename  mkdotpup.gz 
Filesize  1.18 KB 
Downloaded  823 Time(s) 
mrxvt-0.3.13.pup
Description  updated mrxvt
pup

 Download 
Filename  mrxvt-0.3.13.pup 
Filesize  133.84 KB 
Downloaded  778 Time(s) 

Last edited by drj on Thu 30 Jun 2005, 19:25; edited 1 time in total
Back to top
View user's profile Send private message 
papaschtroumpf


Joined: 17 Jun 2005
Posts: 250

PostPosted: Thu 30 Jun 2005, 15:40    Post subject:  

I'd love to see an unleashed to build it in a liveCD (et rid of xtvt altogether ans symlink it to mxrvt)
_________________
Mandriva LE 2005 user and puppy newbie
Back to top
View user's profile Send private message 
GuestToo
Puppy Master

Joined: 04 May 2005
Posts: 4078

PostPosted: Thu 30 Jun 2005, 17:11    Post subject:  

you can zip the script and upload it

or you could put the script in a dotpup ... the dotpup could install it in my-documents or my-applications/bin ... and with the md5sum check, you know that the script downloaded perfectly

a dotpup.sh script could give the option of installing the program or creating an unleashed package
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 2 [30 Posts]   Goto page: 1, 2 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Unsorted
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.0981s ][ Queries: 13 (0.0076s) ][ GZIP on ]