Some questions about deb-package of CodeLite

CodeLite installation/troubleshooting forum
KernelPanic
CodeLite Enthusiast
Posts: 15
Joined: Tue Dec 09, 2008 11:26 pm
Contact:

Some questions about deb-package of CodeLite

Post by KernelPanic »

Hello. First of all, thank you for your work and for new CodeLite version 1.0.2527
This is not a problem, but it is not convenient to recreate the debian archive from your package before adding the package to my local repository made with reprepro (the utility to make local deb-based repository).

Is it problem to make inside the deb-package the following:
1) binary file for CodeLite /usr/local/bin/CodeLite lowercase, i.e. codelite;
2) change the command section in the /debian/codelite to: command="/usr/local/bin/codelite"
3) change the Package section in the /debian/control file to: Package: codelite.
4) change sections TryExec and Exec in the /usr/share/applications/codelite.desktop:
TryExec=codelite
Exec=codelite %f

?

Why the debian control file in the CodeLite 1.0.2527 deb-package contains the section Version: 1.0.2522?
How do you create a deb-package? Cause as I know this mistake can not be done by using the native debian/ubuntu tools.

Thanks,
Alex
User avatar
eranif
CodeLite Plugin
Posts: 6367
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Some questions about deb-package of CodeLite

Post by eranif »

KernelPanic wrote:Hello. First of all, thank you for your work and for new CodeLite version 1.0.2527
This is not a problem, but it is not convenient to recreate the debian archive from your package before adding the package to my local repository made with reprepro (the utility to make local deb-based repository).

Is it problem to make inside the deb-package the following:
1) binary file for CodeLite /usr/local/bin/CodeLite lowercase, i.e. codelite;
2) change the command section in the /debian/codelite to: command="/usr/local/bin/codelite"
3) change the Package section in the /debian/control file to: Package: codelite.
4) change sections TryExec and Exec in the /usr/share/applications/codelite.desktop:
TryExec=codelite
Exec=codelite %f

?

Why the debian control file in the CodeLite 1.0.2527 deb-package contains the section Version: 1.0.2522?
How do you create a deb-package? Cause as I know this mistake can not be done by using the native debian/ubuntu tools.

Thanks,
Alex
I am using my own script to generate the control file, then simply running dpkg tool to create the package (have a look at make_deb.sh script which is under codelite source tree.
If you think you can do it better (and I am not being sarcastic here, I really mean it) I will be more than happy to accept new packaging script for debian like system.

Eran
Make sure you have read the HOW TO POST thread
KernelPanic
CodeLite Enthusiast
Posts: 15
Joined: Tue Dec 09, 2008 11:26 pm
Contact:

Re: Some questions about deb-package of CodeLite

Post by KernelPanic »

Ok, I think I can do it better, but I have some questions:

1) In the fakeroot/DEBIAN/ folder (under codelite source tree) there are no control and codelite files and your script doesn't generate (or copy) it.
How do they appear there before your script calls dpkg command?

2) For what reasons the file codelite there is at the fakeroot/DEBIAN/ folder?
It must be at the fakeroot/usr/local/share/menu/ or fakeroot/usr/share/menu/ folder for Ubuntu and Debian.

3) Why your script calls that command:
chmod -R 777 fakeroot/usr/local/share/codelite
?
It is not safety for your program. I think there must be 755 instead 777.

Alex
User avatar
eranif
CodeLite Plugin
Posts: 6367
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Some questions about deb-package of CodeLite

Post by eranif »

KernelPanic wrote:How do they appear there before your script calls dpkg command?
CodeLite uses a custom shell script (conveniently named configured), as part of this script the control file is generated (look for method 'generateControlFile')
KernelPanic wrote:2) For what reasons the file codelite there is at the fakeroot/DEBIAN/ folder?
It must be at the fakeroot/usr/local/share/menu/ or fakeroot/usr/share/menu/ folder for Ubuntu and Debian.
I cant really remember. also, this file does not exist under my machine. I create a menu entry by calling postinst script which copies codelite.desktop to /usr/share/applications/
KernelPanic wrote:3) Why your script calls that command:
chmod -R 777 fakeroot/usr/local/share/codelite
?
It is not safety for your program. I think there must be 755 instead 777.
Agreed.

Eran
Make sure you have read the HOW TO POST thread
KernelPanic
CodeLite Enthusiast
Posts: 15
Joined: Tue Dec 09, 2008 11:26 pm
Contact:

Re: Some questions about deb-package of CodeLite

Post by KernelPanic »

Ok, I found that configure script generates the control file.
And I don't know why did you do so?

This is not good idea because that way you haven't an important information for control file like Installed-Size section.

Also your control file has section "Section: Development" but in the Debian sections specification there is no such section.
So, we need to replace it with the following string:
Section: devel
User avatar
eranif
CodeLite Plugin
Posts: 6367
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Some questions about deb-package of CodeLite

Post by eranif »

KernelPanic wrote:And I don't know why did you do so?
To set the version automatically

Code: Select all

echo "Version: 1.0.${build_version}" >> fakeroot/DEBIAN/control
KernelPanic wrote:This is not good idea because that way you haven't an important information for control file like Installed-Size section.
Cant I generate it in the script?
KernelPanic wrote:Also your control file has section "Section: Development" but in the Debian sections specification there is no such section.
So, we need to replace it with the following string:
Section: devel
No problem

Eran
Make sure you have read the HOW TO POST thread
KernelPanic
CodeLite Enthusiast
Posts: 15
Joined: Tue Dec 09, 2008 11:26 pm
Contact:

Re: Some questions about deb-package of CodeLite

Post by KernelPanic »

eranif wrote:Cant I generate it in the script?
Of couse, you can, cause in make_deb.sh script you have this string:
cur_rev=`svn info | grep Revision | awk '{print $2;}'`

which you use for generating the package name ;) although, this variable is not needed, cause the version information for dpkg utility can be taken from DEBIAN/control file, so the command for making the deb-package may be like this:
dpkg -b fakeroot ./

and you'll get codelite_1.0.2527_i386.deb file (for example), because the information about system arch also will be taken from the control file :)

So, we can generate the control file from make_deb.sh file.

Alex
KernelPanic
CodeLite Enthusiast
Posts: 15
Joined: Tue Dec 09, 2008 11:26 pm
Contact:

Re: Some questions about deb-package of CodeLite

Post by KernelPanic »

Also, for getting the value of Installed-Size section we can use the command like this one:
inst_size=`du -s fakeroot/usr/ | awk -F" " '{ print $1 }'`

Alex
KernelPanic
CodeLite Enthusiast
Posts: 15
Joined: Tue Dec 09, 2008 11:26 pm
Contact:

Re: Some questions about deb-package of CodeLite

Post by KernelPanic »

eranif wrote:I cant really remember. also, this file does not exist under my machine. I create a menu entry by calling postinst script which copies codelite.desktop to /usr/share/applications/
Your postinst script makes the desktop icon for launching the Codelite, thats not good too cause many users (and I) do not want it.

The /usr/share/menu/codelite file is needed when the user does not use DE (KDE/GNOME/XFCE/etc.) on Linux but uses any WM instead.
With this file they can launch the codelite from WM menu, so it is a good tradition to produce this file.

Ok, I'll attach my version of make_deb.sh script later.

Alex
User avatar
eranif
CodeLite Plugin
Posts: 6367
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Some questions about deb-package of CodeLite

Post by eranif »

KernelPanic wrote:Ok, I'll attach my version of make_deb.sh script later.
Thanks, if u think the configure script needs to be updated as well, please do

Eran
Make sure you have read the HOW TO POST thread
Post Reply