dpkg-source: error: diff 'openssl/debian/patches/pr12272.patch' patches files multiple times; split the diff in multiple files or merge the hunks into a single one

Bug #1927161 reported by Dan Streetman
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
openssl (Ubuntu)
Fix Released
Low
Matthew Ruffell
Groovy
Fix Released
Low
Matthew Ruffell
Hirsute
Fix Released
Low
Matthew Ruffell
Impish
Fix Released
Low
Matthew Ruffell

Bug Description

[impact]

openssl doesn't build source properly because of a badly-constructed patch

[test case]

$ pull-lp-source openssl groovy
...
$ cd openssl-1.1.1f/
$ quilt pop -a
...
$ dpkg-buildpackage -d -S
dpkg-buildpackage: info: source package openssl
dpkg-buildpackage: info: source version 1.1.1f-1ubuntu4.3
dpkg-buildpackage: info: source distribution groovy-security
dpkg-buildpackage: info: source changed by Marc Deslauriers <email address hidden>
 dpkg-source --before-build .
dpkg-source: warning: can't parse dependency perl:native
dpkg-source: error: diff 'openssl-1.1.1f/debian/patches/pr12272.patch' patches files multiple times; split the diff in multiple files or merge the hunks into a single one
dpkg-buildpackage: error: dpkg-source --before-build . subprocess returned exit status 25

Test builds are available in the following ppa:

https://launchpad.net/~mruffell/+archive/ubuntu/lp1927161-test

[regression potential]

any regression would likely cause a failed build or would affect the functionality that patch pr12272 was added for, which is adding support for Intel CET

[scope]

this is needed only for g and later

this is caused by the bad patch 'pr12272.patch' which is only included in g/h/i, so this does not apply to f or earlier

[other info]

note that if the patches are applied, this bug is bypassed; i.e. if 'quilt pop -a' is removed from the test case above, the bug doesn't reproduce. this is only a problem when the patches aren't already applied and dpkg-buildpackage needs to call dpkg-source to apply the patches.

Dan Streetman (ddstreet)
description: updated
Changed in openssl (Ubuntu Groovy):
importance: Undecided → Low
Changed in openssl (Ubuntu Hirsute):
importance: Undecided → Low
Changed in openssl (Ubuntu Impish):
importance: Undecided → Low
description: updated
Changed in openssl (Ubuntu Groovy):
status: New → In Progress
Changed in openssl (Ubuntu Hirsute):
status: New → In Progress
Changed in openssl (Ubuntu Impish):
status: New → In Progress
Changed in openssl (Ubuntu Groovy):
assignee: nobody → Matthew Ruffell (mruffell)
Changed in openssl (Ubuntu Hirsute):
assignee: nobody → Matthew Ruffell (mruffell)
Changed in openssl (Ubuntu Impish):
assignee: nobody → Matthew Ruffell (mruffell)
Revision history for this message
Matthew Ruffell (mruffell) wrote :

I split 'pr12272.patch' into one file per commit, and I did a diff to ensure that there is no changes to the code:

https://paste.ubuntu.com/p/zDqqXmsM8c/

When using these split up patches "dpkg-buildpackage -d -S" completes successfully.

Revision history for this message
Matthew Ruffell (mruffell) wrote :

Attached is a debdiff for impish which fixes this problem.

Revision history for this message
Matthew Ruffell (mruffell) wrote :

Attached is a debdiff for openssl on hirsute which fixes this problem.

Revision history for this message
Matthew Ruffell (mruffell) wrote :

Attached is a debdiff for openssl on groovy, which fixes this issue, and also bug 1926254

Revision history for this message
Matthew Ruffell (mruffell) wrote :

Attached is a V2 for impish which correctly has d/p/ in the debian/changelog.

Revision history for this message
Matthew Ruffell (mruffell) wrote :

Attached is a V2 for hirsute which correctly has d/p/ in the debian/changelog.

