From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 7146503320914362368 X-Received: by 2002:a81:c312:0:b0:345:4b07:60f5 with SMTP id r18-20020a81c312000000b003454b0760f5mr14276018ywk.187.1664052815296; Sat, 24 Sep 2022 13:53:35 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a81:5389:0:b0:34a:963:bf53 with SMTP id h131-20020a815389000000b0034a0963bf53ls8727662ywb.1.-pod-prod-gmail; Sat, 24 Sep 2022 13:53:34 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4TgX4W847eDtPGj5Vq/A68j63N7ouqkECreBfWIYkV2DUhyNi6xpnmdXDyfis6tnzu8DwO X-Received: by 2002:a05:690c:823:b0:349:bc6c:630c with SMTP id by3-20020a05690c082300b00349bc6c630cmr14059507ywb.223.1664052814508; Sat, 24 Sep 2022 13:53:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664052814; cv=none; d=google.com; s=arc-20160816; b=yeCO56WJgfrHj4H0lNSb9ZI1Ozfpe4r4eYOXcwlR/q/2ua97gD+lpTKYTmZRX2a2W0 eaXGmg7TPlr0ZVSAgQXSNASpS0x53SzXwoUsLoE0kDdshF35at1IIaGKHbVQ3HdaYcvr SjLdAa8CJR7QSIF1DE4a9Jn3dHwHFVlkVA/AjIy+rGKf24QMPbILSk/kqQgZz+3cUjpo ilxXV/oxqtjsc0kZ4RP7669hMfM1PcPoYz96o7+1b/zNgoEzk6XE+aX6rDDjMqE5TrNT 2nJkKf9nZ/r4+41GoNJjsoYd29f8FpaiWY3z9adc1WAerILBtQNkmOeNRXqY2WEaHlbM ZROw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:dkim-signature; bh=EiAIvcgLlXuSwacbRjmEId+3BcKRVZNikIujhVnoPfY=; b=ch7aWMGORCy1n7vCj6TqUfd3znuYJUjD80PStzejrkfpLMx184illbDzgccnTsbgdx 0ifQVygWPgNUTHYpx4QUCc0MrjZbRlmL9hARoe1pTzxMd4AhMFVk9EMxPdlzVzMs76VQ NfFnf1Xp16ZT0MaLRQ3JSYRUsYjX7e5nD9hcCSOQq+aLPhenTIXY8rJhWnVfsvtKPM4L oZ67iBU4K99bDI8YnMBru+SH7ijR5aDVIRB6yJTnbjnZChuf+ZOjAYrVJxs2/yIeSgfy lhc1ukHr0qfG6LthNaWA3uMkEy96cy6/YIfCM8bjccCNarg4PHkcwJEIJuB5pFHadZLf F1uw== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=G3H5rE4k; spf=pass (google.com: domain of roberto.foglietta@gmail.com designates 2607:f8b0:4864:20::135 as permitted sender) smtp.mailfrom=roberto.foglietta@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from mail-il1-x135.google.com (mail-il1-x135.google.com. [2607:f8b0:4864:20::135]) by gmr-mx.google.com with ESMTPS id b5-20020a25b845000000b006aea4e47938si792739ybm.1.2022.09.24.13.53.34 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 24 Sep 2022 13:53:34 -0700 (PDT) Received-SPF: pass (google.com: domain of roberto.foglietta@gmail.com designates 2607:f8b0:4864:20::135 as permitted sender) client-ip=2607:f8b0:4864:20::135; Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=G3H5rE4k; spf=pass (google.com: domain of roberto.foglietta@gmail.com designates 2607:f8b0:4864:20::135 as permitted sender) smtp.mailfrom=roberto.foglietta@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: by mail-il1-x135.google.com with SMTP id r5so355148ilm.10 for ; Sat, 24 Sep 2022 13:53:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date; bh=EiAIvcgLlXuSwacbRjmEId+3BcKRVZNikIujhVnoPfY=; b=G3H5rE4kOPA6HRf5dPF1ozgFs3EW4qIN5qiYXJ3phteoWuZ0pqtHojEVztgyzrBmRf sS7ADzQ/J5tercJBPbHM4sWCHiGa4+onVL1UTZWUbJJbvrW8dqSaorwWLs/1JgBP+1+s qd+mgKiz3i0GEDUJyGJLsm/f0tgjH56ftlgWT5M0PA3MNKrRRnJowopdB/Kcu/d1yUzj 4XIQnemYlAje9tUzlUMusiOANLoK8Yo673fc+x4n6WmO0mOrmzkyOLtXuPikCiNmJSxl 7jwFEDGyhuKoIMYaNpBXj0dpA1PyEK7MHd/Av701VBb3xHUFxshtY3VReBDVOYV0OOdV OmNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date; bh=EiAIvcgLlXuSwacbRjmEId+3BcKRVZNikIujhVnoPfY=; b=u0KwlqiYz+zHdDBcU3DjTl8fBcyyjTnV6I2ngZod6JOJez1CZ26MnQA3k7AHKy/+NT t6XXWz4yCl41FyzZ7mdApS9AE4d3pgNOVshgHYUfu5zQ3cB2LRzU5+2JjD04ukTrdAzh SKwtquEUKAjNIYFdK+y+ezmgEGqph6kvRiWUsGQkyk2II0sLKMoE1h/ckLx0ExoCRfN0 tO5bShzkYvpLVcHJ0T7kA7wbmZ6OISnscDKi953syH9j/J0s6HiYtuEEsCry3/K3ztRL +Xqmyq8zM4Le3Ubw0KT0dg9Y1PbdaRqbDjbnLXHAIn0DnXll7ddxuwlkvhxsiyPU1CtT Js0w== X-Gm-Message-State: ACrzQf2w4foZ7sa5vKuuLBJuJTu7EOH/FI6lWK+xqxjDQIWTlaPOVSAa j7e9altmoIWsPtsgI9wCJ+C+SoTdzwDULDyfLB5yhp4z6Q== X-Received: by 2002:a92:c04d:0:b0:2f5:1175:c7a3 with SMTP id o13-20020a92c04d000000b002f51175c7a3mr7202393ilf.165.1664052813899; Sat, 24 Sep 2022 13:53:33 -0700 (PDT) MIME-Version: 1.0 References: <20220923125648.798e010a@md1za8fc.ad001.siemens.net> In-Reply-To: <20220923125648.798e010a@md1za8fc.ad001.siemens.net> From: "Roberto A. Foglietta" Date: Sat, 24 Sep 2022 22:53:22 +0200 Message-ID: Subject: Re: apt-mark hold package within postinst To: Henning Schild Cc: isar-users@googlegroups.com Content-Type: multipart/alternative; boundary="000000000000dc2bf805e9727c83" X-TUID: 3QLZYtVpqGmn --000000000000dc2bf805e9727c83 Content-Type: text/plain; charset="UTF-8" Il Ven 23 Set 2022, 12:56 Henning Schild ha scritto: > Am Fri, 23 Sep 2022 11:58:53 +0200 > schrieb "Roberto A. Foglietta" : > > > Il Ven 23 Set 2022, 11:22 Roberto A. Foglietta > > ha scritto: > > > > > Hi all, > > > > > > .deb repackaged should not upgrade with any external source so they > > > should marked on hold. Easy but not possible to do within postinst > > > obviously. Not in a straight way, at least. Am I wrong? > > > > > I you rebuild you should add some suffix to PV > > CHANGELOG_V ?= "${PV}+roberto" > > During installation of isar itself your rebuilt package will win > anyways. Make sure to add it to IMAGE_INSTALL instead of PREINSTALL, or > make sure to have a bitbake DEPENDS if it comes in via a debian dep > chain. > > But during lifetime any apt-get upgrade could replace yours when debian > brings an update. To deal with that it is best to deploy a preferences > file with some dpkg-raw configuration package. > > roberto-pin_0.1.bb: > inherit dpkg-raw > do_install() { > echo -e "Package: *\nPin: version *+roberto*\nPin-Priority: 1000" > > ${D}/etc/apt/preferences.d/${PN} > } > > With this all packages that have the roberto suffix will become > non-replaceable ... unless someone uses that same suffix. > > Generally you want to try and mainline all your changes to avoid local > rebuilds. > > Another trick would be an empty package that conflicts with anything > greater than "${PV}+roberto", that should also prevent updates. Not > sure which way is better. > > We mostly build images that are replaces as a whole and will not get > much "apt-get" during their life. Note that kernel updates with apt-get > will not easily work in an isar built image. It will depend on your > bootloader whether it might work, and you might have to add scripts > that update bootloader configs after kernel install. > Dear Henning, first of all, thank you for your explanation. I think about it and I arrived to the conclusion that your solution is good but top definitive for my need/goals. The problem is 1. that even wintout any update available the original packages are seen as updates and 2. I wish to avoid that the user upgrade the repackaged packages installing the dependencies I removed. However, I am not interested in make their upgrade difficult. Probably, I will keep only hold the packages at the installation but even remove the holding as configuration. Just a way to avoid that kids break up the system just with a basic admin operation without further complications. Best regards, R- --000000000000dc2bf805e9727c83 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Il Ven 23 Set 2022, 12:56 Henning Schild <henning.schild@siemens.com> ha scritto:
Am Fri, 23 Sep 2022 11:58:53 +0200
schrieb "Roberto A. Foglietta" <roberto.fo= glietta@gmail.com>:

