]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test-network: replace symlink to 99-default.link with a copy
authorYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 4 Mar 2025 23:07:07 +0000 (08:07 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Sun, 9 Mar 2025 17:41:40 +0000 (02:41 +0900)
Then, we can drop ugly workaround in meson.build.
The .link file is not necessarily synced with 99-default.link.
Also, 99-default.link is not updated so frequently.
Let's manually sync it when necessary.

test/meson.build
test/test-network/conf/25-default.link [changed from symlink to file mode: 0644]

index 59e9cd36fd086d8bb6806ad0cd65c9275eb531c3..18b747ffbf3d5c31cebec56bac6ca7d3776cb01c 100644 (file)
@@ -479,22 +479,17 @@ if install_tests
                                 error('rsync is required to install the integration test data')
                         endif
 
-                        rsync_r = rsync.full_path() + ' -rlpt --exclude .gitattributes --exclude 25-default.link -- "@0@" "${DESTDIR:-}@1@"'
+                        rsync_r = rsync.full_path() + ' -rlpt --exclude .gitattributes -- "@0@" "${DESTDIR:-}@1@"'
                         meson.add_install_script(sh, '-c',
                                                  rsync_r.format(meson.current_source_dir() / subdir, testdata_dir))
                 else
                         install_subdir(subdir,
-                                       exclude_files : ['.gitattributes', '25-default.link'],
+                                       exclude_files : ['.gitattributes'],
                                        install_dir : testdata_dir,
                                        follow_symlinks : false)
                 endif
         endforeach
 
-        # test-network/conf/25-default.link is a local symlink that becomes dangling when installed, so we
-        # exclude it and create the correct symlink here.
-        meson.add_install_script(sh, '-c', ln_s.format(networkdir / '99-default.link',
-                                                       testdata_dir / 'test-network/conf/25-default.link'))
-
         install_data(kbd_model_map,
                      install_dir : testdata_dir + '/test-keymap-util')
 
deleted file mode 120000 (symlink)
index dee89415e589d30fa144c00b3279a8bf03f9382d..0000000000000000000000000000000000000000
+++ /dev/null
@@ -1 +0,0 @@
-../../../network/99-default.link
\ No newline at end of file
new file mode 100644 (file)
index 0000000000000000000000000000000000000000..9b95e12fda5ee9c2f78ad335008eb39ef65cf55b
--- /dev/null
@@ -0,0 +1,11 @@
+# SPDX-License-Identifier: MIT-0
+#
+# This is a copy of 99-default.link.
+
+[Match]
+OriginalName=*
+
+[Link]
+NamePolicy=keep kernel database onboard slot path
+AlternativeNamesPolicy=database onboard slot path mac
+MACAddressPolicy=persistent