From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 7123123395198189568 X-Received: by 2002:a63:1208:0:b0:411:9b47:f6cc with SMTP id h8-20020a631208000000b004119b47f6ccmr2811639pgl.79.1658558416673; Fri, 22 Jul 2022 23:40:16 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a63:5304:0:b0:412:9ace:9fdf with SMTP id h4-20020a635304000000b004129ace9fdfls457177pgb.8.-pod-prod-gmail; Fri, 22 Jul 2022 23:40:15 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sS5BI9iLBi2tge4P3sWcXagigfS2pDlUd1Fz8+MxxwWungRYZR7Xj6zhTNnjj+39E7H3wY X-Received: by 2002:a63:4404:0:b0:415:aacf:d394 with SMTP id r4-20020a634404000000b00415aacfd394mr2876771pga.437.1658558415575; Fri, 22 Jul 2022 23:40:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658558415; cv=none; d=google.com; s=arc-20160816; b=j5cO3jh4RaI2mnVPApcyt2tRy5Sp1jxzkMGoSq9RXOZZ+k2bxNzERMFXNjxuQps3wT d3wEf0ZuSdngtRzzWywXoer5PAOQ7FfWnd19FsOLs6+72JaZks9o8AMQOqhimtqcprL1 aaiqQQhBzXF8g43IXZjVGIW9Sx7HbO1KaKLWW66Stl8kx10npMziv5t6HyX9+NN9fc29 GbvkKj1TFY8XFGtj5IYKieF6s2FQLWEhQStJSjAUaNg5c4f8EfEYSd3PwdxpnILh7ZKs dc2b8Pe13yJdO9T5kjvalgx7ac87LtFxe3mw4F5Vw3KWyuFOS/d6SIOUwlg24LFAUAXK q9Rg== 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:date:subject:cc:to:from; bh=ym/vb9di/m1xd5OuaiOjNCWdG85g9YyAZmd+HhKW1L8=; b=F0VQxN0fKProvcRofmYkQoQ0ghpcJz7Zd7LTdvGdnLOfUp0HLgFT8y2TTwxq1SrJ7t IjYyjyJJnOljBUNSUhAaVdRrXrHNd0AHQKjunKsj0oALic4+DI9koHsU4Cqyl0rqdpIs 4C5nAA12qo0R+6P0RoJE1uIhjP6GdQBVi9ErAImnn+JzIHqw8H3o1r/eqGmfmfP6Dfq4 X8lwfg9dvmRHJ0IluTcN2uBzT+Z7BnwwuNsWC9XtxubJZPNpmub1uaL3ovMi/+k9g4/X 9wIDAq8XBa38i6ACO9RBLHbaW4ZVHBMkffKnCfEZ3KsLHVzXcaqZXTpF/cHB61M7rBsm qW/A== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=ubely@ilbers.de Return-Path: Received: from shymkent.ilbers.de (shymkent.ilbers.de. [85.214.156.166]) by gmr-mx.google.com with ESMTPS id mq9-20020a17090b380900b001efe7b9d808si219866pjb.0.2022.07.22.23.40.14 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 22 Jul 2022 23:40:15 -0700 (PDT) Received-SPF: pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) client-ip=85.214.156.166; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=ubely@ilbers.de Received: from home.localnet (44-208-124-178-static.mgts.by [178.124.208.44] (may be forged)) (authenticated bits=0) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPSA id 26N6eC8q001194 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sat, 23 Jul 2022 08:40:12 +0200 From: Uladzimir Bely To: Henning Schild Cc: isar-users Subject: Re: sbuild migration help needed Date: Sat, 23 Jul 2022 09:40:09 +0300 Message-ID: <4928480.Qq0lBPeGtt@home> In-Reply-To: <20220722211656.6ab7aceb@md1za8fc.ad001.siemens.net> References: <20220722111635.75271b45@md1za8fc.ad001.siemens.net> <20220722161907.5dde4183@md1za8fc.ad001.siemens.net> <20220722211656.6ab7aceb@md1za8fc.ad001.siemens.net> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on shymkent.ilbers.de X-TUID: qm0Njpd8F56E In the email from Friday, 22 July 2022 22:16:56 +03 user Henning Schild wrote: > Am Fri, 22 Jul 2022 16:19:07 +0200 > > schrieb Henning Schild : > > Thanks! I will give that a try. Sorry for not sharing that patch, it > > is trivial. > > In fact that patch also does not apply anymore but did before sbuild. > You made it a > > echo "\noverride_dh_usrlocal:" >> ${S}/debian/rules > > And i ended up turning into another sed. > > > I find it a little worrying that a recipe which worked perfectly > > before all of a sudden has to be significantly changed. If there > > would have been a forgotten build-dep i would have been happy, but > > here we have a maybe dramatic change in how the recipe needs to be > > written. > > This recipe was easy enough to share but it shows a fundamental change > in isar. Where before sbuild all of WORKDIR became available in the > buildchroot, now we only get S. > > I would not know how many other recipes in countless layers would care, > but maybe we can somehow get back to WORKDIR and not only S being > mounted and usable in the chroot. > > That recipe is a classic hack where one just packages something with > deb_debianize and the patch features of isar. Being forced to move code > around to arrange an S where WORKDIR would simply work (and be > patchable) is not nice. More involved projects might require more > involved "constructing S" steps. > > We are moving code around and patching Makefile here, so all of a > sudden you need to really understand what you previously could > deb_debianize around with. > > I guess the whole thing is relevant for projects where parts of the > code you care about live in a bigger repo. > Yes, there is a topic for the discussion. On the other hand, before sbuild the recipe was able to be compiled. But, what about generated (after the build) source package in workdir? I'm pretty sure, that it was unbuildable outside of Isar due to missing sources. I'm trying to say that having ${S} deep in ${WORKDIR} is generally a wrong solution producing unbuildable packages (if depends on upper directories). > > I will change it as you suggested. Thanks again! But we will have to > > look out for such big changes breaking existing recipes. All the big > > API changes can and will cause a lot of frustration in all the various > > layers. > > > > And there are the known ones, which are in the changelog ... plus the > > ones that just happen ... like this one, or the meson/ccache i just > > sent a patch for. > > > > Henning > > > > -- > > Index: ifdtool/Makefile > > =================================================================== > > --- ifdtool.orig/Makefile > > +++ ifdtool/Makefile > > @@ -6,7 +6,7 @@ PROGRAM = ifdtool > > > > CC = gcc > > INSTALL = /usr/bin/env install > > > > -PREFIX = /usr/local > > +PREFIX = /usr > > > > CFLAGS = -O2 -g -Wall -Wextra -Wmissing-prototypes -Werror > > CFLAGS += -I../../src/commonlib/include > > > > -I../../src/commonlib/bsd/include CFLAGS += -I../cbfstool/flashmap > > -- > > > > > > Am Fri, 22 Jul 2022 16:08:45 +0300 > > > > schrieb Uladzimir Bely : > > > In the email from Friday, 22 July 2022 14:11:19 +03 user Uladzimir > > > > > > Bely wrote: > > > > In the email from Friday, 22 July 2022 12:16:35 +03 user Henning > > > > Schild > > > > > > wrote: > > > > > Hi, > > > > > > > > > > i have a recipe where i am building just a util from a bigger > > > > > package, so my S is somewhere inside WORKDIR and some headers > > > > > are below S. > > > > > > > > > > With sbuild that recipe stopped working, not finding those > > > > > headers anymore. I did not yet look into the details, but maybe > > > > > only S get put into that chroot and not all of WORKDIR. > > > > > > > > I've looked a bit at the problem. > > > > > > > > Sbulid doesn't use WORKDIR at all, but builds the package basing > > > > on its .dsc file. It happens that generated `ifdtool_4.14.dsc` > > > > refers to `ifdtool_4.14.tar.gz`, which simply doesn't contain > > > > upper directories. > > > > > > > > I think, something more complex than automatic `deb_debianize` > > > > should be used here. > > > > > > For instance, it worked for me in form of separate ${S} directory > > > where I copy required files and modify Makefile to fit new directory > > > structure: > > > > > > inherit dpkg > > > > > > DESCRIPTION = "Tool for Fast, secure and flexible OpenSource > > > firmware" > > > > > > SRC_URI = > > > "https://github.com/coreboot/coreboot/archive/${PV}.tar.gz" > > > SRC_URI[sha256sum] = > > > "73740c313935f21964577fd6621f9acaddf1244cc704e88046f854d93ed6feab" > > > > > > DEBIAN_DEPENDS = "\${misc:Depends}" > > > > > > S = "${WORKDIR}/${PN}-${PV}" > > this is nothing but WORKDIR/P ... the default ... can be skipped > > > > do_prepare_build[cleandirs] += "${S}/debian" > > has to be S not S/debian > > > > do_prepare_build() { > > > > > > cp -rf ${WORKDIR}/coreboot-${PV}/util/${PN}/* ${S}/ > > > > > > # Copy required sources from upper directories > > > cp -rf ${WORKDIR}/coreboot-${PV}/util/cbfstool/flashmap > > > > > > ${S}/ mkdir -p ${S}/commonlib/include > > > > > > cp -rf ${WORKDIR}/coreboot-${PV}/src/commonlib/include/* > > > > > > ${S}/ commonlib/include/ > > > > > > mkdir -p ${S}/commonlib/bsd/include > > > cp -rf ${WORKDIR}/coreboot-${PV}/src/commonlib/bsd/include/* > > > > > > ${S}/ commonlib/bsd/include/ > > > > > > # Fix include paths > > > sed -i -e "s/\.\.\/cbfstool\/flashmap/flashmap/g" > > > > > > ${S}/Makefile sed -i -e "s/\.\.\/\.\.\/src\/commonlib/commonlib/g" > > > ${S}/Makefile > > > > > > deb_debianize > > > echo "\noverride_dh_usrlocal:" >> ${S}/debian/rules > > > > > > } > > Thanks again. I managed to get my layer to build with your input and > ended up simply taking most of your code! > > But again i think that isar could maybe learn to put the whole WORKDIR > into the chroot, where S would be a subdir. So that good old patching > and good old recipes remain working. > > Not sure we really want that, but this very recipe could become part of > the tests. As a showcase of "we care about some parts" and > "deb_debianize" them out of the whole thing. Possibly .. ing below S > > Henning > > > > > > Here is the recipe: > > > > > > > > > > ifdtool_4.14.bb: > > > > > -- > > > > > inherit dpkg > > > > > > > > > > DESCRIPTION = "Tool for Fast, secure and flexible OpenSource > > > > > firmware" > > > > > > > > > > SRC_URI = > > > > > "https://github.com/coreboot/coreboot/archive/${PV}.tar.gz" > > > > > SRC_URI[sha256sum] = > > > > > "73740c313935f21964577fd6621f9acaddf1244cc704e88046f854d93ed6feab" > > > > > SRC_URI += "file://Makefile-prefix.patch" > > > > > > > > > > DEBIAN_DEPENDS = "\${misc:Depends}" > > > > > > > > > > S = "${WORKDIR}/coreboot-${PV}/util/${PN}" > > > > > > > > > > do_prepare_build[cleandirs] += "${S}/debian" > > > > > do_prepare_build() { > > > > > > > > > > deb_debianize > > > > > > > > > > } > > > > > -- > > > > > > > > > > Henning -- Uladzimir Bely