Skip to contentSkip to conversation

libdebian-installer: new package

PATCH New Benoît Allard 2 participants 4 messages Mar 18, 2016 – Mar 30, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 libdebian-installer: new package

This package is a mandatory dependency of cdebootstrap.

---
Changes v1 -> v2
- Use snapshot.debian.org
- Remove INSTALL_TARGET (is default value)

---
 package/Config.in                                    |  1 +
 package/libdebian-installer/Config.in                | 11 +++++++++++
 package/libdebian-installer/libdebian-installer.hash |  2 ++
 package/libdebian-installer/libdebian-installer.mk   | 18 ++++++++++++++++++
 4 files changed, 32 insertions(+)
 create mode 100644 package/libdebian-installer/Config.in
 create mode 100644 package/libdebian-installer/libdebian-installer.hash
 create mode 100644 package/libdebian-installer/libdebian-installer.mk
package/Config.in +1 -0
index 2401867..db4ceab 100644
@@ -1208,6 +1208,7 @@ menu "Other"
 	source "package/libcroco/Config.in"
 	source "package/libcrossguid/Config.in"
 	source "package/libdaemon/Config.in"
+	source "package/libdebian-installer/Config.in"
 	source "package/libee/Config.in"
 	source "package/libev/Config.in"
 	source "package/libevdev/Config.in"
package/libdebian-installer/Config.in new file +11 -0
new file mode 100644
index 0000000..f3b0ed3
@@ -0,0 +1,11 @@
+config BR2_PACKAGE_LIBDEBIAN_INSTALLER
+	bool "libdebian-installer"
+	select BR2_PACKAGE_CHECK
+	help
+	  This library is used by debian-installer to perform common
+	  functions such as logging messages and executing commands.
+	  If you aren't working on debian-installer or building your
+	  own install system based on debian-installer, then you
+	  probably don't need this library.
+
+	  http://debian.org
package/libdebian-installer/libdebian-installer.hash new file +2 -0
new file mode 100644
index 0000000..24c3aee
@@ -0,0 +1,2 @@
+# From http://snapshot.debian.org/archive/debian/20160218T041621Z/pool/main/libd/libdebian-installer/libdebian-installer_0.104.dsc
+sha256 5bf6c1b88e99164d0411f8434523f0f3b8e7e3902da17c55fee740ab34746ebf libdebian-installer_0.104.tar.xz
package/libdebian-installer/libdebian-installer.mk new file +18 -0
new file mode 100644
index 0000000..b542659
@@ -0,0 +1,18 @@
+################################################################################
+#
+# libdebian-installer
+#
+################################################################################
+
+
+LIBDEBIAN_INSTALLER_VERSION = 0.104
+LIBDEBIAN_INSTALLER_SOURCE = libdebian-installer_$(LIBDEBIAN_INSTALLER_VERSION).tar.xz
+LIBDEBIAN_INSTALLER_SITE = http://snapshot.debian.org/archive/debian-debug/20160218T034808Z/pool/main/libd/libdebian-installer/
+LIBDEBIAN_INSTALLER_LICENSE = GPLv2
+LIBDEBIAN_INSTALLER_LICENSE_FILES = debian/copyright
+LIBDEBIAN_INSTALLER_INSTALL_STAGING = YES
+# Provided files are too old (missing reference to newly added source files)
+LIBDEBIAN_INSTALLER_AUTORECONF = YES
+LIBDEBIAN_INSTALLER_DEPENDENCIES = check host-pkgconf
+
+$(eval $(autotools-package))
Signature · 1 line
2.1.4
#1 lore raw

PATCH 2/2 cdebootstrap: new package

cdebootstrap is used to create a Debian base system from scratch.

---
Changes v1 -> v2
- Reorder select in Config.in
- Use snapshot.debian.org
- Remove unecessary lines in .mk (default values)

---
 package/Config.in                      |  3 +++
 package/cdebootstrap/Config.in         | 12 ++++++++++++
 package/cdebootstrap/cdebootstrap.hash |  2 ++
 package/cdebootstrap/cdebootstrap.mk   | 15 +++++++++++++++
 4 files changed, 32 insertions(+)
 create mode 100644 package/cdebootstrap/Config.in
 create mode 100644 package/cdebootstrap/cdebootstrap.hash
 create mode 100644 package/cdebootstrap/cdebootstrap.mk
package/Config.in +3 -0
index db4ceab..3d19bda 100644
@@ -1598,6 +1598,9 @@ menu "System tools"
 	source "package/audit/Config.in"
 if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
 	source "package/bootutils/Config.in"
+endif
+	source "package/cdebootstrap/Config.in"
+if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
 	source "package/coreutils/Config.in"
 endif
 	source "package/cpuload/Config.in"
package/cdebootstrap/Config.in new file +12 -0
new file mode 100644
index 0000000..eccafb0
@@ -0,0 +1,12 @@
+config BR2_PACKAGE_CDEBOOTSTRAP
+	bool "cdebootstrap"
+	select BR2_PACKAGE_BZIP2
+	select BR2_PACKAGE_LIBCURL
+	select BR2_PACKAGE_LIBDEBIAN_INSTALLER
+	select BR2_PACKAGE_XZ
+	select BR2_PACKAGE_ZLIB
+	help
+	  cdebootstrap generates systems from scratch for Debian and
+	  derivates.
+
+	  https://packages.debian.org/cdebootstrap
package/cdebootstrap/cdebootstrap.hash new file +2 -0
new file mode 100644
index 0000000..493e3c6
@@ -0,0 +1,2 @@
+# From http://snapshot.debian.org/archive/debian/20141116T035859Z/pool/main/c/cdebootstrap/cdebootstrap_0.6.4.dsc
+sha256 e33fe2c245894ab40dc4db764f31a0bf59cc80c34d9ebf2e71b715e49631bb34 cdebootstrap_0.6.4.tar.gz
package/cdebootstrap/cdebootstrap.mk new file +15 -0
new file mode 100644
index 0000000..ca140da
@@ -0,0 +1,15 @@
+################################################################################
+#
+# cdebootstrap
+#
+################################################################################
+
+# Not the latest version, rather from debian-stable
+CDEBOOTSTRAP_VERSION = 0.6.4
+CDEBOOTSTRAP_SOURCE = cdebootstrap_$(CDEBOOTSTRAP_VERSION).tar.gz
+CDEBOOTSTRAP_SITE = http://snapshot.debian.org/archive/debian/20141116T035859Z/pool/main/c/cdebootstrap/
+CDEBOOTSTRAP_LICENSE = GPLv2
+CDEBOOTSTRAP_LICENSE_FILES = debian/copyright
+CDEBOOTSTRAP_DEPENDENCIES = libcurl libdebian-installer zlib bzip2 host-pkgconf xz
+
+$(eval $(autotools-package))
Signature · 1 line
2.1.4
#2 lore raw

PATCH 2/2 cdebootstrap: new package

Hello,

Quoted 7 lines · Beno?t Allard
package/cdebootstrap/cdebootstrap.mk new file +1 -0
new file mode 100644
index 0000000..ca140da
@@ -0,0 +1,15 @@
+################################################################################

package/cdebootstrap/cdebootstrap.mk line 11

Quoted 10 lines
package/cdebootstrap/cdebootstrap.mk new file +10 -0
+#
+# cdebootstrap
+#
+################################################################################
+
+# Not the latest version, rather from debian-stable
+CDEBOOTSTRAP_VERSION = 0.6.4
+CDEBOOTSTRAP_SOURCE = cdebootstrap_$(CDEBOOTSTRAP_VERSION).tar.gz
+CDEBOOTSTRAP_SITE = http://snapshot.debian.org/archive/debian/20141116T035859Z/pool/main/c/cdebootstrap/
+CDEBOOTSTRAP_LICENSE = GPLv2

License is GPLv2+.

package/cdebootstrap/cdebootstrap.mk line 13

Quoted 2 lines
package/cdebootstrap/cdebootstrap.mk new file +2 -0
+CDEBOOTSTRAP_LICENSE_FILES = debian/copyright
+CDEBOOTSTRAP_DEPENDENCIES = libcurl libdebian-installer zlib bzip2 host-pkgconf xz

I think you should pass --with-debian-architecture=NAME, otherwise it will use dpkg-architecture.

To make sure that it works fine, I think you should try to build libdebian-installer + cdebootstrap targetting an ARM architecture, on a Linux machine that doesn't use Debian. You can for example use an Arch Linux or Gentoo chroot to that effect.

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#3 lore raw

