teknoraver / rpms / systemd

Forked from rpms/systemd 3 months ago
Clone

Blame SOURCES/0811-meson-add-syscall-names-update-target.patch

984f77
From f20ccc0d505eccd59bb3814f59a63ea036be5bd5 Mon Sep 17 00:00:00 2001
984f77
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
984f77
Date: Tue, 18 Aug 2020 16:27:20 +0200
984f77
Subject: [PATCH] meson: add syscall-names-update target
984f77
984f77
The calls to find_program("tools/*") are moved earlier so they can be used
984f77
in libshared/ (and it doesn't make sense to split them).
984f77
984f77
(cherry picked from commit 47354b440e90626c320d8f142cb742ff569e3a40)
984f77
984f77
Related: #2040247
984f77
---
984f77
 meson.build                   |  13 +-
984f77
 src/shared/meson.build        |   6 +
984f77
 src/shared/syscall-names.text | 597 ++++++++++++++++++++++++++++++++++
984f77
 tools/syscall-names-update.sh |   6 +
984f77
 4 files changed, 617 insertions(+), 5 deletions(-)
984f77
 create mode 100644 src/shared/syscall-names.text
984f77
 create mode 100755 tools/syscall-names-update.sh
984f77
984f77
diff --git a/meson.build b/meson.build
984f77
index 57de947367..6729a9ea5e 100644
984f77
--- a/meson.build
984f77
+++ b/meson.build
984f77
@@ -1417,6 +1417,14 @@ install_libsystemd_static = static_library(
984f77
 
984f77
 ############################################################
984f77
 
984f77
+hwdb_update_sh = find_program('tools/meson-hwdb-update.sh')
984f77
+make_directive_index_py = find_program('tools/make-directive-index.py')
984f77
+make_man_index_py = find_program('tools/make-man-index.py')
984f77
+syscall_names_update_sh = find_program('tools/syscall-names-update.sh')
984f77
+xml_helper_py = find_program('tools/xml_helper.py')
984f77
+
984f77
+############################################################
984f77
+
984f77
 # binaries that have --help and are intended for use by humans,
984f77
 # usually, but not always, installed in /bin.
984f77
 public_programs = []
984f77
@@ -2721,11 +2729,6 @@ run_target('fuzzers',
984f77
 
984f77
 ############################################################
984f77
 
984f77
-make_directive_index_py = find_program('tools/make-directive-index.py')
984f77
-make_man_index_py = find_program('tools/make-man-index.py')
984f77
-xml_helper_py = find_program('tools/xml_helper.py')
984f77
-hwdb_update_sh = find_program('tools/meson-hwdb-update.sh')
984f77
-
984f77
 subdir('units')
984f77
 subdir('sysctl.d')
984f77
 subdir('sysusers.d')
984f77
diff --git a/src/shared/meson.build b/src/shared/meson.build
984f77
index d0a1bba4c6..c9dd0a3a4e 100644
984f77
--- a/src/shared/meson.build
984f77
+++ b/src/shared/meson.build
984f77
@@ -165,3 +165,9 @@ libshared = shared_library(
984f77
         dependencies : libshared_deps,
984f77
         install : true,
984f77
         install_dir : rootlibexecdir)
984f77
+
984f77
+############################################################
984f77
+
984f77
+run_target(
984f77
+        'syscall-names-update',
984f77
+        command : [syscall_names_update_sh, meson.current_source_dir()])
984f77
diff --git a/src/shared/syscall-names.text b/src/shared/syscall-names.text
984f77
new file mode 100644
984f77
index 0000000000..40d18a8894
984f77
--- /dev/null
984f77
+++ b/src/shared/syscall-names.text
984f77
@@ -0,0 +1,597 @@
984f77
+_llseek
984f77
+_newselect
984f77
+_sysctl
984f77
+accept
984f77
+accept4
984f77
+access
984f77
+acct
984f77
+add_key
984f77
+adjtimex
984f77
+alarm
984f77
+arc_gettls
984f77
+arc_settls
984f77
+arc_usr_cmpxchg
984f77
+arch_prctl
984f77
+arm_fadvise64_64
984f77
+arm_sync_file_range
984f77
+atomic_barrier
984f77
+atomic_cmpxchg_32
984f77
+bdflush
984f77
+bfin_spinlock
984f77
+bind
984f77
+bpf
984f77
+brk
984f77
+cache_sync
984f77
+cachectl
984f77
+cacheflush
984f77
+capget
984f77
+capset
984f77
+chdir
984f77
+chmod
984f77
+chown
984f77
+chown32
984f77
+chroot
984f77
+clock_adjtime
984f77
+clock_adjtime64
984f77
+clock_getres
984f77
+clock_getres_time64
984f77
+clock_gettime
984f77
+clock_gettime64
984f77
+clock_nanosleep
984f77
+clock_nanosleep_time64
984f77
+clock_settime
984f77
+clock_settime64
984f77
+clone
984f77
+clone2
984f77
+clone3
984f77
+close
984f77
+close_range
984f77
+connect
984f77
+copy_file_range
984f77
+creat
984f77
+create_module
984f77
+delete_module
984f77
+dipc
984f77
+dup
984f77
+dup2
984f77
+dup3
984f77
+epoll_create
984f77
+epoll_create1
984f77
+epoll_ctl
984f77
+epoll_ctl_old
984f77
+epoll_pwait
984f77
+epoll_wait
984f77
+epoll_wait_old
984f77
+eventfd
984f77
+eventfd2
984f77
+exec_with_loader
984f77
+execv
984f77
+execve
984f77
+execveat
984f77
+exit
984f77
+exit_group
984f77
+faccessat
984f77
+faccessat2
984f77
+fadvise64
984f77
+fadvise64_64
984f77
+fallocate
984f77
+fanotify_init
984f77
+fanotify_mark
984f77
+fchdir
984f77
+fchmod
984f77
+fchmodat
984f77
+fchown
984f77
+fchown32
984f77
+fchownat
984f77
+fcntl
984f77
+fcntl64
984f77
+fdatasync
984f77
+fgetxattr
984f77
+finit_module
984f77
+flistxattr
984f77
+flock
984f77
+fork
984f77
+fp_udfiex_crtl
984f77
+fremovexattr
984f77
+fsconfig
984f77
+fsetxattr
984f77
+fsmount
984f77
+fsopen
984f77
+fspick
984f77
+fstat
984f77
+fstat64
984f77
+fstatat64
984f77
+fstatfs
984f77
+fstatfs64
984f77
+fsync
984f77
+ftruncate
984f77
+ftruncate64
984f77
+futex
984f77
+futex_time64
984f77
+futimesat
984f77
+get_kernel_syms
984f77
+get_mempolicy
984f77
+get_robust_list
984f77
+get_thread_area
984f77
+getcpu
984f77
+getcwd
984f77
+getdents
984f77
+getdents64
984f77
+getdomainname
984f77
+getdtablesize
984f77
+getegid
984f77
+getegid32
984f77
+geteuid
984f77
+geteuid32
984f77
+getgid
984f77
+getgid32
984f77
+getgroups
984f77
+getgroups32
984f77
+gethostname
984f77
+getitimer
984f77
+getpagesize
984f77
+getpeername
984f77
+getpgid
984f77
+getpgrp
984f77
+getpid
984f77
+getpmsg
984f77
+getppid
984f77
+getpriority
984f77
+getrandom
984f77
+getresgid
984f77
+getresgid32
984f77
+getresuid
984f77
+getresuid32
984f77
+getrlimit
984f77
+getrusage
984f77
+getsid
984f77
+getsockname
984f77
+getsockopt
984f77
+gettid
984f77
+gettimeofday
984f77
+getuid
984f77
+getuid32
984f77
+getunwind
984f77
+getxattr
984f77
+getxgid
984f77
+getxpid
984f77
+getxuid
984f77
+idle
984f77
+init_module
984f77
+inotify_add_watch
984f77
+inotify_init
984f77
+inotify_init1
984f77
+inotify_rm_watch
984f77
+io_cancel
984f77
+io_destroy
984f77
+io_getevents
984f77
+io_pgetevents
984f77
+io_pgetevents_time64
984f77
+io_setup
984f77
+io_submit
984f77
+io_uring_enter
984f77
+io_uring_register
984f77
+io_uring_setup
984f77
+ioctl
984f77
+ioperm
984f77
+iopl
984f77
+ioprio_get
984f77
+ioprio_set
984f77
+ipc
984f77
+kcmp
984f77
+kern_features
984f77
+kexec_file_load
984f77
+kexec_load
984f77
+keyctl
984f77
+kill
984f77
+lchown
984f77
+lchown32
984f77
+lgetxattr
984f77
+link
984f77
+linkat
984f77
+listen
984f77
+listxattr
984f77
+llistxattr
984f77
+lookup_dcookie
984f77
+lremovexattr
984f77
+lseek
984f77
+lsetxattr
984f77
+lstat
984f77
+lstat64
984f77
+madvise
984f77
+mbind
984f77
+membarrier
984f77
+memfd_create
984f77
+memory_ordering
984f77
+migrate_pages
984f77
+mincore
984f77
+mkdir
984f77
+mkdirat
984f77
+mknod
984f77
+mknodat
984f77
+mlock
984f77
+mlock2
984f77
+mlockall
984f77
+mmap
984f77
+mmap2
984f77
+modify_ldt
984f77
+mount
984f77
+move_mount
984f77
+move_pages
984f77
+mprotect
984f77
+mq_getsetattr
984f77
+mq_notify
984f77
+mq_open
984f77
+mq_timedreceive
984f77
+mq_timedreceive_time64
984f77
+mq_timedsend
984f77
+mq_timedsend_time64
984f77
+mq_unlink
984f77
+mremap
984f77
+msgctl
984f77
+msgget
984f77
+msgrcv
984f77
+msgsnd
984f77
+msync
984f77
+multiplexer
984f77
+munlock
984f77
+munlockall
984f77
+munmap
984f77
+name_to_handle_at
984f77
+nanosleep
984f77
+newfstatat
984f77
+nfsservctl
984f77
+ni_syscall
984f77
+nice
984f77
+old_adjtimex
984f77
+old_getpagesize
984f77
+oldfstat
984f77
+oldlstat
984f77
+oldolduname
984f77
+oldstat
984f77
+oldumount
984f77
+olduname
984f77
+open
984f77
+open_by_handle_at
984f77
+open_tree
984f77
+openat
984f77
+openat2
984f77
+or1k_atomic
984f77
+osf_adjtime
984f77
+osf_afs_syscall
984f77
+osf_alt_plock
984f77
+osf_alt_setsid
984f77
+osf_alt_sigpending
984f77
+osf_asynch_daemon
984f77
+osf_audcntl
984f77
+osf_audgen
984f77
+osf_chflags
984f77
+osf_execve
984f77
+osf_exportfs
984f77
+osf_fchflags
984f77
+osf_fdatasync
984f77
+osf_fpathconf
984f77
+osf_fstat
984f77
+osf_fstatfs
984f77
+osf_fstatfs64
984f77
+osf_fuser
984f77
+osf_getaddressconf
984f77
+osf_getdirentries
984f77
+osf_getdomainname
984f77
+osf_getfh
984f77
+osf_getfsstat
984f77
+osf_gethostid
984f77
+osf_getitimer
984f77
+osf_getlogin
984f77
+osf_getmnt
984f77
+osf_getrusage
984f77
+osf_getsysinfo
984f77
+osf_gettimeofday
984f77
+osf_kloadcall
984f77
+osf_kmodcall
984f77
+osf_lstat
984f77
+osf_memcntl
984f77
+osf_mincore
984f77
+osf_mount
984f77
+osf_mremap
984f77
+osf_msfs_syscall
984f77
+osf_msleep
984f77
+osf_mvalid
984f77
+osf_mwakeup
984f77
+osf_naccept
984f77
+osf_nfssvc
984f77
+osf_ngetpeername
984f77
+osf_ngetsockname
984f77
+osf_nrecvfrom
984f77
+osf_nrecvmsg
984f77
+osf_nsendmsg
984f77
+osf_ntp_adjtime
984f77
+osf_ntp_gettime
984f77
+osf_old_creat
984f77
+osf_old_fstat
984f77
+osf_old_getpgrp
984f77
+osf_old_killpg
984f77
+osf_old_lstat
984f77
+osf_old_open
984f77
+osf_old_sigaction
984f77
+osf_old_sigblock
984f77
+osf_old_sigreturn
984f77
+osf_old_sigsetmask
984f77
+osf_old_sigvec
984f77
+osf_old_stat
984f77
+osf_old_vadvise
984f77
+osf_old_vtrace
984f77
+osf_old_wait
984f77
+osf_oldquota
984f77
+osf_pathconf
984f77
+osf_pid_block
984f77
+osf_pid_unblock
984f77
+osf_plock
984f77
+osf_priocntlset
984f77
+osf_profil
984f77
+osf_proplist_syscall
984f77
+osf_reboot
984f77
+osf_revoke
984f77
+osf_sbrk
984f77
+osf_security
984f77
+osf_select
984f77
+osf_set_program_attributes
984f77
+osf_set_speculative
984f77
+osf_sethostid
984f77
+osf_setitimer
984f77
+osf_setlogin
984f77
+osf_setsysinfo
984f77
+osf_settimeofday
984f77
+osf_shmat
984f77
+osf_signal
984f77
+osf_sigprocmask
984f77
+osf_sigsendset
984f77
+osf_sigstack
984f77
+osf_sigwaitprim
984f77
+osf_sstk
984f77
+osf_stat
984f77
+osf_statfs
984f77
+osf_statfs64
984f77
+osf_subsys_info
984f77
+osf_swapctl
984f77
+osf_swapon
984f77
+osf_syscall
984f77
+osf_sysinfo
984f77
+osf_table
984f77
+osf_uadmin
984f77
+osf_usleep_thread
984f77
+osf_uswitch
984f77
+osf_utc_adjtime
984f77
+osf_utc_gettime
984f77
+osf_utimes
984f77
+osf_utsname
984f77
+osf_wait4
984f77
+osf_waitid
984f77
+pause
984f77
+pciconfig_iobase
984f77
+pciconfig_read
984f77
+pciconfig_write
984f77
+perf_event_open
984f77
+perfctr
984f77
+perfmonctl
984f77
+personality
984f77
+pidfd_getfd
984f77
+pidfd_open
984f77
+pidfd_send_signal
984f77
+pipe
984f77
+pipe2
984f77
+pivot_root
984f77
+pkey_alloc
984f77
+pkey_free
984f77
+pkey_mprotect
984f77
+poll
984f77
+ppoll
984f77
+ppoll_time64
984f77
+prctl
984f77
+pread64
984f77
+preadv
984f77
+preadv2
984f77
+prlimit64
984f77
+process_vm_readv
984f77
+process_vm_writev
984f77
+pselect6
984f77
+pselect6_time64
984f77
+ptrace
984f77
+pwrite64
984f77
+pwritev
984f77
+pwritev2
984f77
+query_module
984f77
+quotactl
984f77
+read
984f77
+readahead
984f77
+readdir
984f77
+readlink
984f77
+readlinkat
984f77
+readv
984f77
+reboot
984f77
+recv
984f77
+recvfrom
984f77
+recvmmsg
984f77
+recvmmsg_time64
984f77
+recvmsg
984f77
+remap_file_pages
984f77
+removexattr
984f77
+rename
984f77
+renameat
984f77
+renameat2
984f77
+request_key
984f77
+restart_syscall
984f77
+riscv_flush_icache
984f77
+rmdir
984f77
+rseq
984f77
+rt_sigaction
984f77
+rt_sigpending
984f77
+rt_sigprocmask
984f77
+rt_sigqueueinfo
984f77
+rt_sigreturn
984f77
+rt_sigsuspend
984f77
+rt_sigtimedwait
984f77
+rt_sigtimedwait_time64
984f77
+rt_tgsigqueueinfo
984f77
+rtas
984f77
+s390_guarded_storage
984f77
+s390_pci_mmio_read
984f77
+s390_pci_mmio_write
984f77
+s390_runtime_instr
984f77
+s390_sthyi
984f77
+sched_get_affinity
984f77
+sched_get_priority_max
984f77
+sched_get_priority_min
984f77
+sched_getaffinity
984f77
+sched_getattr
984f77
+sched_getparam
984f77
+sched_getscheduler
984f77
+sched_rr_get_interval
984f77
+sched_rr_get_interval_time64
984f77
+sched_set_affinity
984f77
+sched_setaffinity
984f77
+sched_setattr
984f77
+sched_setparam
984f77
+sched_setscheduler
984f77
+sched_yield
984f77
+seccomp
984f77
+select
984f77
+semctl
984f77
+semget
984f77
+semop
984f77
+semtimedop
984f77
+semtimedop_time64
984f77
+send
984f77
+sendfile
984f77
+sendfile64
984f77
+sendmmsg
984f77
+sendmsg
984f77
+sendto
984f77
+set_mempolicy
984f77
+set_robust_list
984f77
+set_thread_area
984f77
+set_tid_address
984f77
+setdomainname
984f77
+setfsgid
984f77
+setfsgid32
984f77
+setfsuid
984f77
+setfsuid32
984f77
+setgid
984f77
+setgid32
984f77
+setgroups
984f77
+setgroups32
984f77
+sethae
984f77
+sethostname
984f77
+setitimer
984f77
+setns
984f77
+setpgid
984f77
+setpgrp
984f77
+setpriority
984f77
+setregid
984f77
+setregid32
984f77
+setresgid
984f77
+setresgid32
984f77
+setresuid
984f77
+setresuid32
984f77
+setreuid
984f77
+setreuid32
984f77
+setrlimit
984f77
+setsid
984f77
+setsockopt
984f77
+settimeofday
984f77
+setuid
984f77
+setuid32
984f77
+setxattr
984f77
+sgetmask
984f77
+shmat
984f77
+shmctl
984f77
+shmdt
984f77
+shmget
984f77
+shutdown
984f77
+sigaction
984f77
+sigaltstack
984f77
+signal
984f77
+signalfd
984f77
+signalfd4
984f77
+sigpending
984f77
+sigprocmask
984f77
+sigreturn
984f77
+sigsuspend
984f77
+socket
984f77
+socketcall
984f77
+socketpair
984f77
+splice
984f77
+spu_create
984f77
+spu_run
984f77
+ssetmask
984f77
+stat
984f77
+stat64
984f77
+statfs
984f77
+statfs64
984f77
+statx
984f77
+stime
984f77
+subpage_prot
984f77
+swapcontext
984f77
+swapoff
984f77
+swapon
984f77
+switch_endian
984f77
+symlink
984f77
+symlinkat
984f77
+sync
984f77
+sync_file_range
984f77
+sync_file_range2
984f77
+syncfs
984f77
+sys_debug_setcontext
984f77
+syscall
984f77
+sysfs
984f77
+sysinfo
984f77
+syslog
984f77
+sysmips
984f77
+tee
984f77
+tgkill
984f77
+time
984f77
+timer_create
984f77
+timer_delete
984f77
+timer_getoverrun
984f77
+timer_gettime
984f77
+timer_gettime64
984f77
+timer_settime
984f77
+timer_settime64
984f77
+timerfd
984f77
+timerfd_create
984f77
+timerfd_gettime
984f77
+timerfd_gettime64
984f77
+timerfd_settime
984f77
+timerfd_settime64
984f77
+times
984f77
+tkill
984f77
+truncate
984f77
+truncate64
984f77
+udftrap
984f77
+ugetrlimit
984f77
+umask
984f77
+umount
984f77
+umount2
984f77
+uname
984f77
+unlink
984f77
+unlinkat
984f77
+unshare
984f77
+uselib
984f77
+userfaultfd
984f77
+ustat
984f77
+utime
984f77
+utimensat
984f77
+utimensat_time64
984f77
+utimes
984f77
+utimesat
984f77
+utrap_install
984f77
+vfork
984f77
+vhangup
984f77
+vm86
984f77
+vm86old
984f77
+vmsplice
984f77
+wait4
984f77
+waitid
984f77
+waitpid
984f77
+write
984f77
+writev
984f77
diff --git a/tools/syscall-names-update.sh b/tools/syscall-names-update.sh
984f77
new file mode 100755
984f77
index 0000000000..c884b93cda
984f77
--- /dev/null
984f77
+++ b/tools/syscall-names-update.sh
984f77
@@ -0,0 +1,6 @@
984f77
+#!/bin/sh
984f77
+set -eu
984f77
+
984f77
+cd "$1"
984f77
+
984f77
+curl -L -o syscall-names.text 'https://raw.githubusercontent.com/hrw/syscalls-table/master/syscall-names.text'