Skip to contentSkip to conversation

Identify existing configuration files

PATCH Superseded Rob Woolley 3 participants 5 messages Mar 3, 2015 – Mar 4, 2015

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover Identify existing configuration files

Some package formats explicitly track which files are configuration files so that they are not overwritten on updates.

This series explicitly identifies files that were already being packaged, but not known as configuration files.

I built the RPM packages and compared the output of rpm -qp --filesbypkg with rpm -qp --configfiles against the equivalent packages in CentOS 7.

 meta/recipes-connectivity/nfs-utils/nfs-utils_1.3.1.bb |    6 ++++++
 1 file changed, 6 insertions(+)
 meta/recipes-extended/logrotate/logrotate_3.8.8.bb |    2 ++
 1 file changed, 2 insertions(+)
#1 lore raw

PATCH 1/2 nfs-utils: Identify CONFFILES

Some package formats explicitly track which files are configuration files so that they are not overwritten on updates. Explicitly list the configuration files.

Signed-off by: Rob Woolley <[email protected]>

recipes-connectivity/nfs-utils/nfs-utils_1.3.1.bb +6 -0
@@ -68,6 +68,12 @@ PACKAGECONFIG[nfsidmap] = "--enable-nfsi
 INHIBIT_AUTO_STAGE = "1"
 
 PACKAGES =+ "${PN}-client ${PN}-stats"
+
+CONFFILES_${PN}-client += "/var/lib/nfs/etab"
+CONFFILES_${PN}-client += "/var/lib/nfs/rmtab"
+CONFFILES_${PN}-client += "/var/lib/nfs/state"
+CONFFILES_${PN}-client += "/var/lib/nfs/xtab"
+
 FILES_${PN}-client = "${base_sbindir}/*mount.nfs* ${sbindir}/*statd \
 		      ${sbindir}/rpc.idmapd ${sbindir}/sm-notify \
 		      ${sbindir}/showmount ${sbindir}/nfsstat \
#2 lore raw

Re: [PATCH 1/2] nfs-utils: Identify CONFFILES

Quoted 8 lines · Rob Woolley

Some package formats explicitly track which files are configuration files so that they are not overwritten on updates. Explicitly list the configuration files.

Signed-off by: Rob Woolley <[email protected]>

recipes-connectivity/nfs-utils/nfs-utils_1.3.1.bb PACKAGECONFIG[nfsidmap] = "--enable-nfsi · line 75

Quoted 8 lines
recipes-connectivity/nfs-utils/nfs-utils_1.3.1.bb +5 -0
@@ -68,6 +68,12 @@ PACKAGECONFIG[nfsidmap] = "--enable-nfsi
 INHIBIT_AUTO_STAGE = "1"
 
 PACKAGES =+ "${PN}-client ${PN}-stats"
+
+CONFFILES_${PN}-client += "/var/lib/nfs/etab"
+CONFFILES_${PN}-client += "/var/lib/nfs/rmtab"
+CONFFILES_${PN}-client += "/var/lib/nfs/state"
+CONFFILES_${PN}-client += "/var/lib/nfs/xtab"

Use 1 multiline append and ${localstatedir}/lib/nfs.

Quoted 9 lines
recipes-connectivity/nfs-utils/nfs-utils_1.3.1.bb +1 -0
+
 FILES_${PN}-client = "${base_sbindir}/*mount.nfs* ${sbindir}/*statd \
 		      ${sbindir}/rpc.idmapd ${sbindir}/sm-notify \
 		      ${sbindir}/showmount ${sbindir}/nfsstat \
Signature · 4 lines
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Signature · 1 line
Martin 'JaMa' Jansa     jabber: [email protected]
#3 lore raw

PATCH 2/2 logrotate: Identify CONFFILES

In reply to Rob Woolley

Some package formats explicitly track which files are configuration files so that they are not overwritten on updates. Explicitly list the configuration files.

Signed-off by: Rob Woolley <[email protected]>

recipes-extended/logrotate/logrotate_3.8.8.bb +2 -0
@@ -27,6 +27,8 @@ PACKAGECONFIG ?= "\
 PACKAGECONFIG[acl] = ",,acl"
 PACKAGECONFIG[selinux] = ",,libselinux"
 
+CONFFILES_${PN} += "/var/lib/logrotate.status /etc/logrotate.conf"
+
 # If RPM_OPT_FLAGS is unset, it adds -g itself rather than obeying our
 # optimization variables, so use it rather than EXTRA_CFLAGS.
 EXTRA_OEMAKE = "\
#4 lore raw

Re: [PATCH 2/2] logrotate: Identify CONFFILES

Quoted 2 lines · Rob Woolley

+CONFFILES_${PN} += "/var/lib/logrotate.status /etc/logrotate.conf"

${localstatedir} and ${sysconfdir}, please.

Ross