** Description changed:

- The motd-news script is largely useless for desktop users, as they
- rarely login via a text console. It makes more sense for server users.
+ [Impact] 
+ The motd-news script is largely useless for desktop users, as they rarely 
login via a text console. It makes more sense for server users.
  
  We can use package dependencies to have the motd-news script enabled on 
servers, but disabled on desktops, and still handle upgrades. This is the plan:
  - move /etc/default/motd-news from base-files into a NEW package 
(motd-news-config)
  - have ubuntu-server depend on motd-news-config (or recommends)
  - have base-files break current ubuntu-server, so that if base-files if 
upgraded and ubuntu-server is installed, ubuntu-server will also be upgraded to 
the new version which has the depends (or recommends) on motd-news-config
  
  Care must be taken to preserve a changed /etc/default/motd-news when the
  upgrade installs the new motd-news-config package. For example, on a
  server that has set ENABLED=0 in /etc/default/motd-news and upgrades to
  the new base-files and ubuntu-server, and gets the new motd-config-news
  package, ENABLED=0 must remain set.
+ 
+ [Test Case]
+ a) base-files installed, ubuntu-server installed, unmodified /e/d/motd-news
+ apt install base-files
+ - upgrades ubuntu-server
+ - installs motd-news-config
+ - /e/d/motd-news remains, motd-news remains enabled
+ 
+ b) base-files installed, ubuntu-server installed, modified /e/d/motd-news
+ apt install base-files
+ - upgrades ubuntu-server
+ - installs motd-news-config
+ - /e/d/motd-news remains with the original modification
+ 
+ c) base-files installed, ubuntu-server not installed, unmodified 
/e/d/motd-news
+ apt install base-files
+ - upgrades base-files
+ - removes /e/d/motd-news
+ - motd-news is disabled
+ 
+ d) base-files installed, ubuntu-server not installed, modified /e/d/motd-news
+ apt install base-files
+ - upgrades base-files
+ - /e/d/motd-news gets renamed to backup
+ - motd-news is disabled
+ 
+ e) removing motd-news-config will also remove ubuntu-server (since it's
+ a depends, and not a recommends)
+ 
+ f) upgrading just ubuntu-server should pull motd-news-config in, and
+ force-upgrade base-files
+ 
+ g) Removing motd-news-server leaves /e/d/motd-news around; purging motd-
+ news-server removes the /e/d/motd-news config file
+ 
+ h) base-files installed, ubuntu-server installed, removed /e/d/motd-news
+ - apt install base-files
+ - upgrades base-files, upgrades ubuntu-server, installs motd-news-config
+ - /e/d/motd-news is installed with ENABLED=0
+ 
+ i) base-files installed, ubuntu-server NOT installed, removed e/d/motd-news
+ - apt install base-files
+ - base-files is upgraded
+ - no /e/d/motd-news is installed, motd-news remains disabled
+ 
+ [Regression Potential]
+ 
+ 
+ [Other Info]
+ 
+ Testcase (i) will leave around an empty /etc/default/motd-news.wasremoved 
file, created by the base-files postinst. This file is removed by the 
motd-news-config postinst, but since that package doesn't get installed in that 
particular scenario, the file remains. I toyed with the idea of adding an extra 
check to base-file's postinst, like this:
+ --- a/debian/postinst.in
+ +++ b/debian/postinst.in
+ @@ -133,7 +133,11 @@ motd_news_config="/etc/default/motd-news"
+  if [ ! -e ${motd_news_config} ]; then
+    if [ ! -e ${motd_news_config}.dpkg-remove ]; then
+      if [ ! -e ${motd_news_config}.dpkg-backup ]; then
+ -      touch ${motd_news_config}.wasremoved
+ +      # The .wasremoved file only matters if ubuntu-server is installed,
+ +      # because that's what will pull in motd-news-config
+ +      if dpkg -l ubuntu-server 2>/dev/null | grep -q ^i; then
+ +        touch ${motd_news_config}.wasremoved
+ +      fi
+      fi
+    fi
+  fi
+ 
+ But deemed it too risky, and not worth further potential regressions.

** Description changed:

- [Impact] 
+ [Impact]
  The motd-news script is largely useless for desktop users, as they rarely 
login via a text console. It makes more sense for server users.
  
  We can use package dependencies to have the motd-news script enabled on 
