Bug#1069908: elpa-debian-el: X-Debbugs-Cc: is weirdly overpopulated with duplicate or broken entries

2024-05-19 Thread Xiyue Deng
Xiyue Deng  writes:

> Daniel Kahn Gillmor  writes:
>
>>
>> I decided to look in ~/.reportbugrc and i find i have the following settings:
>>
>> ```
>> reportbug_version "5.0"
>> mode standard
>> ui text
>> no-cc
>> list-cc-me
>> ```
>>
>> I have no recollection of setting either no-cc or list-cc-me, and i
>> confess i don't really understand why these options are distinct.
>> Perhaps this was from ancient run (or runs?) of `reportbug --configure`?
>>
>> Without modifying any env vars, I tried commenting out both the `no-cc`
>> and `list-cc-me` options in ~/.reportbugrc, and with both of those
>> removed, the generated X-Debbugs-Cc line after a `M-x debian-bug` was
>> just:
>>
>> ```
>> X-Debbugs-Cc: none, Daniel Kahn Gillmor 
>> ```
>>
>
> Thanks for testing.  So what's happening is that the info debian-bug get
> from the envvars are your full name and your email address.  On the
> other hand with "list-cc-me" you only get the email part there.  So from
> debian-bug point of view those are different info so the de-duplication
> doesn't happen (if both have the same info debian-el will dedup though).
>
> Ideally there should be a way to let reportbug ignore the configuration
> files and only process options passing through command line so that user
> configuration doesn't change its behavior, but as far as I can tell
> there is no option to do that (yet)[1].  Hopefully it will be
> implemented eventually.
>

After some discussion in Bug#1070881[1], Nis suggested that a possible
workaround is to unset $HOME so that reportbug won't read
~/.reportbugrc[2], and I have tested this to be working[3].  As much as
I'd like to propose adding an option to skip loading any configuration
files for reportbug, I guess this settles our immediate concerns, and
Daniel can re-enable "list-cc-me" in ~/.reportbugrc in case he uses
reportbug directly.

Thanks everyone for the testing and suggestions!

[1] https://bugs.debian.org/1070881
[2] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1070881#35
[3] 
https://salsa.debian.org/emacsen-team/debian-el/-/commit/8e6e55ff1aa56bbc109196a2ac1283769d6f13b0

-- 
Xiyue Deng


signature.asc
Description: PGP signature


Bug#1069908: elpa-debian-el: X-Debbugs-Cc: is weirdly overpopulated with duplicate or broken entries

2024-05-10 Thread Xiyue Deng
Daniel Kahn Gillmor  writes:

> Control: tags 1069908 - moreinfo
>
> Hi Xiyue Deng--
>
> On Wed 2024-05-08 19:13:37 -0700, Xiyue Deng wrote:
>> For this issue, it looks like debian-bug.el is passing "--list-cc=none"
>> to reportbug which then becomes part of the message.  This is fixed in
>> [1] and pending sponsoring.
>
> thanks for this analysis and work!
>

Sure thing!

>> I cannot seem to reproduce this.  debian-bug.el tries to get full name
>> and email from several sources, such as user-full-name,
>> user-mail-address, envvars like DEBFULLNAME, DEBNAME, NAME, DEBEMAIL,
>> EMAIL, REPORTBUGEMAIL, etc.  So there may be something unconventional
>> that triggered this.  Can you check if your configuration set those info
>> in multiple places?  What happens if you clear some of them?
>
> Here are the plausibly relevant env vars i have set (generated by
> running `M-1 M-! printenv` from within emacs itself and then manually
> pruning for things that include either my name or e-mail address):
>
> ```
> DEBFULLNAME=Daniel Kahn Gillmor
> DEBEMAIL=d...@fifthhorseman.net
> DEBSIGN_MAINT=Daniel Kahn Gillmor 
> EMAIL=d...@fifthhorseman.net
> ```
>
> None of this seems wrong to me; or even if it does, it still ought to be
> able to be correctly interpreted by debian-bug.el, and de-duplicated.
>
> I decided to look in ~/.reportbugrc and i find i have the following settings:
>
> ```
> reportbug_version "5.0"
> mode standard
> ui text
> no-cc
> list-cc-me
> ```
>
> I have no recollection of setting either no-cc or list-cc-me, and i
> confess i don't really understand why these options are distinct.
> Perhaps this was from ancient run (or runs?) of `reportbug --configure`?
>
> Without modifying any env vars, I tried commenting out both the `no-cc`
> and `list-cc-me` options in ~/.reportbugrc, and with both of those
> removed, the generated X-Debbugs-Cc line after a `M-x debian-bug` was
> just:
>
> ```
> X-Debbugs-Cc: none, Daniel Kahn Gillmor 
> ```
>

