Re: [GTALUG] Removing snapd from Ubuntu

2022-05-12 Thread William Park via talk

On 5/12/22 11:26, D. Hugh Redelmeier via talk wrote:

echo "$0: please use /usr/bin/python3 (or /usr/bin/python2 if you have to)" >2


Typo: ">&2" redirects stdout to stderr.  ">2" writes to file "2".
---
Post to this mailing list talk@gtalug.org
Unsubscribe from this mailing list https://gtalug.org/mailman/listinfo/talk


Re: [GTALUG] Removing snapd from Ubuntu

2022-05-12 Thread D. Hugh Redelmeier via talk
| From: Dave Collier-Brown via talk 

| In a life long ago, we'd have made /usr/bin/python a shell script, containing
| 
| echo "please run /usr/bin/python3"

Bikeshedding for fun:

#!/bin/sh
echo "$0: please use /usr/bin/python3 (or /usr/bin/python2 if you have 
to)" >2
exit 42

(Untested, leaving scope for follow-ups.)

Didactic explanation of additions:

#!/bin/sh
make sure that the system runs this with the correct shell.

$0
include the name by which the script was invoked in the message

(or /usr/bin/python2 if you have to)
admit that there are laggards and help them too

>2
this should really go to standard error since it is an error
message

exit 42
the script should fail: things have gone awry.
42 was chosen to be slightly distinctive.
1 would be more conventional.
---
Post to this mailing list talk@gtalug.org
Unsubscribe from this mailing list https://gtalug.org/mailman/listinfo/talk


Re: [GTALUG] Removing snapd from Ubuntu

2022-05-12 Thread Lennart Sorensen via talk
On Wed, May 11, 2022 at 06:36:43PM -0400, Dave Collier-Brown via talk wrote:
> In a life long ago, we'd have made /usr/bin/python a shell script, containing
> 
> echo "please run /usr/bin/python3"

I like it. :)

-- 
Len Sorensen
---
Post to this mailing list talk@gtalug.org
Unsubscribe from this mailing list https://gtalug.org/mailman/listinfo/talk


Re: [GTALUG] Removing snapd from Ubuntu

2022-05-12 Thread Lennart Sorensen via talk
On Wed, May 11, 2022 at 06:04:43PM -0400, Giles Orr via talk wrote:
> That actually makes sense.  Then the next one can be 'python4' without
> causing problems.  But many distros - and many system administrators
> will probably just make it 'python'.  
> 
> Yup.  Here's Fedora 35:
> 
> $ which python
> /usr/bin/python
> $ python --version
> Python 3.10.4
> 
> Debian is guilty of the same thing - which is interesting, because
> Ubuntu is based on Debian and would have had to take a detour to "do
> the right thing."

This is Debian:

lsorense@W530:~$ python --version
-bash: python: command not found
lsorense@W530:~$ python3 --version
Python 3.9.2
lsorense@W530:~$

> Debian and Fedora both also have /usr/bin/python3.

Debian has that, but not /usr/bin/python unless the user changed it.

Both Debian an Ubuntu have a package you can install named:
python-is-python3
which installs a symlink.  There is also a python-is-python2 package.

-- 
Len Sorensen
---
Post to this mailing list talk@gtalug.org
Unsubscribe from this mailing list https://gtalug.org/mailman/listinfo/talk


Re: [GTALUG] Removing snapd from Ubuntu

2022-05-11 Thread Dave Collier-Brown via talk

In a life long ago, we'd have made /usr/bin/python a shell script, containing

echo "please run /usr/bin/python3"

--dave

On 5/11/22 18:04, Giles Orr via talk wrote:

On Wed, 11 May 2022 at 14:54, Lennart Sorensen via talk 
 wrote:



On Wed, May 11, 2022 at 09:30:41AM -0400, Stewart Russell via talk wrote:


I just did the 22.04 upgrade thing, and it seems that Firefox will be held
at v 99 if you don't have snapd. So beware of old/held packages as you
update.

