Hi Andrea,
Andrea Musuruane <musuruan(a)gmail.com> writes:
I'm trying to package it but I really need some guidance because
it's
a new environment for me and I haven't found any resource for
packaging .NET6 applications in the Fedora Wiki.
Unfortunately, Fedora don't have any guidance at this point. Not many
(any?) .NET packages exist in Fedora. I think if we manage to package
Pinta, we should take the lessons learned and use that to start drafting
the guidance/docs for other packagers.
Do you intend to package it as a copr project or are you looking to get
this into Fedora proper?
The first problem I have is that network access is required.
Ugh, this is a tough one. I am not sure how to work around this. If the
project needs network access to build, I am not sure how we can get it
to build offline.
The standard approach that other language ecosystems take is to package
all the dependencies (recursively) into Fedora until we can build the
package. That might be easy if there is just one dependency for Pinta,
or it may be extremely difficult if it depends (recursively) on 100
other packages.
Otherwise I'll get the following error:
/usr/lib64/dotnet/sdk/6.0.100/NuGet.targets(130,5): error : Unable to load the service
index for source
https://api.nuget.org/v3/index.json. [/builddir/build/BUILD/pinta-2.0/Pinta.sln]
If the issue is just that it can not ping
api.nuget.org (because that's
the NuGet server location listed in a nuget.config file somewhere), what
happens if you remove all references to that? Or maybe remove that
and other network locations using a `<clear />`?
AFAIK the Fedora builders don't have internet access.
Yes, that's true. It's also a hard requirement for builds for
"official"
(non-copr) Fedora projects.
But even if I enable it, I will later get this error:
MSBUILD : error MSB1009: Project file does not exist.
The command that's executed just before the error is:
/usr/bin/dotnet msbuild installer/linux/install.proj -target:Install
-p:SourceDir=/root/rpmbuild/BUILD/pinta-2.0 -p:Pu
blishDir=/root/rpmbuild/BUILD/pinta-2.0/publish
-p:InstallPrefix=/root/rpmbuild/BUILDROOT/pinta-2.0-1.fc35.x86_64/usr
-p:InstallBinDir=/root/rpmbuild/BUILDROOT/pinta-2.0-1.fc35.x86_64/usr/bin
-p:InstallLibDir=/root/rpmbuild/BUILDROOT/pi
nta-2.0-1.fc35.x86_64/usr/lib64
-p:InstallDataRootDir=/root/rpmbuild/BUILDROOT/pinta-2.0-1.fc35.x86_64/usr/share -p:In
stallManDir=/root/rpmbuild/BUILDROOT/pinta-2.0-1.fc35.x86_64/usr/share/man
-p:InstallLocaleDir=/root/rpmbuild/BUILDROO
T/pinta-2.0-1.fc35.x86_64/usr/share/local
The file installer/linux/install.proj is not included in the source tarball.
Looks like that's a bug that was just fixed in the 2.0.1 release
https://github.com/PintaProject/Pinta/releases/tag/2.0.1:
"Fixed a missing file (installer/linux/install.proj) from the release
tarball that caused the install build step to fail "
This set of changes to the spec file made the build work for me (in an
environment connected to the internet):
--- SPECS/pinta.spec 2022-01-06 14:09:26.000000000 +0000
+++ /root/pinta.spec 2022-01-08 19:02:30.736041013 +0000
@@ -1,7 +1,7 @@
%global debug_package %{nil}
Name: pinta
-Version: 2.0
+Version: 2.0.1
Release: 1%{?dist}
Summary: An easy to use drawing and image editing program
@@ -13,7 +13,7 @@
BuildRequires: gcc
BuildRequires: make
-BuildRequires: dotnet
+BuildRequires: dotnet-sdk-6.0
BuildRequires: gtk3-devel
BuildRequires: gettext
BuildRequires: intltool
@@ -55,7 +55,8 @@
%{_metainfodir}/%{name}.appdata.xml
%exclude %{_datadir}/appdata/%{name}.appdata.xml
%{_datadir}/applications/%{name}.desktop
-%{_datadir}/icons/hicolor/*/*/%{name}.*
+%{_datadir}/icons/hicolor/*/*/*png
+%{_datadir}/icons/hicolor/*/apps/%{name}.svg
%{_datadir}/man/man1/%{name}*
%{_datadir}/pixmaps/%{name}*
I am not sure that's the right way to handle the generic icons included
in this application, though. I haven't gone through the icon packaging
guidelines in ages.
Regards,
Omair
--
PGP Key: B157A9F0 (
http://pgp.mit.edu/)
Fingerprint = 9DB5 2F0B FD3E C239 E108 E7BD DF99 7AF8 B157 A9F0