Difference between revisions of "CUPS"

From CBLFS
Jump to navigationJump to search
m (Updated Download URL to cups.org where more recent stable source can be found)
 
(25 intermediate revisions by 12 users not shown)
Line 1: Line 1:
 
{| style="text-align: left; background-color: AliceBlue;"
 
{| style="text-align: left; background-color: AliceBlue;"
|-
+
|-valign="top"
 
!Download Source:
 
!Download Source:
| http://ftp.easysw.com/pub/cups/{{CUPS-Version}}/cups-{{CUPS-Version}}-source.tar.bz2
+
| http://www.cups.org/software/{{CUPS-Version}}/cups-{{CUPS-Version}}-source.tar.bz2
 
|}
 
|}
  
 
----
 
----
  
== Introduction to CUPS ==
+
{{Package-Introduction|The Common Unix Printing System (CUPS) is a print spooler and associated utilities. It is based on the "Internet Printing Protocol" and provides printing services to most PostScript and raster printers.|http://www.cups.org/}}
  
The Common Unix Printing System (CUPS) is a print spooler and associated utilities. It is based on the "Internet Printing Protocol" and provides printing services to most PostScript and raster printers.
+
{{Note|If you get "Unsuported format, application/postscript" errors, try installing Cups/Ghostscript/foomatic (if needed), then start cups.}}
  
 
== Dependencies ==
 
== Dependencies ==
Line 17: Line 17:
 
* [[libpng]]
 
* [[libpng]]
 
* [[LibTIFF]]
 
* [[LibTIFF]]
 +
 
=== Optional ===
 
=== Optional ===
 
* [[OpenSSL]] or [[GnuTLS]]
 
* [[OpenSSL]] or [[GnuTLS]]
* [[Linux-Pam]]
+
* [[D-BUS]]
 +
* [[Linux-PAM]]
 
* [[PHP]]
 
* [[PHP]]
 
* [[Python]]
 
* [[Python]]
Line 26: Line 28:
 
* [[libpaper]]
 
* [[libpaper]]
 
* [[Valgrind]]
 
* [[Valgrind]]
 +
* [[OpenLDAP]]
 +
* [[acl]]
  
== Non-Multilib ==
+
== Configuration Information ==
 +
 
 +
{{Note|CUPS does not use ''DESTDIR'', CUPS uses ''BUILDROOT'' instead.  Use ''BUILDROOT'' as you would normally use ''DESTDIR''.}}
 +
 
 +
== Creating the lp User ==
  
Create an lp user, as CUPS will install the lppasswd command SUID to this user. Use the following command as the root  user:
+
useradd -c "Print Service User" -d /dev/null -g lp -s /bin/false -u 10 lp
  
useradd -c "Print Service User" -d /dev/null -g lp -s /bin/false -u 9 lp
+
== Non-Multilib ==
  
If you utilize Linux-PAM, you need to modify some files so CUPS can find needed headers. Make the appropriate modifications using the following command:
+
If you utilize [[Linux-PAM]], you need to modify some files so CUPS can find needed headers. Make the appropriate modifications using the following command:
  
 
  sed -i -e "s@pam/pam@security/pam@g" \
 
  sed -i -e "s@pam/pam@security/pam@g" \
Line 45: Line 53:
 
Install the package
 
Install the package
  
  make install
+
  make install &&
 +
rm -rfv /etc/rc.d/*/*cups
 +
 
 +
CUPS' man pages are compressed. If you want to uncompress them, use the following commands:
 +
 
 +
gunzip -v /usr/share/man/man1/{cancel,cups{-config,test{dsc,ppd}},lp{,options,passwd,q,rm,r,stat}}.1.gz
 +
gunzip -v /usr/share/man/man5/{{classes,client,cups-snmp,cupsd,printers,subscriptions,mailto}.conf,mime.{convs,types}}.5.gz
 +
gunzip -v /usr/share/man/man7/{backend,filter}.7
 +
gunzip -v /usr/share/man/man8/{accept,cups{d,addsmb,enable,-{deviced,driverd,lpd,polld,}},lp{admin,info,move,c}}.8.gz
 +
 
 +
rm -v /usr/share/man/man8/{reject,cupsdisable}.8.gz
  
== Multilib ==
+
ln -sv accept.8 /usr/share/man/man8/reject.8
 +
ln -sv cupsenable.8 /usr/share/man/man8/cupsdisable.8
  
Create an lp user, as CUPS will install the lppasswd command SUID to this user. Use the following command as the root user:
+
If wanting to print to a Windows printer, pass this line to add smb support
 +
 +
  ln -s `which smbspool` /usr/lib/cups/backend/smb
  
useradd -c "Print Service User" -d /dev/null -g lp -s /bin/false -u 9 lp
+
== Multilib ==
  
 
=== 32Bit ===
 
=== 32Bit ===
Line 69: Line 90:
  
 
  make install &&
 
  make install &&
 +
rm -rfv /etc/rc.d/*/*cups &&
 
  mv -v /usr/bin/cups-config{,-32}
 
  mv -v /usr/bin/cups-config{,-32}
 +
 +
If wanting to print to a Windows printer, pass this line to add smb support (Untested)
 +
 +
ln -s `which smbspool` /usr/lib/cups/backend/smb
  
 
=== N32 ===
 
=== N32 ===
Line 80: Line 106:
 
Compile the package:
 
Compile the package:
  
 +
sed -i '/CUPS_SERVERBIN/s:/lib:&32:' configure &&
 
  CC="gcc ${BUILDN32}" CXX="g++ ${BUILDN32}" USE_ARCH=n32 ./configure \
 
  CC="gcc ${BUILDN32}" CXX="g++ ${BUILDN32}" USE_ARCH=n32 ./configure \
 
     --libdir=/usr/lib32 &&
 
     --libdir=/usr/lib32 &&
Line 87: Line 114:
  
 
  make install &&
 
  make install &&
 +
rm -rfv /etc/rc.d/*/*cups &&
 
  mv -v /usr/bin/cups-config{,-n32}
 
  mv -v /usr/bin/cups-config{,-n32}
 +
 +
If wanting to print to a Windows printer, pass this line to add smb support
 +
(Untested)
 +
 +
ln -s `which smbspool` /usr/lib32/cups/backend/smb
  
 
=== 64Bit ===
 
=== 64Bit ===
Line 98: Line 131:
 
Compile the package:
 
Compile the package:
  
 +
sed -i '/CUPS_SERVERBIN/s:/lib:&64:' configure &&
 
  CC="gcc ${BUILD64}" CXX="g++ ${BUILD64}" USE_ARCH=64 ./configure \
 
  CC="gcc ${BUILD64}" CXX="g++ ${BUILD64}" USE_ARCH=64 ./configure \
 
     --libdir=/usr/lib64 &&
 
     --libdir=/usr/lib64 &&
Line 105: Line 139:
  
 
  make install &&
 
  make install &&
 +
rm -rfv /etc/rc.d/*/*cups &&
 
  mv -v /usr/bin/cups-config{,-64} &&
 
  mv -v /usr/bin/cups-config{,-64} &&
 
  ln -sfv multiarch_wrapper /usr/bin/cups-config
 
  ln -sfv multiarch_wrapper /usr/bin/cups-config
 +
 +
CUPS' man pages are compressed. If you want to uncompress them, use the following commands:
 +
 +
gunzip -v /usr/share/man/man1/{cancel,cups{-config,test{dsc,ppd}},lp{,options,passwd,q,rm,r,stat}}.1.gz
 +
gunzip -v /usr/share/man/man5/{{classes,client,cups-snmp,cupsd,printers,subscriptions,mailto}.conf,mime.{convs,types}}.5.gz
 +
gunzip -v /usr/share/man/man7/{backend,filter}.7
 +
gunzip -v /usr/share/man/man8/{accept,cups{d,addsmb,enable,-{deviced,driverd,lpd,polld,}},lp{admin,info,move,c}}.8.gz
 +
 +
  rm -v /usr/share/man/man8/{reject,cupsdisable}.8.gz
 +
 +
  ln -sv accept.8 /usr/share/man/man8/reject.8
 +
  ln -sv cupsenable.8 /usr/share/man/man8/cupsdisable.8
 +
 +
If wanting to print to a Windows printer, pass this line to add smb support
 +
(Untested)
 +
 +
ln -s `which smbspool` /usr/lib64/cups/backend/smb
  
 
== Configuring ==
 
== Configuring ==
Line 112: Line 164:
 
=== BootScript ===
 
=== BootScript ===
  
Install the init script included in the [[blfs-bootscripts]] package.
+
Install the init script included in the [[bootscripts]] package.
  
 
  make install-cups
 
  make install-cups
 +
 +
[[Category:Printing]]

Latest revision as of 10:19, 5 October 2013

Download Source: http://www.cups.org/software/1.6.4/cups-1.6.4-source.tar.bz2

Introduction to CUPS

The Common Unix Printing System (CUPS) is a print spooler and associated utilities. It is based on the "Internet Printing Protocol" and provides printing services to most PostScript and raster printers.

Project Homepage: http://www.cups.org/

Caution.png

Note

If you get "Unsuported format, application/postscript" errors, try installing Cups/Ghostscript/foomatic (if needed), then start cups.

Dependencies

Required

Optional

Configuration Information

Caution.png

Note

CUPS does not use DESTDIR, CUPS uses BUILDROOT instead. Use BUILDROOT as you would normally use DESTDIR.

Creating the lp User

useradd -c "Print Service User" -d /dev/null -g lp -s /bin/false -u 10 lp

Non-Multilib

If you utilize Linux-PAM, you need to modify some files so CUPS can find needed headers. Make the appropriate modifications using the following command:

sed -i -e "s@pam/pam@security/pam@g" \
{config-scripts/cups-pam.m4,scheduler/auth.c,configure}

Compile the package:

./configure &&
make

Install the package

make install &&
rm -rfv /etc/rc.d/*/*cups

CUPS' man pages are compressed. If you want to uncompress them, use the following commands:

gunzip -v /usr/share/man/man1/{cancel,cups{-config,test{dsc,ppd}},lp{,options,passwd,q,rm,r,stat}}.1.gz
gunzip -v /usr/share/man/man5/{{classes,client,cups-snmp,cupsd,printers,subscriptions,mailto}.conf,mime.{convs,types}}.5.gz
gunzip -v /usr/share/man/man7/{backend,filter}.7
gunzip -v /usr/share/man/man8/{accept,cups{d,addsmb,enable,-{deviced,driverd,lpd,polld,}},lp{admin,info,move,c}}.8.gz
rm -v /usr/share/man/man8/{reject,cupsdisable}.8.gz
ln -sv accept.8 /usr/share/man/man8/reject.8
ln -sv cupsenable.8 /usr/share/man/man8/cupsdisable.8

If wanting to print to a Windows printer, pass this line to add smb support

ln -s `which smbspool` /usr/lib/cups/backend/smb

Multilib

32Bit

If you utilize Linux-PAM, you need to modify some files so CUPS can find needed headers. Make the appropriate modifications using the following command:

sed -i -e "s@pam/pam@security/pam@g" \
{config-scripts/cups-pam.m4,scheduler/auth.c,configure}

Compile the package:

CC="gcc ${BUILD32}" CXX="g++ ${BUILD32}" USE_ARCH=32 ./configure \
    --libdir=/usr/lib &&
make

Install the package

make install &&
rm -rfv /etc/rc.d/*/*cups &&
mv -v /usr/bin/cups-config{,-32}

If wanting to print to a Windows printer, pass this line to add smb support (Untested)

ln -s `which smbspool` /usr/lib/cups/backend/smb

N32

If you utilize Linux-PAM, you need to modify some files so CUPS can find needed headers. Make the appropriate modifications using the following command:

sed -i -e "s@pam/pam@security/pam@g" \
{config-scripts/cups-pam.m4,scheduler/auth.c,configure}

Compile the package:

sed -i '/CUPS_SERVERBIN/s:/lib:&32:' configure &&
CC="gcc ${BUILDN32}" CXX="g++ ${BUILDN32}" USE_ARCH=n32 ./configure \
    --libdir=/usr/lib32 &&
make

Install the package

make install &&
rm -rfv /etc/rc.d/*/*cups &&
mv -v /usr/bin/cups-config{,-n32}

If wanting to print to a Windows printer, pass this line to add smb support (Untested)

ln -s `which smbspool` /usr/lib32/cups/backend/smb

64Bit

If you utilize Linux-PAM, you need to modify some files so CUPS can find needed headers. Make the appropriate modifications using the following command:

sed -i -e "s@pam/pam@security/pam@g" \
{config-scripts/cups-pam.m4,scheduler/auth.c,configure}

Compile the package:

sed -i '/CUPS_SERVERBIN/s:/lib:&64:' configure &&
CC="gcc ${BUILD64}" CXX="g++ ${BUILD64}" USE_ARCH=64 ./configure \
    --libdir=/usr/lib64 &&
make

Install the package

make install &&
rm -rfv /etc/rc.d/*/*cups &&
mv -v /usr/bin/cups-config{,-64} &&
ln -sfv multiarch_wrapper /usr/bin/cups-config

CUPS' man pages are compressed. If you want to uncompress them, use the following commands:

gunzip -v /usr/share/man/man1/{cancel,cups{-config,test{dsc,ppd}},lp{,options,passwd,q,rm,r,stat}}.1.gz
gunzip -v /usr/share/man/man5/{{classes,client,cups-snmp,cupsd,printers,subscriptions,mailto}.conf,mime.{convs,types}}.5.gz
gunzip -v /usr/share/man/man7/{backend,filter}.7
gunzip -v /usr/share/man/man8/{accept,cups{d,addsmb,enable,-{deviced,driverd,lpd,polld,}},lp{admin,info,move,c}}.8.gz
 rm -v /usr/share/man/man8/{reject,cupsdisable}.8.gz
 ln -sv accept.8 /usr/share/man/man8/reject.8
 ln -sv cupsenable.8 /usr/share/man/man8/cupsdisable.8

If wanting to print to a Windows printer, pass this line to add smb support (Untested)

ln -s `which smbspool` /usr/lib64/cups/backend/smb

Configuring

BootScript

Install the init script included in the bootscripts package.

make install-cups
Retrieved from "?title=CUPS&oldid=21565"