From: Michael R Sweet Date: Thu, 27 Feb 2025 15:50:10 +0000 (-0500) Subject: Drop cups-config script. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=69b92fe7ad1d4f93b5320f9ca2703f5547f29745;p=thirdparty%2Fcups.git Drop cups-config script. --- diff --git a/CHANGES.md b/CHANGES.md index 314557053a..8d06497031 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -67,6 +67,7 @@ Changes in CUPS v2.5b1 (YYYY-MM-DD) - Updated the `ipptool` utility to support the `--bearer-token` and `--client-name` options. - Deprecated the "page-border" Job Template attribute (Issue #1020) +- Removed the `cups-config` utility (use `pkg-config` instead) - Fixed use-after-free in `cupsdAcceptClient()` when we log warning during error handling (fixes CVE-2023-34241) - Fixed hanging of `lpstat` on Solaris (Issue #156) diff --git a/Makefile b/Makefile index ea9d6bd614..53cba9cef6 100644 --- a/Makefile +++ b/Makefile @@ -171,9 +171,6 @@ install-data: echo Installing data files in $$dir... ;\ (cd $$dir; $(MAKE) $(MFLAGS) install-data) || exit 1;\ done - echo Installing cups-config script... - $(INSTALL_DIR) -m 755 $(BINDIR) - $(INSTALL_SCRIPT) cups-config $(BINDIR)/cups-config echo Installing cups.pc file... $(INSTALL_DIR) -m 755 $(CUPS_PKGCONFPATH) $(INSTALL_DATA) cups.pc $(CUPS_PKGCONFPATH)/cups.pc diff --git a/configure b/configure index 9469bf370f..a93b86a6ed 100755 --- a/configure +++ b/configure @@ -11955,7 +11955,7 @@ fi -ac_config_files="$ac_config_files Makedefs conf/cups-files.conf conf/cupsd.conf conf/mime.convs conf/pam.std conf/snmp.conf cups.pc cups-config desktop/cups.desktop doc/index.html scheduler/cups-lpd.xinetd scheduler/cups.sh scheduler/cups.xml scheduler/org.cups.cups-lpd.plist scheduler/cups-lpdAT.service scheduler/cups.path scheduler/cups.service scheduler/cups.socket templates/header.tmpl packaging/cups.list $LANGFILES" +ac_config_files="$ac_config_files Makedefs conf/cups-files.conf conf/cupsd.conf conf/mime.convs conf/pam.std conf/snmp.conf cups.pc desktop/cups.desktop doc/index.html scheduler/cups-lpd.xinetd scheduler/cups.sh scheduler/cups.xml scheduler/org.cups.cups-lpd.plist scheduler/cups-lpdAT.service scheduler/cups.path scheduler/cups.service scheduler/cups.socket templates/header.tmpl packaging/cups.list $LANGFILES" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -12651,7 +12651,6 @@ do "conf/pam.std") CONFIG_FILES="$CONFIG_FILES conf/pam.std" ;; "conf/snmp.conf") CONFIG_FILES="$CONFIG_FILES conf/snmp.conf" ;; "cups.pc") CONFIG_FILES="$CONFIG_FILES cups.pc" ;; - "cups-config") CONFIG_FILES="$CONFIG_FILES cups-config" ;; "desktop/cups.desktop") CONFIG_FILES="$CONFIG_FILES desktop/cups.desktop" ;; "doc/index.html") CONFIG_FILES="$CONFIG_FILES doc/index.html" ;; "scheduler/cups-lpd.xinetd") CONFIG_FILES="$CONFIG_FILES scheduler/cups-lpd.xinetd" ;; diff --git a/configure.ac b/configure.ac index fe2e252e4b..615049e7a3 100644 --- a/configure.ac +++ b/configure.ac @@ -79,7 +79,6 @@ AC_CONFIG_FILES([ conf/pam.std conf/snmp.conf cups.pc - cups-config desktop/cups.desktop doc/index.html scheduler/cups-lpd.xinetd diff --git a/cups-config.in b/cups-config.in deleted file mode 100755 index 5d850a667a..0000000000 --- a/cups-config.in +++ /dev/null @@ -1,132 +0,0 @@ -#!/bin/sh -# -# CUPS configuration utility. -# -# Copyright © 2020-2024 by OpenPrinting. -# Copyright © 2007-2019 by Apple Inc. -# Copyright © 2001-2006 by Easy Software Products, all rights reserved. -# -# Licensed under Apache License v2.0. See the file "LICENSE" for more -# information. -# - -VERSION="@CUPS_VERSION@" -APIVERSION="@CUPS_API_VERSION@" -BUILD="@CUPS_BUILD@" - -prefix=@prefix@ -exec_prefix=@exec_prefix@ -bindir=@bindir@ -includedir=@includedir@ -libdir=@libdir@ -datarootdir=@datadir@ -datadir=@datadir@ -sysconfdir=@sysconfdir@ -cups_datadir=@CUPS_DATADIR@ -cups_serverbin=@CUPS_SERVERBIN@ -cups_serverroot=@CUPS_SERVERROOT@ -INSTALLSTATIC=@INSTALLSTATIC@ - -# flags for compiler and linker... -CFLAGS="" -LDFLAGS="@EXPORT_LDFLAGS@" -LIBS="@LIBGSSAPI@ @DNSSDLIBS@ @EXPORT_TLSLIBS@ @LIBZ@ @LIBS@" - -# Check for local invocation... -selfdir=`dirname $0` - -if test -f "$selfdir/cups/cups.h"; then - CFLAGS="-I$selfdir" - LDFLAGS="-L$selfdir/cups $LDFLAGS" - libdir="$selfdir/cups" -else - if test $includedir != /usr/include; then - CFLAGS="$CFLAGS -I$includedir" - fi - - if test $libdir != /usr/lib -a $libdir != /usr/lib32 -a $libdir != /usr/lib64; then - LDFLAGS="$LDFLAGS -L$libdir" - fi -fi - - -usage() -{ - echo "Usage: cups-config --api-version" - echo " cups-config --build" - echo " cups-config --cflags" - echo " cups-config --datadir" - echo " cups-config --help" - echo " cups-config --ldflags" - echo " cups-config [--image] [--static] --libs" - echo " cups-config --serverbin" - echo " cups-config --serverroot" - echo " cups-config --version" - echo "" - echo "Note: The cups-config utility is deprecated and will be removed in a future" - echo " version of CUPS. Use the pkg-config utility instead." - - exit $1 -} - -if test $# -eq 0; then - usage 1 -fi - -# Parse command line options -static=no - -while test $# -gt 0; do - case $1 in - --api-version) - echo $APIVERSION - ;; - --build) - echo $BUILD - ;; - --cflags) - echo $CFLAGS - ;; - --datadir) - echo $cups_datadir - ;; - --help) - usage 0 - ;; - --image) - # Do nothing - ;; - --ldflags) - echo $LDFLAGS - ;; - --libs) - if test $static = no; then - libs="@EXTLINKCUPS@"; - else - libs="$libdir/libcups.a $LIBS"; - fi - echo $libs - ;; - --serverbin) - echo $cups_serverbin - ;; - --serverroot) - echo $cups_serverroot - ;; - --static) - if test -z "$INSTALLSTATIC"; then - echo "WARNING: Static libraries not installed." >&2 - else - static=yes - fi - ;; - --version) - echo $VERSION - ;; - *) - usage 1 - ;; - esac - - shift -done diff --git a/doc/Makefile b/doc/Makefile index 89ec7c729d..fab908857f 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -1,7 +1,7 @@ # # Documentation makefile for CUPS. # -# Copyright © 2020-2024 by OpenPrinting. +# Copyright © 2020-2025 by OpenPrinting. # Copyright © 2007-2019 by Apple Inc. # Copyright © 1997-2007 by Easy Software Products. # @@ -51,7 +51,6 @@ HELPFILES = \ help/man-classes.conf.html \ help/man-client.conf.html \ help/man-cups.html \ - help/man-cups-config.html \ help/man-cups-files.conf.html \ help/man-cups-lpd.html \ help/man-cups-snmp.html \ diff --git a/doc/help/man-cups-config.html b/doc/help/man-cups-config.html deleted file mode 100644 index b84282e20b..0000000000 --- a/doc/help/man-cups-config.html +++ /dev/null @@ -1,124 +0,0 @@ - - - - - cups-config(1) - - -

cups-config(1)

-

Name

-

cups-config - get cups api, compiler, directory, and link information (deprecated). -

-

Synopsis

-

cups-config ---api-version -
-cups-config ---build -
-cups-config ---cflags -
-cups-config ---datadir -
-cups-config ---help -
-cups-config ---ldflags -
-cups-config -[ ---image -] [ ---static -] ---libs -
-cups-config ---serverbin -
-cups-config ---serverroot -
-cups-config ---version -
-

-

Description

-

The cups-config command allows application developers to determine the necessary command-line options for the compiler and linker, as well as the installation directories for filters, configuration files, and drivers. -All values are reported to the standard output. -Note: -This command is deprecated and will be removed in a future version of CUPS. -The -pkg-config(1) - -command should be used instead. -

-

Options

-

The cups-config command accepts the following command-line options: -

-

--api-version
-Reports the current API version (major.minor). -

-

--build
-Reports a system-specific build number. -

-

--cflags
-Reports the necessary compiler options. -

-

--datadir
-Reports the default CUPS data directory. -

-

--help
-Reports the program usage message. -

-

--ldflags
-Reports the necessary linker options. -

-

--libs
-Reports the necessary libraries to link to. -

-

--serverbin
-Reports the default CUPS binary directory, where filters and backends are stored. -

-

--serverroot
-Reports the default CUPS configuration file directory. -

-

--static
-When used with --libs, reports the static libraries instead of the default (shared) libraries. -

-

--version
-Reports the full version number of the CUPS installation (major.minor.patch). -

-

Examples

-

Show the currently installed version of CUPS: -

-
-    cups-config --version
-
-
-

Compile a simple one-file CUPS filter: -

-
-    cc `cups-config --cflags --ldflags` -o filter filter.c \
-        `cups-config --libs`
-
-

Deprecated Options

-

The following options are deprecated but continue to work for backwards compatibility: -

-

--image
-Formerly used to add the CUPS imaging library to the list of libraries. -

-

See Also

-

cups(1), - -pkg-config(1), - -CUPS Online Help (http://localhost:631/help) -

-

Copyright

-

Copyright © 2020-2024 by OpenPrinting. - - diff --git a/man/Makefile b/man/Makefile index c06c26322d..83a0f6d5df 100644 --- a/man/Makefile +++ b/man/Makefile @@ -3,7 +3,7 @@ # # The "html" target depends on "mantohtml" from https://www.msweet.org/mantohtml # -# Copyright © 2020-2024 by OpenPrinting. +# Copyright © 2020-2025 by OpenPrinting. # Copyright © 2007-2019 by Apple Inc. # Copyright © 1993-2006 by Easy Software Products. # @@ -20,7 +20,6 @@ include ../Makedefs MAN1 = cancel.1 \ cups.1 \ - cups-config.1 \ cupstestppd.1 \ ippeveprinter.1 \ $(IPPFIND_MAN) \ diff --git a/man/cups-config.1 b/man/cups-config.1 deleted file mode 100644 index 018349c0a2..0000000000 --- a/man/cups-config.1 +++ /dev/null @@ -1,116 +0,0 @@ -.\" -.\" cups-config man page for CUPS. -.\" -.\" Copyright © 2020-2024 by OpenPrinting. -.\" Copyright © 2007-2019 by Apple Inc. -.\" Copyright © 1997-2006 by Easy Software Products. -.\" -.\" Licensed under Apache License v2.0. See the file "LICENSE" for more -.\" information. -.\" -.TH cups-config 1 "CUPS" "2021-03-10" "OpenPrinting" -.SH NAME -cups\-config \- get cups api, compiler, directory, and link information (deprecated). -.SH SYNOPSIS -.B cups\-config -.I \-\-api\-version -.br -.B cups\-config -.I \-\-build -.br -.B cups\-config -.I \-\-cflags -.br -.B cups\-config -.I \-\-datadir -.br -.B cups\-config -.I \-\-help -.br -.B cups\-config -.I \-\-ldflags -.br -.B cups\-config -[ -.I \-\-image -] [ -.I \-\-static -] -.I \-\-libs -.br -.B cups\-config -.I \-\-serverbin -.br -.B cups\-config -.I \-\-serverroot -.br -.B cups-config -.I \-\-version -.br -.SH DESCRIPTION -The \fBcups-config\fR command allows application developers to determine the necessary command-line options for the compiler and linker, as well as the installation directories for filters, configuration files, and drivers. -All values are reported to the standard output. -.B Note: -This command is deprecated and will be removed in a future version of CUPS. -The -.BR pkg-config (1) -command should be used instead. -.SH OPTIONS -The \fBcups-config\fR command accepts the following command-line options: -.TP 5 -.B \-\-api-version -Reports the current API version (major.minor). -.TP 5 -.B \-\-build -Reports a system-specific build number. -.TP 5 -.B \-\-cflags -Reports the necessary compiler options. -.TP 5 -.B \-\-datadir -Reports the default CUPS data directory. -.TP 5 -.B \-\-help -Reports the program usage message. -.TP 5 -.B \-\-ldflags -Reports the necessary linker options. -.TP 5 -.B \-\-libs -Reports the necessary libraries to link to. -.TP 5 -.B \-\-serverbin -Reports the default CUPS binary directory, where filters and backends are stored. -.TP 5 -.B \-\-serverroot -Reports the default CUPS configuration file directory. -.TP 5 -.B \-\-static -When used with \fI\-\-libs\fR, reports the static libraries instead of the default (shared) libraries. -.TP 5 -.B \-\-version -Reports the full version number of the CUPS installation (major.minor.patch). -.SH EXAMPLES -Show the currently installed version of CUPS: -.nf - - cups-config \-\-version - -.fi -Compile a simple one-file CUPS filter: -.nf - - cc `cups\-config \-\-cflags \-\-ldflags` \-o filter filter.c \\ - `cups\-config \-\-libs` -.fi -.SH DEPRECATED OPTIONS -The following options are deprecated but continue to work for backwards compatibility: -.TP 5 -.B \-\-image -Formerly used to add the CUPS imaging library to the list of libraries. -.SH SEE ALSO -.BR cups (1), -.BR pkg-config (1), -CUPS Online Help (http://localhost:631/help) -.SH COPYRIGHT -Copyright \[co] 2020-2024 by OpenPrinting.