Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH v2 0/3] Identify existing configuration files
@ 2015-03-09 23:52 Rob Woolley
  2015-03-09 23:52 ` [PATCH v2 1/3] nfs-utils: Install nfsmount.conf Rob Woolley
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Rob Woolley @ 2015-03-09 23:52 UTC (permalink / raw)
  To: openembedded-core

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 |    3 +++
 1 file changed, 3 insertions(+)

 meta/recipes-connectivity/nfs-utils/nfs-utils_1.3.1.bb |    7 +++++++
 1 file changed, 7 insertions(+)

 meta/recipes-extended/logrotate/logrotate_3.8.8.bb     |    3 +++
 1 file changed, 3 insertions(+)

UPDATE: I updated the patches to use the proper GNU Coding Standard directory
variables.  I also added a patch to add nfsmount.conf to nfs-utils-client as it 
seemed to be missing by accident rather than by omission.

Signed-off-by: Rob Woolley <rob.woolley@windriver.com>


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH v2 1/3] nfs-utils: Install nfsmount.conf
  2015-03-09 23:52 [PATCH v2 0/3] Identify existing configuration files Rob Woolley
@ 2015-03-09 23:52 ` Rob Woolley
  2015-03-09 23:52 ` [PATCH v2 2/3] nfs-utils: Identify CONFFILES Rob Woolley
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 8+ messages in thread
From: Rob Woolley @ 2015-03-09 23:52 UTC (permalink / raw)
  To: openembedded-core

The file nfsmount.conf is present in nfs-utils but not installed to the 
filesystem.  It has been added to nfs-utils-client as it seemed to be 
missing accidentally rather than being removed intentionally.  The binary
files in nfs-utils-client have a hard-coded reference to it and we 
already provide the manpage for it in nfs-utils-doc.

Signed-off by: Rob Woolley <rob.woolley@windriver.com>
diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils_1.3.1.bb b/meta/recipes-connectivity/nfs-utils/nfs-utils_1.3.1.bb
index e4655d9..1439063 100644
--- a/meta/recipes-connectivity/nfs-utils/nfs-utils_1.3.1.bb
+++ b/meta/recipes-connectivity/nfs-utils/nfs-utils_1.3.1.bb
@@ -73,6 +73,7 @@ FILES_${PN}-client = "${base_sbindir}/*mount.nfs* ${sbindir}/*statd \
 		      ${sbindir}/showmount ${sbindir}/nfsstat \
 		      ${localstatedir}/lib/nfs \
 		      ${sysconfdir}/nfs-utils.conf \
+		      ${sysconfdir}/nfsmount.conf \
 		      ${sysconfdir}/init.d/nfscommon \
 		      ${systemd_unitdir}/system/nfs-statd.service"
 FILES_${PN}-stats = "${sbindir}/mountstats ${sbindir}/nfsiostat"
@@ -90,6 +91,8 @@ do_install_append () {
 	install -m 0755 ${WORKDIR}/nfscommon ${D}${sysconfdir}/init.d/nfscommon
 
 	install -m 0755 ${WORKDIR}/nfs-utils.conf ${D}${sysconfdir}
+	install -m 0755 ${S}/utils/mount/nfsmount.conf ${D}${sysconfdir}
+
 	install -d ${D}${systemd_unitdir}/system
 	install -m 0644 ${WORKDIR}/nfs-server.service ${D}${systemd_unitdir}/system/
 	install -m 0644 ${WORKDIR}/nfs-mountd.service ${D}${systemd_unitdir}/system/


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH v2 2/3] nfs-utils: Identify CONFFILES
  2015-03-09 23:52 [PATCH v2 0/3] Identify existing configuration files Rob Woolley
  2015-03-09 23:52 ` [PATCH v2 1/3] nfs-utils: Install nfsmount.conf Rob Woolley
@ 2015-03-09 23:52 ` Rob Woolley
  2015-03-10 16:05   ` Burton, Ross
  2015-03-09 23:52 ` [PATCH v2 3/3] logrotate: " Rob Woolley
  2015-03-10 13:51 ` [PATCH v2 0/3] Identify existing configuration files Burton, Ross
  3 siblings, 1 reply; 8+ messages in thread
From: Rob Woolley @ 2015-03-09 23:52 UTC (permalink / raw)
  To: openembedded-core

Some package formats explicitly track which files are configuration files
so that they are not overwritten on updates. We must use an explicit list
instead of a wildcard as nfs-utils-client provides files under 
${localstatedir}/lib/nfs that are not configuration files.

