From: "Zoltan Boszormenyi" <zboszor@pr.hu>
To: Richard Purdie <richard.purdie@linuxfoundation.org>,
Alexander Kanavin <alex.kanavin@gmail.com>
Cc: OE-core <openembedded-core@lists.openembedded.org>, zboszor@gmail.com
Subject: Re: [OE-core] [PATCH 1/6] package_rpm.bbclass: Handle posttrans scriptlets
Date: Mon, 23 Aug 2021 15:42:35 +0200 [thread overview]
Message-ID: <c090aae7-ebac-1a8f-8aca-162cebac8c5a@pr.hu> (raw)
In-Reply-To: <3fc9ff4e880846c2cfd52fb5659c3294424ac176.camel@linuxfoundation.org>
2021. 08. 23. 15:23 keltezéssel, Richard Purdie írta:
> On Mon, 2021-08-23 at 15:14 +0200, Zoltan Boszormenyi via lists.openembedded.org
> wrote:
>> It's documented at www.rpm.org, Red Hat and SuSE.
>>
>> https://docs.fedoraproject.org/en-US/packaging-guidelines/Scriptlets/
>> https://en.opensuse.org/openSUSE:Packaging_scriptlet_snippets
>> https://rpm-packaging-guide.github.io/
>>
>> It's available since RPM 4.4. RPM 4.16.1.3 is in Hardknott.
>>
>> A short Google search showed that *maybe* dpkg also supports it,
>> or at least there are(were?) plans to implement it:
>> https://wiki.debian.org/i18n/TranslationDebsProposals
>>
>> With postinst, the time when the scriptlet runs may depend
>> on the order of the packages in the upgrade transaction and
>> may run with the older binaries in place.
>>
>> The posttrans scriptlet runs at the very end of the
>> install/upgrade transaction, just like the OPKG "intercept"
>> scripts.
>>
>> I successfully tested it long ago with a kernel upgrade
>> that was running dracut on the new version, plus a dracut
>> upgrade in the same session. Dissecting the initramfs proved
>> that with postinst, the old dracut version generated it,
>> while with posttrans, the new one did.
>>
>> Who would want to use it? Anyone who needs some finalizer
>> script to be run at the end of an RPM/DNF transaction.
>>
>> I started on Angstrom and I know opkg doesn't implement this
>> and Yocto inherited it. This patch is basically a heads up
>> that there's another way to do the same thing. Maybe opkg
>> implements this some day, maybe not. Anyway, Yocto in general
>> will need more changes before the main package.bbclass can
>> start to use it for all package formats.
>>
>
> There is a bigger issue here which is how can anyone use this without making
> their recipe rpm specific? I'm very reluctant to add functionality like this
> unless we have a way to emulate it or fall back on the other package formats.
Indeed. This patch can be dropped.
Full disclosure: I don't use this anymore, since I implemented
another two bbclass recipes to generate the kernel's initramfs
either during the kernel build (and ship it in a subpackage) or
during do_rootfs and move it out of the way in the image postprocess
script so e.g. a squashfs image will have it separately.
They work well for my use limited cases:
* full OS installed on disk
* squashfs for PXE-based remote booted machines
FYI: the dracutsysrootdir feature in recent dracut versions is my work.
I just carried this patch for a couple of years now and I thought maybe
someone sees some value in it.
>
> The intercept pieces are used by both rpm and opkg and actually do something
> slightly different, they stack common calls until the end of the transaction.
> This means for example we can call "ldconfig" once rather than in every
> postinst.
>
> Cheers,
>
> Richard
>
>
>
>
>
>
>
next prev parent reply other threads:[~2021-08-23 13:42 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-23 12:23 Kernel and RPM related bbclass changes Zoltan Boszormenyi
2021-08-23 12:23 ` [PATCH 1/6] package_rpm.bbclass: Handle posttrans scriptlets Zoltan Boszormenyi
2021-08-23 12:34 ` [OE-core] " Alexander Kanavin
2021-08-23 13:14 ` Zoltan Boszormenyi
2021-08-23 13:23 ` Richard Purdie
2021-08-23 13:42 ` Zoltan Boszormenyi [this message]
2021-08-23 12:23 ` [PATCH 2/6] kernel-module-split.bbclass: Support zstd-compressed modules Zoltan Boszormenyi
2021-08-23 12:23 ` [PATCH 3/6] kernel-module-split.bbclass: Allow opt-out of split kernel modules Zoltan Boszormenyi
2021-08-23 12:55 ` [OE-core] " Bruce Ashfield
2021-08-23 13:18 ` Zoltan Boszormenyi
2021-08-23 13:27 ` Bruce Ashfield
2021-08-23 13:31 ` Zoltan Boszormenyi
2021-08-23 13:35 ` Bruce Ashfield
[not found] ` <169DF0BA24F74A88.27647@lists.openembedded.org>
2021-08-23 12:56 ` Bruce Ashfield
2021-08-23 12:23 ` [PATCH 4/6] kernel.bbclass: Adapt to KERNEL_SPLIT_MODULES != "1" case Zoltan Boszormenyi
2021-08-23 12:23 ` [PATCH 5/6] kernel.bbclass: Use full versions for inter-package dependencies Zoltan Boszormenyi
2021-08-23 13:03 ` [OE-core] " Bruce Ashfield
2021-08-23 13:29 ` Zoltan Boszormenyi
2021-08-23 13:38 ` Bruce Ashfield
2021-08-23 13:48 ` Zoltan Boszormenyi
2021-08-23 12:23 ` [PATCH 6/6] Support zstd-compressed squashfs and cpio initramfs Zoltan Boszormenyi
2021-08-23 14:47 ` Kernel related bbclass changes Zoltan Boszormenyi
2021-08-23 14:47 ` [PATCH v2 1/4] kernel-module-split.bbclass: Support zstd-compressed modules Zoltan Boszormenyi
2021-08-23 14:47 ` [PATCH v2 2/4] Allow opt-out of split kernel modules Zoltan Boszormenyi
2021-08-23 14:47 ` [PATCH v2 3/4] kernel.bbclass: Use full versions for inter-package dependencies Zoltan Boszormenyi
2021-08-23 14:47 ` [PATCH v2 4/4] Support zstd-compressed squashfs and cpio initramfs Zoltan Boszormenyi
2021-08-23 14:54 ` Kernel related bbclass changes Zoltan Boszormenyi
2021-08-27 7:37 ` Kernel and image " Zoltan Boszormenyi
2021-08-27 7:37 ` [PATCH v4 1/4] kernel-module-split.bbclass: Support zstd-compressed modules Zoltan Boszormenyi
2021-08-27 7:37 ` [PATCH v4 2/4] Allow opt-out of split kernel modules Zoltan Boszormenyi
2021-08-27 7:37 ` [PATCH v4 3/4] kernel.bbclass: Use full versions for inter-package dependencies Zoltan Boszormenyi
2021-08-30 9:30 ` [OE-core] " Andrey Zhizhikin
2021-08-30 10:06 ` Zoltan Boszormenyi
[not found] ` <b75df7be-03d8-e454-60b8-1651fc935ca5@gmail.com>
2021-08-30 10:25 ` Andrey Zhizhikin
2021-08-30 19:51 ` Jon Mason
2021-08-31 4:28 ` Zoltan Boszormenyi
2021-08-31 13:32 ` Richard Purdie
2021-08-31 13:54 ` Andrey Zhizhikin
2021-08-27 7:37 ` [PATCH v4 4/4] Support zstd-compressed squashfs and cpio initramfs Zoltan Boszormenyi
2021-08-23 14:54 ` [PATCH v3 1/4] kernel-module-split.bbclass: Support zstd-compressed modules Zoltan Boszormenyi
2021-08-23 14:54 ` [PATCH v3 2/4] Allow opt-out of split kernel modules Zoltan Boszormenyi
2021-08-23 14:54 ` [PATCH v3 3/4] kernel.bbclass: Use full versions for inter-package dependencies Zoltan Boszormenyi
2021-08-23 14:54 ` [PATCH v3 4/4] Support zstd-compressed squashfs and cpio initramfs Zoltan Boszormenyi
2021-08-26 12:04 ` [OE-core] " Richard Purdie
2021-08-27 7:24 ` Zoltan Boszormenyi
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=c090aae7-ebac-1a8f-8aca-162cebac8c5a@pr.hu \
--to=zboszor@pr.hu \
--cc=alex.kanavin@gmail.com \
--cc=openembedded-core@lists.openembedded.org \
--cc=richard.purdie@linuxfoundation.org \
--cc=zboszor@gmail.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