deb2dsl script testers needed


Forum: myDSL Extensions (deprecated)
Topic: deb2dsl script testers needed
started by: cbagger01

Posted by cbagger01 on July 06 2004,05:32
Below you will find my first attempt at creating a "DEB to DSL" conversion script.

This script should convert simple *.deb packages into a *.dsl extension.  By "simple" I mean:
Debian Packages that don't have post-extraction installation scripts
or Debian Packages that attempt to upgrade existing DSL base packages

The script will grab all *.deb files in your home directory AND all *.deb files in your apt archives directory and combine them into one *.dsl file with a myDSL menu entry.

Here are the usage instructions:

(1) Start with a clean boot-up from livecd or from frugal install when building packages.
(2) Use the Apps -> Tools -> Enable Apt menu to install apt-get/dpkg.  If you try and install Synaptic the Synaptic-related packages will accidentally get sucked into your new *.dsl package unless you purge your cache.  If you need synaptic, please use it to find the exact name of your package and write it down on paper.  Then do a clean reboot and use the apt command line to install the package that you wrote down.
(3) Open a regular Xterminal and type "sudo su" to become the root user.
(4) Use 'apt-get install packagename' or 'dpkg -i packagename.deb' or both to install the needed packages. Do NOT delete the *.deb files yet.
(5) Open up scite and use the clipboard functions to copy and paste this script into scite.  Save it as "deb2dsl".
(6) Type 'exit' in the Xterminal from step (3) so that you are no longer the root user. Then type 'chmod 755 deb2dsl' to make the script executable.
(7) Type './deb2dsl' to start up the script.
(8) Answer the prompts for package name, myDSL menu name, program executable name.
(9) Your new *.dsl package should be sitting in your home directory. Save it somewhere like a hard drive or a flash drive.
(10) Test out your new package in the following manner:
Try a bootup test with dsl in root directory or with "dsl mydsl=hda1" style boot parameter
If this works OK, then reboot and try a post-boot install using the "myDSL" button on the emelfm menu.