servers, but disabled on desktops, and still handle upgrades. This is the plan:
- - move /etc/default/motd-news from base-files into a NEW package 
(motd-news-config)
- - have ubuntu-server depend on motd-news-config (or recommends)
- - have base-files break current ubuntu-server, so that if base-files if 
upgraded and ubuntu-server is installed, ubuntu-server will also be upgraded to 
the new version which has the depends (or recommends) on motd-news-config
+ - move /etc/default/motd-news from base-files into a new binary package 
(motd-news-config, produced by src:base-files)
+ - have ubuntu-server depend on motd-news-config
+ - have base-files break current ubuntu-server, so that if base-files if 
upgraded and ubuntu-server is installed, ubuntu-server will also be upgraded to 
the new version which has the depends on motd-news-config
  
  Care must be taken to preserve a changed /etc/default/motd-news when the
  upgrade installs the new motd-news-config package. For example, on a
  server that has set ENABLED=0 in /etc/default/motd-news and upgrades to
  the new base-files and ubuntu-server, and gets the new motd-config-news
  package, ENABLED=0 must remain set.
  
  [Test Case]
  a) base-files installed, ubuntu-server installed, unmodified /e/d/motd-news
  apt install base-files
  - upgrades ubuntu-server
  - installs motd-news-config
  - /e/d/motd-news remains, motd-news remains enabled
  
  b) base-files installed, ubuntu-server installed, modified /e/d/motd-news
  apt install base-files
  - upgrades ubuntu-server
  - installs motd-news-config
  - /e/d/motd-news remains with the original modification
  
  c) base-files installed, ubuntu-server not installed, unmodified 
/e/d/motd-news
  apt install base-files
  - upgrades base-files
  - removes /e/d/motd-news
  - motd-news is disabled
  
  d) base-files installed, ubuntu-server not installed, modified /e/d/motd-news
  apt install base-files
  - upgrades base-files
  - /e/d/motd-news gets renamed to backup
  - motd-news is disabled
  
  e) removing motd-news-config will also remove ubuntu-server (since it's
  a depends, and not a recommends)
  
  f) upgrading just ubuntu-server should pull motd-news-config in, and
  force-upgrade base-files
  
  g) Removing motd-news-server leaves /e/d/motd-news around; purging motd-
  news-server removes the /e/d/motd-news config file
  
  h) base-files installed, ubuntu-server installed, removed /e/d/motd-news
  - apt install base-files
  - upgrades base-files, upgrades ubuntu-server, installs motd-news-config
  - /e/d/motd-news is installed with ENABLED=0
  
  i) base-files installed, ubuntu-server NOT installed, removed e/d/motd-news
  - apt install base-files
  - base-files is upgraded
  - no /e/d/motd-news is installed, motd-news remains disabled
  
  [Regression Potential]
  
- 
  [Other Info]
  
  Testcase (i) will leave around an empty /etc/default/motd-news.wasremoved 
file, created by the base-files postinst. This file is removed by the 
motd-news-config postinst, but since that package doesn't get installed in that 
particular scenario, the file remains. I toyed with the idea of adding an extra 
check to base-file's postinst, like this:
  --- a/debian/postinst.in
  +++ b/debian/postinst.in
  @@ -133,7 +133,11 @@ motd_news_config="/etc/default/motd-news"
-  if [ ! -e ${motd_news_config} ]; then
-    if [ ! -e ${motd_news_config}.dpkg-remove ]; then
-      if [ ! -e ${motd_news_config}.dpkg-backup ]; then
+  if [ ! -e ${motd_news_config} ]; then
+    if [ ! -e ${motd_news_config}.dpkg-remove ]; then
+      if [ ! -e ${motd_news_config}.dpkg-backup ]; then
  -      touch ${motd_news_config}.wasremoved
  +      # The .wasremoved file only matters if ubuntu-server is installed,
  +      # because that's what will pull in motd-news-config
  +      if dpkg -l ubuntu-server 2>/dev/null | grep -q ^i; then
  +        touch ${motd_news_config}.wasremoved
  +      fi
-      fi
-    fi
-  fi
+      fi
+    fi
+  fi
  
  But deemed it too risky, and not worth further potential regressions.

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to ubuntu-meta in Ubuntu.
https://bugs.launchpad.net/bugs/1888575

Title:
  Split motd-news config into a new package

