diff options
Diffstat (limited to 'glog.spec')
| -rw-r--r-- | glog.spec | 29 |
1 files changed, 21 insertions, 8 deletions
@@ -4,7 +4,7 @@ Name: glog Version: 0.7.1 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Google Logging Library (glog) License: BSD-3-Clause @@ -50,20 +50,23 @@ file for %{name}. %autosetup -n %{name}-%{version} -p1 %build -# 显式 out-of-source build:openEuler 24.03 LTS SP3 chroot 的 %cmake 宏执行 -# in-source configure(写到 source 目录 glog-0.7.1),但 %cmake_build 期望 -# %_vpath_builddir 子目录(%_target_platform=aarch64-openEuler-linux-gnu), -# 二者不一致触发 "is not a directory" 错误(build_id=113742 %build 阶段失败)。 +# 显式 out-of-source build:openEuler 24.03 LTS SP3 chroot 的 %%cmake 宏执行 +# in-source configure(写到 source 目录 glog-0.7.1),但 %%cmake_build 期望 +# %%_vpath_builddir 子目录(%%_target_platform=aarch64-openEuler-linux-gnu), +# 二者不一致触发 "is not a directory" 错误(build_id=113742 %%build 阶段失败)。 # 改用裸 cmake 命令显式管理 build dir,规避 chroot 宏不一致,且跨 chroot 兼容。 +# !!RPM 陷阱:宏在注释行内也会被展开(必须用 %% 转义为字面 %)。 +# build_id=113743 %%build 失败根因:注释中 %%cmake 被展开为完整 cmake 调用, +# 注释尾部的中文 "宏执行" 作为参数传入 cmake -> source dir "宏执行" does not exist。 # CMake 选项说明(与 CMakeLists.txt option() 一致): # -DBUILD_SHARED_LIBS=ON : 默认 ON,构建 libglog.so.*(SOVERSION=2) # -DWITH_GFLAGS=ON : 启用 gflags 集成(openEuler 官方源已提供 2.2.2) -# -DWITH_GTEST=ON : 启用 GTest(用于 %check 阶段的 ctest) -# -DWITH_PKGCONFIG=ON : 安装 libglog.pc 到 %{_libdir}/pkgconfig/ +# -DWITH_GTEST=ON : 启用 GTest(用于 %%check 阶段的 ctest) +# -DWITH_PKGCONFIG=ON : 安装 libglog.pc 到 %%{_libdir}/pkgconfig/ # -DWITH_SYMBOLIZE=ON : 启用 symbolize 模块(默认 ON) # -DWITH_TLS=ON : 启用 Thread Local Storage 支持(默认 ON) # CMAKE_INSTALL_LIBDIR/INCLUDEDIR 显式传入,避免 GNUInstallDirs 在 aarch64 -# 上推导出非标准路径(与 %files 中 %{_libdir}/%{_includedir} 宏保持一致)。 +# 上推导出非标准路径(与 %%files 中 %%{_libdir}/%%{_includedir} 宏保持一致)。 mkdir -p %{_target_platform} cd %{_target_platform} cmake .. \ @@ -101,6 +104,16 @@ ctest %{?_smp_mflags} %{_datadir}/glog/ %changelog +* Mon Oct 19 2026 openEuler Builder <builder@openeuler.org> - 0.7.1-3 +- Escape %%-prefixed macro names in %%build section comments (%%cmake, + %%cmake_build, %%_vpath_builddir, %%_target_platform, %%build, %%check, + %%{_libdir}, %%{_includedir}, %%files) to prevent RPM macro expansion + inside comments. build_id=113743 %%build failed because %%cmake in a + comment expanded to the full cmake invocation and the trailing Chinese + text "宏执行" was passed as a source directory argument -> "source + directory .../宏执行 does not exist" (RPM pitfall: macros expand even + inside comment lines). + * Mon Oct 19 2026 openEuler Builder <builder@openeuler.org> - 0.7.1-2 - Replace %%cmake/%%cmake_build/%%cmake_install/%%ctest macros with explicit out-of-source cmake invocation to fix "is not a directory" %%build failure |
