wok-4.x view bash/receipt @ rev 12439
bash: CVE-2014-7169 fix
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Thu Oct 02 18:53:53 2014 +0200 (2014-10-02) |
parents | 853a028198ee |
children | 4d0702aaa4ad |
line source
1 # SliTaz package receipt.
3 PACKAGE="bash"
4 VERSION="4.2"
5 CATEGORY="system-tools"
6 SHORT_DESC="The GNU bourne SHell."
7 MAINTAINER="pankso@slitaz.org"
8 TARBALL="$PACKAGE-$VERSION.tar.gz"
9 WEB_SITE="http://www.gnu.org/software/bash/"
10 WGET_URL="$GNU_MIRROR/$PACKAGE/$TARBALL"
12 DEPENDS="readline"
13 BUILD_DEPENDS="readline bison"
15 # Rules to compile & install the temporary toolchain.
16 cook_tmp_toolchain()
17 {
18 cd $src
19 # CVE-2014-6271
20 patch -p0 < $stuff/funcdef-import-4.2.patch
21 # CVE-2014-7169
22 patch -p0 < $stuff/CVE-2014-7169.patch
23 ./configure --without-bash-malloc &&
24 make && make install
25 }
27 # Rules to configure and make the package.
28 compile_rules()
29 {
30 # Patch and then build.
31 cd $src
32 # CVE-2014-6271
33 patch -p0 < $stuff/funcdef-import-4.2.patch
34 # Skip tests that can not run while cross-compiling.
35 cat > config.cache << "EOF"
36 ac_cv_func_mmap_fixed_mapped=yes
37 ac_cv_func_strcoll_works=yes
38 ac_cv_func_working_mktime=yes
39 bash_cv_func_sigsetjmp=present
40 bash_cv_getcwd_malloc=yes
41 bash_cv_job_control_missing=present
42 bash_cv_printf_a_format=yes
43 bash_cv_sys_named_pipes=present
44 bash_cv_ulimit_maxfds=yes
45 bash_cv_under_sys_siglist=yes
46 bash_cv_unusable_rtsigs=no
47 gt_cv_int_divbyzero_sigfpe=yes
48 EOF
49 ./configure \
50 $CONFIGURE_ARGS \
51 --cache-file=config.cache \
52 --bindir=/bin \
53 --enable-history --enable-alias \
54 --disable-nls --without-bash-malloc \
55 --disable-help-builtin \
56 --with-installed-readline &&
57 make &&
58 # Bash doesn't care about DESTDIR in environnment variable.
59 make DESTDIR=$DESTDIR install
60 }
62 # Rules to gen a SliTaz package suitable for Tazpkg.
63 genpkg_rules()
64 {
65 cp -a $_pkg/bin $fs
66 # Config files.
67 #
68 mkdir $fs/etc
69 cp $stuff/example.bashrc $fs/etc/bashrc
70 }
72 # Post install commands for Tazpkg.
73 # Check /bin/sh stat.
74 #
75 post_install()
76 {
77 local root
78 root=$1
79 echo "Processing post-install commands..."
80 sh=`readlink $root/bin/sh`
81 if [ ! "$sh" = "/bin/bash" ]; then
82 echo ""
83 echo "**** Actual SH link : $sh"
84 echo ""
85 echo -n "Do you want Bash for /bin/sh (yes/No) ? : "
86 read -t 30 anser
87 if [ "$anser" == "yes" ]; then
88 echo ""
89 echo -n "Removing sh link to make a new one pointing on /bin/bash..."
90 rm $root/bin/sh && ln -s /bin/bash $root/bin/sh
91 status
92 else
93 echo ""
94 echo "Leaving /bin/sh to : $sh"
95 fi
96 fi
97 }
99 # Restore a valid sh link if needed.
100 pre_remove()
101 {
102 local root
103 root=$1
104 sh=`readlink $root/bin/sh`
105 if [ ! "$sh" = "busybox" ]; then
106 rm $root/bin/sh &&
107 ln -s /bin/busybox $root/bin/sh
108 fi
109 }