From nobody Mon Apr 04 16:38:20 2022 X-Original-To: freebsd-pkg@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4D9781A9B411 for ; Mon, 4 Apr 2022 16:38:24 +0000 (UTC) (envelope-from matthew@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KXGg41WZ9z52jq for ; Mon, 4 Apr 2022 16:38:24 +0000 (UTC) (envelope-from matthew@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649090304; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=OPOd+eGNs3ut2cGkwE/ddNDN3jK3i51CO5ok2XwwRtM=; b=af59nt0X7G4s1+hERuhSsNZX293oWknGum38oRd41gJP1voWJWsWoDJ73AxwelcH0cKRON ucTxm3cQJiVvKZAsRdBFCVPOg9jf65wmhRse2FmLauKtJuX9OU9kyPQWVNrjFh9JItlSo0 9tZrmsz2fvWWLK7yq34s/C0SetToYy7XfYuko3En1RBRj5l/t6trIHgS0LYvxLYFyJOtHC rtNr1F5ID1+hO6Whz250OGccEZBr8MIS6bUEKYyfecBjZf3NC5QQGB9VhKzxS+4cwyhtmp duM73lZCMEGka0QEEtOa25mIUxSEavglOB7hdNqhVLWdokQu5s6m+/H+QzdhTQ== Received: from smtp.infracaninophile.co.uk (smtp.infracaninophile.co.uk [81.2.117.100]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.infracaninophile.co.uk", Issuer "R3" (verified OK)) (Authenticated sender: matthew/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id EAC038F48 for ; Mon, 4 Apr 2022 16:38:23 +0000 (UTC) (envelope-from matthew@FreeBSD.org) Received: from [192.168.23.146] (130.31-255-62.static.virginmediabusiness.co.uk [62.255.31.130]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: m.seaman@infracaninophile.co.uk) by smtp.infracaninophile.co.uk (Postfix) with ESMTPSA id 6C211106D4 for ; Mon, 4 Apr 2022 16:38:21 +0000 (UTC) Authentication-Results: smtp.infracaninophile.co.uk; dmarc=none (p=none dis=none) header.from=FreeBSD.org Authentication-Results: smtp.infracaninophile.co.uk/6C211106D4; dkim=none; dkim-atps=neutral Message-ID: Date: Mon, 4 Apr 2022 17:38:20 +0100 List-Id: Binary package management and package tools discussion List-Archive: https://lists.freebsd.org/archives/freebsd-pkg List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-pkg@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: Re: removing a pkg from pkg database without deleting the pkg itself Content-Language: en-GB To: freebsd-pkg@freebsd.org References: <5dcfff1f-4cbd-992e-0ddc-b923b06c74e1@FreeBSD.org> From: Matthew Seaman In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649090304; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=OPOd+eGNs3ut2cGkwE/ddNDN3jK3i51CO5ok2XwwRtM=; b=OlBs0a4SdRs86UYa6rrRtefJGnCQnj6ZD3wuVn3KveuKMOvLbCdPGFX9tXQeu0LOxbLv3I JyxKjhHOaaoxPN15kYOUSlTf8CVhit63ngO+N5i80RUQjPAvpskwXmqmHmB3kj6P7HTzNJ wjEXIoRcIar7h251dFUn1yf9ysIo7+JIrajjTbRHiepYU0sehJDt9T08suyhFISTgdVFbo hbKhrQ+M5bMjzOb4ohctoiAKynBNzcdhq1KGC2Q2W6e+Gh/Qohl2gtzXkashfQ+tIOwWol COEhOAoyLGjADaIItteFTb/CfPf2SlyVhpZ2SxIfjE7s/bBvM8VBvK6Gh1TU7Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1649090304; a=rsa-sha256; cv=none; b=P/Hyt3l7bq958DdGnQnSb9UUW3kV4n/uK3oVu07OPC0uLeCu2BRn7MYEt4N/222jVL1SbH IvrfoxoHeOyLmD4D6VcWF4BvBnEtXYd6bZGldYGdo61WzniM4BL3Av5uyNjVvX6EkBDYks 27lsu11Buu4N1GbUDzb8D2RuCJjL/eT+Ie8z+LG9wYlBb/pmBn5jHYzz5vtwhwy1ByZWDR oXLT3oxSStiI5CqHVUgATbXwysoavucg2/8E7hX00HXADFEqVzouJw33FBxeWPQXXthoaH BhKXPlpqcvCTQmQhBt9ykD+wkP5qqeguQr/ni+H3Sl2yYg2AoyWE5A1rSNy3SQ== ARC-Authentication-Results: i=1; smtp.infracaninophile.co.uk; dmarc=none (p=none dis=none) header.from=FreeBSD.org X-ThisMailContainsUnwantedMimeParts: N On 04/04/2022 16:27, tech-lists wrote: > On Mon, Apr 04, 2022 at 03:35:16PM +0200, Stefan Esser wrote: >> Am 04.04.22 um 15:26 schrieb tech-lists: >>> Hi, >>> >>> I'd like to remove a pkg entry from the database so it's not managed >>> by pkg. >> >> The simplest way to exclude an installed package from being managed >> by pkg is to use "pkg lock": >> >> # pkg lock -y >> >> See "man pkg-lock" for more details. > > That will work for a time, but won't it stop other packages linked to it > from being updated? > > The packages in question are nextcloud and drupal. > > The other thing is that even with pkg lock, I seem to recollect it'll > still show up in packages-that- > need-upgrading in the daily cronjob. I might be wrong about that though. pkg(8) doesn't really have a concept of giving up management of a package that it originally installed. What you could do is use 'pkg info' to generate a list of the files installed by the package. Feed that into tar(1) to create a backup, then use pkg(8) to delete the package and tar to recover the files from your backup. There will be a short service outage while you do that: if that's not acceptable then you can probably adapt the procedure by using tar(1) or similar to copy the package files to an alternate filesystem location, making whatever config changes you need to in your webserver and application config to serve the site from the new location, and then deleting the original package. Cheers, Matthew