Thanks for testing.  So what's happening is that the info debian-bug get
from the envvars are your full name and your email address.  On the
other hand with "list-cc-me" you only get the email part there.  So from
debian-bug point of view those are different info so the de-duplication
doesn't happen (if both have the same info debian-el will dedup though).

Ideally there should be a way to let reportbug ignore the configuration
files and only process options passing through command line so that user
configuration doesn't change its behavior, but as far as I can tell
there is no option to do that (yet)[1].  Hopefully it will be
implemented eventually.

> So perhaps with the fix you have pending, this will be resolved.
>

Sounds good.

> Thanks!
>
> --dkg
>

[1] 
https://salsa.debian.org/reportbug-team/reportbug/-/blob/master/reportbug/utils.py?ref_type=heads#L1458
-- 
Xiyue Deng


signature.asc
Description: PGP signature


Bug#1069908: elpa-debian-el: X-Debbugs-Cc: is weirdly overpopulated with duplicate or broken entries

2024-05-10 Thread Daniel Kahn Gillmor
Control: tags 1069908 - moreinfo

Hi Xiyue Deng--

On Wed 2024-05-08 19:13:37 -0700, Xiyue Deng wrote:
> For this issue, it looks like debian-bug.el is passing "--list-cc=none"
> to reportbug which then becomes part of the message.  This is fixed in
> [1] and pending sponsoring.

thanks for this analysis and work!

> I cannot seem to reproduce this.  debian-bug.el tries to get full name
> and email from several sources, such as user-full-name,
> user-mail-address, envvars like DEBFULLNAME, DEBNAME, NAME, DEBEMAIL,
> EMAIL, REPORTBUGEMAIL, etc.  So there may be something unconventional
> that triggered this.  Can you check if your configuration set those info
> in multiple places?  What happens if you clear some of them?

Here are the plausibly relevant env vars i have set (generated by
running `M-1 M-! printenv` from within emacs itself and then manually
pruning for things that include either my name or e-mail address):

```
DEBFULLNAME=Daniel Kahn Gillmor
DEBEMAIL=d...@fifthhorseman.net
DEBSIGN_MAINT=Daniel Kahn Gillmor 
EMAIL=d...@fifthhorseman.net
```

None of this seems wrong to me; or even if it does, it still ought to be
able to be correctly interpreted by debian-bug.el, and de-duplicated.

I decided to look in ~/.reportbugrc and i find i have the following settings:

```
reportbug_version "5.0"
mode standard
ui text
no-cc
list-cc-me
```

I have no recollection of setting either no-cc or list-cc-me, and i
confess i don't really understand why these options are distinct.
Perhaps this was from ancient run (or runs?) of `reportbug --configure`?

Without modifying any env vars, I tried commenting out both the `no-cc`
and `list-cc-me` options in ~/.reportbugrc, and with both of those
removed, the generated X-Debbugs-Cc line after a `M-x debian-bug` was
just:

```
X-Debbugs-Cc: none, Daniel Kahn Gillmor 
```

So perhaps with the fix you have pending, this will be resolved.

Thanks!

--dkg


signature.asc
Description: PGP signature


Bug#1069908: elpa-debian-el: X-Debbugs-Cc: is weirdly overpopulated with duplicate or broken entries