> Il Ven 23 Set 2022, 11:22 Roberto A. Foglietta
> <roberto.foglietta@gmail.com> ha scritto= :
>
> > Hi all,
> >
> >=C2=A0 .deb repackaged should not upgrade with any external source= so they
> > should marked on hold. Easy but not possible to do within postins= t
> > obviously. Not in a straight way, at least. Am I wrong?
> >=C2=A0

I you rebuild you should add some suffix to PV

CHANGELOG_V ?=3D "${PV}+roberto"

During installation of isar itself your rebuilt package will win
anyways. Make sure to add it to IMAGE_INSTALL instead of PREINSTALL, or
make sure to have a bitbake DEPENDS if it comes in via a debian dep
chain.

But during lifetime any apt-get upgrade could replace yours when debian
brings an update. To deal with that it is best to deploy a preferences
file with some dpkg-raw configuration package.

roberto-pin_0.1.bb:
inherit dpkg-raw
do_install() {
=C2=A0 echo -e "Package: *\nPin: version *+roberto*\nPin-Priority: 100= 0" >
=C2=A0 =C2=A0 ${D}/etc/apt/preferences.d/${PN}
}

With this all packages that have the roberto suffix will become
non-replaceable ... unless someone uses that same suffix.

Generally you want to try and mainline all your changes to avoid local
rebuilds.

Another trick would be an empty package that conflicts with anything
greater than "${PV}+roberto", that should also prevent updates. N= ot
sure which way is better.

We mostly build images that are replaces as a whole and will not get
much "apt-get" during their life. Note that kernel updates with a= pt-get
will not easily work in an isar built image. It will depend on your
bootloader whether it might work, and you might have to add scripts
that update bootloader configs after kernel install.
=

Dear Henning,=C2=A0

=C2=A0first of all, thank you for= your explanation. I think about it and I arrived to the conclusion that yo= ur solution is good but top definitive for my need/goals.

The problem is 1. that even wintout any u= pdate available the original packages are seen as updates and 2. I wish to = avoid that the user upgrade the repackaged packages installing the dependen= cies I removed.

However,= I am not interested in make their upgrade difficult. Probably, I will keep= only hold the packages at the installation but even remove the holding as = configuration.

Just a wa= y to avoid that kids break up the system just with a basic admin operation = without further complications.

Best regards, R-
--000000000000dc2bf805e9727c83--