]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Merge changes from CUPS 1.5svn-r8842.
authormsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>
Wed, 7 Oct 2009 18:20:31 +0000 (18:20 +0000)
committermsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>
Wed, 7 Oct 2009 18:20:31 +0000 (18:20 +0000)
git-svn-id: svn+ssh://src.apple.com/svn/cups/easysw/current@1709 a1ca3aef-8c08-0410-bb20-df032aa958be

20 files changed:
CHANGES-1.4.txt
config-scripts/cups-common.m4
config-scripts/cups-defaults.m4
desktop/cups.desktop.in
doc/Makefile
doc/help/ref-classes-conf.html
doc/help/ref-printers-conf.html
man/cupstestppd.man
packaging/installer.gif
packaging/installer.tif
scheduler/classes.c
scheduler/ipp.c
scheduler/printers.c
systemv/cupstestppd.c
templates/Makefile
templates/ru/printer-purge.tmpl
templates/ru/printer-reject.tmpl
templates/ru/printer-start.tmpl
templates/ru/printer-stop.tmpl
tools/testosx

index 7bf0924d7b8c1235f5f4ccd377130caa4118f7d3..8d86a49ead9a5d49656d7bc019720a54d3c6dfa8 100644 (file)
@@ -3,6 +3,20 @@ CHANGES-1.4.txt
 
 CHANGES IN CUPS V1.4.2
 
