Public bug reported:

The man page for logrotate says "Each configuration file can set global
options (local definitions override global ones, and later definitions
override earlier ones)". This is inconsistent with how it actually
behaves.

== Steps to reproduce ==

    $ logrotate --version
    logrotate 3.14.0

        Default mail command:       /usr/bin/mail
        Default compress command:   /bin/gzip
        Default uncompress command: /bin/gunzip
        Default compress extension: .gz
        Default state file path:    /var/lib/logrotate/status
        ACL support:                yes
        SELinux support:            yes
    $ mkdir /tmp/logrotest
    $ cd /tmp/logrotest
    $ touch test.log
    $ touch other.log
    $ cat >logrotate.conf
    /tmp/logrotest/*.log {
        minsize 5M
    }

    /tmp/logrotest/test.log {
        minsize 1M
    }
    $ logrotate --state /tmp/logrostate logrotate.conf 


== What happens ==

    error: logrotate.conf:5 duplicate log entry for
/tmp/logrotest/test.log


== What I expect to happen instead ==

No error, test.log being processed with its specific, later-defined
directives.

ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: logrotate 3.14.0-4ubuntu3
ProcVersionSignature: Ubuntu 5.15.0-58.64~20.04.1-generic 5.15.74
Uname: Linux 5.15.0-58-generic x86_64
NonfreeKernelModules: zfs zunicode zavl icp zcommon znvpair
ApportVersion: 2.20.11-0ubuntu27.25
Architecture: amd64
CasperMD5CheckResult: skip
CurrentDesktop: ubuntu:GNOME
Date: Sun Jan 22 11:46:59 2023
InstallationDate: Installed on 2020-11-30 (782 days ago)
InstallationMedia: Ubuntu 20.04.1 LTS "Focal Fossa" - Release amd64 (20200731)
SourcePackage: logrotate
UpgradeStatus: No upgrade log present (probably fresh install)
modified.conffile..etc.apport.crashdb.conf: [modified]
modified.conffile..etc.default.apport: [modified]
mtime.conffile..etc.apport.crashdb.conf: 2021-06-01T13:11:35.779891
mtime.conffile..etc.default.apport: 2020-11-30T20:24:48.587084

** Affects: logrotate (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: amd64 apport-bug focal wayland-session

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to logrotate in Ubuntu.
https://bugs.launchpad.net/bugs/2003645

Title:
  "Duplicate log entry" instead of later definitions overriding earlier
  ones, as man page says

Status in logrotate package in Ubuntu:
  New

Bug description:
  The man page for logrotate says "Each configuration file can set
  global options (local definitions override global ones, and later
  definitions override earlier ones)". This is inconsistent with how it
  actually behaves.

  == Steps to reproduce ==

      $ logrotate --version
      logrotate 3.14.0

          Default mail command:       /usr/bin/mail
          Default compress command:   /bin/gzip
          Default uncompress command: /bin/gunzip
          Default compress extension: .gz
          Default state file path:    /var/lib/logrotate/status
          ACL support:                yes
          SELinux support:            yes
      $ mkdir /tmp/logrotest
      $ cd /tmp/logrotest
      $ touch test.log
      $ touch other.log
      $ cat >logrotate.conf
      /tmp/logrotest/*.log {
          minsize 5M
      }

      /tmp/logrotest/test.log {
          minsize 1M
      }
      $ logrotate --state /tmp/logrostate logrotate.conf 

  
  == What happens ==

      error: logrotate.conf:5 duplicate log entry for
  /tmp/logrotest/test.log

  
  == What I expect to happen instead ==

  No error, test.log being processed with its specific, later-defined
  directives.

  ProblemType: Bug
  DistroRelease: Ubuntu 20.04
  Package: logrotate 3.14.0-4ubuntu3
  ProcVersionSignature: Ubuntu 5.15.0-58.64~20.04.1-generic 5.15.74
  Uname: Linux 5.15.0-58-generic x86_64
  NonfreeKernelModules: zfs zunicode zavl icp zcommon znvpair
  ApportVersion: 2.20.11-0ubuntu27.25
  Architecture: amd64
  CasperMD5CheckResult: skip
  CurrentDesktop: ubuntu:GNOME
  Date: Sun Jan 22 11:46:59 2023
  InstallationDate: Installed on 2020-11-30 (782 days ago)
  InstallationMedia: Ubuntu 20.04.1 LTS "Focal Fossa" - Release amd64 (20200731)
  SourcePackage: logrotate
  UpgradeStatus: No upgrade log present (probably fresh install)
  modified.conffile..etc.apport.crashdb.conf: [modified]
  modified.conffile..etc.default.apport: [modified]
  mtime.conffile..etc.apport.crashdb.conf: 2021-06-01T13:11:35.779891
  mtime.conffile..etc.default.apport: 2020-11-30T20:24:48.587084

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/logrotate/+bug/2003645/+subscriptions


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

Reply via email to