dh_make in Oneiric outputs wrong content to changelog

Bug #875705 reported by neutrico
34
This bug affects 6 people
Affects Status Importance Assigned to Milestone
dh-make (Debian)
Fix Released
Unknown
dh-make (Ubuntu)
Fix Released
High
Colin Watson
Oneiric
Fix Released
High
Colin Watson
lightdm (Ubuntu)
Fix Released
Low
Unassigned
Oneiric
Fix Released
Wishlist
Robert Ancell

Bug Description

Stable update justification:

Impact: New packagers trying to use dh_make in a desktop session started by lightdm get horribly confused when it outputs a huge pile of garbage to debian/changelog and debian/control, due to lightdm not setting LOGNAME while gdm does. (Iain Lane points out that users of zsh are unaffected because it sets LOGNAME itself.)
Development fix: https://launchpad.net/ubuntu/+source/dh-make/0.59ubuntu1
Stable fix: Identical to 0.59ubuntu1, just with a different version number (0.59ubuntu0.1). http://paste.ubuntu.com/716404/
TEST CASE: Create a dummy package (I created an empty example-0.1 directory and changed into it). Run 'env -u DEBFULLNAME -u DEBEMAIL dh_make' (add '-u LOGNAME' before 'dh_make' to test the dh-make fix even in the presence of a fixed display manager). If this bug is present then you'll see lots of junk in debian/changelog and debian/control rather than valid files.
Regression potential: Obviously check that dh_make still actually works, but I think this update is pretty safe.

Original report follows:

Please read this description published on ubuntuforums:

http://ubuntuforums.org/showthread.php?t=1861850

I'm also affected by this bug and I can add a little detail - dh_make put list of users to debian/changelog.

I think that this is critical bug in oneiric.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in dh-make (Ubuntu):
status: New → Confirmed
Revision history for this message
halcyonCorsair (elliot-pahl-gmail) wrote :

You can work around this by setting the environment variable DEBFULLNAME. eg.
DEBFULLNAME="My Name" dh_make -n -s -e <email address hidden>

Revision history for this message
inameiname (inameiname) wrote :

So to temporary fix (workaround) this issue, I could just do this?:

Revision history for this message
inameiname (inameiname) wrote :

Oops, didn't mean to send that last comment before finishing it :P

replace:
  dh_make -n -s -e <email address hidden>
with:
  DEBFULLNAME="Me" dh_make -n -s -e <email address hidden>

Revision history for this message
Colin Watson (cjwatson) wrote :

The root cause seems to be that LOGNAME is no longer set.

Changed in dh-make (Ubuntu):
importance: Undecided → High
Revision history for this message
Colin Watson (cjwatson) wrote :

It appears that lightdm no longer sets LOGNAME. Could the desktop team please look into this? It's a regression from gdm; I can't predict how many programs will be affected by it (hopefully not many, but I expect a few others). It should be a simple matter of adding this to the list of variables set in session_start.

Nevertheless, we should work around this in dh-make at least for the time being.

Colin Watson (cjwatson)
Changed in dh-make (Ubuntu Oneiric):
status: New → Triaged
importance: Undecided → High
Changed in dh-make (Ubuntu):
status: Confirmed → Triaged
assignee: nobody → Colin Watson (cjwatson)
Changed in dh-make (Ubuntu Oneiric):
assignee: nobody → Colin Watson (cjwatson)
summary: - dh_make in Oneiric outpus wrong content to changelog
+ dh_make in Oneiric outputs wrong content to changelog
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package dh-make - 0.59ubuntu1

