pieroproietti / penguins-eggs

On the road of Remastersys, Refracta, Systemback and father Knoppix!
https://penguins-eggs.net
394 stars 44 forks source link

Ignore files from user's homes while creating a crypted clone #344

Closed markoceri closed 6 months ago

markoceri commented 6 months ago

I had the need to exclude some files during the creation of the LUKS crypted copy.

With this feature is possible to choose which files are to be filtered from the crypted copy by using the template file exclude.list.cryptedclone inside the directory /etc/penguins-eggs.d/exclude.list.d/.

The cryptedclone exclusion can be invoked in the same way as other exclusions, using the filters flag of the command produce.

sudo eggs produce --filters=cryptedclone --cryptedclone

Keep in mind that the paths specified in the exclude.list.cryptedclone file are relative to each user's home directory.

Under the hood the command eggs produce invokes the command eggs syncto to create the LUKS file. I added to this command a new flag -e or --exclude that enable the cryptedclone exclusion.

sudo eggs syncto -e

I also took the opportunity to fix some small formatting issues and variable names, I hope I'm not considered too picky 😃

pieroproietti commented 6 months ago

Great, I think it's a nice idea!

Il mer 13 mar 2024, 00:38 Marco Mancino @.***> ha scritto:

I had the need to exclude some files during the creation of the LUKS crypted copy.

With this feature is possible to choose which files are to be filtered from the crypted copy by using the template file exclude.list.cryptedclone inside the directory /etc/penguins-eggs.d/exclude.list.d/.

The cryptedclone exclusion can be invoked in the same way as other exclusions, using the filters flag of the command produce.

sudo eggs produce --filters=cryptedclone --cryptedclone

Keep in mind that the paths specified in the exclude.list.cryptedclone file are relative to each user's home directory.

Under the hood the command eggs produce invokes the command eggs syncto to create the LUKS file. I added to this command a new flag -e or --exclude that enable the cryptedclone exclusion.

sudo eggs syncto -e

I also took the opportunity to fix some small formatting issues and variable names, I hope I'm not considered too picky 😃

You can view, comment on, or merge this pull request online at:

https://github.com/pieroproietti/penguins-eggs/pull/344 Commit Summary

File Changes

(7 files https://github.com/pieroproietti/penguins-eggs/pull/344/files)

Patch Links:

— Reply to this email directly, view it on GitHub https://github.com/pieroproietti/penguins-eggs/pull/344, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAHKBFIA4ZT6K6KMDM5B473YX6GYRAVCNFSM6AAAAABETEUTLSVHI2DSMVQWIX3LMV43ASLTON2WKOZSGE4DEOBVGMZTMNY . You are receiving this because you are subscribed to this thread.Message ID: @.***>