Updating a program I use should never constitute "messing" with my OS, it should constitute "using". Why should I as an OS user have to constantly worry about upsetting the OS maker? Why should I have to jump through obscure hoops just to install some software without breaking my OS?
Wouldn't a better solution be for the OS makers to wall off their magic python behind some wall where I cannot see, touch nor use it, and let me install whatever python I want without fear.
Who even knows how it works these days?
So I just did it by hand, more like 50k...
Microsoft does stuff like this all the time, deprecating good .NET libraries for stupid ones just because of God knows what reasons (none of them intelligible to non-political folk).
If it really was a dependency, I think a bug should be filed against the package. :/
Being able to share and depend on other people's libraries is great for the developers as long as they're not tied to providing support for when users can't compile or run their software.
The problem is that about 80% of packages in distributions could be compiled against older versions of dependencies, but never do. Be default, distributions mark in the packages the dependency of their currently installed libraries, ignoring the fact that the software could have been compiled against an older version of the library too.
There's no mechanism for identifying such minimum possible dependencies.
Of course, it may be that the maintainer always specifies the latest version,
But it takes over with dependencies of newer versions than necessary.
Er, yes there is, and there has been for at least the last 12 years, and probably more.
Requires: python >= 2.6.1
Requires: python
The automatic mechanism in place is to run ldd, identify the list of libraries used by the executables distributed, and mark those libraries as dependencies. Since the package is build on your newer, Debian 5 package, it requires (automatically) the newer libfoo (like python-2.7), while it would have worked just fine with the older libfoo (python-2.5).
>> Yes there is
> What you mention is a manual mechanism
I agree, they should ditch the automatic ldd method. I justy wanted to correct the inaccuracy of saying there wasn't a way to specify min versions.
Is this true? It seems like this would be one of the most obvious essential features of any package management system.
Stuff that's yours is wherever dir you specified when you ran: export WORKON_HOME=$HOME/.virtualenvs
Seriously. Use virtualenv (and virtualenvwrapper).
There is a bunch of stuff that doesn't (shouldn't) belong to the OS, but still be runnable by all users without all of them needing a copy in their $HOME directory.
You can blow away your /usr/local and start from a new ports tree and build it all back up without adversely affecting the system.
Everything system related is in /bin, /sbin, /usr/bin, /usr/sbin depending on whether it needs to be accessible when the system has just / mounted or when /usr is mounted as well.
So in single user mode with just / mounted you have access to various different utilities. Mount /usr and you can expand upon that.
Back in the old days when FreeBSD required perl in its base system switching to a newer version didn't break any of the base system tools (or maybe I just never noticed).
There is something nice about a layout that is properly documented and makes sense: http://www.freebsd.org/cgi/man.cgi?query=hier&apropos=0&...
If you're writing quick ad-hoc scripts and don't have time to package, /usr/local/bin.
Per above, Python is used by your OS. It's installed by default, and not uninstallable, because the OS needs it. We can't and probably don't want to change that, so we'll need to live with it.
Use virtualenv. if you need to to, install a quick Python 2.6 package that slots alongside your OS package rather than removing it - using RHEL 5 as an example, you'd install 'python26' alongside your existing 'python' package.
> Per above, Python is used by your OS. It's installed by default, and not uninstallable, because the OS needs it.
The OS doesn't need python. It is some package you have installed that needs python, like Gnome(py-gtk2) or KDE(py-qt), for your desktop environment or some application you decided you needed. If you don't understand what program on your server required python to be installed, then you shouldn't be administering a server. Having large numbers of language interpreters and compilers on a server can be considered a security risk, since after someone gains access, that provides him or her a large number of options of what kind of code he or she can run. Even having a C compiler is a risk, since code can then be compiled into programs already present on the system. Security should be first in mind when developing an application server.
On the other hand for a development environment, there should be nothing stopping any distribution from installing multiple language interpreter versions. The default `/usr/bin/python` or `/usr/local/bin/python` can be a symlink to python25, python26 or python27, and when the user needs to run a different version, they explicitly call the binary with the version number. This whole virtualenv method just to parse a configuration file of a program not written in python seemed a little excessive.
No. The installer and packaging system need Python. Anaconda and Yum depend on it. Try removing it and see. You cannot install a minimal RHEL or Fedora system without Python. I am fairly sure this applies to other distros too.
If the Linux distro you choose doesn't meet your needs, why would you continue to use it? If your Fedora install requires it to be one way, but that doesn't fit the need of the server, it would like one should reconsider why they are using that distro.
If you're running 10,000 machines you don't make changes that you haven't regression tested and aren't committed to supporting. Effectively, you'd need to write your own package manager, maintain your own repository and deal with upstream yourself... You'd be Red Hat.
If you don't understand what program on your server required python to be installed, then you shouldn't be administering a server
Quite.
* 'python' remains installed, at version 2.4
* 'python26' is now installed, into separate folders.
* Just use pip and virtualenv. *
Your OS remains intact, and you get better deployment for free!
Replacing a component of your OS (Python 2.x) with another one (python 2.x +1 ) affects:
* The OS installer (Anaconda on RHEL, Ubuntu'sequivalent)
* The packaging system (yum)
* Many GNOME system admin apps.
* The config management tools (puppet sits on ruby)
The bottom line I guess is that mixing core OS components and user installed software in the same directory structure with no way of differentiating them is simply bad design.
Why /usr/bin/python? /usr/bin/ has been for ages the "system" area - why would you want to suddenly usurp it for yourself?
/usr/local/bin/python will on most Linux systems be executed ahead of /usr/bin/python, because /usr/local/bin/ usually precedes /usr/bin/ on the $PATH. Thus you can have your cake and eat it too.
> The bottom line I guess is that mixing core OS components and user installed software in the same directory structure with no way of differentiating them is simply bad design.
Linux distro makers agree with you - if you do not customize environment variables, user-installed software goes into /usr/local/ and the OS package-management (which can be considered "system" I guess) puts executables into /usr/{bin,sbin}.
This tends to work well as long as you keep in mind that everything outside of /usr/local/ (or your customized installation path) may at any update change subject to the will of the "system". I think this is a reasonable setup - it gives the OS vendor the ability to update the system, while giving you free reign in your /usr/local/ playground.
This is where I and the distro makers disagree. When I use synaptic to install the latest version of foobar, that is not in anyway "system" and foobar should not be dumped in the same directory as core system binaries. There should be a directory that contains everything core to the OS (like python 2.4), which was only updated by the OS updater routine (which should be different from the update all the software I've installed routine). Then there should be a directory which contains everything I've chosen to install (like python 2.7) which is where everything that I install via whatever is the normal way to install things on that OS ends up. I don't care too much about what these directories are called, but having them be the same, as it is now, is not an ideal solution in my mind.
As far as the update routines are concerned - you can already have those, by self-selecting which packages do you want to update. As a pro-active measure, you can even lock down packages which should never be updated.
This seems to be fine to me - the advanced user has the means to control the update mechanism, and the casual user can just do an all-encompassing "apt-get upgrade" or an equivalent to make sure that she has all the security fixes.
/ would have one dir:
/myos
And all OS components are under there:
/myos/bin/python
People can install anything they want outside /myos, but I'd make it very clear that the OS owns this folder and it should not be modified.
It's a lot of work - I think I ended up trying to write an iproute2 replacement using ctypes and quit. I wonder if anyone else would be interested...
Virtualenv does nothing to solve those issues. I am actually wondering whether it does not even aggravates them because people think those tools magically solve backward compatibility issue (which is the underlying issue here). If something as trivial as virtualenv would solve those issues, people distributing and packaging stuff would have done something similar for ages.
So, what's the complaint here? You have to obtain a new version of Python if you want to use a newer version of Python than what comes with the system? That's pretty self-evident imo.
Distro makers hate statically-linked stuff as a general rule and virtualenv is basically a statically-linked Python application. How many distros do you know that send out games statically linked to SDL or whatever? Most would rather have the application break. The same is true for Python; the distro has a philosophical opposition to static linking and virtualenvs are essentially statically-linked Python apps.
Concerning the need to obtain a new python if you want to use a newer python: yes, it is more or less evident, but that's Zed Shaw's point, not mine. Where he has a point IMO is about the brokenness of the installed python - many distributions make too many changes w.r.t. upstream without understanding the consequences. To distro's defend, the python packaging solutions are so poorly thought out that python itself is not helping the situation.
You just build it and don't install it, run it from the build directory or some other isolated space that won't effect the system. You _can_ create venvs from there. After you have done so, just carry your venv around with you and there's no disruption from anything. Our venvs are all kept in project-top-level/venv.
Also, virtualenv is hard to sell for people who do not know so much about python.
Another thing is that non-python programmers wouldn't even bother to use virtualenv. Really only Python programmers would.
Just like Perl before it, Python (and to some extent, Ruby if you use Puppet) are part of the OS (Linux OS or OS X that is).
Shit can and will break if you mess with your OS.
You never got this with PHP because people didn't use it in their OSs.
But there's a simple solution: not only does the Ministry of Packaging want you to use virtualenv, your OS maker does too.
The faster pip and virtualenv become standard the better.