All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH - rpcbind] Provide systemd unit files for rpcbind
@ 2016-10-12  6:01 NeilBrown
  2016-11-01 16:51 ` Steve Dickson
  0 siblings, 1 reply; 11+ messages in thread
From: NeilBrown @ 2016-10-12  6:01 UTC (permalink / raw)
  To: Steve Dickson; +Cc: libtirpc-devel, linux-nfs

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



To encourage uniformity across distributions, provide
systemd unit files.

If extra arguments are wanted for rpcbind, a drop-in should be used
to set the Environment= or read and EnvironmentFile=

As the "run" directory could be /run or /var/run we RequiresMountsFor
both of these.

rpcbind.service pulls in rpcbind.socket so that the listening sockets
chosen there will always be used.

Signed-off-by: NeilBrown <neilb@suse.com>
---
 .gitignore                 |  1 +
 Makefile.am                |  4 ++++
 configure.ac               |  7 ++++++-
 systemd/rpcbind.service.in | 17 +++++++++++++++++
 systemd/rpcbind.socket     | 19 +++++++++++++++++++
 5 files changed, 47 insertions(+), 1 deletion(-)
 create mode 100644 systemd/rpcbind.service.in
 create mode 100644 systemd/rpcbind.socket

hi,
 these are based on the unit files in use a SUSE, though I have made a
 few "improvements".
 If anyone has differences in their distros that you think we should
 have in mainline, I'd love to hear about it.

Thanks,
NeilBrown


diff --git a/.gitignore b/.gitignore
index 321dff64a57d..a8f1fed2acb6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -27,3 +27,4 @@ rpcbind
 rpcinfo
 # cscope database files
 cscope.*
+systemd/rpcbind.service
diff --git a/Makefile.am b/Makefile.am
index 5ec8cd66b689..43c27100ceae 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -50,6 +50,10 @@ if SYSTEMD
 AM_CPPFLAGS += $(SYSTEMD_CFLAGS) -DSYSTEMD
 
 rpcbind_LDADD += $(SYSTEMD_LIBS)
+
+systemdsystemunit_DATA = \
+	systemd/rpcbind.service \
+	systemd/rpcbind.socket
 endif
 
 rpcinfo_SOURCES =       src/rpcinfo.c
diff --git a/configure.ac b/configure.ac
index af4b74b31c9a..0892d8246a12 100644
--- a/configure.ac
+++ b/configure.ac
@@ -61,4 +61,9 @@ AC_SEARCH_LIBS([pthread_create], [pthread])
 
 AC_CHECK_HEADERS([nss.h rpcsvc/mount.h])
 
-AC_OUTPUT([Makefile])
+# make bindir available for substitution in config file
+# 2 "evals" needed to expand variable names
+AC_SUBST([_bindir])
+AC_CONFIG_COMMANDS_PRE([eval eval _bindir=$bindir])
+
+AC_OUTPUT([Makefile systemd/rpcbind.service])
diff --git a/systemd/rpcbind.service.in b/systemd/rpcbind.service.in
new file mode 100644
index 000000000000..4706b5a77abf
--- /dev/null
+++ b/systemd/rpcbind.service.in
@@ -0,0 +1,17 @@
+[Unit]
+Description=RPC Bind
+Documentation=man:rpcbind(8)
+DefaultDependencies=no
+RequiresMountsFor=/var/run /run
+# Make sure we use the IP addresses listed for
+# rpcbind.socket, no matter how this unit is started.
+Wants=rpcbind.socket
+After=rpcbind.socket
+
+[Service]
+Type=notify
+# distro can provide a drop-in adding EnvironmentFile=-/??? if needed.
+ExecStart=@_bindir@/rpcbind $RPCBIND_OPTIONS -w -f
+
+[Install]
+WantedBy=multi-user.target
diff --git a/systemd/rpcbind.socket b/systemd/rpcbind.socket
new file mode 100644
index 000000000000..7204c97efa6f
--- /dev/null
+++ b/systemd/rpcbind.socket
@@ -0,0 +1,19 @@
+[Unit]
+Description=RPCbind Server Activation Socket
+DefaultDependencies=no
+RequiresMountsFor=/var/run /run
+Wants=rpcbind.target
+Before=rpcbind.target
+
+[Socket]
+ListenStream=/var/run/rpcbind.sock
+
+# RPC netconfig can't handle ipv6/ipv4 dual sockets
+BindIPv6Only=ipv6-only
+ListenStream=0.0.0.0:111
+ListenDatagram=0.0.0.0:111
+ListenStream=[::]:111
+ListenDatagram=[::]:111
+
+[Install]
+WantedBy=sockets.target
-- 
2.10.0


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 800 bytes --]

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

* Re: [PATCH - rpcbind] Provide systemd unit files for rpcbind
  2016-10-12  6:01 [PATCH - rpcbind] Provide systemd unit files for rpcbind NeilBrown
@ 2016-11-01 16:51 ` Steve Dickson
  2016-11-01 19:57   ` NeilBrown
  2016-11-01 20:04   ` NeilBrown
  0 siblings, 2 replies; 11+ messages in thread
