2013-09-19 17:17:52 +02:00
|
|
|
################################################################################
|
|
|
|
#
|
|
|
|
# iputils
|
|
|
|
#
|
|
|
|
################################################################################
|
|
|
|
|
2024-01-18 00:46:30 +01:00
|
|
|
IPUTILS_VERSION = 20240117
|
2023-12-26 13:02:51 +01:00
|
|
|
IPUTILS_SITE = https://github.com/iputils/iputils/releases/download/$(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
|
package: switch to _CPE_ID_VALID
Now that we document _CPE_ID_VALID, and that it shall be used instead of
setting a default value to one of the other _CPE_ID_* variables, change
all of the existing packages to use it, to avoid any error when we later
extend check-package to validate the sanity ofthe _CPE_ID_* variables.
Mechanical change done within the reference container, running the new
check in check-package, to report the CPE_ID errors:
$ make check-package 2>/dev/null \
|awk '{
split($(1), a, ":"); fname = a[1]
split($(2), a, "'\''"); val = a[2]
new_var = $(8); gsub("_CPE_ID_.*", "_CPE_ID_VALID", new_var)
printf("%s %s %s %s\n", fname, $(8), val, new_var)
}' \
|while read fname var val new_var; do
sed -r -i -e "s/${var}[[:space:]]*=[[:space:]]*${val}/${new_var} = YES/" "${fname}"
done
$ git diff -I'CPE_ID_(VENDOR|VALID)'
[empty]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Cc: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2024-02-10 22:24:58 +01:00
|
|
|
IPUTILS_CPE_ID_VALID = YES
|
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_TRACEPATH=$(if $(BR2_PACKAGE_IPUTILS_TRACEPATH),true,false) \
|
2021-08-08 12:35:06 +02:00
|
|
|
-DSKIP_TESTS=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
|
|
|
|
2020-12-28 17:11:29 +01:00
|
|
|
# Selectively select the appropriate SELinux refpolicy modules
|
|
|
|
IPUTILS_SELINUX_MODULES = \
|
|
|
|
$(if $(BR2_PACKAGE_IPUTILS_ARPING),netutils) \
|
|
|
|
$(if $(BR2_PACKAGE_IPUTILS_PING),netutils) \
|
2022-11-26 01:38:07 +01:00
|
|
|
$(if $(BR2_PACKAGE_IPUTILS_TRACEPATH),netutils)
|
2020-12-28 17:11:29 +01: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
|
|
|
#
|
|
|
|
# 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
|
|
|
|
|
|
|
|
# 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,)
|
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 - - - - -,)
|
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))
|