public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [PATCHv2 0/3] test apt:// fetcher test
@ 2019-10-23  9:19 Henning Schild
  2019-10-23  9:19 ` [PATCHv2 1/3] meta-isar/recipes-app: change SRC_URIs of hello rebuild example Henning Schild
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Henning Schild @ 2019-10-23  9:19 UTC (permalink / raw)
  To: isar-users; +Cc: Jan Kiszka, Henning Schild

From: Henning Schild <henning.schild@siemens.com>

changes to v1:
 - comment fixes in p1 and p2
 - p3 now uncomments hello from local.conf, instead of adding it

This adds the test and fixes a partial rebuild bug, which prevented that
test from succeeding so far.

It does have the side-effect that an apt:// URI choosing a version now
has to provide an exact match.

Henning Schild (3):
  meta-isar/recipes-app: change SRC_URIs of hello rebuild example
  dpkg-base: ignore binary packages for "apt-get source"
  ci: add rebuilding hello to test apt:// fetching

 RECIPE-API-CHANGELOG.md               | 7 +++++++
 meta-isar/conf/local.conf.sample      | 2 ++
 meta-isar/recipes-app/hello/hello.inc | 6 ++++--
 meta/classes/dpkg-base.bbclass        | 3 ++-
 scripts/ci_build.sh                   | 1 +
 5 files changed, 16 insertions(+), 3 deletions(-)

-- 
2.23.0


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCHv2 1/3] meta-isar/recipes-app: change SRC_URIs of hello rebuild example
  2019-10-23  9:19 [PATCHv2 0/3] test apt:// fetcher test Henning Schild
@ 2019-10-23  9:19 ` Henning Schild
  2019-10-23  9:19 ` [PATCHv2 2/3] dpkg-base: ignore binary packages for "apt-get source" Henning Schild
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Henning Schild @ 2019-10-23  9:19 UTC (permalink / raw)
  To: isar-users; +Cc: Jan Kiszka, Henning Schild

From: Henning Schild <henning.schild@siemens.com>

A following change will require the PV to be the exact match of the
upstream PV. So "2.10" will not work because upsteam is at "2.10-2", and
similar for "2.9".
We do not want the examples to rebuild an exact version, but rather the
most recent from the suite. The "=" was in there mainly to document the
choosing feature, which is now done by the comment.

Signed-off-by: Henning Schild <henning.schild@siemens.com>
---
 meta-isar/recipes-app/hello/hello.inc | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/meta-isar/recipes-app/hello/hello.inc b/meta-isar/recipes-app/hello/hello.inc
index 747b96b..c5f322b 100644
--- a/meta-isar/recipes-app/hello/hello.inc
+++ b/meta-isar/recipes-app/hello/hello.inc
@@ -5,8 +5,10 @@
 
 inherit dpkg
 
-# this will fetch and unpack the sources from upstream debian
-SRC_URI = "apt://${PN}=${PV}"
+# This will fetch and unpack the sources from upstream Debian.
+# Note that you can also choose a version but have to pick the exact one
+# i.e. "apt://hello=2.10-2".
+SRC_URI = "apt://${PN}"
 
 MAINTAINER = "isar-users <isar-users@googlegroups.com>"
 CHANGELOG_V = "${PV}-99+isar"
-- 
2.23.0


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCHv2 2/3] dpkg-base: ignore binary packages for "apt-get source"
  2019-10-23  9:19 [PATCHv2 0/3] test apt:// fetcher test Henning Schild
  2019-10-23  9:19 ` [PATCHv2 1/3] meta-isar/recipes-app: change SRC_URIs of hello rebuild example Henning Schild
@ 2019-10-23  9:19 ` Henning Schild
  2019-10-23  9:19 ` [PATCHv2 3/3] ci: add rebuilding hello to test apt:// fetching Henning Schild
  2019-10-24 19:54 ` [PATCHv2 0/3] test apt:// fetcher test Baurzhan Ismagulov
  3 siblings, 0 replies; 5+ messages in thread
From: Henning Schild @ 2019-10-23  9:19 UTC (permalink / raw)
  To: isar-users; +Cc: Jan Kiszka, Henning Schild

From: Henning Schild <henning.schild@siemens.com>

A buildchroot might already know the new/rebuild version of an upstream
package as a binary coming from isar-apt. Now apt-get source will try
to fetch that one instead of the upstream version that we rebuild to
produce the new one.

Not that ignoring binaries also means we loose the vague version
matching, inform users about that.

This problem can be seen in partial rebuild scenarios and the switch
solves it, at least until we have sources in isar-apt. Having sources
there, the best idea would probably be to choose the exact upstream
version to rebuild, to not find our own in an incremental build.

Signed-off-by: Henning Schild <henning.schild@siemens.com>
---
 RECIPE-API-CHANGELOG.md        | 7 +++++++
 meta/classes/dpkg-base.bbclass | 3 ++-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/RECIPE-API-CHANGELOG.md b/RECIPE-API-CHANGELOG.md
index bbef1a3..1f29eb2 100644
--- a/RECIPE-API-CHANGELOG.md
+++ b/RECIPE-API-CHANGELOG.md
@@ -149,6 +149,13 @@ default).
 Changes in v0.8
 ---------------
 
+### `apt://` SRC_URIs where added and briefly changed their version picking way
+
+Recipes that use SRC_URIs with `apt://` and choose a version with `=` had a
+partial matching feature for a short time between 0.7 and 0.8. In 0.8 the
+version has to be the exact upsteam match.
+It is probably best to not specify a version if you can.
+
 ### `isar-image.bbclass` class will be deprecated in future version of isar
 
 The content of `isar-image.bbclass` was moved to the `image.bbclass` file.