From: Steve Dickson @ 2016-11-01 16:51 UTC (permalink / raw)
  To: NeilBrown; +Cc: libtirpc-devel, linux-nfs

Hello,

My apologies for not getting to this sooner... 
A rough a couple of weeks... 
On 10/12/2016 02:01 AM, NeilBrown wrote:
> 
> 
> To encourage uniformity across distributions, provide
> systemd unit files.
> 
> If extra arguments are wanted for rpcbind, a drop-in should be used
> to set the Environment= or read and EnvironmentFile=
> 
> As the "run" directory could be /run or /var/run we RequiresMountsFor
> both of these.
Talking with the systemd folks they strongly sugguest we just
use /run (not /var/run) and drop the RequiresMountsFor.

> 
> rpcbind.service pulls in rpcbind.socket so that the listening sockets
> chosen there will always be used.
> 
> Signed-off-by: NeilBrown <neilb@suse.com>
> ---
>  .gitignore                 |  1 +
>  Makefile.am                |  4 ++++
>  configure.ac               |  7 ++++++-
>  systemd/rpcbind.service.in | 17 +++++++++++++++++
>  systemd/rpcbind.socket     | 19 +++++++++++++++++++
>  5 files changed, 47 insertions(+), 1 deletion(-)
>  create mode 100644 systemd/rpcbind.service.in
>  create mode 100644 systemd/rpcbind.socket
> 
> hi,
>  these are based on the unit files in use a SUSE, though I have made a
>  few "improvements".
>  If anyone has differences in their distros that you think we should
>  have in mainline, I'd love to hear about it.
> 
> Thanks,
> NeilBrown
> 
> 
> diff --git a/.gitignore b/.gitignore
> index 321dff64a57d..a8f1fed2acb6 100644
> --- a/.gitignore
> +++ b/.gitignore
> @@ -27,3 +27,4 @@ rpcbind
>  rpcinfo
>  # cscope database files
>  cscope.*
> +systemd/rpcbind.service
> diff --git a/Makefile.am b/Makefile.am
> index 5ec8cd66b689..43c27100ceae 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -50,6 +50,10 @@ if SYSTEMD
>  AM_CPPFLAGS += $(SYSTEMD_CFLAGS) -DSYSTEMD
>  
>  rpcbind_LDADD += $(SYSTEMD_LIBS)
> +
> +systemdsystemunit_DATA = \
> +	systemd/rpcbind.service \
> +	systemd/rpcbind.socket
>  endif
>  
>  rpcinfo_SOURCES =       src/rpcinfo.c
> diff --git a/configure.ac b/configure.ac
> index af4b74b31c9a..0892d8246a12 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -61,4 +61,9 @@ AC_SEARCH_LIBS([pthread_create], [pthread])
>  
>  AC_CHECK_HEADERS([nss.h rpcsvc/mount.h])
>  
> -AC_OUTPUT([Makefile])
> +# make bindir available for substitution in config file
> +# 2 "evals" needed to expand variable names
> +AC_SUBST([_bindir])
> +AC_CONFIG_COMMANDS_PRE([eval eval _bindir=$bindir])
> +
> +AC_OUTPUT([Makefile systemd/rpcbind.service])
> diff --git a/systemd/rpcbind.service.in b/systemd/rpcbind.service.in
> new file mode 100644
> index 000000000000..4706b5a77abf
> --- /dev/null
> +++ b/systemd/rpcbind.service.in
> @@ -0,0 +1,17 @@
> +[Unit]
> +Description=RPC Bind
> +Documentation=man:rpcbind(8)
> +DefaultDependencies=no
> +RequiresMountsFor=/var/run /run
> +# Make sure we use the IP addresses listed for
> +# rpcbind.socket, no matter how this unit is started.
> +Wants=rpcbind.socket
> +After=rpcbind.socket
> +
> +[Service]
> +Type=notify
> +# distro can provide a drop-in adding EnvironmentFile=-/??? if needed.
> +ExecStart=@_bindir@/rpcbind $RPCBIND_OPTIONS -w -f
This macro puts rpcbind in /usr/bin, but in the Red Hat
distros rpcbind lives /usr/sbin. I could easily patch
it to do the right thing... but is this a typo or does 
rpcbind live in /usr/bin in other distros? 

