Re: rdist.c patch

2016-03-06 Thread Jacob L. Leifman
In some regards rdist is possibly more powerful/flexible than rsync 
with its built in support for post-processing scripts. For example, I 
find it extremely useful for keeping CARP firewalls in sync while 
allowing for administrative changes to either.

On 7 Mar 2016 at 11:18, Michael Kennett wrote:

> I use rdist (triggered from /etc/daily), but the standard build does have
> limitations and can dump core in some circumstances (refer
> http://marc.info/?l=openbsd-tech=141551244520320=2).
> 
> My use of it is to maintain a shadow boot partition, and to copy selected
> files onto a separate server. Whilst it is less powerful than rsync it is
> nice (in my view) to have a tool like this in the standard distribution.
> 
> Cheers, Michael
> 
> 
> 
> On Mon, Mar 7, 2016 at 10:12 AM, Alexander Hall  wrote:
> 
> >
> > >On 03/06/16 00:12, Philip Guenther wrote:
> > >> Anyone still *using* rdist?
> >
> > I really try to use it to sync my ~ dotfiles but the configuration is as
> > intuitive as that of sudo.
> >
> > As much as I like having that kind of tool in base, maybe it isn't all
> > that useful anymore.
> >
> > /Alexander
> >
> > >>
> > >>
> > >> Philip Guenther
> > >>
> > >/etc/daily
> > >
> > >if configured to do so that is.
> >
> >
> 




Re: rdist.c patch

2016-03-06 Thread Michael Kennett
I use rdist (triggered from /etc/daily), but the standard build does have
limitations and can dump core in some circumstances (refer
http://marc.info/?l=openbsd-tech=141551244520320=2).

My use of it is to maintain a shadow boot partition, and to copy selected
files onto a separate server. Whilst it is less powerful than rsync it is
nice (in my view) to have a tool like this in the standard distribution.

Cheers, Michael



On Mon, Mar 7, 2016 at 10:12 AM, Alexander Hall  wrote:

>
> >On 03/06/16 00:12, Philip Guenther wrote:
> >> Anyone still *using* rdist?
>
> I really try to use it to sync my ~ dotfiles but the configuration is as
> intuitive as that of sudo.
>
> As much as I like having that kind of tool in base, maybe it isn't all
> that useful anymore.
>
> /Alexander
>
> >>
> >>
> >> Philip Guenther
> >>
> >/etc/daily
> >
> >if configured to do so that is.
>
>


Re: rdist.c patch

2016-03-06 Thread Alexander Hall


On March 6, 2016 5:57:23 PM GMT+01:00, Edgar Pettijohn 
 wrote:
>
>
>On 03/06/16 00:12, Philip Guenther wrote:
>> On Sun, Feb 28, 2016 at 1:35 PM, Edgar Pettijohn
>>  wrote:
>>> --- rdist.c.origSun Feb 28 15:29:27 2016
>>> +++ rdist.cSun Feb 28 15:32:06 2016
>>> @@ -57,8 +57,7 @@
>>>   char   *path_remsh = NULL;
>>>
>>>   static void addhostlist(char *, struct namelist **);
>>> -static void usage(void);
>>> -int main(int, char **, char **);
>>> +__dead void usage(void);
>> Why remove the 'static'?
>>
>>
>> Does anyone know if the gcc community has settled on a Best Practice
>> for where to place attributes relative to storage specifiers such as
>> 'static'?  I.e., which of these is considered better by the gcc 5.x+
>> community:
>> attribute((noreturn)) static void foo(void);
>> static attribute((noreturn)) void foo(void);
>> ?
>>
>> We have an ugly mix of those and others currently.
>>
>>
>>> -(void) fprintf(stderr,
>>> +fprintf(stderr,
>> IMO, removing casts to void like this are an all-or-none affair.
>>
>> I think I was the last dev still using rdist.  Since 5.8 I've almost
>> completely switched to rsync.  Maybe the diff to apply in this case
>is
>> to usr.bin/Makefile, removing rdist and rdistd.
>>
>> Anyone still *using* rdist?

I really try to use it to sync my ~ dotfiles but the configuration is as 
intuitive as that of sudo.

As much as I like having that kind of tool in base, maybe it isn't all that 
useful anymore. 

/Alexander 

>>
>>
>> Philip Guenther
>>
>/etc/daily
>
>if configured to do so that is.



Re: rdist.c patch

2016-03-06 Thread Edgar Pettijohn



On 03/06/16 00:12, Philip Guenther wrote:

On Sun, Feb 28, 2016 at 1:35 PM, Edgar Pettijohn
 wrote:

--- rdist.c.origSun Feb 28 15:29:27 2016
+++ rdist.cSun Feb 28 15:32:06 2016
@@ -57,8 +57,7 @@
  char   *path_remsh = NULL;

  static void addhostlist(char *, struct namelist **);
-static void usage(void);
-int main(int, char **, char **);
+__dead void usage(void);

Why remove the 'static'?


Does anyone know if the gcc community has settled on a Best Practice
for where to place attributes relative to storage specifiers such as
'static'?  I.e., which of these is considered better by the gcc 5.x+
community:
attribute((noreturn)) static void foo(void);
static attribute((noreturn)) void foo(void);
?

We have an ugly mix of those and others currently.



-(void) fprintf(stderr,
+fprintf(stderr,

IMO, removing casts to void like this are an all-or-none affair.

I think I was the last dev still using rdist.  Since 5.8 I've almost
completely switched to rsync.  Maybe the diff to apply in this case is
to usr.bin/Makefile, removing rdist and rdistd.

Anyone still *using* rdist?


Philip Guenther


/etc/daily

if configured to do so that is.



Re: rdist.c patch

2016-03-05 Thread Philip Guenther
On Sun, Feb 28, 2016 at 1:35 PM, Edgar Pettijohn
 wrote:
> --- rdist.c.origSun Feb 28 15:29:27 2016
> +++ rdist.cSun Feb 28 15:32:06 2016
> @@ -57,8 +57,7 @@
>  char   *path_remsh = NULL;
>
>  static void addhostlist(char *, struct namelist **);
> -static void usage(void);
> -int main(int, char **, char **);
> +__dead void usage(void);

Why remove the 'static'?


Does anyone know if the gcc community has settled on a Best Practice
for where to place attributes relative to storage specifiers such as
'static'?  I.e., which of these is considered better by the gcc 5.x+
community:
   attribute((noreturn)) static void foo(void);
   static attribute((noreturn)) void foo(void);
?

We have an ugly mix of those and others currently.


> -(void) fprintf(stderr,
> +fprintf(stderr,

IMO, removing casts to void like this are an all-or-none affair.

I think I was the last dev still using rdist.  Since 5.8 I've almost
completely switched to rsync.  Maybe the diff to apply in this case is
to usr.bin/Makefile, removing rdist and rdistd.

Anyone still *using* rdist?


Philip Guenther



rdist.c patch

2016-02-28 Thread Edgar Pettijohn

--- rdist.c.origSun Feb 28 15:29:27 2016
+++ rdist.cSun Feb 28 15:32:06 2016
@@ -57,8 +57,7 @@
 char   *path_remsh = NULL;

 static void addhostlist(char *, struct namelist **);
-static void usage(void);
-int main(int, char **, char **);
+__dead void usage(void);

 /*
  * Add a hostname to the host list
@@ -331,12 +330,12 @@
 /*
  * Print usage message and exit.
  */
-static void
+__dead void
 usage(void)
 {
 extern char *__progname;

-(void) fprintf(stderr,
+fprintf(stderr,
 "usage: %s [-DFnV] [-A num] [-a num] "
 "[-c mini_distfile]\n"
 "\t[-d var=value] [-f distfile] [-L remote_logopts] "
@@ -346,7 +345,7 @@
 "\t[-t timeout] [name ...]\n", __progname);


-(void) fprintf(stderr, "\nThe values for  are:\n\t%s\n",
+fprintf(stderr, "\nThe values for  are:\n\t%s\n",
getdistoptlist());

 msgprusage();