diff --git a/meta/classes/dpkg-base.bbclass b/meta/classes/dpkg-base.bbclass
index ff85146..1478a17 100644
--- a/meta/classes/dpkg-base.bbclass
+++ b/meta/classes/dpkg-base.bbclass
@@ -35,8 +35,9 @@ do_apt_fetch() {
 		-o Dir::Etc::SourceList="sources.list.d/isar-apt.list" \
 		-o Dir::Etc::SourceParts="-" \
 		-o APT::Get::List-Cleanup="0"
+
 	sudo -E chroot --userspec=$( id -u ):$( id -g ) ${BUILDCHROOT_DIR} \
-		sh -c 'cd ${PP} && apt-get -y source ${SRC_APT}'
+		sh -c 'cd ${PP} && apt-get -y --only-source source ${SRC_APT}'
 	dpkg_undo_mounts
 }
 
-- 
2.23.0


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCHv2 3/3] ci: add rebuilding hello to test apt:// fetching
  2019-10-23  9:19 [PATCHv2 0/3] test apt:// fetcher test Henning Schild
  2019-10-23  9:19 ` [PATCHv2 1/3] meta-isar/recipes-app: change SRC_URIs of hello rebuild example Henning Schild
  2019-10-23  9:19 ` [PATCHv2 2/3] dpkg-base: ignore binary packages for "apt-get source" Henning Schild
@ 2019-10-23  9:19 ` Henning Schild
  2019-10-24 19:54 ` [PATCHv2 0/3] test apt:// fetcher test Baurzhan Ismagulov
  3 siblings, 0 replies; 5+ messages in thread
From: Henning Schild @ 2019-10-23  9:19 UTC (permalink / raw)
  To: isar-users; +Cc: Jan Kiszka, Henning Schild

From: Henning Schild <henning.schild@siemens.com>

Signed-off-by: Henning Schild <henning.schild@siemens.com>
---
 meta-isar/conf/local.conf.sample | 2 ++
 scripts/ci_build.sh              | 1 +
 2 files changed, 3 insertions(+)

diff --git a/meta-isar/conf/local.conf.sample b/meta-isar/conf/local.conf.sample
index d73da1d..7715ce8 100644
--- a/meta-isar/conf/local.conf.sample
+++ b/meta-isar/conf/local.conf.sample
@@ -169,6 +169,8 @@ CONF_VERSION = "1"
 IMAGE_INSTALL = "hello-isar example-raw example-module-${KERNEL_NAME} enable-fsck isar-exclude-docs"
 ## "cache_base_repo" relies on the cache ...
 #IMAGE_INSTALL += "isar-disable-apt-cache"
+## uses apt:// SRC_URI, which does not work with the cache
+#IMAGE_INSTALL += "hello"
 
 #
 # Enable cross-compilation support
diff --git a/scripts/ci_build.sh b/scripts/ci_build.sh
index 713d1c2..d88f46b 100755
--- a/scripts/ci_build.sh
+++ b/scripts/ci_build.sh
@@ -154,6 +154,7 @@ if [ -n "$REPRO_BUILD" ]; then
 fi
 
 sed -i -e 's/#IMAGE_INSTALL += "isar-disable-apt-cache"/IMAGE_INSTALL += "isar-disable-apt-cache"/g' conf/local.conf
+sed -i -e 's/#IMAGE_INSTALL += "hello"/IMAGE_INSTALL += "hello"/g' conf/local.conf
 
 echo 'IMAGE_INSTALL += "cowsay"' >> conf/local.conf
 
-- 
2.23.0


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCHv2 0/3] test apt:// fetcher test
  2019-10-23  9:19 [PATCHv2 0/3] test apt:// fetcher test Henning Schild
                   ` (2 preceding siblings ...)
  2019-10-23  9:19 ` [PATCHv2 3/3] ci: add rebuilding hello to test apt:// fetching Henning Schild
@ 2019-10-24 19:54 ` Baurzhan Ismagulov
  3 siblings, 0 replies; 5+ messages in thread
From: Baurzhan Ismagulov @ 2019-10-24 19:54 UTC (permalink / raw)
  To: isar-users

On Wed, Oct 23, 2019 at 11:19:26AM +0200, Henning Schild wrote:
>   meta-isar/recipes-app: change SRC_URIs of hello rebuild example
>   dpkg-base: ignore binary packages for "apt-get source"
>   ci: add rebuilding hello to test apt:// fetching

Applied to next, thanks.

With kind regards,
Baurzhan.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-10-24 19:54 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-23  9:19 [PATCHv2 0/3] test apt:// fetcher test Henning Schild
2019-10-23  9:19 ` [PATCHv2 1/3] meta-isar/recipes-app: change SRC_URIs of hello rebuild example Henning Schild
2019-10-23  9:19 ` [PATCHv2 2/3] dpkg-base: ignore binary packages for "apt-get source" Henning Schild
2019-10-23  9:19 ` [PATCHv2 3/3] ci: add rebuilding hello to test apt:// fetching Henning Schild
2019-10-24 19:54 ` [PATCHv2 0/3] test apt:// fetcher test Baurzhan Ismagulov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox