mirror of
git://git.openembedded.org/meta-openembedded
synced 2026-01-01 13:58:06 +00:00
debootstrap: 1.0.67 -> 1.0.123
- Excise all devices.tar.gz code - Use yocto vars to override hardcoded dir to support native and nativesdk Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
parent
41ca2e57bc
commit
605cb20bdf
|
|
@ -0,0 +1,41 @@
|
|||
From 87d0174e8d56e7458dc94f05f82ab7a67a5cf7d0 Mon Sep 17 00:00:00 2001
|
||||
From: Hongxu Jia <hongxu.jia@windriver.com>
|
||||
Date: Thu, 8 Apr 2021 14:06:05 +0800
|
||||
Subject: [PATCH 1/2] support to override /usr/sbin and /usr/share
|
||||
|
||||
Upstream-Status: Submitted [https://salsa.debian.org/installer-team/debootstrap/-/merge_requests/55]
|
||||
|
||||
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
|
||||
---
|
||||
Makefile | 12 +++++++-----
|
||||
1 file changed, 7 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 8516803..a2d8c00 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -5,14 +5,16 @@ all:
|
||||
|
||||
clean:
|
||||
|
||||
-DSDIR=$(DESTDIR)/usr/share/debootstrap
|
||||
+datadir ?= "/usr/share"
|
||||
+sbindir ?= "/usr/sbin"
|
||||
+DSDIR=$(DESTDIR)${datadir}/debootstrap
|
||||
install:
|
||||
mkdir -p $(DSDIR)/scripts
|
||||
- mkdir -p $(DESTDIR)/usr/sbin
|
||||
+ mkdir -p $(DESTDIR)$(sbindir)
|
||||
|
||||
cp -a scripts/* $(DSDIR)/scripts/
|
||||
install -o root -g root -m 0644 functions $(DSDIR)/
|
||||
|
||||
- sed 's/@VERSION@/$(VERSION)/g' debootstrap >$(DESTDIR)/usr/sbin/debootstrap
|
||||
- chown root:root $(DESTDIR)/usr/sbin/debootstrap
|
||||
- chmod 0755 $(DESTDIR)/usr/sbin/debootstrap
|
||||
+ sed 's/@VERSION@/$(VERSION)/g' debootstrap >$(DESTDIR)$(sbindir)/debootstrap
|
||||
+ chown root:root $(DESTDIR)$(sbindir)/debootstrap
|
||||
+ chmod 0755 $(DESTDIR)$(sbindir)/debootstrap
|
||||
--
|
||||
2.17.1
|
||||
|
||||
|
|
@ -0,0 +1,47 @@
|
|||
From f0420b201f2fb5286ccf5657faa6b38cd2680e10 Mon Sep 17 00:00:00 2001
|
||||
From: Hongxu Jia <hongxu.jia@windriver.com>
|
||||
Date: Thu, 8 Apr 2021 14:08:06 +0800
|
||||
Subject: [PATCH 2/2] support to override /usr/bin/arch-test
|
||||
|
||||
Upstream-Status: Submitted [https://salsa.debian.org/installer-team/debootstrap/-/merge_requests/55]
|
||||
|
||||
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
|
||||
---
|
||||
debootstrap | 12 ++++++++----
|
||||
1 file changed, 8 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/debootstrap b/debootstrap
|
||||
index 9b9e58d..a3cf3af 100755
|
||||
--- a/debootstrap
|
||||
+++ b/debootstrap
|
||||
@@ -51,6 +51,10 @@ INRELEASE_PATH=""
|
||||
DEF_MIRROR="http://deb.debian.org/debian"
|
||||
DEF_HTTPS_MIRROR="https://deb.debian.org/debian"
|
||||
|
||||
+if [ -z "$ARCH_TEST" ]; then
|
||||
+ ARCH_TEST="/usr/bin/arch-test"
|
||||
+fi
|
||||
+
|
||||
# set $CONTAINER
|
||||
detect_container
|
||||
|
||||
@@ -645,12 +649,12 @@ fi
|
||||
|
||||
###########################################################################
|
||||
|
||||
-if [ -x /usr/bin/arch-test ] && am_doing_phase second_stage; then
|
||||
+if [ -x ${ARCH_TEST} ] && am_doing_phase second_stage; then
|
||||
if doing_variant fakechroot; then
|
||||
- ret=0; arch-test "$ARCH" || ret=$?
|
||||
+ ret=0; ${ARCH_TEST} "$ARCH" || ret=$?
|
||||
# Avoid failure with old arch-test package
|
||||
- elif arch-test --version > /dev/null 2>&1; then
|
||||
- ret=0; arch-test -c "$TARGET" "$ARCH" || ret=$?
|
||||
+ elif ${ARCH_TEST} --version > /dev/null 2>&1; then
|
||||
+ ret=0; ${ARCH_TEST} -c "$TARGET" "$ARCH" || ret=$?
|
||||
else
|
||||
ret=3
|
||||
fi
|
||||
--
|
||||
2.17.1
|
||||
|
||||
Binary file not shown.
23
meta-oe/recipes-devtools/debootstrap/debootstrap_1.0.123.bb
Normal file
23
meta-oe/recipes-devtools/debootstrap/debootstrap_1.0.123.bb
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
SUMMARY = "Install a Debian system into a subdirectory"
|
||||
HOMEPAGE = "https://wiki.debian.org/Debootstrap"
|
||||
SECTION = "devel"
|
||||
LICENSE = "MIT"
|
||||
LIC_FILES_CHKSUM = "file://debian/copyright;md5=1e68ced6e1689d4cd9dac75ff5225608"
|
||||
|
||||
SRC_URI = "\
|
||||
http://http.debian.net/debian/pool/main/d/debootstrap/debootstrap_${PV}.tar.gz \
|
||||
file://0001-support-to-override-usr-sbin-and-usr-share.patch \
|
||||
file://0002-support-to-override-usr-bin-arch-test.patch \
|
||||
"
|
||||
|
||||
SRC_URI[md5sum] = "b959c7ac01839e9b96a733d27b19e59e"
|
||||
SRC_URI[sha256sum] = "5e5a8147ecdd6be0eea5ac4d6ed8192cc653e93f744dd3306c9b1cc51d6ca328"
|
||||
|
||||
S = "${WORKDIR}/debootstrap"
|
||||
|
||||
fakeroot do_install() {
|
||||
oe_runmake 'DESTDIR=${D}' install
|
||||
chown -R root:root ${D}${datadir}/debootstrap
|
||||
}
|
||||
|
||||
BBCLASSEXTEND = "native nativesdk"
|
||||
|
|
@ -1,35 +0,0 @@
|
|||
SUMMARY = "Install a Debian system into a subdirectory"
|
||||
HOMEPAGE = "https://wiki.debian.org/Debootstrap"
|
||||
SECTION = "devel"
|
||||
LICENSE = "MIT"
|
||||
LIC_FILES_CHKSUM = "file://debian/copyright;md5=1e68ced6e1689d4cd9dac75ff5225608"
|
||||
|
||||
inherit pkgconfig
|
||||
|
||||
SRC_URI = "\
|
||||
http://http.debian.net/debian/pool/main/d/debootstrap/debootstrap_1.0.67.tar.gz \
|
||||
file://devices.tar.gz;unpack=0 \
|
||||
"
|
||||
|
||||
SRC_URI[md5sum] = "eacabfe2e45415af60b1d74c3a23418a"
|
||||
SRC_URI[sha256sum] = "0a12e0a2bbff185d47711a716b1f2734856100e8784361203e834fed0cffa51b"
|
||||
|
||||
S = "${WORKDIR}/${BP}"
|
||||
|
||||
# All Makefile does is creation of devices.tar.gz, which fails in OE build, we use
|
||||
# static devices.tar.gz as work around
|
||||
# | NOTE: make -j 8 -e MAKEFLAGS=
|
||||
# | rm -rf dev
|
||||
# | mkdir -p dev
|
||||
# | chown 0:0 dev
|
||||
# | chown: changing ownership of `dev': Operation not permitted
|
||||
# | make: *** [devices.tar.gz] Error 1
|
||||
# | WARNING: exit code 1 from a shell command.
|
||||
do_compile_prepend() {
|
||||
cp ${WORKDIR}/devices.tar.gz ${B}
|
||||
}
|
||||
|
||||
do_install() {
|
||||
oe_runmake 'DESTDIR=${D}' install
|
||||
chown -R root:root ${D}${datadir}/debootstrap
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user