Reply
Thread Tools
F2thaK's Avatar
Posts: 4,365 | Thanked: 2,467 times | Joined on Jan 2010 @ Australia Mate
#111
did you change bash to sh or sb??

where are you running script?
 
flotron's Avatar
Posts: 418 | Thanked: 506 times | Joined on Jan 2012 @ Argentina
#112
Originally Posted by F2thaK View Post
did you change bash to sh or sb??

where are you running script?
Sorry, sh

i package the scripts files ("postrm" and "preinst") inside "DEBIAN" folder with "control" file.

Then i execute the deb package
 
F2thaK's Avatar
Posts: 4,365 | Thanked: 2,467 times | Joined on Jan 2010 @ Australia Mate
#113
 
flotron's Avatar
Posts: 418 | Thanked: 506 times | Joined on Jan 2012 @ Argentina
#114
with nokia n9

and i use this script to package:

Code:
#!/bin/sh

#create .deb files for packages (fremantle&harmattan)

if [ ! $1 ];then
 echo Create .deb files for fremantle and harmattan devices
 echo Usage: make-deb /path/to/package
 exit 0
fi

#step in package directory
chdir "$1"

#versionnumber and packagename from control file
packagename=`grep "Package: " DEBIAN/control | cut -d ' ' -f 2`
versionnumber=`grep "Version: " DEBIAN/control | cut -d ' ' -f 2`

#remove old md5 and digsig sums
rm -f DEBIAN/md5sums 2>/dev/null
rm -f DEBIAN/digsigsums 2>/dev/null

#list all folders except DEBIAN
find | grep -v "./DEBIAN" > ../md5

#get md5 and digsig sums to DEBIAN/
while read line
do
 if [ -f "$line" ]; then
  #cut "./" from beginning
  line=`echo "$line" | cut -c 3-`

  #get md5
  md5sum "$line" >> DEBIAN/md5sums

  #get sha1 for digital signatures
  echo S 15 com.nokia.maemo H 40 `sha1sum "$line" | cut -c -40` R `expr length "$line"` $line >> DEBIAN/digsigsums
 fi
done < "../md5"

#remove temp file list
rm -f ../md5

#package control.tar.gz and data.tar.gz
tar -cvzf ../control.tar.gz -C DEBIAN/ . >/dev/null
tar -cvzf ../data.tar.gz . --exclude=DEBIAN >/dev/null
echo 2.0>../debian-binary

#step outside package folder
cd ..

#create debian archive "package_version.deb"
ar -rcv $packagename"_"$versionnumber.deb debian-binary control.tar.gz data.tar.gz >/dev/null

#remove packaged files
rm -f debian-binary control.tar.gz data.tar.gz 2>/dev/null
 

The Following User Says Thank You to flotron For This Useful Post:
Moderator | Posts: 6,215 | Thanked: 6,400 times | Joined on Nov 2011
#115
aha so digsigsums file is just the sha1sum values...now it will be easier to package postint and prerm files...
 
Moderator | Posts: 6,215 | Thanked: 6,400 times | Joined on Nov 2011
#116
I've read thru' this whole thread and saw a couple of posters with the following error:

Code:
tar: unrecognized option '--format=gnu'
BusyBox v1.19.0.git (MeeGo 3:1.19-8+0m6) multi-call binary.
Usage: tar -[cxtzjhmvO] [-X FILE] [-T FILE] [-f TARFILE] [-C DIR] [FILE]...
dpkg-deb: subprocess tar -cf returned error exit status 1

There is a work-around for the above:
- Download this tar file from my dropbox: http://db.tt/zSChAgJA

In terminal as root:

- cp -R /path/to/downloaded/tar /bin/

- chmod 775 /bin/tar

Now just repeat your packaging and you are done



Edit:
If you are wondering what I did; i downloaded gnu-tar to my system from harmattan sdk repo...Doing a dpkg -i to the downloaded tar didn't work as diversions are not allowed on the n9...

So i extracted from the .deb that i downloaded the above tar file and voila doing the above fixed it up...


Edit 2: Now for packaging just follow the first post's instructions with the above fix and it should work...

Last edited by thedead1440; 2012-09-02 at 06:03.
 

The Following User Says Thank You to thedead1440 For This Useful Post:
flotron's Avatar
Posts: 418 | Thanked: 506 times | Joined on Jan 2012 @ Argentina
#117
I still get "installation interrupted" even without postrm and preinst inside the deb package.

I only package this: /usr/share/themes/base/meegotouch/libsysuid-screenlock-nokia/style/libsysuid-screenlock-nokia.css

So when deb installs its replaces the original

Do my deb need some permission to replace that file? why i can install my packaged themes (/usr/share/themes) without problems and i get trouble with this (inside base folder)?
 
peterleinchen's Avatar
Posts: 4,117 | Thanked: 8,901 times | Joined on Aug 2010 @ Ruhrgebiet, Germany
#118
Aegis?
Hash tables?
Opem mode / interception?
Just a few key words, but keep in mind I do not own a N9!
 
Posts: 39 | Thanked: 8 times | Joined on Feb 2012
#119
Hello!
After doing this:
" There is a work-around for the above:
- Download this tar file from my dropbox: http://db.tt/zSChAgJA

In terminal as root:

- cp -R /path/to/downloaded/tar /bin/

- chmod 775 /bin/tar

Now just repeat your packaging and you are done"

Now I have this problem (again):
Can't install. Damaged Installation Package
More details:
http://talk.maemo.org/showthread.php?t=87576

Can you help me? I want to avoid flash--- Thanks!!
 
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 19:50.