statd: create statdpath dir if specify the "--with-statdpath=xx" parameter in configure nfs-utils source code
Subsystems (3)
PATCH 1/1 statd: create statdpath dir if specify the "--with-statdpath=xx" parameter in configure nfs-utils source code
When configure the nfs-utils source code with "--with-statdpath=/foo" parameter, #define NSM_DEFAULT_STATEDIR "/foo" will be generated in support/include/config.h file, but Makefile will not create "/foo" dir.
--- Makefile.am | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
Makefile.am +3 -3
@@ -54,10 +54,10 @@ install-data-hook: touch $(DESTDIR)$(statedir)/xtab; chmod 644 $(DESTDIR)$(statedir)/xtab touch $(DESTDIR)$(statedir)/etab; chmod 644 $(DESTDIR)$(statedir)/etab touch $(DESTDIR)$(statedir)/rmtab; chmod 644 $(DESTDIR)$(statedir)/rmtab - mkdir -p $(DESTDIR)$(statedir)/sm $(DESTDIR)$(statedir)/sm.bak touch $(DESTDIR)$(statedir)/state - chmod go-rwx $(DESTDIR)$(statedir)/sm $(DESTDIR)$(statedir)/sm.bak $(DESTDIR)$(statedir)/state - -chown $(statduser) $(DESTDIR)$(statedir)/sm $(DESTDIR)$(statedir)/sm.bak $(DESTDIR)$(statedir)/state + mkdir -p $(DESTDIR)$(statdpath)/sm $(DESTDIR)$(statdpath)/sm.bak + chmod go-rwx $(DESTDIR)$(statdpath)/sm $(DESTDIR)$(statdpath)/sm.bak $(DESTDIR)$(statedir)/state + -chown $(statduser) $(DESTDIR)$(statdpath)/sm $(DESTDIR)$(statdpath)/sm.bak $(DESTDIR)$(statedir)/state uninstall-hook: rm $(DESTDIR)$(statedir)/xtab
Signature · 1 line
1.8.2.1
Quoted 15 lines · Ditang Chen
When configure the nfs-utils source code with "--with-statdpath=/foo" parameter, #define
NSM_DEFAULT_STATEDIR"/foo" will be generated insupport/include/config.hfile, butMakefilewill not create "/foo" dir.Signed-off-by [email protected]--- Makefile.am | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)Makefile.am +0
-0@@ -54,10 +54,10 @@ install-data-hook: touch $(DESTDIR)$(statedir)/xtab; chmod 644 $(DESTDIR)$(statedir)/xtab
Makefile.am install-data-hook: · line 61
Quoted 10 lines
Makefile.am +3
-3touch $(DESTDIR)$(statedir)/etab; chmod 644 $(DESTDIR)$(statedir)/etab touch $(DESTDIR)$(statedir)/rmtab; chmod 644 $(DESTDIR)$(statedir)/rmtab - mkdir -p $(DESTDIR)$(statedir)/sm $(DESTDIR)$(statedir)/sm.bak touch $(DESTDIR)$(statedir)/state - chmod go-rwx $(DESTDIR)$(statedir)/sm $(DESTDIR)$(statedir)/sm.bak $(DESTDIR)$(statedir)/state - -chown $(statduser) $(DESTDIR)$(statedir)/sm $(DESTDIR)$(statedir)/sm.bak $(DESTDIR)$(statedir)/state + mkdir -p $(DESTDIR)$(statdpath)/sm $(DESTDIR)$(statdpath)/sm.bak + chmod go-rwx $(DESTDIR)$(statdpath)/sm $(DESTDIR)$(statdpath)/sm.bak $(DESTDIR)$(statedir)/state + -chown $(statduser) $(DESTDIR)$(statdpath)/sm $(DESTDIR)$(statdpath)/sm.bak $(DESTDIR)$(statedir)/state
The file 'state' is owned by rpc.statd. Isn't it therefore also subject to the --with-statdpath modifier?
At one point, the Fedora RPM packager even used to put it in /var/lib/nfs/statd (as the manpage says it should) although that seems to be broken now.
Signature · 5 lines
Trond Myklebust Linux NFS client maintainer, PrimaryData [email protected]
Hey,
Quoted 21 lines · Trond Myklebust
Quoted 20 lines · Ditang Chen
When configure the nfs-utils source code with "--with-statdpath=/foo" parameter, #define
NSM_DEFAULT_STATEDIR"/foo" will be generated insupport/include/config.hfile, butMakefilewill not create "/foo" dir.Signed-off-by [email protected]--- Makefile.am | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)Makefile.am +0
-2@@ -54,10 +54,10 @@ install-data-hook: touch $(DESTDIR)$(statedir)/xtab; chmod 644 $(DESTDIR)$(statedir)/xtab touch $(DESTDIR)$(statedir)/etab; chmod 644 $(DESTDIR)$(statedir)/etab touch $(DESTDIR)$(statedir)/rmtab; chmod 644 $(DESTDIR)$(statedir)/rmtab - mkdir -p $(DESTDIR)$(statedir)/sm $(DESTDIR)$(statedir)/sm.bak touch $(DESTDIR)$(statedir)/state - chmod go-rwx $(DESTDIR)$(statedir)/sm $(DESTDIR)$(statedir)/sm.bak $(DESTDIR)$(statedir)/state
Quoted 8 lines
Makefile.am install-data-hook: · line 61
Quoted 5 lines
Makefile.am +3
-1- -chown $(statduser) $(DESTDIR)$(statedir)/sm $(DESTDIR)$(statedir)/sm.bak $(DESTDIR)$(statedir)/state + mkdir -p $(DESTDIR)$(statdpath)/sm $(DESTDIR)$(statdpath)/sm.bak + chmod go-rwx $(DESTDIR)$(statdpath)/sm $(DESTDIR)$(statdpath)/sm.bak $(DESTDIR)$(statedir)/state + -chown $(statduser) $(DESTDIR)$(statdpath)/sm $(DESTDIR)$(statdpath)/sm.bak $(DESTDIR)$(statedir)/stateThe file 'state' is owned by rpc.statd. Isn't it therefore also subject to the --with-statdpath modifier?
--with-statedir and --with-statdpath are basically the same thing. When --with-statdpath is not specified, its set to the --with-statedir value, that's why this these mkdir,chmod and chown were not needed. But I guess if you do want split out the statdpath from the statedir those mkdir,chmod and chown need to happen.
Quoted 5 lines
At one point, the Fedora RPM packager even used to put it in
/var/lib/nfs/statd(as the manpage says it should) although that seems to be broken now.
It still does... So does RHEL... We have being going that for years... How is that broken?
steved.
Quoted 40 lines · Steve Dickson
Hey,
Quoted 21 lines · Trond Myklebust
Quoted 20 lines · Ditang Chen
When configure the nfs-utils source code with "--with-statdpath=/foo" parameter, #define
NSM_DEFAULT_STATEDIR"/foo" will be generated insupport/include/config.hfile, butMakefilewill not create "/foo" dir.Signed-off-by [email protected]--- Makefile.am | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)Makefile.am +0
-2@@ -54,10 +54,10 @@ install-data-hook: touch $(DESTDIR)$(statedir)/xtab; chmod 644 $(DESTDIR)$(statedir)/xtab touch $(DESTDIR)$(statedir)/etab; chmod 644 $(DESTDIR)$(statedir)/etab touch $(DESTDIR)$(statedir)/rmtab; chmod 644 $(DESTDIR)$(statedir)/rmtab - mkdir -p $(DESTDIR)$(statedir)/sm $(DESTDIR)$(statedir)/sm.bak touch $(DESTDIR)$(statedir)/state - chmod go-rwx $(DESTDIR)$(statedir)/sm $(DESTDIR)$(statedir)/sm.bak $(DESTDIR)$(statedir)/stateQuoted 8 lines
Makefile.am install-data-hook: · line 61
Quoted 5 lines
Makefile.am +3
-1- -chown $(statduser) $(DESTDIR)$(statedir)/sm $(DESTDIR)$(statedir)/sm.bak $(DESTDIR)$(statedir)/state + mkdir -p $(DESTDIR)$(statdpath)/sm $(DESTDIR)$(statdpath)/sm.bak + chmod go-rwx $(DESTDIR)$(statdpath)/sm $(DESTDIR)$(statdpath)/sm.bak $(DESTDIR)$(statedir)/state + -chown $(statduser) $(DESTDIR)$(statdpath)/sm $(DESTDIR)$(statdpath)/sm.bak $(DESTDIR)$(statedir)/stateThe file 'state' is owned by rpc.statd. Isn't it therefore also subject to the --with-statdpath modifier?
--with-statedir and --with-statdpath are basically the same thing. When --with-statdpath is not specified, its set to the --with-statedir value, that's why this these mkdir,chmod and chown were not needed. But I guess if you do want split out the statdpath from the statedir those mkdir,chmod and chown need to happen.
Quoted 1 line
Quoted 7 lines
Quoted 4 lines
At one point, the Fedora RPM packager even used to put it in
/var/lib/nfs/statd(as the manpage says it should) although that seems to be broken now.It still does... So does RHEL... We have being going that for years... How is that broken?
My nfs-utils rpms on Fedora seem to be creating /var/lib/nfs/state instead of putting it in the statd subdirectory.
Signature · 5 lines
Trond Myklebust Linux NFS client maintainer, PrimaryData [email protected]
Quoted 45 lines · Trond Myklebust
Quoted 44 lines · Steve Dickson
Hey,
Quoted 21 lines · Trond Myklebust
Quoted 20 lines · Ditang Chen
When configure the nfs-utils source code with "--with-statdpath=/foo" parameter, #define
NSM_DEFAULT_STATEDIR"/foo" will be generated insupport/include/config.hfile, butMakefilewill not create "/foo" dir.Signed-off-by [email protected]--- Makefile.am | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)Makefile.am +0
-2@@ -54,10 +54,10 @@ install-data-hook: touch $(DESTDIR)$(statedir)/xtab; chmod 644 $(DESTDIR)$(statedir)/xtab touch $(DESTDIR)$(statedir)/etab; chmod 644 $(DESTDIR)$(statedir)/etab touch $(DESTDIR)$(statedir)/rmtab; chmod 644 $(DESTDIR)$(statedir)/rmtab - mkdir -p $(DESTDIR)$(statedir)/sm $(DESTDIR)$(statedir)/sm.bak touch $(DESTDIR)$(statedir)/state - chmod go-rwx $(DESTDIR)$(statedir)/sm $(DESTDIR)$(statedir)/sm.bak $(DESTDIR)$(statedir)/stateQuoted 8 lines
Makefile.am install-data-hook: · line 61
Quoted 5 lines
Makefile.am +3
-1- -chown $(statduser) $(DESTDIR)$(statedir)/sm $(DESTDIR)$(statedir)/sm.bak $(DESTDIR)$(statedir)/state + mkdir -p $(DESTDIR)$(statdpath)/sm $(DESTDIR)$(statdpath)/sm.bak + chmod go-rwx $(DESTDIR)$(statdpath)/sm $(DESTDIR)$(statdpath)/sm.bak $(DESTDIR)$(statedir)/state + -chown $(statduser) $(DESTDIR)$(statdpath)/sm $(DESTDIR)$(statdpath)/sm.bak $(DESTDIR)$(statedir)/stateThe file 'state' is owned by rpc.statd. Isn't it therefore also subject to the --with-statdpath modifier?
--with-statedir and --with-statdpath are basically the same thing. When --with-statdpath is not specified, its set to the --with-statedir value, that's why this these mkdir,chmod and chown were not needed. But I guess if you do want split out the statdpath from the statedir those mkdir,chmod and chown need to happen.
Quoted 5 lines
At one point, the Fedora RPM packager even used to put it in
/var/lib/nfs/statd(as the manpage says it should) although that seems to be broken now.
Quoted 7 lines
Quoted 3 lines
It still does... So does RHEL... We have being going that for years... How is that broken?
My nfs-utils rpms on Fedora seem to be creating
/var/lib/nfs/stateinstead of putting it in the statd subdirectory.
I tested it on RHEL, the file 'state' subject to the --with-statdpath modifier.
nfs-utils rpms on Fedora/RHEL split out the statdpath from the statedir,configure with '--with-statdpath=/var/lib/nfs/statd', and creating /var/lib/nfs/state file, but '/var/lib/nfs/state' seems not to be used, the really be used file is /var/lib/nfs/statd/state.
I‘ll send another patch to fix it.
Quoted 2 lines
PATCH 1/1 statd: create statdpath dir if specify the "--with-statdpath=xx" parameter in configure nfs-utils source code
In reply to Ditang ChenWhen configure the nfs-utils source code with "--with-statdpath=/foo" parameter, #define NSM_DEFAULT_STATEDIR "/foo" will be generated in support/include/config.h file, but Makefile will not create "/foo" dir.
--- Makefile.am | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
Makefile.am +5 -5
@@ -54,13 +54,13 @@ install-data-hook: touch $(DESTDIR)$(statedir)/xtab; chmod 644 $(DESTDIR)$(statedir)/xtab touch $(DESTDIR)$(statedir)/etab; chmod 644 $(DESTDIR)$(statedir)/etab touch $(DESTDIR)$(statedir)/rmtab; chmod 644 $(DESTDIR)$(statedir)/rmtab - mkdir -p $(DESTDIR)$(statedir)/sm $(DESTDIR)$(statedir)/sm.bak - touch $(DESTDIR)$(statedir)/state - chmod go-rwx $(DESTDIR)$(statedir)/sm $(DESTDIR)$(statedir)/sm.bak $(DESTDIR)$(statedir)/state - -chown $(statduser) $(DESTDIR)$(statedir)/sm $(DESTDIR)$(statedir)/sm.bak $(DESTDIR)$(statedir)/state + mkdir -p $(DESTDIR)$(statdpath)/sm $(DESTDIR)$(statdpath)/sm.bak + touch $(DESTDIR)$(statdpath)/state + chmod go-rwx $(DESTDIR)$(statdpath)/sm $(DESTDIR)$(statdpath)/sm.bak $(DESTDIR)$(statdpath)/state + -chown $(statduser) $(DESTDIR)$(statdpath)/sm $(DESTDIR)$(statdpath)/sm.bak $(DESTDIR)$(statdpath)/state uninstall-hook: rm $(DESTDIR)$(statedir)/xtab rm $(DESTDIR)$(statedir)/etab rm $(DESTDIR)$(statedir)/rmtab - rm $(DESTDIR)$(statedir)/state + rm $(DESTDIR)$(statdpath)/state
Signature · 1 line
1.8.2.1
Quoted 9 lines · Ditang Chen
When configure the nfs-utils source code with "--with-statdpath=/foo" parameter, #define
NSM_DEFAULT_STATEDIR"/foo" will be generated insupport/include/config.hfile, butMakefilewill not create "/foo" dir.Signed-off-by [email protected]Reported-by [email protected]--- Makefile.am | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
Committed....
steved
Quoted 25 lines
Makefile.am +5
-5@@ -54,13 +54,13 @@ install-data-hook: touch $(DESTDIR)$(statedir)/xtab; chmod 644 $(DESTDIR)$(statedir)/xtab touch $(DESTDIR)$(statedir)/etab; chmod 644 $(DESTDIR)$(statedir)/etab touch $(DESTDIR)$(statedir)/rmtab; chmod 644 $(DESTDIR)$(statedir)/rmtab - mkdir -p $(DESTDIR)$(statedir)/sm $(DESTDIR)$(statedir)/sm.bak - touch $(DESTDIR)$(statedir)/state - chmod go-rwx $(DESTDIR)$(statedir)/sm $(DESTDIR)$(statedir)/sm.bak $(DESTDIR)$(statedir)/state - -chown $(statduser) $(DESTDIR)$(statedir)/sm $(DESTDIR)$(statedir)/sm.bak $(DESTDIR)$(statedir)/state + mkdir -p $(DESTDIR)$(statdpath)/sm $(DESTDIR)$(statdpath)/sm.bak + touch $(DESTDIR)$(statdpath)/state + chmod go-rwx $(DESTDIR)$(statdpath)/sm $(DESTDIR)$(statdpath)/sm.bak $(DESTDIR)$(statdpath)/state + -chown $(statduser) $(DESTDIR)$(statdpath)/sm $(DESTDIR)$(statdpath)/sm.bak $(DESTDIR)$(statdpath)/state uninstall-hook: rm $(DESTDIR)$(statedir)/xtab rm $(DESTDIR)$(statedir)/etab rm $(DESTDIR)$(statedir)/rmtab - rm $(DESTDIR)$(statedir)/state + rm $(DESTDIR)$(statdpath)/state