My rpm Requires ncompress how do I get this to work on rhel 9 when the package now that the package is obsolete? - require

We are currently using RHEL 8, but intend to move to RHEL 9. The rpm I create currently Requires ncompress, which is no longer available so my package can no longer be installed on a new RHEL 9 host. To resolve this, can I simply have "Requires: compress, uncompress" and let the package figure out where to get them, is there a downside to this? Is there a way to find what the new package should be (I cannot find documentation for a recommended replacement), or is it better to modify my code to use gzip and gunzip and require that package instead? Is there another option that I am not thinking of to get around this issue?
Thanks.

We ended up changing the our compress/uncompress functionality to use gzip/gunzip and could remove the requirement.

Related

Identifying most suitable dependent rpm packages

Not sure SO is the best place to ask this, but it is development related so maybe someone can help.
I've written an app (in python but that's not important) which parses a Yum repo database to collate RPM packages and their dependencies. The problem I have is that I am sucking in too many packages when a dependency is met by more than one.
Specific example: I am seeking the list of packages which meet dependencies for Java-1.8.0 and getting a dependency of libjli.so()(64bit). libjli.so()(64bit) My code correctly works out that this is provided by multiple -devel packages from the Java 1.8, 1.7 and 1.6 streams. Unfortunately all three versions (and their dependencies) then get included in my list.
I guess my question is, given a list of packages meeting a requirement, what is the best way to identify the most appropriate package to include? i.e. when resolving the dependencies for Java-1.8.0, only include the -devel package for 1.8.0 and not suck in the -devel packages for 1.6 and 1.7 as well.
I know this is a problem with my code, I'm just not sure what facilities are provided by the yum ecosystem to help me identify which package would be best to include from the list of multiple.
It is hard to tell without seeing your code.
Yum is dead. If you are developing something new, you should develop on top of DNF. DNF use satsolver algorithm (https://doc.opensuse.org/projects/satsolver/11.4/index.html) and you can use libdnf https://github.com/rpm-software-management/libdnf (formerly known as libhif, formerly known as libhawkey).

puppetlabs/apt and unattended-upgrades

I want to have unattended-upgrades installed on my server and I want to edit the default config. I like to receive mail to confirm an upgrade, I know where to change it in config files.
andschwa/unattended_upgrades doc clearly says that puppetlabs/apt can manage unattended upgrades but there is nothing said in the doc.
Can I have some help to configure unattended-upgrades with puppetlabs official apt module ?
I know that there is several modules to manage unattended-upgrades but I want to be sure that it is not possible with puppetlabs/apt before adding another module like puppet/unattended_upgrades as it is said that it is not available for debian 8.
Thanks
andschwa/unattended_upgrades doc clearly says that puppetlabs/apt can manage unattended upgrades but there is nothing said in the doc.
The functionality was removed from puppetlabs-apt in version 2.0.0 (now 4.0.0), and moved into puppet-unattended_upgrades (the Vox Pupuli module).
I want to be sure that it is not possible with puppetlabs/apt before adding another module like puppet/unattended_upgrades as it is said that it is not available for debian 8.
This looks like a mistake in the metadata only that's been fixed in git since the latest release (2.2.0). The code to handle Debian 8 (Jessie) appears identical in the released version to git, so I'd say you can and should use this module to manage unattended-upgrades.

How to gather the full config of a NixOS system?

I read a bit about NixOS and tried it these days, because I got the impression that it would let me configure a Linux with just one file.
When I used it, I installed a bunch of packages with nix-env, so they didn't end up in the configuration.nix, but I could simply uninstall them later and add them to the configuration.nix by hand. I there something like npm i -g <package> that would install this globally so it would end up in the configuration.nix and could simply be copied to another machine.
Also, I installed stuff like zsh and atom and they have an entirely different approach to configuration and customization (bashscript, javascript, less, etc).
Is there a way for Nix/NixOS to track the package-specific config too?
Does it already happen and I don't see it? Like the nix expression of the package knows where the package will store its config etc.
I mean, it's nice that I can add these packages to the main config and when using it at another PC I get the same software installed, but I still see myself writing rather much configs for the installed packages too.
If you want packages installed through configuration.nix, then the easiest way to accomplish that is to add them to the environment.systemPackages attribute. Packages listed in there will be available automatically to all users on the machine. As far as I know, there is no shell command available to automate the maintenance of that attribute, though. The only way to manage that list is by editing configuration.nix and manually adding the packages you'd like to have installed.
Nix does not manage package-specific configuration files. As you probably know, NixOS provides such a mechanism for files in /etc, but a similar mechanism to manage config files in $HOME etc. does not exist. The PR https://github.com/NixOS/nixpkgs/pull/9250 on Github contains a concrete proposal to add this capability to Nix, but it hasn't been merged yet because it requires some changes that are controversial.
Nix does not currently offer ways of managing user specific configuration or language specific package managers. AFAICT that's because it is a very complex and opinionated territory compared to generating configs for sshd etc.
There are however Nix-based projects providing solution to at least some parts of your question. For managing user configuration (zsh etc.), have a look at home manager.

Why can't cabal keep multiple versions of the same package?

Coming from Ruby where I can have as many versions of every gem as I want, it's confusing to me why there is the restriction of Cabal being able to only have one version installed at the same time?
I've tried searching for an answer, but couldn't find anything explaining the reasoning behind this. And another good question would be if is there a workaround to this other than using sandboxes, which require me to recompile everything for every project (or share the sandbox, which doesn't always work).
edit: To clarify this question, what I don't understand is how cabal gets to the point where it says that installing a package would break another package. What is the cause of this issue?
I know it can be fixed by using a sandbox, but that's not an answer to the cause of this problem.
Your assumption is incorrect: cabal does allow installation of multiple versions of the same package. Packages are distinguished by version number.

Version Roll Back

I am doing a concept in linux in which i want to do version rollback for an app installed in linux. Is it possible??
For eg I have an application named X with version 1.1
I get an update. It changes it to version 1.2
I note what all the packages in the app going to be modified.
Then i save them and apply the changes.
Now after sometime due to some problems I want to switch back to version 1.1
If i undo the changes and make the entire solution will the rollback be done?
The easiest and common way in Unix is to install them in separate directories,
eg "/usr/bin/MyApp.1.2.3" and "/usr/bin/MyApp.1.2.4" then create a link to the one to use "/usr/bin/Myapp".
Changing versions is then just a matter of moving the link.
You don't need to invent anything. Just keep the packages you install around. If you want to go back, uninstall the current version and install the previous package again.

Resources