mirror of
https://github.com/quamotion/dotnet-packaging.git
synced 2026-02-15 05:35:56 +00:00
[PR #3] [MERGED] RPM: Support additional files, user creation, SystemD services, dependencies #159
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/quamotion/dotnet-packaging/pull/3
Author: @qmfrederik
Created: 6/24/2017
Status: ✅ Merged
Merged: 6/24/2017
Merged by: @qmfrederik
Base:
master← Head:rpm/additional-files📝 Commits (5)
0ca32c7Add the ArchiveEntry class, which allow building an abstract representation of an archive; allowing us to consume additional items (not just the files in the output directory).b95dad0Allow fine-tuning of the folder structure on Linuxfe9996fSupport pre/post installation scripts3687b70Support specifying additional RPM dependenciesb2bb2abUse .NET Core dependencies as sample dependencies📊 Changes
20 files changed (+1139 additions, -290 deletions)
View changed files
📝
Packaging.Targets.Tests/Rpm/DotnetFileAnalyzer.cs(+14 -17)📝
Packaging.Targets.Tests/Rpm/PlistFileAnalyzer.cs(+12 -15)📝
Packaging.Targets.Tests/Rpm/RpmMetadataTests.cs(+8 -4)📝
Packaging.Targets.Tests/Rpm/RpmPackageCreatorTests.cs(+27 -8)➕
Packaging.Targets/ArchiveBuilder.cs(+339 -0)➕
Packaging.Targets/CopyToDirectoryValue.cs(+23 -0)➕
Packaging.Targets/IO/ArchiveEntry.cs(+115 -0)➕
Packaging.Targets/IO/ArchiveEntryType.cs(+23 -0)📝
Packaging.Targets/IO/CpioFileCreator.cs(+72 -55)📝
Packaging.Targets/Rpm/DefaultOrder.cs(+9 -1)📝
Packaging.Targets/Rpm/FileAnalyzer.cs(+38 -49)📝
Packaging.Targets/Rpm/IFileAnalyzer.cs(+20 -50)📝
Packaging.Targets/Rpm/IndexTag.cs(+24 -0)📝
Packaging.Targets/Rpm/RpmMetadata.cs(+54 -0)📝
Packaging.Targets/Rpm/RpmPackageCreator.cs(+89 -83)📝
Packaging.Targets/RpmTask.cs(+73 -4)➕
Packaging.Targets/TaskItemExtensions.cs(+165 -0)📝
Packaging.Targets/build/Packaging.Targets.targets(+11 -4)📝
demo/demo.csproj(+15 -0)➕
demo/demo.service(+8 -0)📄 Description
This PR adds support for:
Whereas the publish output goes to
/usr/share/<project-name>, you may want to save additional files somewhere else. For example, you may want to store yourappsettings.jsonfile in/etc/<project-name>/appsettings.jsonor add a SystemD service file which you want to deploy to/etc/systemd/system/demo.service.You can now do that by specifying the
LinuxPathpath on your project file. For example, to get redirect the location of theappsettings.jsonfile, do:By default, folders are not added to the package layout, even if they are empty. However, you may want to create folders such as
/var/lib/<project-name>to store your app data.You can add additional folder by adding
LinuxFolderelements. You can also specify the owner and group of those folders, and whether these folders should be removed when your application is uninstalled.Your application may depend on other RPM packages to run correctly. For example, any .NET Core application would depend on packages such as
libunwind. You can now specify these dependencies using theRpmDependencyelement:Applications which run as system services usually have a dedicated service account. You can now have dotnet-rpm create a user and group for your project when your application is installed:
dotnet-rpmcan now install and start your SystemD service:🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.