maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Nokia N9 / N950 (https://talk.maemo.org/forumdisplay.php?f=51)
-   -   [Announce] DEB packages creator for N9/50 - v0.2.0 (https://talk.maemo.org/showthread.php?t=91053)

Schturman 2013-08-17 01:40

[Announce] DEB packages creator for N9/50 - v0.2.0
 
DEB packages creatore for N9/50

http://imageshack.us/a/img845/9449/ufbe.png http://imageshack.us/a/img41/5654/wteb.png

This is a small command-line tool that can create a small packages, for example for your mods, directly on your phone..
On your first start it will aak you which PDF instruction you want and after applying, you will find PDF file in your Documents folder. PLEASE read it to understand how to create packages.
Created package can be installed via dpkg -i or double click on the file from filebox/case.

Use created .deb files on your own risk ! I'm not responsible for any damage if it will cause to your phone :D

Package for example: Iconchanger.deb (created via DEB packager on my N9).
This package will replace icon of "empty folder" to new one and add app icon to desktop that you can check how work script as root from desktop icon.
Uninstallation will restore orig. icon.
Reboot not needed ;)
Also you can download this iconchanger.tgz and put it to: /home/user/MyDocs
Open terminal as ROOT and write:
Code:

tar xvpfz /home/user/MyDocs/iconchanger.tgz -C /home/user/MyDocs/.DEBCREATOR
It will extract all files of Icon changer package and it ready to packaging. Just look into the file how I did it..

Also, you can add my repo for updates by running this 3 commands as ROOT:
Code:

echo 'deb http://harmattan.openrepos.net/Schturman personal main' > /etc/apt/sources.list.d/openrepos-Schturman.list
Code:

wget -O - http://harmattan.openrepos.net/openrepos.key | apt-key add -
Code:

apt-get update
And you will get system updates when update will be ready ;)


PDF instruction (EN)
PDF instruction (RU)

Download DEB packager v0.2.0
Download DEB packager v0.1.9


Changelog:

v0.2.0
* now on option one, if executable or binary files not exist, the Creator will NOT add automatically all other files to digsigsums. Because of this fixed "hash" problem during installation of your package (thanks to Coderus for help).

v0.1.9
* Support UTF-8, now you can write description in your own language in the control file.

v0.1.8
* Now creating icon in control file work also for users that not have busybox-power.
* Fixed letter M (return to menu).

v0.1.7
* Small notification fix.

v0.1.6
* Automatically will add new size to control file (if exist) every time you will repackage (update) your app.

v0.1.5
* Possibility to change only version number and icon in existed control file, for example if you update your app.
* Some commands changed.

v0.1.4
* Automatically save your created control file to source folder.

v0.1.3
* Added option to insert Depends when it create "control" file.

v0.1.2
* PDF instruction - updated
* Fixed small issue with digsigsums option. Also added some new options for digsigsums.

v0.1.1
* PDF instruction - updated.
* Automated process of creating the control file. If you don't have control file before packaging, just start app ;) (read PDF instruction).

v0.1.0
* PDF instruction - updated.
* Automated process of adding icon and aegis-matifest line to control file. That mean you can use basic control file (ex. in pdf). Read PDF instruction !
* Package have dependencies (2 packages). They installed automatically if you install package by clicking on the file. If you install via terminal, run this command at the end:
Code:

apt-get install -f -y
v0.0.9
* PDF instruction updated.
* Added option for "rules" file (see PDF instruction)

v0.0.8
* Changed one command, now work also in standard BusyBox, not only busybox power :)

v0.0.7
* PDF instruction updated (added russian pdf)
* After installation it will ask which pdf instruction you want.

v0.0.6
* Disabled auto-exit when you get errors.

v0.0.5
* PDF instruction updated
* Added option to which files you want to add digsigsums (binary & executable only or all files).
* Added option to add Aegis-Manifest (see PDF instruction).
* Example package (Iconchanger.deb) and source (iconchanger.tgz) updated.

v0.0.4
* Added md5sums and digsigsums to packaging process.

