Search Members Help

» Welcome Guest
[ Log In :: Register ]

Mini-ITX Boards Sale, Fanless BareBones Mini-ITX, Bootable 1G DSL USBs, 533MHz Fanless PC <-- SALE $200 each!
Get The Official Damn Small Linux Book. DSL Market , Great VPS hosting provided by Tektonic
Pages: (9) </ ... 2 3 4 5 6 [7] 8 9 >/

[ Track this topic :: Email this topic :: Print this topic ]

reply to topic new topic new poll
Topic: deb2dsl script testers needed, convert simple deb packages to dsl's< Next Oldest | Next Newest >
Delboy Offline





Group: Members
Posts: 144
Joined: Nov. 2003
Posted: Feb. 23 2005,16:58 QUOTE

I wanted to try my hand at a deb2dsl on the Sylpheed-claws enhanced e-mail programme and then some of the plug-ins such as clamav for this. I've searched everywhere but cannot find cbaggers script more recent than last July.  I thought it was supposed to be in the documentation or in the download repository.  
Anyway I tried that July one with a  Sylpheed-claws_1.1.01 .deb binary I downloaded from the (unstable) Debian site into /home/dsl and followed cbaggers
instructions.  Using Dpkg -i gave me error messages concerning lack of libs and other things needed for optional features which I don't want but I think it generally loaded OK.  I saved the script with beaver as 'deb2dsl' (no dots, no .txt file extension) in /home/dsl.  Where I came unstuck was, after chmod 755 etc., the ./deb2dsl command didn't produce anything and gave me a message:'bad interpreter - no such file or folder'.  Any Ideas where I might be going wrong?
I have been using Sylpheed-claws on my Win98 machine for a couple of years now and like it more and more.  The latest gui is better, with a ton of skins.  Maybe the base DSL iso Sypheed could be upgraded to this.  Then the plug-ins for anti-virus etc. could be made into extensions in the repository.
Back to top
Profile PM 
cbagger01 Offline





Group: Members
Posts: 4264
Joined: Oct. 2003
Posted: Feb. 24 2005,03:03 QUOTE

The July version is the most recent current version, although that may change soon.

In order to save the script, you should view the forum post via Firefox and then maximize your browser window.  Then highlight the code and ALT-TAB over to Beaver and Paste it in.

Hopefully there are no word wraps or cutoff lines.

Finally, the chmod & ./deb2dsl stuff should work fine if you succesfully installed your Deb file.

You may need to "force" an dpkg install if you have unment dependencies.

Good Luck.
Back to top
Profile PM 
cbagger01 Offline





Group: Members
Posts: 4264
Joined: Oct. 2003
Posted: Mar. 02 2005,06:10 QUOTE

Below you will find the latest version of the deb2dsl script.
The same installation instructions apply, so maximize the size of your Firefox window and use it to copy the text into your text editor of choice (currently Beaver).

What has changed?
The default .dsl menu filename has been changed at the request of the developers, and the tar function no longer produces *.dsl extensions that have a leading "./" in the filename path.

In other words, "./usr/bin/programname" is now "usr/bin/programname".

This helps ke4nt1 reduce the amount of cleanup required for new *.dsl submissions, so please start using this version of the script for any new extension builds.

Code Sample
#!/bin/bash
#
#   deb2dsl  -  Converts one or more Debian packages (*.deb files) into
# a DSL extension (*.dsl file) with prompts to create a
# myDSL Menu item for the newly created package.
#
# Revision: 1
# Date: 02/19/05
# Original Author: cbagger01 from the DSL forums
#
# Rev 1 - Removed leading . from dsl file listings and
#         removed .dsl from mydsl menu filename
#
# This script will grab all *.deb files located in your
# "Home" directory, IE: the /home/username  directory
# It will also grab all *.deb files located in your apt
# cache, IE: /var/cache/apt/archives
#
# Before running this script, you need to actually install
# all of your Debian packages using 'dpkg -i' or
# 'apt-get install' or a package manager like Synaptic.
# Do NOT delete your leftover *.deb files or purge your
# apt-cache until after you have finished running this
# script.
#
# Disclaimer:
# This script is just a file repackaging program that
# can be used for simple Debian packages.  It will not
# perform post-extraction configuration that is done
# by more sophisticated Debian packages.  It also cannot
# be used to upgrade packages from older versions
# that are part of the DSL livecd base installation.


# This script will not work if it is run under the 'root' effective
# user ID which is 0
if [ "$EUID" -eq "0" ]; then
 echo "Do not use 'root' access to run this script. Aborting..."
 exit 1
fi

# Start things out from the home directory so we won't get confused
cd $HOME

