Closed stuarthillary closed 1 year ago
Thank you for the reply and suggestion. First off, I am curious:
If I understand you correctly, you say the RPM package of "Hello World" won't run because of a dependency, but the RPM package of PupNet-Deploy runs fine...
There is a workaround though, which is to use the RPM package for PupNet installation. https://github.com/kuiperzone/PupNet-Deploy/issues/8
Seems surprising?
But, yes, I can see the argument for including a "Requires" section in the configuration for RPM (and presumably for .deb files as well). I agree this is important especially if the app is using native linux libraries.
However, I remain a little disappointed with dotnet. Please correct me if my thinking here is misguided, but I had understood that a "self-contained" app deployed with all its runtime dependencies at least, I guess, for most non-exotic scenarios. It is disappointing therefore to see a "Hello World" app fail on a major distro such as RHEL.
UPDATE. A little more info below. Yes, I see the issue:
https://github.com/dotnet/runtime/issues/41350
It's a little tricky because we don't know exactly what the package name is. Eg., on Debian apt-get install libicu did not work but apt-get install libicu-dev did work as did apt-get install libicu63 in my case.
I think this whole area needs a little thinking about.
Incidentally, if you build with --verbose
, like: pupnet -k rpm --verbose
It will show the RPM .spec file:
Name: helloworld Version: 1.0.1 Release: 2 BuildArch: x86_64 Summary: A Hello World application License: GPL-3.0-or-later Vendor: Kuiper Zone Url: https://kuiper.zone
AutoReqProv: no BuildRequires: libappstream-glib
%check desktop-file-validate %{buildroot}/%{_datadir}/applications/.desktop appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/.metainfo.xml
%description A Hello World application
%files [FILES]
UPDATE: Actually, looking at the above, I included desktop-file-validate
. On your system, this is almost certainly causing the issue: https://github.com/kuiperzone/PupNet-Deploy/issues/7
If I understand you correctly, you say the RPM package of "Hello World" won't run because of a dependency, but the RPM package of PupNet-Deploy runs fine...
There is a workaround though, which is to use the RPM package for PupNet installation.
8
Seems surprising?
At a guess, this maybe because a dotnet tool would use invariant mode and so not run up against this particular problem?
However, I remain a little disappointed with dotnet. Please correct me if my thinking here is misguided, but I had understood that a "self-contained" app deployed with all its runtime dependencies at least, I guess, for most non-exotic scenarios. It is disappointing therefore to see a "Hello World" app fail on a major distro such as RHEL.
This was a conscious decision on behalf of the dotnet team, I think, look at the arguments in this section https://github.com/dotnet/runtime/blob/main/docs/design/features/globalization-invariant-mode.md#background
As an aside, other possible dependencies are listed here https://learn.microsoft.com/en-us/dotnet/core/install/linux-scripted-manual#rpm-dependencies
Whether these dependencies are required will depend on what functionality the app uses, and right now this places the onus on any .NET package authors and/or sysadmins.
That is an incredibly helpful reply. Thank you. I'm looking in to it.
I just found this additional advice for when installation of dependent packages is undesirable https://github.com/dotnet/core/blob/main/Documentation/self-contained-linux-apps.md
Looks to be quite an error prone procedure that requires a lot of testing.
Hi @stuarthillary
Check out the latest version 1.3.0 which now supports dependencies for RPM and DEB. I've tested the HelloWorld RPM on a clean install of Alma 9, and it seems to work.
I have tested the install of the RPM package on a clean RHEL 8.7, and it works, requiring the install of the dependency libicu.
I had a quick look at the latest changes to the Helloworld project and noticed that the RpmRequires section of the HelloWorld.pupnet.conf file lists
krb5-libs
libicu
openssl-libs
but that the dependencies listed here https://learn.microsoft.com/en-us/dotnet/core/install/linux-rhel#dependencies
also has zlib
as a dependency.
Hi @stuarthillary
I've updated the HelloWorld project to add zlib.
Glad it works now. Thank you for you feedback and help on this.
Andy
I successfully installed the RPM package for the PupNet HelloWorld application on RHEL 8.7.
The application aborts when running it
In this case, the helloworld application is not running in globalization invariant mode and thus requires the package
libicu
to be installed.https://learn.microsoft.com/en-us/dotnet/core/runtime-config/globalization https://github.com/dotnet/runtime/blob/main/docs/design/features/globalization-invariant-mode.md
From my limited understanding of RPM spec files, adding
libicu
to theRequires
section of the spec file may fix this. Is there currently a way of controlling prerequisites for the RPM package creation using pupnet configuration?Outside of this helloworld example, a .NET application may have more exotic package requirements e.g. if they make use of native Linux libraries.