public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@siemens.com>
To: "jlacvdr L." <jlacvdr@gmail.com>,
	isar-users <isar-users@googlegroups.com>
Subject: Re: cannot patch upstream debian package
Date: Wed, 19 Feb 2020 17:21:00 +0100	[thread overview]
Message-ID: <48c33b74-e85c-b6cd-81e1-e35aaa8c5625@siemens.com> (raw)
In-Reply-To: <c4f35e14-4604-47d2-8303-12e40d3d52a9@googlegroups.com>

On 19.02.20 17:10, jlacvdr L. wrote:
> 
> Hi,
> 
> I'm trying apply patch to an upstream debian package
> 
> recipe looks like:
> 
>     inherit dpkg
> 
>     SRC_URI = "apt://${PN} \
>     file://files/mypatch.patch \
>     "
> 
> 
> during  do_dpkg_build, I've got the error:
> 
>       dpkg-source -I --before-build nano-2.9.3
>     dpkg-buildpackage: info: host architecture amd64
>       fakeroot debian/rules clean
>     dh clean --parallel
>         dh_clean -O--parallel
>       dpkg-source -I -b nano-2.9.3
>     dpkg-source: info: using source format '3.0 (quilt)'
>     dpkg-source: info: building nano using existing
>     ./nano_2.9.3.orig.tar.bz2
>     dpkg-source: info: local changes detected, the modified files are:
>       nano-2.9.3/.applied_patches/.patch-commands
>       nano-2.9.3/.applied_patches/files/mypatch.patch
>       nano-2.9.3/src/utils.c
>     dpkg-source: error: aborting due to unexpected upstream changes, see
>     /tmp/nano_2.9.3-1.diff.rSd68A
>     dpkg-source: info: you can integrate the local changes with
>     dpkg-source --commit
>     dpkg-buildpackage: error: dpkg-source -I -b nano-2.9.3 subprocess
>     returned exit status 2
>     WARNING: exit code 2 from a shell command.
> 
> 
> 
> How fix it ?
> Can you confirm that patching an upstream package is supported ?
> 

Yes. The trick (which we should probably share via meta-isar) is to do this:

...
SRC_URI += "file://my.patch;apply=no"

CHANGELOG_V = "${PV}+patch1"

do_prepare_build() {
     deb_add_changelog

     cd ${S}
     quilt import ${WORKDIR}/*.patch
     quilt push -a
}

Jan

-- 
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux

  reply	other threads:[~2020-02-19 16:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-19 16:10 jlacvdr L.
2020-02-19 16:21 ` Jan Kiszka [this message]
2020-02-20 10:34   ` Henning Schild
2020-02-19 16:30 ` jlacvdr L.

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=48c33b74-e85c-b6cd-81e1-e35aaa8c5625@siemens.com \
    --to=jan.kiszka@siemens.com \
    --cc=isar-users@googlegroups.com \
    --cc=jlacvdr@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox