Index: head/print/cups-filters/Makefile =================================================================== --- head/print/cups-filters/Makefile (revision 408945) +++ head/print/cups-filters/Makefile (revision 408946) @@ -1,71 +1,69 @@ # $FreeBSD$ PORTNAME= cups-filters PORTVERSION= 1.8.2 CATEGORIES= print MASTER_SITES= http://www.openprinting.org/download/cups-filters/ MAINTAINER= cyberbotx@cyberbotx.com COMMENT= Backends, filters and other software (was part of the core CUPS) BUILD_DEPENDS= pdftops:${PORTSDIR}/graphics/poppler-utils RUN_DEPENDS= pdftops:${PORTSDIR}/graphics/poppler-utils LIB_DEPENDS= libtiff.so:${PORTSDIR}/graphics/tiff \ libpng.so:${PORTSDIR}/graphics/png \ libijs.so:${PORTSDIR}/print/libijs \ liblcms2.so:${PORTSDIR}/graphics/lcms2 \ libqpdf.so:${PORTSDIR}/print/qpdf \ libdbus-1.so:${PORTSDIR}/devel/dbus \ libcups.so:${PORTSDIR}/print/cups-client \ libcupsimage.so:${PORTSDIR}/print/cups-image \ libfreetype.so:${PORTSDIR}/print/freetype2 \ libfontconfig.so:${PORTSDIR}/x11-fonts/fontconfig \ libpoppler.so:${PORTSDIR}/graphics/poppler -CONFLICTS= foomatic-filters-4* - USES= compiler:c++11-lib cpe ghostscript gmake jpeg libtool pathfix \ pkgconfig shebangfix tar:xz CPE_VENDOR= linuxfoundation SHEBANG_FILES= filter/braille/drivers/generic/brftoembosser.in \ filter/braille/drivers/index/imageubrltoindexv3.in \ filter/braille/drivers/index/imageubrltoindexv4.in \ filter/braille/drivers/index/textbrftoindexv3.in \ filter/braille/filters/imagetobrf.in \ filter/braille/filters/texttobrf.in filter/textonly USE_GNOME= glib20 USE_RC_SUBR= cups_browsed GNU_CONFIGURE= yes CUPS_SOCKET?= /var/run/cups.sock CONFIGURE_ARGS= --with-cups-domainsocket=${CUPS_SOCKET} CONFIGURE_ENV= ZLIB_CFLAGS="-I/usr/include" ZLIB_LIBS="-lz" \ LIBQPDF_CFLAGS="-I${LOCALBASE}/include" LIBQPDF_LIBS="-lqpdf" INSTALL_TARGET= install-strip CPPFLAGS+= -I${LOCALBASE}/include LDFLAGS+= -L${LOCALBASE}/lib USE_LDCONFIG= yes OPTIONS_DEFINE= AVAHI AVAHI_CONFIGURE_ENABLE= avahi AVAHI_LIB_DEPENDS= libavahi-client.so:${PORTSDIR}/net/avahi-app post-patch: @${REINPLACE_CMD} 's:-std=c++0x:-std=c++11:' ${WRKSRC}/Makefile.in @${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' ${WRKSRC}/filter/pdftops.c post-configure: @${REINPLACE_CMD} \ -e 's|\(BANNERTOPDF_DATADIR = \).*\(/share/cups/data\)|\1${PREFIX}\2|' \ -e 's|\(CUPS_DATADIR = \).*\(/share/cups\)|\1${PREFIX}\2|' \ -e 's|\(CUPS_SERVERBIN = \).*\(/libexec/cups\)|\1${PREFIX}\2|' \ -e 's|\(CUPS_SERVERROOT = \).*\(/etc/cups\)|\1${PREFIX}\2|' \ ${WRKSRC}/Makefile post-install: @${RM} -rf ${STAGEDIR}${PREFIX}/libexec/cups/filter/foomatic-rip \ ${STAGEDIR}${PREFIX}/bin/foomatic-rip \ ${STAGEDIR}${PREFIX}/man/man1/foomatic-rip.1 .include Index: head/print/foomatic-filters/Makefile =================================================================== --- head/print/foomatic-filters/Makefile (revision 408945) +++ head/print/foomatic-filters/Makefile (revision 408946) @@ -1,82 +1,82 @@ # Created by: Michael Nottebrock # $FreeBSD$ PORTNAME= foomatic-filters PORTVERSION= 4.0.17 -PORTREVISION= 4 +PORTREVISION= 5 CATEGORIES= print MASTER_SITES= http://www.openprinting.org/download/foomatic/ MAINTAINER= ports@FreeBSD.org COMMENT= Foomatic wrapper scripts LICENSE= GPLv2+ LICENSE_FILE= ${WRKSRC}/COPYING LIB_DEPENDS= libdbus-1.so:${PORTSDIR}/devel/dbus -CONFLICTS= cups-filters-1.8* - USES= autoreconf ghostscript perl5 pkgconfig GNU_CONFIGURE= yes CONFIGURE_ENV= ac_cv_path_A2PS=${LOCALBASE}/bin/a2ps \ ac_cv_path_CUPS=${LOCALBASE}/libexec/cups \ ac_cv_path_CUPS_FILTERS=${LOCALBASE}/libexec/cups/filter \ ac_cv_path_CUPS_BACKENDS=${LOCALBASE}/libexec/cups/backend \ ac_cv_path_ENSCRIPT=${LOCALBASE}/bin/enscript \ ac_cv_path_MPAGE=${LOCALBASE}/bin/mpage \ ac_cv_path_PERL=${LOCALBASE}/bin/perl \ ac_cv_path_PPR=${LOCALBASE}/lib/ppr \ ac_cv_path_PPR_INTERFACES=${LOCALBASE}/lib/ppr/interfaces \ ac_cv_path_PPR_LIB=${LOCALBASE}/lib/ppr/lib \ ac_cv_path_TEXTTOPS=${LOCALBASE}/libexec/cups/filter/texttops CPPFLAGS+= -I${LOCALBASE}/include LDFLAGS+= -L${LOCALBASE}/lib OPTIONS_DEFINE= A2PS CUPS_IMAGE MPAGE OPTIONS_RADIO= ENSCRIPT OPTIONS_RADIO_ENSCRIPT= ENSCRIPT_A4 ENSCRIPT_LETTER ENSCRIPT_LETTERDJ OPTIONS_DEFAULT= CUPS_IMAGE A2PS ENSCRIPT_A4 MPAGE CUPS_IMAGE_DESC= Install cups image utilities A2PS_DESC= Install a2ps convertor ENSCRIPT_A4_DESC= Install enscript convertor (A4) ENSCRIPT_LETTER_DESC= Install enscript convertor (letter) ENSCRIPT_LETTERDJ_DESC= Install enscript convertor (letterdj) MPAGE_DESC= Print multiple pages per sheet of paper .include .if ${PORT_OPTIONS:MCUPS_IMAGE} RUN_DEPENDS+= ${LOCALBASE}/lib/libcupsimage.so:${PORTSDIR}/print/cups-image .endif .if ${PORT_OPTIONS:MA2PS} RUN_DEPENDS+= a2ps:${PORTSDIR}/print/a2ps .endif .if ${PORT_OPTIONS:MENSCRIPT_A4} RUN_DEPENDS+= enscript:${PORTSDIR}/print/enscript-a4 .endif .if ${PORT_OPTIONS:MENSCRIPT_LETTER} RUN_DEPENDS+= enscript:${PORTSDIR}/print/enscript-letter .endif .if ${PORT_OPTIONS:MENSCRIPT_LETTERDJ} RUN_DEPENDS+= enscript:${PORTSDIR}/print/enscript-letterdj .endif .if ${PORT_OPTIONS:MMPAGE} RUN_DEPENDS+= mpage:${PORTSDIR}/print/mpage .endif post-patch: @${REINPLACE_CMD} -e 's|/bin/bash|${SH}|g' ${WRKSRC}/foomaticrip.c @${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' ${WRKSRC}/foomaticrip.c @${REINPLACE_CMD} -e '/filter.conf/ s|if|#if|g' ${WRKSRC}/Makefile.in + @${MV} ${WRKSRC}/beh.in ${WRKSRC}/foomatic-beh.in + @${REINPLACE_CMD} -e 's|beh|foomatic-beh|' ${WRKSRC}/foomatic-beh.in post-install: @${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/foomatic-rip .include Index: head/print/foomatic-filters/files/patch-Makefile.am =================================================================== --- head/print/foomatic-filters/files/patch-Makefile.am (nonexistent) +++ head/print/foomatic-filters/files/patch-Makefile.am (revision 408946) @@ -0,0 +1,31 @@ +Index: files/patch-Makefile.am +=================================================================== +--- Makefile.am.orig 2012-07-02 14:50:46 UTC ++++ Makefile.am +@@ -76,7 +76,7 @@ install-cups: install-bin + ${SRC}/mkinstalldirs $(DESTDIR)$(CUPS_FILTERS) + ${SRC}/mkinstalldirs $(DESTDIR)$(CUPS_BACKENDS) + ln -sf $(BINDIR)/foomatic-rip $(DESTDIR)$(CUPS_FILTERS) +- ${INSTALL} -m 755 beh $(DESTDIR)$(CUPS_BACKENDS) ++ ${INSTALL} -m 755 foomatic-beh $(DESTDIR)$(CUPS_BACKENDS) + + install-ppr: install-bin + ${SRC}/mkinstalldirs $(DESTDIR)$(PPR_INTERFACES) +@@ -102,7 +102,7 @@ install-man: + + # Clean up the source directory + clean: remove-trash +- rm -f *.o foomatic-rip foomatic-rip.1 beh ++ rm -f *.o foomatic-rip foomatic-rip.1 foomatic-beh + rm -f .testing-stamp stamp-h1 + rm -f test/*.out + +@@ -140,7 +140,7 @@ uninstall-etc: + + uninstall-cups: + rm -f $(DESTDIR)$(CUPS_FILTERS)/foomatic-rip +- rm -f $(DESTDIR)$(CUPS_BACKENDS)/beh ++ rm -f $(DESTDIR)$(CUPS_BACKENDS)/foomatic-beh + rmdir $(DESTDIR)$(CUPS_FILTERS) || : + rmdir $(DESTDIR)$(CUPS_BACKENDS) || : + rmdir $(DESTDIR)$(CUPS) || : Property changes on: head/print/foomatic-filters/files/patch-Makefile.am ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/print/foomatic-filters/files/patch-configure.ac =================================================================== --- head/print/foomatic-filters/files/patch-configure.ac (nonexistent) +++ head/print/foomatic-filters/files/patch-configure.ac (revision 408946) @@ -0,0 +1,13 @@ +Index: files/patch-configure.ac +=================================================================== +--- configure.ac.orig 2012-07-02 14:50:46 UTC ++++ configure.ac +@@ -148,7 +148,7 @@ AC_ARG_WITH(execpath,[ --with-execpath= + AC_MSG_RESULT([Execpath: $EXECPATH]) + AC_SUBST(EXECPATH) + +-AC_CONFIG_FILES([Makefile beh foomatic-rip.1]) ++AC_CONFIG_FILES([Makefile foomatic-beh foomatic-rip.1]) + AC_CONFIG_HEADER(config.h) + AC_OUTPUT + Property changes on: head/print/foomatic-filters/files/patch-configure.ac ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/print/foomatic-filters/files/patch-foomaticrip.c =================================================================== --- head/print/foomatic-filters/files/patch-foomaticrip.c (revision 408945) +++ head/print/foomatic-filters/files/patch-foomaticrip.c (revision 408946) @@ -1,30 +1,30 @@ ---- foomaticrip.c.orig 2012-07-02 10:50:46.000000000 -0400 -+++ foomaticrip.c 2014-05-19 10:28:46.588515788 -0400 -@@ -180,7 +180,7 @@ +--- foomaticrip.c.orig 2012-07-02 14:50:46 UTC ++++ foomaticrip.c +@@ -180,7 +180,7 @@ char cupsfilterpath[PATH_MAX] = "/usr/lo "/opt/cups/filter:" "/usr/lib/cups/filter"; -char modern_shell[64] = "/bin/bash"; +char modern_shell[64] = "/bin/sh"; void config_set_option(const char *key, const char *value) { -@@ -1061,7 +1061,7 @@ +@@ -1061,7 +1061,7 @@ int print_file(const char *filename, int Ghostscript is not available. */ if (spooler == SPOOLER_CUPS) snprintf(pdf2ps_cmd, PATH_MAX, - "pdftops '%s' '%s' '%s' '%s' '%s' '%s'", -+ "%%LOCALBASE%%/libexec/cups/filter/pdftops '%s' '%s' '%s' '%s' '%s' '%s'", ++ "/usr/local/libexec/cups/filter/pdftops '%s' '%s' '%s' '%s' '%s' '%s'", job->id, job->user, job->title, "1", job->optstr->data, filename); else -@@ -1197,7 +1197,8 @@ +@@ -1197,7 +1197,8 @@ int main(int argc, char** argv) debug = 1; if (debug) { - int fd = mkstemp (LOG_FILE "-XXXXXX.log"); + sprintf(tmp, "%s-XXXXXX.log", LOG_FILE); + int fd = mkstemps (tmp, 4); if (fd != -1) logh = fdopen(fd, "w"); else Index: head/print/foomatic-filters/files/patch-util.c =================================================================== --- head/print/foomatic-filters/files/patch-util.c (revision 408945) +++ head/print/foomatic-filters/files/patch-util.c (revision 408946) @@ -1,12 +1,12 @@ Resolves CVE-2015-8327 and CVE-2015-8560 ---- util.c.orig 2015-12-17 18:07:21 UTC +--- util.c.orig 2012-07-02 14:50:46 UTC +++ util.c @@ -31,7 +31,7 @@ #include -const char* shellescapes = "|<>&!$\'\"#*?()[]{}"; +const char* shellescapes = "|;<>&!$\'\"`#*?()[]{}"; const char * temp_dir() { Index: head/print/foomatic-filters/pkg-plist =================================================================== --- head/print/foomatic-filters/pkg-plist (revision 408945) +++ head/print/foomatic-filters/pkg-plist (revision 408946) @@ -1,8 +1,8 @@ bin/foomatic-rip @sample etc/foomatic/filter.conf.sample -libexec/cups/backend/beh +libexec/cups/backend/foomatic-beh libexec/cups/filter/foomatic-rip lib/ppr/interfaces/foomatic-rip lib/ppr/lib/foomatic-rip man/man1/foomatic-rip.1.gz @dir etc/foomatic/direct