mirror of
https://github.com/systemd/systemd
synced 2026-03-17 10:34:46 +01:00
Compare commits
No commits in common. "947ecb08122c0337d0ec22b315182e2559f9d2cb" and "3da9b65b304836c2c8b1812a8c328f0ce45b18f7" have entirely different histories.
947ecb0812
...
3da9b65b30
@ -1031,8 +1031,7 @@ DEFINE_TRIVIAL_CLEANUP_FUNC_FULL(Socket*, socket_close_fds, NULL);
|
|||||||
int _e_ = (e); \
|
int _e_ = (e); \
|
||||||
log_unit_full_errno( \
|
log_unit_full_errno( \
|
||||||
UNIT(s), \
|
UNIT(s), \
|
||||||
ERRNO_IS_NOT_SUPPORTED(_e_) || \
|
ERRNO_IS_NOT_SUPPORTED(_e_) ? LOG_DEBUG : LOG_WARNING, \
|
||||||
ERRNO_IS_PRIVILEGE(_e_) ? LOG_DEBUG : LOG_WARNING, \
|
|
||||||
_e_, \
|
_e_, \
|
||||||
"Failed to set %s socket option, ignoring: %m", \
|
"Failed to set %s socket option, ignoring: %m", \
|
||||||
option); \
|
option); \
|
||||||
|
|||||||
@ -83,11 +83,11 @@ static const char* chassis_string_to_glyph(const char *chassis) {
|
|||||||
if (streq_ptr(chassis, "watch"))
|
if (streq_ptr(chassis, "watch"))
|
||||||
return UTF8("⌚"); /* Watch */
|
return UTF8("⌚"); /* Watch */
|
||||||
if (streq_ptr(chassis, "handset"))
|
if (streq_ptr(chassis, "handset"))
|
||||||
return UTF8("📱"); /* Mobile Phone */
|
return UTF8("🕻"); /* Left Hand Telephone Receiver */
|
||||||
if (streq_ptr(chassis, "vm"))
|
if (streq_ptr(chassis, "vm"))
|
||||||
return UTF8("💽"); /* Computer disk */
|
return UTF8("🖴"); /* Hard disk */
|
||||||
if (streq_ptr(chassis, "container"))
|
if (streq_ptr(chassis, "container"))
|
||||||
return UTF8("📦"); /* Package */
|
return UTF8("☐"); /* Ballot Box */
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -453,24 +453,12 @@ int make_filesystem(
|
|||||||
|
|
||||||
if (sector_size > 0) {
|
if (sector_size > 0) {
|
||||||
if (strv_extend(&env, "MKE2FS_DEVICE_SECTSIZE") < 0)
|
if (strv_extend(&env, "MKE2FS_DEVICE_SECTSIZE") < 0)
|
||||||
return log_oom();
|
return log_oom();
|
||||||
|
|
||||||
if (strv_extendf(&env, "%"PRIu64, sector_size) < 0)
|
if (strv_extendf(&env, "%"PRIu64, sector_size) < 0)
|
||||||
return log_oom();
|
return log_oom();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* e2fsprogs supports $SOURCE_DATE_EPOCH since v1.47.1. For older versions, we need to set
|
|
||||||
* $E2FSPROGS_FAKE_TIME. See the following:
|
|
||||||
* https://github.com/tytso/e2fsprogs/commit/b6e2913061577ad981464e435026d71a48fd5caf
|
|
||||||
* Note, $E2FSPROGS_FAKE_TIME and $SOURCE_DATE_EPOCH are mostly equivalent, except for the
|
|
||||||
* 0 value handling, where $E2FSPROGS_FAKE_TIME=0 is ignored and the current time is used,
|
|
||||||
* but $SOURCE_DATE_EPOCH=0 sets 1970-01-01 as the timestamp. */
|
|
||||||
if (!secure_getenv("E2FSPROGS_FAKE_TIME")) { /* honor $E2FSPROGS_FAKE_TIME if already set */
|
|
||||||
const char *e = secure_getenv("SOURCE_DATE_EPOCH");
|
|
||||||
if (e && strv_extend_strv(&env, STRV_MAKE("E2FSPROGS_FAKE_TIME", e), /* filter_duplicates= */ false) < 0)
|
|
||||||
return log_oom();
|
|
||||||
}
|
|
||||||
|
|
||||||
} else if (streq(fstype, "btrfs")) {
|
} else if (streq(fstype, "btrfs")) {
|
||||||
argv = strv_new(mkfs,
|
argv = strv_new(mkfs,
|
||||||
"-L", label,
|
"-L", label,
|
||||||
|
|||||||
@ -1896,7 +1896,7 @@ testcase_luks2_integrity() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
testcase_ext_reproducibility() {
|
testcase_ext_reproducibility() {
|
||||||
local defs imgs ts
|
local defs imgs
|
||||||
|
|
||||||
# Online mode mounts the filesystem which updates inode timestamps non-deterministically
|
# Online mode mounts the filesystem which updates inode timestamps non-deterministically
|
||||||
if [[ "$OFFLINE" != "yes" ]]; then
|
if [[ "$OFFLINE" != "yes" ]]; then
|
||||||
@ -1916,28 +1916,21 @@ Format=ext4
|
|||||||
EOF
|
EOF
|
||||||
|
|
||||||
# Build the image twice with the same seed and verify they are identical
|
# Build the image twice with the same seed and verify they are identical
|
||||||
ts=$(date +%s)
|
systemd-repart --offline="$OFFLINE" \
|
||||||
env SOURCE_DATE_EPOCH="$ts" \
|
--definitions="$defs" \
|
||||||
systemd-repart \
|
--empty=create \
|
||||||
--offline="$OFFLINE" \
|
--size=50M \
|
||||||
--definitions="$defs" \
|
--seed="$seed" \
|
||||||
--empty=create \
|
--dry-run=no \
|
||||||
--size=50M \
|
"$imgs/test1.img"
|
||||||
--seed="$seed" \
|
|
||||||
--dry-run=no \
|
|
||||||
"$imgs/test1.img"
|
|
||||||
|
|
||||||
sleep 2
|
systemd-repart --offline="$OFFLINE" \
|
||||||
|
--definitions="$defs" \
|
||||||
env SOURCE_DATE_EPOCH="$ts" \
|
--empty=create \
|
||||||
systemd-repart \
|
--size=50M \
|
||||||
--offline="$OFFLINE" \
|
--seed="$seed" \
|
||||||
--definitions="$defs" \
|
--dry-run=no \
|
||||||
--empty=create \
|
"$imgs/test2.img"
|
||||||
--size=50M \
|
|
||||||
--seed="$seed" \
|
|
||||||
--dry-run=no \
|
|
||||||
"$imgs/test2.img"
|
|
||||||
|
|
||||||
cmp "$imgs/test1.img" "$imgs/test2.img"
|
cmp "$imgs/test1.img" "$imgs/test2.img"
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user