Remove uptime from the motd-news user agent

Bug #1886572 reported by Dean Henrichsmeyer on 2020-07-06
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
base-files (Ubuntu)
High
Andreas Hasenack
Xenial
Undecided
Andreas Hasenack
Bionic
Undecided
Andreas Hasenack
Focal
Undecided
Andreas Hasenack

Bug Description

[Impact]
The uptime value in the user-agent string sent to the motd-news server is unused and not necessary. It should be removed.

[Test Case]
Inspect the /etc/update-motd.d/50-motd-news script and verify that uptime is no longer used.

Previous version:
$ grep uptime /etc/update-motd.d/50-motd-news
# Some messages may only be pertinent before or after some amount of uptime
read up idle < /proc/uptime
uptime="uptime/$up/$idle"
USER_AGENT="curl/$curl_ver $lsb $platform $cpu $uptime cloud_id/$cloud_id"

Updated version:
$ grep uptime /etc/update-motd.d/50-motd-news
 (no output)

[Regression Potential]
The server side, if it were checking this value, could be surprised by this change.

[Other Info]
N/A

[Original Description]
I don't why that was included but it shouldn't be. Please remove it.

Related branches

Changed in base-files (Ubuntu):
status: New → In Progress
Andreas Hasenack (ahasenack) wrote :

There is this comment next to the uptime grabbing:
# Some messages may only be pertinent before or after some amount of uptime
read up idle < /proc/uptime
uptime="uptime/$up/$idle"

As far as I know, this was never used, as the server serves static content.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package base-files - 11ubuntu8