steved.


> +
> +[Install]
> +WantedBy=multi-user.target
> diff --git a/systemd/rpcbind.socket b/systemd/rpcbind.socket
> new file mode 100644
> index 000000000000..7204c97efa6f
> --- /dev/null
> +++ b/systemd/rpcbind.socket
> @@ -0,0 +1,19 @@
> +[Unit]
> +Description=RPCbind Server Activation Socket
> +DefaultDependencies=no
> +RequiresMountsFor=/var/run /run
> +Wants=rpcbind.target
> +Before=rpcbind.target
> +
> +[Socket]
> +ListenStream=/var/run/rpcbind.sock
> +
> +# RPC netconfig can't handle ipv6/ipv4 dual sockets
> +BindIPv6Only=ipv6-only
> +ListenStream=0.0.0.0:111
> +ListenDatagram=0.0.0.0:111
> +ListenStream=[::]:111
> +ListenDatagram=[::]:111
> +
> +[Install]
> +WantedBy=sockets.target
> 

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

* Re: [PATCH - rpcbind] Provide systemd unit files for rpcbind
  2016-11-01 16:51 ` Steve Dickson
@ 2016-11-01 19:57   ` NeilBrown
  2016-11-01 20:04   ` NeilBrown
  1 sibling, 0 replies; 11+ messages in thread
From: NeilBrown @ 2016-11-01 19:57 UTC (permalink / raw)
  To: Steve Dickson; +Cc: libtirpc-devel, linux-nfs

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

On Wed, Nov 02 2016, Steve Dickson wrote:

> Hello,
>
> My apologies for not getting to this sooner... 
> A rough a couple of weeks... 
> On 10/12/2016 02:01 AM, NeilBrown wrote:
>> 
>> 
>> To encourage uniformity across distributions, provide
>> systemd unit files.
>> 
>> If extra arguments are wanted for rpcbind, a drop-in should be used
>> to set the Environment= or read and EnvironmentFile=
>> 
>> As the "run" directory could be /run or /var/run we RequiresMountsFor
>> both of these.
> Talking with the systemd folks they strongly sugguest we just
> use /run (not /var/run) and drop the RequiresMountsFor.

I'm fine with that.  While maybe not everyone has /run, everyone running
systemd does.  I assume you'll just fix this rather than me
resubmitting?

Thanks,
NeilBrown


>
>> 
>> rpcbind.service pulls in rpcbind.socket so that the listening sockets
>> chosen there will always be used.
>> 
>> Signed-off-by: NeilBrown <neilb@suse.com>
>> ---
>>  .gitignore                 |  1 +
>>  Makefile.am                |  4 ++++
>>  configure.ac               |  7 ++++++-
>>  systemd/rpcbind.service.in | 17 +++++++++++++++++
>>  systemd/rpcbind.socket     | 19 +++++++++++++++++++
>>  5 files changed, 47 insertions(+), 1 deletion(-)
>>  create mode 100644 systemd/rpcbind.service.in
>>  create mode 100644 systemd/rpcbind.socket
>> 
>> hi,
>>  these are based on the unit files in use a SUSE, though I have made a
>>  few "improvements".
>>  If anyone has differences in their distros that you think we should
>>  have in mainline, I'd love to hear about it.
>> 
>> Thanks,
>> NeilBrown
>> 
>> 
>> diff --git a/.gitignore b/.gitignore
>> index 321dff64a57d..a8f1fed2acb6 100644
>> --- a/.gitignore
>> +++ b/.gitignore
>> @@ -27,3 +27,4 @@ rpcbind
>>  rpcinfo
>>  # cscope database files
>>  cscope.*
>> +systemd/rpcbind.service
>> diff --git a/Makefile.am b/Makefile.am
>> index 5ec8cd66b689..43c27100ceae 100644
>> --- a/Makefile.am
>> +++ b/Makefile.am
>> @@ -50,6 +50,10 @@ if SYSTEMD
>>  AM_CPPFLAGS += $(SYSTEMD_CFLAGS) -DSYSTEMD
>>  
>>  rpcbind_LDADD += $(SYSTEMD_LIBS)
>> +
>> +systemdsystemunit_DATA = \
>> +	systemd/rpcbind.service \
>> +	systemd/rpcbind.socket
>>  endif
>>  
>>  rpcinfo_SOURCES =       src/rpcinfo.c
>> diff --git a/configure.ac b/configure.ac
>> index af4b74b31c9a..0892d8246a12 100644
>> --- a/configure.ac
>> +++ b/configure.ac
>> @@ -61,4 +61,9 @@ AC_SEARCH_LIBS([pthread_create], [pthread])
>>  
>>  AC_CHECK_HEADERS([nss.h rpcsvc/mount.h])
>>  
>> -AC_OUTPUT([Makefile])
>> +# make bindir available for substitution in config file
>> +# 2 "evals" needed to expand variable names
>> +AC_SUBST([_bindir])
>> +AC_CONFIG_COMMANDS_PRE([eval eval _bindir=$bindir])
>> +
>> +AC_OUTPUT([Makefile systemd/rpcbind.service])
>> diff --git a/systemd/rpcbind.service.in b/systemd/rpcbind.service.in
>> new file mode 100644
>> index 000000000000..4706b5a77abf
>> --- /dev/null
>> +++ b/systemd/rpcbind.service.in
>> @@ -0,0 +1,17 @@
>> +[Unit]
>> +Description=RPC Bind
>> +Documentation=man:rpcbind(8)
>> +DefaultDependencies=no
>> +RequiresMountsFor=/var/run /run
>> +# Make sure we use the IP addresses listed for
>> +# rpcbind.socket, no matter how this unit is started.
>> +Wants=rpcbind.socket
>> +After=rpcbind.socket
>> +
>> +[Service]
>> +Type=notify
>> +# distro can provide a drop-in adding EnvironmentFile=-/??? if needed.
>> +ExecStart=@_bindir@/rpcbind $RPCBIND_OPTIONS -w -f
> This macro puts rpcbind in /usr/bin, but in the Red Hat
> distros rpcbind lives /usr/sbin. I could easily patch
> it to do the right thing... but is this a typo or does 
> rpcbind live in /usr/bin in other distros? 
>
> steved.
>
>
>> +
>> +[Install]
>> +WantedBy=multi-user.target
>> diff --git a/systemd/rpcbind.socket b/systemd/rpcbind.socket
>> new file mode 100644
>> index 000000000000..7204c97efa6f
>> --- /dev/null
>> +++ b/systemd/rpcbind.socket
>> @@ -0,0 +1,19 @@
>> +[Unit]
>> +Description=RPCbind Server Activation Socket
>> +DefaultDependencies=no
>> +RequiresMountsFor=/var/run /run
>> +Wants=rpcbind.target
>> +Before=rpcbind.target
>> +
>> +[Socket]
>> +ListenStream=/var/run/rpcbind.sock
>> +
>> +# RPC netconfig can't handle ipv6/ipv4 dual sockets
>> +BindIPv6Only=ipv6-only
>> +ListenStream=0.0.0.0:111
>> +ListenDatagram=0.0.0.0:111
>> +ListenStream=[::]:111
>> +ListenDatagram=[::]:111
>> +
>> +[Install]
>> +WantedBy=sockets.target
>> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 800 bytes --]

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

* Re: [PATCH - rpcbind] Provide systemd unit files for rpcbind
  2016-11-01 16:51 ` Steve Dickson
  2016-11-01 19:57   ` NeilBrown
@ 2016-11-01 20:04   ` NeilBrown
  2016-11-02 13:27     ` Steve Dickson
  1 sibling, 1 reply; 11+ messages in thread
From: NeilBrown @ 2016-11-01 20:04 UTC (permalink / raw)
  To: Steve Dickson; +Cc: libtirpc-devel, linux-nfs

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

On Wed, Nov 02 2016, Steve Dickson wrote:

>> diff --git a/systemd/rpcbind.service.in b/systemd/rpcbind.service.in
>> new file mode 100644
>> index 000000000000..4706b5a77abf
>> --- /dev/null
>> +++ b/systemd/rpcbind.service.in
>> @@ -0,0 +1,17 @@
>> +[Unit]
>> +Description=RPC Bind
>> +Documentation=man:rpcbind(8)
>> +DefaultDependencies=no
>> +RequiresMountsFor=/var/run /run
>> +# Make sure we use the IP addresses listed for
>> +# rpcbind.socket, no matter how this unit is started.
>> +Wants=rpcbind.socket
>> +After=rpcbind.socket
>> +
>> +[Service]
>> +Type=notify
>> +# distro can provide a drop-in adding EnvironmentFile=-/??? if needed.
>> +ExecStart=@_bindir@/rpcbind $RPCBIND_OPTIONS -w -f
> This macro puts rpcbind in /usr/bin, but in the Red Hat
> distros rpcbind lives /usr/sbin. I could easily patch
> it to do the right thing... but is this a typo or does 
> rpcbind live in /usr/bin in other distros? 

oops, posted previous reply too quickly.

Hmm.. I have rpcbind in /sbin, but my rpm spec file
runs configure with "--bindir=/sbin"
The rpcbind makefile just installs rpcbind (and rpcbind) in bindir.
So presumably you run configure with --bindir=/usr/sbin ??

NeilBrown

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 800 bytes --]

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

* Re: [PATCH - rpcbind] Provide systemd unit files for rpcbind
  2016-11-01 20:04   ` NeilBrown
