Allow modifying current defconfig #2

Merged
JeremyStarTM merged 3 commits from yarost12/aur-linux-clear:YF-allow-modifying-current-config into master 2024-12-04 19:24:41 +01:00
Contributor

Allow copying the current config and modifying it by running: _use_current=y _makenconfig=y (or other config modifier).

Allow copying the current config and modifying it by running: _use_current=y _makenconfig=y (or other config modifier).
yarost12 added 1 commit 2024-11-22 14:24:06 +01:00
Allow copying the current config and modifying it by running:
_use_current=y _makenconfig=y (or other config modifier).
yarost12 requested review from JeremyStarTM 2024-11-22 14:24:16 +01:00
JeremyStarTM requested changes 2024-11-23 14:36:08 +01:00
JeremyStarTM left a comment
Owner

I do not entirely see the value of this PR here. Wouldn't it be smarter to modify PKGBUILD#312 to simply always invoke update_defconfig?

I do not entirely see the value of this PR here. Wouldn't it be smarter to modify [PKGBUILD#312](https://git.staropensource.de/JeremyStarTM/aur-linux-clear/src/commit/0ce919c973aa43748a435948250d6b8bcb7f72c8/PKGBUILD#L312) to simply always invoke `update_defconfig`?
Author
Contributor

But then we're just starting off from scratch every time, unless I'm missing something. We can in theory bring out the checks of modify_defconfig, but then we'd still need to check inside of it to know which util to call.

I just want to be able to do the followin:

  1. mod the config
  2. update the kernel
  3. re-use the config
  4. modify the already customized config if I want to
But then we're just starting off from scratch every time, unless I'm missing something. We can in theory bring out the checks of modify_defconfig, but then we'd still need to check inside of it to know which util to call. I just want to be able to do the followin: 1. mod the config 2. update the kernel 3. re-use the config 4. modify the already customized config if I want to
Author
Contributor

Also I think you didn't enable landlock correctly, it needs to be added to the CONFIG_LSM list

Also I think you didn't enable landlock correctly, it needs to be added to the CONFIG_LSM list
Owner

But then we're just starting off from scratch every time, unless I'm missing something. We can in theory bring out the checks of modify_defconfig, but then we'd still need to check inside of it to know which util to call.

Wouldn't be it better if that config overriding code would be executed every time? Let's say that our currently running kernel is not linux-clear and we want to use it's current config. Our optimizations and changes will never be applied to that config, which is in some cases bad.

Also I think you didn't enable landlock correctly, it needs to be added to the CONFIG_LSM list

Oh, will take a look at that tomorrow (I'm in Germany btw.)

> But then we're just starting off from scratch every time, unless I'm missing something. We can in theory bring out the checks of modify_defconfig, but then we'd still need to check inside of it to know which util to call. Wouldn't be it better if that config overriding code would be executed every time? Let's say that our currently running kernel is not linux-clear and we want to use it's current config. Our optimizations and changes will never be applied to that config, which is in some cases bad. > Also I think you didn't enable landlock correctly, it needs to be added to the CONFIG_LSM list Oh, will take a look at that tomorrow (I'm in Germany btw.)
Author
Contributor

I'm in the Baltics.

Our optimizations and changes will never be applied to that config, which is in some cases bad.

Well, I assume that people using these flags know what they're doing, otherwise they probably wouldn't be touching them. We can add a warning or an info message saying something like

By using config from /proc/config.gz you might miss out on some optimizations of the Linux Clear project, tread carefully

I don't think we should be forcing people to use linux clear flags, maybe they're here for the patches only. I personally always disable SELINUX due to some horrors that I went through getting it to work on the commercial projects.

I'm in the Baltics. > Our optimizations and changes will never be applied to that config, which is in some cases bad. Well, I assume that people using these flags know what they're doing, otherwise they probably wouldn't be touching them. We can add a warning or an info message saying something like >By using config from /proc/config.gz you might miss out on some optimizations of the Linux Clear project, tread carefully I don't think we should be forcing people to use linux clear flags, maybe they're here for the patches only. I personally always disable SELINUX due to some horrors that I went through getting it to work on the commercial projects.
Owner

Never assume that someone knows what they are doing, that can only backfire. If someone knows what they are doing, they will have already looked at the PKGBUILD and removed the fluff that they don't like. And true, we could add a warning, but overriding kernel options is likely always safer. You are guaranteed to get different experience if you are using your current kernel's flags. This is in my opinion something which should not be happening.

Never assume that someone knows what they are doing, that can only backfire. If someone knows what they are doing, they will have already looked at the PKGBUILD and removed the fluff that they don't like. And true, we could add a warning, but overriding kernel options is likely always safer. You are guaranteed to get different experience if you are using your current kernel's flags. This is in my opinion something which should not be happening.
Author
Contributor