Signed-off by: Rob Woolley <rob.woolley@windriver.com>
diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils_1.3.1.bb b/meta/recipes-connectivity/nfs-utils/nfs-utils_1.3.1.bb
index 1439063..6f64e9d 100644
--- a/meta/recipes-connectivity/nfs-utils/nfs-utils_1.3.1.bb
+++ b/meta/recipes-connectivity/nfs-utils/nfs-utils_1.3.1.bb
@@ -68,6 +68,13 @@ PACKAGECONFIG[nfsidmap] = "--enable-nfsidmap,--disable-nfsidmap,keyutils"
 INHIBIT_AUTO_STAGE = "1"
 
 PACKAGES =+ "${PN}-client ${PN}-stats"
+
+CONFFILES_${PN}-client += "${localstatedir}/lib/nfs/etab \
+			   ${localstatedir}/lib/nfs/rmtab \
+			   ${localstatedir}/lib/nfs/xtab \
+			   ${localstatedir}/lib/nfs/statd/state \
+			   ${sysconfdir}/nfsmount.conf"
+
 FILES_${PN}-client = "${base_sbindir}/*mount.nfs* ${sbindir}/*statd \
 		      ${sbindir}/rpc.idmapd ${sbindir}/sm-notify \
 		      ${sbindir}/showmount ${sbindir}/nfsstat \


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH v2 3/3] logrotate: Identify CONFFILES
  2015-03-09 23:52 [PATCH v2 0/3] Identify existing configuration files Rob Woolley
  2015-03-09 23:52 ` [PATCH v2 1/3] nfs-utils: Install nfsmount.conf Rob Woolley
  2015-03-09 23:52 ` [PATCH v2 2/3] nfs-utils: Identify CONFFILES Rob Woolley
@ 2015-03-09 23:52 ` Rob Woolley
  2015-03-10 13:51 ` [PATCH v2 0/3] Identify existing configuration files Burton, Ross
  3 siblings, 0 replies; 8+ messages in thread
From: Rob Woolley @ 2015-03-09 23:52 UTC (permalink / raw)
  To: openembedded-core

Some package formats explicitly track which files are configuration files
so that they are not overwritten on updates. We must use an explicit list
instead of a wildcard as logrotate also provides files under ${sysconfdir}
that are not configuration files.

Signed-off by: Rob Woolley <rob.woolley@windriver.com>
diff --git a/meta/recipes-extended/logrotate/logrotate_3.8.8.bb b/meta/recipes-extended/logrotate/logrotate_3.8.8.bb
index 00432de..e3cfa90 100644
--- a/meta/recipes-extended/logrotate/logrotate_3.8.8.bb
+++ b/meta/recipes-extended/logrotate/logrotate_3.8.8.bb
@@ -27,6 +27,9 @@ PACKAGECONFIG ?= "\
 PACKAGECONFIG[acl] = ",,acl"
 PACKAGECONFIG[selinux] = ",,libselinux"
 
+CONFFILES_${PN} += "${localstatedir}/lib/logrotate.status \
+		    ${sysconfdir}/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 = "\


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH v2 0/3] Identify existing configuration files
  2015-03-09 23:52 [PATCH v2 0/3] Identify existing configuration files Rob Woolley
                   ` (2 preceding siblings ...)
  2015-03-09 23:52 ` [PATCH v2 3/3] logrotate: " Rob Woolley
@ 2015-03-10 13:51 ` Burton, Ross
  2015-03-10 15:37   ` Rob Woolley
  3 siblings, 1 reply; 8+ messages in thread
From: Burton, Ross @ 2015-03-10 13:51 UTC (permalink / raw)
  To: Rob Woolley; +Cc: OE-core

