Commit Graph

61 Commits

Author SHA1 Message Date
Yue-Lan b994252b6c update changelog. 2023-04-25 11:04:03 +08:00
Yue-Lan 7fd999cd14 跳过riscv64架构的编译检查,规避构建错误
目前定位到riscv64架构编译时会在测试setarch时报错,具体原因待进一步分析,考虑到setarch场景不多且组件选型任务比较紧急,先屏蔽auto test让项目编过比较好
2023-04-25 11:00:12 +08:00
苏芳 bb9a97710f
!3 rebuild.
Merge pull request !3 from 苏芳/openkylin/yangtze
2023-04-14 08:47:41 +00:00
su-fang ad2c0cf9fe rebuild. 2023-04-14 15:50:20 +08:00
苏芳 7696eaf93e
!2 rebuild
Merge pull request !2 from 苏芳/openkylin/yangtze
2023-04-07 08:54:18 +00:00
su-fang 9ce596cd5a rebuild 2023-04-07 16:48:39 +08:00
苏芳 2746c98b4c
!1 Modify debian/rules.
Merge pull request !1 from 苏芳/openkylin/yangtze
2023-02-22 08:55:08 +00:00
su-fang c0f05fb504 Modify debian/rules. 2023-02-22 16:45:44 +08:00
su-fang 580580aaf1 Apply patchs:
ubuntu/sulogin-fallback-static-sh.patch
 Description: Add support for /bin/static-sh as fallback if the regular shell fails to execute
 Author: Michael Vogt <michael.vogt@ubuntu.com>
ubuntu/sulogin-lockedpwd.patch
 Description: Make sure file systems can be fixed on machines with locked root accounts (as Ubuntu does by default). Don't require --force for sulogin.
 Author: Martin Pitt <martin.pitt@ubuntu.com>
2023-02-17 15:17:10 +08:00
su-fang bf0879f473 Update the debian directory. 2023-02-17 15:11:35 +08:00
Chris Hofstaedtler 267d2ac0f1 script: abort if unused arguments are given
scripts uses either a free-standing "file" argument, or the value
passed as --log-out "file". Additional filenames are ignored.
They are also ignored if --log-in "file" is given, as it turns off
output logging by default (can still be overriden by adding --log-out).
Avoid surprises when passing multiple filenames by writing usage
message instead.

[kzak@redhat.com: - use errtryhelp() rather than usage()]

Signed-off-by: Chris Hofstaedtler <zeha@debian.org>
Reported-by: наб <nabijaczleweli@nabijaczleweli.xyz>
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1016193
Signed-off-by: Karel Zak <kzak@redhat.com>
2023-02-17 15:04:43 +08:00
Karel Zak cc4b6a6570 lib/pty: minor cleanups
Signed-off-by: Karel Zak <kzak@redhat.com>
2023-02-17 15:04:35 +08:00
наб f358fe6105 lib/pty: Put master PTY into non-blocking mode and buffer its output to avoid deadlock
If we filled the script->child buffer before the child had a chance to read any
input, we'd sleep forever in write_all(pty->master), and the child would sleep
forever in write(1<pty->slave>)

By putting the master PTY in non-blocking mode, we can poll(pty->master,
POLLOUT) and keep supplying more data as the child reads from the buffer

Fixes Debian bug #1003095

Signed-off-by: Karel Zak <kzak@redhat.com>
2023-02-17 15:04:28 +08:00
Karel Zak 6d8fbabbbb rfkill: (man) List options for supported device types
Fixes: https://github.com/util-linux/util-linux/issues/1790
Signed-off-by: Karel Zak <kzak@redhat.com>
2023-02-17 15:04:20 +08:00
Thomas Weißschuh ee5c762166 libblkid: iso9660: allocate enough space for UTF16 decoding
When merge_utf16be_ascii() encounters high-codepoint surrogate pairs it
emits four bytes of output for one byte of ascii input.
In addition with the remaining ascii characters from the second loop we
need up to 5 * sizeof(input) / 2 bytes as output buffer.

