wok-next annotate bash/receipt @ rev 17172

Up firefox-official (32.0.3) CVE-2014-1568
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu Sep 25 15:28:17 2014 +0200 (2014-09-25)
parents b5a7e88f4bf6
children 40e999c964ea
rev   line source
pankso@14 1 # SliTaz package receipt.
pankso@14 2
pankso@14 3 PACKAGE="bash"
slaxemulator@8720 4 VERSION="4.2"
pankso@202 5 CATEGORY="system-tools"
pankso@14 6 SHORT_DESC="The GNU bourne SHell."
pankso@14 7 MAINTAINER="pankso@slitaz.org"
pascal@15201 8 LICENSE="GPL3"
pankso@14 9 TARBALL="$PACKAGE-$VERSION.tar.gz"
pankso@14 10 WEB_SITE="http://www.gnu.org/software/bash/"
pankso@14 11 WGET_URL="$GNU_MIRROR/$PACKAGE/$TARBALL"
pankso@14 12
slaxemulator@10407 13 DEPENDS="readline"
slaxemulator@10407 14 BUILD_DEPENDS="readline bison"
slaxemulator@10407 15
gokhlayeh@8171 16 # Rules to compile & install the temporary toolchain.
gokhlayeh@8171 17 cook_tmp_toolchain()
gokhlayeh@8171 18 {
gokhlayeh@8171 19 cd $src
pascal@17171 20 # CVE-2014-6271
pascal@17171 21 patch -p0 < $stuff/funcdef-import-4.2.patch
gokhlayeh@8171 22 ./configure --without-bash-malloc &&
gokhlayeh@8171 23 make && make install
gokhlayeh@8171 24 }
gokhlayeh@8171 25
pankso@14 26 # Rules to configure and make the package.
pankso@14 27 compile_rules()
pankso@14 28 {
pankso@14 29 # Patch and then build.
pankso@14 30 cd $src
pascal@17171 31 # CVE-2014-6271
pascal@17171 32 patch -p0 < $stuff/funcdef-import-4.2.patch
pankso@10352 33 # Skip tests that can not run while cross-compiling.
pankso@10352 34 cat > config.cache << "EOF"
pankso@10352 35 ac_cv_func_mmap_fixed_mapped=yes
pankso@10352 36 ac_cv_func_strcoll_works=yes
pankso@10352 37 ac_cv_func_working_mktime=yes
pankso@10352 38 bash_cv_func_sigsetjmp=present
pankso@10352 39 bash_cv_getcwd_malloc=yes
pankso@10352 40 bash_cv_job_control_missing=present
pankso@10352 41 bash_cv_printf_a_format=yes
pankso@10352 42 bash_cv_sys_named_pipes=present
pankso@10352 43 bash_cv_ulimit_maxfds=yes
pankso@10352 44 bash_cv_under_sys_siglist=yes
pankso@10352 45 bash_cv_unusable_rtsigs=no
pankso@10352 46 gt_cv_int_divbyzero_sigfpe=yes
pankso@10352 47 EOF
pankso@10344 48 ./configure \
pankso@10352 49 $CONFIGURE_ARGS \
pankso@10352 50 --cache-file=config.cache \
pankso@10344 51 --bindir=/bin \
gokhlayeh@8171 52 --enable-history --enable-alias \
gokhlayeh@8171 53 --disable-nls --without-bash-malloc \
pankso@10344 54 --disable-help-builtin \
pankso@10344 55 --with-installed-readline &&
pascal@1553 56 make &&
gokhlayeh@8171 57 # Bash doesn't care about DESTDIR in environnment variable.
gokhlayeh@8171 58 make DESTDIR=$DESTDIR install
pankso@14 59 }
pankso@14 60
pankso@14 61 # Rules to gen a SliTaz package suitable for Tazpkg.
pankso@14 62 genpkg_rules()
pankso@14 63 {
pascal@14999 64 cp -a $install/bin $fs
pankso@14 65 # Config files.
pankso@14 66 #
pankso@14 67 mkdir $fs/etc
pankso@9697 68 cp $stuff/example.bashrc $fs/etc/bashrc
pankso@14 69 }
pankso@14 70
xfred222@13689 71
pankso@14 72 post_install()
pankso@14 73 {
pankso@14 74 local root
pankso@14 75 root=$1
pankso@14 76 echo "Processing post-install commands..."
xfred222@13689 77 echo -n "Do you want to set Bash to default (y/N) ? : "
gokhlayeh@7635 78 read -t 30 anser
xfred222@13689 79 if [ "$anser" == "y" ]; then
pankso@14 80 echo ""
xfred222@13689 81 echo "Setting bash as default for all users"
xfred222@13689 82 sed -i "s/:\/bin\/sh$/:\/bin\/bash/g" /etc/passwd
xfred222@13689 83 sed -i "s/:\/bin\/ksh$/:\/bin\/bash/g" /etc/passwd
xfred222@13689 84 sed -i "s/:\/bin\/zsh$/:\/bin\/bash/g" /etc/passwd
xfred222@13689 85 sed -i "s/:\/bin\/csh$/:\/bin\/bash/g" /etc/passwd
xfred222@13689 86 echo "Creating .bashrc file for all users"
xfred222@13689 87 for i in `ls -d /home/*`
xfred222@13689 88 do
xfred222@13689 89 cp /etc/bashrc $i/.bashrc
xfred222@13689 90 done
xfred222@13689 91 cp /etc/bashrc /root/.bashrc
xfred222@13689 92 cp /etc/bashrc /etc/skel/.bashrc
pankso@14 93 fi
pankso@14 94 }
pankso@2156 95
xfred222@13689 96
pankso@2156 97 pre_remove()
pankso@2156 98 {
slaxemulator@9610 99 local root
slaxemulator@9610 100 root=$1
xfred222@13689 101 echo "Setting back sh as default for all users"
xfred222@13689 102 sed -i "s/:\/bin\/bash$/:\/bin\/sh/g" /etc/passwd
mojo@15805 103 if [ -f /etc/skel/.bashrc ]; then
xfred222@13689 104 rm /etc/skel/.bashrc
mojo@15805 105 fi
pankso@2156 106 }