@ 2016-11-02 13:27     ` Steve Dickson
  2016-11-02 13:49       ` [Libtirpc-devel] " Thorsten Kukuk
  0 siblings, 1 reply; 11+ messages in thread
From: Steve Dickson @ 2016-11-02 13:27 UTC (permalink / raw)
  To: NeilBrown; +Cc: libtirpc-devel, linux-nfs



On 11/01/2016 04:04 PM, NeilBrown wrote:
> On Wed, Nov 02 2016, Steve Dickson wrote:
> 
>>> diff --git a/systemd/rpcbind.service.in b/systemd/rpcbind.service.in
>>> new file mode 100644
>>> index 000000000000..4706b5a77abf
>>> --- /dev/null
>>> +++ b/systemd/rpcbind.service.in
>>> @@ -0,0 +1,17 @@
>>> +[Unit]
>>> +Description=RPC Bind
>>> +Documentation=man:rpcbind(8)
>>> +DefaultDependencies=no
>>> +RequiresMountsFor=/var/run /run
>>> +# Make sure we use the IP addresses listed for
>>> +# rpcbind.socket, no matter how this unit is started.
>>> +Wants=rpcbind.socket
>>> +After=rpcbind.socket
>>> +
>>> +[Service]
>>> +Type=notify
>>> +# distro can provide a drop-in adding EnvironmentFile=-/??? if needed.
>>> +ExecStart=@_bindir@/rpcbind $RPCBIND_OPTIONS -w -f
>> This macro puts rpcbind in /usr/bin, but in the Red Hat
>> distros rpcbind lives /usr/sbin. I could easily patch
>> it to do the right thing... but is this a typo or does 
>> rpcbind live in /usr/bin in other distros? 
> 
> oops, posted previous reply too quickly.
> 
> Hmm.. I have rpcbind in /sbin, but my rpm spec file
> runs configure with "--bindir=/sbin"
> The rpcbind makefile just installs rpcbind (and rpcbind) in bindir.
> So presumably you run configure with --bindir=/usr/sbin ??
I just took a look and we don't set that... Here is what we
set in Fedora