Another delightful thing I found is that Ubuntu took its very own special
path in the "Sensible things to do in the Python 2 / Python 3" debacle:
remove Python 2, but don't link python3 to python. Move fast and break
stuff is very tiring when you're constantly getting beaten up like this.



Upstream python says not to call python3 as python.  So Unbuntu did
it correctly.

Python 3 code calls /usr/bin/python3 (or probably better yet /usr/bin/env
python3) and legacy python 2 code calls /usr/bin/python.



That actually makes sense.  Then the next one can be 'python4' without
causing problems.  But many distros - and many system administrators
will probably just make it 'python'.  

Yup.  Here's Fedora 35:

$ which python
/usr/bin/python
$ python --version
Python 3.10.4

Debian is guilty of the same thing - which is interesting, because
Ubuntu is based on Debian and would have had to take a detour to "do
the right thing."

Debian and Fedora both also have /usr/bin/python3.



--
David Collier-Brown, | Always do right. This will gratify
System Programmer and Author | some people and astonish the rest
dave.collier-br...@indexexchange.com
 |  -- Mark Twain


CONFIDENTIALITY NOTICE AND DISCLAIMER : This telecommunication, including any 
and all attachments, contains confidential information intended only for the 
person(s) to whom it is addressed. Any dissemination, distribution, copying or 
disclosure is strictly prohibited and is not a waiver of confidentiality. If 
you have received this telecommunication in error, please notify the sender 
immediately by return electronic mail and delete the message from your inbox 
and deleted items folders. This telecommunication does not constitute an 
express or implied agreement to conduct transactions by electronic means, nor 
does it constitute a contract offer, a contract amendment or an acceptance of a 
contract offer. Contract terms contained in this telecommunication are subject 
to legal review and the completion of formal documentation and are not binding 
until same is confirmed in writing and has been signed by an authorized 
signatory.
---
Post to this mailing list talk@gtalug.org
Unsubscribe from this mailing list https://gtalug.org/mailman/listinfo/talk


Re: [GTALUG] Removing snapd from Ubuntu

2022-05-11 Thread Giles Orr via talk
On Wed, 11 May 2022 at 14:54, Lennart Sorensen via talk  wrote:
>
> On Wed, May 11, 2022 at 09:30:41AM -0400, Stewart Russell via talk wrote:
> > I just did the 22.04 upgrade thing, and it seems that Firefox will be held
> > at v 99 if you don't have snapd. So beware of old/held packages as you
> > update.
> >
> > Another delightful thing I found is that Ubuntu took its very own special
> > path in the "Sensible things to do in the Python 2 / Python 3" debacle:
> > remove Python 2, but don't link python3 to python. Move fast and break
> > stuff is very tiring when you're constantly getting beaten up like this.
>
> Upstream python says not to call python3 as python.  So Unbuntu did
> it correctly.
>
> Python 3 code calls /usr/bin/python3 (or probably better yet /usr/bin/env
> python3) and legacy python 2 code calls /usr/bin/python.

That actually makes sense.  Then the next one can be 'python4' without
causing problems.  But many distros - and many system administrators
will probably just make it 'python'.  

Yup.  Here's Fedora 35:

$ which python
/usr/bin/python
$ python --version
Python 3.10.4

Debian is guilty of the same thing - which is interesting, because
Ubuntu is based on Debian and would have had to take a detour to "do
the right thing."

Debian and Fedora both also have /usr/bin/python3.

-- 
Giles
https://www.gilesorr.com/
giles...@gmail.com
---
Post to this mailing list talk@gtalug.org
Unsubscribe from this mailing list https://gtalug.org/mailman/listinfo/talk


Re: [GTALUG] Removing snapd from Ubuntu

2022-05-11 Thread Lennart Sorensen via talk
On Wed, May 11, 2022 at 09:30:41AM -0400, Stewart Russell via talk wrote:
> I just did the 22.04 upgrade thing, and it seems that Firefox will be held
> at v 99 if you don't have snapd. So beware of old/held packages as you
> update.
> 
> Another delightful thing I found is that Ubuntu took its very own special
> path in the "Sensible things to do in the Python 2 / Python 3" debacle:
> remove Python 2, but don't link python3 to python. Move fast and break
> stuff is very tiring when you're constantly getting beaten up like this.

