Bug#750989: /usr/share/apport/apport-gtk: apport-gtk is complaining that the report is invalid and that permission is not granted
Control: tag -1 +pending On 09/09/2014 04:40 PM, Laurent Bigonville wrote: Le Tue, 09 Sep 2014 12:36:31 +0530, Ritesh Raj Sarraf r...@researchut.com a écrit : On Tuesday 09 September 2014 05:39 AM, Laurent Bigonville wrote: Did you play with the change you had proposed ? I tried it but now I do not get the apport popups. I'll look into it sometime later but if you already did, please do share your results. No I didn't really test it it was a wild guess, sorry. This is not seeming to work. All the crash reports are owned by me. Also, syslog reports of firing the command. Need to look into more detail. I guess it's not working because it's monitoring a full directory? Hey Laurent, I looked again into this issue. And you were right. IN_CLOSE_WRITE is serving all the needs. I missed to push this change in today's upload, but very soon I'll push that too. It is already fixed in the git repo in commit id: b2aa033 Again, thanks for your input. -- Ritesh Raj Sarraf RESEARCHUT - http://www.researchut.com Necessity is the mother of invention. signature.asc Description: OpenPGP digital signature
Bug#750989: /usr/share/apport/apport-gtk: apport-gtk is complaining that the report is invalid and that permission is not granted
On Tuesday 23 September 2014 03:56 AM, Laurent Bigonville wrote: Please find here a patch. I rewrote apport-notifyd based on what ubuntu is doing in the update-notifier code. The patch is also bumping the debhelper compatibility so we are getting the hardening flags automatically for the notifier daemon. This should also fix #750471 and #760097 The debian/copyright file should probably also be adjusted. But what happens on KDE (or non-gtk based systemss) ?? We should look for something more generic. pkexec is good but it is priority optional. But we could ad it to Recommends. -- Ritesh Raj Sarraf RESEARCHUT - http://www.researchut.com Necessity is the mother of invention. -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#750989: /usr/share/apport/apport-gtk: apport-gtk is complaining that the report is invalid and that permission is not granted
On Tuesday 23 September 2014 02:11 PM, Ritesh Raj Sarraf wrote: But what happens on KDE (or non-gtk based systemss) ?? We should look for something more generic. pkexec is good but it is priority optional. But we could ad it to Recommends. Perhaps you can help here. WHen using kdesudo or gksu, along with apport-bug, it brings up the GUI. Where as when using pkexec, it calls apport-cli. This is on a bug report that is readable only by root. Why does it happen so ? I was thinking of using pkexec and adding a Depends for it on apport-notify package. -- Ritesh Raj Sarraf RESEARCHUT - http://www.researchut.com Necessity is the mother of invention. -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#750989: /usr/share/apport/apport-gtk: apport-gtk is complaining that the report is invalid and that permission is not granted
On Tuesday 23 September 2014 02:50 PM, Ritesh Raj Sarraf wrote: I was thinking of using pkexec and adding a Depends for it on apport-notify package. Looks like that won't work because the pkexec man page clearly states that. -- Ritesh Raj Sarraf RESEARCHUT - http://www.researchut.com Necessity is the mother of invention. -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#750989: /usr/share/apport/apport-gtk: apport-gtk is complaining that the report is invalid and that permission is not granted
On Tuesday 23 September 2014 03:02 PM, Ritesh Raj Sarraf wrote: On Tuesday 23 September 2014 02:50 PM, Ritesh Raj Sarraf wrote: I was thinking of using pkexec and adding a Depends for it on apport-notify package. Looks like that won't work because the pkexec man page clearly states that. There are many more use case problems. And I think these approaches are not flexible. We need to act of self reports and system reports, i.e. reports owned by root ?? Or more ?? What if apache crashes? It may have ownership www-data. Do we care about it ? We need to flash the corresponding tool (a-gtk, a-kde or a-cli) based on the environment. I checked apport-bug and it alone is not enough. Thus I think we should replace it with one of our own. So there's a lot of housekeeping to do. Hence I think we should stick to something like Python. apport is written in Python and we may leverage things in the future. I quickly looked on the web and the best I found was this: https://github.com/splitbrain/Watcher/blob/master/watcher.py What do you say ?? -- Ritesh Raj Sarraf RESEARCHUT -http://www.researchut.com Necessity is the mother of invention. -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#750989: /usr/share/apport/apport-gtk: apport-gtk is complaining that the report is invalid and that permission is not granted
Le Tue, 23 Sep 2014 14:11:06 +0530, Ritesh Raj Sarraf r...@researchut.com a écrit : On Tuesday 23 September 2014 03:56 AM, Laurent Bigonville wrote: Please find here a patch. I rewrote apport-notifyd based on what ubuntu is doing in the update-notifier code. The patch is also bumping the debhelper compatibility so we are getting the hardening flags automatically for the notifier daemon. This should also fix #750471 and #760097 The debian/copyright file should probably also be adjusted. But what happens on KDE (or non-gtk based systemss) ?? We should look for something more generic. We could at least detect which one is installed on the machine an run that one. apport-bug is doing this too. (as unfortunately the primary detection mechanism of apport-bug is not working on debian due to #759518) pkexec is good but it is priority optional. But we could ad it to Recommends. Or apport could be bumped to optional? I'm not sure it really matters if it stays in experimental anyway... -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#750989: /usr/share/apport/apport-gtk: apport-gtk is complaining that the report is invalid and that permission is not granted
Le Tue, 23 Sep 2014 15:55:29 +0530, Ritesh Raj Sarraf r...@researchut.com a écrit : On Tuesday 23 September 2014 03:02 PM, Ritesh Raj Sarraf wrote: On Tuesday 23 September 2014 02:50 PM, Ritesh Raj Sarraf wrote: I was thinking of using pkexec and adding a Depends for it on apport-notify package. Looks like that won't work because the pkexec man page clearly states that. There are many more use case problems. And I think these approaches are not flexible. Well this is also the approach that Ubuntu uses, for what it worth. pkexec is using policykit framework and this is IMHO way more flexible regarding the permissions management than plain gtsu(do) We need to act of self reports and system reports, i.e. reports owned by root ?? Or more ?? What if apache crashes? It may have ownership www-data. Do we care about it ? We could look if the user is member of the group adm or sudo for this I guess? Or create a notification (like ubuntu) in that case instead of directly starting pkexec as it can be intrusive. Or have some kind of config file to tell if we are interested in these reports? But the current situation is even worse as the notify daemon is starting a-bug for reports created for other users too. Using apport-checkreports allow to filter them and not call a-bug on each of them. We need to flash the corresponding tool (a-gtk, a-kde or a-cli) based on the environment. I checked apport-bug and it alone is not enough. Thus I think we should replace it with one of our own. We can definitely improve the situation here and detect the desktop used, it's probably not perfect (I've fixed a bug in my copy here) but for me this was looking like a good initial try. So there's a lot of housekeeping to do. Hence I think we should stick to something like Python. apport is written in Python and we may leverage things in the future. I quickly looked on the web and the best I found was this: https://github.com/splitbrain/Watcher/blob/master/watcher.py Quickly looking at it and it might be a bit overkill, no? What do you say ?? Laurent -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#750989: /usr/share/apport/apport-gtk: apport-gtk is complaining that the report is invalid and that permission is not granted
patch 750989 + patch thanks Hello, Please find here a patch. I rewrote apport-notifyd based on what ubuntu is doing in the update-notifier code. The patch is also bumping the debhelper compatibility so we are getting the hardening flags automatically for the notifier daemon. This should also fix #750471 and #760097 The debian/copyright file should probably also be adjusted. Cheers, Laurent Bigonvillediff -Nru apport-2.14.2/debian/apport-notifyd.c apport-2.14.2/debian/apport-notifyd.c --- apport-2.14.2/debian/apport-notifyd.c 2014-09-10 11:56:22.0 +0200 +++ apport-2.14.2/debian/apport-notifyd.c 2014-09-23 00:23:47.0 +0200 @@ -1,116 +1,177 @@ -/* -*** -* Copyright (C) Ritesh Raj Sarraf r...@debian.org * -* * -* This program is free software. You may use, modify, and redistribute it * -* under the terms of the GNU General Public License as published * -* by the Free Software Foundation, either version 3 or (at your option) * -* any later version. This program is distributed without any warranty.* -*** -*/ - -#include sys/inotify.h -#include syslog.h +/* apport-notifyd.c + * Copyright (C) 2004 Lukas Lipka lu...@pmad.net + * (C) 2004 Michael Vogt m...@debian.org + * (C) 2004 Michiel Sikkes mich...@eyesopened.nl + * (C) 2004-2009 Canonical + * (C) 2014 Laurent Bigonville + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor + * Boston, MA 02110-1301 USA. + */ #include stdlib.h -#include limits.h -#include unistd.h -#include string.h - +#include glib.h +#include gio/gio.h -#define BUF_LEN (10 * (sizeof(struct inotify_event) + NAME_MAX + 1)) -#define PROG apport-bug -#define CRASH_PATH /var/crash/ +/* the time when we check for fam events */ +#define TIMEOUT_FAM 1000*5 /* 5 sec */ -int checkFileExtn(const char* extn, const char* CRASH_EXTN) +#define CRASHREPORT_HELPER /usr/share/apport/apport-checkreports +#define CRASHREPORT_REPORT_APP /usr/share/apport/apport-gtk +#define CRASHREPORT_DIR /var/crash/ + +gboolean crashreport_pending = FALSE; + +void monitor_cb (GFileMonitor *handle, + GFile *monitor_f, + GFile *other_monitor_f, + GFileMonitorEvent event_type, + gpointer user_data) { - #define CRASH_EXTN .crash - size_t extnLength; - size_t apportLength; - extnLength = strlen(extn); - apportLength = strlen(CRASH_EXTN); - // syslog(LOG_NOTICE,extnLength is %d and apportLength is %d\n, extnLength, apportLength); +gchar *info_uri = g_file_get_path(monitor_f); + +/* +g_debug(inotify: info_uri: %s, info_uri); +g_debug(inotify: event_type: %i,event_type); +*/ - if(apportLength extnLength) return 1; +/* we ignore lock file events because we can only get when a lock was + * taken, but not when it was removed */ +if(g_str_has_suffix(info_uri, lock)) +return; + +if(g_str_has_prefix(info_uri, CRASHREPORT_DIR)) { +g_debug(crashreport found: %s, info_uri); +crashreport_pending = TRUE; +} - /* Check if it is a .crash file */ - // syslog(LOG_NOTICE,strcmp length is %s\n, extn[extnLength - apportLength]); - return (strcmp(extn[extnLength - apportLength], CRASH_EXTN)) == 0; +g_free(info_uri); } -static void trapCrashFile(struct inotify_event *i) +gboolean crashreport_check(gboolean system) { +gint exitcode = -1; +gchar *argv[] = { CRASHREPORT_HELPER, NULL, NULL }; -char cmdStr[1024] = { NULL }; -strcat(cmdStr, PROG); -strcat(cmdStr, CRASH_PATH); -strcat(cmdStr, i-name); -// syslog(LOG_DEBUG, cmdStr is %s at event %d\n, cmdStr, i-mask); +if(system) +argv[1] = --system; -if (checkFileExtn(i-name, CRASH_EXTN)) { - // syslog(LOG_DEBUG, File %s has extension %s\n, i-name, CRASH_EXTN); - if (i-mask IN_CREATE) { - system(cmdStr); - syslog(LOG_NOTICE, cmdStr is %s at event %d\n, cmdStr, i-mask); - } -} /* else { - syslog(LOG_DEBUG, File %s does not have extension %s\n, i-name, CRASH_EXTN); -} */ - -/* -if (i-mask IN_CREATE)
Bug#750989: /usr/share/apport/apport-gtk: apport-gtk is complaining that the report is invalid and that permission is not granted
On Tuesday 09 September 2014 05:34 PM, Laurent Bigonville wrote: Well I guess using a daemon is more generic and indeed more flexible (not sure using a systemd/upstart user job will work for system crash report). The whole reason of using a daemon was to not be bound by any single software and be self-independent. Will you look at it? Yes. I am. -- Ritesh Raj Sarraf RESEARCHUT - http://www.researchut.com Necessity is the mother of invention. -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#750989: /usr/share/apport/apport-gtk: apport-gtk is complaining that the report is invalid and that permission is not granted
Le Wed, 10 Sep 2014 12:04:13 +0530, Ritesh Raj Sarraf r...@researchut.com a écrit : On Tuesday 09 September 2014 05:34 PM, Laurent Bigonville wrote: Well I guess using a daemon is more generic and indeed more flexible (not sure using a systemd/upstart user job will work for system crash report). The whole reason of using a daemon was to not be bound by any single software and be self-independent. Will you look at it? Yes. I am. Thanks! My (system) C skills are quite rusty I must admit :) -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#750989: /usr/share/apport/apport-gtk: apport-gtk is complaining that the report is invalid and that permission is not granted
On Wednesday 10 September 2014 04:19 PM, Laurent Bigonville wrote: Le Wed, 10 Sep 2014 12:04:13 +0530, Ritesh Raj Sarrafr...@researchut.com a écrit : On Tuesday 09 September 2014 05:34 PM, Laurent Bigonville wrote: Well I guess using a daemon is more generic and indeed more flexible (not sure using a systemd/upstart user job will work for system crash report). The whole reason of using a daemon was to not be bound by any single software and be self-independent. Will you look at it? Yes. I am. Thanks! My (system) C skills are quite rusty I must admit:) I just uploaded -3 build to experimental. In this build, apport-notifyd should be better at tracking the inotify events. For now, based on my tests, I'm only acting on IN_CREATE event (see manpage for details and the git commit log for my reasoning). With this build, apport-notifyd should be able to track and pop-up apport on crash events. There's one catch though. Applications that crash during OS boot up until apport-notifyd is started, they will not get tracked. My plan is to later add some code in the daemon to, upon startup, look at any crash reports that were generated. Some time back you mentioned that root reports were not being tracked by apport. That should not be the case. When apport sees a report from a different uid, it triggers gksu. That'd mean we need to add gksu/kdesudo to Recommends for apport. Can you test it ? -- Ritesh Raj Sarraf RESEARCHUT - http://www.researchut.com Necessity is the mother of invention. -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#750989: /usr/share/apport/apport-gtk: apport-gtk is complaining that the report is invalid and that permission is not granted
Le Wed, 10 Sep 2014 16:49:42 +0530, Ritesh Raj Sarraf r...@researchut.com a écrit : There's one catch though. Applications that crash during OS boot up until apport-notifyd is started, they will not get tracked. My plan is to later add some code in the daemon to, upon startup, look at any crash reports that were generated. If you are calling apport-gtk (or apport-kde) directly, you don't need to pass the path for the .crash file directly. It should also take care of reports generated when the notify daemon is not running that were still not processed by apport (If I understood the code properly). Some time back you mentioned that root reports were not being tracked by apport. That should not be the case. When apport sees a report from a different uid, it triggers gksu. That'd mean we need to add gksu/kdesudo to Recommends for apport. Can you test it ? I would definitly use pkexec here instead of gksu/kdesudo. You should have better integration in the different desktops. Like I said in one of the previous mail, update-notifier from ubuntu is doing the following: if /usr/share/apport/apport-checkreports --system returns 0: ask if user wants to report a system crash: pkexec /usr/share/apport/apport-gtk else if /usr/share/apport/apport-checkreports returns 0: /usr/share/apport/apport-gtk else do nothing They are asking about the system reports (opening a GTK window) because pkexec on gnome-shell the thing is a bit intrusive. This process has also the advantage of allowing the user to disable reporting as apport-checkreports returns 2 is there are new rapports but that reporting is disabled. -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#750989: /usr/share/apport/apport-gtk: apport-gtk is complaining that the report is invalid and that permission is not granted
On Wednesday 10 September 2014 06:41 PM, Laurent Bigonville wrote: Le Wed, 10 Sep 2014 16:49:42 +0530, Ritesh Raj Sarraf r...@researchut.com a écrit : There's one catch though. Applications that crash during OS boot up until apport-notifyd is started, they will not get tracked. My plan is to later add some code in the daemon to, upon startup, look at any crash reports that were generated. If you are calling apport-gtk (or apport-kde) directly, you don't need to pass the path for the .crash file directly. It should also take care of reports generated when the notify daemon is not running that were still not processed by apport (If I understood the code properly). Ummm... I'm not sure about that. If time permits, I'll look back. But right now, we call apport-bug on the events we receive over inotify. And that is all .crash files. Ubuntu does similar things. http://bazaar.launchpad.net/~ubuntu-core-dev/ubuntu/utopic/apport/ubuntu/view/head:/debian/apport-noui.upstart apport-bug will internally call approriate helper UI. Some time back you mentioned that root reports were not being tracked by apport. That should not be the case. When apport sees a report from a different uid, it triggers gksu. That'd mean we need to add gksu/kdesudo to Recommends for apport. Can you test it ? I would definitly use pkexec here instead of gksu/kdesudo. You should have better integration in the different desktops. Like I said in one of the previous mail, update-notifier from ubuntu is doing the following: if /usr/share/apport/apport-checkreports --system returns 0: ask if user wants to report a system crash: pkexec /usr/share/apport/apport-gtk else if /usr/share/apport/apport-checkreports returns 0: /usr/share/apport/apport-gtk else do nothing They are asking about the system reports (opening a GTK window) because pkexec on gnome-shell the thing is a bit intrusive. This process has also the advantage of allowing the user to disable reporting as apport-checkreports returns 2 is there are new rapports but that reporting is disabled. I'll look into it later. Thanks. -- Ritesh Raj Sarraf RESEARCHUT - http://www.researchut.com Necessity is the mother of invention. -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#750989: /usr/share/apport/apport-gtk: apport-gtk is complaining that the report is invalid and that permission is not granted
Le Thu, 11 Sep 2014 00:24:20 +0530, Ritesh Raj Sarraf r...@researchut.com a écrit : On Wednesday 10 September 2014 06:41 PM, Laurent Bigonville wrote: Le Wed, 10 Sep 2014 16:49:42 +0530, Ritesh Raj Sarraf r...@researchut.com a écrit : There's one catch though. Applications that crash during OS boot up until apport-notifyd is started, they will not get tracked. My plan is to later add some code in the daemon to, upon startup, look at any crash reports that were generated. If you are calling apport-gtk (or apport-kde) directly, you don't need to pass the path for the .crash file directly. It should also take care of reports generated when the notify daemon is not running that were still not processed by apport (If I understood the code properly). Ummm... I'm not sure about that. If time permits, I'll look back. But right now, we call apport-bug on the events we receive over inotify. And that is all .crash files. Ubuntu does similar things. http://bazaar.launchpad.net/~ubuntu-core-dev/ubuntu/utopic/apport/ubuntu/view/head:/debian/apport-noui.upstart Yes they are doing that for the untended crash report submission. To interact with the user, the code is here: https://bazaar.launchpad.net/~ubuntu-branches/ubuntu/utopic/update-notifier/utopic/view/head:/src/crash.c And then when apport-gtk is run without arguments: https://bazaar.launchpad.net/~apport-hackers/apport/trunk/view/head:/apport/ui.py#L200 apport-bug will internally call approriate helper UI. Some time back you mentioned that root reports were not being tracked by apport. That should not be the case. When apport sees a report from a different uid, it triggers gksu. That'd mean we need to add gksu/kdesudo to Recommends for apport. Can you test it ? I would definitly use pkexec here instead of gksu/kdesudo. You should have better integration in the different desktops. Like I said in one of the previous mail, update-notifier from ubuntu is doing the following: if /usr/share/apport/apport-checkreports --system returns 0: ask if user wants to report a system crash: pkexec /usr/share/apport/apport-gtk else if /usr/share/apport/apport-checkreports returns 0: /usr/share/apport/apport-gtk else do nothing They are asking about the system reports (opening a GTK window) because pkexec on gnome-shell the thing is a bit intrusive. This process has also the advantage of allowing the user to disable reporting as apport-checkreports returns 2 is there are new rapports but that reporting is disabled. I'll look into it later. Thanks. -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#750989: /usr/share/apport/apport-gtk: apport-gtk is complaining that the report is invalid and that permission is not granted
Le Tue, 9 Sep 2014 02:09:56 +0200, Laurent Bigonville bi...@debian.org a écrit : [...] All the code is in src/crash.c from update-notifier on ubuntu. [...] Or we could use systemd/upstart user jobs to achieve this (pitti said something about that on IRC) -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#750989: /usr/share/apport/apport-gtk: apport-gtk is complaining that the report is invalid and that permission is not granted
On Tuesday 09 September 2014 05:39 AM, Laurent Bigonville wrote: Did you play with the change you had proposed ? I tried it but now I do not get the apport popups. I'll look into it sometime later but if you already did, please do share your results. No I didn't really test it it was a wild guess, sorry. This is not seeming to work. All the crash reports are owned by me. Also, syslog reports of firing the command. Need to look into more detail. -- Ritesh Raj Sarraf RESEARCHUT - http://www.researchut.com Necessity is the mother of invention. -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#750989: /usr/share/apport/apport-gtk: apport-gtk is complaining that the report is invalid and that permission is not granted
On Tuesday 09 September 2014 12:08 PM, Laurent Bigonville wrote: All the code is in src/crash.c from update-notifier on ubuntu. [...] Or we could use systemd/upstart user jobs to achieve this (pitti said something about that on IRC) I always thought that a daemon would be a better approach, to make it more accessible to users. But it has its limitations. systemd approach should fix most notification problems. -- Ritesh Raj Sarraf RESEARCHUT - http://www.researchut.com Necessity is the mother of invention. -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#750989: /usr/share/apport/apport-gtk: apport-gtk is complaining that the report is invalid and that permission is not granted
Le Tue, 09 Sep 2014 12:36:31 +0530, Ritesh Raj Sarraf r...@researchut.com a écrit : On Tuesday 09 September 2014 05:39 AM, Laurent Bigonville wrote: Did you play with the change you had proposed ? I tried it but now I do not get the apport popups. I'll look into it sometime later but if you already did, please do share your results. No I didn't really test it it was a wild guess, sorry. This is not seeming to work. All the crash reports are owned by me. Also, syslog reports of firing the command. Need to look into more detail. I guess it's not working because it's monitoring a full directory? -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#750989: /usr/share/apport/apport-gtk: apport-gtk is complaining that the report is invalid and that permission is not granted
Le Tue, 09 Sep 2014 12:34:53 +0530, Ritesh Raj Sarraf r...@researchut.com a écrit : On Tuesday 09 September 2014 12:08 PM, Laurent Bigonville wrote: All the code is in src/crash.c from update-notifier on ubuntu. [...] Or we could use systemd/upstart user jobs to achieve this (pitti said something about that on IRC) I always thought that a daemon would be a better approach, to make it more accessible to users. But it has its limitations. systemd approach should fix most notification problems. Well I guess using a daemon is more generic and indeed more flexible (not sure using a systemd/upstart user job will work for system crash report). Will you look at it? Cheers, Laurent Bigonville -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#750989: /usr/share/apport/apport-gtk: apport-gtk is complaining that the report is invalid and that permission is not granted
Le Fri, 05 Sep 2014 18:26:37 +0530, Ritesh Raj Sarraf r...@researchut.com a écrit : On Tuesday 02 September 2014 02:00 PM, Ritesh Raj Sarraf wrote: On Monday 01 September 2014 05:27 PM, Laurent Bigonville wrote: I think this is actually a race condition between apport-notifyd and /usr/share/apport/apport. Shouldn't apport-notifyd only respond to IN_CLOSE_WRITE inotify events instead of IN_CREATE so we are sure the file is fully written? Thanks Laurent. That should be the reason. I'll check and do a new upload soon. Did you play with the change you had proposed ? I tried it but now I do not get the apport popups. I'll look into it sometime later but if you already did, please do share your results. No I didn't really test it it was a wild guess, sorry. Looking at how ubuntu is doing this, it seems that everything is handled by update-notifier which calls /usr/share/apport/apport-checkreports twice. First time to see if there are reports for the user and then to see if there are reports from system service. In case there are system reports it call apport-gtk with pkexec to gain root privs. In case of user reports it just call apport-gtk (I guess we should detect the desktop environment here?). apport-gtk takes no arguments, so I guess it will take care of all the pending reports at once(?). All the code is in src/crash.c from update-notifier on ubuntu. I guess we could mimic the same behavior? As a first step, I would stop trying to launch apport-bug for .crash not owned by the user, this would fix the bug related to the permissions. I guess the rest could be improve over time? Cheers, Laurent Bigonville -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#750989: /usr/share/apport/apport-gtk: apport-gtk is complaining that the report is invalid and that permission is not granted
On Tuesday 02 September 2014 02:00 PM, Ritesh Raj Sarraf wrote: On Monday 01 September 2014 05:27 PM, Laurent Bigonville wrote: I think this is actually a race condition between apport-notifyd and /usr/share/apport/apport. Shouldn't apport-notifyd only respond to IN_CLOSE_WRITE inotify events instead of IN_CREATE so we are sure the file is fully written? Thanks Laurent. That should be the reason. I'll check and do a new upload soon. Did you play with the change you had proposed ? I tried it but now I do not get the apport popups. I'll look into it sometime later but if you already did, please do share your results. -- Ritesh Raj Sarraf RESEARCHUT - http://www.researchut.com Necessity is the mother of invention. -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#750989: /usr/share/apport/apport-gtk: apport-gtk is complaining that the report is invalid and that permission is not granted
On Monday 01 September 2014 05:27 PM, Laurent Bigonville wrote: I think this is actually a race condition between apport-notifyd and /usr/share/apport/apport. Shouldn't apport-notifyd only respond to IN_CLOSE_WRITE inotify events instead of IN_CREATE so we are sure the file is fully written? Thanks Laurent. That should be the reason. I'll check and do a new upload soon. -- Ritesh Raj Sarraf | http://people.debian.org/~rrs Debian - The Universal Operating System -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#750989: /usr/share/apport/apport-gtk: apport-gtk is complaining that the report is invalid and that permission is not granted
Hello, I think this is actually a race condition between apport-notifyd and /usr/share/apport/apport. Shouldn't apport-notifyd only respond to IN_CLOSE_WRITE inotify events instead of IN_CREATE so we are sure the file is fully written? Cheers, Laurent Bigonville -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#750989: /usr/share/apport/apport-gtk: apport-gtk is complaining that the report is invalid and that permission is not granted
Package: apport-gtk Version: 2.14.2-2 Severity: normal File: /usr/share/apport/apport-gtk Hi, When a crash report is generated, apport-gtk is displaying a message telling in the title that the crash report is invalid and in the body of the dialog that the permission has not been granted. However, the .crash file is owned by my own user. Re-running the apport command from a terminal is not making apport complain anymore. Could this be a race where the .crash file is temporarly owned by root:root before being chowned to the correct user? Cheers, Laurent Bigonville -- System Information: Debian Release: jessie/sid APT prefers unstable APT policy: (500, 'unstable'), (1, 'experimental') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 3.14-1-amd64 (SMP w/8 CPU cores) Locale: LANG=fr_BE.utf8, LC_CTYPE=fr_BE.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages apport-gtk depends on: ii apport 2.14.2-2 ii gir1.2-gtk-3.0 3.12.2-1+b1 ii gir1.2-wnck-3.0 3.4.7-1 ii procps 1:3.3.9-5 ii python3 3.4.1-1 ii python3-apport 2.14.2-2 ii python3-gi 3.12.1-1 Versions of packages apport-gtk recommends: ii apport-notify 2.14.2-2 ii gdb 7.6.2-1.1+b1 ii gnome-packagekit [update-notifier] 3.10.1-1 apport-gtk suggests no packages. -- no debconf information -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org