RPCBDIR=/tmp
%configure CFLAGS="$CFLAGS" LDFLAGS="-pie" \
    --enable-warmstarts \
    --with-statedir="$RPCBDIR" \
    --with-rpcuser="$RPCBUSR" \
    --with-nss-modules="files altfiles" \
    --enable-libwrap \
    --enable-debug

but in RHEL we set RPCBDIR to /run... 

steved.

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

* Re: [Libtirpc-devel] [PATCH - rpcbind] Provide systemd unit files for rpcbind
  2016-11-02 13:27     ` Steve Dickson
@ 2016-11-02 13:49       ` Thorsten Kukuk
  2016-11-02 18:06         ` Steve Dickson
  0 siblings, 1 reply; 11+ messages in thread
From: Thorsten Kukuk @ 2016-11-02 13:49 UTC (permalink / raw)
  To: Steve Dickson; +Cc: NeilBrown, linux-nfs, libtirpc-devel

On Wed, Nov 02, Steve Dickson wrote:

> I just took a look and we don't set that... Here is what we
> set in Fedora
> 
> RPCBDIR=/tmp
> %configure CFLAGS="$CFLAGS" LDFLAGS="-pie" \
>     --enable-warmstarts \
>     --with-statedir="$RPCBDIR" \
>     --with-rpcuser="$RPCBUSR" \
>     --with-nss-modules="files altfiles" \
>     --enable-libwrap \
>     --enable-debug

The rpcbind Makefile has:
bin_PROGRAMS = rpcbind rpcinfo

So per default, "make install" should install it into /usr/bin
and the patch from Niel with bin is correct.

  Thorsten

-- 
Thorsten Kukuk, Distinguished Engineer, Senior Architect SLES & CASP
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nuernberg, Germany
GF: Felix Imendoerffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nuernberg)

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

* Re: [Libtirpc-devel] [PATCH - rpcbind] Provide systemd unit files for rpcbind
  2016-11-02 13:49       ` [Libtirpc-devel] " Thorsten Kukuk
