Ticket #383 (closed defect: fixed)

Opened 15 years ago

Last modified 13 years ago

config-package-dev quoting bug fails to disallow transformation of generated conffiles

Reported by: andersk Owned by:
Priority: low Milestone: The Distant Future
Component: -- Keywords:
Cc: Fixed in version:
Upstream bug:

Description

Our original intention with the config-package-dev API was to disallow transformation of a generated conffiles, because there is no md5sum with which to check that the file is unmodified in the current build environment. Instead, one should transform the source of the generated conffile, e.g. /usr/share/kerberos-configs/krb.conf.template instead of /etc/krb.conf.debathena, as I think we do with all the current Debathena packages.

However, a quoting bug in check-files.mk causes this test to never trip:

$(call debian_check_files_tmp,%): package = $(shell dpkg -S $(name) | grep -v "^diversion by" | cut -f1 -d:)
$(call debian_check_files_tmp,%): $(truename)
	[ -n $(package) ]
	…

since both [ -n ] and [ -n foo ] return true.

Apparently XVM is a consumer of this API bug (/etc/postgresql/8.3/main/postgresql.conf in invirt-database), although that could easily be fixed.

Attachments

config-package-dev_trac383.diff Download (524 bytes) - added by broder 14 years ago.

Change History

comment:1 in reply to: ↑ description Changed 14 years ago by andersk

Replying to andersk:

Apparently XVM is a consumer of this API bug (/etc/postgresql/8.3/main/postgresql.conf in invirt-database), although that could easily be fixed.

As it turns out, this led to a bug in Invirt’s /etc/postgresql/8.3/main/postgresql.conf. (Specifically, the production servers ended up with a different locale configured than the dev servers, and an incorrect postgresql.conf eventually trickled back from prod to dev when invirt-database-server was built on prod.)

comment:2 Changed 14 years ago by jdreed

  • Milestone set to The Distant Future

Changed 14 years ago by broder

comment:3 Changed 14 years ago by broder

attachment:config-package-dev_trac383.diff Download makes the simple quoting change to fix this.

I've tested it against a current package that correctly uses DEB_TRANSFORM_FILES (alpine-config), and verified that it succeeds.

I've also tested it against a fake version of debathena-ssh-server-config that uses DEB_TRANSFORM_FILES instead of pulling the config file out of the postinst. That version successfully triggered the check and errored out.

comment:4 Changed 13 years ago by geofft

  • Status changed from new to development

This should be fixed in config-package-dev 4.12, which is in our -development repo for all releases as well as Wheezy and Oneiric.

comment:5 Changed 13 years ago by jdreed

  • Status changed from development to closed
  • Resolution set to fixed
Note: See TracTickets for help on using tickets.