+       - The documentation for classes.conf and printers.conf did not provide
+         the correct instructions for manual changes (STR #3351)
+       - The scheduler did not always rebuild printer cache files when the
+         driver was changed (STR #3356)
+       - The documentation makefile failed to install localizations when using
+         newer versions of Bash (STR #3360)
+       - The configure script did not use the --with-xinetd value for the
+         default LPD configuration path (STR #3347)
+       - The configure script incorrectly required glib for DBUS support
+         (STR #3346)
+       - The cupstestppd program incorrectly reported filters with bad
+         permisssions as missing (STR #3363)
+       - The Russian web interface templates had errors (STR #3359)
+       - The cups.desktop file used the wrong locale names (STR #3358)
        - cupsSideChannelRead() did not return an error for short reads.
        - The installed PAM configuration file did not use the correct options
          with the pam_unix2 module (STR #3313)
index 8a744a745a132c12f9db46bcad4d7c6558a5093b..8583acfaf675e6f59b4ebd074ea6571bae0c6689 100644 (file)
@@ -266,11 +266,6 @@ if test "x$enable_dbus" != xno; then
                                dbus_message_iter_init_append,
                                AC_DEFINE(HAVE_DBUS_MESSAGE_ITER_INIT_APPEND),,
                                `$PKGCONFIG --libs dbus-1`)
-                       if $PKGCONFIG --exists glib-2.0 && $PKGCONFIG --exists dbus-glib-1; then
-                               DBUS_NOTIFIER="dbus"
-                               DBUS_NOTIFIERLIBS="`$PKGCONFIG --libs glib-2.0` `$PKGCONFIG --libs dbus-glib-1` `$PKGCONFIG --libs dbus-1`"
-                               CFLAGS="$CFLAGS `$PKGCONFIG --cflags glib-2.0`"
-                       fi
                else
                        AC_MSG_RESULT(no)
                fi
@@ -289,7 +284,6 @@ LEGACY_BACKENDS="parallel scsi"
 
 case $uname in
         Darwin*)
-#              FONTS=""
                LEGACY_BACKENDS=""
                 BACKLIBS="$BACKLIBS -framework IOKit"
                 CUPSDLIBS="$CUPSDLIBS -sectorder __TEXT __text cupsd.order -e start -framework IOKit -framework SystemConfiguration -weak_framework ApplicationServices"
index 53359e2a9123ac134b967a60b9ea293e5e2c70fc..1a4eb7b89603f2d03b6a7cc892c384b9e6f6d81d 100644 (file)
@@ -325,8 +325,8 @@ if test x$default_lpdconfigfile != xno; then
                                CUPS_DEFAULT_LPD_CONFIG_FILE="launchd:///System/Library/LaunchDaemons/org.cups.cups-lpd.plist"
                                ;;
                        *)
-                               if test -d /etc/xinetd.d; then
-                                       CUPS_DEFAULT_LPD_CONFIG_FILE="xinetd:///etc/xinetd.d/cups-lpd"
+                               if test "x$XINETD" != x; then
+                                       CUPS_DEFAULT_LPD_CONFIG_FILE="xinetd://$XINETD/cups-lpd"
                                else
                                        CUPS_DEFAULT_LPD_CONFIG_FILE=""
                                fi
index d75b3ec17f86446a576485825b2c9023d9642e70..44bb115f82da3c73f4aa3250ba15b7582b30f4ad 100644 (file)
@@ -7,33 +7,33 @@ Terminal=false
 Type=Application
 Name=Manage Printing
 Comment=CUPS Web Interface
-Name[de.UTF-8]=Druckerverwaltung
-Comment[de.UTF-8]=CUPS Webinterface
-Name[en_US.UTF-8]=Manage Printing
-Comment[en_US.UTF-8]=CUPS Web Interface
-Name[es.UTF-8]=Administrar impresión
-Comment[es.UTF-8]=Interfaz Web de CUPS
-Name[et.UTF-8]=Trükkimise haldur
-Comment[et.UTF-8]=CUPS-i veebiliides
-Name[eu.UTF-8]=Kudeatu inprimaketak
-Comment[eu.UTF-8]=CUPSen web interfazea
-Name[fr.UTF-8]=Gestionnaire d'impression
-Comment[fr.UTF-8]=Interface Web de CUPS
-Name[he.UTF-8]=נהל הדפסות
-Comment[he.UTF-8]=ממשק דפדפן של CUPS
-Name[id.UTF-8]=Manajemen Pencetakan
-Comment[id.UTF-8]=Antarmuka Web CUPS
-Name[it.UTF-8]=Gestione stampa
-Comment[it.UTF-8]=Interfaccia web di CUPS
-Name[ja.UTF-8]=印刷の管理
-Comment[ja.UTF-8]=CUPS Web インタフェース
-Name[pl.UTF-8]=Zarządzanie drukowaniem
-Comment[pl.UTF-8]=Interfejs WWW CUPS
-Name[ru.UTF-8]=Настройка печати
-Comment[ru.UTF-8]=Настройка CUPS
-Name[sv.UTF-8]=Hantera skrivare
-Comment[sv.UTF-8]=CUPS webb-gränssnitt
-Name[zh.UTF-8]=打印机管理
-Comment[zh.UTF-8]=CUPS网页界面
-Name[zh_TW.UTF-8]=印表管理
-Comment[zh_TW.UTF-8]=CUPS 網頁介面
+Name[de]=Druckerverwaltung
+Comment[de]=CUPS Webinterface
+Name[en_US]=Manage Printing
+Comment[en_US]=CUPS Web Interface
+Name[es]=Administrar impresión
+Comment[es]=Interfaz Web de CUPS
+Name[et]=Trükkimise haldur
+Comment[et]=CUPS-i veebiliides
+Name[eu]=Kudeatu inprimaketak
+Comment[eu]=CUPSen web interfazea
+Name[fr]=Gestionnaire d'impression
+Comment[fr]=Interface Web de CUPS
+Name[he]=נהל הדפסות
+Comment[he]=ממשק דפדפן של CUPS
+Name[id]=Manajemen Pencetakan
+Comment[id]=Antarmuka Web CUPS
+Name[it]=Gestione stampa
+Comment[it]=Interfaccia web di CUPS
+Name[ja]=印刷の管理
+Comment[ja]=CUPS Web インタフェース
+Name[pl]=Zarządzanie drukowaniem
+Comment[pl]=Interfejs WWW CUPS
+Name[ru]=Настройка печати
+Comment[ru]=Настройка CUPS
+Name[sv]=Hantera skrivare
+Comment[sv]=CUPS webb-gränssnitt
+Name[zh]=打印机管理
+Comment[zh]=CUPS网页界面
+Name[zh_TW]=印表管理
+Comment[zh_TW]=CUPS 網頁介面
index 0e3524cf88e77888b48cf036bd81f1fd1730d724..be2d65e2badd4cb9e0b9448e8c47af1579491f8b 100644 (file)
@@ -190,8 +190,8 @@ install-languages:
        for lang in $(LANGUAGES); do \
                if test -d $$lang; then \
                        $(INSTALL_DIR) -m 755 $(DOCDIR)/$$lang; \
-                       $(INSTALL_MAN) $$lang/index.html $(DOCDIR)/$$lang; \
-                       test -f $$lang/cups.css && $(INSTALL_MAN) $$lang/cups.css $(DOCDIR)/$$lang; \
+                       $(INSTALL_DATA) $$lang/index.html $(DOCDIR)/$$lang; \
+                       $(INSTALL_DATA) $$lang/cups.css $(DOCDIR)/$$lang >/dev/null 2>&1 || true; \
                fi; \
        done
 
index 9224c5a60f33b6ec89338fd39cbcf5b814e6d3f4..40bc3d5e27ef804d8fb0f7ee94408e08e15c9a71 100644 (file)
@@ -21,8 +21,8 @@ can be modified using your favorite text editor, you should
 normally use the <A HREF="man-lpadmin.html">lpadmin(8)</A>
 command, web interface, or any of the available GUIs to manage
 your classes instead. If you do choose to edit this file
-manually, you will need to restart the scheduler to make them
-active.</P>
+manually, you will need to stop the scheduler first, make your
+changes, and then start the scheduler to make them active.</P>
 
 
 <H2 CLASS="title"><A NAME="Accepting">Accepting</A></H2>
index 3539f8cfe48b66411d72d6cf4cce7d8ebbf4e1b9..9568fc7c83bc4c6b16dd166eb958af1a56f38182 100644 (file)
@@ -21,8 +21,8 @@ and can be modified using your favorite text editor, you should
 normally use the <A HREF="man-lpadmin.html">lpadmin(8)</A>
 command, web interface, or any of the available GUIs to manage
 your printers instead. If you do choose to edit this file
-manually, you will need to restart the scheduler to make them
-active.</P>
+manually, you will need to stop the scheduler first, make your
+changes, and then start the scheduler to make them active.</P>
 
 
 <H2 CLASS="title"><A NAME="Accepting">Accepting</A></H2>
index fbfb46b47e67d2480b0e1bee0bbaba1da7a54138..5287b76ea31a1dc57824073eeaf1355481429772 100644 (file)
 .\"   which should have been included with this file.  If this file is
 .\"   file is missing or damaged, see the license at "http://www.cups.org/".
 .\"
-.TH cupstestppd 1 "CUPS" "2 March 2009" "Apple Inc."
+.TH cupstestppd 1 "CUPS" "6 October 2009" "Apple Inc."
 .SH NAME
 cupstestppd \- test conformance of ppd files
 .SH SYNOPSIS
 .B cupstestppd
-[ -R
+[ -I
+.I category
+] [ -R
 .I rootdir
 ] [ -W
 .I category
@@ -42,6 +44,14 @@ on the standard input.
 .SH OPTIONS
 \fIcupstestppd\fR supports the following options:
 .TP 5
+-I filters
+.br
+Ignores all filter errors.
+.TP 5
+-I profiles
+.br
+Ignores all profile errors.
+.TP 5
 -R rootdir
 .br
 Specifies an alternate root directory for the filter, pre-filter,
index bbbd24bedee4865d70a09e07574a865ebcf8b9c1..3ae6ea77a8c02cd6dc5e5e2a90d4fe4d495076a9 100644 (file)
Binary files a/packaging/installer.gif and b/packaging/installer.gif differ
index 7eba7a2f9bd9efd29b0132471fa3d9639820403d..cc52bc65ae77a414611e31feaad545e8f7595770 100644 (file)
Binary files a/packaging/installer.tif and b/packaging/installer.tif differ
index 87c3d07bc1fb3e71d2dc6fe37224b4ff54bb7725..77214aba6fab26cce88f7c776b579583f76805fe 100644 (file)
@@ -728,6 +728,7 @@ cupsdSaveAllClasses(void)
 
   cupsFilePuts(fp, "# Class configuration file for " CUPS_SVERSION "\n");
   cupsFilePrintf(fp, "# Written by cupsd on %s\n", temp);
+  cupsFilePuts(fp, "# DO NOT EDIT THIS FILE WHEN CUPSD IS RUNNING\n");
 
  /*
   * Write each local class known to the system...
index 60aa932ecf902ac942e1d54c782bc666a7f79af3..50b1691957e9f5880f6ba81ed923b025f882d8eb 100644 (file)
@@ -2324,8 +2324,9 @@ add_printer(cupsd_client_t  *con, /* I - Client connection */
                dstfile[1024];          /* Destination Script/PPD file */
   int          modify;                 /* Non-zero if we are modifying */
   char         newname[IPP_MAX_NAME];  /* New printer name */
-  int          need_restart_job;       /* Need to restart job? */
-  int          set_device_uri,         /* Did we set the device URI? */
+  int          changed_driver,         /* Changed the PPD/interface script? */
+               need_restart_job,       /* Need to restart job? */
+               set_device_uri,         /* Did we set the device URI? */
                set_port_monitor;       /* Did we set the port monitor? */
 
 
@@ -2469,6 +2470,7 @@ add_printer(cupsd_client_t  *con, /* I - Client connection */
   * Look for attributes and copy them over as needed...
   */
 
+  changed_driver   = 0;
   need_restart_job = 0;
 
   if ((attr = ippFindAttribute(con->request, "printer-location",
@@ -2722,6 +2724,7 @@ add_printer(cupsd_client_t  *con, /* I - Client connection */
   if (con->filename)
   {
     need_restart_job = 1;
+    changed_driver   = 1;
 
     strlcpy(srcfile, con->filename, sizeof(srcfile));
 
@@ -2792,18 +2795,6 @@ add_printer(cupsd_client_t  *con,        /* I - Client connection */
        cupsdLogMessage(CUPSD_LOG_DEBUG,
                        "Copied PPD file successfully!");
        chmod(dstfile, 0644);
-
-#ifdef __APPLE__
-       /*
-        * (Re)register color profiles...
-       */
-
-        if (!RunUser)
-       {
-         apple_unregister_profiles(printer);
-         apple_register_profiles(printer);
-        }
-#endif /* __APPLE__ */
       }
       else
       {
@@ -2820,6 +2811,7 @@ add_printer(cupsd_client_t  *con, /* I - Client connection */
                                     IPP_TAG_NAME)) != NULL)
   {
     need_restart_job = 1;
+    changed_driver   = 1;
 
     if (!strcmp(attr->values[0].string.text, "raw"))
     {
@@ -2857,19 +2849,33 @@ add_printer(cupsd_client_t  *con,       /* I - Client connection */
       cupsdLogMessage(CUPSD_LOG_DEBUG,
                      "Copied PPD file successfully!");
       chmod(dstfile, 0644);
+    }
+  }
+
+  if (changed_driver)
+  {
+   /*
+    * If we changed the PPD/interface script, then remove the printer's cache
+    * file...
+    */
+
+    char cache_name[1024];             /* Cache filename for printer attrs */
+
+    snprintf(cache_name, sizeof(cache_name), "%s/%s.ipp", CacheDir,
+             printer->name);
+    unlink(cache_name);
 
 #ifdef __APPLE__
-     /*
-      * (Re)register color profiles...
-      */
+   /*
+    * (Re)register color profiles...
+    */
 
-      if (!RunUser)
-      {
-       apple_unregister_profiles(printer);
-       apple_register_profiles(printer);
-      }
-#endif /* __APPLE__ */
+    if (!RunUser)
+    {
+      apple_unregister_profiles(printer);
+      apple_register_profiles(printer);
     }
+#endif /* __APPLE__ */
   }
 
  /*
index 84400085450f491ec97344489172b5f5020ec196..60028a722c9aeba3eb072b7d9993593141a6827f 100644 (file)
@@ -1518,6 +1518,7 @@ cupsdSaveAllPrinters(void)
 
   cupsFilePuts(fp, "# Printer configuration file for " CUPS_SVERSION "\n");
   cupsFilePrintf(fp, "# Written by cupsd on %s\n", temp);
+  cupsFilePuts(fp, "# DO NOT EDIT THIS FILE WHEN CUPSD IS RUNNING\n");
 
  /*
   * Write each local printer known to the system...
index dda0f0e75e7a9b03bb8a6392858f83cb08315eec..dbda500e035b39abc9625fb2694fcda59e954a1d 100644 (file)
@@ -100,6 +100,17 @@ enum
 };
 
 
+/*
+ * File permissions...
+ */
+
+#define MODE_WRITE     0022            /* Group/other write */
+#define MODE_MASK      0555            /* Owner/group/other read+exec/search */
+#define MODE_DATAFILE  0444            /* Owner/group/other read */
+#define MODE_DIRECTORY 0555            /* Owner/group/other read+search */
+#define MODE_PROGRAM   0555            /* Owner/group/other read+exec */
+
+
 /*
  * Standard Adobe media keywords (must remain sorted)...
  */
@@ -304,6 +315,7 @@ main(int  argc,                             /* I - Number of command-line args */
   int          files;                  /* Number of files */
   int          verbose;                /* Want verbose output? */
   int          warn;                   /* Which errors to just warn about */
+  int          ignore;                 /* Which errors to ignore */
   int          status;                 /* Exit status */
   int          errors;                 /* Number of conformance errors */
   int          ppdversion;             /* PPD spec version in PPD file */
@@ -341,6 +353,7 @@ main(int  argc,                             /* I - Number of command-line args */
   status  = ERROR_NONE;
   root    = "";
   warn    = WARN_NONE;
+  ignore  = WARN_NONE;
 
   for (i = 1; i < argc; i ++)
     if (argv[i][0] == '-' && argv[i][1])
@@ -348,6 +361,24 @@ main(int  argc,                            /* I - Number of command-line args */
       for (opt = argv[i] + 1; *opt; opt ++)
         switch (*opt)
        {
+         case 'I' :                    /* Ignore errors */
+             i ++;
+
+             if (i >= argc)
+               usage();
+
+              if (!strcmp(argv[i], "none"))
+               ignore = WARN_NONE;
+             else if (!strcmp(argv[i], "filters"))
+               ignore |= WARN_FILTERS;
+             else if (!strcmp(argv[i], "profiles"))
+               ignore |= WARN_PROFILES;
+             else if (!strcmp(argv[i], "all"))
+               ignore = WARN_FILTERS | WARN_PROFILES;
+             else
+               usage();
+             break;
+
          case 'R' :                    /* Alternate root directory */
              i ++;
 
@@ -357,7 +388,7 @@ main(int  argc,                             /* I - Number of command-line args */
               root = argv[i];
              break;
 
-         case 'W' :                    /* Turn errors into warnings  */
+         case 'W' :                    /* Turn errors into warnings */
              i ++;
 
              if (i >= argc)
@@ -1256,10 +1287,10 @@ main(int  argc,                         /* I - Number of command-line args */
       if (!(warn & WARN_CONSTRAINTS))
         errors = check_constraints(ppd, errors, verbose, 0);
 
-      if (!(warn & WARN_FILTERS))
+      if (!(warn & WARN_FILTERS) && !(ignore & WARN_FILTERS))
         errors = check_filters(ppd, root, errors, verbose, 0);
 
-      if (!(warn & WARN_PROFILES))
+      if (!(warn & WARN_PROFILES) && !(ignore & WARN_PROFILES))
         errors = check_profiles(ppd, root, errors, verbose, 0);
 
       if (!(warn & WARN_SIZES))
@@ -1387,18 +1418,18 @@ main(int  argc,                         /* I - Number of command-line args */
       {
         check_basics(argv[i]);
 
-       if (warn & WARN_CONSTRAINTS)
-         errors = check_constraints(ppd, errors, verbose, 1);
-
        if (warn & WARN_DEFAULTS)
          errors = check_defaults(ppd, errors, verbose, 1);
 
-       if (warn & WARN_PROFILES)
-         errors = check_profiles(ppd, root, errors, verbose, 1);
+       if (warn & WARN_CONSTRAINTS)
+         errors = check_constraints(ppd, errors, verbose, 1);
 
-       if (warn & WARN_FILTERS)
+       if ((warn & WARN_FILTERS) && !(ignore & WARN_FILTERS))
          errors = check_filters(ppd, root, errors, verbose, 1);
 
+       if ((warn & WARN_PROFILES) && !(ignore & WARN_PROFILES))
+         errors = check_profiles(ppd, root, errors, verbose, 1);
+
         if (warn & WARN_SIZES)
          errors = check_sizes(ppd, errors, verbose, 1);
         else
@@ -2411,6 +2442,7 @@ check_filters(ppd_file_t *ppd,            /* I - PPD file */
                pathprog[1024];         /* Complete path to program/filter */
   int          cost;                   /* Cost of filter */
   const char   *prefix;                /* WARN/FAIL prefix */
+  struct stat  fileinfo;               /* File information */
 
 
   prefix = warn ? "  WARN  " : "**FAIL**";
@@ -2452,14 +2484,28 @@ check_filters(ppd_file_t *ppd,          /* I - PPD file */
                   program);
       }
 
-      if (access(pathprog, X_OK))
+      if (stat(pathprog, &fileinfo))
       {
        if (!warn && !errors && !verbose)
          _cupsLangPuts(stdout, _(" FAIL\n"));
 
        if (verbose >= 0)
          _cupsLangPrintf(stdout, _("      %s  Missing cupsFilter "
-                                   "file \"%s\"\n"), prefix, program);
+                                   "file \"%s\"\n"), prefix, pathprog);
+
+       if (!warn)
+         errors ++;
+      }
+      else if (fileinfo.st_uid != 0 ||
+               (fileinfo.st_mode & MODE_WRITE) ||
+              (fileinfo.st_mode & MODE_MASK) != MODE_PROGRAM)
+      {
+       if (!warn && !errors && !verbose)
+         _cupsLangPuts(stdout, _(" FAIL\n"));
+
+       if (verbose >= 0)
+         _cupsLangPrintf(stdout, _("      %s  Bad permissions on cupsFilter "
+                                   "file \"%s\"\n"), prefix, pathprog);
 
        if (!warn)
          errors ++;
@@ -2523,18 +2569,33 @@ check_filters(ppd_file_t *ppd,          /* I - PPD file */
                   program);
       }
 
-      if (access(pathprog, X_OK))
+      if (stat(pathprog, &fileinfo))
       {
        if (!warn && !errors && !verbose)
          _cupsLangPuts(stdout, _(" FAIL\n"));
 
        if (verbose >= 0)
          _cupsLangPrintf(stdout, _("      %s  Missing cupsPreFilter "
-                                   "file \"%s\"\n"), prefix, program);
+                                   "file \"%s\"\n"), prefix, pathprog);
 
         if (!warn)
          errors ++;
       }
+      else if (fileinfo.st_uid != 0 ||
+               (fileinfo.st_mode & MODE_WRITE) ||
+              (fileinfo.st_mode & MODE_MASK) != MODE_PROGRAM)
+      {
+       if (!warn && !errors && !verbose)
+         _cupsLangPuts(stdout, _(" FAIL\n"));
+
+       if (verbose >= 0)
+         _cupsLangPrintf(stdout, _("      %s  Bad permissions on "
+                                   "cupsPreFilter file \"%s\"\n"), prefix,
+                         pathprog);
+
+       if (!warn)
+         errors ++;
+      }
       else
         errors = valid_path("cupsPreFilter", pathprog, errors, verbose, warn);
     }
@@ -2562,8 +2623,11 @@ check_filters(ppd_file_t *ppd,           /* I - PPD file */
       if (!warn)
         errors ++;
     }
+    
+    snprintf(pathprog, sizeof(pathprog), "%s%s", root,
+             attr->value ? attr->value : "(null)");
 
-    if (!attr->value || access(attr->value, 0))
+    if (!attr->value || stat(pathprog, &fileinfo))
     {
       if (!warn && !errors && !verbose)
        _cupsLangPuts(stdout, _(" FAIL\n"));
@@ -2571,13 +2635,28 @@ check_filters(ppd_file_t *ppd,          /* I - PPD file */
       if (verbose >= 0)
        _cupsLangPrintf(stdout, _("      %s  Missing "
                                  "APDialogExtension file \"%s\"\n"),
-                       prefix, attr->value ? attr->value : "<NULL>");
+                       prefix, pathprog);
+
+      if (!warn)
+       errors ++;
+    }
+    else if (fileinfo.st_uid != 0 ||
+            (fileinfo.st_mode & MODE_WRITE) ||
+            (fileinfo.st_mode & MODE_MASK) != MODE_DIRECTORY)
+    {
+      if (!warn && !errors && !verbose)
+       _cupsLangPuts(stdout, _(" FAIL\n"));
+
+      if (verbose >= 0)
+       _cupsLangPrintf(stdout, _("      %s  Bad permissions on "
+                                 "APDialogExtension file \"%s\"\n"), prefix,
+                       pathprog);
 
       if (!warn)
        errors ++;
     }
     else
-      errors = valid_path("APDialogExtension", attr->value, errors, verbose,
+      errors = valid_path("APDialogExtension", pathprog, errors, verbose,
                           warn);
   }
 
@@ -2601,7 +2680,10 @@ check_filters(ppd_file_t *ppd,           /* I - PPD file */
         errors ++;
     }
 
-    if (!attr->value || access(attr->value, 0))
+    snprintf(pathprog, sizeof(pathprog), "%s%s", root,
+             attr->value ? attr->value : "(null)");
+
+    if (!attr->value || stat(pathprog, &fileinfo))
     {
       if (!warn && !errors && !verbose)
        _cupsLangPuts(stdout, _(" FAIL\n"));
@@ -2609,13 +2691,28 @@ check_filters(ppd_file_t *ppd,          /* I - PPD file */
       if (verbose >= 0)
        _cupsLangPrintf(stdout, _("      %s  Missing "
                                  "APPrinterIconPath file \"%s\"\n"),
-                       prefix, attr->value ? attr->value : "<NULL>");
+                       prefix, pathprog);
+
+      if (!warn)
+       errors ++;
+    }
+    else if (fileinfo.st_uid != 0 ||
+            (fileinfo.st_mode & MODE_WRITE) ||
+            (fileinfo.st_mode & MODE_MASK) != MODE_DATAFILE)
+    {
+      if (!warn && !errors && !verbose)
+       _cupsLangPuts(stdout, _(" FAIL\n"));
+
+      if (verbose >= 0)
+       _cupsLangPrintf(stdout, _("      %s  Bad permissions on "
+                                 "APPrinterIconPath file \"%s\"\n"), prefix,
+                       pathprog);
 
       if (!warn)
        errors ++;
     }
     else
-      errors = valid_path("APPrinterIconPath", attr->value, errors, verbose,
+      errors = valid_path("APPrinterIconPath", pathprog, errors, verbose,
                           warn);
   }
 
@@ -2639,7 +2736,10 @@ check_filters(ppd_file_t *ppd,           /* I - PPD file */
         errors ++;
     }
 
-    if (!attr->value || access(attr->value, 0))
+    snprintf(pathprog, sizeof(pathprog), "%s%s", root,
+             attr->value ? attr->value : "(null)");
+
+    if (!attr->value || stat(pathprog, &fileinfo))
     {
       if (!warn && !errors && !verbose)
        _cupsLangPuts(stdout, _(" FAIL\n"));
@@ -2647,13 +2747,28 @@ check_filters(ppd_file_t *ppd,          /* I - PPD file */
       if (verbose >= 0)
        _cupsLangPrintf(stdout, _("      %s  Missing "
                                  "APPrinterLowInkTool file \"%s\"\n"),
-                       prefix, attr->value ? attr->value : "<NULL>");
+                       prefix, pathprog);
+
+      if (!warn)
+       errors ++;
+    }
+    else if (fileinfo.st_uid != 0 ||
+            (fileinfo.st_mode & MODE_WRITE) ||
+            (fileinfo.st_mode & MODE_MASK) != MODE_DIRECTORY)
+    {
+      if (!warn && !errors && !verbose)
+       _cupsLangPuts(stdout, _(" FAIL\n"));
+
+      if (verbose >= 0)
+       _cupsLangPrintf(stdout, _("      %s  Bad permissions on "
+                                 "APPrinterLowInkTool file \"%s\"\n"), prefix,
+                       pathprog);
 
       if (!warn)
        errors ++;
     }
     else
-      errors = valid_path("APPrinterLowInkTool", attr->value, errors, verbose,
+      errors = valid_path("APPrinterLowInkTool", pathprog, errors, verbose,
                           warn);
   }
 
@@ -2677,7 +2792,10 @@ check_filters(ppd_file_t *ppd,           /* I - PPD file */
         errors ++;
     }
 
-    if (!attr->value || access(attr->value, 0))
+    snprintf(pathprog, sizeof(pathprog), "%s%s", root,
+             attr->value ? attr->value : "(null)");
+
+    if (!attr->value || stat(pathprog, &fileinfo))
     {
       if (!warn && !errors && !verbose)
        _cupsLangPuts(stdout, _(" FAIL\n"));
@@ -2685,13 +2803,28 @@ check_filters(ppd_file_t *ppd,          /* I - PPD file */
       if (verbose >= 0)
        _cupsLangPrintf(stdout, _("      %s  Missing "
                                  "APPrinterUtilityPath file \"%s\"\n"),
-                       prefix, attr->value ? attr->value : "<NULL>");
+                       prefix, pathprog);
+
+      if (!warn)
+       errors ++;
+    }
+    else if (fileinfo.st_uid != 0 ||
+            (fileinfo.st_mode & MODE_WRITE) ||
+            (fileinfo.st_mode & MODE_MASK) != MODE_DIRECTORY)
+    {
+      if (!warn && !errors && !verbose)
+       _cupsLangPuts(stdout, _(" FAIL\n"));
+
+      if (verbose >= 0)
+       _cupsLangPrintf(stdout, _("      %s  Bad permissions on "
+                                 "APPrinterUtilityPath file \"%s\"\n"), prefix,
+                       pathprog);
 
       if (!warn)
        errors ++;
     }
     else
-      errors = valid_path("APPrinterUtilityPath", attr->value, errors, verbose,
+      errors = valid_path("APPrinterUtilityPath", pathprog, errors, verbose,
                           warn);
   }
 
@@ -2715,7 +2848,7 @@ check_filters(ppd_file_t *ppd,            /* I - PPD file */
         errors ++;
     }
 
-    if (!attr->value || access(attr->value, 0))
+    if (!attr->value || stat(attr->value, &fileinfo))
     {
       if (!warn && !errors && !verbose)
        _cupsLangPuts(stdout, _(" FAIL\n"));
@@ -2728,6 +2861,21 @@ check_filters(ppd_file_t *ppd,           /* I - PPD file */
       if (!warn)
        errors ++;
     }
+    else if (fileinfo.st_uid != 0 ||
+            (fileinfo.st_mode & MODE_WRITE) ||
+            (fileinfo.st_mode & MODE_MASK) != MODE_DIRECTORY)
+    {
+      if (!warn && !errors && !verbose)
+       _cupsLangPuts(stdout, _(" FAIL\n"));
+
+      if (verbose >= 0)
+       _cupsLangPrintf(stdout, _("      %s  Bad permissions on "
+                                 "APScanAppPath file \"%s\"\n"), prefix,
+                       attr->value);
+
+      if (!warn)
+       errors ++;
+    }
     else
       errors = valid_path("APScanAppPath", attr->value, errors, verbose,
                           warn);
@@ -2768,6 +2916,7 @@ check_profiles(ppd_file_t *ppd,           /* I - PPD file */
   const char   *ptr;                   /* Pointer into string */
   const char   *prefix;                /* WARN/FAIL prefix */
   char         filename[1024];         /* Profile filename */
+  struct stat  fileinfo;               /* File information */
   int          num_profiles = 0;       /* Number of profiles */
   unsigned     hash,                   /* Current hash value */
                hashes[1000];           /* Hash values of profile names */
@@ -2822,14 +2971,29 @@ check_profiles(ppd_file_t *ppd,         /* I - PPD file */
                 attr->value);
     }
 
-    if (access(filename, 0))
+    if (stat(filename, &fileinfo))
     {
       if (!warn && !errors && !verbose)
        _cupsLangPuts(stdout, _(" FAIL\n"));
 
       if (verbose >= 0)
        _cupsLangPrintf(stdout, _("      %s  Missing cupsICCProfile "
-                                 "file \"%s\"!\n"), prefix, attr->value);
+                                 "file \"%s\"!\n"), prefix, filename);
+
+      if (!warn)
+       errors ++;
+    }
+    else if (fileinfo.st_uid != 0 ||
+            (fileinfo.st_mode & MODE_WRITE) ||
+            (fileinfo.st_mode & MODE_MASK) != MODE_DATAFILE)
+    {
+      if (!warn && !errors && !verbose)
+       _cupsLangPuts(stdout, _(" FAIL\n"));
+
+      if (verbose >= 0)
+       _cupsLangPrintf(stdout, _("      %s  Bad permissions on "
+                                 "cupsICCProfile file \"%s\"\n"), prefix,
+                       filename);
 
       if (!warn)
        errors ++;
@@ -3489,6 +3653,8 @@ usage(void)
                  "\n"
                  "Options:\n"
                  "\n"
+                 "    -I {filters,profiles}\n"
+                 "                         Ignore missing files\n"
                  "    -R root-directory    Set alternate root\n"
                  "    -W {all,none,constraints,defaults,duplex,filters,"
                  "profiles,sizes,translations}\n"
index 6ea624abae670a0e6a51e2c57ea56117ec46873a..14235fd78734cf4f82ba3c1bf6914bd3ad2e682e 100644 (file)
@@ -3,7 +3,7 @@
 #
 #   Template makefile for the Common UNIX Printing System (CUPS).
 #
-#   Copyright 2007-2008 by Apple Inc.
+#   Copyright 2007-2009 by Apple Inc.
 #   Copyright 1993-2007 by Easy Software Products.
 #
 #   These coded instructions, statements, and computer programs are the
@@ -149,7 +149,7 @@ install-languages:
                if test -d $$lang; then \
                        $(INSTALL_DIR) -m 755 $(DATADIR)/templates/$$lang; \
                        for file in $(FILES); do \
-                               $(INSTALL_DATA) $$lang/$$file $(DATADIR)/templates/$$lang 2>/dev/null || true; \
+                               $(INSTALL_DATA) $$lang/$$file $(DATADIR)/templates/$$lang >/dev/null 2>&1 || true; \
                        done \
                fi \
        done
index e00f4b3471878b7de908f03813a3e9e011802f46..44fda0d1f18f721e11a8ab8475343bb43338897e 100644 (file)
@@ -3,7 +3,7 @@
 <H2 CLASS="title">Очистка всех заданий для {is_class?группы:принтера} {printer_name}</H2>
 
 <P>Все задания для {is_class?группы:принтера} «<A
-HREF="/{is_class?группы:принтеры}/{printer_name}">{printer_name}</A>»
+HREF="/{is_class?classes:printers}/{printer_name}">{printer_name}</A>»
 очищены.</P>
 
-</DIV>
\ No newline at end of file
+</DIV>
index 5e34253d6030649ffdabc3563a7d7e401fae6dcf..488203c929b498f5c6c878696491294d2e68db61 100644 (file)
@@ -3,7 +3,7 @@
 <H2 CLASS="title">Отмена заданий для {is_class?группы:принтера} {printer_name}</H2>
 
 <P>{is_class?Группа:Принтер} «<A
-HREF="/{is_class?группы:принтеры}/{printer_name}">{printer_name}</A>»
+HREF="/{is_class?classes:printers}/{printer_name}">{printer_name}</A>»
 больше не принимает задания.</P>
 
 </DIV>
index 55c68a7fc300d34c793b6e5c850dfbeae587d8ee..69ffa7ef5348f7e5c119fba2e4951439537d368d 100644 (file)
@@ -3,7 +3,7 @@
 <H2 CLASS="title">Возобновить работу {is_class?группы:принтера} {printer_name}</H2>
 
 <P>{is_class?Группа:Принтер} «<A
-HREF="/{is_class?группы:принтеры}/{printer_name}">{printer_name}</A>»
+HREF="/{is_class?classes:printers}/{printer_name}">{printer_name}</A>»
 теперь принимают задания.</P>
 
-</DIV>
\ No newline at end of file
+</DIV>
index e7a46ea28553b8c9b431d4ea72eeafbe3c519437..3fecd1e73ecdae87d773de8a89300593542e3a87 100644 (file)
@@ -3,7 +3,7 @@
 <H2 CLASS="title">Приостановить {is_class?группу:принтер} {printer_name}</H2>
 
 <P>{is_class?Группа:Принтер} «<A
-HREF="/{is_class?группы:принтеры}/{printer_name}">{printer_name}</A>»
+HREF="/{is_class?classes:printers}/{printer_name}">{printer_name}</A>»
 {is_class?была приостановлена:был приостановлен}.</P>
 
-</DIV>
\ No newline at end of file
+</DIV>
index 918e7a41cc5b600a63eeb9139fbf5b46b4d93e2e..4547977f236c7a829f278046e76d28be2eee1728 100755 (executable)
@@ -20,7 +20,7 @@ fi
 rev=`svnversion . | awk -F: '{print $NF}' | sed -e '1,$s/[a-zA-Z]*//g'`
 
 if test $# = 0; then
-       version="1.4svn-r$rev"
+       version="1.5svn-r$rev"
 else
        version=$1
 fi
@@ -99,7 +99,7 @@ for file in packaging/cups-desc.plist packaging/cups-info.plist \
        echo Updating $file...
        sed -e '1,$s/@CUPS_VERSION@/'$version'/g' \
                -e '1,$s/@CUPS_REVISION@//g' \
-               -e '1,$s/@CUPS_RELEASE@/1.4.'$rev'/g' \
+               -e '1,$s/@CUPS_RELEASE@/1.5.'$rev'/g' \
                <$file.in >$file
 done