wok-current annotate squidguard/receipt @ rev 25687
Up expat CVE-2024-28757
author | Stanislas Leduc <shann@slitaz.org> |
---|---|
date | Fri Mar 15 07:23:20 2024 +0000 (5 months ago) |
parents | 8e505f99deb3 |
children |
rev | line source |
---|---|
pascal@1253 | 1 # SliTaz package receipt. |
pascal@1253 | 2 |
pascal@1253 | 3 PACKAGE="squidguard" |
pascal@25044 | 4 VERSION="1.4.0" |
pascal@1253 | 5 CATEGORY="network" |
pascal@1253 | 6 SHORT_DESC="Web filter." |
pascal@1253 | 7 MAINTAINER="pascal.bellard@slitaz.org" |
pascal@15023 | 8 LICENSE="GPL" |
pascal@25044 | 9 TARBALL="$PACKAGE-$VERSION.tar.gz" |
pascal@25443 | 10 WEB_SITE="https://web.archive.org/web/20220728071047/http://www.squidguard.org/" |
pascal@25044 | 11 WGET_URL="https://www.joonet.de/sources/$PACKAGE/$TARBALL" |
pascal@1253 | 12 DEPENDS="squid libdb" |
pascal@1253 | 13 BUILD_DEPENDS="db-dev" |
pascal@1253 | 14 |
pascal@24465 | 15 # What is the latest version available today? |
pascal@24465 | 16 current_version() |
pascal@24465 | 17 { |
pascal@24465 | 18 wget -O - ${WGET_URL%/*}/ 2>/dev/null | \ |
pascal@25044 | 19 sed "/$PACKAGE-[0-9]/!d;/tar/!d;s|.*$PACKAGE-\\(.*\\).tar.*|\\1|" | sort -Vr | sed q |
pascal@24465 | 20 } |
pascal@24465 | 21 |
pascal@1253 | 22 # Rules to configure and make the package. |
pascal@1253 | 23 compile_rules() |
pascal@1253 | 24 { |
erjo@4661 | 25 # Security patches |
erjo@4661 | 26 while read patch_file; do |
erjo@4661 | 27 echo "Apply $patch_file" |
pascal@8974 | 28 tar xvzf $stuff/$patch_file || return 1 |
erjo@4661 | 29 cp -a $(basename $patch_file .tar.gz)/* src |
erjo@4661 | 30 done <<EOT |
erjo@4661 | 31 squidGuard-1.4-patch-20091015.tar.gz |
erjo@4661 | 32 squidGuard-1.4-patch-20091019.tar.gz |
pascal@18170 | 33 squidGuard-1.4-patch-20150201.tar.gz |
erjo@4661 | 34 EOT |
erjo@16708 | 35 # Add support for squid 3.4 |
erjo@16708 | 36 patch -p1 < $stuff/squidGuard-1.4_upgrade.patch |
erjo@16708 | 37 patch -p1 < $stuff/squidGuard-1.4-dnsbl.patch |
erjo@16708 | 38 |
pascal@1253 | 39 ./configure --prefix=/usr --infodir=/usr/share/info \ |
erjo@2334 | 40 --sysconfdir=/etc --with-sg-config=/etc/squidGuard/squidGuard.conf \ |
pascal@1253 | 41 --with-sg-logdir=/var/lib/squidGuard/log \ |
pascal@1253 | 42 --with-sg-dbhome=/var/lib/squidGuard/db \ |
pascal@1253 | 43 --mandir=/usr/share/man $CONFIGURE_ARGS |
erjo@4661 | 44 |
pascal@1253 | 45 make |
pascal@15603 | 46 sed -e "s|^prefix =.*|prefix = $DESTDIR/usr|" \ |
pascal@15603 | 47 -e "s|^logdir =.*|logdir = $DESTDIR/var/lib/squidGuard/log|" \ |
pascal@15603 | 48 -e "s|^configfile =.*|configfile = $DESTDIR/etc/squidGuard/squidGuard.conf|" \ |
pascal@15603 | 49 -e "s|^dbhomedir =.*|dbhomedir = $DESTDIR/var/lib/squidGuard/db|" \ |
pascal@15603 | 50 -e "s|^SQUIDUSER =.*|SQUIDUSER = nobody|" \ |
pascal@1253 | 51 < Makefile > Makefile.slitaz-install |
pascal@15603 | 52 mkdir -p $DESTDIR/etc/squidGuard |
pascal@1253 | 53 make -f Makefile.slitaz-install install |
pascal@1253 | 54 } |
pascal@1253 | 55 |
pascal@1253 | 56 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@1253 | 57 genpkg_rules() |
pascal@1253 | 58 { |
erjo@11916 | 59 mkdir -p $fs/etc/squid/conf.d |
erjo@11916 | 60 |
erjo@11916 | 61 cp -a $install/* $fs/ |
erjo@11916 | 62 cp -pa $stuff/squidguard.conf $fs/etc/squid/conf.d |
erjo@11916 | 63 |
erjo@11916 | 64 # Cleanup. |
pascal@3990 | 65 rmdir $fs/usr/squidGuard |
erjo@11916 | 66 |
pascal@1253 | 67 } |
pascal@1253 | 68 |
pascal@1253 | 69 # Pre and post install commands for Tazpkg. |
pascal@1253 | 70 post_install() |
pascal@1253 | 71 { |
pascal@18730 | 72 chown -R nobody "$1"/var/lib/squidGuard/* |
erjo@11916 | 73 # Recharge squid config |
pascal@18732 | 74 [ "$1" ] || { [ -x $(which squid) ] && $(which squid) -k reconfigure 2> /dev/null; } |
pascal@1253 | 75 } |
erjo@2334 | 76 |
erjo@2334 | 77 post_remove() |
erjo@2334 | 78 { |
erjo@11916 | 79 # Recharge squid config |
pascal@18732 | 80 [ "$1" ] || { [ -x $(which squid) ] && $(which squid) -k reconfigure 2> /dev/null; } |
erjo@2334 | 81 } |
pascal@18170 | 82 |
pascal@18170 | 83 check_config() |
pascal@18170 | 84 { |
pascal@18174 | 85 su -c 'echo "http://www.example.com 192.168.0.6/- - GET" | \ |
pascal@18174 | 86 squidGuard -c /etc/squidGuard/squidGuard.conf -d' nobody |
pascal@18170 | 87 } |