Status in base-files package in Ubuntu:
  In Progress
Status in ubuntu-meta package in Ubuntu:
  In Progress
Status in base-files source package in Xenial:
  In Progress
Status in ubuntu-meta source package in Xenial:
  In Progress
Status in base-files source package in Bionic:
  In Progress
Status in ubuntu-meta source package in Bionic:
  In Progress
Status in base-files source package in Focal:
  In Progress
Status in ubuntu-meta source package in Focal:
  In Progress
Status in base-files source package in Groovy:
  In Progress
Status in ubuntu-meta source package in Groovy:
  In Progress

Bug description:
  [Impact]
  The motd-news script is largely useless for desktop users, as they rarely 
login via a text console. It makes more sense for server users.

  We can use package dependencies to have the motd-news script enabled on 
servers, but disabled on desktops, and still handle upgrades. This is the plan:
  - move /etc/default/motd-news from base-files into a new binary package 
(motd-news-config, produced by src:base-files)
  - have ubuntu-server depend on motd-news-config
  - have base-files break current ubuntu-server, so that if base-files if 
upgraded and ubuntu-server is installed, ubuntu-server will also be upgraded to 
the new version which has the depends on motd-news-config

  Care must be taken to preserve a changed /etc/default/motd-news when
  the upgrade installs the new motd-news-config package. For example, on
  a server that has set ENABLED=0 in /etc/default/motd-news and upgrades
  to the new base-files and ubuntu-server, and gets the new motd-config-
  news package, ENABLED=0 must remain set.

  [Test Case]
  a) base-files installed, ubuntu-server installed, unmodified /e/d/motd-news
  apt install base-files
  - upgrades ubuntu-server
  - installs motd-news-config
  - /e/d/motd-news remains, motd-news remains enabled

  b) base-files installed, ubuntu-server installed, modified /e/d/motd-news
  apt install base-files
  - upgrades ubuntu-server
  - installs motd-news-config
  - /e/d/motd-news remains with the original modification

  c) base-files installed, ubuntu-server not installed, unmodified 
/e/d/motd-news
  apt install base-files
  - upgrades base-files
  - removes /e/d/motd-news
  - motd-news is disabled

  d) base-files installed, ubuntu-server not installed, modified /e/d/motd-news
  apt install base-files
  - upgrades base-files
  - /e/d/motd-news gets renamed to backup
  - motd-news is disabled

  e) removing motd-news-config will also remove ubuntu-server (since
  it's a depends, and not a recommends)

  f) upgrading just ubuntu-server should pull motd-news-config in, and
  force-upgrade base-files

  g) Removing motd-news-server leaves /e/d/motd-news around; purging
  motd-news-server removes the /e/d/motd-news config file

  h) base-files installed, ubuntu-server installed, removed /e/d/motd-news
  - apt install base-files
  - upgrades base-files, upgrades ubuntu-server, installs motd-news-config
  - /e/d/motd-news is installed with ENABLED=0

  i) base-files installed, ubuntu-server NOT installed, removed e/d/motd-news
  - apt install base-files
  - base-files is upgraded
  - no /e/d/motd-news is installed, motd-news remains disabled

  [Regression Potential]

  [Other Info]

  Testcase (i) will leave around an empty /etc/default/motd-news.wasremoved 
file, created by the base-files postinst. This file is removed by the 
motd-news-config postinst, but since that package doesn't get installed in that 
particular scenario, the file remains. I toyed with the idea of adding an extra 
check to base-file's postinst, like this:
  --- a/debian/postinst.in
  +++ b/debian/postinst.in
  @@ -133,7 +133,11 @@ motd_news_config="/etc/default/motd-news"
   if [ ! -e ${motd_news_config} ]; then
     if [ ! -e ${motd_news_config}.dpkg-remove ]; then
       if [ ! -e ${motd_news_config}.dpkg-backup ]; then
  -      touch ${motd_news_config}.wasremoved
  +      # The .wasremoved file only matters if ubuntu-server is installed,
  +      # because that's what will pull in motd-news-config
  +      if dpkg -l ubuntu-server 2>/dev/null | grep -q ^i; then
  +        touch ${motd_news_config}.wasremoved
  +      fi
       fi
     fi
   fi

  But deemed it too risky, and not worth further potential regressions.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/base-files/+bug/1888575/+subscriptions

-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to     : desktop-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to