mirror of
https://github.com/openwrt/packages.git
synced 2026-02-04 12:06:29 +08:00
- Fix posix-mode issue with "wait -n", where it can return process IDs outside the requested set - Do not try to use shm_open, there is too much variance in behavior across systems - Remove internal quoting that causes failures when expanding nested array subscripts in an arithmetic context - Fix issue with source when read(2) returns fewer characters than fstat(2) says are available - Fix crash when restoring default disposition for SIGINT in asynchronous subshell - Fix issues with range expressions and non-ascii characters in glob patterns when globasciiranges is enabled - Fix issue where nofork command substitutions can affect redirections in the calling shell - Fix issue with calling mbrtowc too much when translating ansic-single-quoted strings - Fix crash when interrupting reverse i-search with ^C Signed-off-by: Wei-Ting Yang <williamatcg@gmail.com>
102 lines
2.7 KiB
Makefile
102 lines
2.7 KiB
Makefile
#
|
|
# Copyright (C) 2007-2026 OpenWrt.org
|
|
#
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
# See /LICENSE for more information.
|
|
#
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
PKG_NAME:=bash
|
|
PKG_VERSION:=5.3
|
|
PKG_RELEASE:=2
|
|
|
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
|
PKG_SOURCE_URL:=@GNU/bash
|
|
PKG_HASH:=0d5cd86965f869a26cf64f4b71be7b96f90a3ba8b3d74e27e8e9d9d5550f31ba
|
|
|
|
PKG_MAINTAINER:=Wei-Ting Yang <williamatcg@gmail.com>
|
|
PKG_LICENSE:=GPL-3.0-or-later
|
|
PKG_LICENSE_FILES:=COPYING
|
|
PKG_CPE_ID:=cpe:/a:gnu:bash
|
|
|
|
PKG_INSTALL:=1
|
|
PKG_BUILD_PARALLEL:=1
|
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
define Package/bash
|
|
SECTION:=utils
|
|
CATEGORY:=Utilities
|
|
SUBMENU:=Shells
|
|
TITLE:=The GNU Bourne Again SHell
|
|
DEPENDS:=+libncurses +libreadline
|
|
URL:=https://www.gnu.org/software/bash/
|
|
endef
|
|
|
|
define Package/bash/description
|
|
Bash is an sh-compatible command language interpreter that executes
|
|
commands read from the standard input or from a file. Bash also
|
|
incorporates useful features from the Korn and C shells (ksh and csh).
|
|
endef
|
|
|
|
define Package/bash/conffiles
|
|
/etc/bash.bashrc
|
|
/etc/bash.bash_logout
|
|
/etc/profile.d/sys_bashrc.sh
|
|
endef
|
|
|
|
# Bash detects and enables certain features by runtest simple piece of code
|
|
# which is not viable when doing cross compilation and default to no in many
|
|
# cases. Grep for 'cross.compil' in aclocal.m4 and config-bot.h for details
|
|
#
|
|
# bash_cv_dev_fd: The test is done on build system but OpenWrt currently does
|
|
# not have /dev/fd, it provides /proc/self/fd/ instead
|
|
#
|
|
# bash_cv_getcwd_malloc: The replacement by bash does not work well with
|
|
# overlayfs. See "bash getcwd errors when running under OverlayFS"
|
|
# http://permalink.gmane.org/gmane.linux.embedded.yocto.general/25204
|
|
#
|
|
# bash_cv_job_control_missing: Job control is needed for bash to be used as the
|
|
# default shell
|
|
#
|
|
# bash_cv_sys_named_pipes: Required for process substitution
|
|
CONFIGURE_VARS += \
|
|
CFLAGS_FOR_BUILD="-std=gnu17" \
|
|
ac_cv_rl_prefix="$(STAGING_DIR)/usr" \
|
|
ac_cv_rl_version="8.0" \
|
|
bash_cv_dev_fd=whacky \
|
|
bash_cv_func_sigsetjmp=present \
|
|
bash_cv_getcwd_malloc=yes \
|
|
bash_cv_job_control_missing=present \
|
|
bash_cv_printf_a_format=yes \
|
|
bash_cv_sys_named_pipes=present
|
|
|
|
CONFIGURE_ARGS += \
|
|
--bindir=/bin \
|
|
--disable-rpath \
|
|
--enable-direxpand-default \
|
|
--enable-job-control \
|
|
--enable-readline \
|
|
--with-curses \
|
|
--without-bash-malloc
|
|
|
|
TARGET_CFLAGS += -std=gnu17
|
|
|
|
define Package/bash/postinst
|
|
#!/bin/sh
|
|
grep -q bash "$${IPKG_INSTROOT}/etc/shells" || {
|
|
echo /bin/bash >> "$${IPKG_INSTROOT}/etc/shells"
|
|
echo /bin/rbash >> "$${IPKG_INSTROOT}/etc/shells"
|
|
}
|
|
endef
|
|
|
|
define Package/bash/install
|
|
$(INSTALL_DIR) $(1)/bin
|
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/bash $(1)/bin/
|
|
$(LN) bash $(1)/bin/rbash
|
|
$(CP) ./files/* $(1)/
|
|
endef
|
|
|
|
$(eval $(call BuildPackage,bash))
|