diff --git a/SOURCES/at-3.1.20-shell.patch b/SOURCES/at-3.1.20-shell.patch
index ac9586c..27f7d48 100644
--- a/SOURCES/at-3.1.20-shell.patch
+++ b/SOURCES/at-3.1.20-shell.patch
@@ -41,7 +41,7 @@ diff -up at-3.1.20/at.c.shell at-3.1.20/at.c
  	fprintf(stderr, "<EOT>\n");
      }
 -    fprintf(fp, "\n");
-+    fprintf(fp, "marcinDELIMITER%08lx\n", i);
++    fprintf(fp, "\nmarcinDELIMITER%08lx\n", i);
      if (ferror(fp))
  	panic("Output error");
      fflush(fp);
diff --git a/SPECS/at.spec b/SPECS/at.spec
index 87ddb24..6e063a3 100644
--- a/SPECS/at.spec
+++ b/SPECS/at.spec
@@ -3,7 +3,7 @@
 Summary:	Job spooling tools
 Name:		at
 Version:	3.1.20
-Release:	11%{?dist}
+Release:	12%{?dist}
 # http://packages.debian.org/changelogs/pool/main/a/at/current/copyright
 # + install-sh is MIT license with changes under Public Domain
 License:	GPLv3+ and GPLv2+ and ISC and MIT and Public Domain
@@ -22,7 +22,7 @@ Patch2:		at-3.1.20-pam.patch
 Patch4:		at-3.1.14-opt_V.patch
 Patch5:		at-3.1.20-shell.patch
 Patch6:		at-3.1.18-nitpicks.patch
-Patch8:		at-3.1.14-fix_no_export.patch 
+Patch8:		at-3.1.14-fix_no_export.patch
 Patch9:		at-3.1.14-mailwithhostname.patch
 Patch10:	at-3.1.14-usePOSIXtimers.patch
 Patch12:	at-3.1.20-aborted-jobs.patch
@@ -183,6 +183,10 @@ chown root:root %{_localstatedir}/spool/at/.SEQ
 %attr(0644,root,root)		/%{_unitdir}/atd.service
 
 %changelog
+* Mon Apr 04 2022 Jan Staněk <jstanek@redhat.com> - 3.1.20-12
+- Add preceding newline to delimiter in at-3.1.20-shell.patch
+  Resolves: rhbz#2070450
+
 * Wed May 23 2018 Tomáš Mráz <tmraz@redhat.com> - 3.1.20-11
 - log the jobs being run
 
@@ -300,7 +304,7 @@ chown root:root %{_localstatedir}/spool/at/.SEQ
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
 
 * Mon Nov 14 2011 Marcela Mašláňová <mmaslano@redhat.com> - 3.1.13-5
-- 754156 fix typo in script 
+- 754156 fix typo in script
 
 * Mon Nov 14 2011 Marcela Mašláňová <mmaslano@redhat.com> - 3.1.13-5
 - fix incorrect option in test in 56atd
@@ -342,7 +346,7 @@ chown root:root %{_localstatedir}/spool/at/.SEQ
 - 617320 systemd init script replacement
 
 * Mon Mar 15 2010 Marcela Mašláňová <mmaslano@redhat.com> - 3.1.12-5
-- 568222 interrupted 'at' job creates empty job for non-root 
+- 568222 interrupted 'at' job creates empty job for non-root
 
 * Mon Mar  1 2010 Marcela Mašláňová <mmaslano@redhat.com> - 3.1.12-4
 - 568779 atd is alway runnig after suspend/resume
@@ -399,7 +403,7 @@ chown root:root %{_localstatedir}/spool/at/.SEQ
 - 486227 add hyphen date into manual page.
 
 * Wed Dec 3 2008 Marcela Mašláňová <mmaslano@redhat.com> - 3.1.10-27
-- 464393 add script into pm-utils, because daemon wasn't taking all jobs 
+- 464393 add script into pm-utils, because daemon wasn't taking all jobs
 	after suspend/hibernate
 
 * Fri Oct 24 2008 Marcela Mašláňová <mmaslano@redhat.com> - 3.1.10-26
@@ -477,7 +481,7 @@ chown root:root %{_localstatedir}/spool/at/.SEQ
 - rhbz#224597
 
 * Fri Oct 27 2006 Marcela Maslanova <mmaslano@redhat.com> - 3.1.10-6
-- fix daylight-saving again 
+- fix daylight-saving again
 - fix #214759 - problem with seteuid
 
 * Wed Oct 25 2006 Marcela Maslanova <mmaslano@redhat.com> - 3.1.10-5
@@ -512,11 +516,11 @@ chown root:root %{_localstatedir}/spool/at/.SEQ
 - use include instead of pam_stack in pam config
 
 * Fri Jun 03 2005 Jason Vas Dias <jvdias@redhat.com> 3.1.8-78
-- fix bug 159220: add pam_loginuid to pam session stack in /etc/pam.d/atd 
+- fix bug 159220: add pam_loginuid to pam session stack in /etc/pam.d/atd
 - fix bug 102341: add '-r' synonym for '-d' / atrm for POSIX / SuS conformance
 
 * Fri Apr 08 2005 Jason Vas Dias <jvdias@redhat.com> 3.1.8-77
-- always call pam_setcred(pamh, PAM_DELETE_CRED) before session 
+- always call pam_setcred(pamh, PAM_DELETE_CRED) before session
 - close
 
 * Tue Apr 05 2005 Jason Vas Dias <jvdias@redhat.com> 3.1.8-70
@@ -527,7 +531,7 @@ chown root:root %{_localstatedir}/spool/at/.SEQ
 - user can know when using at(1) if PAM permission is denied.
 
 * Tue Mar 08 2005 Jason Vas Dias <jvdias@redhat.com> 3.1.8-67
-- better fix for bug 150131: change DAEMON_USERNAME and 
+- better fix for bug 150131: change DAEMON_USERNAME and
 - DAEMON_GROUPNAME to 'root' .
 
 * Mon Mar 07 2005 Jason Vas Dias <jvdias@redhat.com> 3.1.8-66
@@ -545,7 +549,7 @@ chown root:root %{_localstatedir}/spool/at/.SEQ
 - details of blacklisted variables.
 
 * Tue Sep 28 2004 Rik van Riel <riel@redhat.com> 3.1.8-58
-- fix typo in man page, bug 112303 
+- fix typo in man page, bug 112303
 - (regenerated at-3.1.8-man-timespec-path.patch with fix)
 
 * Tue Aug 03 2004 Jason Vas Dias <jvdias@redhat.com>
@@ -678,7 +682,7 @@ chown root:root %{_localstatedir}/spool/at/.SEQ
 - updated patch update, still bug #46546
 
 * Wed Jul 18 2001 Crutcher Dunnavant <crutcher@redhat.com>
-- applied enrico.scholz@informatik.tu-chemnitz.de's change to the env patch to 
+- applied enrico.scholz@informatik.tu-chemnitz.de's change to the env patch to
 - address bug #46546
 
 * Mon Jun 25 2001 Crutcher Dunnavant <crutcher@redhat.com>
@@ -761,7 +765,7 @@ chown root:root %{_localstatedir}/spool/at/.SEQ
 * Mon May 24 1999 Jeff Johnson <jbj@redhat.com>
 - reset SIGCHLD before exec (#3016).
 
-* Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com> 
+* Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com>
 - auto rebuild in the new build environment (release 8)
 
 * Thu Mar 18 1999 Cristian Gafton <gafton@redhat.com>