Upstream python says not to call python3 as python.  So Unbuntu did
it correctly.

Python 3 code calls /usr/bin/python3 (or probably better yet /usr/bin/env
python3) and legacy python 2 code calls /usr/bin/python.

-- 
Len Sorensen
---
Post to this mailing list talk@gtalug.org
Unsubscribe from this mailing list https://gtalug.org/mailman/listinfo/talk


Re: [GTALUG] Removing snapd from Ubuntu

2022-05-11 Thread Dave Collier-Brown via talk

On 5/11/22 11:39, D. Hugh Redelmeier via talk wrote:

Another downside of snaps: any bugs, including security bugs, in
shared libraries requires the distro to update the library AND the
snap publisher to rebuild the snap.  What are the chances of that
working out well?

Almost certainly a problem, and it doesn't scale. The repo and all the snap 
owners has to repeat the same analysis and repair work. Or blindly update the 
library and leave diagnosing any failures up to the users.

In the FreeS/Wan project, we changed the config file semantics.  At
the same time, we added a declaration to the config file to specify
which version the config file conformed to.  Good future-proofing, I
thought.

A successor project ripped that declaration out.  So changes in config
file semantics (rare or small) require manual intervention by the user,
with no automatic warning.

“Those who cannot remember the past are condemned to repeat it.” George 
Santayana

If you remove things because you don't understand them, as opposed to because 
they cause you problems, that may be A Bad Thing.

--dave




---
Post to this mailing list talk@gtalug.org
Unsubscribe from this mailing list https://gtalug.org/mailman/listinfo/talk


--
David Collier-Brown, | Always do right. This will gratify
System Programmer and Author | some people and astonish the rest
dave.collier-br...@indexexchange.com
 |  -- Mark Twain


CONFIDENTIALITY NOTICE AND DISCLAIMER : This telecommunication, including any 
and all attachments, contains confidential information intended only for the 
person(s) to whom it is addressed. Any dissemination, distribution, copying or 
disclosure is strictly prohibited and is not a waiver of confidentiality. If 
you have received this telecommunication in error, please notify the sender 
immediately by return electronic mail and delete the message from your inbox 
and deleted items folders. This telecommunication does not constitute an 
express or implied agreement to conduct transactions by electronic means, nor 
does it constitute a contract offer, a contract amendment or an acceptance of a 
contract offer. Contract terms contained in this telecommunication are subject 
to legal review and the completion of formal documentation and are not binding 
until same is confirmed in writing and has been signed by an authorized 
signatory.
---
Post to this mailing list talk@gtalug.org
Unsubscribe from this mailing list https://gtalug.org/mailman/listinfo/talk


Re: [GTALUG] Removing snapd from Ubuntu

2022-05-11 Thread D. Hugh Redelmeier via talk
| From: Stewart Russell via talk 

| I just did the 22.04 upgrade thing, and it seems that Firefox will be held
| at v 99 if you don't have snapd. So beware of old/held packages as you
| update.

Wow.  But it makes some kind of sense.

The point of snap is to allow the packager to ignore changes in the 
environment: the package contains much of its environment.

If a distro decides to distribute a snap to reduce the maintenance
burden, why would they also distribute a non-snap version.  That just
increases the burden.

Software distributors that don't own a distro have a much more valid
reason for using snap: they have no control over changes to the
distro.

==> I see no upside in distros distributing things as snaps (unless they 
are just passing on a snap that someone else created)

Another downside of snaps: any bugs, including security bugs, in
shared libraries requires the distro to update the library AND the
snap publisher to rebuild the snap.  What are the chances of that
working out well?