As we decode up to 128 ascii characters with merge_utf16be_ascii() we
need 320 bytes of buffer available.

Furthermore adapt merge_utf16be_ascii() to not write paste the output
buffer end.

Fix OSS-Fuzz issue 53149 ( #1887 )
2023-02-17 15:03:58 +08:00
Thomas Weißschuh 4e3c40279a libblkid: ntfs: avoid UB in signed shift
Fix OSS-Fuzz issue 53142 ( #1886 )
Fix OSS-Fuzz issue 53160 ( #1888 )
2023-02-17 15:03:50 +08:00
zhanchengbin 6519b62644 fsck: Processes may kill other processes.
A error in disk-utils/fsck.c, if run the fsck -N command, processes
don't execute, just show what would be done. However, the pid whose
value is -1 is added to the instance_list list in the execute
function,if the kill_all function is called later, kill(-1, signum)
is executed, Signals are sent to all processes except the number one
process and itself. Other processes will be killed if they use the
default signal processing function.

Signed-off-by: zhanchengbin <zhanchengbin1@huawei.com>
Reviewed-by: Lukas Czerner <lczerner@redhat.com>
2023-02-17 15:03:42 +08:00
ThomasKaiser 6bba0b4098 lscpu: Add Kryo 3XX Gold core
[kzak@redhat.com: - update patch to use '-' between words in CPU name]

Signed-off-by: Karel Zak <kzak@redhat.com>
2023-02-17 15:03:35 +08:00
Jeremy Linton 97d72bc1d6 lscpu: Even more Arm part numbers
Arm has published further MIDR/part numbers on
https://developer.arm.com/ip-products/processors/cortex-a.
Some of the new ones have already been merged, so lets
fill in the gaps with A34, A65AE and X1C.

Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
2023-02-17 15:03:28 +08:00
ThomasKaiser f4a705b497 Remove closing braces in Apple cores names 2023-02-17 15:03:21 +08:00
Karel Zak 6a2792c70f lscpu: (arm) don't use space in names
It's seems better to be consistent and use the same convention for all
the names.

Signed-off-by: Karel Zak <kzak@redhat.com>
2023-02-17 15:03:13 +08:00
James Calligeros 4cce5d0d92 lscpu: add missing Apple parts
Signed-off-by: James Calligeros <jcalligeros99@gmail.com>
2023-02-17 15:03:07 +08:00
James Calligeros 2fd6c63f21 lscpu: make Apple part names human-friendly
The internal Apple model numbers for the SoCs are somewhat
confusing given that they are mostly similar and differ by only
one or two digits. Instead, use the public nomenclature for these
chips to avoid ambiguity and beautify the output.

Signed-off-by: James Calligeros <jcalligeros99@gmail.com>
2023-02-17 15:02:59 +08:00
Thomas Kaiser 0a73b54405 Fix formatting. 2023-02-17 15:02:51 +08:00
ThomasKaiser 619e571fb7 Adding Apple core names, distinguish by SoC/SiP name 2023-02-17 15:02:43 +08:00
ThomasKaiser f08efdf71c Add Makalu/Makalu-ELP (A715/X3)
Also fix names of A510/A710 cores
2023-02-17 15:02:36 +08:00
Jeremy Linton cdfcc281b9 lscpu: Add Snapdragon parts
QC updated the kernel cputype.h to include the Kyro 4xx and 3xx Silver
part numbers's. Lets sync that commit and naming.

Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
2023-02-17 15:02:28 +08:00
Karel Zak 8e642aa0dc sfdisk: inform about failed fsync() [coverity scan]
Signed-off-by: Karel Zak <kzak@redhat.com>
2023-02-17 15:02:18 +08:00
Karel Zak 7eb23d8435 libfdisk: (gpt) don't ignore fsync() errors
Signed-off-by: Karel Zak <kzak@redhat.com>
2023-02-17 15:02:08 +08:00
Karel Zak 8d503f85a8 sfdisk: improve code readability for coverity scan
Signed-off-by: Karel Zak <kzak@redhat.com>
2023-02-17 15:01:59 +08:00
Karel Zak ff1eb8a42b libfdisk: make scripts portable between different sector sizes
Fixes: https://github.com/util-linux/util-linux/issues/1744
Signed-off-by: Karel Zak <kzak@redhat.com>
2023-02-17 15:01:51 +08:00
Karel Zak 599e3fd306 fdisk: make it more obvious that DOS means MBR
Fixes: https://github.com/util-linux/util-linux/issues/1890
Signed-off-by: Karel Zak <kzak@redhat.com>
2023-02-17 15:01:43 +08:00
Karel Zak 75a8cd2a69 fdisk: fix --output option parsing
Fixes: https://github.com/util-linux/util-linux/issues/1859
Addresses: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1022249
Signed-off-by: Karel Zak <kzak@redhat.com>
2023-02-17 15:01:35 +08:00
Chris Down 0d5840a6c2 kill: Support mandating the presence of a userspace signal handler
In production we've had several incidents over the years where a process
has a signal handler registered for SIGHUP or one of the SIGUSR signals
which can be used to signal a request to reload configs, rotate log
files, and the like. While this may seem harmless enough, what we've
seen happen repeatedly is something like the following:

1. A process is using SIGHUP/SIGUSR[12] to request some
   application-handled state change -- reloading configs, rotating a log
   file, etc;
2. This kind of request is deprecated and removed, so the signal handler
   is removed. However, a site where the signal might be sent from is
   missed (often logrotate or a service manager);
3. Because the default disposition of these signals is terminal, sooner
   or later these applications are going to be sent SIGHUP or similar
   and end up unexpectedly killed.

I know for a fact that we're not the only organistion experiencing this:
in general, signal use is pretty tricky to reason about and safely
remove because of the fairly aggressive SIG_DFL behaviour for some
common signals, especially for SIGHUP which has a particularly ambiguous
meaning. Especially in a large, highly interconnected codebase,
reasoning about signal interactions between system configuration and
applications can be highly complex, and it's inevitable that on occasion
a callsite will be missed.

In some cases the right call to avoid this will be to migrate services
towards other forms of IPC for this purpose, but inevitably there will
be some services which must continue using signals, so we need a safe
way to support them.

This patch adds support for the -r/--require-handler flag, which checks
if a userspace handler is present for the signal being sent. If it is
not, the process will be skipped.

With this flag we can enforce that all SIGHUP reload cases and SIGUSR
equivalents use --require-handler. This effectively mitigates the case
we've seen time and time again where SIGHUP is used to rotate log files
or reload configs, but the sending site is mistakenly left present after
the removal of signal handler, resulting in unintended termination of
the process.

Signed-off-by: Chris Down <chris@chrisdown.name>
2023-02-17 15:01:28 +08:00
Karel Zak 2dab772cba lib/procfs: add function to parse /proc/#/stat
Signed-off-by: Karel Zak <kzak@redhat.com>
2023-02-17 15:01:19 +08:00
Karel Zak 38835adcca lsblk: fix endless loop if device specified more than once
Fixes: https://github.com/util-linux/util-linux/issues/1814
Signed-off-by: Karel Zak <kzak@redhat.com>
2023-02-17 15:01:11 +08:00
Michael Trapp 43c4671759 libuuid: check clock value from LIBUUID_CLOCK_FILE
The clock value from the LIBUUID_CLOCK_FILE must be checked in
case of an update of libuuid. If clock==CLOCK_SEQ_CONT it must
be set to a new value.

Signed-off-by: Karel Zak <kzak@redhat.com>
2023-02-17 15:00:21 +08:00
Karel Zak a29f1fcdf0 uuidd: fix random UUIDs
Commit f27876f introduces copy & past bug and replaces
__uuid_generate_random() with __uuid_generate_time().

Fixes: https://github.com/util-linux/util-linux/issues/1837
Signed-off-by: Karel Zak <kzak@redhat.com>
2023-02-17 15:00:01 +08:00
Michael Trapp 03b7962e80 libuuid: Implement continuous clock handling for time based UUIDs
In a uuidd setup, the daemon is a singleton and can maintain it's own
resources for time based UUID generation. This requires a dedicated
'clock sequence range' but does not need any further lock/update of
the LIBUUID_CLOCK_FILE from uuidd. The range of available clock values
is extended by a continuous handling of the clock updates - instead of
updating the value to the current timestamp, it is incremented by
the number of requested UUIDs.
2023-02-17 14:59:41 +08:00
Petr Štetiar 6d8292f22a lib/path: ul_path_cpuparse: fix parsing of empty sysfs files
Kernel 5.15 returns empty content for topology/thread_siblings on
aarch64 platform, which in conjunction of uninitialized `buf` memory
buffer results in the garbage:

 (gdb) p buf
 $14 = " @\377\367\177\000\000\000\275\000\347j\032\236"

This garbage is then being later consumed by underlying helper functions
like for example cpumask_parse() and this leads to the following crash
later:

 in __libc_free (p=0x7ff7f67c00) at src/malloc/mallocng/free.c:105
 in free (p=<optimized out>) at src/malloc/free.c:5
 in add_cpuset_to_array (setsize=<optimized out>, set=<optimized out>, items=<optimized out>, ary=<optimized out>) at ../sys-utils/lscpu-topology.c:29
 in cputype_read_topology (cxt=cxt@entry=0x7ff7fffe70, ct=0x4298a0) at ../sys-utils/lscpu-topology.c:153
 in lscpu_read_topology (cxt=cxt@entry=0x7ff7fffe70) at ../sys-utils/lscpu-topology.c:629
 in main (argc=1, argv=0x7ffffffdb8) at ../sys-utils/lscpu.c:1341

It looks like the problem is that current logic expects fgets() to set
errno on failure, but fgets() is not documented to do so and and neither
glibc nor musl set errno.  So if errno was set to 0 before fgets() call,
the failure from fgets() is ignored and then invalid buffer is being
parsed.

Fixes: #1810
Suggested-by: Thomas Weißschuh <thomas@t-8ch.de>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
2023-02-17 14:59:32 +08:00
Chris Hofstaedtler 09b6184cdc Use sensible-pager
Closes: #1014368
2023-02-17 14:59:11 +08:00
Chris Hofstaedtler c118fad68b Install lsfd into /usr/bin 2023-02-17 14:59:04 +08:00
Chris Hofstaedtler 48f1e99952 hardlink tests: set known failed
sha256 cannot be initialized on some archs / buildds.
2023-02-17 14:58:56 +08:00
Chris Hofstaedtler 88ba1dcb39 Use non-deprecated chown syntax
Closes: #1007139
2023-02-17 14:58:48 +08:00
Andreas Henriksson d4bcfe0a90 verbose-tests
Enable verbose tests and print content of failing tests output file.
2023-02-17 14:58:40 +08:00
Matthew Vernon 4d3a306bab util-linux: getopt(1) should point to where examples are on a Debian system
Debian BTS #913049
2023-02-17 14:47:16 +08:00
su-fang e72d587bc0 merge upstream 2.38.1 2023-02-17 14:33:46 +08:00
luzhiping d2e8f6190e update info 2022-08-22 17:00:23 +08:00
openKylinBot 83a3d58e79 changed debian/source/format to native 2022-05-14 03:14:50 +08:00
openKylinBot e22d7b9def apply patches 2022-05-14 03:14:50 +08:00