I have been reading about apport and its usage for a week by now. But could not understand the below things.
Scenario:
I have developed an application and packaged it. And its name is MyApp.deb
. The binary package name is MyApp
.The application is installed in the path /opt/myapplication/bin/MyApp
.
Requirement:
- When my application crashes, I want to be able to collect core dump.
- On each subsequent crash, it has to create a new crash, but not overwriting the existing one. Something like auto renaming with the current time stamp, etc would help me.
- When I install my application on a customer machine, my installer must not modify his system wide parameters. Say for example, I must not change the pattern of his core file generation, because the user/customer might hate my application as I would change his system parameters without his consent.
- I am ok with the path of core file generation. Either current directory or
/var/crash
Things that I have explored till now:
Apport is a nice utility which enables core file generations. Using /proc/sys/kernel/core_pattern
I can format core files. This provides flexibility to redirect the core files to a predefined directory, name core files with pid, file path pattern appended or prep-ended to it,etc.. For non Ubuntu packages, I have to write hooks to generate core dumps (reports). Apport after collecting the report it will upload.
Things that I do not understand:
- Is Apport the one I must be looking at?? I mean does it suffice my purpose? Or should I be looking at something else?
- What kind of package does my application fall under? Do I call it non-ubuntu? 3rd part? what is it? I see different terminologies in documents?
- As I mentioned,
MyApp
runs from/opt/myapplication/bin/MyApp
, so where will the core files be generated? Current dir or/var/crash
? Does Apport detect crashes trigerred from/opt
? Does it interpret it? - Important question: If I have developed the application and if Apport uploads the report to Ubuntu repositories, it does not make sense. So how can I tell Apport to send the report to me.
- I get this error:
executable does not belong to a package, ignoring
. So what am I doing wrong? - For apport to recognise my package, do I need to make it a source package? Is it mandatory? I just want to create a binary package?
- I also saw somewhere in the documents that Apport recognises:
- Ubuntu packages or
- Launchpad applications but my application is neither of these. So how does Apport help me in the current scenario?