Skip to content

Conversation

SunilSherkhane
Copy link
Contributor

@SunilSherkhane SunilSherkhane commented Oct 2, 2025

  • Fixed Detect hardware clock timezone in liveuser.
  • Removed unwanted packages.
  • added net.local.stream.recvspace & net.local.stream.sendspace to sysctl.

Summary by Sourcery

Enable SDDM and clean up display manager configs, fix BIOS clock timezone setup, add stream buffer sysctl parameters, and remove obsolete Plasma package definitions.

Bug Fixes:

  • Fix hardware clock timezone detection and default to UTC in live setup

Enhancements:

  • Add function to remove LightDM entries and enable SDDM in rc.conf
  • Configure NTP settings and link /etc/localtime to UTC
  • Add net.local.stream.recvspace and sendspace parameters to sysctl.conf
  • Simplify sddm_setup to ensure autologin section and integrate new setup steps

Chores:

  • Remove unwanted plasma package definitions

Set the bios time as default on liveuser. Added recvspace & sendspace to sysctl
removed the packages.
@SunilSherkhane SunilSherkhane requested review from a team as code owners October 2, 2025 19:36
Copy link
Contributor

sourcery-ai bot commented Oct 2, 2025

Reviewer's Guide

This PR refactors the Plasma live-setup script to modularize display manager configuration, hardware-clock/timezone handling, and sysctl tuning, while also pruning unwanted packages from the plasma package lists.

Sequence diagram for modularized Plasma live-setup script execution

sequenceDiagram
    participant Script as "plasma.sh"
    participant Finalize as "finalize.sh"
    participant SetUser as "setuser.sh"
    participant PatchEtc as "patch_etc_files()"
    participant CommunityLive as "community_setup_liveuser()"
    participant CommunityAuto as "community_setup_autologin()"
    participant RCConf as "update_rcconf_dm()"
    participant LocalTime as "localtime()"
    participant SDDM as "sddm_setup()"
    participant PlasmaSet as "plasma_settings()"
    participant XInit as "setup_xinit()"
    participant FinalSetup as "final_setup()"

    Script->>Finalize: Source finalize.sh
    Script->>SetUser: Source setuser.sh
    Script->>PatchEtc: Call patch_etc_files()
    Script->>CommunityLive: Call community_setup_liveuser()
    Script->>CommunityAuto: Call community_setup_autologin()
    Script->>RCConf: Call update_rcconf_dm()
    Script->>LocalTime: Call localtime()
    Script->>SDDM: Call sddm_setup()
    Script->>PlasmaSet: Call plasma_settings()
    Script->>XInit: Call setup_xinit()
    Script->>FinalSetup: Call final_setup()
Loading

Class diagram for new modular functions in plasma.sh

classDiagram
    class plasma_sh {
        +update_rcconf_dm()
        +localtime()
        +sddm_setup()
        +plasma_settings()
        +setup_xinit()
    }
    plasma_sh : -rc_conf
    plasma_sh : -tz_target
    plasma_sh : -sddm_conf
    plasma_sh : -sysctl_conf

    plasma_sh --> "finalize.sh"
    plasma_sh --> "setuser.sh"
    plasma_sh --> patch_etc_files
    plasma_sh --> community_setup_liveuser
    plasma_sh --> community_setup_autologin
    plasma_sh --> final_setup
Loading

File-Level Changes

Change Details Files
Modularized display manager configuration
  • Remove existing LightDM entries
  • Purge stale SDDM settings
  • Enable SDDM via rc.conf
desktop_config/plasma.sh
Implemented hardware-clock timezone detection
  • Link /etc/localtime to UTC
  • Clean up legacy ntpd/Unbound entries
  • Enable ntpd with sync-on-start
desktop_config/plasma.sh
Added sysctl tuning for local stream buffers
  • Delete old recvspace/sendspace settings
  • Append new buffer-size values
desktop_config/plasma.sh
Streamlined SDDM autologin setup
  • Remove redundant comments around SDDM config
  • Ensure [Autologin] section exists
  • Update User and Session keys
desktop_config/plasma.sh
Pruned unwanted packages
  • Removed deprecated packages from plasma and vital/plasma lists
packages/plasma
packages/vital/plasma

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey there - I've reviewed your changes - here's some feedback:

  • Consider using sysrc for /etc/rc.conf updates instead of manual sed/echo to make rc.conf changes more robust and idempotent.
  • Rename the localtime() function to something more descriptive (eg. configure_timezone) to avoid colliding with built-in command names.
  • Add a check or touch the sysctl.conf file before sed/echo in plasma_settings() so you don’t error out if the file doesn’t exist.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- Consider using sysrc for /etc/rc.conf updates instead of manual sed/echo to make rc.conf changes more robust and idempotent.
- Rename the localtime() function to something more descriptive (eg. configure_timezone) to avoid colliding with built-in command names.
- Add a check or touch the sysctl.conf file before sed/echo in plasma_settings() so you don’t error out if the file doesn’t exist.

## Individual Comments

### Comment 1
<location> `desktop_config/plasma.sh:91-93` </location>
<code_context>
     mkdir -p /home/${live_user}/.config
     kwriteconfig5 --file /home/${live_user}/.config/kscreenlockerrc --group Daemon --key Autolock false
     kwriteconfig5 --file /home/${live_user}/.config/kscreenlockerrc --group Daemon --key LockOnResume false
     echo 'exec ck-launch-session startplasma-x11' >> /home/${live_user}/.xinitrc
   "
-
</code_context>

<issue_to_address>
**suggestion:** Repeatedly appending to .xinitrc may result in multiple identical lines.

Check if 'exec ck-launch-session startplasma-x11' already exists in .xinitrc before appending, or consider overwriting the file to avoid duplicate entries.

```suggestion
    kwriteconfig5 --file /home/${live_user}/.config/kscreenlockerrc --group Daemon --key LockOnResume false
    grep -qxF 'exec ck-launch-session startplasma-x11' /home/${live_user}/.xinitrc || echo 'exec ck-launch-session startplasma-x11' >> /home/${live_user}/.xinitrc
   "
```
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Review
Development

Successfully merging this pull request may close these issues.

1 participant