| Another delightful thing I found is that Ubuntu took its very own special
| path in the "Sensible things to do in the Python 2 / Python 3" debacle:
| remove Python 2, but don't link python3 to python. Move fast and break
| stuff is very tiring when you're constantly getting beaten up like this.

Looking on this from afar: is there a right way to do this?  Is there
a conventional wrong way to do this?

From a purist standpoint, one cannot know what is meant by "python".

If code uses "python", maybe it requires manual intervention to
disambiguate what exactly was meant by it.

This python2 => python3 transition is a decade-long source of horror
and humour to a spectator.  It's a common story of bad engineering,
writ large.

Anecdote:

In the FreeS/Wan project, we changed the config file semantics.  At
the same time, we added a declaration to the config file to specify
which version the config file conformed to.  Good future-proofing, I 
thought.

A successor project ripped that declaration out.  So changes in config 
file semantics (rare or small) require manual intervention by the user, 
with no automatic warning.
---
Post to this mailing list talk@gtalug.org
Unsubscribe from this mailing list https://gtalug.org/mailman/listinfo/talk


Re: [GTALUG] Removing snapd from Ubuntu

2022-05-11 Thread Stewart Russell via talk
I just did the 22.04 upgrade thing, and it seems that Firefox will be held
at v 99 if you don't have snapd. So beware of old/held packages as you
update.

Another delightful thing I found is that Ubuntu took its very own special
path in the "Sensible things to do in the Python 2 / Python 3" debacle:
remove Python 2, but don't link python3 to python. Move fast and break
stuff is very tiring when you're constantly getting beaten up like this.

 Stewart
---
Post to this mailing list talk@gtalug.org
Unsubscribe from this mailing list https://gtalug.org/mailman/listinfo/talk


Re: [GTALUG] Removing snapd from Ubuntu

2022-04-30 Thread Mauro Souza via talk
You can prevent snap from coming back with
sudo apt-mark hold snapd

Or you can use Linux Mint. It is my choice since Ubuntu 11.04 and Unity.

On Sat, Apr 30, 2022, 18:30 Stewart C. Russell via talk 
wrote:

> On 2022-04-29 08:50, Val Kulkov wrote:
> > Stewart, would you mind sharing your experience removing snapd from
> > Ubuntu? I'd love to learn how you managed to do it. I'd be happy to get
> > rid of snapd, too.
>
> I followed this guide, which I have to admit I haven't tried on a new
> 21.10 or 22.04 installation:
>
> Disabling Snaps in Ubuntu 20.10 (and 20.04 LTS) —
>
> https://www.kevin-custer.com/blog/disabling-snaps-in-ubuntu-20-10-and-20-04-lts/
>
> I'd approach it methodically, making sure you don't wipe out the system
> accidentally. Once snapd is removed, it stays removed as long as you
> don't install a package that's a snap in disguise.
>
>   Stewart
> ---
> Post to this mailing list talk@gtalug.org
> Unsubscribe from this mailing list
> https://gtalug.org/mailman/listinfo/talk
>
---
Post to this mailing list talk@gtalug.org
Unsubscribe from this mailing list https://gtalug.org/mailman/listinfo/talk


Re: [GTALUG] Removing snapd from Ubuntu

2022-04-30 Thread Stewart C. Russell via talk

On 2022-04-29 08:50, Val Kulkov wrote:
Stewart, would you mind sharing your experience removing snapd from 
Ubuntu? I'd love to learn how you managed to do it. I'd be happy to get 
rid of snapd, too.


I followed this guide, which I have to admit I haven't tried on a new 
21.10 or 22.04 installation:


Disabling Snaps in Ubuntu 20.10 (and 20.04 LTS) —
https://www.kevin-custer.com/blog/disabling-snaps-in-ubuntu-20-10-and-20-04-lts/

I'd approach it methodically, making sure you don't wipe out the system 
accidentally. Once snapd is removed, it stays removed as long as you 
don't install a package that's a snap in disguise.


 Stewart
---
Post to this mailing list talk@gtalug.org
Unsubscribe from this mailing list https://gtalug.org/mailman/listinfo/talk