News for hackers. Stuff that matters.
Re:Mongrel2 Says, "Goodbye Python" by gaius on Tuesday September 21, 2010 @07:01AM (#1712121)
In the ancient days, stuff the OS relied on was in /usr/sbin and stuff that was "yours" was in /usr/local/bin (or /opt) and stuff that no-one was quite sure whose it was was in /usr/bin. And lo, peace and harmony did reign upon the face of Unix. And the sysadmin did lie down with the developer, and it was good.

Who even knows how it works these days?

Re:Mongrel2 Says, "Goodbye Python" by jacquesm on Tuesday September 21, 2010 @08:10AM (#1712278)
If there is one thing that ticks me off about modern unix it is that to install <insert minor package here> I end up having to install / upgrade half the rest of the system because of all the interdependencies between packages.
Re:Mongrel2 Says, "Goodbye Python" by gaius on Tuesday September 21, 2010 @09:04AM (#1712433)
Tell me about it! I just wanted to install folding-mode for Emacs the other day, dselect wanted to install a new sodding IM client as well! (Something in emacs-goodies-el depended on it). About 50M it came to!

So I just did it by hand, more like 50k...

Re:Mongrel2 Says, "Goodbye Python" by johnzabroski on Tuesday September 21, 2010 @06:00PM (#1714257)
That is a pretty wild example, but it is common in software today.

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).

Re:Mongrel2 Says, "Goodbye Python" by jacquesm on Tuesday September 21, 2010 @01:16PM (#1713334)
That's an even more extreme example than the one that I just ran in to. Wow.
Re:Mongrel2 Says, "Goodbye Python" by chousuke on Wednesday September 22, 2010 @05:31AM (#1715648)
That sounds weird. Are you sure it wasn't a "Recommends" instead of a dependecy?

If it really was a dependency, I think a bug should be filed against the package. :/

Re:Mongrel2 Says, "Goodbye Python" by statictype on Tuesday September 21, 2010 @10:26AM (#1712690)
I think that's more symptomatic of the open source culture around most Unix systems than Unix itself.

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.

Re:Mongrel2 Says, "Goodbye Python" by kfool on Tuesday September 21, 2010 @02:29PM (#1713564)
No, it's not symptomatic.

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.

Re:Mongrel2 Says, "Goodbye Python" by dinedal on Tuesday September 21, 2010 @03:00PM (#1713680)
Not sure that's true, most packaging systems allow the maintainer to specify the lowest version their software is compatible with.

Of course, it may be that the maintainer always specifies the latest version,

Re:Mongrel2 Says, "Goodbye Python" by kfool on Tuesday September 21, 2010 @07:08PM (#1714469)
The maintainer does not specify a version and expects the automatic process of determining minimumum dependencies to take over.

But it takes over with dependencies of newer versions than necessary.

Re:Mongrel2 Says, "Goodbye Python" by nailer on Tuesday September 21, 2010 @03:28PM (#1713783)
> There's no mechanism for identifying such minimum possible dependencies.

Er, yes there is, and there has been for at least the last 12 years, and probably more.

Requires: python >= 2.6.1

Re:Mongrel2 Says, "Goodbye Python" by kfool on Tuesday September 21, 2010 @07:06PM (#1714465)
What you mention is a manual mechanism which is not often used. Instead, developers say:

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).

Re:Mongrel2 Says, "Goodbye Python" by nailer on Wednesday September 22, 2010 @05:51AM (#1715668)
>>> There's no mechanism for identifying such minimum possible dependencies.

>> 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.

Re:Mongrel2 Says, "Goodbye Python" by jacobolus on Tuesday September 21, 2010 @02:53PM (#1713654)
> There's no mechanism for identifying such minimum possible dependencies.

Is this true? It seems like this would be one of the most obvious essential features of any package management system.

Re:Mongrel2 Says, "Goodbye Python" by fauigerzigerk on Tuesday September 21, 2010 @08:39AM (#1712366)
Exactly, and the baroqueness of package managers and the excentric configuration ideas of package writers are a symptom of that.
Re:Mongrel2 Says, "Goodbye Python" by zokier on Tuesday September 21, 2010 @10:53AM (#1712799)
I thought that was one problem Gentoo tried to solve by allowing users to select which libraries/features to use with the packages they installed
Re:Mongrel2 Says, "Goodbye Python" by astine on Tuesday September 21, 2010 @01:11PM (#1713315)
Gentoo's package manager, Portage, is written in Python, so Python presents a special challenge, when upgrading or using a different version that the default.
Re:Mongrel2 Says, "Goodbye Python" by nailer on Tuesday September 21, 2010 @07:03AM (#1712125)
Stuff that belongs to the OS (but runnable by all users) is in /usr/bin. That's FHS.

Stuff that's yours is wherever dir you specified when you ran: export WORKON_HOME=$HOME/.virtualenvs

Seriously. Use virtualenv (and virtualenvwrapper).

http://www.doughellmann.com/projects/virtualenvwrapper/

Re:Mongrel2 Says, "Goodbye Python" by dagw on Tuesday September 21, 2010 @07:13AM (#1712145)
What about stuff that belongs to me (the sysadmin) but runnable by all users? /usr/local/bin? /opt/bin? /my/homemade/solution/bin?

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.

Re:Mongrel2 Says, "Goodbye Python" by calloc on Tuesday September 21, 2010 @11:36AM (#1712971)
FreeBSD installs all packages in /usr/local/bin and /usr/local/sbin

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&...

Re:Mongrel2 Says, "Goodbye Python" by gaius on Tuesday September 21, 2010 @07:32AM (#1712185)
Well exactly. People who never learnt the old-skool ways always reinvent the wheel in an over-complex way. /usr/local/bin is stuff for the users, but which the sysadmin installs. So /usr/bin/python for the OS and /usr/local/bin/python for your users.
Re:Mongrel2 Says, "Goodbye Python" by nailer on Tuesday September 21, 2010 @07:38AM (#1712194)
> What about stuff that belongs to me (the sysadmin) but runnable by all users?

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.

Re:Mongrel2 Says, "Goodbye Python" by uxp on Tuesday September 21, 2010 @03:17PM (#1713737)
Not to nitpick here, but I want to clarify something you said.

> 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.

Re:Mongrel2 Says, "Goodbye Python" by nailer on Tuesday September 21, 2010 @03:34PM (#1713809)
> The OS doesn't need python. It is some package you have installed that needs python

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.

Re:Mongrel2 Says, "Goodbye Python" by uxp on Tuesday September 21, 2010 @04:12PM (#1713941)
Whats to stop you from patching and compiling programs yourself to get rid of the python dependancies of your package manager?

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.

Re:Mongrel2 Says, "Goodbye Python" by gaius on Tuesday September 21, 2010 @04:33PM (#1714019)
If you're just running Linux on your PC in your dorm room, go for it.

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.

Re:Mongrel2 Says, "Goodbye Python" by gaius on Tuesday September 21, 2010 @03:37PM (#1713826)
Not true. In some Linux distros Python is used for system scripts, instead of sh.

If you don't understand what program on your server required python to be installed, then you shouldn't be administering a server

Quite.

Re:Mongrel2 Says, "Goodbye Python" by munchhausen on Tuesday September 21, 2010 @07:29AM (#1712178)
You answered your own question - /usr/local/bin. I don't know about MacOSX but on Linux, this is the solution to your problem - "stuff that belongs to me (the sysadmin) but runnable by all users".
Re:Mongrel2 Says, "Goodbye Python" by zedshaw on Tuesday September 21, 2010 @01:24PM (#1713366)
People who don't do Python won't/can't use virtualenv. Also, you don't think that's a nasty workaround for something that should just be a non-issue? That's like you telling me to use NetBSD pkgsrc just to get around some ancient linux (which I have done).
Re:Mongrel2 Says, "Goodbye Python" by nailer on Tuesday September 21, 2010 @03:30PM (#1713795)
Hi Zed. For the specific case of needing Python 2.6 on RHEL, ask your user to install the 'python26' package from EPEL. It's a semi official source of packages for RHEL including newer versions of OS tools that slot alongside those versions.
Re:Mongrel2 Says, "Goodbye Python" by zedshaw on Tuesday September 21, 2010 @04:05PM (#1713911)
Or, just rewrite in C and everyone except Python people will quit bitching. :-)
Re:Mongrel2 Says, "Goodbye Python" by nailer on Wednesday September 22, 2010 @05:56AM (#1715673)
It seems nobody liked having a full language for default config file format anyway, so ditching it for something simpler may make people happier.
Re:Mongrel2 Says, "Goodbye Python" by bartl on Wednesday September 22, 2010 @05:42AM (#1715662)
The problem with requiring an update to something like Python may break other programs. Not everything in Python (or Perl) is backward compatible.
Re:Mongrel2 Says, "Goodbye Python" by nailer on Wednesday September 22, 2010 @05:54AM (#1715671)
Installing the 'python26' package doesn't update or change the installed Python in any way. That's why it was created.

* 'python' remains installed, at version 2.4

* 'python26' is now installed, into separate folders.

Re:Mongrel2 Says, "Goodbye Python" by alexkay on Tuesday September 21, 2010 @07:21PM (#1714513)
It's still like that in all BSDs.