* do_deploy_deb but not in buildroot
@ 2022-09-22 16:39 Roberto A. Foglietta
2022-09-22 22:26 ` Roberto A. Foglietta
0 siblings, 1 reply; 2+ messages in thread
From: Roberto A. Foglietta @ 2022-09-22 16:39 UTC (permalink / raw)
To: isar-users
[-- Attachment #1: Type: text/plain, Size: 551 bytes --]
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.
Cheers, R-
[-- Attachment #2: Type: text/html, Size: 872 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: do_deploy_deb but not in buildroot
2022-09-22 16:39 do_deploy_deb but not in buildroot Roberto A. Foglietta
@ 2022-09-22 22:26 ` Roberto A. Foglietta
0 siblings, 0 replies; 2+ messages in thread
From: Roberto A. Foglietta @ 2022-09-22 22:26 UTC (permalink / raw)
To: isar-users
[-- 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
}
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-09-22 22:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-22 16:39 do_deploy_deb but not in buildroot Roberto A. Foglietta
2022-09-22 22:26 ` Roberto A. Foglietta
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox