Message ID | 20210226160937.16082-4-conrad.ratschan@rockwellcollins.com |
---|---|
State | Rejected |
Headers | show |
Series | [1/4] package/python-magic: Add new package | expand |
Hi Conrad, Le 26/02/2021 à 17:09, Conrad Ratschan a écrit : > Add a new host python package for python-diffoscope. > > Signed-off-by: Conrad Ratschan <conrad.ratschan@rockwellcollins.com> > --- > package/Config.in.host | 1 + > package/python-diffoscope/Config.in.host | 10 ++++++++++ > package/python-diffoscope/python-diffoscope.hash | 2 ++ > package/python-diffoscope/python-diffoscope.mk | 16 ++++++++++++++++ > 4 files changed, 29 insertions(+) > create mode 100644 package/python-diffoscope/Config.in.host > create mode 100644 package/python-diffoscope/python-diffoscope.hash > create mode 100644 package/python-diffoscope/python-diffoscope.mk > > diff --git a/package/Config.in.host b/package/Config.in.host > index 4edfb9cfa4..5a9e606a4b 100644 > --- a/package/Config.in.host > +++ b/package/Config.in.host > @@ -65,6 +65,7 @@ menu "Host utilities" > source "package/pwgen/Config.in.host" > source "package/python/Config.in.host" > source "package/python-cython/Config.in.host" > + source "package/python-diffoscope/Config.in.host" > source "package/python-libarchive-c/Config.in.host" > source "package/python-lxml/Config.in.host" > source "package/python-magic/Config.in.host" > diff --git a/package/python-diffoscope/Config.in.host b/package/python-diffoscope/Config.in.host > new file mode 100644 > index 0000000000..520607e8a6 > --- /dev/null > +++ b/package/python-diffoscope/Config.in.host > @@ -0,0 +1,10 @@ > +config BR2_PACKAGE_HOST_PYTHON_DIFFOSCOPE > + bool "host-python-diffoscope" > + depends on BR2_PACKAGE_HOST_PYTHON3 > + select BR2_PACKAGE_HOST_PYTHON_MAGIC > + select BR2_PACKAGE_HOST_PYTHON_LIBARCHIVE_C > + select BR2_PACKAGE_HOST_PYTHON3_CURSES > + help > + Tool to recursively diff varying file types. > + > + https://diffoscope.org/ Even if it's a python based application, the name of the package should be diffoscope not python-diffoscope. > diff --git a/package/python-diffoscope/python-diffoscope.hash b/package/python-diffoscope/python-diffoscope.hash > new file mode 100644 > index 0000000000..ea6d73aa60 > --- /dev/null > +++ b/package/python-diffoscope/python-diffoscope.hash > @@ -0,0 +1,2 @@ > +# sha256 from https://pypi.org/pypi/diffoscope/json > +sha256 d95cef5b3eef49fa1c811c1ac103f7f7cca4a0ebabc674e4283b51f28309d242 diffoscope-167.tar.gz > diff --git a/package/python-diffoscope/python-diffoscope.mk b/package/python-diffoscope/python-diffoscope.mk > new file mode 100644 > index 0000000000..ad5a7c6255 > --- /dev/null > +++ b/package/python-diffoscope/python-diffoscope.mk > @@ -0,0 +1,16 @@ > +################################################################################ > +# > +# python-diffoscope > +# > +################################################################################ > + > +PYTHON_DIFFOSCOPE_VERSION = 167 Sorry for the delay, when you posted back in 2021 it was the latest version... today the latest version is 219. > +PYTHON_DIFFOSCOPE_SOURCE = diffoscope-$(PYTHON_DIFFOSCOPE_VERSION).tar.gz > +PYTHON_DIFFOSCOPE_SITE = https://files.pythonhosted.org/packages/69/d8/3cd7efd904d4db9039f3111938598f6093d14087f40f4359ef1514e7d5eb > +PYTHON_DIFFOSCOPE_SETUP_TYPE = setuptools > +PYTHON_DIFFOSCOPE_LICENSE = GPL-3.0+ > +HOST_PYTHON_DIFFOSCOPE_DL_SUBDIR = python-diffoscope > +HOST_PYTHON_DIFFOSCOPE_NEEDS_HOST_PYTHON = python3 > +HOST_PYTHON_DIFFOSCOPE_DEPENDENCIES = host-python-libarchive-c host-python-magic Still, the dependency seems short here. To ease Buildroot packaging, you can get some hint from other Linux Distribution packaging (Debian [1], Fedora [2], Archlinux [3] or even Yocto [4]). The list of optional dependency of diffoscope is huge and if we compare with the Yocto packaging some runtime dependencies are missing (binutils vim squashfs-tools python3-rpm) So at least we can build diffoscope but a limited (light) version with Buildroot. For a full version, you have to use the one from your build machine. For example, only the autobuilder script use diffoscope but the one installed on the build machine. It would be great if we can have a test case for this package. [1] https://salsa.debian.org/reproducible-builds/diffoscope/-/blob/master/debian/control [2] https://src.fedoraproject.org/rpms/diffoscope/blob/rawhide/f/diffoscope.spec [3] https://github.com/archlinux/svntogit-community/blob/packages/diffoscope/trunk/PKGBUILD [4] https://github.com/openembedded/openembedded-core/blob/c2cf956881c3b691691f50b00b0d6930d8abea6f/meta/recipes-support/diffoscope/diffoscope_218.bb Best regards, Romain > + > +$(eval $(host-python-package))
On 23/07/2022 22:28, Romain Naour wrote: > Hi Conrad, > > Le 26/02/2021 à 17:09, Conrad Ratschan a écrit : [snip] >> +HOST_PYTHON_DIFFOSCOPE_DL_SUBDIR = python-diffoscope >> +HOST_PYTHON_DIFFOSCOPE_NEEDS_HOST_PYTHON = python3 >> +HOST_PYTHON_DIFFOSCOPE_DEPENDENCIES = host-python-libarchive-c host-python-magic > > Still, the dependency seems short here. > > To ease Buildroot packaging, you can get some hint from other Linux Distribution > packaging (Debian [1], Fedora [2], Archlinux [3] or even Yocto [4]). > > The list of optional dependency of diffoscope is huge and if we compare with the > Yocto packaging some runtime dependencies are missing (binutils vim > squashfs-tools python3-rpm) > > So at least we can build diffoscope but a limited (light) version with > Buildroot. It looks like the light version is not going to be very useful, so unless there's a very good reason to build it in buildroot, I think it's better to rely on the distro-installed package. Also, it's really a debug tool, not something that is ever going to be needed during the build. Maybe you want CI not to just fail if the build is not reproducible, but also Therefore, I marked this series as Rejected. Regards, Arnout > For a full version, you have to use the one from your build machine. > > For example, only the autobuilder script use diffoscope but the one installed on > the build machine. > > It would be great if we can have a test case for this package. > > [1] > https://salsa.debian.org/reproducible-builds/diffoscope/-/blob/master/debian/control > > [2] https://src.fedoraproject.org/rpms/diffoscope/blob/rawhide/f/diffoscope.spec > > [3] > https://github.com/archlinux/svntogit-community/blob/packages/diffoscope/trunk/PKGBUILD > > [4] > https://github.com/openembedded/openembedded-core/blob/c2cf956881c3b691691f50b00b0d6930d8abea6f/meta/recipes-support/diffoscope/diffoscope_218.bb > > Best regards, > Romain > > >> + >> +$(eval $(host-python-package)) > > _______________________________________________ > buildroot mailing list > buildroot@buildroot.org > https://lists.buildroot.org/mailman/listinfo/buildroot
diff --git a/package/Config.in.host b/package/Config.in.host index 4edfb9cfa4..5a9e606a4b 100644 --- a/package/Config.in.host +++ b/package/Config.in.host @@ -65,6 +65,7 @@ menu "Host utilities" source "package/pwgen/Config.in.host" source "package/python/Config.in.host" source "package/python-cython/Config.in.host" + source "package/python-diffoscope/Config.in.host" source "package/python-libarchive-c/Config.in.host" source "package/python-lxml/Config.in.host" source "package/python-magic/Config.in.host" diff --git a/package/python-diffoscope/Config.in.host b/package/python-diffoscope/Config.in.host new file mode 100644 index 0000000000..520607e8a6 --- /dev/null +++ b/package/python-diffoscope/Config.in.host @@ -0,0 +1,10 @@ +config BR2_PACKAGE_HOST_PYTHON_DIFFOSCOPE + bool "host-python-diffoscope" + depends on BR2_PACKAGE_HOST_PYTHON3 + select BR2_PACKAGE_HOST_PYTHON_MAGIC + select BR2_PACKAGE_HOST_PYTHON_LIBARCHIVE_C + select BR2_PACKAGE_HOST_PYTHON3_CURSES + help + Tool to recursively diff varying file types. + + https://diffoscope.org/ diff --git a/package/python-diffoscope/python-diffoscope.hash b/package/python-diffoscope/python-diffoscope.hash new file mode 100644 index 0000000000..ea6d73aa60 --- /dev/null +++ b/package/python-diffoscope/python-diffoscope.hash @@ -0,0 +1,2 @@ +# sha256 from https://pypi.org/pypi/diffoscope/json +sha256 d95cef5b3eef49fa1c811c1ac103f7f7cca4a0ebabc674e4283b51f28309d242 diffoscope-167.tar.gz diff --git a/package/python-diffoscope/python-diffoscope.mk b/package/python-diffoscope/python-diffoscope.mk new file mode 100644 index 0000000000..ad5a7c6255 --- /dev/null +++ b/package/python-diffoscope/python-diffoscope.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# python-diffoscope +# +################################################################################ + +PYTHON_DIFFOSCOPE_VERSION = 167 +PYTHON_DIFFOSCOPE_SOURCE = diffoscope-$(PYTHON_DIFFOSCOPE_VERSION).tar.gz +PYTHON_DIFFOSCOPE_SITE = https://files.pythonhosted.org/packages/69/d8/3cd7efd904d4db9039f3111938598f6093d14087f40f4359ef1514e7d5eb +PYTHON_DIFFOSCOPE_SETUP_TYPE = setuptools +PYTHON_DIFFOSCOPE_LICENSE = GPL-3.0+ +HOST_PYTHON_DIFFOSCOPE_DL_SUBDIR = python-diffoscope +HOST_PYTHON_DIFFOSCOPE_NEEDS_HOST_PYTHON = python3 +HOST_PYTHON_DIFFOSCOPE_DEPENDENCIES = host-python-libarchive-c host-python-magic + +$(eval $(host-python-package))
Add a new host python package for python-diffoscope. Signed-off-by: Conrad Ratschan <conrad.ratschan@rockwellcollins.com> --- package/Config.in.host | 1 + package/python-diffoscope/Config.in.host | 10 ++++++++++ package/python-diffoscope/python-diffoscope.hash | 2 ++ package/python-diffoscope/python-diffoscope.mk | 16 ++++++++++++++++ 4 files changed, 29 insertions(+) create mode 100644 package/python-diffoscope/Config.in.host create mode 100644 package/python-diffoscope/python-diffoscope.hash create mode 100644 package/python-diffoscope/python-diffoscope.mk