-
Notifications
You must be signed in to change notification settings - Fork 4
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
Implement template support #12
Conversation
@okodron review is appreciated. For @Tomin1 and @spiiroin please see also LaakkonenJussi/firejail#1 which contains the changes made here as directly on top of Sailfish OS patches + upstream git fork. |
rpm/0011-Add-profile-files-to-a-list-when-processing-argument.patch
Outdated
Show resolved
Hide resolved
rpm/0012-Implement-template-addition-for-replacing-keys-in-pr.patch
Outdated
Show resolved
Hide resolved
rpm/0012-Implement-template-addition-for-replacing-keys-in-pr.patch
Outdated
Show resolved
Hide resolved
rpm/0012-Implement-template-addition-for-replacing-keys-in-pr.patch
Outdated
Show resolved
Hide resolved
rpm/0012-Implement-template-addition-for-replacing-keys-in-pr.patch
Outdated
Show resolved
Hide resolved
rpm/0012-Implement-template-addition-for-replacing-keys-in-pr.patch
Outdated
Show resolved
Hide resolved
3dfe9e6
to
2dea8fb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This works for what we currently need. I think we may need to revisit those allowed characters a little if we use these for directory paths later.
Could you be more specific if you have some concerns somewhere? That part could be improved anyways a bit. |
So, IIUC this doesn't allow dashes but I think we do want to keep them in directory names. Otherwise it's probably fine. |
I could add them as supported chars since the actual D-Bus names are checked by the |
Looks like sailjail allows organization_name.application_name D-Bus service as is. I thought it would be doing some sort of substitution. |
Add two patches which change profile loading to be delayed until all arguments are parsed. This is due to the template key replacement, since templates are to be given as arguments as well. Each line in the profile line is checked and if one template is found they are replaced with the corresponding value. If no changes are required the profile line is untouched. Signed-off-by: Jussi Laakkonen <[email protected]>
I did remove the substitutions as there was no proper reason to do that. And I added better way to this to handle chars |
Since this does not depend on any other component in our case I'm merging this to be tested in devel. |
Add two patches which change profile loading to be delayed until all
arguments are parsed. This is due to the template key replacement, since
templates are to be given as arguments as well. Each line in the profile
line is checked and if one template is found they are replaced with the
corresponding value. If no changes are required the profile line is
untouched.