¿can't you create a package to be administred by your package manager? like this https://wiki.archlinux.org/index.php/Creating_packages |
Have some problems with its page, ¿how do you remove a package? They say to use rm -rf, ¿but what about the symlinks? ¿and the dependencies? |
helios wrote: |
---|
Doesn't necessarily save me from the dependency hunt, which is the real issue in that scenario. If I'm building from source I can just prefix to anywhere I want and make a self-contained build. |
ArchLinux wrote: |
---|
Overview Packages in Arch Linux are built using the makepkg utility and the information stored in a PKGBUILD file. When makepkg is run, it searches for a PKGBUILD in the current directory and follows the instructions therein to either compile or otherwise acquire the required files to be packaged within a package file (pkgname.pkg.tar.xz). The resulting package contains binary files and installation instructions; readily installed with pacman. An Arch package is no more than a tar archive, or 'tarball', compressed using xz, which contains the following files generated by makepkg: The binary files to install. .PKGINFO: contains all the metadata needed by pacman to deal with packages, dependencies, etc. .MTREE: contains hashes and timestamps of the files, which are included in the local database so that pacman can verify the integrity of the package. .INSTALL: an optional file used to execute commands after the install/upgrade/remove stage. (This file is present only if specified in the PKGBUILD.) .Changelog: an optional file kept by the package maintainer documenting the changes of the package. (It is not present in all packages.) |
ldd
command is for. But never mind that, the package manager will find the dependencies any way. In the case of ArchLinux, it is the .PKGINFO:
. The RedHat Package Manager (rpm) does the same thing.This could be solved with hardlinks instead of symlinks, but IMO it's better if non-system packages share zero non-system dependencies. Then packages can be updated independently without ever breaking each other. It has a greater memory cost because SOs become non-reusable, but honestly, who cares? |
But the whole purpose of a package, is to have some thing that can readily be installed, and is aware of it's dependencies and can obtain them. |
Why should various software that wants to use the facilities provided by those libraries have to provide some or all of theose libraries with it's compartmentalised installation, every time, when the libraries are already there in a shared system? |
This is no different from requiring a Windows user to always use install/uninstall programs. |
Even with uninstall programs, poorly written ones don't remove everything they should |
So I don't know where all this fear about dependencies comes from |
IMO it really isn't a problem on Linux. |
helios wrote: |
---|
ne555's proposed solution was in response to my scenario where the package manager is already being useless. Given that assumption, no, the PM will not get the dependencies for you. |
helios wrote: |
---|
Because doing otherwise implies a tremendous increase in complexity (see for example the horrid mess that is WinSxS) |
helios wrote: |
---|
There's no point in deduplicating executables across package boundaries. |
https://fedoraproject.org/wiki/How_to_create_an_RPM_package |
helios wrote: |
---|
I don't think anyone has ever said that this requirement is a good thing. It's not, it's terrible. |
helios wrote: |
---|
Exactly. That's exactly the reason why a simple installation process is better than a complex one. "Windows rot" is caused precisely by overly complex installation processes that needlessly litter the system, and by poorly designed uninstallation processes that are unable to fully revert those changes. If all your code is in a single location then you can have a minimal uninstaller. Just a call to rd /q /s. Try getting that wrong. |
helios wrote: |
---|
Don't confuse fear and annoyance. |
Sure. Hey, here's a fun project: take this (https://github.com/GNOME/librsvg ) library, and try to package it so it can be installed on any distribution with minimal effort. Phantasm mode: also BSDs. |
apt
for their PM, while Fedora uses rpm
, I don't know what BSD distros do.But both ne555 and I are saying one can use the PM to make a pkg. |
Your rejoinder has an example from Windows |
The RedHat PM appears to give the exact opposite advice: Don't provide 1 pkg for your program, provide pkgs for the reusable components of your program; Don't combine your packages with what others have already packaged; Don't re-package what is already packaged. |
It also appears that your comment comes from experience with Windows, acceptable methods there probably don't apply at all to Linux. It's a different paradigm, a different education process, but that doesn't make it bad. |
Windows appears to make it hard for themselves, by "littering" everywhere, and the inablilty (or rather lack of knowledge of what is required by the uninstaller )to revert those changes. |
Linux might seem to be overly complex, but I gather that there are methodologies (at least a set of requirements) for configuring, making, installing, cleaning, uninstall. |
Have you got a specific annoyance? |
Making a Binary Packages for a different distro would be harder - it obviously reqires knowlege of cross compiling. |
Imagine, if you will, that there are 10 slightly or even moderately disimilar versions of Windows10 , and they work on different architectures. We are trying to compile one code base, so that it will work on all of them. |
So maybe this complexity of Linux comes from the variety of distro's, not from an individual system. |
rm -rf /usr /lib/nvidia-current/xorg/xorg
perhaps they do not work the same (because missing config files, that did not have any hardlink) |
rm -rf /usr /lib/nvidia-current/xorg/xorg |
ne555 wrote: |
---|
¿How does the "each package has its own directory" solve this? |
#!/usr/bin/env python
)ne555 wrote: |
---|
(both scripts start with #!/usr/bin/env python ) |
Suppose that the package `foo' only has `/Apps/foo/foo' and a hardlink in `/usr/bin/foo' If you remove the /Apps/foo directory, the hardlink in /usr/bin/foo remains unafected. Suppose `bar' that has `/Apps/bar/bar' and `/Apps/bar/bar.conf' and a hardlink in `/usr/bin/bar'. (`bar.conf' does not have a hardlink because there is no need) Removing the `/Apps/bar' directory would delete that config file, and the program `bar' would still work but different as before. |
I prefer to fill my disk with documents, not with programs. |
helios wrote: |
---|
Have something like PATH that the system can automatically clean up when paths go missing. |
helios wrote: |
---|
And? How is that relevant to my complaint? |
helios wrote: |
---|
Any package management system is orders of magnitude more complex than being able to delete an entire subtree. |
I'm sure that works wonders if you're packaging specifically for RH systems. Again, try targetting a variety of systems with reasonable effort. |
helios wrote: |
---|
IMO with the way Windows is right now, code that doesn't need to link to other code should aim for simple installation processes. |
helios wrote: |
---|
Inconvenience is bad. Linux is inconvenient for both users (no way to know whether a given executable will work if moved to a different box) and developers (no single way to target a broad range of systems). Even BSDs are better than Linux, because while they conventionally have a similar directory structure, they do provide binary compatibility. You can build for a specific version of FreeBSD and it will continue working in successive versions. |
ne555 wrote: |
---|
rm -rf /usr /lib/nvidia-current/xorg/xorg |
helios wrote: |
---|
LOL. Of course, it'd be better not to have automated uninstallers in the first place. |
even to make a package out of something new for an old system, as in gcc5.2 for Fedora17. |
To continue my speculation, FileSave et al. would call another dll like SavePdf.dll say. |
We need a new version of WinCoreDlg1.1.dll , There is existing software that only knows about WinCoreDlg1.0.dll , so we have to keep both of them. |
every time there is a Service Pack, so we ultimately have lots of them, and we end up with WinSXS to solve the nightmare with another nightmare. |
Now, because a lot of Windows software is commercial, and there is a dll fiasco, developers (especially smaller software ones) create a standalone arrangement where they can, and bundle up dll's possibly duplicating an existing system dll- |
Sure, it might seem easier to fully compartmentalise software, but consider that it is better in the long run to have a system that can deal with the bigger picture. Things like WinSXS and other Windows nightmares drive some people away, to look for something better. |
IMO, on balance, I would rather deal with that, than deal with Windows nightmares - see my previous comments. |
On Windows, one could try to move a single executable file (a simple application), and hope that any dependencies exist on the other mahine, but anything more than that probably requires installation. |
With different OS's, let me re-put my argument about 10 different OS's: say there are not 10 different Windows OS's, but 10 different OS's in their own right. We already have 3 (discounting proprietary which is just too expensive): Windows, Mac and various Linux. What if we had 7 other OS's that their owners had independently created, and they are all quite different from each other. Someone wants their software to run on all of them: should a standard for directory layout and other things be imposed on anyone creating their own OS to make it easier for developers? Should DOS have been written off because it was pathetic and vastly different compared to Apple and UNIX at the time? Should developers complain about not having a single way to target all of them? |
That error happened because the user typed an extra space Uninstallers can be tested. |
To what advantage, regarding dependency satisfaction? You still have to get them manually, if only once. |
What? No. A library that contains common dialog functions has no business knowing about file formats. A client application should call FileSave() and FileSave() should give back a path. The application should then pass this path to whatever function handles whatever file format is needed. |
That error happened because the developer mistyped a space in the uninstaller script (see diff for install.sh). That bug snuck right through testing. |
FedericoCeratto wrote: |
---|
That's what you get for writing your own installation/removal code instead of relying on the proper tools and processes provided by the distributions. |
Can you target Debian 3 (2002) and run on Debian 8 (2015)? |
But the whole point was about how these functions are bundled into a library. I am saying they are probably grouped into relatively large libraries(all the common dialog functions in one dll), as opposed to small reusable libraries. |
With WinSxS, if it is the solution why does everyone seem to complain about it? |
Scripts are supposed to work with ordinary priviliges, whoever is doing the install/uninstall usually owns the directory it is in. |
As I understand it, the critical thing is the version of the kernel. |
LB wrote: |
---|
PATH is another thing I really don't like about Windows and *nix. The idea of where to look for certain kinds of files and in what order should definitely NOT be in a string variable, it should be safely managed by the system and the user and changing it should require the user to see what changes are being made and accept or deny them. Environment variables in general are a pretty hacky thing. :( |
LB wrote: |
---|
PATH is another thing I really don't like about Windows and *nix. The idea of where to look for certain kinds of files and in what order should definitely NOT be in a string variable, it should be safely managed by the system and the user and changing it should require the user to see what changes are being made and accept or deny them. Environment variables in general are a pretty hacky thing. :( |
helios wrote: |
---|
I agree, PATH is a hackjob. My current PATH contains nearly 2000 characters. Some installers write to it at will and I end up with surprising DLL resolutions. It should be something more structured, or at the very least there should be separate lists for programs and DLLs. |
helios wrote: |
---|
If the script deletes or creates things in /usr it will have to be run by root, anyway. |
sudo
, to provide some protection to one's self, and from a bad script. sudo
specifies what sudoers can and can't do. But never mind that, one should be using the un-install option of the PM, not running scripts that blindly and recursively delete directories.Sort of. Actually, the distribution of functions across libraries is somewhat haphazard, for historical reasons. I don't see what your point is, though. |
TheIdeasMan wrote: |
---|
.... as opposed to small reusable libraries. It's like C++ classes - we don't make huge classes, we make small re-usable classes that can be combined in a large number of ways. |
https://en.wikipedia.org/wiki/Unix_philosophy |
I said that, already. It's complex. So is Windows Installer. They work, but they're difficult for developers to use right. A lot of people just don't bother. |
http://www.thewindowsclub.com/winsxs-folder-windows-7-8 |
thewindowsclub wrote: |
---|
Most of you may have noticed the WinSxS folder in Windows 7 / 8 / 10 and been surprised at its size. For those who have not, the folder is situated at C:\Windows\Winsxs and has a whopping size ! Mine is almost 5 GB and has around 6000 folders & 25000 files and occupies almost 40% of the Windows folder ! |
So to say that PATH and environment variables are a hack, is true for Windows and definitely false for UNIX. |
In this link there is a section entitled: Eric Raymond’s 17 Unix Rules https://en.wikipedia.org/wiki/Unix_philosophy The point about having lots of small, highly reusable tools, applies to library files as well. |
Right, so it is an atrocity on Windows, UNIX has no need for this form of nightmare. |
5GB !? that's half the size of an entire Linux Distro ! 6,000 folders!? |
now I put it to you: UNIX/Linux does this better. Agree? |
I also assert that you guys are looking at Linux with Windows lenses on and saying it is bad |
TheIdeasMan wrote: |
---|
"Safe" does not mean buried in a binary file. Windows stores configuration in binary files or in the registry, and is then obliged to provide a usually GUI application to manage them. So now there are all these GUI apps for configuration, which makes the whole system bulkier. |
TheIdeasMan wrote: |
---|
With the UNIX PATH, there are only a handful of paths in it, which is consistent with the standard location of files. Adding lots of paths to PATH is not encouraged, and unnecessary. |