You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@gluten.apache.org by ph...@apache.org on 2026/08/14 07:30:17 UTC

(gluten) branch main updated: [MINOR][VL] Avoid bundling Linux UAPI socket header (#12768)

This is an automated email from the ASF dual-hosted git repository.

philo-he pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/gluten.git


The following commit(s) were added to refs/heads/main by this push:
     new bd02004be1 [MINOR][VL] Avoid bundling Linux UAPI socket header (#12768)
bd02004be1 is described below

commit bd02004be193f99177afd692eef6f175bf4f9b40
Author: Wei-Ting Chen <wi...@microsoft.com>
AuthorDate: Fri Aug 14 15:30:10 2026 +0800

    [MINOR][VL] Avoid bundling Linux UAPI socket header (#12768)
---
 ...velox-buildstatic-centos-7-enhanced-features.sh |   2 +-
 dev/ci-velox-buildstatic-centos-7.sh               |   2 +-
 dev/docker/Dockerfile.centos7-gcc13-static-build   |   4 +-
 ...-features.sh => install-linux-socket-header.sh} |  17 +++-
 ep/build-velox/src/socket.h                        | 105 ---------------------
 5 files changed, 16 insertions(+), 114 deletions(-)

diff --git a/dev/ci-velox-buildstatic-centos-7-enhanced-features.sh b/dev/ci-velox-buildstatic-centos-7-enhanced-features.sh
index 63cb8ccb4a..3b33d26df7 100755
--- a/dev/ci-velox-buildstatic-centos-7-enhanced-features.sh
+++ b/dev/ci-velox-buildstatic-centos-7-enhanced-features.sh
@@ -18,6 +18,6 @@
 set -e
 
 export NUM_THREADS=2
-cp ep/build-velox/src/socket.h /usr/include/asm-generic/socket.h 
+bash ./dev/install-linux-socket-header.sh
 ./dev/builddeps-veloxbe.sh --enable_vcpkg=ON --build_arrow=OFF --build_tests=ON --build_benchmarks=ON \
                            --build_examples=OFF --enable_s3=ON --enable_gcs=ON --enable_hdfs=ON --enable_abfs=ON --enable_enhanced_features=ON
diff --git a/dev/ci-velox-buildstatic-centos-7.sh b/dev/ci-velox-buildstatic-centos-7.sh
index 1990d4c7d3..59cd971693 100755
--- a/dev/ci-velox-buildstatic-centos-7.sh
+++ b/dev/ci-velox-buildstatic-centos-7.sh
@@ -18,6 +18,6 @@
 set -e
 
 export NUM_THREADS=4
-cp ep/build-velox/src/socket.h /usr/include/asm-generic/socket.h 
+bash ./dev/install-linux-socket-header.sh
 ./dev/builddeps-veloxbe.sh --enable_vcpkg=ON --build_arrow=OFF --build_tests=OFF --build_benchmarks=OFF \
                            --build_examples=OFF --enable_s3=ON --enable_gcs=ON --enable_hdfs=ON --enable_abfs=ON
diff --git a/dev/docker/Dockerfile.centos7-gcc13-static-build b/dev/docker/Dockerfile.centos7-gcc13-static-build
index c9e6ede10e..600ce3f776 100644
--- a/dev/docker/Dockerfile.centos7-gcc13-static-build
+++ b/dev/docker/Dockerfile.centos7-gcc13-static-build
@@ -34,11 +34,11 @@ RUN set -ex; \
        -e 's/^#baseurl/baseurl/' \
        -e 's/mirror\.centos\.org/vault.centos.org/' \
        /etc/yum.repos.d/CentOS-SCLo-scl-rh.repo; \
-    yum install -y git patch sudo java-1.8.0-openjdk-devel ccache; \
+    yum install -y git patch sudo java-1.8.0-openjdk-devel ccache curl; \
     git clone --depth=1 https://github.com/apache/gluten /opt/gluten; \
     echo "check_certificate = off" >> ~/.wgetrc; \
     cd /opt/gluten; \
-    cp ep/build-velox/src/socket.h /usr/include/asm-generic/socket.h; \
+    bash ./dev/install-linux-socket-header.sh; \
     bash ./dev/vcpkg/setup-build-depends.sh; \
     yum remove gcc -y && yum clean all; \
     yes | cp -rf /usr/share/aclocal/* /usr/local/share/aclocal/; \
diff --git a/dev/ci-velox-buildstatic-centos-7-enhanced-features.sh b/dev/install-linux-socket-header.sh
old mode 100755
new mode 100644
similarity index 54%
copy from dev/ci-velox-buildstatic-centos-7-enhanced-features.sh
copy to dev/install-linux-socket-header.sh
index 63cb8ccb4a..4eb18db80c
--- a/dev/ci-velox-buildstatic-centos-7-enhanced-features.sh
+++ b/dev/install-linux-socket-header.sh
@@ -15,9 +15,16 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-set -e
+set -euo pipefail
 
-export NUM_THREADS=2
-cp ep/build-velox/src/socket.h /usr/include/asm-generic/socket.h 
-./dev/builddeps-veloxbe.sh --enable_vcpkg=ON --build_arrow=OFF --build_tests=ON --build_benchmarks=ON \
-                           --build_examples=OFF --enable_s3=ON --enable_gcs=ON --enable_hdfs=ON --enable_abfs=ON --enable_enhanced_features=ON
+readonly LINUX_COMMIT="aad9c8c470f2a8321a99eb053630ce0e199558d6"
+readonly SOCKET_HEADER_SHA256="6ca32f00f1c64a1b75886b868a9e51a47d74720e777e5d6a0df30291c179a691"
+readonly SOCKET_HEADER_URL="https://raw.githubusercontent.com/torvalds/linux/${LINUX_COMMIT}/include/uapi/asm-generic/socket.h"
+readonly SOCKET_HEADER_PATH="${SOCKET_HEADER_PATH:-/usr/include/asm-generic/socket.h}"
+
+temp_file="$(mktemp)"
+trap 'rm -f "${temp_file}"' EXIT
+
+curl --fail --location --silent --show-error "${SOCKET_HEADER_URL}" --output "${temp_file}"
+echo "${SOCKET_HEADER_SHA256}  ${temp_file}" | sha256sum --check --status
+install --mode=0644 "${temp_file}" "${SOCKET_HEADER_PATH}"
diff --git a/ep/build-velox/src/socket.h b/ep/build-velox/src/socket.h
deleted file mode 100644
index af50c40490..0000000000
--- a/ep/build-velox/src/socket.h
+++ /dev/null
@@ -1,105 +0,0 @@
-#ifndef __ASM_GENERIC_SOCKET_H
-#define __ASM_GENERIC_SOCKET_H
-
-#include <asm/sockios.h>
-
-/* For setsockopt(2) */
-#define SOL_SOCKET	1
-
-#define SO_DEBUG	1
-#define SO_REUSEADDR	2
-#define SO_TYPE		3
-#define SO_ERROR	4
-#define SO_DONTROUTE	5
-#define SO_BROADCAST	6
-#define SO_SNDBUF	7
-#define SO_RCVBUF	8
-#define SO_SNDBUFFORCE	32
-#define SO_RCVBUFFORCE	33
-#define SO_KEEPALIVE	9
-#define SO_OOBINLINE	10
-#define SO_NO_CHECK	11
-#define SO_PRIORITY	12
-#define SO_LINGER	13
-#define SO_BSDCOMPAT	14
-#define SO_REUSEPORT	15
-#ifndef SO_PASSCRED /* powerpc only differs in these */
-#define SO_PASSCRED	16
-#define SO_PEERCRED	17
-#define SO_RCVLOWAT	18
-#define SO_SNDLOWAT	19
-#define SO_RCVTIMEO	20
-#define SO_SNDTIMEO	21
-#endif
-
-/* Security levels - as per NRL IPv6 - don't actually do anything */
-#define SO_SECURITY_AUTHENTICATION		22
-#define SO_SECURITY_ENCRYPTION_TRANSPORT	23
-#define SO_SECURITY_ENCRYPTION_NETWORK		24
-
-#define SO_BINDTODEVICE	25
-
-/* Socket filtering */
-#define SO_ATTACH_FILTER	26
-#define SO_DETACH_FILTER	27
-#define SO_GET_FILTER		SO_ATTACH_FILTER
-
-#define SO_PEERNAME		28
-#define SO_TIMESTAMP		29
-#define SCM_TIMESTAMP		SO_TIMESTAMP
-
-#define SO_ACCEPTCONN		30
-
-#define SO_PEERSEC		31
-#define SO_PASSSEC		34
-#define SO_TIMESTAMPNS		35
-#define SCM_TIMESTAMPNS		SO_TIMESTAMPNS
-
-#define SO_MARK			36
-
-#define SO_TIMESTAMPING		37
-#define SCM_TIMESTAMPING	SO_TIMESTAMPING
-
-#define SO_PROTOCOL		38
-#define SO_DOMAIN		39
-
-#define SO_RXQ_OVFL             40
-
-#define SO_WIFI_STATUS		41
-#define SCM_WIFI_STATUS	SO_WIFI_STATUS
-#define SO_PEEK_OFF		42
-
-/* Instruct lower device to use last 4-bytes of skb data as FCS */
-#define SO_NOFCS		43
-
-#define SO_LOCK_FILTER		44
-
-#define SO_SELECT_ERR_QUEUE	45
-
-#define SO_BUSY_POLL		46
-
-#define SO_MAX_PACING_RATE	47
-
-#define SO_BPF_EXTENSIONS	48
-
-#define SO_INCOMING_CPU         49
-
-#define SO_ATTACH_BPF           50
-#define SO_DETACH_BPF           SO_DETACH_FILTER
-
-#define SO_ATTACH_REUSEPORT_CBPF        51
-#define SO_ATTACH_REUSEPORT_EBPF        52
-
-#define SO_CNX_ADVICE           53
-
-#define SCM_TIMESTAMPING_OPT_STATS      54
-
-#define SO_MEMINFO              55
-
-#define SO_INCOMING_NAPI_ID     56
-
-#define SO_COOKIE               57
-
-#define SCM_TIMESTAMPING_PKTINFO	58
-
-#endif /* __ASM_GENERIC_SOCKET_H */


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org