Re: Conditional sysupgrade

2019-05-03 Thread Klemens Nanni
OK kn

Re: Conditional sysupgrade

2019-05-03 Thread Florian Obser
On Sat, Apr 27, 2019 at 01:23:20PM +0100, Marco Bonetti wrote: > Hello folks, > > First of all congratulations on a new OpenBSD release and thanks for > introducing sysupgrade in -current. > > Before sysupgrade, I was using a custom script for achieving the same > result with only difference that

Re: Conditional sysupgrade

2019-04-29 Thread Marco Bonetti
On 04/29, Stuart Henderson wrote: > On 2019/04/29 00:21, Marco Bonetti wrote: > > > > +++ usr.sbin/sysupgrade/sysupgrade.sh 27 Apr 2019 11:54:48 - > > > > @@ -110,7 +110,19 @@ fi > > > > > > > > cd ${SETSDIR} > > > > > > > > -unpriv -f SHA256.sig ftp -Vmo SHA256.sig ${URL}SHA256.sig > >

Re: Conditional sysupgrade

2019-04-29 Thread Stuart Henderson
On 2019/04/29 00:21, Marco Bonetti wrote: > > > +++ usr.sbin/sysupgrade/sysupgrade.sh 27 Apr 2019 11:54:48 - > > > @@ -110,7 +110,19 @@ fi > > > > > > cd ${SETSDIR} > > > > > > -unpriv -f SHA256.sig ftp -Vmo SHA256.sig ${URL}SHA256.sig > > > +unpriv -f SHA256.sig.tmp ftp -Vmo SHA256.si

Re: Conditional sysupgrade

2019-04-28 Thread Marco Bonetti
On 04/27, Christian Weisgerber wrote: > On 2019-04-27, Marco Bonetti wrote: > > > +unpriv -f SHA256.sig.tmp ftp -Vmo SHA256.sig.tmp ${URL}SHA256.sig > > +TMP_SHA=$(sha256 -q SHA256.sig.tmp) > > + > > +unpriv touch SHA256.sig > > This fails if SHA256.sig doesn't exist yet. The unprivileged user

Re: Conditional sysupgrade

2019-04-28 Thread Marco Bonetti
On 04/27, Andreas Kusalananda K?h?ri wrote: > On Sat, Apr 27, 2019 at 01:23:20PM +0100, Marco Bonetti wrote: > > Hello folks, > > > > First of all congratulations on a new OpenBSD release and thanks for > > introducing sysupgrade in -current. > > > > Before sysupgrade, I was using a custom script

Re: Conditional sysupgrade

2019-04-28 Thread Marco Bonetti
On 04/27, Florian Obser wrote: > On Sat, Apr 27, 2019 at 01:23:20PM +0100, Marco Bonetti wrote: > > Hello folks, > > > > First of all congratulations on a new OpenBSD release and thanks for > > introducing sysupgrade in -current. > > > > Before sysupgrade, I was using a custom script for achievin

Re: Conditional sysupgrade

2019-04-28 Thread Mischa
On 27 Apr at 22:57, Florian Obser wrote: > On Sat, Apr 27, 2019 at 09:53:08PM +0200, Mischa Peters wrote: > > Let me know if this needs more work. Love the idea of sysupgrade! > > Please shelf this for now, there is a lot of churn going on in the > tool in private and we are moving very fast. >

Re: Conditional sysupgrade

2019-04-27 Thread Florian Obser
On Sat, Apr 27, 2019 at 09:53:08PM +0200, Mischa Peters wrote: > Let me know if this needs more work. Love the idea of sysupgrade! Please shelf this for now, there is a lot of churn going on in the tool in private and we are moving very fast. There are more subtleties to consider. -- I'm not en

Re: Conditional sysupgrade

2019-04-27 Thread Theo Buehler
On Sat, Apr 27, 2019 at 02:16:26PM -0600, Theo de Raadt wrote: > Florian Obser wrote: > > > It has the date and time with seconds resolution in there. Not just the > > built number. > > Yes from KARL on one machine, and snapshot/release builds on a different > machine. > > Could this not false

Re: Conditional sysupgrade

2019-04-27 Thread Theo de Raadt
Florian Obser wrote: > It has the date and time with seconds resolution in there. Not just the built > number. Yes from KARL on one machine, and snapshot/release builds on a different machine. Could this not false-positive? > On April 27, 2019 9:57:59 PM GMT+02:00, Theo de Raadt > wrote: >

Re: Conditional sysupgrade

2019-04-27 Thread Florian Obser
It has the date and time with seconds resolution in there. Not just the built number. On April 27, 2019 9:57:59 PM GMT+02:00, Theo de Raadt wrote: >> As Florian suggested I compared kern.version to what from both bsd >and bsd.mp. > >Do not do that. > >kern.version in snapshots and releases are

Re: Conditional sysupgrade

2019-04-27 Thread Theo de Raadt
> As Florian suggested I compared kern.version to what from both bsd and bsd.mp. Do not do that. kern.version in snapshots and releases are completely arbitrary, based on whether I delete an obj tree, then the version numbers begin anew. This heuristic will false-positive.

Re: Conditional sysupgrade

2019-04-27 Thread Mischa Peters
On 27 Apr at 17:52, Florian Obser wrote: > On Sat, Apr 27, 2019 at 01:23:20PM +0100, Marco Bonetti wrote: > > Hello folks, > > > > First of all congratulations on a new OpenBSD release and thanks for > > introducing sysupgrade in -current. > > > > Before sysupgrade, I was using a custom script f

Re: Conditional sysupgrade

2019-04-27 Thread Christian Weisgerber
On 2019-04-27, Marco Bonetti wrote: > +unpriv -f SHA256.sig.tmp ftp -Vmo SHA256.sig.tmp ${URL}SHA256.sig > +TMP_SHA=$(sha256 -q SHA256.sig.tmp) > + > +unpriv touch SHA256.sig This fails if SHA256.sig doesn't exist yet. The unprivileged user cannot create files in $SETSDIR. > +unpriv cat SHA256

Re: Conditional sysupgrade

2019-04-27 Thread Florian Obser
On Sat, Apr 27, 2019 at 01:23:20PM +0100, Marco Bonetti wrote: > Hello folks, > > First of all congratulations on a new OpenBSD release and thanks for > introducing sysupgrade in -current. > > Before sysupgrade, I was using a custom script for achieving the same > result with only difference that

Re: Conditional sysupgrade

2019-04-27 Thread Andreas Kusalananda Kähäri
On Sat, Apr 27, 2019 at 01:23:20PM +0100, Marco Bonetti wrote: > Hello folks, > > First of all congratulations on a new OpenBSD release and thanks for > introducing sysupgrade in -current. > > Before sysupgrade, I was using a custom script for achieving the same > result with only difference that

Conditional sysupgrade

2019-04-27 Thread Marco Bonetti
Hello folks, First of all congratulations on a new OpenBSD release and thanks for introducing sysupgrade in -current. Before sysupgrade, I was using a custom script for achieving the same result with only difference that I was checking if a new snapshot (or release) is available by looking at BUI