squid - problem z utworzeniem paszki

Serwery i sieci oparte na Slackware, wszelkiego rodzaju usługi, troubleshooting.

Moderatorzy: Moderatorzy, Administratorzy

Awatar użytkownika
coolart
Użytkownik
Posty: 250
Rejestracja: 2004-06-20, 03:08
Kontakt:

squid - problem z utworzeniem paszki

Post autor: coolart » 2012-12-19, 20:15

Witam wlasnie robic nowa paczke squid'a 3.2.5 i mam problem z utworzeniem poniewaz roznica pomiedzy ostatnia ktora robilem 3.1.10 jest dosyc spora widzac po ./configure --help wiec pozmienialem lecz mam bledy.
Oto slackbuild

Kod: Zaznacz cały

#!/bin/sh

# Slackware build script for squid
# http://www.squid-cache.org/

# Copyright 2006-2011  David Somero (dsomero@hotmail.com) Athens,TN USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
# permitted provided that the following conditions are met:
#
# 1. Redistributions of this script must retain the above copyright
#    notice, this list of conditions and the following disclaimer.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

PRGNAM=squid
VERSION=${VERSION:-3.2.5}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}

if [ -z "$ARCH" ]; then
  case "$( uname -m )" in
    i?86) ARCH=i486 ;;
    arm*) ARCH=arm ;;
       *) ARCH=$( uname -m ) ;;
  esac
fi

CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}

SQUIDUSER=${SQUIDUSER:-nobody}
SQUIDGROUP=${SQUIDGROUP:-nobody}

if [ "$ARCH" = "i486" ]; then
  SLKCFLAGS="-O2 -march=i486 -mtune=i686"
  LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
  SLKCFLAGS="-O2 -march=i686 -mtune=i686"
  LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
  SLKCFLAGS="-O2 -fPIC"
  LIBDIRSUFFIX="64"
else
  SLKCFLAGS="-O2"
  LIBDIRSUFFIX=""
fi

set -e

rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
cd $PRGNAM-$VERSION
chown -R root:root .
find . \
 \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
 -exec chmod 755 {} \; -o \
 \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
 -exec chmod 644 {} \;

# last option is needed on current
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
  --prefix=/usr \
  --libdir=/usr/lib${LIBDIRSUFFIX} \
  --sysconfdir=/etc/squid \
  --localstatedir=/var/log/squid \
  --datadir=/usr/share/squid \
  --with-pidfile=/var/run/squid \
  --mandir=/usr/man \
  --with-logdir=/var/log/squid \
  --enable-basic \
  --enable-auth-basic="NCSA,SMB,PAM,NIS,LDAP" \
  --enable-basic-auth-helpers="NCSA,SMB,PAM,NIS,LDAP" \
  --enable-url-rewrite-helpers="fake" \
  --enable-x-accelerator-vary \
  --enable-linux-netfilter \
  --enable-pf-transparent \
  --enable-follow-x-forwarded-for \
  --with-large-files 
  --enable-async-io \
  --enable-storeio="ufs,diskd,aufs" \
  --build=$ARCH-slackware-linux \
  --disable-strict-error-checking

make all
make install DESTDIR=$PKG

find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
  | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true

find $PKG/usr/man -type f -exec gzip -9 {} \;
for i in $(find $PKG/usr/man -type l); do ln -s $(readlink $i).gz $i.gz; rm $i; done

mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION 
cp -a \
  CONTRIBUTORS COPYING COPYRIGHT CREDITS ChangeLog INSTALL \
  QUICKSTART README RELEASENOTES.html SPONSORS $CWD/README.SBo \
    $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
chown root:root $PKG/usr/doc/$PRGNAM-$VERSION/*

mkdir -p $PKG/etc/{logrotate.d,rc.d} 
cat $CWD/rc.squid > $PKG/etc/rc.d/rc.squid.new

sed -e "s,@USER@,$SQUIDUSER," -e "s,@GROUP@,$SQUIDGROUP," $CWD/squid.logrotate \
  > $PKG/etc/logrotate.d/squid.new

mv $PKG/etc/squid/mime.conf $PKG/etc/squid/mime.conf.new
mv $PKG/etc/squid/cachemgr.conf $PKG/etc/squid/cachemgr.conf.new
rm $PKG/etc/squid/squid.conf 
cat $CWD/squid.conf > $PKG/etc/squid/squid.conf.new
cat $CWD/squid.conf.documented > $PKG/etc/squid/squid.conf.documented

mkdir -p $PKG/var/{cache,run}/squid
chown $SQUIDUSER:$SQUIDGROUP $PKG/var/{cache,log,run}/squid

## Edit the config file to set the user and group to run as
sed -i -e 's%^cache_effective_user nobody%cache_effective_user '"$SQUIDUSER"'%g' \
  $PKG/etc/squid/squid.conf.new
sed -i -e 's%^cache_effective_group nobody%cache_effective_group '"$SQUIDGROUP"'%g' \
  $PKG/etc/squid/squid.conf.new

mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh

cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD.${PKGTYPE:-txz}
a bledy przychodza przy :

Kod: Zaznacz cały

--enable-pf-transparent 
configure: IPF-based transparent proxying enabled : no
configure: error: PF-based transparent proxy requested but needed header not found

## a przy tych wywala iz nie znane polecenie
--enable-follow-x-forwarded-for
--with-large-files  
--enable-async-io 
--enable-storeio="ufs,diskd,aufs"
"command not found"
nie bardzo wiem czemu pisze ze nie znaleziono polecenia skoro w configu istnieje

Awatar użytkownika
webster
Użytkownik
Posty: 1266
Rejestracja: 2009-10-06, 11:58
Lokalizacja: Gdańsk
Kontakt:

Re: squid - problem z utworzeniem paszki

Post autor: webster » 2012-12-20, 15:14

Zjadłeś znak \ po --with-large-files

Kod: Zaznacz cały

  --enable-follow-x-forwarded-for \
  --with-large-files 
  --enable-async-io \
  --enable-storeio="ufs,diskd,aufs" \
  --build=$ARCH-slackware-linux \
  --disable-strict-error-checking
††† Chaos Of The Mirror - Valheru †††
††† I ♥ SlackWare RuLeZ †††

Slackware Poland FaceBook

Awatar użytkownika
coolart
Użytkownik
Posty: 250
Rejestracja: 2004-06-20, 03:08
Kontakt:

Re: squid - problem z utworzeniem paszki

Post autor: coolart » 2012-12-20, 18:56

fatkt zjadlem lecz pozniej dostzeglem i poprawilem lecz dalej bez tych opcji nie chce sie skompilowac

Awatar użytkownika
webster
Użytkownik
Posty: 1266
Rejestracja: 2009-10-06, 11:58
Lokalizacja: Gdańsk
Kontakt:

Re: squid - problem z utworzeniem paszki

Post autor: webster » 2012-12-20, 20:36

Czy Ty zrozumiałeś co ja Tobie napisałem? znak \ oznacza kontynuowanie linii, w tym wypadku ./configure bez tego znaku, on kończy przyjmowanie warunków do wykonania komendy i wykonuje kolejną linię. W linii którą Tobie wskazałem wstaw znak \ jak to analogicznie w Masz w innych liniach, powyżej i poniżej....

n/c
††† Chaos Of The Mirror - Valheru †††
††† I ♥ SlackWare RuLeZ †††

Slackware Poland FaceBook

ODPOWIEDZ