# Clean up any leftover temp files if needed
rm -rf /tmp/deb2dsl_files.tmp
rm -rf /tmp/deb2dsl_prompt.tmp

# Find all Debian packages in your home directory and grab the list of
# files that are contained inside each package.  Make sure that directory
# names are not grabbed.  Only file names will be added to the list.
# Remove leading . character from the filename list.
for i in $( ls $HOME/*.deb ); do
  dpkg -c  $i | awk '{ print substr($6,2) }' \
  | grep -v "\/$" >> /tmp/deb2dsl_files.tmp
done

# Find all Debian packages in your apt cache directory and grab the list
# of files that are contained inside each package.  Make sure that
# directory names are not grabbed.  Only file names will be added to the
# list.
# Remove leading . character from the filename list.
for i in $( ls /var/cache/apt/archives/*.deb ); do
  dpkg -c  $i | awk '{ print substr($6,2) }' \
  | grep -v "\/$" >> /tmp/deb2dsl_files.tmp
done

package_name=
whiptail --clear --nocancel \
 --inputbox "Enter the full name for your DSL package Example: rox.dsl " \
 20 74 2> /tmp/deb2dsl_prompt.tmp
package_name=`cat /tmp/deb2dsl_prompt.tmp`
rm -rf /tmp/deb2dsl_prompt.tmp

menu_name=
whiptail --clear --nocancel \
 --inputbox "Enter the myDSL menu name for your program Example: Rox Filer " \
 20 74 2> /tmp/deb2dsl_prompt.tmp
menu_name=`cat /tmp/deb2dsl_prompt.tmp`
rm -rf /tmp/deb2dsl_prompt.tmp

program_path=
whiptail --clear --nocancel \
 --inputbox "Enter the executable name for your program Example: /usr/bin/rox " \
 20 74 2> /tmp/deb2dsl_prompt.tmp
program_path=`cat /tmp/deb2dsl_prompt.tmp`
rm -rf /tmp/deb2dsl_prompt.tmp

# Create the mydsl menu directory
mkdir /tmp/mydsl.menu

# Strip the .dsl characters from the end of the mydsl menu filename
menu_filename=`echo $package_name | awk '{ print substr($0,1,length($0)-4) }'`

# Create the new mydsl menu item file
echo "[exec] ("$menu_name") {"$program_path"}" > /tmp/mydsl.menu/$menu_filename

# Add the mydsl menu file to the list of files that will be
# included into the new new dsl package
echo "/tmp/mydsl.menu/"$menu_filename >> /tmp/deb2dsl_files.tmp

# Create the new DSL package
tar -zcvf $package_name -T /tmp/deb2dsl_files.tmp -C /
rm /tmp/deb2dsl_files.tmp
rm /tmp/mydsl.menu/$menu_filename
rm -r /tmp/mydsl.menu
exit 0
Back to top
Profile PM 
softgun Offline





Group: Members
Posts: 120
Joined: Dec. 2004
Posted: Mar. 02 2005,14:33 QUOTE

Thanks Chagger01

This script makes things so much easier. However since this is static build from dbs, we need to do changes to the dsl.

How is this best done? For example i want to replace a directory called /var/lib/zope in the dsl with a zope that is working on my HDD.

This means we can easily add those which need post-install configurations etc after initially making it with your script.

I also think that the script and apt-get is best done in the command line - after starting with dsl 2

Thank you for your guidence and help
Back to top
Profile PM 
cbagger01 Offline





Group: Members
Posts: 4264
Joined: Oct. 2003
Posted: Mar. 02 2005,18:05 QUOTE

I agree about the dsl 2 commandline stuff.  If you try to use it from the GUI, most people install and try to use Synaptic and this can cause a problem because the script will then create a "YourNewProg_and_Synaptic.dsl" extension.

If you want to modify your *.dsl extension, you can use some of the tools and methods that are provided by others in the forums.

However, if you want to change a file that will be wrapped up into the *.dsl, you can do it.  Just make sure that you do it after you do your apt-get install but before you do your ./deb2dsl

So, for example, if you wanted to replace /usr/bin/links with a different file, you would install apt-get install links and then do a mv /home/dsl/mycustomfile/links /usr/bin/links

Then run the ./deb2dsl script and your new file will get wrapped up into the *.dsl package.

Hope this helps.
Back to top
Profile PM 
43 replies since July 06 2004,05:32 < Next Oldest | Next Newest >

[ Track this topic :: Email this topic :: Print this topic ]

Pages: (9) </ ... 2 3 4 5 6 [7] 8 9 >/
reply to topic new topic new poll
Quick Reply: deb2dsl script testers needed

Do you wish to enable your signature for this post?
Do you wish to enable emoticons for this post?
Track this topic
View All Emoticons
View iB Code