Look at it this way: previously, before the #1, we could re-use the old config and modify it. The only difference is that it would go through all the enablings/disablings that are hard-coded and end up being mangled.

This PR restores that functionality but does it more cleanly, we bypass the hardcoded mods and just setup a new config on top of the old one. I think this is a cleaner approach to re-using the old config.

I don't think we should force users to fiddle with PKGBUILD if they want to modify the config that they've already modified. Yeah it's cool and all but maintaining a personal fork (even if it's a local one) is a bit of a pita.

Look at it this way: previously, before the https://git.staropensource.de/JeremyStarTM/aur-linux-clear/pulls/1, we could re-use the old config and modify it. The only difference is that it would go through all the enablings/disablings that are hard-coded and end up being mangled. This PR restores that functionality but does it more cleanly, we bypass the hardcoded mods and just setup a new config on top of the old one. I think this is a cleaner approach to re-using the old config. I don't think we should force users to fiddle with PKGBUILD if they want to modify the config that they've already modified. Yeah it's cool and all but maintaining a personal fork (even if it's a local one) is a bit of a pita.
Owner

We could meet in the middle: We could make a new configuration option where users can turn on or off overriding some flags and then show them the lines where the overriding takes place. That way users who already modified their config to their heart's content can keep it and users who want to take those overrides with them can enable them.

We could meet in the middle: We could make a new configuration option where users can turn on or off overriding some flags and then show them the lines where the overriding takes place. That way users who already modified their config to their heart's content can keep it and users who want to take those overrides with them can enable them.
Author
Contributor

I am not sure I understand what you're suggesting. We could add a _optimize_defconfig flag to reapply the defconfig modifications. If used in combination with _use_current it would copy the config -> apply modifications -> open menuconfig (if _menuconfig was passed).

Does that sound good? We could make a parser to go config by config but I think that's excessive.

I am not sure I understand what you're suggesting. We could add a _optimize_defconfig flag to reapply the defconfig modifications. If used in combination with _use_current it would copy the config -> apply modifications -> open menuconfig (if _menuconfig was passed). Does that sound good? We could make a parser to go config by config but I think that's excessive.
yarost12 force-pushed YF-allow-modifying-current-config from bce10af1e6 to 5139ded653 2024-12-03 20:42:45 +01:00 Compare
Owner

Sounds good, that's exactly what I meant. Building a parser for this would be way too overkill. I don't think that I have the energy to build a new parser haha

Sounds good, that's exactly what I meant. Building a parser for this would be way too overkill. I don't think that [I](https://git.staropensource.de/StarOpenSource/Engine/src/branch/develop/base/src/main/java/de/staropensource/engine/base/implementable/ShortcodeParser.java) [have](https://git.staropensource.de/StarOpenSource/Engine/src/branch/develop/base/src/main/java/de/staropensource/engine/base/implementation/shortcode/EmptyShortcodeParser.java) [the](https://git.staropensource.de/StarOpenSource/Engine/src/branch/develop/ansi/src/main/java/de/staropensource/engine/ansi/AnsiShortcodeParser.java) [energy](https://git.staropensource.de/StarOpenSource/Engine/src/branch/develop/base/src/main/java/de/staropensource/engine/base/implementation/versioning/OneNumberVersioningSystem.java) [to](https://git.staropensource.de/StarOpenSource/Engine/src/branch/develop/base/src/main/java/de/staropensource/engine/base/implementation/versioning/TwoNumberVersioningSystem.java) [build](https://git.staropensource.de/StarOpenSource/Engine/src/branch/develop/base/src/main/java/de/staropensource/engine/base/implementation/versioning/ThreeNumberVersioningSystem.java) [a](https://git.staropensource.de/StarOpenSource/Engine/src/branch/develop/base/src/main/java/de/staropensource/engine/base/implementation/versioning/FourNumberVersioningSystem.java) [new](https://git.staropensource.de/StarOpenSource/Engine/src/branch/develop/base/src/main/java/de/staropensource/engine/base/implementation/versioning/SemanticVersioningSystem.java) [parser](https://git.staropensource.de/StarOpenSource/Engine/src/branch/develop/base/src/main/java/de/staropensource/engine/base/implementation/versioning/StarOpenSourceVersioningSystem.java) haha
JeremyStarTM added 1 commit 2024-12-04 19:23:43 +01:00
Owner

Updated your comment a bit to correct some information. Otherwise lgtm

Updated your comment a bit to correct some information. Otherwise lgtm
JeremyStarTM merged commit 8054550b9f into master 2024-12-04 19:24:41 +01:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: JeremyStarTM/aur-linux-clear#2
No description provided.