popularity-contest is broken due to a bad merge with debian

Bug #1822672 reported by Marc D.
32
This bug affects 5 people
Affects Status Importance Assigned to Milestone
popularity-contest (Ubuntu)
Won't Fix
Medium
Unassigned

Bug Description

I was curious how statistics are submitted by popularity-contest, so I checked:

marc@ellen:~$ sudo bash -x /etc/cron.daily/popularity-contest
[…]
+ for URL in $SUBMITURLS
+ setsid /usr/share/popularity-contest/popcon-upload -u https://popcon.ubuntu.com/popcon-submit.cgi -f /var/log/popularity-contest.new -C
+ logger -t popularity-contest 'unable to submit report to https://popcon.ubuntu.com/popcon-submit.cgi.'
[…]

When run manually, the error is:

marc@ellen:~$ /usr/share/popularity-contest/popcon-upload -u https://popcon.ubuntu.com/popcon-submit.cgi -f /var/log/popularity-contest.new -C -d
Unable to parse url
Expected 'PeerHost' at /usr/share/popularity-contest/popcon-upload line 75.

The URL https://popcon.ubuntu.com/popcon-submit.cgi is set in /usr/share/popularity-contest/default.conf

I noticed that /usr/share/popularity-contest/popcon-upload contains hardcoded sequences of "http:", so I tried to manually run popcon-upload with "-u http://popcon.ubuntu.com/popcon-submit.cgi". Turns out, it works:

marc@ellen:~$ /usr/share/popularity-contest/popcon-upload -u http://popcon.ubuntu.com/popcon-submit.cgi -f /var/log/popularity-contest.new -C -d

I suppose this is globally broken since the URL was changed to https, but the script was not updated to support https.

ProblemType: Bug
DistroRelease: Ubuntu 19.04
Package: popularity-contest 1.67ubuntu2
ProcVersionSignature: Ubuntu 5.0.0-8.9-generic 5.0.1
Uname: Linux 5.0.0-8-generic x86_64
ApportVersion: 2.20.10-0ubuntu23
Architecture: amd64
CurrentDesktop: LXQt
Date: Mon Apr 1 21:10:33 2019
InstallationDate: Installed on 2016-01-20 (1166 days ago)
InstallationMedia: Xubuntu 15.10 "Wily Werewolf" - Release amd64 (20151021)
PackageArchitecture: all
SourcePackage: popularity-contest
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Marc D. (koshy) wrote :
Changed in popularity-contest (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in popularity-contest (Ubuntu):
status: New → Confirmed
Revision history for this message
Brian Murray (brian-murray) wrote :

This looks like the change that should have been kept when merging the package with Debian:

--- popularity-contest-1.65ubuntu1/default.conf 2017-06-19 09:52:51.000000000 +0000
+++ popularity-contest-1.66ubuntu1/default.conf 2018-02-22 05:10:35.000000000 +0000
@@ -24,7 +24,7 @@
 # popcon.debian.org.
 #
 KEYRING="/usr/share/popularity-contest/debian-popcon.gpg"
-POPCONKEY="4383FF7B81EEE66F"
+POPCONKEY="3F28C7EC54D00227C397BC7A1EA34EFBE7FD7002"

 # MAILTO specifies the address to e-mail statistics to each week.
 #
@@ -46,7 +46,7 @@

 # SUBMITURLS is a space separated list of where to submit
 # popularity-contest reports using http.
-SUBMITURLS="http://popcon.ubuntu.com/popcon-submit.cgi"
+SUBMITURLS="https://popcon.ubuntu.com/popcon-submit.cgi"

summary: - popularity-contest is probably broken
+ popularity-contest is broken due to a bad merge with debian
tags: added: regression-release rls-ee-incoming
tags: added: rls-ee-notfixing
removed: rls-ee-incoming
Revision history for this message
Andrey Bondarenko (abone) wrote :

Changing SUBMITURLS is not enough to fix this bug.

popcon-upload script contains bad regexp at line 38

my ($host) = $submiturl =~ m%http://([^/]+)%;

This regexp matches only to HTTP, but not HTTPS schema. Upload finishes successfully if I change regexp to

my ($host) = $submiturl =~ m%https?://([^/]+)%;

The issue also exists in upstream version 1.69

https://salsa.debian.org/popularity-contest-team/popularity-contest/blob/160a59f1090b4913180d789c4236d6d3ddb44af6/popcon-upload#L38

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

Could you report the regexp issue to Debian?

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

@Brian, I'm tagging it incoming again, seeing the comments and details it seems our delta just makes the package non fonctional, if you decide to tag it notfixing again could you at least add some rational? If we don't care enough to fix problems should be move the package to universe and drop the delta we have or just remove it from Ubuntu?

tags: added: rls-gg-incoming
removed: rls-ee-notfixing
Revision history for this message
Brian Murray (brian-murray) wrote :

If I recall correctly this was discussed at a Foundations team meeting in September of 2019 where we decided not to prioritize fixing it because it has been broken since 18.04 LTS and as far as we know nothing is consuming the popcon data.

tags: removed: rls-gg-incoming
Revision history for this message
Lenin (gagarin) wrote :

If there was per package popcon I would like to consume it. Maybe it could be added to some qa page per maintainer at ubuntu? Not sure anyone would add it to the debian qa pages...

tags: added: id-5ef373379a5b5207f00bee55
Revision history for this message
Lenin (gagarin) wrote :

Francis, and that means what? It's going to be fixed, or not so much?

Revision history for this message
Brian Murray (brian-murray) wrote :

As noted on the ubuntu-devel mailing list we decided to remove the package from the default install and discard the Ubuntu delta for the package, subsequently this bug is something we won't be fixing.

https://lists.ubuntu.com/archives/ubuntu-devel/2020-July/041089.html

Changed in popularity-contest (Ubuntu):
status: Confirmed → Won't Fix
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.