description: updated
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "debdiff for openssl on groovy" seems to be a debdiff. The ubuntu-sponsors team has been subscribed to the bug report so that they can review and hopefully sponsor the debdiff. If the attachment isn't a patch, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are member of the ~ubuntu-sponsors, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issue please contact him.]

tags: added: patch
Dan Streetman (ddstreet)
tags: added: block-proposed-hirsute block-proposed-impish
Dan Streetman (ddstreet)
tags: removed: block-proposed-impish
Revision history for this message
Dan Streetman (ddstreet) wrote :

uploaded to g/h/i, thanks!

I also added block-proposed-hirsute tag, since it's a build-time-only problem and doesn't need to get moved to hirsute-updates until (if) another openssl patch comes along.

Revision history for this message
Robie Basak (racb) wrote : Please test proposed package

Hello Dan, or anyone else affected,

Accepted openssl into hirsute-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/openssl/1.1.1j-1ubuntu3.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-hirsute to verification-done-hirsute. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-hirsute. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in openssl (Ubuntu Hirsute):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-hirsute
Changed in openssl (Ubuntu Groovy):
status: In Progress → Fix Committed
tags: added: verification-needed-groovy
Revision history for this message
Robie Basak (racb) wrote :

Hello Dan, or anyone else affected,

Accepted openssl into groovy-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/openssl/1.1.1f-1ubuntu4.4 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-groovy to verification-done-groovy. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-groovy. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Revision history for this message
Ubuntu SRU Bot (ubuntu-sru-bot) wrote : Autopkgtest regression report (openssl/1.1.1j-1ubuntu3.1)

All autopkgtests for the newly accepted openssl (1.1.1j-1ubuntu3.1) for hirsute have finished running.
The following regressions have been reported in tests triggered by the package:

serf/1.3.9-10 (s390x)
qcalcfilehash/1.0.7+git20200816.1eb8770-2 (s390x)
cockpit/238-1 (arm64)
scapy/2.4.4-4ubuntu1 (ppc64el, amd64, armhf, arm64)
ngircd/26.1-1 (arm64)

Please visit the excuses page listed below and investigate the failures, proceeding afterwards as per the StableReleaseUpdates policy regarding autopkgtest regressions [1].

https://people.canonical.com/~ubuntu-archive/proposed-migration/hirsute/update_excuses.html#openssl

[1] https://wiki.ubuntu.com/StableReleaseUpdates#Autopkgtest_Regressions

Thank you!

Revision history for this message
Ubuntu SRU Bot (ubuntu-sru-bot) wrote : Autopkgtest regression report (openssl/1.1.1f-1ubuntu4.4)

All autopkgtests for the newly accepted openssl (1.1.1f-1ubuntu4.4) for groovy have finished running.
The following regressions have been reported in tests triggered by the package:

libcrypt-ssleay-perl/0.73.06-1build3 (arm64)
resource-agents/1:4.6.1-1ubuntu2 (s390x)
puma/3.12.4-1ubuntu2 (arm64)
uftp/4.10.2-1 (amd64)
python3.8/3.8.6-1ubuntu0.2 (arm64)
ecflow/5.5.1-1 (s390x)
python3.9/3.9.0-5 (amd64)

Please visit the excuses page listed below and investigate the failures, proceeding afterwards as per the StableReleaseUpdates policy regarding autopkgtest regressions [1].

https://people.canonical.com/~ubuntu-archive/proposed-migration/groovy/update_excuses.html#openssl

[1] https://wiki.ubuntu.com/StableReleaseUpdates#Autopkgtest_Regressions

Thank you!

Revision history for this message
Dan Streetman (ddstreet) wrote :

