Re: Cleaning system's old ibraries/files after update to next -release or -current

2020-07-15 Thread Stuart Henderson
>> My take is to purge old libs after every new release.  Once, I had to do
>> it in the middle of a version upgrade, because there was no space left
>> on disk to complete it.  My fault only, I had a very tight custom
>> partitioning layout.
>
> I don't think it's that easy.  One case it comes to mind it's that
> there's a short window after an update and between `pkg_add -u` where
> you're running a new system but with old ports.  Your entire system
> (except base stuff) would break if you remove the libraries.  There may
> be more edge cases like this.

If you use packages rather than self-built software from outside
of ports/packages, sysclean already takes care of this when suggesting
what to remove.




Re: Cleaning system's old ibraries/files after update to next -release or -current

2020-07-15 Thread Uwe Werler
On 14 Jul 15:44, Stuart Henderson wrote:
> On 2020-07-14, Christian Weisgerber  wrote:
> > Old versions of libraries are innocuous.  They will simply be
> > ignored.
> 
> Until you run out of disk space, which is fairly easy in /usr if you
> installed a couple of releases ago and took the auto disklabel defaults.

If that happens during upgrade I usually ^C; umount /mnt/usr/local; umount
/mnt/usr/X11R6; umount /mnt/usr; newfs what-dev-usr-is; mount what-dev-usr-is
/mnt/usr; mkdir /mnt/usr/{local,X11R6} and restart upgrade.

That happens more or less regularly on my APU but never had any problems with
that.

-- 

Uwe



Re: Cleaning system's old ibraries/files after update to next -release or -current

2020-07-15 Thread Omar Polo


Dumitru Moldovan  writes:

> On Tue, Jul 14, 2020 at 03:44:18PM -, Stuart Henderson wrote:
>>On 2020-07-14, Christian Weisgerber  wrote:
>>> Old versions of libraries are innocuous.  They will simply be
>>> ignored.
>>
>>Until you run out of disk space, which is fairly easy in /usr if you
>>installed a couple of releases ago and took the auto disklabel defaults.
>
> Another issue with potential security implications: suppose you have
> built something that linked to old library versions laying around on
> disk.  And suppose a security issue affects one of the old libs,
> with implications for your binaries linked to it.  You won't even be
> aware of it.

This only applies to stuff you compiled on your own, so I guess its fair
that you are on your own.  (I do that too, but only for stuff I develop)

> My take is to purge old libs after every new release.  Once, I had to do
> it in the middle of a version upgrade, because there was no space left
> on disk to complete it.  My fault only, I had a very tight custom
> partitioning layout.

I don't think it's that easy.  One case it comes to mind it's that
there's a short window after an update and between `pkg_add -u` where
you're running a new system but with old ports.  Your entire system
(except base stuff) would break if you remove the libraries.  There may
be more edge cases like this.

My take is to doing a full reinstall once in a while (that also helps me
reorder my files and adjust partition sizes.)



Re: Cleaning system's old ibraries/files after update to next -release or -current

2020-07-15 Thread Dumitru Moldovan

On Tue, Jul 14, 2020 at 03:44:18PM -, Stuart Henderson wrote:

On 2020-07-14, Christian Weisgerber  wrote:

Old versions of libraries are innocuous.  They will simply be
ignored.


Until you run out of disk space, which is fairly easy in /usr if you
installed a couple of releases ago and took the auto disklabel defaults.


Another issue with potential security implications: suppose you have
built something that linked to old library versions laying around on
disk.  And suppose a security issue affects one of the old libs,
with implications for your binaries linked to it.  You won't even be
aware of it.

My take is to purge old libs after every new release.  Once, I had to do
it in the middle of a version upgrade, because there was no space left
on disk to complete it.  My fault only, I had a very tight custom
partitioning layout.



Re: Cleaning system's old ibraries/files after update to next -release or -current

2020-07-14 Thread Ottavio Caruso
On Tue, 14 Jul 2020 at 13:44, Ingo Schwarze  wrote:
>
> Hi,
>
> Martin wrote on Tue, Jul 14, 2020 at 11:11:34AM +:
>
> > After system update I found lots of 'old' libraries versions
> > and possibly binaries from previous releases.
> >
> > Does anybody know an automated method to remove it after update?
> > For instance previous libs before update to -current.
>
> If you need to ask, just don't remove them.  Those files eat no bread,
> and in some situations, some of the libs may still be in use.
>

What about if one compiles ports? If OpenBSD is anything similar to
NetBSD, on the latter having multiple libs might cause build
breakages.

-- 
Ottavio Caruso



Re: Cleaning system's old ibraries/files after update to next -release or -current