v0.0.3
* PDF instruction updated
* Script completely changed. Now it can package 5 packages (see PDF instruction)
* Auto-exit disabled, now for exit you need press Enter...
* Working folder now is hidden folder (/home/user/MyDocs/.DEBCREATOR)

v0.0.2
* Creating packages moved from /home/user to /opt

F2thaK 2013-08-17 01:57

Re: [Announce] DEB packages creator for N9/50
 
Nice one!............

chenliangchen 2013-08-17 03:39

Re: [Announce] DEB packages creator for N9/50
 
This is great! That icon thread then will have easier options for more people! :D

MK99 2013-08-17 06:39

Re: [Announce] DEB packages creator for N9/50
 
Here is some permission issue :confused::confused:
Is this because off me or app?
I made manually /home/user/DEBCREATOR folder, but same result.

http://imageshack.us/photo/my-images/268/j3nr.png/

coderus 2013-08-17 07:29

Re: [Announce] DEB packages creator for N9/50
 
@MK99 no such file or directory is not a permission issue. it means no such file or directory :D

MK99 2013-08-17 07:33

Re: [Announce] DEB packages creator for N9/50
 
But it not create /home/user/DEBCREATOR folder.

I made it manually and cmod 0777, now it works and my first .deb is created.

pleasurebd 2013-08-17 07:37

Re: [Announce] DEB packages creator for N9/50
 
How to create a Control file?

coderus 2013-08-17 07:41

Re: [Announce] DEB packages creator for N9/50
 
aha, i see now.
v0.0.1 just poor version, i think it need some updates from Schturman :)

Schturman 2013-08-17 10:21

Re: [Announce] DEB packages creator for N9/50
 
MK99 it should be in: /home/user/MyDocs/DEBCREATOR
the first command from the creator is:
Code:

cp -rf /home/user/MyDocs/DEBCREATOR /home/user
Why it not have permission for you I don't know... For me it worked something like 6-7 or more times (tests)...

Coderus, I know that it poor :D But it do his job... for me at least. Packaging simple mod directly on the phone...

coderus 2013-08-17 11:01

Re: [Announce] DEB packages creator for N9/50
 
you starting script as root. how you think it should copy something in user directory with root privileges, a?

Schturman 2013-08-17 11:24

Re: [Announce] DEB packages creator for N9/50
 
I know this and like I said before it worked in all my tests :confused::eek:
Ok, I will add
Code:

devel-su user -c "command"
PS, or i can copy it to /opt for example and ado all this here. At the end from opt it can copy package back to /home/user...

Schturman 2013-08-17 12:03

Re: [Announce] DEB packages creator for N9/50 - v0.0.2
 
1 Attachment(s)
Updated to v0.0.2 (first post)
* Creating packages moved from /home/user to /opt

Again I don't have any problem with creating packages and copying the created packages to MyDocs..
Example icon changer that I created just now...

MK99, please try this new version and get screenshot before it will close itself. Report here...

MK99 2013-08-17 12:39

Re: [Announce] DEB packages creator for N9/50 - v0.0.2
 
https://www.dropbox.com/s/r5ou63mnpa...7_15-23-47.png

Now it is working. But my file isn't. ;)

Schturman 2013-08-17 12:58

Re: [Announce] DEB packages creator for N9/50 - v0.0.2
 
OK, good :)
If you .deb not do what it should do, check your files (path), check your scripts (postinst, preinst, postrm, prerm).
PS. created file installable and uninstallable ? What exactly not work ?

coderus 2013-08-17 13:14

Re: [Announce] DEB packages creator for N9/50 - v0.0.2
 
can you explain why you need to be a root?

Schturman 2013-08-17 13:25

Re: [Announce] DEB packages creator for N9/50 - v0.0.2
 
For this:
Code:

cp -f /opt/dpkgcreator/tar /bin && chmod 777 /bin/tar
ln -sf busybox /bin/tar

If you are user, you will get:
Code:

