3

For whatever reasons, root-capable administrators at our organization limit the choice of packages to the vendor's official "base" repository (RHEL).

Not even EPEL is possible, much less IUS.

Our own -- hand-made -- RPMs are permissible, but still require filling out tickets and waiting. This not only makes installing them unnecessarily painful, but also impedes package-development -- I can't test my new RPM immediately.

However, we are allowed to build and install any software we wish -- as long as it goes into "our" directory. We've been building and installing such things for a while, and I'm wondering, if we can better organize such things so that, for example gcc-8.2 can be built on one system (with a prefix like /Data/local`) and installed on multiple others.

Of course, I can do that with plain tar-balls, but it would be nicer to have some sort of package-manager functionality such as, for example, to track dependencies...

Is there anything out there, or do we stick to the home-brewed tools?

Mikhail T.
  • 634
  • 1
  • 8
  • 27
  • Have you tried to use existing packet managers (rpm, opkg, ipkg, etc.) to build packages with custom installation dirs? Also have a look at `stow` to manage symlinks in a common tree to various packages in their own stubtrees, that's how I organize `/usr/local` on my machine. – dirkt Aug 11 '18 at 13:58
  • A completely different package-manager would not be able to account for things already present on the machine. Using rpm requires root -- for packae-registration -- even when installing to a private directory. Something's needed to overcome both of these... – Mikhail T. Aug 12 '18 at 13:36
  • Well mate, you're in luck, there are package formats you can use without root access. AppImages (https://www.appimagehub.com/) can be run without root access, the only problem is it requires FUSE in order to be used and I know it doesn't come pre-installed in CentOS, at least, so probably not RHEL either. There's also Linuxbrew (http://linuxbrew.sh/), the Linux equivalent to macOS' Homebrew. NetBSD's pkgsrc may also be used on Linux without root access (http://www.pkgsrc.org/). – Josh Pinto Sep 25 '18 at 11:16
  • I know pkgsrc very well and it has the problem I already alluded to -- no integration with the stuff installed (or available) via the standard yum/rpm. Do the other solutions you listed integrate with the official packages? – Mikhail T. Sep 25 '18 at 13:40
  • 2
    This really sounds like an issue you need to take up with your corporate IT management... I am going to flag this as off-topic as "issues specific to corporate IT support and networks" is specifically off-topic here per https://superuser.com/help/on-topic – acejavelin Sep 25 '18 at 14:38
  • I’m with acejavelin here. This is not an environment were development can be done efficiently. You need a dev environment with different policies where you can deploy and test directly. – Daniel B Sep 25 '18 at 15:00
  • 1
    @acejavelin, the question I asked is about alternative package-managers -- not about overcoming issues with corporate IT, even such overcoming is my motivation. – Mikhail T. Sep 25 '18 at 15:19
  • @acejavelin Pretty standard not to have root access, particularly if you work in a pre-container world like a bank where you’d end up with >5k developers having root access to 100k machines, or even at home you might prefer to avoid using root access for routine tasks out of good security practice. And there’s no technical reason why we can’t install packages in ~/ or in some other user-writable directory. Surely someone has come up with a reasonable solution to user-level package management? – Calchas Sep 25 '18 at 16:56
  • See, that’s why I said “dev environment”. A developer does not need company-wide root access. They don’t want it either. But how are they supposed to create software packages if they cannot test them in real-life conditions? – Daniel B Sep 26 '18 at 08:13
  • You're kind of asking for a solution that fits the loopholes in what IT has set up. Whatever you do should be coordinated with IT. However, I suppose it's on-topic to ask for solutions IT may be unaware of to take to them. – fixer1234 Sep 26 '18 at 22:38
  • Why don't linux users ever give a real answer? I've been searching too. I have an account on a commercial webserver and I'd like to install something as simple as a newer version of GCC but can't. I also can't build it myself due to resource limitations by the server. It would be nice to learn about where to get binaries for specific Linux distro versions. "Compile it yourself" isn't always feasible. – Russell Trahan Oct 14 '20 at 00:32

1 Answers1

0

You can try --prefix and --dbpath options. Not all RPMs will support --prefix, but if your rolling your own RPMs that won't be an issue, just make them relocatable.

I've been successful copying the systems rpm DB /tmp/lib/rpm to my own directory and specifying that via --dbpath. Then I can run rpm -i w/o root. Of course you now have a private copy of the DB and it will become out-of-date as your IT installs new packages - and other users won't know about your privately install packages. But hey, thats probably ok given the question you asked.

Unfortunately distributing your RPMs will still require other users to go thru IT or create their own DB as well, eg.

rpm -ivh --dpath ~/rpmdb --prefix ~/ mypkg-1.0-1.el8.x86_64.rpm

You could also ask your IT to make the system RPM DB writable.

brookbot
  • 111
  • 3
  • That means, building my own package-set completely _ignoring_ or, worse, _conflicting_ with what's installed by root in the usual places. What I'm looking for, I guess, is the `pip`'s ability to install things under the user's `~/.local` -- while still using, what's already installed centrally... – Mikhail T. Jun 26 '22 at 00:01
  • @MikhailT. Depends on what your doing. If your just trying to package your own apps and share with others or trying to upgrade system packages. Works great for testing your own rpms. In my case Im just leveraging rpm to package our software and distribute it internally. I dont know what kind of db pip uses but a local install is only available to the local user so its really the same thing – brookbot Jun 27 '22 at 04:40