Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cupsd.conf.default is not a configuration file and should be shipped in /usr/share rather than etc #4342

Closed
michaelrsweet opened this issue Jan 16, 2014 · 2 comments
Labels
priority-low wontfix This will not be worked on
Milestone

Comments

@michaelrsweet
Copy link
Collaborator

Version: 1.7.1
CUPS.org User: odyx

Hi Michael,

Ansgar Burchardt reported on http://bugs.debian.org/640124 that cupsd.conf.default, not being a configuration file by itself but only its default value, should rather be installed in /usr/share/ instead of /etc.

The attached patch implements this.

@michaelrsweet
Copy link
Collaborator Author

CUPS.org User: mike

There is a lot of legacy code that references cupsd.conf.default in its current location. It would also be confusing for users wanting to manually restore the cupsd.conf to its default state if they have to look elsewhere.

This will not be changed.

@michaelrsweet
Copy link
Collaborator Author

"move-cupsd-conf-default-to-share.patch":

Description: Move cupsd.conf.default from SERVERROOT to DATADIR
Author: Didier Raboud odyx@debian.org
Origin: vendor
Bug-Debian: http://bugs.debian.org/640124
Last-Update: 2014-01-16

--- a/cgi-bin/admin.c
+++ b/cgi-bin/admin.c
@@ -2028,6 +2028,7 @@
int ch; /* Character from file /
char filename[1024]; /
Filename /
const char *server_root; /
Location of config files */

  • const char data_dir; / Location of data files */

/*
@@ -2111,7 +2112,10 @@

  • well...
    */
  • strlcat(filename, ".default", sizeof(filename));
  • if ((data_dir = getenv("CUPS_DATADIR")) == NULL)
  •  data_dir = CUPS_DATADIR;
    
  • snprintf(filename, sizeof(filename), "%s/cupsd.conf.default",data_dir);

if (!stat(filename, &info) && info.st_size < (1024 * 1024) &&
(cupsd = cupsFileOpen(filename, "r")) != NULL)
--- a/conf/Makefile
+++ b/conf/Makefile
@@ -77,7 +77,7 @@
$(INSTALL_CONFIG) -g $(CUPS_GROUP) $$file $(SERVERROOT) ;
fi ;
done

  • $(INSTALL_CONFIG) -g $(CUPS_GROUP) cupsd.conf $(SERVERROOT)/cupsd.conf.default
  • $(INSTALL_CONFIG) -g $(CUPS_GROUP) cupsd.conf $(DATADIR)/cupsd.conf.default
    $(INSTALL_DIR) -m 755 $(DATADIR)/mime
    for file in $(REPLACE); do
    if test -r $(DATADIR)/mime/$$file ; then
    @@ -124,9 +124,10 @@

uninstall:

  • for file in $(KEEP) $(REPLACE) cupsd.conf.default; do \
  • for file in $(KEEP) $(REPLACE); do
    $(RM) $(SERVERROOT)/$$file;
    done
  • $(RM) $(DATADIR)/cupsd.conf.default
    -$(RMDIR) $(SERVERROOT)
    for file in $(REPLACE); do
    $(RM) $(DATADIR)/mime/$$file; \

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority-low wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

1 participant