~ $ cp -f /opt/dpkgcreator/tar /bin
cp: can't create '/bin/tar': File exists
~ $ ln -sf busybox /bin/tar
ln: /bin/tar: File exists
~ $


coderus 2013-08-17 13:31

Re: [Announce] DEB packages creator for N9/50 - v0.0.2
 
Code:

export PATH=$PATH:/opt/dpkgcreator
add it to your packaging script

MK99 2013-08-17 13:35

Re: [Announce] DEB packages creator for N9/50 - v0.0.2
 
Quote:

Originally Posted by Schturman (Post 1367854)
OK, good :)
If you .deb not do what it should do, check your files (path), check your scripts (postinst, preinst, postrm, prerm).
PS. created file installable and uninstallable ? What exactly not work ?

Two things need to learn...
My opt folder need to right permission and my deb doesn't show on app-manager. :rolleyes:

Schturman 2013-08-17 13:51

Re: [Announce] DEB packages creator for N9/50 - v0.0.2
 
Quote:

Originally Posted by coderus (Post 1367862)
Code:

export PATH=$PATH:/opt/dpkgcreator
add it to your packaging script

Andrey, before I decided to do it like i did I tried it a many times.. I manually added it to PATH (/root/.profile), but it just not want to work... Only when I copied tar to /bin and give permission 777, only after this it worked for me...

Also it need permission 755 to DEBIAN folder and included files. if it in MyDoc, I can't change it... And without changing I get this error and package not created:
Quote:

~ $ dpkg-deb -b /home/user/MyDocs/DEBCREATOR/iconchanger /home/user/MyDocs/DEBCREATOR
dpkg-deb: warning: '/home/user/MyDocs/DEBCREATOR/iconchanger/DEBIAN/control' contains user-defined field 'Maemo-Display-Name'
dpkg-deb: warning: '/home/user/MyDocs/DEBCREATOR/iconchanger/DEBIAN/control' contains user-defined field 'Maemo-Flags'
dpkg-deb: warning: '/home/user/MyDocs/DEBCREATOR/iconchanger/DEBIAN/control' contains user-defined field 'Maemo-Icon-26'
dpkg-deb: building package `iconchanger' in `/home/user/MyDocs/DEBCREATOR/iconchanger_0.0.2_armel.deb'.
dpkg-deb: control directory has bad permissions 777 (must be >=0755 and <=0775)
But like I already said I don't have any problem when it work in /home/user or now in /opt ;)

PS. Later I will try something else to get it run as user...

Schturman 2013-08-17 13:58

Re: [Announce] DEB packages creator for N9/50 - v0.0.2
 
MK99, scripts in DEBIAN folder to write permission to your folders.
About not shown in apps manager, it weird.. Maybe it not installed properly ? Don't know...
Download my iconchanger packaged, put it to MyDocs somewhere and extract the content, to see how I use scripts..
Code:

dpkg-deb -x /path/to/deb-package-name /path/to/target directory && dpkg-deb -e /path/to/deb-package-name /path/to/target directory/DEBIAN

lorenzo 2013-08-17 16:39

Check pdf, i can't read almost anything

Schturman 2013-08-17 17:01

Re: [Announce] DEB packages creator for N9/50 - v0.0.2
 
pdf is ok, use zoom if letters too small for you...

Schturman 2013-08-17 17:41

Re: [Announce] DEB packages creator for N9/50 - v0.0.2
 
Ok, I tried different variation to get it work as user, but without success...
* used /etc/profile and /root/.profile.. nothing...
I always get errors about tar. Andrey like you said orig tar is included in busybox and probably it always start to use it first... Only when I change it in /bin with file from my package it start to work...

zaidk9 2013-08-17 18:05

Is this the same as tweak X in n9qtweak??

zaidk9 2013-08-17 18:27

@lorenzo thats the problem with n9.. Transfer it tosome other phone or pc ;)

Schturman 2013-08-17 18:34

Re: [Announce] DEB packages creator for N9/50 - v0.0.2
 
Quote:

Originally Posted by zaidk9 (Post 1367898)
Is this the same as tweak X in n9qtweak??

