Question about dotnet deb packages #100

Open
opened 2026-01-29 16:29:31 +00:00 by claunia · 6 comments
Owner

Originally created by @renerlemes on GitHub (Apr 22, 2021).

1 - It is possible to change the control and postinst files before build deb package?
2 - To change the folder to the application will be copy, I'll use the -o command?
3 - How to create a service to the application?

Originally created by @renerlemes on GitHub (Apr 22, 2021). 1 - It is possible to change the **control** and **postinst** files before build deb package? 2 - To change the folder to the application will be copy, I'll use the -o command? 3 - How to create a service to the application?
Author
Owner

@atauenis commented on GitHub (Apr 22, 2021):

  1. Deb postinst script can be edited via csproj:
  <PropertyGroup>
    <PostInstallScript>
    </PostInstallScript>
  </PropertyGroup>
  1. May be answered in #183 .
  2. Create a appname.service file with service description and register it in csproj in such way:
  <ItemGroup Condition="'$(RuntimeIdentifier)'=='linux-x64' OR '$(RuntimeIdentifier)'=='linux-arm'">
    <Content Include="appname.service" CopyToPublishDirectory="Always" LinuxFileMode="1755">
        <LinuxPath>/etc/systemd/system/appname.service</LinuxPath>
    </Content>
  </ItemGroup>
@atauenis commented on GitHub (Apr 22, 2021): 1. Deb `postinst` script can be edited via csproj: ```XML <PropertyGroup> <PostInstallScript> </PostInstallScript> </PropertyGroup> ``` 2. May be answered in #183 . 3. Create a `appname.service` file with service description and register it in csproj in such way: ```XML <ItemGroup Condition="'$(RuntimeIdentifier)'=='linux-x64' OR '$(RuntimeIdentifier)'=='linux-arm'"> <Content Include="appname.service" CopyToPublishDirectory="Always" LinuxFileMode="1755"> <LinuxPath>/etc/systemd/system/appname.service</LinuxPath> </Content> </ItemGroup> ```
Author
Owner

@renerlemes commented on GitHub (Apr 22, 2021):

@atauenis Examining the .deb file, it appears to have had no effect with the settings you suggested. Would you help me?

1
2
3

@renerlemes commented on GitHub (Apr 22, 2021): @atauenis Examining the .deb file, it appears to have had no effect with the settings you suggested. Would you help me? ![1](https://user-images.githubusercontent.com/2191533/115713543-80485c80-a34c-11eb-92d8-f71da6a64069.JPG) ![2](https://user-images.githubusercontent.com/2191533/115713544-81798980-a34c-11eb-95ec-24664097b8bd.JPG) ![3](https://user-images.githubusercontent.com/2191533/115713546-81798980-a34c-11eb-9f69-eb6bdc42a4ab.JPG)
Author
Owner

@atauenis commented on GitHub (Apr 22, 2021):

";" is not need at end.
Also csproj file must have Unix line endings to properly contain installation shell-scripts.

@atauenis commented on GitHub (Apr 22, 2021): ";" is not need at end. Also csproj file must have Unix line endings to properly contain installation shell-scripts.
Author
Owner

@renerlemes commented on GitHub (Apr 25, 2021):

@atauenis the content of the project is always published in the folder /usr/share/PROJECTNAME.
An individual file I was able to change as you commented, but for the files that the project compiles I was not able to.
Can you help me?

@renerlemes commented on GitHub (Apr 25, 2021): @atauenis the content of the project is always published in the folder /usr/share/PROJECTNAME. An individual file I was able to change as you commented, but for the files that the project compiles I was not able to. Can you help me?
Author
Owner

@atauenis commented on GitHub (Apr 25, 2021):

I'm also don't know how to do this.

@atauenis commented on GitHub (Apr 25, 2021): I'm also don't know how to do this.
Author
Owner

@syedhamzag commented on GitHub (Dec 3, 2022):

error MSB1008: Only one project can be specified.

@syedhamzag commented on GitHub (Dec 3, 2022): error MSB1008: Only one project can be specified.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/dotnet-packaging#100