wok-next rev 20269
remove cups-pam
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Wed Nov 08 08:49:56 2017 +0100 (2017-11-08) |
parents | 647c7e1c419a |
children | 598d89f86dbf |
files | cups-pam/receipt cups-pam/stuff/etc/pam.d/cups cups-pam/stuff/install-sh.u cups/receipt |
line diff
1.1 --- a/cups-pam/receipt Wed Nov 08 08:21:56 2017 +0100 1.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 1.3 @@ -1,98 +0,0 @@ 1.4 -# SliTaz package receipt. 1.5 - 1.6 -PACKAGE="cups-pam" 1.7 -VERSION="2.0.2" 1.8 -CATEGORY="system-tools" 1.9 -SHORT_DESC="Common UNIX Printing System with PAM support." 1.10 -MAINTAINER="pascal.bellard@slitaz.org" 1.11 -LICENSE="GPL2 LGPL2" 1.12 -SOURCE="cups" 1.13 -TARBALL="$SOURCE-$VERSION-source.tar.bz2" 1.14 -WEB_SITE="http://www.cups.org/" 1.15 -WGET_URL="http://www.cups.org/software/$VERSION/$TARBALL" 1.16 -PROVIDE="cups:pam" 1.17 - 1.18 -DEPENDS="libssl cups-doc dbus pam libcomerr libkrb5 cups-filters libcups" 1.19 -BUILD_DEPENDS="openssl-dev gnutls-dev dbus-dev jpeg-dev libpng-dev tiff-dev \ 1.20 -pam libcomerr-dev pam-dev acl-dev libgcrypt-dev" 1.21 - 1.22 -# Rules to configure and make the package. 1.23 -compile_rules() 1.24 -{ 1.25 - patch -Np1 -i ${WOK}/cups/stuff/install-sh.u 1.26 - ./configure \ 1.27 - --prefix=/usr \ 1.28 - --sysconfdir=/etc \ 1.29 - --localstatedir=/var \ 1.30 - --mandir=/usr/share/man \ 1.31 - --enable-static \ 1.32 - --enable-pam \ 1.33 - --disable-ldap \ 1.34 - --with-cups-user=nobody \ 1.35 - --with-cups-group=nogroup \ 1.36 - --with-languages="de es fr pt_BR ru" \ 1.37 - $CONFIGURE_ARGS && 1.38 - make && 1.39 - make BUILDROOT=$DESTDIR install 1.40 - cp -f $WOK/cups/stuff/cups.desktop $install/usr/share/applications/cups.desktop 1.41 -} 1.42 - 1.43 -# Rules to gen a SliTaz package suitable for Tazpkg. 1.44 -genpkg_rules() 1.45 -{ 1.46 - mkdir -p $fs/etc $fs/usr/lib $fs/usr/share 1.47 - 1.48 - cp -a $install/etc/cups $fs/etc 1.49 - cp -a $install/etc/dbus* $fs/etc 1.50 - cp -a $install/usr/bin $fs/usr 1.51 - cp -a $install/usr/sbin $fs/usr 1.52 - cp -a $install/usr/lib/*.so* $fs/usr/lib 1.53 - cp -a $install/usr/lib/cups $fs/usr/lib 1.54 - cp -a $install/usr/share/cups $fs/usr/share 1.55 - cp -a $install/usr/share/icons $fs/usr/share 1.56 - cp -a $install/var $fs 1.57 - 1.58 - # Remove files provided by cups-filters 1.59 - rm -f $fs/usr/share/cups/banners/* 1.60 - rm -f $fs/usr/share/cups/data/testprint 1.61 - 1.62 - # Remove files provided by libcups 1.63 - rm -f $fs/usr/lib/libcups.so* 1.64 - 1.65 - # PAM conf 1.66 - cp -a $stuff/etc $fs 1.67 - 1.68 - # Daemon script 1.69 - cp -a $WOK/cups/stuff/etc $fs 1.70 - 1.71 - # TazPanel link 1.72 - cp -a $WOK/cups/stuff/var $fs 1.73 - 1.74 -} 1.75 - 1.76 -post_install() 1.77 -{ 1.78 - # Start CUPS daemon and edit daemons.conf 1.79 - if [ -z "$1" -a ! -s /aufs-umount.sh ]; then 1.80 - /etc/init.d/cupsd start || continue 1.81 - fi 1.82 - if ! grep -q ^CUPSD_OPTIONS "$1/etc/daemons.conf"; then 1.83 - cat >> "$1/etc/daemons.conf" <<EOT 1.84 -# CUPS printing daemon options. 1.85 -CUPSD_OPTIONS="" 1.86 - 1.87 -EOT 1.88 - fi 1.89 -} 1.90 - 1.91 -pre_remove() 1.92 -{ 1.93 - # Stop CUPS daemon before rm. 1.94 - [ -z "$1" -a -x /etc/init.d/cupsd ] && /etc/init.d/cupsd stop 1.95 - : 1.96 -} 1.97 - 1.98 -post_remove() 1.99 -{ 1.100 - ln -s /bin/busybox "$1/usr/bin/lpr" 1.101 -}
2.1 --- a/cups-pam/stuff/etc/pam.d/cups Wed Nov 08 08:21:56 2017 +0100 2.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 2.3 @@ -1,5 +0,0 @@ 2.4 -#%PAM-1.0 2.5 -# specify the PAM cups behaviour 2.6 - 2.7 -auth required pam_unix.so nullok shadow 2.8 -account required pam_unix.so
3.1 --- a/cups-pam/stuff/install-sh.u Wed Nov 08 08:21:56 2017 +0100 3.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 3.3 @@ -1,11 +0,0 @@ 3.4 ---- cups-1.5.3-ori/install-sh 3.5 -+++ cups-1.5.3/install-sh 3.6 -@@ -61,7 +61,7 @@ 3.7 - dst="" 3.8 - dir_arg="" 3.9 - 3.10 --function gzipcp { 3.11 -+gzipcp() { 3.12 - # gzipcp from to 3.13 - $gzipprog -9 <"$1" >"$2" 3.14 - }
4.1 --- a/cups/receipt Wed Nov 08 08:21:56 2017 +0100 4.2 +++ b/cups/receipt Wed Nov 08 08:49:56 2017 +0100 4.3 @@ -12,8 +12,8 @@ 4.4 WGET_URL="https://github.com/apple/cups/releases/download/v$VERSION/$TARBALL" 4.5 4.6 BUILD_DEPENDS="automake libusb-dev zlib-dev acl-dev dbus-dev gnutls-dev perl \ 4.7 -python" 4.8 -SPLIT="libcups cups cups-doc cups-dev" 4.9 +python pam pam-dev" 4.10 +SPLIT="libcups cups cups-pam cups-doc cups-dev" 4.11 4.12 # Rules to configure and make the package. 4.13 compile_rules() 4.14 @@ -29,11 +29,14 @@ 4.15 aclocal -I config-scripts && 4.16 autoconf -I config-scripts && 4.17 4.18 + cp -a $src $src-pam 4.19 + 4.20 CC=gcc \ 4.21 ./configure \ 4.22 --sysconfdir=/etc \ 4.23 --libdir=/usr/lib \ 4.24 --localstatedir=/var \ 4.25 + --disable-pam \ 4.26 --disable-systemd \ 4.27 --with-rcdir=/tmp/cupsinit \ 4.28 --with-system-groups=lpadmin \ 4.29 @@ -42,40 +45,57 @@ 4.30 make && 4.31 make BUILDROOT=$install install && 4.32 4.33 - rm -rf $install/tmp && 4.34 + cd $src-pam && 4.35 + CC=gcc \ 4.36 + ./configure \ 4.37 + --sysconfdir=/etc \ 4.38 + --libdir=/usr/lib \ 4.39 + --localstatedir=/var \ 4.40 + --enable-pam \ 4.41 + --disable-systemd \ 4.42 + --with-rcdir=/tmp/cupsinit \ 4.43 + --with-system-groups=lpadmin \ 4.44 + --with-docdir=/usr/share/doc/cups-$VERSION \ 4.45 + $CONFIGURE_ARGS && 4.46 + make && 4.47 + make BUILDROOT=$install-pam install && 4.48 4.49 - ln -svnf ../doc/cups-$VERSION $install/usr/share/cups/doc-$VERSION 4.50 + for inst in $install $install-pam ; done 4.51 + rm -rf $inst/tmp && 4.52 4.53 - echo "ServerName /var/run/cups/cups.sock" > $install/etc/cups/client.conf && 4.54 + ln -svnf ../doc/cups-$VERSION $inst/usr/share/cups/doc-$VERSION 4.55 4.56 - sed -i 's|hostname:9100|&\n\n parallel:/dev/usb/lp0|' \ 4.57 - $install/usr/share/cups/templates/choose-uri.tmpl && 4.58 - sed -i 's|htmlview|browser|' $install/usr/share/applications/cups.desktop && 4.59 - sed -i 's|^#Group .*|Group lp|' $install/etc/cups/cups-files.conf && 4.60 + echo "ServerName /var/run/cups/cups.sock" > $inst/etc/cups/client.conf && 4.61 4.62 - # Daemon script 4.63 - cp -a $stuff/etc $install && 4.64 - chown -R root:root $install/etc && 4.65 - # TazPanel link 4.66 - cp -a $stuff/var $install && 4.67 - chown -R root:root $install/var && 4.68 + sed -i 's|hostname:9100|&\n\n parallel:/dev/usb/lp0|' \ 4.69 + $inst/usr/share/cups/templates/choose-uri.tmpl && 4.70 + sed -i 's|htmlview|browser|' $inst/usr/share/applications/cups.desktop && 4.71 + sed -i 's|^#Group .*|Group lp|' $inst/etc/cups/cups-files.conf && 4.72 4.73 - # Install ssl directory where to store the certs, solves some samba issues 4.74 - install -dm700 -g lp $install/etc/cups/ssl && 4.75 + # Daemon script 4.76 + cp -a $stuff/etc $inst && 4.77 + chown -R root:root $inst/etc && 4.78 + # TazPanel link 4.79 + cp -a $stuff/var $inst && 4.80 + chown -R root:root $inst/var && 4.81 4.82 - # Install some more configuration files that will get filled by cupsd 4.83 - touch $install/etc/cups/printers.conf && 4.84 - touch $install/etc/cups/classes.conf && 4.85 - touch $install/etc/cups/subscriptions.conf && 4.86 - chgrp -R lp $install/etc/cups && 4.87 + # Install ssl directory where to store the certs, solves some samba issues 4.88 + install -dm700 -g lp $inst/etc/cups/ssl && 4.89 4.90 - # Comment out unnecessary PageLogFormat entry 4.91 - sed -i -e 's:PageLogFormat:#PageLogFormat:' $install/etc/cups/cupsd.conf* && 4.92 + # Install some more configuration files that will get filled by cupsd 4.93 + touch $inst/etc/cups/printers.conf && 4.94 + touch $inst/etc/cups/classes.conf && 4.95 + touch $inst/etc/cups/subscriptions.conf && 4.96 + chgrp -R lp $inst/etc/cups && 4.97 4.98 - # Change files permissions to be accessible via web interface - will be 4.99 - # fixed in post_install 4.100 - chmod -c o+r $install/etc/cups/* $install/usr/sbin/cupsd \ 4.101 - $install/usr/lib/cups/backend/ipp $install/usr/lib/cups/backend/lpd 4.102 + # Comment out unnecessary PageLogFormat entry 4.103 + sed -i -e 's:PageLogFormat:#PageLogFormat:' $inst/etc/cups/cupsd.conf* && 4.104 + 4.105 + # Change files permissions to be accessible via web interface - will be 4.106 + # fixed in post_install 4.107 + chmod -c o+r $inst/etc/cups/* $inst/usr/sbin/cupsd \ 4.108 + $inst/usr/lib/cups/backend/ipp $inst/usr/lib/cups/backend/lpd 4.109 + done 4.110 } 4.111 4.112 # Rules to gen a SliTaz package suitable for Tazpkg. 4.113 @@ -95,6 +115,15 @@ 4.114 CONFIG_FILES="/etc/cups/" 4.115 TAGS="printer printing" 4.116 ;; 4.117 + cups-pam) 4.118 + install=$install-pam 4.119 + copy @std var/ # copy empty dirs in var/ 4.120 + remove_already_packed 4.121 + DEPENDS="acl dbus libcups libgnutls libusb zlib pam" 4.122 + PROVIDE="cups:pam" 4.123 + CONFIG_FILES="/etc/cups/" 4.124 + TAGS="printer printing" 4.125 + ;; 4.126 cups-doc) 4.127 # We need the doc for CSS, images and help in the web interface. 4.128 copy doc/ 4.129 @@ -139,3 +168,11 @@ 4.130 [ -z "$1" -a -x /etc/init.d/cupsd ] && /etc/init.d/cupsd stop 4.131 : 4.132 } 4.133 + 4.134 +post_install_cups_pam() { 4.135 + post_install_cups "$1" 4.136 +} 4.137 + 4.138 +pre_remove_cups_pam() { 4.139 + pre_remove_cups "$1" 4.140 +}