From owner-freebsd-questions@freebsd.org Mon Sep 30 02:33:53 2019 Return-Path: Delivered-To: freebsd-questions@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CDF8AF88B4 for ; Mon, 30 Sep 2019 02:33:53 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mout.kundenserver.de (mout.kundenserver.de [217.72.192.73]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "mout.kundenserver.de", Issuer "TeleSec ServerPass Class 2 CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46hRKr2XBjz4Dhn for ; Mon, 30 Sep 2019 02:33:51 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from r56.edvax.de ([94.222.27.221]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.183]) with ESMTPA (Nemesis) id 1Mof1D-1hm0Cv1qf3-00p6TP; Mon, 30 Sep 2019 04:33:44 +0200 Date: Mon, 30 Sep 2019 04:33:39 +0200 From: Polytropon To: Paul Schmehl Cc: FreeBSD Questions Subject: Re: How to tell what users Ruby Message-Id: <20190930043339.f6d30c68.freebsd@edvax.de> In-Reply-To: References: <20190929082601.9152a485.freebsd@edvax.de> Reply-To: Polytropon Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:vzOoMd6Pq1n2Kg2gWhCKr2ANwdULbrKjJnNAKCEYLYxevJlyjmU cMHVyHoEJWUfJhBtbi6MYwduq+dlNi3yMZ/6Alqnsdixp5MfEWYMmhw+zaGaVjxQVbSJCHw kkgXFnYTi1Qs7MFVeHDhjkjwgWa9rDbZm8jpkQMwLfOIO/zHMIIjI0dC7AWW3TGa8okhkPl TjcOd8ojsAu1x3UOF5AZA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:JeduPMmES40=:UNqmjcdI092OAiIX7993O3 CQjFE0fzMcAta03PizvjCH+Wn8vInW8qrWXFL7FoTB235L08CFZ2/o4L4BcWE3yofVtqUc/OU X6E+rruiKWHMy5AUTUX+d9JR1oIgvhhKKSrl87RWiJrgu/MXqkKUMtKUsj5FRWrz+A0EOdsLt wjX5Z5FSIBGTHrz57smmWKh3YQiQSbH6H9wwybxZBJjCCz2T5iO9dGjldUUWhIPQNl/SO292A 5beCYJkhkVI++k5O3JJqxQRjo3zkv8oZH2lXszh6OG+08BIve/SRe6pmf58CxtGDhoaUAJvGP HtcH56Gbtyc/lgi272nbF21+fi7RQ/fZJnrRyH3dzs/tHJdL0/rOK+VPFnSnQBZE6kLNu1vV+ QylRboajRluADmlyM7DGVl2Y0I0LhvW64AHwDNmjQXUrSGljM5O0DYOgIC35QEE69a/n9rwU6 DufxnV/qi9RP+1v6vSY4H1yZV0AjxJWSlQlS7Mq+WVwJZqMg8/7zPitN7kAAgypaH/EhigQY3 hrFINOadllR4560d3uuqXEyImPcoQ5X4pRZQCp04XpNenkA4TP46FumUE8zx6x8fI1Z9Bt0nI 69mtiIOI5BYeBCGEvuNqpdeY++8lUmw2xD33eYC2DJmiwGV2khM1ealbC1YphdPuJL5KA+69L mlGFB6sLNzTrxXoQ9kEcWnj76v/elycC3BTNzySqq1NoRcmBCZWCXmctXuUn4noOlkKx0d6pr ItOxDuDB0jsbZi6w0ogKH89Oki1Xu5BA/KNNrEJQQJGr4yk0RWqDKRjXeEX0DfZnTj7Cnj+Dg TFa2mKb1j0lf+D0KeEXKE04NyTwPUG+tI7T/fw00zGYcxz2ntmH/LnZOkUQhyFBn/q5kojJkh 4rsdIO67isvHBpjFvQ1yv+hFI6Eenlfr5bg/1ozlk= X-Rspamd-Queue-Id: 46hRKr2XBjz4Dhn X-Spamd-Bar: ++++ Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of freebsd@edvax.de has no SPF policy when checking 217.72.192.73) smtp.mailfrom=freebsd@edvax.de X-Spamd-Result: default: False [4.30 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; HAS_REPLYTO(0.00)[freebsd@edvax.de]; MV_CASE(0.50)[]; HAS_ORG_HEADER(0.00)[]; TO_DN_ALL(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; RECEIVED_SPAMHAUS_PBL(0.00)[221.27.222.94.khpj7ygk5idzvmvt5x4ziurxhy.zen.dq.spamhaus.net : 127.0.0.11]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:8560, ipnet:217.72.192.0/20, country:DE]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; REPLYTO_EQ_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; DMARC_NA(0.00)[edvax.de]; AUTH_NA(1.00)[]; NEURAL_SPAM_MEDIUM(0.45)[0.448,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_SPAM_LONG(0.94)[0.945,0]; MID_CONTAINS_FROM(1.00)[]; RCVD_IN_DNSWL_NONE(0.00)[73.192.72.217.list.dnswl.org : 127.0.5.0]; R_SPF_NA(0.00)[]; RWL_MAILSPIKE_POSSIBLE(0.00)[73.192.72.217.rep.mailspike.net : 127.0.0.17]; RCVD_COUNT_TWO(0.00)[2]; IP_SCORE(0.51)[ip: (0.28), ipnet: 217.72.192.0/20(0.20), asn: 8560(2.06), country: DE(-0.01)] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Sep 2019 02:33:53 -0000 On Sun, 29 Sep 2019 18:42:46 -0500, Paul Schmehl wrote: > --On September 29, 2019 at 8:26:01 AM +0200 Polytropon > wrote: > > > On Sun, 29 Sep 2019 01:17:52 -0500, Paul Schmehl wrote: > >> I'm running ruby 2.4 on a server. I want to upgrade to the new default > >> version, so I checked /usr/ports/UDPATING. > >> > >> Among other things, it said this: "f you wish to update to the new > >> default version, you need to first stop any software that uses ruby." > >> > >> Is there a utility I can use that will tell me that? How do I identify > >> what programs are using ruby? > > > > Yes, pkg provides a part of that functionality; check "man pkg-info" > > for the "--required-by" (or -r) flag. Make a list of the packages > > that depend on the currently installed Ruby version: > > > > # pkg info -r ruby > > > > When I ran this it listed no programs. Which is kind of odd, since I know > portmaster uses ruby. I've just installed portmaster for testing - you're right, it does not show up as depending on ruby; vim, however, does: # pkg info -r ruby ruby-2.5.5_2,1: vim-8.1.1439 Interesting thing: portmaster's Makefile does not mention ruby at all. So I tried something: I removed ruby and vim and portmaster, then installed portmaster again - and no ruby. So my guess is: portmaster does no longer depend on ruby. I'll now be installing vim again, and notice version changes: vim: 8.1.1954 ruby: 2.6.4,1 Additionally, pkg and perl get upgraded, too. I have to say, pkg is really great. :-) > Anyway, I just did a pkg delete, and nothing was listed, so I deleted it > and installed 2.6. Depending on the services your server runs, it should have been possible to construct something like # pkg info -r ruby | something | something else | xargs -n 1 service stop to stop the services that depend on ruby before performing the upgrade. As others have mentioned, tools like lsof and a "non-deleting pkg delete" would also provide information on where ruby is in use. -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...