mirror of
https://github.com/quamotion/dotnet-packaging.git
synced 2026-02-15 05:35:56 +00:00
Create symbolic link deb package #14
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?
Originally created by @franklupo on GitHub (Oct 15, 2017).
Hi,
great work.
How to make symbolic link from /usr/share/myprog to /usr/bin/myprog?
Best regards
@qmfrederik commented on GitHub (Oct 15, 2017):
One way to enable this could be to expose MSBuild properties which allow you to add additional contents to the pre/post installation scripts.
@kekekeks What do you think?
@kekekeks commented on GitHub (Oct 15, 2017):
In case of
deb-packages symlinks can be placed directly intodata.tar.xz.debpackages are designed to handle everything thatmake install DESTDIR=debian/{packagename}can possibly create in that directory (that's the main way of populating package contents, actually).I have no idea what to do with RPM.
@kekekeks commented on GitHub (Oct 15, 2017):
BTW, @franklupo I'm not sure that it will even work with .NET Core, since binary might try to look for
myprog.dllin/usr/bininstead of/usr/share/myprog, which will fail. And the common way of adding your program to/usr/binwith Mono was to create a shell script there. So I'd suggest to addand place it to
/usr/bin/myprogusingLinuxPath, see example here@franklupo commented on GitHub (Oct 15, 2017):
Possible use PostInstallScripte?
@qmfrederik commented on GitHub (Oct 16, 2017):
@franklupo I think that @kekekeks 's suggestion to use a shell script and place it in
/usr/bin/myprogusingLinuxPathis actually the best way to implement this.Can you give that a try and let us know if that works?
@franklupo commented on GitHub (Oct 16, 2017):
@qmfrederik Yes work. But i have new problem see issues #35
@qmfrederik commented on GitHub (Oct 17, 2017):
@franklupo Just wanted to check: with all the fixes that just went in, did you manage to create a
.debpackage for your project that is installable?@franklupo commented on GitHub (Oct 18, 2017):
Ok, the problem is to keep permissions execution on the file.
@qmfrederik commented on GitHub (Oct 19, 2017):
I'd need to double check but I believe we determine whether a file is executable or not in the ArchiveBuilder:
883187b384/Packaging.Targets/ArchiveBuilder.cs (L280-L281)We should be able to modify that code so that it either:
shextension and sets the file to executable if that extension is foundLinuxPermissionsattribute on theContentitem in theprojfile and allow you to override the permissions that way.@kekekeks commented on GitHub (Oct 20, 2017):
I think we need to check for
#!signature (e. g.#!/bin/sh) in files. Linux loader uses that to determine if file needs an interpreter, so we should do the same.Overriding permissions manually would also be useful for setting stuff like suid-bit (we should NOT allow to set it for .NET Core binaries, since it will cause major security issues).
@franklupo commented on GitHub (Oct 20, 2017):
@qmfrederik The best solution is to manually set permissions with LinuxPermissions.
@kekekeks The same problem you have with manual creation of a package.