diff options
| author | Hongxu Jia <hongxu.jia@windriver.com> | 2021-04-08 15:29:36 +0800 |
|---|---|---|
| committer | Khem Raj <raj.khem@gmail.com> | 2021-04-15 09:28:43 -0700 |
| commit | 605cb20bdffa2523a963439b47c21aa23adf5325 (patch) | |
| tree | c6f8bd29bb2b4602f06b76738f1a8f4fc05ab0a3 | |
| parent | 41ca2e57bc2e00ca8db577c6e311ab2e8f39b7aa (diff) | |
| download | meta-openembedded-605cb20bdffa2523a963439b47c21aa23adf5325.tar.gz | |
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>
5 files changed, 111 insertions, 35 deletions
diff --git a/meta-oe/recipes-devtools/debootstrap/debootstrap/0001-support-to-override-usr-sbin-and-usr-share.patch b/meta-oe/recipes-devtools/debootstrap/debootstrap/0001-support-to-override-usr-sbin-and-usr-share.patch new file mode 100644 index 0000000000..12dd238108 --- /dev/null +++ b/meta-oe/recipes-devtools/debootstrap/debootstrap/0001-support-to-override-usr-sbin-and-usr-share.patch | |||
| @@ -0,0 +1,41 @@ | |||
| 1 | From 87d0174e8d56e7458dc94f05f82ab7a67a5cf7d0 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Hongxu Jia <hongxu.jia@windriver.com> | ||
| 3 | Date: Thu, 8 Apr 2021 14:06:05 +0800 | ||
| 4 | Subject: [PATCH 1/2] support to override /usr/sbin and /usr/share | ||
| 5 | |||
| 6 | Upstream-Status: Submitted [https://salsa.debian.org/installer-team/debootstrap/-/merge_requests/55] | ||
| 7 | |||
| 8 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
| 9 | --- | ||
| 10 | Makefile | 12 +++++++----- | ||
| 11 | 1 file changed, 7 insertions(+), 5 deletions(-) | ||
| 12 | |||
| 13 | diff --git a/Makefile b/Makefile | ||
| 14 | index 8516803..a2d8c00 100644 | ||
| 15 | --- a/Makefile | ||
| 16 | +++ b/Makefile | ||
| 17 | @@ -5,14 +5,16 @@ all: | ||
| 18 | |||
| 19 | clean: | ||
| 20 | |||
| 21 | -DSDIR=$(DESTDIR)/usr/share/debootstrap | ||
| 22 | +datadir ?= "/usr/share" | ||
| 23 | +sbindir ?= "/usr/sbin" | ||
| 24 | +DSDIR=$(DESTDIR)${datadir}/debootstrap | ||
| 25 | install: | ||
| 26 | mkdir -p $(DSDIR)/scripts | ||
| 27 | - mkdir -p $(DESTDIR)/usr/sbin | ||
| 28 | + mkdir -p $(DESTDIR)$(sbindir) | ||
| 29 | |||
| 30 | cp -a scripts/* $(DSDIR)/scripts/ | ||
| 31 | install -o root -g root -m 0644 functions $(DSDIR)/ | ||
| 32 | |||
| 33 | - sed 's/@VERSION@/$(VERSION)/g' debootstrap >$(DESTDIR)/usr/sbin/debootstrap | ||
| 34 | - chown root:root $(DESTDIR)/usr/sbin/debootstrap | ||
| 35 | - chmod 0755 $(DESTDIR)/usr/sbin/debootstrap | ||
| 36 | + sed 's/@VERSION@/$(VERSION)/g' debootstrap >$(DESTDIR)$(sbindir)/debootstrap | ||
| 37 | + chown root:root $(DESTDIR)$(sbindir)/debootstrap | ||
| 38 | + chmod 0755 $(DESTDIR)$(sbindir)/debootstrap | ||
| 39 | -- | ||
| 40 | 2.17.1 | ||
| 41 | |||
diff --git a/meta-oe/recipes-devtools/debootstrap/debootstrap/0002-support-to-override-usr-bin-arch-test.patch b/meta-oe/recipes-devtools/debootstrap/debootstrap/0002-support-to-override-usr-bin-arch-test.patch new file mode 100644 index 0000000000..69329df4ea --- /dev/null +++ b/meta-oe/recipes-devtools/debootstrap/debootstrap/0002-support-to-override-usr-bin-arch-test.patch | |||
| @@ -0,0 +1,47 @@ | |||
| 1 | From f0420b201f2fb5286ccf5657faa6b38cd2680e10 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Hongxu Jia <hongxu.jia@windriver.com> | ||
| 3 | Date: Thu, 8 Apr 2021 14:08:06 +0800 | ||
| 4 | Subject: [PATCH 2/2] support to override /usr/bin/arch-test | ||
| 5 | |||
| 6 | Upstream-Status: Submitted [https://salsa.debian.org/installer-team/debootstrap/-/merge_requests/55] | ||
| 7 | |||
| 8 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
| 9 | --- | ||
| 10 | debootstrap | 12 ++++++++---- | ||
| 11 | 1 file changed, 8 insertions(+), 4 deletions(-) | ||
| 12 | |||
| 13 | diff --git a/debootstrap b/debootstrap | ||
| 14 | index 9b9e58d..a3cf3af 100755 | ||
| 15 | --- a/debootstrap | ||
| 16 | +++ b/debootstrap | ||
| 17 | @@ -51,6 +51,10 @@ INRELEASE_PATH="" | ||
| 18 | DEF_MIRROR="http://deb.debian.org/debian" | ||
| 19 | DEF_HTTPS_MIRROR="https://deb.debian.org/debian" | ||
| 20 | |||
| 21 | +if [ -z "$ARCH_TEST" ]; then | ||
| 22 | + ARCH_TEST="/usr/bin/arch-test" | ||
| 23 | +fi | ||
| 24 | + | ||
| 25 | # set $CONTAINER | ||
| 26 | detect_container | ||
| 27 | |||
| 28 | @@ -645,12 +649,12 @@ fi | ||
| 29 | |||
| 30 | ########################################################################### | ||
| 31 | |||
| 32 | -if [ -x /usr/bin/arch-test ] && am_doing_phase second_stage; then | ||
| 33 | +if [ -x ${ARCH_TEST} ] && am_doing_phase second_stage; then | ||
| 34 | if doing_variant fakechroot; then | ||
| 35 | - ret=0; arch-test "$ARCH" || ret=$? | ||
| 36 | + ret=0; ${ARCH_TEST} "$ARCH" || ret=$? | ||
| 37 | # Avoid failure with old arch-test package | ||
| 38 | - elif arch-test --version > /dev/null 2>&1; then | ||
| 39 | - ret=0; arch-test -c "$TARGET" "$ARCH" || ret=$? | ||
| 40 | + elif ${ARCH_TEST} --version > /dev/null 2>&1; then | ||
| 41 | + ret=0; ${ARCH_TEST} -c "$TARGET" "$ARCH" || ret=$? | ||
| 42 | else | ||
| 43 | ret=3 | ||
| 44 | fi | ||
| 45 | -- | ||
| 46 | 2.17.1 | ||
| 47 | |||
diff --git a/meta-oe/recipes-devtools/debootstrap/debootstrap/devices.tar.gz b/meta-oe/recipes-devtools/debootstrap/debootstrap/devices.tar.gz deleted file mode 100644 index 20eaba3ad2..0000000000 --- a/meta-oe/recipes-devtools/debootstrap/debootstrap/devices.tar.gz +++ /dev/null | |||
| Binary files differ | |||
diff --git a/meta-oe/recipes-devtools/debootstrap/debootstrap_1.0.123.bb b/meta-oe/recipes-devtools/debootstrap/debootstrap_1.0.123.bb new file mode 100644 index 0000000000..bb43456874 --- /dev/null +++ b/meta-oe/recipes-devtools/debootstrap/debootstrap_1.0.123.bb | |||
| @@ -0,0 +1,23 @@ | |||
| 1 | SUMMARY = "Install a Debian system into a subdirectory" | ||
| 2 | HOMEPAGE = "https://wiki.debian.org/Debootstrap" | ||
| 3 | SECTION = "devel" | ||
| 4 | LICENSE = "MIT" | ||
| 5 | LIC_FILES_CHKSUM = "file://debian/copyright;md5=1e68ced6e1689d4cd9dac75ff5225608" | ||
| 6 | |||
| 7 | SRC_URI = "\ | ||
| 8 | http://http.debian.net/debian/pool/main/d/debootstrap/debootstrap_${PV}.tar.gz \ | ||
| 9 | file://0001-support-to-override-usr-sbin-and-usr-share.patch \ | ||
| 10 | file://0002-support-to-override-usr-bin-arch-test.patch \ | ||
| 11 | " | ||
| 12 | |||
| 13 | SRC_URI[md5sum] = "b959c7ac01839e9b96a733d27b19e59e" | ||
| 14 | SRC_URI[sha256sum] = "5e5a8147ecdd6be0eea5ac4d6ed8192cc653e93f744dd3306c9b1cc51d6ca328" | ||
| 15 | |||
| 16 | S = "${WORKDIR}/debootstrap" | ||
| 17 | |||
| 18 | fakeroot do_install() { | ||
| 19 | oe_runmake 'DESTDIR=${D}' install | ||
| 20 | chown -R root:root ${D}${datadir}/debootstrap | ||
| 21 | } | ||
| 22 | |||
| 23 | BBCLASSEXTEND = "native nativesdk" | ||
diff --git a/meta-oe/recipes-devtools/debootstrap/debootstrap_1.0.67.bb b/meta-oe/recipes-devtools/debootstrap/debootstrap_1.0.67.bb deleted file mode 100644 index 8472aca6c1..0000000000 --- a/meta-oe/recipes-devtools/debootstrap/debootstrap_1.0.67.bb +++ /dev/null | |||
| @@ -1,35 +0,0 @@ | |||
| 1 | SUMMARY = "Install a Debian system into a subdirectory" | ||
| 2 | HOMEPAGE = "https://wiki.debian.org/Debootstrap" | ||
| 3 | SECTION = "devel" | ||
| 4 | LICENSE = "MIT" | ||
| 5 | LIC_FILES_CHKSUM = "file://debian/copyright;md5=1e68ced6e1689d4cd9dac75ff5225608" | ||
| 6 | |||
| 7 | inherit pkgconfig | ||
| 8 | |||
| 9 | SRC_URI = "\ | ||
| 10 | http://http.debian.net/debian/pool/main/d/debootstrap/debootstrap_1.0.67.tar.gz \ | ||
| 11 | file://devices.tar.gz;unpack=0 \ | ||
| 12 | " | ||
| 13 | |||
| 14 | SRC_URI[md5sum] = "eacabfe2e45415af60b1d74c3a23418a" | ||
| 15 | SRC_URI[sha256sum] = "0a12e0a2bbff185d47711a716b1f2734856100e8784361203e834fed0cffa51b" | ||
| 16 | |||
| 17 | S = "${WORKDIR}/${BP}" | ||
| 18 | |||
| 19 | # All Makefile does is creation of devices.tar.gz, which fails in OE build, we use | ||
| 20 | # static devices.tar.gz as work around | ||
| 21 | # | NOTE: make -j 8 -e MAKEFLAGS= | ||
| 22 | # | rm -rf dev | ||
| 23 | # | mkdir -p dev | ||
| 24 | # | chown 0:0 dev | ||
| 25 | # | chown: changing ownership of `dev': Operation not permitted | ||
| 26 | # | make: *** [devices.tar.gz] Error 1 | ||
| 27 | # | WARNING: exit code 1 from a shell command. | ||
| 28 | do_compile_prepend() { | ||
| 29 | cp ${WORKDIR}/devices.tar.gz ${B} | ||
| 30 | } | ||
| 31 | |||
| 32 | do_install() { | ||
| 33 | oe_runmake 'DESTDIR=${D}' install | ||
| 34 | chown -R root:root ${D}${datadir}/debootstrap | ||
| 35 | } | ||