---------------
dh-make (0.59ubuntu1) precise; urgency=low

  * Try the USER environment variable if LOGNAME is not set (LP: #875705).
 -- Colin Watson <email address hidden> Sat, 22 Oct 2011 22:46:10 +0100

Changed in dh-make (Ubuntu):
status: Triaged → Fix Released
Colin Watson (cjwatson)
description: updated
Colin Watson (cjwatson)
Changed in dh-make (Ubuntu Oneiric):
status: Triaged → In Progress
Changed in dh-make (Debian):
status: Unknown → New
Revision history for this message
inameiname (inameiname) wrote :

That is excellent! Thanks everybody. I am glad this issue is being addressed.

So in the meantime, at least until the oneiric version of dh-make gets updated, would this be the proper workaround:

replace:
     dh_make -n -s -e <email address hidden>
with:
    export LOGNAME="$USER" dh_make -n -s -e <email address hidden>

And this: DEBFULLNAME="Me", is not necessary?

Revision history for this message
Colin Watson (cjwatson) wrote :

If you're going to put it all in one command then drop the 'export'.

Setting LOGNAME works around the problem a little further up the chain of events than setting DEBFULLNAME, so you don't need to set both, no.

Revision history for this message
inameiname (inameiname) wrote :

Okie dokie. I saw your comment on the thread in Ubuntu Forums already, so I gotcha now. Thank you again, Colin.

Revision history for this message
Sebastien Bacher (seb128) wrote :

Thank you for your bug report, is LOGNAME a standard variable exported by all login managers something specific to gdm other things started depending on?

Changed in lightdm (Ubuntu):
importance: Undecided → Low
Changed in lightdm (Ubuntu Oneiric):
importance: Undecided → Wishlist
assignee: nobody → Robert Ancell (robert-ancell)
Revision history for this message
Colin Watson (cjwatson) wrote : Re: [Bug 875705] Re: dh_make in Oneiric outputs wrong content to changelog

On Mon, Oct 24, 2011 at 09:06:40PM -0000, Sebastien Bacher wrote:
> Thank you for your bug report, is LOGNAME a standard variable exported
> by all login managers something specific to gdm other things started
> depending on?

It is specified by POSIX:

  http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap08.html#tag_08_03

"The system shall initialize this variable at the time of login to be
the user's login name."

Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

Hello Marcin, or anyone else affected,

Accepted dh-make into oneiric-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in dh-make (Ubuntu Oneiric):
status: In Progress → Fix Committed
tags: added: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in lightdm (Ubuntu Oneiric):
status: New → Confirmed
Changed in lightdm (Ubuntu):
status: New → Confirmed
Revision history for this message
Robert Ancell (robert-ancell) wrote :

Fixed in stable lightdm branch, will be SRU'd

Changed in lightdm (Ubuntu):
status: Confirmed → Fix Committed
Changed in lightdm (Ubuntu Oneiric):
status: Confirmed → Fix Committed
Revision history for this message
Chris Halse Rogers (raof) wrote :

Hello Marcin, or anyone else affected,

Accepted lightdm into oneiric-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Revision history for this message
Chris (fabricator4) wrote :

I've installed lightdm and verified that $LOGNAME is no longer <null> and contains the username as expected. This fixes the problem I originally logged as Bug #864109 in Oneiric beta 2

I can't verify that the problem with dh-make is fixed as I'm not involved in repackaging.

Good work.

Martin Pitt (pitti)
tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package lightdm - 1.0.6-0ubuntu2

---------------
lightdm (1.0.6-0ubuntu2) precise; urgency=low

  * Upload to precise.

lightdm (1.0.6-0ubuntu1) oneiric-proposed; urgency=low

  [ Martin Pitt ]
  * debian/lightdm.upstart: Put back check for "text" in kernel command line,
    for inhibiting automatic lightdm start. Check $JOB to still allow a manual
    "start lightdm" command to work. (LP: #873334)

  [ Robert Ancell ]
  * New upstream release:
    - Use lchown for correcting ownership of ~/.Xauthority instead of chown

lightdm (1.0.5-0ubuntu1) oneiric-proposed; urgency=low

  * New upstream release.
    [1.0.5]
    - Relax AppArmor guest profile to allow compiz to start
    - Connect up VNC settings for width, height, depth
    [1.0.4]
    - Fix --enable-gtk-greeter=yes not working
    - Fix X sessions with arguments in Exec not working
    - Use previous session for automatic login or if greeter does not request
      one. (LP: #834515)
    - Correct ownership of ~/.Xauthority if upgrading from buggy version of
      LightDM that had it root owned. (LP: #871667)
    - Set default resolution of VNC to 1024x768, add settings for width, height,
      depth into lightdm.conf.
    - AppArmor profile: Fix broken gnome-keyring and dbus/gwibber, and quiesce
      annoying kernel audit messages for privileges that we definitively do not
      want to grant. (LP: #877736) (LP: #874635)
    - Set LOGNAME environment variable (LP: #875705)
    - Mark strings as translatable in GTK greeter (LP: #868613)
    [ 1.0.3]
    - Fix reference counting issue in ConsoleKit code
    - Really add the lightdm-guest-session-wrapper
    [ 1.0.2 ]
    - Fix daemon from blocking if Accounts Service does not exist
    - Fix greeter log file not being written
    - Don't set LANG environment variable if using Accounts Service.
    - Fix gdmflexiserver not working due to it not being in PATH
    - Don't authenticate the greeter user
    - Allow greeters to be disabled in configure flags
    - Fix over allocation of read buffer in greeter protocol
    - Make sure objects are cleaned up on exit
    - Fix minor memory leaks
    - Fix hugely oversized allocation in greeter buffer. Can trigger
      crashes when entering very long passwords.
  * debian/patches/00bzr_guest_session_wrapper.diff:
  * debian/patches/07_long_password_crash.patch:
  * debian/patches/08_correct_ck_ref.patch:
    - Applied upstream
  * New upstream release.
 -- Martin Pitt <email address hidden> Thu, 10 Nov 2011 07:19:12 +0100

Changed in lightdm (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package lightdm - 1.0.6-0ubuntu1

---------------
lightdm (1.0.6-0ubuntu1) oneiric-proposed; urgency=low

  [ Martin Pitt ]
  * debian/lightdm.upstart: Put back check for "text" in kernel command line,
    for inhibiting automatic lightdm start. Check $JOB to still allow a manual
    "start lightdm" command to work. (LP: #873334)

  [ Robert Ancell ]
  * New upstream release:
    - Use lchown for correcting ownership of ~/.Xauthority instead of chown

lightdm (1.0.5-0ubuntu1) oneiric-proposed; urgency=low

  * New upstream release.
    [1.0.5]
    - Relax AppArmor guest profile to allow compiz to start
    - Connect up VNC settings for width, height, depth
    [1.0.4]
    - Fix --enable-gtk-greeter=yes not working
    - Fix X sessions with arguments in Exec not working
    - Use previous session for automatic login or if greeter does not request
      one. (LP: #834515)
    - Correct ownership of ~/.Xauthority if upgrading from buggy version of
      LightDM that had it root owned. (LP: #871667)
    - Set default resolution of VNC to 1024x768, add settings for width, height,
      depth into lightdm.conf.
    - AppArmor profile: Fix broken gnome-keyring and dbus/gwibber, and quiesce
      annoying kernel audit messages for privileges that we definitively do not
      want to grant. (LP: #877736) (LP: #874635)
    - Set LOGNAME environment variable (LP: #875705)
    - Mark strings as translatable in GTK greeter (LP: #868613)
    [ 1.0.3]
    - Fix reference counting issue in ConsoleKit code
    - Really add the lightdm-guest-session-wrapper
    [ 1.0.2 ]
    - Fix daemon from blocking if Accounts Service does not exist
    - Fix greeter log file not being written
    - Don't set LANG environment variable if using Accounts Service.
    - Fix gdmflexiserver not working due to it not being in PATH
    - Don't authenticate the greeter user
    - Allow greeters to be disabled in configure flags
    - Fix over allocation of read buffer in greeter protocol
    - Make sure objects are cleaned up on exit
    - Fix minor memory leaks
    - Fix hugely oversized allocation in greeter buffer. Can trigger
      crashes when entering very long passwords.
  * debian/patches/00bzr_guest_session_wrapper.diff:
  * debian/patches/07_long_password_crash.patch:
  * debian/patches/08_correct_ck_ref.patch:
    - Applied upstream
  * New upstream release.
 -- Robert Ancell <email address hidden> Wed, 02 Nov 2011 11:37:43 -0400

Changed in lightdm (Ubuntu Oneiric):
status: Fix Committed → Fix Released
Revision history for this message
Martin Pitt (pitti) wrote :

dh-make still needs verification, resetting tag.

tags: added: verification-needed
removed: verification-done
Revision history for this message
Sebastien Bacher (seb128) wrote :

Could you confirm that the fix works for you so the update can be moved out of staging?

Revision history for this message
Colin Watson (cjwatson) wrote :

I tested that I could reproduce the dh-make bug with the test case as described in the description on oneiric, and then tested that the version in oneiric-proposed doesn't suffer from the same problem and produces a broadly sensible-looking example source package.

description: updated
tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package dh-make - 0.59ubuntu0.1

---------------
dh-make (0.59ubuntu0.1) oneiric-proposed; urgency=low

  * Try the USER environment variable if LOGNAME is not set (LP: #875705).
 -- Colin Watson <email address hidden> Sat, 22 Oct 2011 22:46:10 +0100

Changed in dh-make (Ubuntu Oneiric):
status: Fix Committed → Fix Released
Changed in dh-make (Debian):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.