From owner-freebsd-pkg@FreeBSD.ORG Fri Jan 31 10:59:22 2014 Return-Path: Delivered-To: freebsd-pkg@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2F6153B1 for ; Fri, 31 Jan 2014 10:59:22 +0000 (UTC) Received: from smtp.free.de (smtp.free.de [91.204.6.103]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 981BE1392 for ; Fri, 31 Jan 2014 10:59:21 +0000 (UTC) Received: (qmail 7393 invoked from network); 31 Jan 2014 11:52:36 +0100 Received: from smtp.free.de (HELO orwell.free.de) (k@free.de@[91.204.4.103]) (envelope-sender ) by smtp.free.de (qmail-ldap-1.03) with AES128-SHA encrypted SMTP for ; 31 Jan 2014 11:52:36 +0100 From: Kai Gallasch Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg=pgp-sha512; boundary="Apple-Mail-42-541501050" Content-Transfer-Encoding: 7bit Subject: pkg snapshot and pkg rollback functionality Date: Fri, 31 Jan 2014 11:52:41 +0100 Message-Id: <95F734F1-21C5-4DAC-ADC2-AF730B115237@free.de> To: freebsd-pkg@freebsd.org Mime-Version: 1.0 (Apple Message framework v1085) X-Pgp-Agent: GPGMail 1.4.1 X-Mailer: Apple Mail (2.1085) X-BeenThere: freebsd-pkg@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Binary package management and package tools discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Jan 2014 10:59:22 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --Apple-Mail-42-541501050 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Hi. I am using pkg in combination with my own poudriere repos to install and = maintain a lot of FreeBSD servers and jails. When upgrading FreeBSD installations I often run into the following = problem: After I did a "pkg upgrade" I find out the hard way, that upgraded = applications are broken (software bug, config changed, incompatible = dependencies, etc.) and I need to go back to the state, before the pkg = upgrade. I normally get around this bis doing a "zfs snapshot" and a rollback = after I broke something with pkg upgrade.. What is your preferred method of rolling back a troublesome pkg upgrade? Wouldn't it be nice to have a "pkg snapshot" and "pkg rollback" = functionality in pkg itself? The upgrade cycle would then be: a) pkg snapshot --create --comment "before upgrade to php 5.3.38" b) pkg upgrade c) bang!! php trouble.. d) pkg snapshot --rollback --last This could be implemented in a way to lock all packages in the local = package cache of the upgraded system, that are connected to a certain = existing pkg snapshot. -- example -- # pkg clean The following package files will be deleted from the cache directory /var/cache/pkg: Package: Origin: Reason: All/bash-4.2.45.txz shells/bash Superseded by = bash-4.2.45_1 All/pkg-1.2.1.txz ports-mgmt/pkg Superseded by = pkg-1.2.5 All/openssl-1.0.1_8.txz security/openssl Superseded by = openssl-1.0.1_9 All/sqlite3-3.8.0.2.txz databases/sqlite3 Superseded by = sqlite3-3.8.2 All/p5-Socket6-0.25.txz net/p5-Socket6 Superseded by = p5-Socket6-0.25_1 The following package files are locked and cannot be deleted from the = cache directory, because they belong to an existing snapshot. Please delete = snapshot first! All/python27-2.7.6.txz lang/python27 needed by snapshot = $snapshot_uuid All/p5-DateTime-1.04.txz devel/p5-DateTime needed by snapshot = $snapshot_uuid -- example -- Other functions: - pkg snapshot --list - pkg snapshot --delete --$snapshot_uuid I think such a snapshot/rollback option for pkg would be very = beneficial, because it would give you the option to "roll back" your pkg = to every former frozen state in an orderly manner. Even after you find = out a week later that doing an upgrade was not such a splendig idea. What do you think? K. -- GPG-Key: A593 E38B E968 4DBE 14D6 2115 7065 4D7C 4FB1 F588 Key available from hkps://hkps.pool.sks-keyservers.net --Apple-Mail-42-541501050 content-type: application/pgp-signature; x-mac-type=70674453; name=PGP.sig content-description: Signierter Teil der Nachricht content-disposition: inline; filename=PGP.sig content-transfer-encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJS64B5AAoJEHBlTXxPsfWIZPsQAKSuJxE6YuO+jEH9VO/bChbT oH5tkJUdgPs4ioZuDnbzloQRKdiNaCoffXSFF0Ks67zqtcWQAOVv2fpMlWLGdt/6 kCulA5MHiiuqa7E3BVHvg9Yhhf/p55GmyAr9IfNbC0moofko12nc9w9AS3VSeBC4 5qwavHER28ZkYhcMeF4U+hYCPHHSYEGHXA1ZuXWZjp9eawTO6jtDEFORbNQmX2EB BVckWIhVH1AJeDty1Q1mPAdGQkwxuhArbnQ4NvbLPMlOb0ibLqAsO5gANc2GSk7V gEGuz5F+vEp1qGERMVOaV8xF0LG4gKuhGDkwuqqMRb3k6sS5xEeq1KJ6pm4VSAbY iNwKjb4Sm7bbei1pjRuvr2mGhKaOcsQNI6NOBkIt2MX8Fow9TjmvhmKOObqc7VXW n6sSaAUavKo9rrpTlhrXwGbHKoVjclazrHbWchmygJq2rTRVasIyf/NyYpdqIFZX Y/GneXP/GEcgVhDKpBLQoSfDjxS9s1K9ZFL+rDPAAoUzOFkYXPEAkqYpowJw8BFs 0fuqYagDhpd5couWbyE42pORRUan8U8WegvhywKAUyjZSAoo2BdNZ3puAepPMvX2 hYzklElnD4OylR/vBD5C4ZCqysFxCsaDw6nQSXZwkJ6E5w2DsJ/8G6VtiiadafQg m8+IE7pvkzKp0HZuyOuR =DLUu -----END PGP SIGNATURE----- --Apple-Mail-42-541501050--