mkdotpup: a new script to make dotpup and register it
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 =========================
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 =========================
- Attachments
-
- mrxvt-0.3.13.pup
- multi-tabbled rxvt (terminal)
- (133.84 KiB) Downloaded 1073 times
Last edited by drj on Tue 12 Jul 2005, 16:52, edited 1 time in total.
- papaschtroumpf
- Posts: 250
- Joined: Fri 17 Jun 2005, 04:23
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.
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
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.
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.
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.
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.
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
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: Select all
# 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
- papaschtroumpf
- Posts: 250
- Joined: Fri 17 Jun 2005, 04:23
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)
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
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.
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.
- papaschtroumpf
- Posts: 250
- Joined: Fri 17 Jun 2005, 04:23
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
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.
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.
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.
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
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.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
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.
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.
I appreciate that you are helping to solve these problems.
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 ) 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
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 ) 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.
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?
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
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
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?
- Attachments
-
- mrxvt-0.3.13.pup
- updated mrxvt
- (133.84 KiB) Downloaded 1067 times
-
- mkdotpup.gz
- script to make dotpup package
- (1.18 KiB) Downloaded 1148 times
Last edited by drj on Thu 30 Jun 2005, 23:25, edited 1 time in total.
- papaschtroumpf
- Posts: 250
- Joined: Fri 17 Jun 2005, 04:23
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
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
by the way, i just tried the latest mrxvt dotpup
it puts mrxvt in /usr/X11R6/bin/
but it puts this menu item in Icewm:
prog "mrsvt" mini-sh /usr/local/bin/mrxvt -sr -e Bash
so it doesn't show up in the menu
also, i don't think -e Bash will work ... i think it should be -e bash
also, i don't think "mrsvt" is spelled right
i find 99% of the time spent making a package is spent configuring and tweaking and bug-fixing and testing
it puts mrxvt in /usr/X11R6/bin/
but it puts this menu item in Icewm:
prog "mrsvt" mini-sh /usr/local/bin/mrxvt -sr -e Bash
so it doesn't show up in the menu
also, i don't think -e Bash will work ... i think it should be -e bash
also, i don't think "mrsvt" is spelled right
i find 99% of the time spent making a package is spent configuring and tweaking and bug-fixing and testing
- papaschtroumpf
- Posts: 250
- Joined: Fri 17 Jun 2005, 04:23
So right!GuestToo wrote:i find 99% of the time spent making a package is spent configuring and tweaking and bug-fixing and testing
also, how about prompting the user for a few "preconfigured" eye candy settings? If we spent the kilobytes on it, might as well use the it
Or maybe prompt the user for their own command line option before populating the menus? for example, I like the tab better at the bottom rather than at the top (I think it's -bt option), I like to save a lot of scroll lines (-sl xxxx I think) and I like the scrollbar to rxvt style because it's skinnier.
Of course I can always edit the menus myself....
Mandriva LE 2005 user and puppy newbie
sorry for typos. I have updated the package and uploaded mkdotpup script (.gz) in my previous posting. it SHOULD BE working now
GuestToo wrote:by the way, i just tried the latest mrxvt dotpup
it puts mrxvt in /usr/X11R6/bin/
but it puts this menu item in Icewm:
prog "mrsvt" mini-sh /usr/local/bin/mrxvt -sr -e Bash
so it doesn't show up in the menu
also, i don't think -e Bash will work ... i think it should be -e bash
also, i don't think "mrsvt" is spelled right
i find 99% of the time spent making a package is spent configuring and tweaking and bug-fixing and testing
mrxvtset dotpup
This is a small utility for mrxvt
I compiled it from the source code at:
http://materm.sourceforge.net/docs/settitle.c
A couple of the features I particularly like are
Enjoy!
I compiled it from the source code at:
http://materm.sourceforge.net/docs/settitle.c
- Usage:
mrxvtset -t tab_title # set tab/terminal title
mrxvtset -c tab_title # create a new tab
mrxvtset -e encoding # change encoding method
mrxvtset -g color # change tinting color
mrxvtset -s number # change shade of tinting
mrxvtset -o [-+]number # change opacity level
mrxvtset -p # activate previous tab
mrxvtset -n # activate next tab
mrxvtset -a # hide/show tabbar buttons
mrxvtset -H [m|t|s] # hide/show tabbar/scrollbar/menubar
- /root/my-applications/bin/mrxvtset
A couple of the features I particularly like are
- * hiding the scrollbar
* naming the tabs.
Enjoy!
- Attachments
-
- mrxvtset.pup
- (4.92 KiB) Downloaded 2129 times