From owner-freebsd-stable@freebsd.org Tue Aug 11 08:31:43 2015 Return-Path: Delivered-To: freebsd-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2938E99F921 for ; Tue, 11 Aug 2015 08:31:43 +0000 (UTC) (envelope-from matthew@freebsd.org) Received: from smtp.infracaninophile.co.uk (smtp.infracaninophile.co.uk [IPv6:2001:8b0:151:1:3cd3:cd67:fafa:3d78]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.infracaninophile.co.uk", Issuer "infracaninophile.co.uk" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id C2D3A84A for ; Tue, 11 Aug 2015 08:31:42 +0000 (UTC) (envelope-from matthew@freebsd.org) Received: from ox-dell39.ox.adestra.com (no-reverse-dns.metronet-uk.com [85.199.232.226] (may be forged)) (authenticated bits=0) by smtp.infracaninophile.co.uk (8.15.2/8.15.2) with ESMTPSA id t7B8VK8q088160 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Tue, 11 Aug 2015 09:31:31 +0100 (BST) (envelope-from matthew@freebsd.org) Authentication-Results: smtp.infracaninophile.co.uk; dmarc=none header.from=freebsd.org DKIM-Filter: OpenDKIM Filter v2.9.2 smtp.infracaninophile.co.uk t7B8VK8q088160 Authentication-Results: smtp.infracaninophile.co.uk/t7B8VK8q088160; dkim=none reason="no signature"; dkim-adsp=none; dkim-atps=neutral X-Authentication-Warning: lucid-nonsense.infracaninophile.co.uk: Host no-reverse-dns.metronet-uk.com [85.199.232.226] (may be forged) claimed to be ox-dell39.ox.adestra.com Subject: Re: (once again) freebsd-update cron and man whatis To: =?UTF-8?Q?Marko_Cupa=c4=87?= , freebsd-stable@freebsd.org References: <20150811092154.0252ba46@efreet> From: Matthew Seaman X-Enigmail-Draft-Status: N1110 Message-ID: <55C9B2C8.6020406@freebsd.org> Date: Tue, 11 Aug 2015 09:31:04 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: <20150811092154.0252ba46@efreet> Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="JuXwPiQTWOt2ev7ci9JFbWTSadC9Gb79H" X-Virus-Scanned: clamav-milter 0.98.7 at lucid-nonsense.infracaninophile.co.uk X-Virus-Status: Clean X-Spam-Status: No, score=-2.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on lucid-nonsense.infracaninophile.co.uk X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Aug 2015 08:31:43 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --JuXwPiQTWOt2ev7ci9JFbWTSadC9Gb79H Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 08/11/15 08:21, Marko Cupa=C4=87 wrote: > - Next morning I get notification from freebsd-cron for the same update= > I installed yesterday, but only for /usr/share/man/whatis. (not ok) Did you by any chance happend to run the weekly/320.makewhatis periodic script that night? It is enabled by default. However, you shouldn't need it if you maintain your system entirely through freebsd-update. > Are there any differences between freebsd-update cron and > freebsd-update fetch, apart from random time offset? freebsd-update is a shell script, so it's fairly easy to see the difference between 'fetch' and 'cron' -- look for the functions 'cmd_fetch()' and 'cmd_cron()' in the code (they're right next to each other.) The differences are: 'fetch' tests that is is connected to a tty and complains about not being run interactively if not 'cron' sleeps for a random number of seconds up to 1 hour, and it logs everything it does to a temporary file in order to mail back a report to the user if needed. Otherwise, they both call exactly the same 'fetch_check_params()' and 'fetch_run()' functions. Cheers, Matthew # Fetch command. Make sure that we're being called # interactively, then run fetch_check_params and fetch_run cmd_fetch () { if [ ! -t 0 -a $NOTTYOK -eq 0 ]; then echo -n "`basename $0` fetch should not " echo "be run non-interactively." echo "Run `basename $0` cron instead." exit 1 fi fetch_check_params fetch_run || exit 1 } # Cron command. Make sure the parameters are sensible; wait # rand(3600) seconds; then fetch updates. While fetching updates, # send output to a temporary file; only print that file if the # fetching failed. cmd_cron () { fetch_check_params sleep `jot -r 1 0 3600` TMPFILE=3D`mktemp /tmp/freebsd-update.XXXXXX` || exit 1 if ! fetch_run >> ${TMPFILE} || ! grep -q "No updates needed" ${TMPFILE} || [ ${VERBOSELEVEL} =3D "debug" ]; then mail -s "`hostname` security updates" ${MAILTO} < ${TMPFI= LE} fi rm ${TMPFILE} } --JuXwPiQTWOt2ev7ci9JFbWTSadC9Gb79H Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQIcBAEBCgAGBQJVybLYAAoJEABRPxDgqeTn/nAQALInNQvAFjSvjTfWugPt4brz OUjdnua+gOV1jxm3+Tp2USHJg9YvNKBK/vdpKRx9Js7ln21DXSbhtLNPQNBk9J4W EN++iseEZFZAPKdpoQaBmKZN/MB6TP6SaiXc5PjN7nzOYlCDKNTSmn4iNLIF8Gec Qr/S16fkCf30TRvb26uqVv+km+PagLVSGAxM5C6Vk+p6EPbbBU5GtEoPdIFA1qim /wFZ8kHI29BQJeLV+1eiOLh6sG+djz0ORonILdy8SLYmLmgP14iNUW25WOpU6it+ 0sExj1om+HDu9i7/3bFl/sRm+UB4rv/TnCm/0PrkNr5wogZJCi4hNby2D7dN5mx+ tvNkjeOOOsuv7MeNq+ZYIniW8X52RVphDs0bNuk9c3477n+QKH+BlkmAG5v+G6Ml XQfUI8Z9rxIfywruEvTxCLa4Hpf0e9xcVklDhQAVvtDbXvZkGAIk/3j0lYSgBtZp URjyANqDTt2SOoWS2YPsrbLuBh1Y+42dA6L3b5raZ8n3OEx1STqWQgVJhOLk13yI /CEMSjkDAoGnEQWGbHYhOhtsjNd5+GrRBR2MHwju1W+a2KG2h1s6bfG99BR9havv XwBLh6Y/4C1V4NnecjqTzb1iJADJ9EdmT1n3CW92e+KggCVoef8mp9s37xQOWzMw kh367qG4Upa1wowrrNhk =NMXi -----END PGP SIGNATURE----- --JuXwPiQTWOt2ev7ci9JFbWTSadC9Gb79H--