Package -stable updates

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Package -stable updates

Steven Shockley
So, many thanks to everyone who put together the new -stable updates for
packages.  Is there a command I can put in the crontab that will only
output if there are updates?  Similar to what syspatch or openup does.
I tried pkg_add -unx, but that still tells me to delete old files and
prints the quirks line even if there are no updates.

Reply | Threaded
Open this post in threaded view
|

Re: Package -stable updates

Consus-2
On 19:59 Wed 28 Aug, Steven Shockley wrote:
> So, many thanks to everyone who put together the new -stable updates for
> packages.  Is there a command I can put in the crontab that will only
> output if there are updates?  Similar to what syspatch or openup does.
> I tried pkg_add -unx, but that still tells me to delete old files and
> prints the quirks line even if there are no updates.

I use

        0 7 * * * pkg_add -un | grep -v 'signed on'

and it works okay, no warnings about deleting old files.

Though removing quirks line would be nice.

Reply | Threaded
Open this post in threaded view
|

Re: Package -stable updates

Michael Hoertnagl
In reply to this post by Steven Shockley
On 29.08.19 01:59, Steven Shockley wrote:
> Is there a command I can put in the crontab that will only
> output if there are updates?

I've come up with:

pkg_add -u -n -I -v 2>&1 | grep 'Adding' | sort -u | sed -e 's/.*Adding
\(.*\)(pretending.*/\1/'

this will print
<package name> - <current version> -> <new version>

Suggestions for something simpler/better that gives above information is
highly appreciated.

Best,
Michael

Reply | Threaded
Open this post in threaded view
|

Re: Package -stable updates

Florian Obser-2
In reply to this post by Consus-2
On Thu, Aug 29, 2019 at 09:39:40AM +0300, Consus wrote:

> On 19:59 Wed 28 Aug, Steven Shockley wrote:
> > So, many thanks to everyone who put together the new -stable updates for
> > packages.  Is there a command I can put in the crontab that will only
> > output if there are updates?  Similar to what syspatch or openup does.
> > I tried pkg_add -unx, but that still tells me to delete old files and
> > prints the quirks line even if there are no updates.
>
> I use
>
> 0 7 * * * pkg_add -un | grep -v 'signed on'
>
> and it works okay, no warnings about deleting old files.
>
> Though removing quirks line would be nice.
>

I thought you had moved on since stable packages are one or two
decades too late?

--
I'm not entirely sure you are real.

Reply | Threaded
Open this post in threaded view
|

Re: Package -stable updates

Consus-2
On 09:29 Thu 29 Aug, Florian Obser wrote:

> On Thu, Aug 29, 2019 at 09:39:40AM +0300, Consus wrote:
> > On 19:59 Wed 28 Aug, Steven Shockley wrote:
> > > So, many thanks to everyone who put together the new -stable updates for
> > > packages.  Is there a command I can put in the crontab that will only
> > > output if there are updates?  Similar to what syspatch or openup does.
> > > I tried pkg_add -unx, but that still tells me to delete old files and
> > > prints the quirks line even if there are no updates.
> >
> > I use
> >
> > 0 7 * * * pkg_add -un | grep -v 'signed on'
> >
> > and it works okay, no warnings about deleting old files.
> >
> > Though removing quirks line would be nice.
> >
>
> I thought you had moved on since stable packages are one or two
> decades too late?

Eh?

Reply | Threaded
Open this post in threaded view
|

Re: Package -stable updates

Andre Stoebe
In reply to this post by Steven Shockley
On 29.08.2019 01:59, Steven Shockley wrote:
> So, many thanks to everyone who put together the new -stable updates for
> packages.  Is there a command I can put in the crontab that will only
> output if there are updates?  Similar to what syspatch or openup does.
> I tried pkg_add -unx, but that still tells me to delete old files and
> prints the quirks line even if there are no updates.

Hi Steven,

here's what I came up with in my /etc/daily.local file...

(pkg_add -suv | sed -En 's/^Adding (.+)\(pretending\)/\1/p') 2>&1 \
    | grep -v ': Requesting'

Initially I didn't use the verbose option and a simpler sed expression,
but I eventually found that pkg_add's output differs whether a terminal
is attached or not. So that's what works for me.

Regards
Andre

Reply | Threaded
Open this post in threaded view
|

Re: Package -stable updates

Andreas Kusalananda Kähäri-3
On Thu, Aug 29, 2019 at 09:50:48AM +0200, Andre Stoebe wrote:

> On 29.08.2019 01:59, Steven Shockley wrote:
> > So, many thanks to everyone who put together the new -stable updates for
> > packages.  Is there a command I can put in the crontab that will only
> > output if there are updates?  Similar to what syspatch or openup does.
> > I tried pkg_add -unx, but that still tells me to delete old files and
> > prints the quirks line even if there are no updates.
>
> Hi Steven,
>
> here's what I came up with in my /etc/daily.local file...
>
> (pkg_add -suv | sed -En 's/^Adding (.+)\(pretending\)/\1/p') 2>&1 \
>     | grep -v ': Requesting'
>
> Initially I didn't use the verbose option and a simpler sed expression,
> but I eventually found that pkg_add's output differs whether a terminal
> is attached or not. So that's what works for me.
>
> Regards
> Andre

You could also do as sysupgrade(8) does and download the SHA256 file,
compare it to a locally stored copy of it. If it is different, there
are new packages and you can try running "pkg_add -u" when you have
the inclination to do so (or immediately from the same script). Then
update the locally stored copy of the SHA256 file with the version just
downloaded.

This is my script (note: I'm following snapshots rather than -stable, so
some slight tweaking will be neccesary).  I'm running it with my
unprivilegied user from the command line to upgrade everything (the
first "doas sysupgrade" is not commented out in my version):

#!/bin/sh -eux

# doas sysupgrade  # to also make sure that the system is up-to-date

tmpfile=$(mktemp)
stamp=$HOME/.sha256.ports

trap 'rm -f "$tmpfile"' EXIT

read installurl </etc/installurl

curl -s -o "$tmpfile" "$installurl/snapshots/packages/$(arch -s)/SHA256"

if [ ! -f "$stamp" ] || ! cmp -s "$stamp" "$tmpfile"
then
    doas pkg_add -u -D snap
    cp "$tmpfile" "$stamp"
fi

Reply | Threaded
Open this post in threaded view
|

Re: Package -stable updates

Michael Hekeler
In reply to this post by Steven Shockley
In this thread I didn't understand what you update.

You said you run STABLE? So you update ports? ...or using m:tier?? ...?
Can somebody please tell me what are those "-stable updates for
packages"?





On Wed, Aug 28, 2019 at 07:59:59PM -0400, Steven Shockley wrote:
> So, many thanks to everyone who put together the new -stable updates for
> packages.  Is there a command I can put in the crontab that will only
> output if there are updates?  Similar to what syspatch or openup does.
> I tried pkg_add -unx, but that still tells me to delete old files and
> prints the quirks line even if there are no updates.
>

Reply | Threaded
Open this post in threaded view
|

Re: Package -stable updates

Thomas Bohl-3
> In this thread I didn't understand what you update.
>
> You said you run STABLE? So you update ports? ...or using m:tier?? ...?
> Can somebody please tell me what are those "-stable updates for
> packages"?

http://cdn.openbsd.org/pub/OpenBSD/6.5/packages-stable/amd64/
updated binary packages (with security fixes) for stable, as described here
https://marc.info/?l=openbsd-announce&m=156577865917831&w=2

Reply | Threaded
Open this post in threaded view
|

Re: Package -stable updates

Michael Hekeler
> http://cdn.openbsd.org/pub/OpenBSD/6.5/packages-stable/amd64/
> updated binary packages (with security fixes) for stable, as described here
> https://marc.info/?l=openbsd-announce&m=156577865917831&w=2


Uu Ooh - I am sorry :-(
I managed to break my .muttrc and so I've overseen the announce of
/packages-stable

Excuse me!