@ 2016-11-02 18:06         ` Steve Dickson
  2016-11-02 21:16           ` NeilBrown
  0 siblings, 1 reply; 11+ messages in thread
From: Steve Dickson @ 2016-11-02 18:06 UTC (permalink / raw)
  To: Thorsten Kukuk; +Cc: NeilBrown, linux-nfs, libtirpc-devel



On 11/02/2016 09:49 AM, Thorsten Kukuk wrote:
> On Wed, Nov 02, Steve Dickson wrote:
> 
>> I just took a look and we don't set that... Here is what we
>> set in Fedora
>>
>> RPCBDIR=/tmp
>> %configure CFLAGS="$CFLAGS" LDFLAGS="-pie" \
>>     --enable-warmstarts \
>>     --with-statedir="$RPCBDIR" \
>>     --with-rpcuser="$RPCBUSR" \
>>     --with-nss-modules="files altfiles" \
>>     --enable-libwrap \
>>     --enable-debug
> 
> The rpcbind Makefile has:
> bin_PROGRAMS = rpcbind rpcinfo
> 
> So per default, "make install" should install it into /usr/bin
> and the patch from Niel with bin is correct.
You are correct... In  %install does the following

mv -f ${RPM_BUILD_ROOT}%{_bindir}/rpcbind ${RPM_BUILD_ROOT}/sbin
mv -f ${RPM_BUILD_ROOT}%{_bindir}/rpcinfo ${RPM_BUILD_ROOT}%{_sbindir}

Since rpcbind lives in /usr/sbin in the majority distro
I'm going to change the Makefile.am so "make install" 
will do the right thing... Any objections?

steved.
 

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

