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
|
|
|
|
|
2019-07-10 22:45:29 +02:00
|
|
|
IPUTILS_VERSION = 20190709
|
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
|
|
|
|
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
|
|
|
|
|
2016-02-25 14:23:33 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_NETTLE),y)
|
2019-05-19 23:15:04 +02:00
|
|
|
IPUTILS_CONF_OPTS += -DUSE_CRYPTO=nettle
|
2016-02-25 14:23:33 +01:00
|
|
|
IPUTILS_DEPENDENCIES += nettle
|
2019-05-19 23:15:04 +02:00
|
|
|
else ifeq ($(BR2_PACKAGE_LIBGCRYPT),y)
|
|
|
|
IPUTILS_CONF_OPTS += -DUSE_CRYPTO=gcrypt
|
|
|
|
IPUTILS_DEPENDENCIES += libgcrypt
|
|
|
|
else ifeq ($(BR2_PACKAGE_OPENSSL),y)
|
|
|
|
IPUTILS_CONF_OPTS += -DUSE_CRYPTO=openssl
|
2016-02-25 14:23:32 +01:00
|
|
|
IPUTILS_DEPENDENCIES += openssl
|
2019-05-19 23:15:04 +02:00
|
|
|
else ifeq ($(BR2_PACKAGE_LINUX_HEADERS),y)
|
|
|
|
IPUTILS_CONF_OPTS += -DUSE_CRYPTO=kernel
|
|
|
|
IPUTILS_DEPENDENCIES += linux-headers
|
2016-02-25 14:23:32 +01:00
|
|
|
else
|
2019-05-19 23:15:04 +02:00
|
|
|
IPUTILS_CONF_OPTS += -DUSE_CRYPTO=none
|
|
|
|
# BUILD_NINFOD=true and USE_CRYPTO=none cannot be combined
|
2019-11-01 07:18:02 +01:00
|
|
|
IPUTILS_NINFOD = n
|
2016-02-25 14:23:32 +01:00
|
|
|
endif
|
|
|
|
|
2019-11-03 07:07:43 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_SYSTEMD),y)
|
|
|
|
IPUTILS_DEPENDENCIES += systemd
|
|
|
|
endif
|
|
|
|
|
2019-08-02 17:15:29 +02:00
|
|
|
# ninfod requires <pthread.h>
|
|
|
|
ifneq ($(BR2_TOOLCHAIN_HAS_THREADS),y)
|
2019-11-01 07:18:02 +01:00
|
|
|
IPUTILS_NINFOD = n
|
|
|
|
endif
|
|
|
|
|
2019-11-01 11:41:39 +01:00
|
|
|
ifeq ($(IPUTILS_NINFOD),n)
|
|
|
|
IPUTILS_CONF_OPTS += -DBUILD_NINFOD=false
|
|
|
|
else
|
2019-11-01 07:18:02 +01:00
|
|
|
IPUTILS_CONF_OPTS += -DBUILD_NINFOD=true
|
|
|
|
define IPUTILS_INSTALL_SERVICE_NINFOD
|
|
|
|
mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
|
|
|
|
ln -sf ../../../../lib/systemd/system/ninfod.service \
|
|
|
|
$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/ninfod.service
|
|
|
|
endef
|
2019-08-02 17:15:29 +02:00
|
|
|
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-06-19 23:30:06 +02:00
|
|
|
IPUTILS_CONF_OPTS += -DBUILD_TRACEROUTE6=true
|
|
|
|
|
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-17 19:17:46 +02:00
|
|
|
# move iputils 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_BINARIES
|
|
|
|
mv $(TARGET_DIR)/usr/bin/arping $(TARGET_DIR)/usr/sbin/arping
|
|
|
|
$(if $(BR2_ROOTFS_MERGED_USR),,\
|
|
|
|
mv $(TARGET_DIR)/usr/bin/ping $(TARGET_DIR)/bin/ping)
|
|
|
|
mv $(TARGET_DIR)/usr/bin/tftpd $(TARGET_DIR)/usr/sbin/tftpd
|
|
|
|
endef
|
|
|
|
IPUTILS_POST_INSTALL_TARGET_HOOKS += IPUTILS_MOVE_BINARIES
|
|
|
|
|
2019-06-19 23:30:08 +02:00
|
|
|
# upstream requires distros to create symlink
|
|
|
|
define IPUTILS_CREATE_PING6_SYMLINK
|
|
|
|
ln -sf $(TARGET_DIR)/bin/ping $(TARGET_DIR)/bin/ping6
|
|
|
|
endef
|
|
|
|
IPUTILS_POST_INSTALL_TARGET_HOOKS += IPUTILS_CREATE_PING6_SYMLINK
|
|
|
|
|
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
|
|
|
|
/usr/sbin/arping f 755 0 0 - - - - -
|
|
|
|
/usr/bin/clockdiff f 755 0 0 - - - - -
|
|
|
|
|xattr cap_net_raw+p
|
|
|
|
/bin/ping f 755 0 0 - - - - -
|
|
|
|
|xattr cap_net_raw+p
|
|
|
|
/usr/bin/traceroute6 f 755 0 0 - - - - -
|
|
|
|
|xattr cap_net_raw+p
|
|
|
|
endef
|
|
|
|
else
|
2019-06-10 01:07:02 +02:00
|
|
|
define IPUTILS_PERMISSIONS
|
2019-08-01 18:22:32 +02:00
|
|
|
/usr/sbin/arping f 755 0 0 - - - - -
|
2019-06-17 19:17:47 +02:00
|
|
|
/usr/bin/clockdiff f 4755 0 0 - - - - -
|
|
|
|
/bin/ping f 4755 0 0 - - - - -
|
2019-06-19 23:30:06 +02:00
|
|
|
/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-11-01 07:18:02 +01:00
|
|
|
define IPUTILS_INSTALL_SERVICE_RDISC
|
|
|
|
mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
|
|
|
|
ln -sf ../../../../lib/systemd/system/rdisc.service \
|
|
|
|
$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/rdisc.service
|
|
|
|
endef
|
|
|
|
|
|
|
|
define IPUTILS_INSTALL_INIT_SYSTEMD
|
|
|
|
$(IPUTILS_INSTALL_SERVICE_NINFOD)
|
|
|
|
$(IPUTILS_INSTALL_SERVICE_RDISC)
|
|
|
|
endef
|
|
|
|
|
2019-05-19 23:15:04 +02:00
|
|
|
$(eval $(meson-package))
|