From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6795190720334397440 X-Gmail-Labels: Topic type: DISCUSSION X-Received: by 2002:a1c:7215:: with SMTP id n21mr3890792wmc.154.1582194873073; Thu, 20 Feb 2020 02:34:33 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a5d:65d0:: with SMTP id e16ls11246427wrw.1.gmail; Thu, 20 Feb 2020 02:34:32 -0800 (PST) X-Google-Smtp-Source: APXvYqyDk5ivUlJ+DR42/CDyQHUdErkuUY03X8rFchQIj09yyWrBuefzWRWvCjb2iL6YZIZEjwjC X-Received: by 2002:adf:e3cd:: with SMTP id k13mr15926581wrm.302.1582194872402; Thu, 20 Feb 2020 02:34:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582194872; cv=none; d=google.com; s=arc-20160816; b=IC3KiSwBTmHuxqRovstCBnVeZZpWs9K8mp1M3PkGBXsWXzDAmISAX45RBHxOAMHhQ6 gmRc8YMLmYS/pa1sw7sA7t5sz9t3QztSSEXG4XU+Ef06yfQKSxtoZYH3xyVN08USsR57 k83HFm0KeQHXiyOWLudHFsH9qA69ndD/sopBzPh+OhWDw7v3k5BtN5emG2YksegP4WVh RWToRt75kUc6bIBqX8lXkLb47bmRUvVjPSXu7sfc/4iMvDem2mtJLw4q6nph1RsSO/4J Q6oukBSuokwQzBahSn3gHC0kJc1tPlbcCpzO6GCT9RE0rt1b/q/0d2/OfbTppq2D0ERY +kvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date; bh=FuORZHeCdmOTIpv5XRbJXaJzj3W58fpS1Th+mwh8L1w=; b=sx+UI0mSbmP30g734AJNPRdizCKFaJIl86VIYDzrT+3dT8O5U7UKUFskWfU32tPcRt 8PHHLtJnAM+bEaNynbbwAAN0IORELfhfFpnKhboZjMmmE13rVUME0R8lEDGtUjSJRB7V 91mHNhBuWpz6enpEywGevYi/GYsegHB2oper3Omc4UojiFJtrCvEvyp8SUn0RD2SYBCf 1gQQG025IqbcJhAkJMmVDXeQHjbUSvNmMuXBONvKiIAClg7loSNq5iq/AJ1f25aRJ+0X 9ZRJqSlhG77Z551wSJ7WQu5t/4ArAJTdYz53D5CXLRPDJcmT+XxzyLdi9AUuDj0OgHf6 GZmQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of henning.schild@siemens.com designates 194.138.37.39 as permitted sender) smtp.mailfrom=henning.schild@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Return-Path: Received: from lizzard.sbs.de (lizzard.sbs.de. [194.138.37.39]) by gmr-mx.google.com with ESMTPS id e21si150017wme.1.2020.02.20.02.34.32 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 20 Feb 2020 02:34:32 -0800 (PST) Received-SPF: pass (google.com: domain of henning.schild@siemens.com designates 194.138.37.39 as permitted sender) client-ip=194.138.37.39; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of henning.schild@siemens.com designates 194.138.37.39 as permitted sender) smtp.mailfrom=henning.schild@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Received: from mail1.sbs.de (mail1.sbs.de [192.129.41.35]) by lizzard.sbs.de (8.15.2/8.15.2) with ESMTPS id 01KAYVPf026725 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 20 Feb 2020 11:34:31 +0100 Received: from md1za8fc.ad001.siemens.net ([139.25.69.212]) by mail1.sbs.de (8.15.2/8.15.2) with ESMTP id 01KAYVoe008631; Thu, 20 Feb 2020 11:34:31 +0100 Date: Thu, 20 Feb 2020 11:34:31 +0100 From: Henning Schild To: "[ext] Jan Kiszka" Cc: "jlacvdr L." , isar-users Subject: Re: cannot patch upstream debian package Message-ID: <20200220113431.105f09bc@md1za8fc.ad001.siemens.net> In-Reply-To: <48c33b74-e85c-b6cd-81e1-e35aaa8c5625@siemens.com> References: <48c33b74-e85c-b6cd-81e1-e35aaa8c5625@siemens.com> X-Mailer: Claws Mail 3.17.4 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-TUID: St37IKiJfvTG Am Wed, 19 Feb 2020 17:21:00 +0100 schrieb "[ext] Jan Kiszka" : > On 19.02.20 17:10, jlacvdr L. wrote: > >=20 > > Hi, > >=20 > > I'm trying apply patch to an upstream debian package > >=20 > > recipe looks like: > >=20 > > inherit dpkg > >=20 > > SRC_URI =3D "apt://${PN} \ > > file://files/mypatch.patch \ > > " > >=20 > >=20 > > during=C2=A0 do_dpkg_build, I've got the error: > >=20 > > =C2=A0dpkg-source -I --before-build nano-2.9.3 > > dpkg-buildpackage: info: host architecture amd64 > > =C2=A0fakeroot debian/rules clean > > dh clean --parallel > > =C2=A0 =C2=A0dh_clean -O--parallel > > =C2=A0dpkg-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 > > =C2=A0nano-2.9.3/.applied_patches/files/mypatch.patch > > =C2=A0nano-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. > >=20 > >=20 > >=20 > > How fix it ? > > Can you confirm that patching an upstream package is supported ? > > =20 >=20 > 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 +=3D "file://my.patch;apply=3Dno" >=20 > CHANGELOG_V =3D "${PV}+patch1" >=20 > do_prepare_build() { > deb_add_changelog >=20 > cd ${S} > quilt import ${WORKDIR}/*.patch > quilt push -a > } >=20 > Jan >=20