All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH]statd: create statdpath dir if specify the "--with-statdpath=xx" parameter in configure nfs-utils source code
@ 2014-06-05  8:14 Ditang Chen
  2014-06-05 12:38 ` Trond Myklebust
  2014-06-06  3:17 ` Ditang Chen
  0 siblings, 2 replies; 7+ messages in thread
From: Ditang Chen @ 2014-06-05  8:14 UTC (permalink / raw)
  To: Steve Dickson, linux-nfs

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.

Signed-off-by: chendt.fnst@cn.fujitsu.com
---
 Makefile.am | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index ae7cd16..5c9ef44 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -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
-- 
1.8.2.1

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

* Re: [PATCH]statd: create statdpath dir if specify the "--with-statdpath=xx" parameter in configure nfs-utils source code
  2014-06-05  8:14 [PATCH]statd: create statdpath dir if specify the "--with-statdpath=xx" parameter in configure nfs-utils source code Ditang Chen
@ 2014-06-05 12:38 ` Trond Myklebust
  2014-06-05 14:15   ` Steve Dickson
  2014-06-06  3:17 ` Ditang Chen
  1 sibling, 1 reply; 7+ messages in thread
From: Trond Myklebust @ 2014-06-05 12:38 UTC (permalink / raw)
  To: Ditang Chen; +Cc: Steve Dickson, linux-nfs

On Thu, Jun 5, 2014 at 4:14 AM, Ditang Chen <chendt.fnst@cn.fujitsu.com> wrote:
> 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.
>
> Signed-off-by: chendt.fnst@cn.fujitsu.com
> ---
>  Makefile.am | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/Makefile.am b/Makefile.am
> index ae7cd16..5c9ef44 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -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
>

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.

-- 
Trond Myklebust

Linux NFS client maintainer, PrimaryData

trond.myklebust@primarydata.com

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

* Re: [PATCH]statd: create statdpath dir if specify the "--with-statdpath=xx" parameter in configure nfs-utils source code
  2014-06-05 12:38 ` Trond Myklebust
@ 2014-06-05 14:15   ` Steve Dickson
  2014-06-05 14:20     ` Trond Myklebust
  0 siblings, 1 reply; 7+ messages in thread
From: Steve Dickson @ 2014-06-05 14:15 UTC (permalink / raw)
  To: Trond Myklebust, Ditang Chen; +Cc: linux-nfs

Hey,

On 06/05/2014 08:38 AM, Trond Myklebust wrote:
> On Thu, Jun 5, 2014 at 4:14 AM, Ditang Chen <chendt.fnst@cn.fujitsu.com> wrote:
>> 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.
>>
>> Signed-off-by: chendt.fnst@cn.fujitsu.com
>> ---
>>  Makefile.am | 6 +++---
>>  1 file changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/Makefile.am b/Makefile.am
>> index ae7cd16..5c9ef44 100644
>> --- a/Makefile.am
>> +++ b/Makefile.am
>> @@ -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
>>
> 
> The 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. 


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

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

* Re: [PATCH]statd: create statdpath dir if specify the "--with-statdpath=xx" parameter in configure nfs-utils source code
  2014-06-05 14:15   ` Steve Dickson
@ 2014-06-05 14:20     ` Trond Myklebust
  2014-06-06  3:09       ` Ditang Chen
  0 siblings, 1 reply; 7+ messages in thread
From: Trond Myklebust @ 2014-06-05 14:20 UTC (permalink / raw)
  To: Steve Dickson; +Cc: Ditang Chen, linux-nfs

On Thu, Jun 5, 2014 at 10:15 AM, Steve Dickson <SteveD@redhat.com> wrote:
> Hey,
>
> On 06/05/2014 08:38 AM, Trond Myklebust wrote:
>> On Thu, Jun 5, 2014 at 4:14 AM, Ditang Chen <chendt.fnst@cn.fujitsu.com> wrote:
>>> 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.
>>>
>>> Signed-off-by: chendt.fnst@cn.fujitsu.com
>>> ---
>>>  Makefile.am | 6 +++---
>>>  1 file changed, 3 insertions(+), 3 deletions(-)
>>>
>>> diff --git a/Makefile.am b/Makefile.am
>>> index ae7cd16..5c9ef44 100644
>>> --- a/Makefile.am
>>> +++ b/Makefile.am
>>> @@ -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
>>>
>>
>> The 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.
>
>
>>
>> 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.



-- 
Trond Myklebust

Linux NFS client maintainer, PrimaryData

trond.myklebust@primarydata.com

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

* Re: [PATCH]statd: create statdpath dir if specify the "--with-statdpath=xx" parameter in configure nfs-utils source code
  2014-06-05 14:20     ` Trond Myklebust
