Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #7: Add controlfile (control file) directive to be able to add custom control file in the config.tar.gz section #8

Closed
wants to merge 3 commits into from

Conversation

ichan-akira
Copy link
Contributor

@ichan-akira ichan-akira commented Jul 30, 2021

Feature:

  • Add controlfile (control file) directive to be able to add custom control file in the config.tar.gz section.
    • This new directive can have value of SourcePath, IsText, Mode, UserId, and GroupId.
  • Adjust DebPackage.ResolveFileItems() to allow processing for null in DestPath.

Clean up:

  • Simplify existing implementation of initializing DebFileItem objects.
  • Make all properties initialization for DebFileItem more explicit (explicitly initialized) to make code easier to understand.
  • Convert pubic fields in DebControlParams and DebFileItem to become property with getter setter (following OOP principle: encapsulation).

Fixes #7

@ichan-akira
Copy link
Contributor Author

Hi @ygoe could you also help to review this PR as well? Thanks.

Copy link
Owner

@ygoe ygoe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting idea. I also wanted to look at these template files and debconf and everything but didn't get to it yet. Your flexible approach lets the user add any files to the control file. Is that actually necessary or would it be enough to add the two mentioned files only?

DotnetMakeDeb/Deb/DebPackage.cs Outdated Show resolved Hide resolved
DotnetMakeDeb/Deb/DebPackage.cs Outdated Show resolved Hide resolved
DotnetMakeDeb/Deb/DebPackage.cs Outdated Show resolved Hide resolved
@ygoe
Copy link
Owner

ygoe commented Aug 1, 2021

Oh, if the flexible approach will be used, I'd suggest renaming the directive from contfile to something like controlfile because of the very similar existing directive conffile.

@ichan-akira
Copy link
Contributor Author

ichan-akira commented Aug 1, 2021

Interesting idea. I also wanted to look at these template files and debconf and everything but didn't get to it yet. Your flexible approach lets the user add any files to the control file. Is that actually necessary or would it be enough to add the two mentioned files only?

Actually the file could be any name, that is why I need such flexibility, user could give the file name anything as long as it postfixes with .control and .templates.

@ichan-akira
Copy link
Contributor Author

Oh, if the flexible approach will be used, I'd suggest renaming the directive from contfile to something like controlfile because of the very similar existing directive conffile.

Agreed with controlfile for clarity.

@ichan-akira ichan-akira changed the title Fixes #7: Add contfile (control file) directive to be able to add custom control file in the config.tar.gz section Fixes #7: Add controlfile (control file) directive to be able to add custom control file in the config.tar.gz section Aug 1, 2021
…already existing DebFileItem class.

- Adjust regex for controlfile to allow input for SourcePath, IsText, Mode, UserId, and GroupId.
- Simplify existing implementation of initializing DebFileItem objects.
- Make all properties initialization for DebFileItem more explicit (explicitly initialized) to make code easier to understand.
- DebPackage.WritePackage() method now execute AddFile() for control file item with user defined UserId, GroupId, and Mode.
- Adjust DebPackage.ResolveFileItems() to allow processing for null DestPath.
- Convert pubic fields in DebControlParams and DebFileItem to become property with getter setter (following OOP principle: encapsulation).
@ichan-akira
Copy link
Contributor Author

I have fixed the PR, could you help to review again @ygoe, thanks 🙇

@ichan-akira ichan-akira closed this by deleting the head repository Sep 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

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