From: "Roberto A. Foglietta" <roberto.foglietta@gmail.com>
To: isar-users@googlegroups.com
Subject: Re: do_deploy_deb but not in buildroot
Date: Fri, 23 Sep 2022 00:26:07 +0200 [thread overview]
Message-ID: <CAJGKYO47r0UEMai8v-TRkvNhqNhpUOgmKP=LWk5bp6ytFXFRtw@mail.gmail.com> (raw)
In-Reply-To: <CAJGKYO4_Uu9Qjz5wY-jXW5ehthNDkk9fXJ5ShffZ9Qv1XNwHzw@mail.gmail.com>
[-- Attachment #1.1: Type: text/plain, Size: 1059 bytes --]
Il giorno gio 22 set 2022 alle ore 18:39 Roberto A. Foglietta <
roberto.foglietta@gmail.com> ha scritto:
>
> Hi all,
>
> How copying a package from here
>
>
build/tmp/deploy/isar-apt/debian-bullseye-amd64/apt/debian-bullseye/pool/main/n/pippo-fs/pippo-fs_2.12.8-1_amd64.deb
>
> to here
>
>
build/tmp/work/debian-bullseye-amd64/buildchroot-target/1.0-r0/rootfs/var/cache/apt/archives/pippo-fs_2.12.8-1_amd64.deb
>
> I have the sensation that it download the package from the Internet
because the rule does not run in time. If I do manually the rule then the
nexr build is correct. The pippo package is provided into a INSTALL_IMAGE
>
> Better ROOTFS_PACKAGES ? Nope.
>
Problem solved: IMAGE_INSTALL for the modified packages and
IMAGE_PREINSTALL for their parents packages + this class in attachment
inherit dpkg-repackage
PROVIDES = "${PN}"
SRC_URI = "apt://${PN}"
SED_STR = "s,^Depends:.*,,"
However, I am not very satisfied by the way in which I deploy around the
packages do_deploy_deb_append() - take a look and let me know, please.
Best regards, R-
[-- Attachment #1.2: Type: text/html, Size: 1365 bytes --]
[-- Attachment #2: dpkg-repackage.bbclass --]
[-- Type: application/octet-stream, Size: 2083 bytes --]
# This software is a part of ISAR.
#
# Copyright (C) 2017-2019 Siemens AG
# Copyright (C) 2019 ilbers GmbH
# Copyright (C) 2022 Siemens AG
#
# SPDX-License-Identifier: MIT
#
inherit dpkg-base
do_apt_fetch() {
schroot_create_configs
schroot_cleanup() {
schroot_delete_configs
}
trap 'exit 1' INT HUP QUIT TERM ALRM USR1
trap 'schroot_cleanup' EXIT
d="/downloads/deb/${DISTRO}"
for uri in "${SRC_APT}"; do
schroot -d / -c ${SBUILD_CHROOT} -- \
sh -c "mkdir -p ${d} && cd ${d} && apt download ${uri}"
done
schroot_delete_configs
}
#addtask apt_fetch before repo_create
do_apt_repack() {
set -x
env
rm -rf ${S}
schroot_create_configs
schroot_cleanup() {
schroot_delete_configs
}
trap 'exit 1' INT HUP QUIT TERM ALRM USR1
trap 'schroot_cleanup' EXIT
f="DEBIAN/control"
d="/downloads/deb/${DISTRO}"
for uri in "${SRC_APT}"; do
w="/home/builder/${PN}/${uri}"
schroot -u root -d / -c ${SBUILD_CHROOT} -- \
sh -c "set -x; rm -rf ${w}; mkdir -p ${w}; cd ${w}; _p=\"\$(ls -1 ${d}/${uri}*.deb | head -n1)\"; \
dpkg -e \$_p; rm -f DEBIAN/md5sums; dpkg -x \$_p .; sed -e \"s,^\(Package:\) ${uri},\\1 ${PN},\" -i ${f}; \
sed -e \"${SED_STR}\" -i ${f}; \
sed -e \"s,^Status:.*,,\" -e \"s,^\(Maintainer:\).*,\\1 repackaged by a ISAR recipe,\" -i ${f}; \
sed -ne \"s,\(^[^ ]*: .*\),\\1,p\" -i ${f}; cd ..; dpkg-deb --build ${uri}; chown $(whoami) ${uri}.deb; \
_p=\$(basename \$_p); mv -f ${uri}.deb \$_p; \
"
done
schroot_delete_configs
}
addtask apt_repack after do_apt_fetch before do_apt_unpack
do_deploy_deb_prepend() {
set -x
}
do_deploy_deb_append() {
test -n "$DEBS" || return 0
for i in buildchroot sbuild-chroot isar-bootstrap; do
d="/build/tmp/work/${DISTRO}-${DISTRO_ARCH}/$i-target"
v=$(ls -1 $d | sort -n | tail -n1)
test "a$v" = "a" && v="1.0-r0"
d="$d/$v/rootfs/var/cache/apt/archives"
mkdir -p $d && sudo cp -arf $DEBS $d
done
}
do_apt_unpack() {
return 0
}
do_dpkg_build() {
return 0
}
prev parent reply other threads:[~2022-09-22 22:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-22 16:39 Roberto A. Foglietta
2022-09-22 22:26 ` Roberto A. Foglietta [this message]
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='CAJGKYO47r0UEMai8v-TRkvNhqNhpUOgmKP=LWk5bp6ytFXFRtw@mail.gmail.com' \
--to=roberto.foglietta@gmail.com \
--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