[WIP] RPM packaging doesn't flag .NET Core DLLs as executables#64
[WIP] RPM packaging doesn't flag .NET Core DLLs as executables#64clemensv wants to merge 51 commits intoquamotion:masterfrom
Conversation
…uivalent to DEB packaging.
…ET assemblies as "mono". Removed flagging of all non-executable files as docs, which leads to breaking installs on container platforms.
…ion task item flag.
| RPMFC_ELF32 = 1 << 0, | ||
| RPMFC_ELF64 = 1 << 1, | ||
| RPMFC_ELFMIPSN32 = 1 << 2, | ||
| RPMFC_PKGCONFIG = 1 << 4, |
There was a problem hiding this comment.
Can we keep these enum values? They map to the values defined in the RPM API I would prefer to keep them in sync.
There was a problem hiding this comment.
I did some research before I pulled those values out.
The values you have here got dropped from RPM in 2010 and RPM's classification model doesn't use them anymore but rather uses the text classifier dictionary. My edits align to the current rpmfc.h header.
| { | ||
| try | ||
| { | ||
| var assemblyName = AssemblyLoadContext.GetAssemblyName(fileName); |
There was a problem hiding this comment.
This try/catch sounds very expensive, and we can probably apply some more logic to determine whether a file is a .NET executable.
There was a problem hiding this comment.
Exceptions are worrisome if they're on the hot path for performance sensitive code that runs on a sustained basis, like inside an ASP.NET app. This here is done once for each file during packaging of an app, so I don't find that of concern. The alternative is to pull in PE file decoder code, which is far more code (I started with that approach and discarded it). We could safeguard the section with a simple probe for the 'MZ' magic word being the first two bytes of the file content which should catch most cases.
There was a problem hiding this comment.
We could safeguard the section with a simple probe for the 'MZ' magic word being the first two bytes of the file content which should catch most cases.
That sounds like a good compromise.
Route pre/post install/remove scripts from RPM task to packager
Added installs script on RpmTask
Update Packaging.Targets.targets
Use NerdBank.GitVersioning to assign build numbers
Don't start branch builds if a PR is active
Build the demo project as part of a CI run
Release from master
Bump libicu versions to add support for Ubuntu 18.04
…le on the Premium tier only
Add integration tests, using Docker
RPM: Only flag files in /usr/share/doc as Doc
Expand CI coverage
…ET assemblies as "mono". Removed flagging of all non-executable files as docs, which leads to breaking installs on container platforms.
…ion task item flag.
|
@clemensv The diff got a bit large (I guess because you merged master instead of rebasing), but there's some good stuff in this PR, such as the support for explicitly marking a file as documentation, changing the Unix file mode,... . Do you plan to complete the PR? git rebase can be messy; an alternative may be to cherry-pick the commits you want to preserve in a new branch. |
[Discussion item. Not yet ready to merge]
PR to resolve issue #61 - proposes a range of changes to improve the accuracy of the test scenarios that read back existing RPM package by taking their metadata into account, introduces explicit archive file types for .NET assemblies and documentation files, adds detection for .NET assemblies, and adds a metadata extension to explicitly flag documentation files.