[Bug 1199499] Re: upstart file bridge sets FILE to glob pattern instead of specific file

Steve Langasek steve.langasek at canonical.com
Tue Jul 9 19:34:10 UTC 2013


This definitely looks counterintuitive to me, for anywhere that you
would want to use instance; and for the common case where you have no
'instance' set, the difference is moot.  And it seems we should be able
to have the value of FILE set to whatever we want.  James, is there any
reason not to expand the glob when emitting the event?

** Also affects: upstart
   Importance: Undecided
       Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to upstart in Ubuntu.
https://bugs.launchpad.net/bugs/1199499

Title:
  upstart file bridge sets FILE to glob pattern instead of specific file

Status in Upstart:
  New
Status in “upstart” package in Ubuntu:
  New

Bug description:
  I've made a modification to the update-notifier crash notification
  upstart user job such that it looks like this:

   $ cat /usr/share/upstart/sessions/update-notifier-crash.conf
  description "Notification regarding a crash report"
  author "Brian Murray <brian at ubuntu.com>"

  start on (
      file FILE=/var/crash/*.crash EVENT=create
  )

  env FILE=NULL
  instance $FILE

  script
  DATE=$(date)
  echo "$DATE crash report $FILE detected"
  CRASH=0
  /usr/share/apport/apport-checkreports || CRASH=$?
  SYSTEMCRASH=0
  /usr/share/apport/apport-checkreports --system || SYSTEMCRASH=$?
  if [ $CRASH -eq 0 ]; then
      /usr/share/apport/apport-gtk
  elif [ $SYSTEMCRASH -eq 0 ]; then
      # not in admin group return
      ADMIN=0
      groups | grep -qE "sudo|admin" || ADMIN=$?
      if [ $ADMIN -ne 0 ]; then
          exit 1
      fi
      # be nice and always ask first before firing up pkexec
      /usr/lib/update-notifier/system-crash-notification
  fi
  end script

  $FILE is set to /var/crash/*.crash instead of to /var/crash
  /_usr_bin_d-feet.1000.crash like I would expect.  Subsequently, if you
  perform the following test:

  1) (d-feet &); sleep 3; killall -SEGV d-feet
  2) wait for apport crash dialog to appear
  3) DISPLAY=:0 xeyes &; PID="$\!"; sleep 3; kill -SEGV $PID

  You will not receive a second apport dialog for the xeyes crash
  despite there being a crash file in /var/crash/ for xeyes.
  Additionally, it may be interesting to note that the job log file is
  named '~/.cache/upstart/update-notifier-crash-
  _var_crash_\*.crash.log'.

  ProblemType: Bug
  DistroRelease: Ubuntu 13.10
  Package: upstart 1.9-0ubuntu2
  ProcVersionSignature: Ubuntu 3.10.0-2.10-generic 3.10.0
  Uname: Linux 3.10.0-2-generic x86_64
  ApportVersion: 2.10.2-0ubuntu3
  Architecture: amd64
  CheckboxSubmission: 2e6ecd139611830c78226ad04ff4c093
  CheckboxSystem: bb422ca46d02494cdbc459927a98bc2f
  Date: Tue Jul  9 12:18:29 2013
  EcryptfsInUse: Yes
  InstallationDate: Installed on 2010-11-17 (964 days ago)
  InstallationMedia: Ubuntu 10.10 "Maverick Meerkat" - Release amd64 (20101007)
  MarkForUpload: True
  SourcePackage: upstart
  UpgradeStatus: Upgraded to saucy on 2013-06-04 (35 days ago)
  UpstartBugCategory: Session
  UpstartRunningSessionVersion: init (upstart 1.9)
  UpstartRunningSystemVersion: init (upstart 1.9)

To manage notifications about this bug go to:
https://bugs.launchpad.net/upstart/+bug/1199499/+subscriptions




More information about the foundations-bugs mailing list