* cannot patch upstream debian package
@ 2020-02-19 16:10 jlacvdr L.
2020-02-19 16:21 ` Jan Kiszka
2020-02-19 16:30 ` jlacvdr L.
0 siblings, 2 replies; 4+ messages in thread
From: jlacvdr L. @ 2020-02-19 16:10 UTC (permalink / raw)
To: isar-users
[-- Attachment #1.1: Type: text/plain, Size: 1114 bytes --]
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 ?
Regards,
[-- Attachment #1.2: Type: text/html, Size: 2315 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: cannot patch upstream debian package
2020-02-19 16:10 cannot patch upstream debian package jlacvdr L.
@ 2020-02-19 16:21 ` Jan Kiszka
2020-02-20 10:34 ` Henning Schild
2020-02-19 16:30 ` jlacvdr L.
1 sibling, 1 reply; 4+ messages in thread
From: Jan Kiszka @ 2020-02-19 16:21 UTC (permalink / raw)
To: jlacvdr L., isar-users
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: cannot patch upstream debian package
2020-02-19 16:21 ` Jan Kiszka
@ 2020-02-20 10:34 ` Henning Schild
0 siblings, 0 replies; 4+ messages in thread
From: Henning Schild @ 2020-02-20 10:34 UTC (permalink / raw)
To: [ext] Jan Kiszka; +Cc: jlacvdr L., isar-users
Am Wed, 19 Feb 2020 17:21:00 +0100
schrieb "[ext] Jan Kiszka" <jan.kiszka@siemens.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:
Good idea. But debian packages use different patching mechanisms. This
is the solution for quilt-based patching.
A more generic approach would be to "convert" your patches to patch the
debian stuff as well.
So you take the original debinanized source-tree ... apply your patch
... do the quilt or whatever changes to make debian happy .. now diff
the original with the patched and you get a patch that covers debian/
as well and will work without a patch-specific prepare function.
Henning
> ...
> 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
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: cannot patch upstream debian package
2020-02-19 16:10 cannot patch upstream debian package jlacvdr L.
2020-02-19 16:21 ` Jan Kiszka
@ 2020-02-19 16:30 ` jlacvdr L.
1 sibling, 0 replies; 4+ messages in thread
From: jlacvdr L. @ 2020-02-19 16:30 UTC (permalink / raw)
To: isar-users
[-- Attachment #1.1: Type: text/plain, Size: 1335 bytes --]
thanks
it works fine
Le mercredi 19 février 2020 17:10:29 UTC+1, jlacvdr L. a écrit :
>
>
> 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 ?
>
> Regards,
>
>
>
>
>
[-- Attachment #1.2: Type: text/html, Size: 2577 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-02-20 10:34 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-19 16:10 cannot patch upstream debian package jlacvdr L.
2020-02-19 16:21 ` Jan Kiszka
2020-02-20 10:34 ` Henning Schild
2020-02-19 16:30 ` jlacvdr L.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox