2013-09-19 17:17:52 +02:00
|
|
|
################################################################################
|
|
|
|
#
|
|
|
|
# iputils
|
|
|
|
#
|
|
|
|
################################################################################
|
|
|
|
|
2016-01-21 04:31:47 +01:00
|
|
|
# The original upstream was forked to the github repository in 2014 to
|
|
|
|
# pull fixes from other distribution and centralize the changes after
|
|
|
|
# the upstream seemed to have gone dormant. The fork contains the
|
2017-06-05 13:43:15 +02:00
|
|
|
# latest changes including musl support, removing a libsysfs dependency
|
2016-01-21 04:31:47 +01:00
|
|
|
# and IPv6 updates.
|
|
|
|
# http://www.spinics.net/lists/netdev/msg279881.html
|
|
|
|
|
2020-08-24 18:40:42 +02:00
|
|
|
IPUTILS_VERSION = 20200821
|
package: remove non-conventional prefix/suffix from github-fetched packages
On Github, a large number of projects name their tag
<some-prefix>-0.3-<some-suffix> (i.e release-3.0, poco-0.1-release,
etc.). In fact majority of the cased adressed in this commit concerns
prefixes.
In most packages, we encode those prefix/suffix in the <pkg>_VERSION
variable.
The problem with this approach is that when used in conjunction with
release-monitoring.org, it doesn't work very well, because
release-monitoring.org has the concept of "version prefix/suffix" and
using that they drop the prefix/suffix to really get the version. For
example on https://release-monitoring.org/project/5418/ the latest
release of "poco" is "1.8.1", not "poco-1.8.1-release".
Therefore, a number of packages in Buildroot have a version that
doesn't match with release-monitoring.org.
Since really the version number of 1.8.1, is makes sense to update our
packages to drop these prefixes/suffixes.
This commit addreses the case of github-fetched packages with
non-conventional prefixes/suffixes.
Note that these changes modify the name of the files stored in DL_DIR,
which means that this will force a re-download of those package source
code for all users, and requires a change to their .hash file.
Signed-off-by: Victor Huesca <victor.huesca@bootlin.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2019-06-12 08:42:08 +02:00
|
|
|
IPUTILS_SITE = $(call github,iputils,iputils,s$(IPUTILS_VERSION))
|
2019-06-09 11:38:13 +02:00
|
|
|
IPUTILS_LICENSE = GPL-2.0+, BSD-3-Clause
|
|
|
|
IPUTILS_LICENSE_FILES = LICENSE Documentation/LICENSE.BSD3 Documentation/LICENSE.GPL2
|
2019-06-09 11:38:12 +02:00
|
|
|
IPUTILS_DEPENDENCIES = $(TARGET_NLS_DEPENDENCIES)
|
2013-09-19 17:17:52 +02:00
|
|
|
|
package/iputils: add config options to select which binaries to build/install
By default, the iputils build script might build binaries which are
useless for certain applications, like tftpd or ninfod. Those binaries
will add to the target filesystem size unless a post-build script removes
them manually, which is cumbersome and doesn't shorten build times.
In particular, in a certain aarch64 Buildroot project with musl selected
as a C library, this patch allowed to shrink the full iputils package from
219 KiB (if every option is selected) to 63 KiB (with only the ping
binary selected) - a 71.2% relative size decrease.
Moreover, upstream recently introduced a commit that disabled tftpd from
building by default, like rarpd. In the current state of things, this change
will introduce inconveniences for Buildroot users which prefer to use the
tftpd implementation provided by this package. With this patch, however, that
decision and similar future ones won't be a concern, because they will
have complete control of what binaries are built.
These changes add Kconfig options which let the user select what
binaries are built with ease.
Signed-off-by: Alejandro González <alejandro.gonzalez.correo@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2019-09-15 12:05:46 +02:00
|
|
|
# Selectively build binaries
|
|
|
|
IPUTILS_CONF_OPTS += \
|
|
|
|
-DBUILD_CLOCKDIFF=$(if $(BR2_PACKAGE_IPUTILS_CLOCKDIFF),true,false) \
|
|
|
|
-DBUILD_RARPD=$(if $(BR2_PACKAGE_IPUTILS_RARPD),true,false) \
|
|
|
|
-DBUILD_RDISC=$(if $(BR2_PACKAGE_IPUTILS_RDISC),true,false) \
|
|
|
|
-DBUILD_RDISC_SERVER=$(if $(BR2_PACKAGE_IPUTILS_RDISC_SERVER),true,false) \
|
|
|
|
-DBUILD_TRACEPATH=$(if $(BR2_PACKAGE_IPUTILS_TRACEPATH),true,false) \
|
|
|
|
-DBUILD_TRACEROUTE6=$(if $(BR2_PACKAGE_IPUTILS_TRACEROUTE6),true,false) \
|
|
|
|
-DBUILD_NINFOD=$(if $(BR2_PACKAGE_IPUTILS_NINFOD),true,false)
|
|
|
|
|
|
|
|
#
|
|
|
|
# arping
|
|
|
|
#
|
|
|
|
ifeq ($(BR2_PACKAGE_IPUTILS_ARPING),y)
|
|
|
|
IPUTILS_CONF_OPTS += -DBUILD_ARPING=true
|
|
|
|
|
|
|
|
# move some binaries to the same location as where Busybox installs
|
|
|
|
# the corresponding applets, so that we have a single version of the
|
|
|
|
# tools (from iputils)
|
|
|
|
define IPUTILS_MOVE_ARPING_BINARY
|
|
|
|
mv $(TARGET_DIR)/usr/bin/arping $(TARGET_DIR)/usr/sbin/arping
|
|
|
|
endef
|
|
|
|
IPUTILS_POST_INSTALL_TARGET_HOOKS += IPUTILS_MOVE_ARPING_BINARY
|
|
|
|
|
|
|
|
else
|
|
|
|
IPUTILS_CONF_OPTS += -DBUILD_ARPING=false
|
|
|
|
endif
|
|
|
|
|
|
|
|
#
|
|
|
|
# ping
|
|
|
|
#
|
|
|
|
ifeq ($(BR2_PACKAGE_IPUTILS_PING),y)
|
|
|
|
IPUTILS_CONF_OPTS += -DBUILD_PING=true
|
|
|
|
|
|
|
|
# same reason to move the ping binary as for arping
|
|
|
|
ifeq ($(BR2_ROOTFS_MERGED_USR),)
|
|
|
|
define IPUTILS_MOVE_PING_BINARY
|
|
|
|
mv $(TARGET_DIR)/usr/bin/ping $(TARGET_DIR)/bin/ping
|
|
|
|
endef
|
|
|
|
IPUTILS_POST_INSTALL_TARGET_HOOKS += IPUTILS_MOVE_PING_BINARY
|
|
|
|
endif
|
|
|
|
|
|
|
|
# upstream requires distros to create symlink
|
|
|
|
define IPUTILS_CREATE_PING6_SYMLINK
|
2020-09-03 21:48:27 +02:00
|
|
|
ln -sf ping $(TARGET_DIR)/bin/ping6
|
package/iputils: add config options to select which binaries to build/install
By default, the iputils build script might build binaries which are
useless for certain applications, like tftpd or ninfod. Those binaries
will add to the target filesystem size unless a post-build script removes
them manually, which is cumbersome and doesn't shorten build times.
In particular, in a certain aarch64 Buildroot project with musl selected
as a C library, this patch allowed to shrink the full iputils package from
219 KiB (if every option is selected) to 63 KiB (with only the ping
binary selected) - a 71.2% relative size decrease.
Moreover, upstream recently introduced a commit that disabled tftpd from
building by default, like rarpd. In the current state of things, this change
will introduce inconveniences for Buildroot users which prefer to use the
tftpd implementation provided by this package. With this patch, however, that
decision and similar future ones won't be a concern, because they will
have complete control of what binaries are built.
These changes add Kconfig options which let the user select what
binaries are built with ease.
Signed-off-by: Alejandro González <alejandro.gonzalez.correo@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2019-09-15 12:05:46 +02:00
|
|
|
endef
|
|
|
|
IPUTILS_POST_INSTALL_TARGET_HOOKS += IPUTILS_CREATE_PING6_SYMLINK
|
|
|
|
|
|
|
|
else
|
|
|
|
IPUTILS_CONF_OPTS += -DBUILD_PING=false
|
|
|
|
endif
|
|
|
|
|
|
|
|
#
|
|
|
|
# tftpd
|
|
|
|
#
|
|
|
|
ifeq ($(BR2_PACKAGE_IPUTILS_TFTPD),y)
|
2020-08-24 18:40:42 +02:00
|
|
|
IPUTILS_CONF_OPTS += -DBUILD_TFTPD=true
|
|
|
|
|
package/iputils: add config options to select which binaries to build/install
By default, the iputils build script might build binaries which are
useless for certain applications, like tftpd or ninfod. Those binaries
will add to the target filesystem size unless a post-build script removes
them manually, which is cumbersome and doesn't shorten build times.
In particular, in a certain aarch64 Buildroot project with musl selected
as a C library, this patch allowed to shrink the full iputils package from
219 KiB (if every option is selected) to 63 KiB (with only the ping
binary selected) - a 71.2% relative size decrease.
Moreover, upstream recently introduced a commit that disabled tftpd from
building by default, like rarpd. In the current state of things, this change
will introduce inconveniences for Buildroot users which prefer to use the
tftpd implementation provided by this package. With this patch, however, that
decision and similar future ones won't be a concern, because they will
have complete control of what binaries are built.
These changes add Kconfig options which let the user select what
binaries are built with ease.
Signed-off-by: Alejandro González <alejandro.gonzalez.correo@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2019-09-15 12:05:46 +02:00
|
|
|
define IPUTILS_MOVE_TFTPD_BINARY
|
|
|
|
mv $(TARGET_DIR)/usr/bin/tftpd $(TARGET_DIR)/usr/sbin/tftpd
|
|
|
|
endef
|
|
|
|
IPUTILS_POST_INSTALL_TARGET_HOOKS += IPUTILS_MOVE_TFTPD_BINARY
|
|
|
|
|
|
|
|
else
|
|
|
|
IPUTILS_CONF_OPTS += -DBUILD_TFTPD=false
|
|
|
|
endif
|
|
|
|
|
|
|
|
# Handle libraries
|
2016-01-21 04:31:47 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_LIBCAP),y)
|
2019-05-19 23:15:04 +02:00
|
|
|
IPUTILS_CONF_OPTS += -DUSE_CAP=true
|
2016-01-21 04:31:47 +01:00
|
|
|
IPUTILS_DEPENDENCIES += libcap
|
|
|
|
else
|
2019-05-19 23:15:04 +02:00
|
|
|
IPUTILS_CONF_OPTS += -DUSE_CAP=false
|
2016-01-21 04:31:47 +01:00
|
|
|
endif
|
2013-09-19 17:17:52 +02:00
|
|
|
|
2019-06-09 11:38:11 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_LIBIDN2),y)
|
2019-05-19 23:15:04 +02:00
|
|
|
IPUTILS_CONF_OPTS += -DUSE_IDN=true
|
2019-06-09 11:38:11 +02:00
|
|
|
IPUTILS_DEPENDENCIES += libidn2
|
2016-02-25 14:23:34 +01:00
|
|
|
else
|
2019-05-19 23:15:04 +02:00
|
|
|
IPUTILS_CONF_OPTS += -DUSE_IDN=false
|
2016-02-25 14:23:34 +01:00
|
|
|
endif
|
|
|
|
|
2019-11-03 07:07:43 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_SYSTEMD),y)
|
|
|
|
IPUTILS_DEPENDENCIES += systemd
|
|
|
|
endif
|
|
|
|
|
2019-07-19 23:11:52 +02:00
|
|
|
ifeq ($(BR2_SYSTEM_ENABLE_NLS),y)
|
|
|
|
IPUTILS_CONF_OPTS += -DUSE_GETTEXT=true
|
|
|
|
else
|
|
|
|
IPUTILS_CONF_OPTS += -DUSE_GETTEXT=false
|
|
|
|
endif
|
|
|
|
|
2019-05-19 23:15:04 +02:00
|
|
|
# XSL Stylesheets for DocBook 5 not packaged for buildroot
|
|
|
|
IPUTILS_CONF_OPTS += -DBUILD_MANS=false -DBUILD_HTML_MANS=false
|
2018-01-13 21:19:42 +01:00
|
|
|
|
2019-06-10 01:07:02 +02:00
|
|
|
# handle permissions ourselves
|
|
|
|
IPUTILS_CONF_OPTS += -DNO_SETCAP_OR_SUID=true
|
2019-08-01 18:22:33 +02:00
|
|
|
ifeq ($(BR2_ROOTFS_DEVICE_TABLE_SUPPORTS_EXTENDED_ATTRIBUTES),y)
|
|
|
|
define IPUTILS_PERMISSIONS
|
package/iputils: add config options to select which binaries to build/install
By default, the iputils build script might build binaries which are
useless for certain applications, like tftpd or ninfod. Those binaries
will add to the target filesystem size unless a post-build script removes
them manually, which is cumbersome and doesn't shorten build times.
In particular, in a certain aarch64 Buildroot project with musl selected
as a C library, this patch allowed to shrink the full iputils package from
219 KiB (if every option is selected) to 63 KiB (with only the ping
binary selected) - a 71.2% relative size decrease.
Moreover, upstream recently introduced a commit that disabled tftpd from
building by default, like rarpd. In the current state of things, this change
will introduce inconveniences for Buildroot users which prefer to use the
tftpd implementation provided by this package. With this patch, however, that
decision and similar future ones won't be a concern, because they will
have complete control of what binaries are built.
These changes add Kconfig options which let the user select what
binaries are built with ease.
Signed-off-by: Alejandro González <alejandro.gonzalez.correo@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2019-09-15 12:05:46 +02:00
|
|
|
$(if $(BR2_PACKAGE_IPUTILS_ARPING),\
|
|
|
|
/usr/sbin/arping f 755 0 0 - - - - -,)
|
|
|
|
$(if $(BR2_PACKAGE_IPUTILS_CLOCKDIFF),\
|
|
|
|
/usr/bin/clockdiff f 755 0 0 - - - - -
|
|
|
|
|xattr cap_net_raw+p,)
|
|
|
|
$(if $(BR2_PACKAGE_IPUTILS_PING),\
|
|
|
|
/bin/ping f 755 0 0 - - - - -
|
|
|
|
|xattr cap_net_raw+p,)
|
|
|
|
$(if $(BR2_PACKAGE_IPUTILS_TRACEROUTE6),\
|
|
|
|
/usr/bin/traceroute6 f 755 0 0 - - - - -
|
|
|
|
|xattr cap_net_raw+p,)
|
2019-08-01 18:22:33 +02:00
|
|
|
endef
|
|
|
|
else
|
2019-06-10 01:07:02 +02:00
|
|
|
define IPUTILS_PERMISSIONS
|
package/iputils: add config options to select which binaries to build/install
By default, the iputils build script might build binaries which are
useless for certain applications, like tftpd or ninfod. Those binaries
will add to the target filesystem size unless a post-build script removes
them manually, which is cumbersome and doesn't shorten build times.
In particular, in a certain aarch64 Buildroot project with musl selected
as a C library, this patch allowed to shrink the full iputils package from
219 KiB (if every option is selected) to 63 KiB (with only the ping
binary selected) - a 71.2% relative size decrease.
Moreover, upstream recently introduced a commit that disabled tftpd from
building by default, like rarpd. In the current state of things, this change
will introduce inconveniences for Buildroot users which prefer to use the
tftpd implementation provided by this package. With this patch, however, that
decision and similar future ones won't be a concern, because they will
have complete control of what binaries are built.
These changes add Kconfig options which let the user select what
binaries are built with ease.
Signed-off-by: Alejandro González <alejandro.gonzalez.correo@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2019-09-15 12:05:46 +02:00
|
|
|
$(if $(BR2_PACKAGE_IPUTILS_ARPING),\
|
|
|
|
/usr/sbin/arping f 755 0 0 - - - - -,)
|
|
|
|
$(if $(BR2_PACKAGE_IPUTILS_CLOCKDIFF),\
|
|
|
|
/usr/bin/clockdiff f 4755 0 0 - - - - -,)
|
|
|
|
$(if $(BR2_PACKAGE_IPUTILS_PING),\
|
|
|
|
/bin/ping f 4755 0 0 - - - - -,)
|
|
|
|
$(if $(BR2_PACKAGE_IPUTILS_TRACEROUTE6),\
|
|
|
|
/usr/bin/traceroute6 f 4755 0 0 - - - - -,)
|
2019-06-10 01:07:02 +02:00
|
|
|
endef
|
2019-08-01 18:22:33 +02:00
|
|
|
endif
|
2019-06-10 01:07:02 +02:00
|
|
|
|
2019-05-19 23:15:04 +02:00
|
|
|
$(eval $(meson-package))
|