ubuntu@lp1927161-h:~$ pull-lp-source openssl hirsute
...
ubuntu@lp1927161-h:~$ cd openssl-1.1.1j/
ubuntu@lp1927161-h:~/openssl-1.1.1j$ dpkg-parsechangelog | grep Version
Version: 1.1.1j-1ubuntu3.1
ubuntu@lp1927161-h:~/openssl-1.1.1j$ quilt pop -a
ubuntu@lp1927161-h:~/openssl-1.1.1j$ dpkg-buildpackage -d -S
dpkg-buildpackage: info: source package openssl
dpkg-buildpackage: info: source version 1.1.1j-1ubuntu3.1
dpkg-buildpackage: info: source distribution hirsute
dpkg-buildpackage: info: source changed by Matthew Ruffell <email address hidden>
...
dpkg-buildpackage: info: binary and diff upload (original source NOT included)

ubuntu@lp1927161-g:~$ pull-lp-source openssl groovy
...
ubuntu@lp1927161-g:~$ cd openssl-1.1.1f/
ubuntu@lp1927161-g:~/openssl-1.1.1f$ dpkg-parsechangelog | grep Version
Version: 1.1.1f-1ubuntu4.4
ubuntu@lp1927161-g:~/openssl-1.1.1f$ quilt pop -a
...
ubuntu@lp1927161-g:~/openssl-1.1.1f$ dpkg-buildpackage -d -S
dpkg-buildpackage: info: source package openssl
dpkg-buildpackage: info: source version 1.1.1f-1ubuntu4.4
dpkg-buildpackage: info: source distribution groovy
dpkg-buildpackage: info: source changed by Matthew Ruffell <email address hidden>
...
dpkg-buildpackage: info: binary and diff upload (original source NOT included)

tags: added: verification-done verification-done-groovy verification-done-hirsute
removed: verification-needed verification-needed-groovy verification-needed-hirsute
Revision history for this message
Dan Streetman (ddstreet) wrote :

The only autopkgtests still failing are for 'scapy', those fail due to bug 1928081 and there is an upload of scapy in the queue to fix that

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package openssl - 1.1.1j-1ubuntu4