* Re: [Libtirpc-devel] [PATCH - rpcbind] Provide systemd unit files for rpcbind
  2016-11-02 18:06         ` Steve Dickson
@ 2016-11-02 21:16           ` NeilBrown
  2016-11-02 21:31             ` Steve Dickson
  0 siblings, 1 reply; 11+ messages in thread
From: NeilBrown @ 2016-11-02 21:16 UTC (permalink / raw)
  To: Steve Dickson, Thorsten Kukuk; +Cc: linux-nfs, libtirpc-devel

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

On Thu, Nov 03 2016, Steve Dickson wrote:

> On 11/02/2016 09:49 AM, Thorsten Kukuk wrote:
>> On Wed, Nov 02, Steve Dickson wrote:
>> 
>>> I just took a look and we don't set that... Here is what we
>>> set in Fedora
>>>
>>> RPCBDIR=/tmp
>>> %configure CFLAGS="$CFLAGS" LDFLAGS="-pie" \
>>>     --enable-warmstarts \
>>>     --with-statedir="$RPCBDIR" \
>>>     --with-rpcuser="$RPCBUSR" \
>>>     --with-nss-modules="files altfiles" \
>>>     --enable-libwrap \
>>>     --enable-debug
>> 
>> The rpcbind Makefile has:
>> bin_PROGRAMS = rpcbind rpcinfo
>> 
>> So per default, "make install" should install it into /usr/bin
>> and the patch from Niel with bin is correct.
> You are correct... In  %install does the following
>
> mv -f ${RPM_BUILD_ROOT}%{_bindir}/rpcbind ${RPM_BUILD_ROOT}/sbin
> mv -f ${RPM_BUILD_ROOT}%{_bindir}/rpcinfo ${RPM_BUILD_ROOT}%{_sbindir}
>
> Since rpcbind lives in /usr/sbin in the majority distro
> I'm going to change the Makefile.am so "make install" 
> will do the right thing... Any objections?

If you do it by changing the default for bindir, or by introducing an
sbindir that can be changed with configure, then no objections from me.
I'm not sure it really needs fixing, but I don't object to be being
fixed.

Thanks,
NeilBrown

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 800 bytes --]

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

* Re: [Libtirpc-devel] [PATCH - rpcbind] Provide systemd unit files for rpcbind
  2016-11-02 21:16           ` NeilBrown
@ 2016-11-02 21:31             ` Steve Dickson
  2016-11-03  0:22               ` NeilBrown
  0 siblings, 1 reply; 11+ messages in thread
From: Steve Dickson @ 2016-11-02 21:31 UTC (permalink / raw)
  To: NeilBrown, Thorsten Kukuk; +Cc: linux-nfs, libtirpc-devel



On 11/02/2016 05:16 PM, NeilBrown wrote:
> On Thu, Nov 03 2016, Steve Dickson wrote:
>
>> On 11/02/2016 09:49 AM, Thorsten Kukuk wrote:
>>> On Wed, Nov 02, Steve Dickson wrote:
>>>
>>>> I just took a look and we don't set that... Here is what we
>>>> set in Fedora
>>>>
>>>> RPCBDIR=/tmp
>>>> %configure CFLAGS="$CFLAGS" LDFLAGS="-pie" \
>>>>     --enable-warmstarts \
>>>>     --with-statedir="$RPCBDIR" \
>>>>     --with-rpcuser="$RPCBUSR" \
>>>>     --with-nss-modules="files altfiles" \
>>>>     --enable-libwrap \
>>>>     --enable-debug
>>> The rpcbind Makefile has:
>>> bin_PROGRAMS = rpcbind rpcinfo
>>>
>>> So per default, "make install" should install it into /usr/bin
>>> and the patch from Niel with bin is correct.
>> You are correct... In  %install does the following
>>
>> mv -f ${RPM_BUILD_ROOT}%{_bindir}/rpcbind ${RPM_BUI
>>> Thanks,
>>> NeilBrown
>> LD_ROOT}/sbin
>> mv -f ${RPM_BUILD_ROOT}%{_bindir}/rpcinfo ${RPM_BUILD_ROOT}%{_sbindir}
>>
>> Since rpcbind lives in /usr/sbin in the majority distro
>> I'm going to change the Makefile.am so "make install" 
>> will do the right thing... Any objections?
> If you do it by changing the default for bindir, or by introducing an
> sbindir that can be changed with configure, then no objections from me.
> I'm not sure it really needs fixing, but I don't object to be being
> fixed.
>
Yes... basically
 
