mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-04-15 18:51:48 +02:00
114 lines
4.4 KiB
Plaintext
114 lines
4.4 KiB
Plaintext
# Contributor: Łukasz Jendrysik <scadu@yandex.com>
|
|
# Contributor: TBK <alpine@jjtc.eu>
|
|
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
|
|
pkgname=bash
|
|
pkgver=5.3.9
|
|
_patchlevel=${pkgver##*.}
|
|
_myver=${pkgver%.*}
|
|
_patchbase=${_myver/./}
|
|
pkgrel=1
|
|
pkgdesc="The GNU Bourne Again shell"
|
|
url="https://www.gnu.org/software/bash/bash.html"
|
|
arch="all"
|
|
license="GPL-3.0-or-later"
|
|
makedepends_build="bison flex"
|
|
makedepends_host="readline-dev>8 ncurses-dev musl-libintl"
|
|
install="$pkgname.post-install $pkgname.post-upgrade $pkgname.pre-deinstall"
|
|
subpackages="$pkgname-dbg $pkgname-dev $pkgname-doc"
|
|
source="$pkgname-$_myver-1.tar.gz::https://ftp.gnu.org/gnu/bash/bash-$_myver.tar.gz
|
|
bashrc
|
|
bash-noinfo.patch
|
|
profile-bashrc.sh
|
|
"
|
|
# generate url's to patches. note: no forks allowed!
|
|
_i=1
|
|
_pad=00
|
|
while [ $_i -le $_patchlevel ]; do
|
|
[ $_i -ge 10 ] && _pad="0"
|
|
[ $_i -ge 100 ] && _pad=
|
|
source="$source https://ftp.gnu.org/gnu/bash/bash-$_myver-patches/bash$_patchbase-$_pad$_i"
|
|
_i=$(( _i + 1))
|
|
done
|
|
|
|
# secfixes:
|
|
# 4.4.12-r1:
|
|
# - CVE-2016-0634
|
|
|
|
builddir="$srcdir/$pkgname-$_myver"
|
|
|
|
export CFLAGS="$CFLAGS -DSYS_BASHRC='\"/etc/bash/bashrc\"'"
|
|
|
|
prepare() {
|
|
# NOTE: This section is for applying the vendor patches, which are required to fix
|
|
# security holes. `default_prepare` does *not* apply vendor patches in the format
|
|
# shipped with bash. We also need to make sure vendor patches are applied before
|
|
# our own.
|
|
# If you disagree, please request an experimental rebuild with bash as /bin/sh,
|
|
# before removing this section.
|
|
for p in $source; do
|
|
case $p in
|
|
*/bash[0-9][0-9]-[0-9]*)
|
|
msg "$p (vendor)"
|
|
patch -p0 -i "$srcdir"/${p##*/}
|
|
;;
|
|
esac
|
|
done
|
|
|
|
default_prepare
|
|
|
|
# preventively set Version to please 'apk version --check'
|
|
sed -i "s/@PACKAGE_VERSION@/$pkgver/" "$builddir"/support/bash.pc.in
|
|
}
|
|
|
|
build() {
|
|
./configure \
|
|
--build=$CBUILD \
|
|
--host=$CHOST \
|
|
--prefix=/usr \
|
|
--bindir=/bin \
|
|
--mandir=/usr/share/man \
|
|
--infodir=/usr/share/info \
|
|
--with-curses \
|
|
--disable-nls \
|
|
--enable-readline \
|
|
--without-bash-malloc \
|
|
--with-installed-readline
|
|
# parallel build workarounds
|
|
make y.tab.c && make builtins/libbuiltins.a && make
|
|
}
|
|
|
|
check() {
|
|
make test
|
|
}
|
|
|
|
package() {
|
|
mkdir -p "$pkgdir"/etc/bash
|
|
make DESTDIR="$pkgdir" install
|
|
install -Dm644 "$srcdir"/bashrc "$pkgdir"/etc/bash/bashrc
|
|
install -Dm644 "$srcdir"/profile-bashrc.sh "$pkgdir"/etc/profile.d/00-bashrc.sh
|
|
rm -rf "$pkgdir"/usr/share/locale
|
|
}
|
|
|
|
dev() {
|
|
default_dev
|
|
mkdir -p "$subpkgdir"/bin "$subpkgdir"/usr/lib/$pkgname
|
|
mv "$pkgdir"/bin/${pkgname}bug "$subpkgdir"/bin
|
|
mv "$pkgdir"/usr/lib/$pkgname/Makefile* "$subpkgdir"/usr/lib/$pkgname
|
|
}
|
|
|
|
sha512sums="
|
|
426702c8b0fb9e0c9956259973ce5b657890fd47f4f807a64febf20077bb48d0b91474ed6e843d2ef277186b46c5fffa79b808da9b48d4ec027d5e2de1b28ed8 bash-5.3-1.tar.gz
|
|
a9ff38b7a11c7a4935726dddcdde320a0d9616f50bae390f149e23d47bdf07a4c6e09ade2eea2dd9fa8dc449f3d1992a327e19cd57af1b8aad77b39d681c7dff bashrc
|
|
9d8845491d0fe335bdd8e9a2bd98bda54bfed2ae3c35b2196c6d5a38bdf96c4d97572ba7d6b19ab605ef4e8f001f64cf3312f87dedebb9e37a95ad2c44e33cdb bash-noinfo.patch
|
|
9b44e2fc4a37fb97bdd75f1563a7b472c3f1260f2da5542f8f063b7647cf751006e70c683c573d0eea4c4bd64863b90997472f5fbc3f9c1ee775cd662b6eab31 profile-bashrc.sh
|
|
66d0987f1a8951974c3a707a1980ef391a1f2a2938f0fa46adb77fcdcef6a3ca49e67182b9640ece3e59bb289e5b4a17eb870aa2a525a03e829a7be158d020a6 bash53-001
|
|
05caea1c1f5a3d27f2aa351c24f324f9d544ded89db4183ae2872e0283dde62dd6166ca4e780304398935b4aa3fb4db77ecf57acd0f0e295d279ffe40b772158 bash53-002
|
|
3d4004653cb3f2cba984e67b8e7ae54c19351e176b62bb415f88fdd482ae04be063dacf6303c8343ab6c8bf4f2388026c1742ac603a5cd5c330db22a4b76f4cb bash53-003
|
|
d3c7c83ae0742f2a4e1bc96e8fdb3f05c8c0a7e631d3473922ac245f83194925ae443e761269fa6a519298b1123ee4008bcbcdaf9180dff0a0df7fbe5e029bbb bash53-004
|
|
e81b43b084c1e9d59acd174d0792a93053780bdef61e7f4072d90b425d99a3fb7d35ef4c0ab79c4fb24bb6b38a8d9e99aad2fceac6efddf723a2cd123b32f0ea bash53-005
|
|
f7e303405571635e20c26507c46f9ae0a61ea1328fa0492f2eba2095d398f799e62c1dbf0c07b440c290244f2c54186691ef4aaa2d65f2de101f9888386e2391 bash53-006
|
|
5f9419b34c759b92a29f25d97e5da3f02603b3138afc11523c7bd304139db0cd02ff82a093cf78a338a7f9d88cb50a880fa6a105be83f8ca85ea8ff7d5c5d80b bash53-007
|
|
094b7dc2abe6fc41c62494c6b69640fbd8c6bd93e7cde0618504bb8589fc51fec2fb1686b2729c37e430d336d93ec174233d78f23c82026aca49a240a00477c1 bash53-008
|
|
07f37cee118e510ae58ea408f9d97b942017e1378532d4e3cd5a4d7405994ddadaba5d3ddb4bbda6b375760967faa51add7f46914ba919a27c14e7036f64f3be bash53-009
|
|
"
|