PATCH 1/2 libdebian-installer: new package

In reply to Benoît Allard

Hello,

Quoted 6 lines · Beno?t Allard
package/libdebian-installer/libdebian-installer.mk new file +0 -0
new file mode 100644
index 0000000..b542659

package/libdebian-installer/libdebian-installer.mk line 10

Quoted 10 lines
package/libdebian-installer/libdebian-installer.mk new file +10 -0
@@ -0,0 +1,18 @@
+################################################################################
+#
+# libdebian-installer
+#
+################################################################################
+
+
+LIBDEBIAN_INSTALLER_VERSION = 0.104
+LIBDEBIAN_INSTALLER_SOURCE = libdebian-installer_$(LIBDEBIAN_INSTALLER_VERSION).tar.xz
+LIBDEBIAN_INSTALLER_SITE = http://snapshot.debian.org/archive/debian-debug/20160218T034808Z/pool/main/libd/libdebian-installer/

Another possibility could be to fetch from the Git repository at
https://anonscm.debian.org/cgit/d-i/libdebian-installer.git/, but I'm fine with snapshot.debian.org.

package/libdebian-installer/libdebian-installer.mk line 11

Quoted 1 line
package/libdebian-installer/libdebian-installer.mk new file +1 -0
+LIBDEBIAN_INSTALLER_LICENSE = GPLv2

License is GPLv2+.

package/libdebian-installer/libdebian-installer.mk line 16

Quoted 5 lines
package/libdebian-installer/libdebian-installer.mk new file +5 -0
+LIBDEBIAN_INSTALLER_LICENSE_FILES = debian/copyright
+LIBDEBIAN_INSTALLER_INSTALL_STAGING = YES
+# Provided files are too old (missing reference to newly added source files)
+LIBDEBIAN_INSTALLER_AUTORECONF = YES
+LIBDEBIAN_INSTALLER_DEPENDENCIES = check host-pkgconf

Unfortunately, the following configuration doesn't build here:

BR2_arm=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y
BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y BR2_TOOLCHAIN_EXTERNAL_URL="http://autobuild.buildroot.org/toolchains/tarballs/br-arm-basic-2016.02-3-g762b7c9.tar.bz2" BR2_TOOLCHAIN_EXTERNAL_GCC_4_9=y
BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_4=y
# BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS_DEBUG is not set
BR2_INIT_NONE=y
BR2_SYSTEM_BIN_SH_NONE=y
# BR2_PACKAGE_BUSYBOX is not set
BR2_PACKAGE_LIBDEBIAN_INSTALLER=y
# BR2_TARGET_ROOTFS_TAR is not set

I get the following failure:

libtool: link: /home/thomas/projets/buildroot/output/host/usr/bin/arm-linux-gcc -shared -fPIC -DPIC .libs/exec.o .libs/hash.o .libs/log.o .libs/mem.o .libs/mem_chunk.o .libs/package.o .libs/package_parser.o .libs/packages.o .libs/packages_parser.o .libs/parser.o .libs/parser_rfc822.o .libs/slist.o .libs/string.o .libs/tree.o .libs/utils.o -Wl,--whole-archive system/.libs/libsystem.a -Wl,--no-whole-archive -Os -Wl,--version-script=./libdebian-installer.ver -Wl,--no-undefined-version -Wl,-soname -Wl,libdebian-installer.so.4 -o .libs/libdebian-installer.so.4.0.7
/home/thomas/projets/buildroot/output/host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabi/4.9.3/../../../../arm-buildroot-linux-uclibcgnueabi/bin/ld: di_system_subarch_analyze_guess: undefined version: LIBDI_4.7 /home/thomas/projets/buildroot/output/host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabi/4.9.3/../../../../arm-buildroot-linux-uclibcgnueabi/bin/ld: failed to set dynamic section sizes: Bad value

Also, I'm concerned by a few other things:

* The configure.ac script calls dpkg-architecture. Not only this means that the configure script assumes it will be run on Debian (which is not guaranteed in Buildroot), but it breaks when cross-compiling:
the target architecture is not the one of the build machine.

* In src/system/, you will see that there are a number of architecture specific files, which probably means that libdebian-installer is not going to build properly for all target architectures.

Could you investigate those issues/concerns, and send an updated version?

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com