refs #2852 do not let mksquashfs take all CPU cores
parent
7f93acd6d1
commit
80ffd1883d
|
@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
|
|||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [3.14.2] - 2025-09-30
|
||||
|
||||
### Changed
|
||||
|
||||
- Don't let mksquashfs take all CPU cores
|
||||
|
||||
## [3.14.1] - 2025-09-24
|
||||
|
||||
### Fixed
|
||||
|
|
|
@ -327,8 +327,18 @@ def mksquashfs (bttargetdir, btrootfsmnt):
|
|||
now = datetime.datetime.now(datetime.timezone.utc).strftime ('%Y%m%d-%H%M%S%z')
|
||||
os.rename (f'{bttargetdir}/ogclient.sqfs', f'{bttargetdir}/ogclient.sqfs.{now}')
|
||||
|
||||
## uses all CPU cores available, even within docker
|
||||
utils.run (['mksquashfs', btrootfsmnt, f'{bttargetdir}/ogclient.sqfs', '-e', 'var/lib/apt/lists', '-e', 'usr/share/doc'])
|
||||
## for some reason mksqashfs uses all CPU cores available, even within docker
|
||||
## so, let's count the number of cores...
|
||||
fd = open ('/proc/cpuinfo', 'r')
|
||||
nproc = 0
|
||||
while True:
|
||||
line = fd.readline()
|
||||
if not line: break
|
||||
if 'processor' in line: nproc += 1
|
||||
## ...and leave one core unused
|
||||
nproc = str (nproc-1)
|
||||
|
||||
utils.run (['mksquashfs', btrootfsmnt, f'{bttargetdir}/ogclient.sqfs', '-processors', nproc, '-e', 'var/lib/apt/lists', '-e', 'usr/share/doc'])
|
||||
os.chmod (f'{bttargetdir}/ogclient.sqfs', 0o744)
|
||||
|
||||
utils.write_md5 (f'{bttargetdir}/ogclient.sqfs')
|
||||
|
|
|
@ -1 +1 @@
|
|||
OpenGnsys Client 3.14.1
|
||||
OpenGnsys Client 3.14.2
|
||||
|
|
Loading…
Reference in New Issue