diff -u cups-1.3.8/debian/cups.postinst cups-1.3.8/debian/cups.postinst --- cups-1.3.8/debian/cups.postinst +++ cups-1.3.8/debian/cups.postinst @@ -154,6 +154,11 @@ # dh_installdeb will replace this with shell code automatically # generated by other debhelper scripts. +# ufw integration +if [ -x /usr/sbin/ufw ]; then + ufw app update --add-new 'Cups' || true +fi + #DEBHELPER# db_stop diff -u cups-1.3.8/debian/cups.postrm cups-1.3.8/debian/cups.postrm --- cups-1.3.8/debian/cups.postrm +++ cups-1.3.8/debian/cups.postrm @@ -35,6 +35,9 @@ rm -f /etc/cups/printers.conf* /etc/cups/classes.conf.* \ /var/lib/cups/ppds.dat /etc/cups/raw.convs /etc/cups/raw.types rmdir /etc/cups 2>/dev/null || true + + # ufw integration + rm -f /etc/ufw/applications.d/cups >/dev/null 2>&1 || true ;; remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) ;; diff -u cups-1.3.8/debian/rules cups-1.3.8/debian/rules --- cups-1.3.8/debian/rules +++ cups-1.3.8/debian/rules @@ -82,6 +82,9 @@ install -D -m 644 debian/local/apparmor-profile debian/$(cdbs_curpkg)/etc/apparmor.d/usr.sbin.cupsd; \ fi + # ufw integration + install -m644 debian/cups.ufw.profile $(DEB_DESTDIR)/../cups/etc/ufw/applications.d/cups + # Install documentation of the PDF CUPS filters install -m 644 debian/local/filters/pdf-filters/README $(DEB_DESTDIR)/../cups/usr/share/doc/cups/README.pdf-filters install -m 644 debian/local/filters/pdf-filters/filter/test.sh $(DEB_DESTDIR)/../cups/usr/share/doc/cups/examples/texttopdf-text.sh diff -u cups-1.3.8/debian/control cups-1.3.8/debian/control --- cups-1.3.8/debian/control +++ cups-1.3.8/debian/control @@ -67,8 +67,7 @@ ssl-cert (>= 1.0.11), adduser Recommends: cups-client, smbclient (>= 3.0.9), foomatic-filters, avahi-utils, ttf-freefont Suggests: cups-bsd, cups-driver-gutenprint, foomatic-db-engine, foomatic-db, - hplip, xpdf-korean | xpdf-japanese | xpdf-chinese-traditional | xpdf-chinese-simplified, - cups-pdf + hplip, xpdf-korean | xpdf-japanese | xpdf-chinese-traditional | xpdf-chinese-simplified, cups-pdf, ufw Replaces: cupsys-bsd (<< 1.3.7-5), cupsys (<< 1.3.7-6) Conflicts: cupsys-bsd (<< 1.3.7-5), cupsys (<< 1.3.7-6) Provides: cupsys diff -u cups-1.3.8/debian/changelog cups-1.3.8/debian/changelog --- cups-1.3.8/debian/changelog +++ cups-1.3.8/debian/changelog @@ -1,3 +1,16 @@ +cups (1.3.8-5ubuntu4) intrepid; urgency=low + + * add ufw integration (see + https://wiki.ubuntu.com/UbuntuFirewall#Integrating%20UFW%20with%20Packages) + (LP: #261903) + - debian/control: suggest ufw for cups + - add cups.ufw.profile with one profile and install it to + /etc/ufw/applications.d/cups + - cups.postinst: add Cups rules as default + - cups.postrm: remove the profile on --purge + + -- Didier Roche Wed, 27 Aug 2008 18:48:38 +0200 + cups (1.3.8-5ubuntu3) intrepid; urgency=low * debian/{control,rules}: enable PIE hardening diff -u cups-1.3.8/debian/cups.dirs cups-1.3.8/debian/cups.dirs --- cups-1.3.8/debian/cups.dirs +++ cups-1.3.8/debian/cups.dirs @@ -12,0 +13 @@ +etc/ufw/applications.d only in patch2: unchanged: --- cups-1.3.8.orig/debian/cups.ufw.profile +++ cups-1.3.8/debian/cups.ufw.profile @@ -0,0 +1,4 @@ +[Cups] +title=Common UNIX Printing System(tm) +description=CUPS(tm) is a printing system and general replacement for lpd and the like. +ports=631/tcp