From 5d1dc7856e34c2815fbfa25f52c8ea34876152ff Mon Sep 17 00:00:00 2001 From: Vlastimil Holer Date: Thu, 21 Sep 2017 13:05:47 +0200 Subject: [PATCH] gh-84: Only selected files in /etc are config files --- generate.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/generate.sh b/generate.sh index 4080500..ac09623 100755 --- a/generate.sh +++ b/generate.sh @@ -105,6 +105,12 @@ fi if [ "${TYPE}" = 'dir' ]; then cp -rT "${BUILD_DIR}" "${OUT}" else + CONFIG_FILES=$(cd "${BUILD_DIR}" && \ + find etc/ \ + ! -path 'etc/one-context.d/*' \ + ! -path 'etc/init*' \ + -type f -printf '--config-files %p ') + fpm --name "${NAME}" --version "${VERSION}" --iteration "${RELEASE_FULL}" \ --architecture all --license "${LICENSE}" \ --vendor "${VENDOR}" --maintainer "${MAINTAINER}" \ @@ -117,6 +123,8 @@ else ${DEPENDS:+ --depends ${DEPENDS// / --depends }} \ --replaces "${REPLACES}" \ --conflicts "${REPLACES}" \ + --deb-no-default-config-files \ + ${CONFIG_FILES} \ --package "${OUT}" # --provides "${REPLACES}" \ fi