2024-05-08 Thread Xiyue Deng
Control: tags -1 +moreinfo +pending

Hi Daniel,

Daniel Kahn Gillmor  writes:

> Package: elpa-debian-el
> Version: 37.11
> Severity: normal
> X-Debbugs-Cc: none, d...@fifthhorseman.net, Daniel Kahn Gillmor 
> 
>
> When i do "M-x debian-bug P elpa-debian-el RET" i get the template you
> see here.
>
> Weirdly, X-Debbugs-Cc is pre-populated in this way.
>
> There are at least two things wrong with X-Debbugs-Cc here:
>
>  - the string "none" shouldn't be present.  This smells like a bug,
>where the empty string is somehow being misinterpreted as the string
>"none", but i odn't know where it's happening.
>
>

For this issue, it looks like debian-bug.el is passing "--list-cc=none"
to reportbug which then becomes part of the message.  This is fixed in
[1] and pending sponsoring.

>  - the two additional addresses are duplicative. Even if there is code
>that tries to re-add a duplicate address, it should notice that the
>e-mail address parts are identical, and coalesce them into a single
>address.
>

I cannot seem to reproduce this.  debian-bug.el tries to get full name
and email from several sources, such as user-full-name,
user-mail-address, envvars like DEBFULLNAME, DEBNAME, NAME, DEBEMAIL,
EMAIL, REPORTBUGEMAIL, etc.  So there may be something unconventional
that triggered this.  Can you check if your configuration set those info
in multiple places?  What happens if you clear some of them?

> I don't understand the codebase well enough to be able to see how these
> things are happening, but if you want me to test some changes, or report
> on any other config, please let me know.
>
>--dkg
>

[1] 
https://salsa.debian.org/emacsen-team/debian-el/-/commit/116b3e7c839bf52fa01adba0758487a47cade87a

-- 
Xiyue Deng


signature.asc
Description: PGP signature


Bug#1069908: elpa-debian-el: X-Debbugs-Cc: is weirdly overpopulated with duplicate or broken entries

2024-04-26 Thread Daniel Kahn Gillmor
Package: elpa-debian-el
Version: 37.11
Severity: normal
X-Debbugs-Cc: none, d...@fifthhorseman.net, Daniel Kahn Gillmor 


When i do "M-x debian-bug P elpa-debian-el RET" i get the template you
see here.

Weirdly, X-Debbugs-Cc is pre-populated in this way.

There are at least two things wrong with X-Debbugs-Cc here:

 - the string "none" shouldn't be present.  This smells like a bug,
   where the empty string is somehow being misinterpreted as the string
   "none", but i odn't know where it's happening.


 - the two additional addresses are duplicative. Even if there is code
   that tries to re-add a duplicate address, it should notice that the
   e-mail address parts are identical, and coalesce them into a single
   address.

I don't understand the codebase well enough to be able to see how these
things are happening, but if you want me to test some changes, or report
on any other config, please let me know.

   --dkg

-- System Information:
Debian Release: trixie/sid
  APT prefers testing-debug
  APT policy: (500, 'testing-debug'), (500, 'testing'), (500, 'stable'), (500, 
'oldstable'), (200, 'unstable-debug'), (200, 'unstable'), (1, 
'experimental-debug'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 6.6.15-amd64 (SMP w/4 CPU threads; PREEMPT)
Kernel taint flags: TAINT_FIRMWARE_WORKAROUND
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages elpa-debian-el depends on:
ii  bzip2   1.0.8-5.1
ii  dh-elpa-helper  2.0.17
ii  emacsen-common  3.0.5
ii  reportbug   13.0.1
ii  xz-utils5.6.1+really5.4.5-1

Versions of packages elpa-debian-el recommends:
ii  emacs   1:29.2+1-2
ii  emacs-pgtk [emacs]  1:29.2+1-2
ii  wget1.21.4-1+b1

elpa-debian-el suggests no packages.

-- no debconf information


signature.asc
Description: PGP signature