[-- Attachment #1: Type: text/plain, Size: 487 bytes --]

Hi Rob,

On 9 March 2015 at 23:52, Rob Woolley <rob.woolley@windriver.com> wrote:

> 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.
>

Do you have these patches in a branch?  git am is claiming they're
corrupted, so something must have happened to them in transit.

Cheers,
Ross

[-- Attachment #2: Type: text/html, Size: 964 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v2 0/3] Identify existing configuration files
  2015-03-10 13:51 ` [PATCH v2 0/3] Identify existing configuration files Burton, Ross
@ 2015-03-10 15:37   ` Rob Woolley
  0 siblings, 0 replies; 8+ messages in thread
From: Rob Woolley @ 2015-03-10 15:37 UTC (permalink / raw)
  To: Burton, Ross; +Cc: OE-core

[-- Attachment #1: Type: text/plain, Size: 838 bytes --]

Hi Ross,

Sure thing.

I applied them to a fresh clone of openembedded-core.git and pushed it 
to the conffiles branch on github:
https://github.com/rcwoolley/openembedded-core/tree/conffiles

Regards,
Rob

On 03/10/2015 09:51 AM, Burton, Ross wrote:
> Hi Rob,
>
> On 9 March 2015 at 23:52, Rob Woolley <rob.woolley@windriver.com 
> <mailto:rob.woolley@windriver.com>> wrote:
>
>     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.
>
>
> Do you have these patches in a branch?  git am is claiming they're 
> corrupted, so something must have happened to them in transit.
>
> Cheers,
> Ross


[-- Attachment #2: Type: text/html, Size: 2214 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v2 2/3] nfs-utils: Identify CONFFILES
  2015-03-09 23:52 ` [PATCH v2 2/3] nfs-utils: Identify CONFFILES Rob Woolley
@ 2015-03-10 16:05   ` Burton, Ross
  2015-03-10 17:14     ` Rob Woolley
  0 siblings, 1 reply; 8+ messages in thread
From: Burton, Ross @ 2015-03-10 16:05 UTC (permalink / raw)
  To: Rob Woolley; +Cc: OE-core

[-- Attachment #1: Type: text/plain, Size: 503 bytes --]

On 9 March 2015 at 23:52, Rob Woolley <rob.woolley@windriver.com> wrote:

> +CONFFILES_${PN}-client += "${localstatedir}/lib/nfs/etab \
> +                          ${localstatedir}/lib/nfs/rmtab \
> +                          ${localstatedir}/lib/nfs/xtab \
> +                          ${localstatedir}/lib/nfs/statd/state \
> +                          ${sysconfdir}/nfsmount.conf"
>

NFS puts configuration files in /var/lib?  Are files called "state" really
configuration files?

Ross

[-- Attachment #2: Type: text/html, Size: 1087 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v2 2/3] nfs-utils: Identify CONFFILES
  2015-03-10 16:05   ` Burton, Ross
@ 2015-03-10 17:14     ` Rob Woolley
  0 siblings, 0 replies; 8+ messages in thread
From: Rob Woolley @ 2015-03-10 17:14 UTC (permalink / raw)
  To: Burton, Ross; +Cc: OE-core

[-- Attachment #1: Type: text/plain, Size: 1253 bytes --]

Hi Ross,

My understanding is that they are used to help make NFS state-full. The 
"state" file is part of the extension to add Network Status Monitoring 
(NSM) to NFS.

In the RPM world, they need to label them as configuration files to 
avoid them getting overwritten during an upgrade.

The Debian approach removes them on a "purge" in the postrm stage and 
ignore them when doing an "upgrade" in the prerm stage.

So, technically they are not configuration files.  Would another 
approach such as removing them as packaged files and touching the files 
in a postinstall script be preferred?

Regards,
Rob

On 03/10/2015 12:05 PM, Burton, Ross wrote:
>
> On 9 March 2015 at 23:52, Rob Woolley <rob.woolley@windriver.com 
> <mailto:rob.woolley@windriver.com>> wrote:
>
>     +CONFFILES_${PN}-client += "${localstatedir}/lib/nfs/etab \
>     +                          ${localstatedir}/lib/nfs/rmtab \
>     +                          ${localstatedir}/lib/nfs/xtab \
>     +                          ${localstatedir}/lib/nfs/statd/state \
>     +                          ${sysconfdir}/nfsmount.conf"
>
>
> NFS puts configuration files in /var/lib?  Are files called "state" 
> really configuration files?
>
> Ross


[-- Attachment #2: Type: text/html, Size: 2703 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2015-03-10 17:14 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-09 23:52 [PATCH v2 0/3] Identify existing configuration files Rob Woolley
2015-03-09 23:52 ` [PATCH v2 1/3] nfs-utils: Install nfsmount.conf Rob Woolley
2015-03-09 23:52 ` [PATCH v2 2/3] nfs-utils: Identify CONFFILES Rob Woolley
2015-03-10 16:05   ` Burton, Ross
2015-03-10 17:14     ` Rob Woolley
2015-03-09 23:52 ` [PATCH v2 3/3] logrotate: " Rob Woolley
2015-03-10 13:51 ` [PATCH v2 0/3] Identify existing configuration files Burton, Ross
2015-03-10 15:37   ` Rob Woolley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox