Fail to build from source (FTBFS) using sbuild on Ubuntu: can't use the home path to store NuGet.Config
- Dominant language
- No language data
- Stars
- 287
- Forks
- 145
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 10
Description
Hi,
I'm trying to build .Net 6 from source using sbuild in Ubuntu to generate deb packages.
The debian/rules file launches the following command for the building:
`.dotnet/dotnet .dotnet/sdk/6.0.100/MSBuild.dll /bl:artifacts/log/Debug/BuildXPlatTasks_0221123733.binlog /flp:v=detailed /p:SkipPortableRuntimeBuild=true /p:LogVerbosity=n /p:MinimalConsoleLogOutput=false /p:ContinueOnPrebuiltBaselineError=true /t:PrepareOfflineLocalTools /v:n tools-local/init-build.proj`
and there the path used to look for configuration files is the home path (sbuild-nonexistent), resulting in the following error:
```
"/<>/tools-local/init-build.proj" (PrepareOfflineLocalTools target) (1) ->
"/<>/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/Microsoft.DotNet.SourceBuild.Tasks.XPlat.csproj" (Restore target) (2) ->
"/<>/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/Microsoft.DotNet.SourceBuild.Tasks.XPlat.csproj" (_GenerateRestoreGraphProjectEntry target) (2:5) ->
(_GetRestoreSettings target) ->
/<>/.dotnet/sdk/6.0.100/NuGet.targets(564,5): error : Failed to read NuGet.Config due to unauthorized access. Path: '/sbuild-nonexistent/.nuget/NuGet/NuGet.Config'. [/<>/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/Microsoft.DotNet.SourceBuild.Tasks.XPlat.csproj]
/<>/.dotnet/sdk/6.0.100/NuGet.targets(564,5): error : Access to the path '/sbuild-nonexistent/.nuget/NuGet' is denied. [/<>/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/Microsoft.DotNet.SourceBuild.Tasks.XPlat.csproj]
/<>/.dotnet/sdk/6.0.100/NuGet.targets(564,5): error : Permission denied [/<>/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/Microsoft.DotNet.SourceBuild.Tasks.XPlat.csproj]
```
but sbuild doesn't allow it as per [https://lists.debian.org/debian-devel/2016/02/msg00456.html](https://lists.debian.org/debian-devel/2016/02/msg00456.html) (Thanks @omajid for the link!).
As a workaround, the sbuild-nonexistent folder can be created before call to MSBuild (it works manually but not from the rules file), and is not Debian compliant.
Would it be possible to use a different path than the user's home, e.g. could it be passed as an argument?
Thanks in advance,
Miriam
P.S.: I uploaded the code of the first attempt on packaging here: https://github.com/mirespace/dotnet . I will continue to work on this based on that.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.