Bug#927784: unblock: cups/2.2.10-6

2019-04-23 Thread Didier 'OdyX' Raboud
Control: tags -1 -moreinfo

Le mardi, 23 avril 2019, 11.35:59 h CEST Ivo De Decker a écrit :
> On Tue, Apr 23, 2019 at 09:20:51AM +0200, Didier 'OdyX' Raboud wrote:
> > I hereby request an upload authorization towards an unblock for package
> > cups 2.2.10-6; which was not uploaded yet.
> > 
> >   cups (2.2.10-6) unstable; urgency=medium
> >   
> > * Backport patch from upstream's 2.2 "stable" branch:
> >   - Fix an issue with `PreserveJobHistory` and time values (Issue
> >   #5538)
> > (Closes: #921741)
> > 
> > The `PreserveJobHistory` configuration doesn't work correctly in 2.2.10,
> > and this was fixed by upstream in 2.2.11; this upload has only a
> > cherry-pick of upstream's ba9d68cc7467a7a47ef219071902b9e9eb6dbc44 and
> > would fix src:cups bug #921741.
> 
> Please go ahead with the upload to unstable and remove the moreinfo tag from
> this bug once the package is built.

Uploaded; and it built on all release architectures.

Cheers, and thanks for your consideration,
OdyX



Bug#927784: unblock: cups/2.2.10-6

2019-04-23 Thread Ivo De Decker
Control: tags -1 confirmed moreinfo

Hi,

On Tue, Apr 23, 2019 at 09:20:51AM +0200, Didier 'OdyX' Raboud wrote:
> I hereby request an upload authorization towards an unblock for package cups
> 2.2.10-6; which was not uploaded yet.
> 
>   cups (2.2.10-6) unstable; urgency=medium
> 
> * Backport patch from upstream's 2.2 "stable" branch:
>   - Fix an issue with `PreserveJobHistory` and time values (Issue #5538)
> (Closes: #921741)
> 
> The `PreserveJobHistory` configuration doesn't work correctly in 2.2.10, and
> this was fixed by upstream in 2.2.11; this upload has only a cherry-pick of
> upstream's ba9d68cc7467a7a47ef219071902b9e9eb6dbc44 and would fix src:cups bug
> #921741.
> 
> Both the concrete upstream diff and the full debdiff are attached.
> 
> Thanks for your consideration, cheers,
> OdyX
> 
> unblock cups/2.2.10-6

Please go ahead with the upload to unstable and remove the moreinfo tag from
this bug once the package is built.

Thanks,

Ivo



Bug#927784: unblock: cups/2.2.10-6

2019-04-23 Thread Didier 'OdyX' Raboud
Package: release.debian.org
Severity: normal
User: release.debian@packages.debian.org
Usertags: unblock

I hereby request an upload authorization towards an unblock for package cups
2.2.10-6; which was not uploaded yet.

  cups (2.2.10-6) unstable; urgency=medium

* Backport patch from upstream's 2.2 "stable" branch:
  - Fix an issue with `PreserveJobHistory` and time values (Issue #5538)
(Closes: #921741)

The `PreserveJobHistory` configuration doesn't work correctly in 2.2.10, and
this was fixed by upstream in 2.2.11; this upload has only a cherry-pick of
upstream's ba9d68cc7467a7a47ef219071902b9e9eb6dbc44 and would fix src:cups bug
#921741.

Both the concrete upstream diff and the full debdiff are attached.

Thanks for your consideration, cheers,
OdyX

unblock cups/2.2.10-6
diff -Nru cups-2.2.10/debian/changelog cups-2.2.10/debian/changelog
--- cups-2.2.10/debian/changelog2019-03-27 17:13:07.0 +0100
+++ cups-2.2.10/debian/changelog2019-04-23 08:33:01.0 +0200
@@ -1,3 +1,11 @@
+cups (2.2.10-6) unstable; urgency=medium
+
+  * Backport patch from upstream's 2.2 "stable" branch:
+- Fix an issue with `PreserveJobHistory` and time values (Issue #5538)
+  (Closes: #921741)
+
+ -- Didier Raboud   Tue, 23 Apr 2019 08:33:01 +0200
+
 cups (2.2.10-5) unstable; urgency=medium
 
   [ Helge Kreutzmann ]
diff -Nru cups-2.2.10/debian/.git-dpm cups-2.2.10/debian/.git-dpm
--- cups-2.2.10/debian/.git-dpm 2019-03-27 17:13:07.0 +0100
+++ cups-2.2.10/debian/.git-dpm 2019-04-23 08:33:01.0 +0200
@@ -1,6 +1,6 @@
 # see git-dpm(1) from git-dpm package
-2fb6d0075ed13f2fd03a8600a6ecb0892818116b
-2fb6d0075ed13f2fd03a8600a6ecb0892818116b
+9615ef5f2b8374bfe2816f8ff4314234362ce841
+9615ef5f2b8374bfe2816f8ff4314234362ce841
 25b2338346ef3abbb93ea88476887cba7b2b86f8
 25b2338346ef3abbb93ea88476887cba7b2b86f8
 cups_2.2.10.orig.tar.gz
diff -Nru 
cups-2.2.10/debian/patches/0045-Fix-an-issue-with-PreserveJobHistory-and-time-values.patch
 
cups-2.2.10/debian/patches/0045-Fix-an-issue-with-PreserveJobHistory-and-time-values.patch
--- 
cups-2.2.10/debian/patches/0045-Fix-an-issue-with-PreserveJobHistory-and-time-values.patch
  1970-01-01 01:00:00.0 +0100
+++ 
cups-2.2.10/debian/patches/0045-Fix-an-issue-with-PreserveJobHistory-and-time-values.patch
  2019-04-23 08:33:01.0 +0200
@@ -0,0 +1,114 @@
+From 917e6f4ff70eed933c80d21eed4c6bfeb2cb68b7 Mon Sep 17 00:00:00 2001
+From: Michael R Sweet 
+Date: Mon, 11 Mar 2019 13:54:46 -0400
+Subject: Fix an issue with `PreserveJobHistory` and time values (Issue #5538)
+
+Closes: #921741
+---
+ scheduler/job.c | 36 ++--
+ 1 file changed, 18 insertions(+), 18 deletions(-)
+
+diff --git a/scheduler/job.c b/scheduler/job.c
+index cc9283fb8..d4793cbb1 100644
+--- a/scheduler/job.c
 b/scheduler/job.c
+@@ -437,10 +437,20 @@ cupsdCleanJobs(void)
+   curtime  = time(NULL);
+   JobHistoryUpdate = 0;
+ 
++  cupsdLogMessage(CUPSD_LOG_DEBUG2, "cupsdCleanJobs: curtime=%d", 
(int)curtime);
++
+   for (job = (cupsd_job_t *)cupsArrayFirst(Jobs);
+job;
+job = (cupsd_job_t *)cupsArrayNext(Jobs))
+   {
++cupsdLogMessage(CUPSD_LOG_DEBUG2, "cupsdCleanJobs: Job %d, state=%d, 
printer=%p, history_time=%d, file_time=%d", job->id, (int)job->state_value, 
(void *)job->printer, (int)job->history_time, (int)job->file_time);
++
++if ((job->history_time && job->history_time) < JobHistoryUpdate || 
!JobHistoryUpdate)
++  JobHistoryUpdate = job->history_time;
++
++if ((job->file_time && job->file_time < JobHistoryUpdate) || 
!JobHistoryUpdate)
++  JobHistoryUpdate = job->file_time;
++
+ if (job->state_value >= IPP_JOB_CANCELED && !job->printer)
+ {
+  /*
+@@ -456,21 +466,9 @@ cupsdCleanJobs(void)
+   else if (job->file_time && job->file_time <= curtime)
+   {
+ cupsdLogJob(job, CUPSD_LOG_DEBUG, "Removing document files.");
+-cupsdLogJob(job, CUPSD_LOG_DEBUG2, "curtime=%ld, job->file_time=%ld", 
(long)curtime, (long)job->file_time);
+ remove_job_files(job);
+ 
+ cupsdMarkDirty(CUPSD_DIRTY_JOBS);
+-
+-if (job->history_time < JobHistoryUpdate || !JobHistoryUpdate)
+-JobHistoryUpdate = job->history_time;
+-  }
+-  else
+-  {
+-if (job->history_time < JobHistoryUpdate || !JobHistoryUpdate)
+-JobHistoryUpdate = job->history_time;
+-
+-  if (job->file_time < JobHistoryUpdate || !JobHistoryUpdate)
+-JobHistoryUpdate = job->file_time;
+   }
+ }
+   }
+@@ -1729,7 +1727,7 @@ cupsdLoadJob(cupsd_job_t *job)   /* I - Job */
+ job->completed_time = attr->values[0].integer;
+ 
+ if (JobHistory < INT_MAX)
+-  job->history_time = attr->values[0].integer + JobHistory;
++  job->history_time = job->completed_time + JobHistory;
+ else
+   job->history_time = INT_MAX;
+ 
+@@ -1740,7 +1738,7 @@ cupsdLoadJob(cupsd_job_t *job)   /* I -