Giter VIP home page Giter VIP logo

dotnetmakedeb's People

Contributors

ichan-akira avatar ygoe avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

dotnetmakedeb's Issues

file-option: recursive for source files

It would be great to have the possibillity not only to copy the files within the source directory, but also the files in subdirectories.

This would make the package build of a ASP.NET Core application more easy as you'll have many folders within your wwwroot.

I want to use debconf and need to add config and templates file to config.tar.gz section

Currently config.tar.gz section can only have following files:

  • control
  • md5sums
  • conffiles
  • preinst
  • postinst
  • prerm
  • postrm

Because I want to display prompt for custom user input to pre-configure the package, I am planning to add feature that allow *.debspec file to add config and templates file as well.

My plan is to create controlfile (control file) directive with following description:

Sets the name of any kind of additional control file (e.g. config, templates). This file is included in the control part of the package and may be called during uninstallation or other operations of the package. It will not be available on the target system after installation. This directive has multiple parameters that are separated by white-space (any number of spaces or tabs):

  • The source path: The file is read from this path. Non-rooted paths are interpreted relative to the base path, if set before this directive.
  • Optional: text keyword to convert the file from DOS to Unix line endings.
  • The file mode: The target file is created with the specified mode, written in the usual octal notation. If unset, the default file mode is 644 (owner-write, world-read, no execute).
  • The file user ID: The target file is owned by the user with the specified numeric user ID. If unset, the file will be owned by the root user (ID 0).
  • The file group ID: The target file is owned by the group with the specified numeric group ID. If unset, the file will be owned by the root group (ID 0).

The source path may contain wildcards (* and ?) in the file name (not in the directory). If such a wildcard occurs, a file item for each local found file is added in place of this directive. All other parameters (mode, owner, group) are applied equally to all found files.

If the last path segment (the file name) of the source path is ** then all files from the specified directory and all its subdirectories are included. This allows the inclusion of entire subtrees of directories and files.

Source files can be specified multiple times. The last entry will overwrite any previous entry. This can be used to set different modes or owners for specific files that were already covered by a wildcard. In this case, the wildcard entry must occur before the specific file entry.

References to debconf:

.net 7

Would it be possible to update the target to .net 7?

Thank you for providing this library by the way :)

Add option: convert DOS to Unix line endings

There should be an option to convert text files from DOS/Windows line endings to the Unix format, on a per-file basis. This is useful for configuration files that are also used on Windows platforms. Most Linux editors can handle DOS line endings (recent Windows notepad can even handle Unix line endings) but the file should be formatted correctly for the target platform. It might also be useful for shell scripts (which must have Unix format) where the VCS doesn't support managing line formats explicitly (like Git defaults).

Process is terminated due to StackOverflowException.

I noticed if I write the *.debspec like so:

# Common directory variables
APP_NAME = myappnameisverylong
APP_NAME_SHORT = myapp # Workaround for https://github.com/ygoe/DotnetMakeDeb/issues/3

It will trigger error:

Process is terminated due to StackOverflowException.

FileName is too long. It must be less than 100 bytes

Hi @ygoe I got following error:

Error: An unhandled exception has occurred: FileName is too long. It must be less than 100 bytes.

When trying to create Debian package with following *.debspec:

# Spec file options
basepath: .
outdir: .

# Common directory variables
APP_NAME = myapp

SETUP_DIR = Setup\Linux
INSTALLDIR = Files\INSTALLDIR
PROGRAMDATA_CONFIG_DIR = Files\PROGRAMDATA_CONFIG_DIR 

OPT_DIR = opt/{APP_NAME}
VAR_DIR = var/opt/{APP_NAME}

# Package control file
package: {APP_NAME}
version: 1.0.0.0
architecture: amd64
maintainer: John Doe <[email protected]>
homepage: https://john.doe.com/
description: My App is created by John Doe.

# Maintenance scripts
preinst: {SETUP_DIR}\preinst text
postinst: {SETUP_DIR}\postinst text
prerm: {SETUP_DIR}\prerm text
postrm: {SETUP_DIR}\postrm text

# Startup scripts
file: {SETUP_DIR}\{APP_NAME} etc/init.d/ 755

# Application files
file: {INSTALLDIR}\** {OPT_DIR}/ 755

# Configuration
conffile: {INSTALLDIR}\Configuration\** {OPT_DIR}/Configuration/ 755
conffile: {PROGRAMDATA_CONFIG_DIR}\** {VAR_DIR}/ 755

# This line seems the one that causing trouble
file: {INSTALLDIR}\Configuration\** {OPT_DIR}/abcdefghijklmnopqrstuvwxyz/abcdefghijklmnopqrstuvwxyz/abcdefghijklmnopqrstuvwxyz/ 755

Do the target path have path+file name length limitation? How can we get around this issue, since from what I have look up following are the limitation in Linux (source: Ref: https://askubuntu.com/a/859953/937325):

The max filename length is 255 bytes.
And a maximum path of 4096 characters.

conffile directive seems does not support text keyword

I have tried your example at https://htmlpreview.github.io/?https://github.com/ygoe/DotnetMakeDeb/blob/master/MakeDeb.html or specifically at

<span class="keyword">conffile</span>: Setup\Config\Linux\myapp.cfg <span class="keyword">text</span> <span class="variable">{ETCDIR}</span>/

conffile: Setup\Config\Linux\myapp.cfg text    {ETCDIR}/

Running that example will give me:

Specification file: D:\Documents\Visual Studio\DotnetMakeDeb\Example\myapp.debspec
Error: An unhandled exception has occurred: Unrecognised directive in line 30.
Press any key to exit...

It seems conffile directive does not support text keyword?

Extend the library

Hi! I have discovered this project but it seems to cover only .deb files, (I know, that's the name of the project)

I wonder if you would like to cover more packaging formats for more OSes like Windows, Mac, Android...

I've found this project https://github.com/quamotion/dotnet-packaging, but it's not compatible with .NET 7+ and it seems unmaintained. I hope you can collaborate or create your own version.

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.