-bin_PROGRAMS = rpcbind rpcinfo
+sbin_PROGRAMS = rpcbind rpcinfo

and that seems to work... all this means the rpm spec file
will have to be tweaked when a new release is made.

All I'll for checking in these systemd file with the comments
from the systemd people and the bin=>sbin change.

How about a respin?

steved.


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

* Re: [Libtirpc-devel] [PATCH - rpcbind] Provide systemd unit files for rpcbind
  2016-11-02 21:31             ` Steve Dickson
@ 2016-11-03  0:22               ` NeilBrown
  2016-11-07 19:36                 ` Steve Dickson
  0 siblings, 1 reply; 11+ messages in thread
From: NeilBrown @ 2016-11-03  0:22 UTC (permalink / raw)
  To: Steve Dickson, Thorsten Kukuk; +Cc: linux-nfs, libtirpc-devel


[-- Attachment #1.1: Type: text/plain, Size: 620 bytes --]

On Thu, Nov 03 2016, Steve Dickson wrote:
> Yes... basically
>  
> -bin_PROGRAMS = rpcbind rpcinfo
> +sbin_PROGRAMS = rpcbind rpcinfo

Maybe

-options like `--bindir=DIR' to specify different values for particular
+options like `--sbindir=DIR' to specify different values for particular

in INSTALL too??
>
> and that seems to work... all this means the rpm spec file
> will have to be tweaked when a new release is made.
>
> All I'll for checking in these systemd file with the comments
> from the systemd people and the bin=>sbin change.
>
> How about a respin?

Attached

Thanks,
NeilBrown


[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 800 bytes --]

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Provide-systemd-unit-files-for-rpcbind.patch --]
[-- Type: text/x-patch, Size: 0 bytes --]



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

* Re: [Libtirpc-devel] [PATCH - rpcbind] Provide systemd unit files for rpcbind
  2016-11-03  0:22               ` NeilBrown
@ 2016-11-07 19:36                 ` Steve Dickson
  0 siblings, 0 replies; 11+ messages in thread
From: Steve Dickson @ 2016-11-07 19:36 UTC (permalink / raw)
  To: NeilBrown, Thorsten Kukuk; +Cc: linux-nfs, libtirpc-devel



On 11/02/2016 08:22 PM, NeilBrown wrote:
> On Thu, Nov 03 2016, Steve Dickson wrote:
>> Yes... basically
>>  
>> -bin_PROGRAMS = rpcbind rpcinfo
>> +sbin_PROGRAMS = rpcbind rpcinfo
> Maybe
>
> -options like `--bindir=DIR' to specify different values for particular
> +options like `--sbindir=DIR' to specify different values for particular
>
> in INSTALL too??
I just left it alone... its been that way for years... Why fix something
that is not broken! ;-)

>> and that seems to work... all this means the rpm spec file
>> will have to be tweaked when a new release is made.
>>
>> All I'll for checking in these systemd file with the comments
>> from the systemd people and the bin=>sbin change.
>>
>> How about a respin?
> Attached
Thank you... Committed!

steved.
>
> Thanks,
> NeilBrown
>


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

end of thread, other threads:[~2016-11-07 19:36 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-12  6:01 [PATCH - rpcbind] Provide systemd unit files for rpcbind NeilBrown
2016-11-01 16:51 ` Steve Dickson
2016-11-01 19:57   ` NeilBrown
2016-11-01 20:04   ` NeilBrown
2016-11-02 13:27     ` Steve Dickson
2016-11-02 13:49       ` [Libtirpc-devel] " Thorsten Kukuk
2016-11-02 18:06         ` Steve Dickson
2016-11-02 21:16           ` NeilBrown
2016-11-02 21:31             ` Steve Dickson
2016-11-03  0:22               ` NeilBrown
2016-11-07 19:36                 ` 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.