---------------
base-files (11ubuntu8) groovy; urgency=medium

  * motd/50-motd-news: don't include uptime in the user-agent string
    (LP: #1886572)

 -- Andreas Hasenack <email address hidden> Mon, 06 Jul 2020 19:50:22 -0300

Changed in base-files (Ubuntu):
status: In Progress → Fix Released
description: updated
Changed in base-files (Ubuntu Xenial):
status: New → In Progress
Changed in base-files (Ubuntu Bionic):
status: New → In Progress
Changed in base-files (Ubuntu Focal):
status: New → In Progress
Changed in base-files (Ubuntu Xenial):
assignee: nobody → Andreas Hasenack (ahasenack)
Changed in base-files (Ubuntu Bionic):
assignee: nobody → Andreas Hasenack (ahasenack)
Changed in base-files (Ubuntu Focal):
assignee: nobody → Andreas Hasenack (ahasenack)

Hello Dean, or anyone else affected,

Accepted base-files into focal-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/base-files/11ubuntu5.2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-focal to verification-done-focal. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-focal. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in base-files (Ubuntu Focal):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-focal
Changed in base-files (Ubuntu Bionic):
status: In Progress → Fix Committed
tags: added: verification-needed-bionic
Timo Aaltonen (tjaalton) wrote :

Hello Dean, or anyone else affected,

Accepted base-files into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/base-files/10.1ubuntu2.10 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in base-files (Ubuntu Xenial):
status: In Progress → Fix Committed
tags: added: verification-needed-xenial
Timo Aaltonen (tjaalton) wrote :

Hello Dean, or anyone else affected,

Accepted base-files into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/base-files/9.4ubuntu4.13 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-xenial to verification-done-xenial. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-xenial. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Download full text (4.1 KiB)

There's no amd64 version of this package as far as I can tell.

On Fri, Aug 21, 2020 at 6:21 AM Timo Aaltonen <email address hidden>
wrote:

> Hello Dean, or anyone else affected,
>
> Accepted base-files into xenial-proposed. The package will build now and
> be available at https://launchpad.net/ubuntu/+source/base-
> files/9.4ubuntu4.13 in a few hours, and then in the -proposed
> repository.
>
> Please help us by testing this new package. See
> https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how
> to enable and use -proposed. Your feedback will aid us getting this
> update out to other Ubuntu users.
>
> If this package fixes the bug for you, please add a comment to this bug,
> mentioning the version of the package you tested, what testing has been
> performed on the package and change the tag from verification-needed-
> xenial to verification-done-xenial. If it does not fix the bug for you,
> please add a comment stating that, and change the tag to verification-
> failed-xenial. In either case, without details of your testing we will
> not be able to proceed.
>
> Further information regarding the verification process can be found at
> https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in
> advance for helping!
>
> N.B. The updated package will be released to -updates after the bug(s)
> fixed by this package have been verified and the package has been in
> -proposed for a minimum of 7 days.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1886572
>
> Title:
> Remove uptime from the motd-news user agent
>
> Status in base-files package in Ubuntu:
> Fix Released
> Status in base-files source package in Xenial:
> Fix Committed
> Status in base-files source package in Bionic:
> Fix Committed
> Status in base-files source package in Focal:
> Fix Committed
>
> Bug description:
> [Impact]
> The uptime value in the user-agent string sent to the motd-news server
> is unused and not necessary. It should be removed.
>
> [Test Case]
> Inspect the /etc/update-motd.d/50-motd-news script and verify that
> uptime is no longer used.
>
> Previous version:
> $ grep uptime /etc/update-motd.d/50-motd-news
> # Some messages may only be pertinent before or after some amount of
> uptime
> read up idle < /proc/uptime
> uptime="uptime/$up/$idle"
> USER_AGENT="curl/$curl_ver $lsb $platform $cpu $uptime
> cloud_id/$cloud_id"
>
> Updated version:
> $ grep uptime /etc/update-motd.d/50-motd-news
> (no output)
>
>
> [Regression Potential]
> The server side, if it were checking this value, could be surprised by
> this change.
>
> [Other Info]
> N/A
>
> [Original Description]
> I don't why that was included but it shouldn't be. Please remove it.
>
> To manage notifications about this bug go to:
>
> https://bugs.launchpad.net/ubuntu/+source/base-files/+bug/1886572/+subscriptions
>
> Launchpad-Notification-Type: bug
> Launchpad-Bug: distribution=ubuntu; sourcepackage=base-files;
> component=main; status=Fix Released; importance=High; assignee=
> <email address hidden>;
> Launchpad-Bug: distribution=ubuntu; di...

Read more...

Dean Henrichsmeyer (dean) wrote :

Sorry, I mean there's no amd64 version in bionic-proposed.

Andreas Hasenack (ahasenack) wrote :

The NEW package (motd-news-config) needs to be accepted, and needs to go into main. I believe an archive admin needs to intervene. Also, ubuntu-meta needs to be accepted together with this.

Andreas Hasenack (ahasenack) wrote :

Focal verification

Current focal version:
  Version table:
 *** 11ubuntu5.1 500
        500 http://br.archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages

Verifying uptime is present:
# grep uptime /etc/update-motd.d/50-motd-news
# Some messages may only be pertinent before or after some amount of uptime
read up idle < /proc/uptime
uptime="uptime/$up/$idle"
USER_AGENT="curl/$curl_ver $lsb $platform $cpu $uptime cloud_id/$cloud_id"

In the updated version, uptime is gone:
base-files:
  Installed: 11ubuntu5.2
  Candidate: 11ubuntu5.2
  Version table:
 *** 11ubuntu5.2 500
        500 http://br.archive.ubuntu.com/ubuntu focal-proposed/main amd64 Packages

# grep uptime /etc/update-motd.d/50-motd-news
#

Focal verification succeeded.

tags: added: verification-done-focal
removed: verification-needed-focal
Andreas Hasenack (ahasenack) wrote :

Bionic verification

Current version:
$ apt-cache policy base-files
base-files:
  Installed: 10.1ubuntu2.9
  Candidate: 10.1ubuntu2.9
  Version table:
 *** 10.1ubuntu2.9 500
        500 http://br.archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages
        100 /var/lib/dpkg/status

Uptime is there:
ubuntu@bionic-motd-news-no-uptime:~$ grep uptime /etc/update-motd.d/50-motd-news
# Some messages may only be pertinent before or after some amount of uptime
read up idle < /proc/uptime
uptime="uptime/$up/$idle"
USER_AGENT="curl/$curl_ver $lsb $platform $cpu $uptime cloud_id/$cloud_id"

After updating, it's gone:
ubuntu@bionic-motd-news-no-uptime:~$ apt-cache policy base-files
base-files:
  Installed: 10.1ubuntu2.10
  Candidate: 10.1ubuntu2.10
  Version table:
 *** 10.1ubuntu2.10 500
        500 http://br.archive.ubuntu.com/ubuntu bionic-proposed/main amd64 Packages
        100 /var/lib/dpkg/status
     10.1ubuntu2.9 500

ubuntu@bionic-motd-news-no-uptime:~$ grep uptime /etc/update-motd.d/50-motd-news
ubuntu@bionic-motd-news-no-uptime:~$

Bionic verification succeeded.

tags: added: verification-done-bionic
removed: verification-needed-bionic
Andreas Hasenack (ahasenack) wrote :

Xenial verification

Current version:
ubuntu@xenial-motd-news-no-uptime:~$ apt-cache policy base-files
base-files:
  Installed: 9.4ubuntu4.12
  Candidate: 9.4ubuntu4.12
  Version table:
 *** 9.4ubuntu4.12 500
        500 http://br.archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages
        100 /var/lib/dpkg/status

Uptime is there:
ubuntu@xenial-motd-news-no-uptime:~$ grep uptime /etc/update-motd.d/50-motd-news
# Some messages may only be pertinent before or after some amount of uptime
read up idle < /proc/uptime
uptime="uptime/$up/$idle"
USER_AGENT="curl/$curl_ver $lsb $platform $cpu $uptime cloud_id/$cloud_id"

After updating:
ubuntu@xenial-motd-news-no-uptime:~$ apt-cache policy base-files
base-files:
  Installed: 9.4ubuntu4.13
  Candidate: 9.4ubuntu4.13
  Version table:
 *** 9.4ubuntu4.13 500
        500 http://br.archive.ubuntu.com/ubuntu xenial-proposed/main amd64 Packages
        100 /var/lib/dpkg/status

Uptime is gone:
ubuntu@xenial-motd-news-no-uptime:~$ grep uptime /etc/update-motd.d/50-motd-news
ubuntu@xenial-motd-news-no-uptime:~$

Xenial verification succeeded.

tags: added: verification-done-xenial
removed: verification-needed-xenial
Mathew Hodson (mhodson) on 2020-08-31
tags: removed: verification-needed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package base-files - 9.4ubuntu4.13

---------------
base-files (9.4ubuntu4.13) xenial; urgency=medium

  [ Andreas Hasenack ]
  * motd/50-motd-news: don't include uptime in the user-agent string
    (LP: #1886572)
  * Move the /etc/default/motd-news conffile to the motd-news-config
    package (LP: #1888575):
    - d/postinst.in, d/postrm, d/preinst: remove /etc/default/motd-news
      config file on base-files upgrade using dpkg-maintscript-helper
    - d/rules: install d/preinst
    - d/control: break on ubuntu-server << 1.361.5 to force an upgrade if
      it is installed, which will pull motd-news-config and the conffile
      back in
    - d/control: new motd-news-config package, carrying the
      configuration file for the /etc/update-motd.d/50-motd-news script.
    - d/motd-news-config.postinst:
      + handle the upgrade case where the motd-news config file was
        changed while it belonged to base-files
      + disable motd-news if the config file was removed by hand before
        the upgrade
    - d/postinst.in: signal the motd-news-config package if the
      motd-news config file was removed manually before the upgrade
    - d/conffiles: remove motd-news
    - d/rules, d/motd-news-config.conffiles: packaging motd-news-config
      without debhelper

  [ Steve Langasek ]
  * motd/50-motd-news: use wget instead of curl, since wget is standard but
    curl is optional (LP: #1888572):
    - This changes the timeout behavior slightly because wget does not have
      an exact equivalent to curl's --max-time argument, we are using
      --timeout instead.

 -- Andreas Hasenack <email address hidden> Mon, 17 Aug 2020 11:19:19 -0300

Changed in base-files (Ubuntu Xenial):
status: Fix Committed → Fix Released

The verification of the Stable Release Update for base-files has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package base-files - 10.1ubuntu2.10

---------------
base-files (10.1ubuntu2.10) bionic; urgency=medium

  [ Andreas Hasenack ]
  * motd/50-motd-news: don't include uptime in the user-agent string
    (LP: #1886572)
  * Move the /etc/default/motd-news conffile to the motd-news-config
    package (LP: #1888575):
    - d/base-files.maintscript: remove /etc/default/motd-news config file
      on upgrade
    - d/control: break on ubuntu-server << 1.417.5 to force an upgrade if
      it is installed, which will pull motd-news-config and the conffile
      back in
    - d/motd-news-config.postinst:
      + handle the upgrade case where the motd-news config file was
        changed while it belonged to base-files
      + disable motd-news if the config file was removed by hand before
        the upgrade
    - d/postinst.in: signal the motd-news-config package if the
      motd-news config file was removed manually before the upgrade
    - d/control: new motd-news-config package, carrying the
      configuration file for the /etc/update-motd.d/50-motd-news script.
    - d/rules, d/motd-news-config.install: /e/d/motd-news is in the
      motd-news-config package now

  [ Steve Langasek ]
  * motd/50-motd-news: use wget instead of curl, since wget is standard but
    curl is optional (LP: #1888572):
    - This changes the timeout behavior slightly because wget does not have
      an exact equivalent to curl's --max-time argument, we are using
      --timeout instead.

 -- Andreas Hasenack <email address hidden> Thu, 13 Aug 2020 15:59:47 -0300

Changed in base-files (Ubuntu Bionic):
status: Fix Committed → Fix Released
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package base-files - 11ubuntu5.2

---------------
base-files (11ubuntu5.2) focal; urgency=medium

  [ Andreas Hasenack ]
  * motd/50-motd-news: don't include uptime in the user-agent string
    (LP: #1886572)
  * Move the /etc/default/motd-news conffile to the motd-news-config
    package (LP: #1888575):
    - d/base-files.maintscript: remove /etc/default/motd-news config file
      on upgrade
    - d/control: break on ubuntu-server << 1.450.2 to force an upgrade if
      it is installed, which will pull motd-news-config and the conffile
      back in
    - d/motd-news-config.postinst:
      + handle the upgrade case where the motd-news config file was
        changed while it belonged to base-files
      + disable motd-news if the config file was removed by hand before
        the upgrade
    - d/postinst.in: signal the motd-news-config package if the
      motd-news config file was removed manually before the upgrade
    - d/control: new motd-news-config package, carrying the
      configuration file for the /etc/update-motd.d/50-motd-news script.
    - d/rules, d/motd-news-config.install: /e/d/motd-news is in the
      motd-news-config package now

  [ Steve Langasek ]
  * motd/50-motd-news: use wget instead of curl, since wget is standard but
    curl is optional (LP: #1888572):
    - This changes the timeout behavior slightly because wget does not have
      an exact equivalent to curl's --max-time argument, we are using
      --timeout instead.

 -- Andreas Hasenack <email address hidden> Mon, 17 Aug 2020 10:31:58 -0300

Changed in base-files (Ubuntu Focal):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers