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

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

changes to v1:
- fixed commit comment in p2
- fixed recipe comment in p1

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/recipes-app/hello/hello.inc | 6 ++++--
 meta/classes/dpkg-base.bbclass        | 3 ++-
 scripts/ci_build.sh                   | 1 +
 4 files changed, 14 insertions(+), 3 deletions(-)

-- 
2.21.0


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

* [PATCH v2 1/3] meta-isar/recipes-app: change SRC_URIs of hello rebuild example
  2019-09-20  7:22 [PATCH v2 0/3] test apt:// fetcher Henning Schild
@ 2019-09-20  7:22 ` Henning Schild
  2019-09-20  7:22 ` [PATCH v2 2/3] dpkg-base: ignore binary packages for "apt-get source" Henning Schild
  2019-09-20  7:22 ` [PATCH v2 3/3] ci: add rebuilding hello to test apt:// fetching Henning Schild
  2 siblings, 0 replies; 4+ messages in thread
From: Henning Schild @ 2019-09-20  7:22 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.21.0


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

* [PATCH v2 2/3] dpkg-base: ignore binary packages for "apt-get source"
  2019-09-20  7:22 [PATCH v2 0/3] test apt:// fetcher Henning Schild
  2019-09-20  7:22 ` [PATCH v2 1/3] meta-isar/recipes-app: change SRC_URIs of hello rebuild example Henning Schild
@ 2019-09-20  7:22 ` Henning Schild
  2019-09-20  7:22 ` [PATCH v2 3/3] ci: add rebuilding hello to test apt:// fetching Henning Schild
  2 siblings, 0 replies; 4+ messages in thread
From: Henning Schild @ 2019-09-20  7:22 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 do 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 1deccd4..f77eb7b 100644
--- a/meta/classes/dpkg-base.bbclass
+++ b/meta/classes/dpkg-base.bbclass
@@ -34,8 +34,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.21.0


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

* [PATCH v2 3/3] ci: add rebuilding hello to test apt:// fetching
  2019-09-20  7:22 [PATCH v2 0/3] test apt:// fetcher Henning Schild
  2019-09-20  7:22 ` [PATCH v2 1/3] meta-isar/recipes-app: change SRC_URIs of hello rebuild example Henning Schild
  2019-09-20  7:22 ` [PATCH v2 2/3] dpkg-base: ignore binary packages for "apt-get source" Henning Schild
@ 2019-09-20  7:22 ` Henning Schild
  2 siblings, 0 replies; 4+ messages in thread
From: Henning Schild @ 2019-09-20  7:22 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>
---
 scripts/ci_build.sh | 1 +
 1 file changed, 1 insertion(+)

diff --git a/scripts/ci_build.sh b/scripts/ci_build.sh
index 4914279..e8681c0 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
+echo 'IMAGE_INSTALL += "hello"' >> conf/local.conf
 
 # Start cross build for the defined set of configurations
 sed -i -e 's/ISAR_CROSS_COMPILE ?= "0"/ISAR_CROSS_COMPILE ?= "1"/g' conf/local.conf
-- 
2.21.0


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

end of thread, other threads:[~2019-09-20  7:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-20  7:22 [PATCH v2 0/3] test apt:// fetcher Henning Schild
2019-09-20  7:22 ` [PATCH v2 1/3] meta-isar/recipes-app: change SRC_URIs of hello rebuild example Henning Schild
2019-09-20  7:22 ` [PATCH v2 2/3] dpkg-base: ignore binary packages for "apt-get source" Henning Schild
2019-09-20  7:22 ` [PATCH v2 3/3] ci: add rebuilding hello to test apt:// fetching Henning Schild

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