2020-07-14 Thread Stuart Henderson
On 2020-07-14, Christian Weisgerber  wrote:
> Old versions of libraries are innocuous.  They will simply be
> ignored.

Until you run out of disk space, which is fairly easy in /usr if you
installed a couple of releases ago and took the auto disklabel defaults.




Cleaning system's old ibraries/files after update to next -release or -current

2020-07-14 Thread Martin
After system update I found lots of 'old' libraries versions and possibly 
binaries from previous releases.

Does anybody know an automated method to remove it after update? For instance 
previous libs before update to -current.

Martin


Re: Cleaning system's old ibraries/files after update to next -release or -current

2020-07-14 Thread Christian Weisgerber
On 2020-07-14, Ottavio Caruso  wrote:

>> > After system update I found lots of 'old' libraries versions
>> > and possibly binaries from previous releases.
>>
>> If you need to ask, just don't remove them.  Those files eat no bread,
>> and in some situations, some of the libs may still be in use.
>
> What about if one compiles ports? If OpenBSD is anything similar to
> NetBSD, on the latter having multiple libs might cause build
> breakages.

Old versions of libraries are innocuous.  They will simply be
ignored.

Potential sources of trouble are old copies of libraries that no
longer exist and header files that no longer exist.  OpenBSD hasn't
retired a base library in a long time, so that isn't an issue.  I
recommend cleaning up /usr/include, though.

-- 
Christian "naddy" Weisgerber  na...@mips.inka.de



Re: Cleaning system's old ibraries/files after update to next -release or -current

2020-07-14 Thread Ingo Schwarze
Hi Ottavio,

Ottavio Caruso wrote on Tue, Jul 14, 2020 at 02:28:25PM +0100:
> On Tue, 14 Jul 2020 at 13:44, Ingo Schwarze  wrote:
>> Martin wrote on Tue, Jul 14, 2020 at 11:11:34AM +:

>>> After system update I found lots of 'old' libraries versions
>>> and possibly binaries from previous releases.
>>>
>>> Does anybody know an automated method to remove it after update?
>>> For instance previous libs before update to -current.

>> If you need to ask, just don't remove them.  Those files eat no bread,
>> and in some situations, some of the libs may still be in use.

> What about if one compiles ports? If OpenBSD is anything similar to
> NetBSD, on the latter having multiple libs might cause build
> breakages.

I don't remember ever hearing about anything like that on OpenBSD,
even though i do occasionally compile ports and i always have various
versions of various libraries lying around, both from base and from
ports.  (Given that i am not a very frequent porter, there might be
problems of the more unusual kind that i never heard about, but it's
certainly not something you need to worry about in general.)

If widespread problems caused by old files existed, the readily
available tool to delete old files would probably be advertised
more broadly and maybe even recommended for use.  But as things
are, you can merely use it if you know what you are doing and if
you want to, but at your own risk.  Less experienced users are more
likely to cause themselves trouble trying to use it than to get any
benefit from it.

And no, do not assume that OpenBSD is "like NetBSD" or "like FreeBSD".
They are different operating systems.  Yes, they do have common
ancestors, but the genetic lines diverged about 25 million years
ago.  Err, something like that, IIRC.

Yours,
  Ingo



Re: Cleaning system's old ibraries/files after update to next -release or -current

2020-07-14 Thread Ingo Schwarze
Hi,

Martin wrote on Tue, Jul 14, 2020 at 11:11:34AM +:

> After system update I found lots of 'old' libraries versions
> and possibly binaries from previous releases.
> 
> Does anybody know an automated method to remove it after update?
> For instance previous libs before update to -current.

If you need to ask, just don't remove them.  Those files eat no bread,
and in some situations, some of the libs may still be in use.

Too many people come back after doing that, whining "i broke my system,
what can i do now".  That's annoying both for them and for the list.

Yours,
  Ingo



Re: Cleaning system's old ibraries/files after update to next -release or -current

2020-07-14 Thread Zé Loff


On Tue, Jul 14, 2020 at 11:11:34AM +, Martin wrote:
> After system update I found lots of 'old' libraries versions and
> possibly binaries from previous releases.
> 
> Does anybody know an automated method to remove it after update? For
> instance previous libs before update to -current.
> 
> Martin

$ pkg_info sysclean
Information for inst:sysclean-2.8

Comment:
list obsolete files between OpenBSD upgrades

Description:
sysclean is a script designed to help remove obsolete files between
OpenBSD
upgrades.

sysclean compares a reference root directory against the currently
installed
files, taking files from both the base system and packages into account.

sysclean does not remove any files on the system. It only reports
obsolete
filenames or packages using out-of-date libraries.

Maintainer: Sebastien Marie 

WWW: https://github.com/semarie/sysclean/
--