---------------
openssl (1.1.1j-1ubuntu4) impish; urgency=medium

  * Split d/p/pr12272.patch into multiple patchfiles to fix dpkg-source
    error when attempting to build a source package, due to pr12272.patch
    patching files multiple times within the same patch. (LP: #1927161)
    - d/p/lp-1927161-1-x86-Add-endbranch-to-indirect-branch-targets-fo.patch
    - d/p/lp-1927161-2-Use-swapcontext-for-Intel-CET.patch
    - d/p/lp-1927161-3-x86-Always-generate-note-gnu-property-section-f.patch
    - d/p/lp-1927161-4-x86_64-Always-generate-note-gnu-property-sectio.patch
    - d/p/lp-1927161-5-x86_64-Add-endbranch-at-function-entries-for-In.patch

 -- Matthew Ruffell <email address hidden> Wed, 05 May 2021 11:49:27 +1200

Changed in openssl (Ubuntu Impish):
status: In Progress → Fix Released
Revision history for this message
Chris Halse Rogers (raof) wrote : Update Released

The verification of the Stable Release Update for openssl has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package openssl - 1.1.1f-1ubuntu4.4

---------------
openssl (1.1.1f-1ubuntu4.4) groovy; urgency=medium

  * Allow x509 certificates which set basicConstraints=CA:FALSE,pathlen:0
    to validate, as it is common on self-signed leaf certificates.
    (LP: #1926254)
    - d/p/lp-1926254-1-Allow-certificates-with-Basic-Constraints-CA-fa.patch
    - d/p/lp-1926254-2-Set-X509_V_ERR_INVALID_EXTENSION-error-for-inva.patch
    - d/p/lp-1926254-3-Add-test-cases-for-the-non-CA-certificate-with-.patch
  * Split d/p/pr12272.patch into multiple patchfiles to fix dpkg-source
    error when attempting to build a source package, due to pr12272.patch
    patching files multiple times within the same patch. (LP: #1927161)
    - d/p/lp-1927161-1-x86-Add-endbranch-to-indirect-branch-targets-fo.patch
    - d/p/lp-1927161-2-Use-swapcontext-for-Intel-CET.patch
    - d/p/lp-1927161-3-x86-Always-generate-note-gnu-property-section-f.patch
    - d/p/lp-1927161-4-x86_64-Always-generate-note-gnu-property-sectio.patch
    - d/p/lp-1927161-5-x86_64-Add-endbranch-at-function-entries-for-In.patch

 -- Matthew Ruffell <email address hidden> Wed, 05 May 2021 12:13:30 +1200

Changed in openssl (Ubuntu Groovy):
status: Fix Committed → Fix Released
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

I am quite surprised by this behaviour.

Especially since, `quilt push -a; debuild -S` works find, unpacks fine, applies fine etc.

Quite a weird limitation imho. Do you think this warrants an upstream dpkg bug report?

Revision history for this message
Marc Deslauriers (mdeslaur) wrote :

> I am quite surprised by this behaviour.

I'm not, I hit it all the time with git-style multiple patches in one file. I always split them into multiple files now.

Revision history for this message
Dan Streetman (ddstreet) wrote :

multiple patches shouldn't ever be cat'ed into a single file; that is awful. One patch file per actual patch.

This fails because quilt allows fuzz, while dpkg-source doesn't, and it shouldn't.

Revision history for this message
Steve Langasek (vorlon) wrote : Please test proposed package

Hello Dan, or anyone else affected,

Accepted openssl into hirsute-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/openssl/1.1.1j-1ubuntu3.2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-hirsute to verification-done-hirsute. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-hirsute. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

tags: added: verification-needed verification-needed-hirsute
removed: verification-done verification-done-hirsute
tags: added: verification-done verification-done-hirsute
removed: block-proposed-hirsute verification-needed verification-needed-hirsute
Revision history for this message
Ubuntu SRU Bot (ubuntu-sru-bot) wrote : Autopkgtest regression report (openssl/1.1.1j-1ubuntu3.2)

All autopkgtests for the newly accepted openssl (1.1.1j-1ubuntu3.2) for hirsute have finished running.
The following regressions have been reported in tests triggered by the package:

ruby-eventmachine/1.3~pre20201020-b50c135-2 (amd64)
scapy/2.4.4-4ubuntu1 (armhf, amd64, arm64, ppc64el)
python-a38/0.1.3-1 (armhf, amd64, s390x, arm64, ppc64el)
xmltooling/3.2.0-2 (amd64, arm64, s390x, ppc64el, armhf)

Please visit the excuses page listed below and investigate the failures, proceeding afterwards as per the StableReleaseUpdates policy regarding autopkgtest regressions [1].

https://people.canonical.com/~ubuntu-archive/proposed-migration/hirsute/update_excuses.html#openssl

[1] https://wiki.ubuntu.com/StableReleaseUpdates#Autopkgtest_Regressions

Thank you!

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package openssl - 1.1.1j-1ubuntu3.2

---------------
openssl (1.1.1j-1ubuntu3.2) hirsute; urgency=medium

  * Cherry-pick an upstream patch to fix s390x AES code (LP: #1931994)

openssl (1.1.1j-1ubuntu3.1) hirsute; urgency=medium

  * Split d/p/pr12272.patch into multiple patchfiles to fix dpkg-source
    error when attempting to build a source package, due to pr12272.patch
    patching files multiple times within the same patch. (LP: #1927161)
    - d/p/lp-1927161-1-x86-Add-endbranch-to-indirect-branch-targets-fo.patch
    - d/p/lp-1927161-2-Use-swapcontext-for-Intel-CET.patch
    - d/p/lp-1927161-3-x86-Always-generate-note-gnu-property-section-f.patch
    - d/p/lp-1927161-4-x86_64-Always-generate-note-gnu-property-sectio.patch
    - d/p/lp-1927161-5-x86_64-Add-endbranch-at-function-entries-for-In.patch

 -- Simon Chopin <email address hidden> Fri, 23 Jul 2021 14:32:42 +0200

Changed in openssl (Ubuntu Hirsute):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.