public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Baurzhan Ismagulov <ibr@radix50.net>
To: isar-users <isar-users@googlegroups.com>
Subject: Re: [PATCHv3] dpkg-base: derive "Package" and "Architecture" from .deb in cleanup
Date: Wed, 17 Apr 2019 14:14:08 +0200	[thread overview]
Message-ID: <20190417121408.GA21981@yssyq.m.ilbers.de> (raw)
In-Reply-To: <20190328185056.61434442@md1za8fc.ad001.siemens.net>

[-- Attachment #1: Type: text/plain, Size: 2940 bytes --]

On Thu, Mar 28, 2019 at 06:50:56PM +0100, Henning Schild wrote:
> A deployment of "all" will not deploy one .deb of arch "all" but it
> will deploy n .debs of all the archs enabled in the repo.
> So on deploy of "all" from arm into a "arm, arm64, x86" repo you will
> get three copies. The next deploy from x86 will write all three again,
> same for arm64. But they are all the same and just get written 3 times.

Ok, I was able to reproduce the problem using the attached patch.

In short, your patch looks good for me. We don't have a further problem of
multiple identical files in isar-apt. Maxim will run the usual tests with your
patch.

Documenting the findings (please comment if anything is wrong):

* I had to bitbake multiconfig:qemuamd64-stretch:isar-image-base, then bitbake
  multiconfig:qemuamd64-stretch:isar-image-base (thus the question about
  multiconfig -- or how can one trigger repo_clean manually?). The second one
  fails with various problems:

  ERROR: 'tmp/work/debian-stretch-amd64/abicheck-1.2-r0/abicheck-1.2/../abicheck_1.2-99+isar_all.deb'
  cannot be included as 'pool/main/a/abicheck/abicheck_1.2-99+isar_all.deb'.
  Already existing files can only be included again, if they are the same, but:
  md5 expected: 21747ce983869443d240a136c4b4e8a9, got: 742593776ebae9c55f7f5a7eef0758d2

  This seems to be the cleanup problem you are addressing.

* After building, the files are:

  tmp/work/debian-stretch-amd64/abicheck-1.2-r0/abicheck_1.2-99+isar_all.deb
  tmp/work/debian-stretch-i386/abicheck-1.2-r0/abicheck_1.2-99+isar_all.deb
  tmp/deploy/isar-apt/apt/debian-stretch/pool/main/a/abicheck/abicheck_1.2-99+isar_all.deb

  The files are built n times in tmp/work and added to isar-apt n times. The
  package is present in isar-apt only once (and not n times, as I interpreted
  from the problem description, so we don't have a problem of multiple
  abicheck_1.2-99+isar_all.deb files in isar-apt, only in
  binary-{amd64,i386,etc.}/Packages.*). reprepro fails adding the package with
  a different checksum.

* Isar removes packages from isar-apt per-arch, to preserve previously built
  artifacts. But _all.debs must be removed from all Packages indexes. Your
  patch adds special handling for _all.debs, removing them from all
  binary-{amd64,i386,etc.}/Packages.*.

* Also, example-raw, hello-isar, and enable-fsck fail with the following:

  DEBUG: Executing shell function do_install_builddeps
  ...
  dh_compress
  dh_compress: Cannot resolve
  (unreachable)/hello-isar-0.3-a18c14c/equivs.brSwev/debian/hello-isar-build-deps:
  No such file or directory
  debian/rules:20: recipe for target 'binary-indep' failed
  make: *** [binary-indep] Error 2
  Error in the build process: exit status 2
  dpkg: error: cannot access archive 'hello-isar-build-deps_0.3_amd64.deb': No
  such file or directory

  I haven't looked into that, have you encountered anything like that?

With kind regards,
Baurzhan.

[-- Attachment #2: 0001-Add-abicheck.patch --]
[-- Type: text/x-diff, Size: 1683 bytes --]

>From 294039a7051a7649ad347d114e75d16f921dcf67 Mon Sep 17 00:00:00 2001
From: Baurzhan Ismagulov <ibr@ilbers.de>
Date: Wed, 17 Apr 2019 11:44:06 +0200
Subject: [PATCH] Add abicheck

---
 meta-isar/conf/local.conf.sample               |  5 ++++-
 meta-isar/recipes-app/abicheck/abicheck_1.2.bb | 22 ++++++++++++++++++++++
 2 files changed, 26 insertions(+), 1 deletion(-)
 create mode 100644 meta-isar/recipes-app/abicheck/abicheck_1.2.bb

diff --git a/meta-isar/conf/local.conf.sample b/meta-isar/conf/local.conf.sample
index 86e2384..5b1d638 100644
--- a/meta-isar/conf/local.conf.sample
+++ b/meta-isar/conf/local.conf.sample
@@ -159,7 +159,10 @@ CONF_VERSION = "1"
 
 #
 # The default list of extra packages to be installed.
-IMAGE_INSTALL = "hello-isar example-raw example-module-${KERNEL_NAME} enable-fsck"
+IMAGE_INSTALL = "hello-isar example-raw example-module-${KERNEL_NAME} \
+    enable-fsck \
+    abicheck \
+"
 
 #
 # Enable cross-compilation support
diff --git a/meta-isar/recipes-app/abicheck/abicheck_1.2.bb b/meta-isar/recipes-app/abicheck/abicheck_1.2.bb
new file mode 100644
index 0000000..af08a0c
--- /dev/null
+++ b/meta-isar/recipes-app/abicheck/abicheck_1.2.bb
@@ -0,0 +1,22 @@
+# This software is a part of ISAR.
+# Copyright (C) 2019 ilbers GmbH
+#
+# SPDX-License-Identifier: MIT
+
+inherit dpkg
+
+# this will fetch and unpack the sources from upstream debian
+SRC_URI = "apt://${PN}=1.2-5"
+
+MAINTAINER = "isar-users <isar-users@googlegroups.com>"
+CHANGELOG_V = "1.2-99+isar"
+
+do_prepare_build() {
+	deb_add_changelog
+}
+
+dpkg_runbuild_prepend() {
+	if [ ${ISAR_CROSS_COMPILE} -eq 1 ]; then
+		export DEB_BUILD_OPTIONS="nocheck"
+	fi
+}
-- 
2.11.0


  parent reply	other threads:[~2019-04-17 12:14 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-21 15:56 Henning Schild
2019-02-21 15:59 ` Henning Schild
2019-03-27 15:45 ` Henning Schild
2019-03-28 11:03 ` Baurzhan Ismagulov
2019-03-28 17:50   ` Henning Schild
2019-04-02 15:31     ` Baurzhan Ismagulov
2019-04-12 12:10       ` Henning Schild
2019-04-16 18:20         ` Baurzhan Ismagulov
2019-04-17  6:14           ` Baurzhan Ismagulov
2019-04-17 12:14     ` Baurzhan Ismagulov [this message]
2019-05-20 10:27 ` Henning Schild
2019-05-20 13:48 ` Maxim Yu. Osipov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190417121408.GA21981@yssyq.m.ilbers.de \
    --to=ibr@radix50.net \
    --cc=isar-users@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox