ben-grande / qusal

Salt Formulas for Qubes OS.
14 stars 6 forks source link

do not enforce removal of `/etc/apt/sources.list` #11

Closed adrelanos closed 5 months ago

adrelanos commented 5 months ago
"{{ slsdotpath }}-remove-debian-default-sources.list":
  file.absent:
    - require:
      - pkg: "{{ slsdotpath }}-installed"
    - name: /etc/apt/sources.list

Deletion of /etc/apt/sources.list makes sense when building Kicksecure while a default Debian sources list has been used but this should not be enforced going forward.

The user should be free to use /etc/apt/sources.list with custom repositories without having that file surprisingly deleted. That should be a "do once" action only.

And also only be removed if the user did not previously customized it to avoid data loss (loss of repositories).

ben-grande commented 5 months ago

Deletion of /etc/apt/sources.list makes sense when building Kicksecure while a default Debian sources list has been used but this should not be enforced going forward.

This is difficult because the script does not know it is the first run, I could however place a marker file in the template.

And also only be removed if the user did not previously customized it to avoid data loss (loss of repositories).

I agree it is a risk, although /etc/apt/sources.list.d/*.(sources|list) exist...

ben-grande commented 5 months ago

The user should be free to use /etc/apt/sources.list with custom repositories without having that file surprisingly deleted. That should be a "do once" action only.

Actually, a marker file is not a good solution, it is a hack, I will just comment lines starting with deb. Copying to home is not a good solution because the next run, it will be overwritten. Incrementally adding a number to the file name is unnecessary.