Bug#895826: conntrack-tools: Default conntrackd run-time to 'Systemd on'

2018-04-16 Thread Arturo Borrero Gonzalez
On 16 April 2018 at 16:38, Corey Bryant  wrote:
> Package: conntrack-tools
> Version: 1:1.4.4+snapshot20161117-6
> Severity: normal
> Tags: patch
> User: ubuntu-de...@lists.ubuntu.com
> Usertags: origin-ubuntu bionic ubuntu-patch
>
> Dear Maintainer,
>
> In Ubuntu, the attached patch was applied to achieve the following:
>   * d/p/enable-runtime-systemd.patch: Enable systemd runtime support by
> default since the package is compiled with --enable-systemd
> (LP: #1761994).
>
> Thanks for considering the patch.

Hey Corey,

thanks for the patch.

Why patching upstream code (and maintain a downstream patch) when we
could just ship both a .service file and a conntrackd.conf file using
libsystemd by default?



Bug#895826: conntrack-tools: Default conntrackd run-time to 'Systemd on'

2018-04-16 Thread Corey Bryant
Package: conntrack-tools
Version: 1:1.4.4+snapshot20161117-6
Severity: normal
Tags: patch
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu bionic ubuntu-patch

Dear Maintainer,

In Ubuntu, the attached patch was applied to achieve the following:
  * d/p/enable-runtime-systemd.patch: Enable systemd runtime support by
default since the package is compiled with --enable-systemd
(LP: #1761994).

Thanks for considering the patch.

-- System Information:
Debian Release: buster/sid
  APT prefers bionic
  APT policy: (500, 'bionic'), (500, 'artful-updates')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.15.0-13-generic (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
diff -Nru 
conntrack-tools-1.4.4+snapshot20161117/debian/patches/enable-runtime-systemd.patch
 
conntrack-tools-1.4.4+snapshot20161117/debian/patches/enable-runtime-systemd.patch
--- 
conntrack-tools-1.4.4+snapshot20161117/debian/patches/enable-runtime-systemd.patch
  1969-12-31 19:00:00.0 -0500
+++ 
conntrack-tools-1.4.4+snapshot20161117/debian/patches/enable-runtime-systemd.patch
  2018-04-16 09:21:40.0 -0400
@@ -0,0 +1,114 @@
+Description: Enable systemd runtime support by default since the
+  package is compiled with --enable-systemd. This reverts
+  "conntrackd: Disable runtime systemd support by default" from
+  commit c01d0d9138112ec95ee316385ea2687dd94fa4e3.
+Author: Corey Bryant 
+Bug-Ubuntu: https://bugs.launchpad.net/bugs/1761994
+Forwarded: not-needed
+Last-Update: 2018-04-16
+
+---
+ conntrackd.conf.5|  4 ++--
+ doc/stats/conntrackd.conf|  4 ++--
+ doc/sync/alarm/conntrackd.conf   |  4 ++--
+ doc/sync/ftfw/conntrackd.conf|  4 ++--
+ doc/sync/notrack/conntrackd.conf |  4 ++--
+ src/read_config_yy.y | 10 --
+ 6 files changed, 18 insertions(+), 12 deletions(-)
+
+--- a/conntrackd.conf.5
 b/conntrackd.conf.5
+@@ -457,9 +457,9 @@
+ 
+ Note: \fBsystemd(1)\fP watchdog is supported as well.
+ 
+-Example: Systemd on
++Example: Systemd off
+ 
+-By default runtime support is disabled.
++By default runtime support is activated.
+ 
+ .TP
+ .BI "Nice "
+--- a/doc/stats/conntrackd.conf
 b/doc/stats/conntrackd.conf
+@@ -6,9 +6,9 @@
+   # Enable systemd support. If conntrackd is compiled with the proper
+   # configuration, you can use a systemd service unit of Type=notify
+   # and use conntrackd with systemd watchdog as well.
+-  # Default is: off
++  # Default is: on
+   #
+-  #Systemd on
++  #Systemd off
+ 
+   #
+   # Set the nice value of the daemon. This value goes from -20
+--- a/doc/sync/alarm/conntrackd.conf
 b/doc/sync/alarm/conntrackd.conf
+@@ -221,9 +221,9 @@
+   # Enable systemd support. If conntrackd is compiled with the proper
+   # configuration, you can use a systemd service unit of Type=notify
+   # and use conntrackd with systemd watchdog as well.
+-  # Default is: off
++  # Default is: on
+   #
+-  #Systemd on
++  #Systemd off
+ 
+   #
+   # Set the nice value of the daemon, this value goes from -20
+--- a/doc/sync/ftfw/conntrackd.conf
 b/doc/sync/ftfw/conntrackd.conf
+@@ -244,9 +244,9 @@
+   # Enable systemd support. If conntrackd is compiled with the proper
+   # configuration, you can use a systemd service unit of Type=notify
+   # and use conntrackd with systemd watchdog as well.
+-  # Default is: off
++  # Default is: on
+   #
+-  #Systemd on
++  #Systemd off
+ 
+   #
+   # Set the nice value of the daemon, this value goes from -20
+--- a/doc/sync/notrack/conntrackd.conf
 b/doc/sync/notrack/conntrackd.conf
+@@ -283,9 +283,9 @@
+   # Enable systemd support. If conntrackd is compiled with the proper
+   # configuration, you can use a systemd service unit of Type=notify
+   # and use conntrackd with systemd watchdog as well.
+-  # Default is: off
++  # Default is: on
+   #
+-  #Systemd on
++  #Systemd off
+ 
+   #
+   # Set the nice value of the daemon, this value goes from -20
+--- a/src/read_config_yy.y
 b/src/read_config_yy.y
+@@ -1112,8 +1112,11 @@
+   | systemd
+   ;
+ 
+-systemd: T_SYSTEMD T_ON   { conf.systemd = 1; };
+-systemd: T_SYSTEMD T_OFF  { conf.systemd = 0; };
++systemd: T_SYSTEMD T_ON { /* already enabled in init_config() */ };
++systemd: T_SYSTEMD T_OFF
++{
++  conf.systemd = 0;
++};
+ 
+ netlink_buffer_size: T_BUFFER_SIZE T_NUMBER
+ {
+@@ -1820,6 +1823,9 @@
+   CONFIG(stats).syslog_facility = -1;
+   CONFIG(netlink).subsys_id = -1;
+ 
++  /* enable systemd by default */
++  CONFIG(systemd) = 1;
++
+   /* Initialize list of user-space helpers */
+