Good Luck.

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: 0
# Date: 07/05/04
# Original Author: cbagger01 from the DSL forums
#
# 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.
for i in $( ls $HOME/*.deb ); do
   dpkg -c  $i | awk '{ print $6 }' | 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.
for i in $( ls /var/cache/apt/archives/*.deb ); do
   dpkg -c  $i | awk '{ print $6 }' | 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

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

# Add the mydsl menu file to the list of files that will be
# included into the new new dsl package
echo "./tmp/mydsl.menu/"$package_name >> /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/$package_name
rm -r /tmp/mydsl.menu
exit 0

Posted by clivesay on July 06 2004,11:18
cbagger01 -

This sounds great!! I will definitely give it a test drive today. If you do an actual install of the package instead of a -d install will that help my problem that I listed here about a missing lib file (scroll to the bottom of the thread)?
< .dsl problem >

Thanks again,

Chris

Posted by clivesay on July 06 2004,13:33
cbagger -

Here is what I get when I try to run the script. I downloaded tuxpaint. All of the .deb files are in the /var/cache/apt/archive directory. I am running the deb2dsl script from /damnsmall.

damnsmall@box:~$ deb2dsl
ls: /home/damnsmall/*.deb: No such file or directory
./deb2dsl: line 58:  : command not found
./deb2dsl: line 58:  : command not found
./deb2dsl: line 58:  : command not found
./deb2dsl: line 58:  : command not found
./deb2dsl: line 58:  : command not found
./deb2dsl: line 58:  : command not found
./deb2dsl: line 58:  : command not found
./deb2dsl: line 58:  : command not found
./deb2dsl: line 58:  : command not found
./deb2dsl: line 58:  : command not found
./deb2dsl: line 58:  : command not found
./deb2dsl: line 58:  : command not found
./deb2dsl: line 58:  : command not found
./deb2dsl: line 58:  : command not found
./deb2dsl: line 58:  : command not found
./deb2dsl: line 58:  : command not found
./deb2dsl: line 58:  : command not found
./deb2dsl: line 58:  : command not found
./deb2dsl: line 58:  : command not found
./deb2dsl: line 58:  : command not found
./deb2dsl: line 58:  : command not found
./deb2dsl: line 58:  : command not found
./deb2dsl: line 58:  : command not found
./deb2dsl: line 58:  : command not found
./deb2dsl: line 86: /tmp/mydsl.menu/$package_name: ambiguous redirect
tar: bad: Cannot stat: No such file or directory
tar: parameters: Cannot stat: No such file or directory
tar: (see: Cannot stat: No such file or directory
tar: man: Cannot stat: No such file or directory
tar: whiptail(1): Cannot stat: No such file or directory
tar: for: Cannot stat: No such file or directory
tar: details): Cannot stat: No such file or directory
tar: ./tmp/mydsl.menu/whiptail\: bad parameters (see man whiptail(1) for details                                              ): Cannot stat: No such file or directory
rsh: whiptail: Temporary failure in name resolution
tar (child): whiptail\:: Cannot open: Input/output error
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error exit delayed from previous errors
rm: cannot remove `/tmp/mydsl.menu/whiptail:': No such file or directory
rm: cannot remove `bad': No such file or directory
rm: cannot remove `parameters': No such file or directory
rm: cannot remove `(see': No such file or directory
rm: cannot remove `man': No such file or directory
rm: cannot remove `whiptail(1)': No such file or directory
rm: cannot remove `for': No such file or directory
rm: cannot remove `details)': No such file or directory

HTH

Chris

Posted by cbagger01 on July 06 2004,16:17
Chris,

Line 58 should be the "dpkg -c" line.

It appears that you have not successfully performed an "Enable Apt" because it seems that the dpkg command is not found.  There is also a slim chance that awk or grep is not found but since these programs come with the default DSL installation it is not likely.

Another possibility is that your cut-and-paste process did not go correctly.

Good Luck.

Posted by clivesay on July 06 2004,16:37
I installed the dpkg.dsl file and then did an apt-get update to get the tuxpaint packages. Do I need to specifically run the command from the menu instead of using the .dsl package? Thanks

Chris

Posted by clacker on July 06 2004,17:52
I tried to run it as follows:

<ran dsl-dpkg.dsl from emelfm>
sudo su
apt-get install xgalaga
exit
bash deb2dsl.sh

  and I got this error:

: command not found:
: command not found:
'eb2dsl.sh: line 49: syntax error near unexpected token `do
'eb2dsl.sh: line 49" `for i in $( ls $HOME/*.deb ); do


I'm running the latest release of DSL, and did nothing else before issuing those commands.

Posted by clivesay on July 06 2004,18:07
Just tried again from home during lunch.

I get the exact same result. I enable apt, go into sources to uncomment the mirrors I need for tuxpaint, update apt, install tuxpaint, copy the script to scite, save as deb2dsl, chmod 755 deb2dsl, run ./deb2dsl.

Chris

Posted by cbagger01 on July 06 2004,22:02
OK, I'm stumped.

I'll have to try and duplicate your use case, step by step, when I get home and see if I can figure out what is the problem.

The more details that you can provide, the better. I already have enough information to give it a first try.

Posted by clacker on July 06 2004,22:25
I noticed that my cut and paste bash file looked OK in scite, but in nVi it had a lot of ^M characters at the end of lines.  These were no visible in the scite editor.  Could that be the there is something funny happening at the end of the lines when you cut and paste from the web page?
Posted by cbagger01 on July 07 2004,10:46
OK,

Here are the details for my successful test:

(1) I booted base DSL from livecd.
(2) I enabled apt by choosing Apps -> Tools -> Enable Apt
(3) I opened an Xterminal by choosing XShells -> Rxvt Dark
(4) Inside the Xterminal window, I typed in:

sudo su
apt-get install xgalaga
exit

(5)  I then tried unsuccessfully to copy and paste the script into scite using both dillo and glinks.  So I installed Firefox.
(6)  I then used Firefox to copy and paste the script using the following method:  I highlighted the script by holding down the left mouse button and dragging the pointer over the "code sample" script window.  I then switched over to Scite and pushed my middle mouse button (it is a combination scroll wheel and middle button) to paste the script into scite. I then saved the script as "deb2dsl"
(7)  Inside the xterminal, I typed in the following:

chmod 755 deb2dsl
./deb2dsl

(8)  The script then runs.  I type in "xgalaga.dsl" for the package name, "xgalaga" for the menu name and "/usr/games/xgalaga" for the program name.
(9) The script ends and I have a new xgalaga.dsl file in my home directory.

I then saved the xgalaga file to my hard disk and rebooted. I opened emelfm, mounted my hard drive partition, selected xgalaga.dsl and pushed the "myDSL" button.  After the 'end of output' message appeared in the emelfm window, I checked my menu and xgalaga was there.  I tried it out and it works.

See if you can duplicate these steps and produce the same results.

Good Luck.

Posted by clivesay on July 07 2004,11:58
cbagger -

The script appears to be working now. The two dsl files I tried didn't work but I don't think it was because of the script. I tried Frozen Bubble and GCompris. They are missing some components to run under DSL it seems. Great job!! I will try some smaller packages later today.

Take care

Chris

Posted by clivesay on July 07 2004,14:12
SUCCESS!!

I created a .dsl using the script for Tux Paint. It worked beautifully!

Cbagger - I think I speak for everyone when I say THANK YOU!! This makes package creation sinfully simple!  :D

Take care

Chris

Posted by clivesay on July 07 2004,16:59
Just to confirm results I successfully built a gcompris.dsl using the files from the stable branch! Very cool!

Take care

Chris

Posted by mpie on July 07 2004,23:28
yep works like a dream thunderbird is done....
Posted by clacker on July 12 2004,17:09
After I got rid of the control characters (wound up using beaver's DOS->UNIX conversion) the script worked great.  It looks like it handled making a working Python DSL, which took me some time to do by hand when I tried it without the script(and I don't think mine worked quit right).

nice job.

Posted by ripcrd6 on Aug. 03 2004,19:32
Can you put a copy of the currently working shell script on the download site along side the frugal_lite.sh file?  Call it deb2dsl.sh.   What would be really cool is a .dsl that when run would make all the necessary changes to create the build environment.  It would be a one step process from a live cd to be ready to package new .dsl files.  If we had a webpage/form for submitting the new package directly to the right mailbox that would be extra cool.  I love automation of processes.
Ripcrd6

Posted by clivesay on Aug. 03 2004,20:19
I say this for Kent's benefit since he manages all these .dsl files.

Some people like icons with their .dsl files. Right now that is a manual process that requires some work to get the .dsl file back in shape with the correct permissions. Since deb2dsl takes care of this nonsense for you........

What if you installed your package to the livecd to capture the needed deb files.

Created whatever icon you wanted.

created a .xtdesktop dir in your /apt/archive/ dir

Copied your ink and png file to this directory.

When the script runs, it looks in the directory for a .xtdesktop along with the debs and adds it to the .dsl file!

Now you have an icon integrated with no hassle.

I guess we'll wait until cbagger01 gets back to see if he would like to tackle this one unless someone else wants to give it a try.

Chris

Posted by ico2 on Aug. 09 2004,12:14
deb2dsl won't make a dsl of freecraft.
i installed the deb version  of freecraft (including dependancies) and it ran fine.
i ran the deb2dsl script and it went fine but as the text scrolled past i saw tons of "no such file or directory errors" this happened once before when i forgot to install the packages before running the script. at the end it said delayed from previous errors and the file is smaller than it should be.
the dsl installs fine but when run it gives an error about a missing file.
i have made several successful dsls with deb2dsl in the past few days and wonder why this time it did not work. prehaps the program puts files in directories that deb2dsl doesn't grab files from.

Posted by ke4nt1 on Dec. 12 2004,20:36
bookmark
Posted by schopenhauer101 on Jan. 29 2005,01:41
The apt2dsl script rules!
I got an (stupid?) question because of a problem i have. I used the script on a .deb file that contains a program that uses a "text-gui" inside a bashwindow. If i manually want to make the fluxbox menu open it i must type "rxtv -T -e [the proggy]" Or else the program only starts if i write the executable name in a bashwindow.

I want the .dsl file to make the fluxbox menu start the app in a shell.
How can i make deb2dsl do that?

Take care/
Björn

Posted by cbagger01 on Jan. 29 2005,03:21
Two possibilities:

(1) Type in the entire command when prompted in the deb2dsl script.

(2) If that doesn't work, then edit the deb2dsl script and place a pound sign "#" in from of the last "tar" command and the last 3 "rm" commands.  Then save your script. Then run deb2dsl.
When the script is finished, open up the /tmp/mydsl.menu/packagename  file with a text editor and change the command so that it reads like you want, IE: rxvt -T etc...
Then save the file and then type in this command:

Code Sample
tar -zcvf packagename.dsl -T /tmp/deb2dsl_files.tmp -C /


and then save your new dsl extension somewhere with permanent storage and then reboot to get rid of the temporary files.

Good Luck.

Posted by schopenhauer101 on Jan. 29 2005,09:23
Thanx alot, for your help!
I was so tired when i wrote my last post that it feels like a miracle that anyone understood what i ment. I will try out your solution later this evening.

Take care/
Björn

Posted by softgun on Feb. 10 2005,07:51
Hello Chagger 01

I tried to make a postgresql dsl using your excellent script. It was actively running and I made two new databases and ran the script.
It seems to work and made the dsl. I wrote the file to the /opt directory of dsl 0.9.2

However i cannot run the program.

Postgresql starts the postgresql postmaster and this does not seems to be running now. I cannot go to /etc/init.d and run postgresql start to start the program. DOes the script grab the canges I made or only the originally downloaded deb files?

Any enligtenment regards this problem is welcome.

Posted by clivesay on Feb. 10 2005,13:58
Softgun -

It only packages up the original .debs. You can open the .dsl, edit files, and then repackage them. That way you have a custom .dsl for your needs.

Posted by softgun on Feb. 10 2005,15:24
Quote (clivesay @ Feb. 10 2005,08:58)
Softgun -

It only packages up the original .debs. You can open the .dsl, edit files, and then repackage them. That way you have a custom .dsl for your needs.

Wow!
How do I open and edit and repackage a dsl? Can I use the deb2ds to repackl or is it done "manually"  ?

I could not find this in my search :-( Is it documented anywhere?

Thanks again for your help

Posted by henk.1955 on Feb. 10 2005,15:39
< Topic: .dsl file editing utilities, a little automation never hurts >
Posted by softgun on Feb. 11 2005,11:10
Thanks a lot!
Can we open and edit uci files as well? If so how?
Please give a link if you know one.

Posted by Coma on Feb. 15 2005,13:02
Hello Chagger 01
tryed your deb2dsl script, Works great :) tested it in 0.7.1 and 0.8.0 and 0.9.3 works in all versions. Thanks so much. Made a xdrum.dsl and a xwave.dsl for testers both work great
   have the greatest day EH!
                Coma

Posted by softgun on Feb. 21 2005,18:27
Hi!

I do apt-get install zope and it installs and runs. Now I use the deb2dsl and the dsl does not work.

if I open the dsl, copy and replace whole directories from the live working system into my dsl and then repack it, will it work?

Posted by cbagger01 on Feb. 21 2005,18:55
deb2dsl will not work for packages that contain pre or post installation scripts.

You can try an alternate method of taking a snapshot of your filesystem before and after the install and then manually build a dsl extension.  Search the forums for more details.

Posted by Delboy on Feb. 23 2005,16:58
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.

Posted by cbagger01 on Feb. 24 2005,03:03
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.

Posted by cbagger01 on Mar. 02 2005,06:10
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

Posted by softgun on Mar. 02 2005,14:33
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

Posted by cbagger01 on Mar. 02 2005,18:05
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.

Posted by softgun on Mar. 03 2005,14:46
Quote (cbagger01 @ Mar. 02 2005,13:05)
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.

I was under the impression that deb2dsl script just wrapped up the debs in the sources list and not the live functioing files.
Posted by cbagger01 on Mar. 03 2005,21:59
No, deb2dsl works by gathering a list of the installed files from the *.deb package and then it grabs the actual live functioning files.

So you can tweak any file that was installed before running deb2dsl AS LONG AS you keep the filename and file path EXACTLY the same as the original files.

Posted by ke4nt1 on Mar. 03 2005,23:05
After running deb2dsl, I see the question onscreen about
deleting the /tmp/mydsl/optional ?

Is it OK to choose "yes" here?
Something relating to the last lines of the script..

73
ke4nt

Posted by softgun on Mar. 04 2005,17:19
Quote (cbagger01 @ Mar. 03 2005,16:59)
No, deb2dsl works by gathering a list of the installed files from the *.deb package and then it grabs the actual live functioning files.

So you can tweak any file that was installed before running deb2dsl AS LONG AS you keep the filename and file path EXACTLY the same as the original files.

This is good news. But i need to clarify this again. In somes programs when we apt-get them they start to run and asks to add a user and password, network address etc.

Do you mean these will also be saved when we run the deb2dsl script? Somewhere else in the forum it was mentioned that the script cannot do this. That is - if the porgrams we apt-get needed post install configuration, then deb2dsl will NOT work. According to you this is wrong.

While we can change a file we cannot add a new file or folder?.

Do you agree?

Posted by cbagger01 on Mar. 05 2005,04:39
ke4nt1,

I clipped my script and tried to build xgalaga.dsl from scratch by the book.  I did not get this question prompt.

Could you describe your specific build steps so that I can see if I can duplicate it and resolve the issue?

softgun,

Both statements are true.

1) dsl file is built from the live installed files.
2) Post install scripts will not work.

deb2dsl does it's thing by getting a list of all of the files that are contained inside your *.deb packages.  It then goes out and collects them along with a menu entry and packages it into a *.dsl file.

Usually a post-install script will create some files that do not appear in the original *.deb file list. For example, there may be some /etc/foo/foorc file or a /home/dsl/.barrc file that is created by the script and is not mentioned in the original file list.  Also, sometimes these post-install scripts will change existing system files instead of create a new file so therefore the affected files will not appear inside the original deb file list.

Hope this helps.

Posted by reidar on Mar. 08 2005,07:06
I have played around with the deb2dsl script a for some days now, and it works great! I have some questions though:

1. By default, DSL uses Debian stable in the apt sources-list. Will I screw things up if I change to Debian testing, then run apt-get install <some app> and deb2dsl? (I understand that the script is not made for coping with upgraded packages, but are there other issues if the install doesn't require upgrades?)

2. Is it possible to install several packages (apt-get install package1 package2) and then run the deb2dsl script to create one dsl-package? I tried this with xfig (which needs transfig), but with no immediate success.

3. If I don't want a menu entry (with some console based apps a menu entry is useless), is it enough to just not put in one when using the script, or do I have to make a revised version of the script, omitting the menu entry stuff?

These are just some of the issues I have come up with so far, there will surely be more questions by and by. (Mind you, these questions are not meant as a critique! I love this script! I just want to learn more about it...)

One more thing (which I am sure I could have found by searching the forum), how do I submit new dsl-packages?

-r

Posted by cbagger01 on Mar. 09 2005,02:52
1.  You can install stuff from Debian testing and even unstable or experimental with apt-get and DSL.  Just keep in mind that newer applications usually require newer dependent library versions than what is included in DSL.  So your 1 package download & install can quickly become a 18 package download and install if you aren't careful.

2.  Yes, deb2dsl will automatically incorporate multiple *.deb packages that were installed by apt-get install.  But the same rule applies: no pre/post install scripts.  Also, you will only be prompted once to add a new menu item even if you have several programs.

3.  I have never tried entering a blank menu item, but my guess is that it would fail because you would try to create a Fluxbox menu line with empty spaces within the definition and Fluxbox would probably choke on this.  It is easy to comment out the menu item lines in the code or if you want to only comment out one line, please place a "#" character at the beginning of this line:

echo "/tmp/mydsl.menu/"$menu_filename >> /tmp/deb2dsl_files.tmp


A cleaner approach would be to add a prompt to ask if you want to create a menu item (yes or no) and then skip the lines if your answer is no.

I believe that extension submissions go to:

extensions@damnsmalllinux.org

Posted by reidar on Mar. 09 2005,07:09
Thanks a lot for your response cbagger! And again: I really love your script!!!!

Your responses here have given me some more ideas and things to try out :-)

-r

Posted by adraker on Mar. 17 2005,18:44
This "may" be of help when package building....
I tried the new script (02/19/05) to build a simple ncurses
aumix extension, using dsl 1.0rc1 live.
All was well until I copied the new extension to a FAT partition, and
used Winiso and Nero to burn  live cd..... mydsl menu item would not appear
when the new extension was loaded..Every other extension worked fine.
After doing this several times, I built again, but saved to an ext 3
partition, and burnt a syslinux dsl live cd, with the new extension included
in optional folder, using Xcdroast & SuSe.
Same result, mydsl menu wouldn't update after loading new extension.
Other extensions from repository were fine.

Not until I changed owner/group on the saved extension (to SuSe user!)
would the menu "update" work on a live cd built with that extension.
I copied that extension to a FAT partition.
That worked too.
I can now use the Windows or Linux apps to make a live cd including
the new extension, and it loads and updates menu fine.
I can't explain the "ownership" thing at this stage, I would have thought
it didn't apply in the case of the FAT partition anyway, but my head is
a bit rattled after so much building.

Just thought I'd mention it...maybe someone with a clearer mind
can cause me to slap my forehead and say "Doh!".
I hope so- it's a favourite pastime lately.

Powered by Ikonboard 3.1.2a
Ikonboard © 2001 Jarvis Entertainment Group, Inc.