From owner-freebsd-questions@FreeBSD.ORG Sun Jan 4 11:36:29 2015 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4D0EADE0 for ; Sun, 4 Jan 2015 11:36:29 +0000 (UTC) Received: from avasout07.plus.net (avasout07.plus.net [84.93.230.235]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (Client CN "Bizanga Labs SMTP Client Certificate", Issuer "Bizanga Labs CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id CE2B536E5 for ; Sun, 4 Jan 2015 11:36:28 +0000 (UTC) Received: from curlew.milibyte.co.uk ([84.92.153.232]) by avasout07 with smtp id bncH1p004516WCc01ncJa4; Sun, 04 Jan 2015 11:36:20 +0000 X-CM-Score: 0.00 X-CNFS-Analysis: v=2.1 cv=T7ICTp6Q c=1 sm=1 tr=0 a=lfSX4pPLp9EkufIcToJk/A==:117 a=lfSX4pPLp9EkufIcToJk/A==:17 a=D7rCoLxHAAAA:8 a=0Bzu9jTXAAAA:8 a=cYTjFNdXV1EA:10 a=YNv0rlydsVwA:10 a=r77TgQKjGQsHNAKrUKIA:9 a=9iDbn-4jx3cA:10 a=cKsnjEOsciEA:10 a=gZbpxnkM3yUA:10 a=6I5d2MoRAAAA:8 a=tJa2htEO8CC4ZWrgjWcA:9 a=wPNLvfGTeEIA:10 a=pQwrMmy2vHIA:10 a=tUSzFODZPqcA:10 a=gWmOFBW1Y4AA:10 a=J_x5q8_hs_aYxOwebjcA:9 a=yA-dOUzFY9CLK4al:21 a=J6dxw5TVKwKILgaQ:21 a=QEXdDO2ut3YA:10 Received: from curlew.lan ([192.168.1.13]) by curlew.milibyte.co.uk with esmtp (Exim 4.84) (envelope-from ) id 1Y7jTj-0001D3-T9; Sun, 04 Jan 2015 11:36:17 +0000 From: Mike Clarke To: freebsd-questions@freebsd.org Date: Sun, 04 Jan 2015 11:16:52 +0000 Message-ID: <3260976.9592SAMzda@curlew.lan> User-Agent: KMail/4.14.2 (FreeBSD/10.1-RELEASE; KDE/4.14.2; amd64; ; ) In-Reply-To: References: <54A8ED8C.8020404@eskk.nu> MIME-Version: 1.0 X-SA-Exim-Connect-IP: 192.168.1.13 X-SA-Exim-Mail-From: jmc-freebsd2@milibyte.co.uk X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on curlew.lan X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham autolearn_force=no version=3.4.0 Subject: Re: pkg upgrade question Content-Type: multipart/mixed; boundary="nextPart3692520.cOyImHYnJC" Content-Transfer-Encoding: 7Bit X-SA-Exim-Version: 4.2 X-SA-Exim-Scanned: Yes (on curlew.milibyte.co.uk) Cc: Leslie Jensen X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jan 2015 11:36:29 -0000 This is a multi-part message in MIME format. --nextPart3692520.cOyImHYnJC Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="iso-8859-1" On Sunday 04 Jan 2015 08:50:18 Zsolt Udvari wrote: > If you don't care about ports tree only the repository, please use > "pkg version -R". Check "man pkg-version" for documentation Alternatively you can use svn or svnlite to synchronise your ports tree with the snapshot which was used for the packages currently in the repository. This is an advantage if you build some packages from ports since it ensures you don't get any dependency conflicts. This was recently discussed in a thread in ports@ . A script for synchronising the ports tree for poudriere was posted in . I don't use poudriere so I've modified a copy of the script to synchronise /usr/ports instead of the poudriere jails. The script works for 64 bit 10.x-RELEASE. For 8.x or 9,x you'll need to change the value of JAIL. If you're using 32 bit I think you'll need to change SERVER to beefy1.isc.freebsd.org as well as changing JAIL but there appears to be a problem with the website at the moment so I can't check. -- Mike Clarke --nextPart3692520.cOyImHYnJC Content-Disposition: inline; filename="portsync" Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="utf-8"; name="portsync" #!/bin/sh # Copyright (c) 2014 Reed A. Cartwright # # Modified by Mike Clarke to use /usr/ports instead of poudriere # # This script determines the revision number used to build FreeBSD packages # and syncs a local ports directory to match it. # # USAGE: portsync # # REQUIREMENTS: textproc/jq SERVER=beefy2.isc.freebsd.org JAIL=10amd64-default URL="http://${SERVER}/data/${JAIL}/.data.json" PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin PORTSDIR=/usr/ports # Fetch data from server JSON=`fetch -qo - $URL` if [ $? -gt 0 ]; then >&2 echo "ERROR: Unable to fetch data from package server." exit 1 fi # Parse Revision information from server REV=`echo "${JSON}" | jq -r '.builds[.builds.latest].svn_url | split("@")[1]'` # Check revision information if expr "$REV" : '^[[:digit:]][[:digit:]]*$' >/dev/null; then # Skip update if revisions are in sync CURREV=`svnlite info "${PORTSDIR}" | sed -ne '/^Revision: /s/^Revision: //p'` echo "====>> Updating ${PORTSDIR} from revision ${CURREV} to ${REV}" if [ "${CURREV}" -ne "${REV}" ]; then svnlite up -r "${REV}" "${PORTSDIR}" else echo No update needed fi else >& echo "ERROR: Unable to determine revision number for latest packages." exit 1 fi --nextPart3692520.cOyImHYnJC--