• periodic notification about new updates

    From Marco Moock@21:1/5 to All on Sat Aug 23 15:32:59 2025
    Hello!

    I would like to ask if it is possible to configure periodic in a way
    that notifies me of ne updates via pkg and freebsd-update.

    Is there a way to do that (and only that, not daily mails about normal operations)?

    --
    kind regards
    Marco

    Send spam to 1755955920muell@stinkedores.dorfdsl.de

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Winston@21:1/5 to Marco Moock on Sat Aug 23 21:29:29 2025
    Marco Moock <mm@dorfdsl.de> writes:
    I would like to ask if it is possible to configure periodic in a way
    that notifies me of ne updates via pkg and freebsd-update.

    Is there a way to do that (and only that, not daily mails about normal operations)?

    "freebsd-update cron"? It emails you if updates were found.

    As to pkg, I don't understand what you're actually trying to accomplish
    because I see no reason to do "pkg update" unless there's actually some
    package you're thinking of updating (and pkg upgrade does pkg update automatically). Similarly, I'm not sure why you would want to upgrade a package merely because a newer one has appeared. "pkg audit", whether
    run by you or by the periodic/security script, will tell you if there's
    a security issue with an installed package.

    Despite my lack of understanding of your goal, would a test like
    if test `pkg query %v $package` != `pkg rquery %v $package`; then
    notify you
    fi
    for each package you care about accomplish what you seek?

    Note: You don't have to contort your solution to run via 'periodic'.
    You can also write a simple shell script and use crontab.
    -WBE

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Marco Moock@21:1/5 to All on Sun Aug 24 08:50:11 2025
    On 23.08.2025 21:29 Uhr Winston wrote:

    Marco Moock <mm@dorfdsl.de> writes:
    I would like to ask if it is possible to configure periodic in a way
    that notifies me of ne updates via pkg and freebsd-update.

    Is there a way to do that (and only that, not daily mails about
    normal operations)?

    "freebsd-update cron"? It emails you if updates were found.

    Crontab has such a line:

    @daily root freebsd-update cron

    I haven't received any message yet, mail to root works and the periodic
    reports are delivered.

    Dunno if I was faster when doing it manually.

    As to pkg, I don't understand what you're actually trying to
    accomplish because I see no reason to do "pkg update" unless there's
    actually some package you're thinking of updating (and pkg upgrade
    does pkg update automatically). Similarly, I'm not sure why you
    would want to upgrade a package merely because a newer one has
    appeared. "pkg audit", whether run by you or by the
    periodic/security script, will tell you if there's a security issue
    with an installed package.

    I normally keep my system on the latest versions of packages. Is there
    a reason against that?


    --
    kind regards
    Marco

    Send spam to 1755977369muell@stinkedores.dorfdsl.de

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Winston@21:1/5 to originally on Sun Aug 24 15:02:24 2025
    Marco Moock <mm@dorfdsl.de> originally asked:
    I would like to ask if it is possible to configure periodic in a way
    that notifies me of ne updates via pkg and freebsd-update.

    Is there a way to do that (and only that, not daily mails about
    normal operations)?

    to which I replied:
    "freebsd-update cron"? It emails you if updates were found.

    [well, at least it claims to do so; I haven't tried it, and, of course,
    the daily /usr/local/etc/periodic/security/405.pkg-base-audit run tests
    the base system, too.]

    Marco Moock <mm@dorfdsl.de> continued:
    Crontab has such a line:

    @daily root freebsd-update cron

    [I'm assuming you mean /etc/crontab.]

    I haven't received any message yet, mail to root works and the
    periodic reports are delivered.

    The last update was 8/8, if that matters. If you updated then, you
    wouldn't have seen anything since.


    ... I'm not sure why you would want to upgrade a package merely
    because a newer one has appeared.

    I normally keep my system on the latest versions of packages.
    Is there a reason against that?

    For minor versions / patches, probably not. For major version changes, sometimes.

    For packages that install version-dependent files (under, for example, /usr/local/share/$program/$version or $program-$version), pkg install of version N+1 can uninstall version N's files. If $program is running
    when that upgrade happens, it can suddenly find its library files gone. Depending on the application, having to save all the work you're in the
    middle of, exit (losing all your "undo" history), restart, and restore
    state may be inconvenient.

    Another case (very rare, but it happened once), was when the latest
    version of a library was broken and I needed to work around pkg's
    insistence on installing the newer version.

    If you truly want to keep everything up to the latest version, I'd say
    just run "pkg upgrade" by hand from time to time.

    Blindly upgrading automatically seems risky to me, even if it's doable.
    New versions sometimes have new dependencies, causing additional
    packages to be installed. If a newly installed package is unmaintained
    and has security issues, you probably want to know (though pkg audit
    will alert you next time it runs).

    The other problem is that pkg upgrade asks for confirmation before doing
    the upgrade, and I don't see a pkg command line way of saying Yes. You
    might have to do some shell hackery, but simply providing "y<CR>" on
    stdin fails in the "new version of pkg detected, it must be installed
    first" case.

    So, as I said, I think it'd be better and safer to do that manually from
    time to time.

    Just my opinion. I'm much more in the "If it ain't broke, don't fix
    it." camp.
    -WBE

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)