{"record":{"id":"3b723656d1393c5b","repo":"jordansissel/fpm","slug":"debian-packaging-tools-generally-labels-all-files","errorCode":null,"errorMessage":"Debian packaging tools generally labels all files in /etc as config files, as mandated by policy, so fpm defaults to this behavior for deb packages. You can disable this default behavior with --deb-no-default-config-files flag","messagePattern":"Debian packaging tools generally labels all files in /etc as config files, as mandated by policy, so fpm defaults to this behavior for deb packages\\. You can disable this default behavior with --deb-no-default-config-files flag","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"lib/fpm/package/deb.rb","lineNumber":1157,"sourceCode":"      # Strip leading /\n      path = path[1..-1] if path[0,1] == \"/\"\n      cfg_path = File.expand_path(path, staging_path)\n      Find.find(cfg_path) do |p|\n        if File.file?(p)\n          allconfigs << p.gsub(\"#{staging_path}/\", '')\n        end\n      end\n    end\n\n    # check for any init scripts or default files\n    inits    = attributes.fetch(:deb_init_list, [])\n    defaults = attributes.fetch(:deb_default_list, [])\n    upstarts = attributes.fetch(:deb_upstart_list, [])\n    etcfiles = []\n    # Add everything in /etc\n    begin\n      if !attributes[:deb_no_default_config_files?] && File.exist?(staging_path(\"/etc\"))\n        logger.warn(\"Debian packaging tools generally labels all files in /etc as config files, \" \\\n                    \"as mandated by policy, so fpm defaults to this behavior for deb packages. \" \\\n                    \"You can disable this default behavior with --deb-no-default-config-files flag\")\n        add_path(\"/etc\", etcfiles)\n      end\n    rescue Errno::ENOENT\n    end\n\n    return unless (config_files.any? or inits.any? or defaults.any? or upstarts.any? or etcfiles.any?)\n\n    allconfigs = etcfiles\n\n    # scan all conf file paths for files and add them\n    config_files.each do |path|\n      logger.debug(\"Checking if #{path} exists\")\n      cfe = File.exist?(\"#{path}\")\n      logger.debug(\"Check result #{cfe}\")\n      begin\n        add_path(path, allconfigs)","sourceCodeStart":1139,"sourceCodeEnd":1175,"githubUrl":"https://github.com/jordansissel/fpm/blob/b6d77ba72a560b687723376a0e5115c3a92634ad/lib/fpm/package/deb.rb#L1139-L1175","documentation":"Error \"Debian packaging tools generally labels all files in /etc as config files, as mandated by policy, so fpm defaults to this behavior for deb packages. You can disable this default behavior with --deb-no-default-config-files flag\" thrown in jordansissel/fpm.","triggerScenarios":"Thrown at lib/fpm/package/deb.rb:1157 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b6d77ba72a560b687723376a0e5115c3a92634ad","analyzedAt":"2026-08-21T16:39:02.570Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}