No It's not... Read first post.

PS. I will add pdf to the first post too.
PS2. You can read pdf on n9 without any problem, just use zoom if text is too small for you.

PS3. PDF added to first post.

valdur55 2013-08-17 20:42

Re: [Announce] DEB packages creator for N9/50 - v0.0.2
 
Try to use alias
for test: alias tar='echo a' ; tar
It will just print letter a.
You can't set linux filesystem premissions in windows (FAT) filesystem so MyDocs is wrong folder (partition).

Schturman 2013-08-17 21:45

Re: [Announce] DEB packages creator for N9/50 - v0.0.2
 
Hmm.... what you talking about ? If you mean for this post: http://talk.maemo.org/showpost.php?p...4&postcount=19
I know that I can't change permission in (FAT) filesystem. I tried also in /home/user in /opt etc... tar start to work only when I copied needed file "tar" to /bin.

Never mind, it work like it work :)

Schturman 2013-08-17 22:01

Re: [Announce] DEB packages creator for N9/50 - v0.0.2
 
MK99, look into the first post again, I added .tgz file that you can download and extract and learn how i did it ;)

Alexxxl 2013-08-17 22:29

Re: [Announce] DEB packages creator for N9/50 - v0.0.2
 
Everything is working fine! Schturman thank you again!
This greatly simplifies life))) :D

Schturman 2013-08-17 23:56

Re: [Announce] DEB packages creator for N9/50 - v0.0.2
 
Look in your pm on lolnokia about themes... ;)

chiragkapuriya 2013-08-18 04:52

Re: [Announce] DEB packages creator for N9/50 - v0.0.2
 
nice one! will make some moded apps ;) :P

MK99 2013-08-18 05:00

Re: [Announce] DEB packages creator for N9/50 - v0.0.2
 
1 Attachment(s)
Quote:

Originally Posted by Schturman (Post 1367942)
MK99, look into the first post again, I added .tgz file that you can download and extract and learn how i did it ;)

You make this too easy. :) I just don't have time to play these right now.
Maybe tomorrow.... Thanks!

E: I couldn't wait... Can you check this. It give two errors on control, but deb is working. :D Result of the install/uninstall is correct.

Schturman 2013-08-18 09:04

Re: [Announce] DEB packages creator for N9/50 - v0.0.2
 
If you mean this two errors like in your image: https://www.dropbox.com/s/r5ou63mnpa...7_15-23-47.png
it's ok :)
Will check your package later, what it should do?

PS. Probably today i will release new version that will work with 5 packages :)

MK99 2013-08-18 09:15

Re: [Announce] DEB packages creator for N9/50 - v0.0.2
 
...ignoring 2 warnigs about the control file...

https://www.dropbox.com/s/51sqpfkvm2...5_12-11-55.png

Schturman 2013-08-18 11:34

Re: [Announce] DEB packages creator for N9/50 - v0.0.2
 
Ok, good. This mod work on all themes or only Blanco? If only Blanco you can use checking command and it will chose active theme.

MK99 2013-08-18 13:37

Re: [Announce] DEB packages creator for N9/50 - v0.0.2
 
It's for blanco and works Kebbanas theme also.
Hmm.. checking command. Let see... ;)

Did you mean, if using "transparent" theme, meegotouchchrome-folder goes to transparent... folder?

Schturman 2013-08-18 13:47

Re: [Announce] DEB packages creator for N9/50 - v0.0.2
 
Activate any theme except Blanco and run this command:
Code:

gconftool -g /meegotouch/theme/CurrentMeegoTheme
It should show the current theme...

Schturman 2013-08-18 19:17

Re: [Announce] DEB packages creator for N9/50 - v0.0.3
 
New version ready (0.0.3) :D
Update and changelog from the first post...

MK99 2013-08-18 19:41

Re: [Announce] DEB packages creator for N9/50 - v0.0.3
 
Is there any limit to the size of the deb file? 500Mt, 1Gt?
If i put all app and mod to one deb... :p


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

vBulletin® Version 3.8.8