@ 2014-06-06  3:09       ` Ditang Chen
  0 siblings, 0 replies; 7+ messages in thread
From: Ditang Chen @ 2014-06-06  3:09 UTC (permalink / raw)
  To: Trond Myklebust, Steve Dickson; +Cc: linux-nfs, yaoxp

On 06/05/2014 10:20 PM, Trond Myklebust wrote:
> On Thu, Jun 5, 2014 at 10:15 AM, Steve Dickson <SteveD@redhat.com> wrote:
>> Hey,
>>
>> On 06/05/2014 08:38 AM, Trond Myklebust wrote:
>>> On Thu, Jun 5, 2014 at 4:14 AM, Ditang Chen <chendt.fnst@cn.fujitsu.com> wrote:
>>>> 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.
>>>>
>>>> Signed-off-by: chendt.fnst@cn.fujitsu.com
>>>> ---
>>>>  Makefile.am | 6 +++---
>>>>  1 file changed, 3 insertions(+), 3 deletions(-)
>>>>
>>>> diff --git a/Makefile.am b/Makefile.am
>>>> index ae7cd16..5c9ef44 100644
>>>> --- a/Makefile.am
>>>> +++ b/Makefile.am
>>>> @@ -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
>>>>
>>>
>>> The 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.
>>
>>
>>>
>>> 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.
> 
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.
> 
> 


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

* [PATCH]statd: create statdpath dir if specify the "--with-statdpath=xx" parameter in configure nfs-utils source code
  2014-06-05  8:14 [PATCH]statd: create statdpath dir if specify the "--with-statdpath=xx" parameter in configure nfs-utils source code Ditang Chen
  2014-06-05 12:38 ` Trond Myklebust
@ 2014-06-06  3:17 ` Ditang Chen
  2014-06-17 18:06   ` Steve Dickson
  1 sibling, 1 reply; 7+ messages in thread
From: Ditang Chen @ 2014-06-06  3:17 UTC (permalink / raw)
  To: Steve Dickson; +Cc: Trond Myklebust, linux-nfs, yaoxp

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.

Signed-off-by: chendt.fnst@cn.fujitsu.com
Reported-by: yaoxp@cn.fujitsu.com
---
 Makefile.am | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index ae7cd16..5824adc 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -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
-- 
1.8.2.1


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

* Re: [PATCH]statd: create statdpath dir if specify the "--with-statdpath=xx" parameter in configure nfs-utils source code
  2014-06-06  3:17 ` Ditang Chen
@ 2014-06-17 18:06   ` Steve Dickson
  0 siblings, 0 replies; 7+ messages in thread
From: Steve Dickson @ 2014-06-17 18:06 UTC (permalink / raw)
  To: Ditang Chen; +Cc: Trond Myklebust, linux-nfs, yaoxp



On 06/05/2014 11:17 PM, Ditang Chen wrote:
> 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.
> 
> Signed-off-by: chendt.fnst@cn.fujitsu.com
> Reported-by: yaoxp@cn.fujitsu.com
> ---
>  Makefile.am | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
Committed.... 

steved
> 
> diff --git a/Makefile.am b/Makefile.am
> index ae7cd16..5824adc 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -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
> 

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

end of thread, other threads:[~2014-06-17 18:06 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-05  8:14 [PATCH]statd: create statdpath dir if specify the "--with-statdpath=xx" parameter in configure nfs-utils source code Ditang Chen
2014-06-05 12:38 ` Trond Myklebust
2014-06-05 14:15   ` Steve Dickson
2014-06-05 14:20     ` Trond Myklebust
2014-06-06  3:09       ` Ditang Chen
2014-06-06  3:17 ` Ditang Chen
2014-06-17 18:06   ` Steve Dickson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.