Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Per-school LINBO hardware groups: school-qualified group ids in import-devices

未关闭
#206 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
52/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
活跃
技术栈
python
领域
backend, cli

调研方向

Start in src/linuxmuster_base7/cli/import_devices.py, reading doGrubCfg(), doLinboStartconf(), buildDhcpHostDeclaration(), and doPxeGroupsBySchool(), then inspect linuxmuster_base7.functions for the requested helper pair. Choose one separately scoped task, preserve default-school output byte-for-byte, and verify the qualified names, links, or migration behavior described in the issue without overwriting existing qualified files.

由索引模型根据 Issue 内容生成。

描述

This is the linuxmuster-base7 part of linuxmuster/linuxmuster-linbo7#178 (per-school hardware groups on multi-school servers). The design and cross-repo overview stay in linbo7#178. This issue tracks only the base7 work.

Background

On a multi-school server every hardware group is server-wide: two schools with a group raum101 share one start.conf.raum101, and school admins cannot safely be given control over "their" groups. As discussed in linbo7#178, the fix is a school-qualified group id that linuxmuster-import-devices generates. The LINBO client, the GRUB templates and the rsync hooks already pass the group string through unchanged, so they need no changes.

Target behaviour

  • For every school other than default-school, import-devices uses <school>+<group> in place of <group> for every LINBO artefact it derives from the group, e.g. start.conf.abc+raum101 and abc+raum101.cfg.
  • default-school keeps the current flat names exactly as they are. Single-school installations see no change.

Separator + (decided in linbo7#178): neither school names nor group names can contain +, so qualified ids cannot collide and can be parsed without the school list. A name without + belongs to default-school; a name with + splits on the first + into school and group.

Affected code (src/linuxmuster_base7/cli/import_devices.py)

The group column in devices.csv stays unqualified. The qualified id is derived, never stored.

Tasks

Each task is meant to be a separate, small PR:

  • Group id helper pair in linuxmuster_base7.functions: one function for school + group → qualified id and one for qualified id → school + group, so the naming rule lives in one place. linbo_mkgrubimg.py (linbo7) and linuxmuster-tools reuse them. For default-school the id is the plain group. Use them at all the call sites above.
  • Migration of existing installations: for every non-default school, copy each start.conf.<group> that the school uses to start.conf.<school>+<group> (a group shared by several schools gets one copy per school), rewrite the Group = line in each copy to the qualified id (clients use it as HOSTGROUP in offline mode), then re-run the import. It must be idempotent and must never overwrite an existing qualified file.
  • Changelog / release notes: document the new naming and that formerly shared groups are split per school.

Covered outside base7, see linbo7#178: the linbo_sync fallback for group-keyed Windows boot files (BCD, bsmbr, gptlabel) in existing images, and the linbo_mkgrubimg.py fixes for non-default schools.

Constraints

  • Default-school behaviour must stay byte-for-byte identical (DHCP config, file names, links).

Open questions

  1. Where the migration runs: on package upgrade or as an explicit command. To be discussed here.

Contributing

PRs are welcome. Please keep each PR small and limited to one task above, so it can be reviewed and merged on its own. PRs that reformat existing code without a functional reason will not be accepted.

Related: linuxmuster/linuxmuster-linbo7#178, linuxmuster/linuxmuster-tools#36

主要语言
Python
星标
13
派生
9
PR 合并指标
30 天内没有已合并 PR

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

linuxmuster/linuxmuster-base7 的其他 Issue

查看 linuxmuster/linuxmuster-base7 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。