Skip to content

fix: restore CRYPT_LIBS in PROGRAM_LDADD for sw64 build support - #9

Merged
Zeno-sole merged 1 commit into
masterfrom
topic-upgrade-20261118
Nov 18, 2026
Merged

Zeno-sole merged 1 commit into
masterfrom
topic-upgrade-20261118

Conversation

@Zeno-sole

Copy link
Copy Markdown
Contributor

背景

$(CRYPT_LIBS) 在 PROGRAM_LDADD 中的修复最初以提交 6e19d90 合入
dcbot/debian/2.4.67,随后在自动同步上游 2.4.71(提交 bf505e8)时被
一并丢弃:

  • debian/patches/htdigest-link-crypt.patch 被删除
  • debian/patches/series 中的对应行被删除
  • debian/changelog 中的 deepin 条目被上游条目替换

本 PR 将该修复重新回合到 master(当前上游版本 2.4.71-1~deb13u1)。

问题

sw64 架构没有 libcrypt.so.1.1。所有二进制都通过 PROGRAM_LDADD 链接
libaprutil-1.so,而后者依赖 crypt_r@XCRYPT_2.0。当前只有 htpasswd
和 htdbm 在链接命令行上显式追加了 $(CRYPT_LIBS):

support/Makefile.in:43  ... $(htpasswd_OBJECTS) $(PROGRAM_LDADD) $(CRYPT_LIBS)
support/Makefile.in:60  ... $(htdbm_OBJECTS)    $(PROGRAM_LDADD) $(CRYPT_LIBS)

其余目标都没有,因此在 sw64 上出现未定义引用:htdigest、httxt2dbm、
htcacheclean、rotatelogs、logresolve、ab、checkgid 以及 apache2
主程序。

改动

  • debian/patches/htdigest-link-crypt.patch(恢复):在
    Makefile.in:7 与 support/Makefile.in:10 的 PROGRAM_LDADD 末尾追加
    $(CRYPT_LIBS)
  • debian/patches/series:追加该补丁(置于 fix-macro.patch 之后)
  • debian/changelog:新增 2.4.71-1~deb13u1deepin1

未改动任何 debian/ 之外的文件。

验证

  1. 补丁上下文与 2.4.71 完全一致:两处 PROGRAM_LDADD 行与 2.4.67 的
    内容逐字节相同,patch -p1 --dry-run 无 offset、无 fuzz。
  2. 整个 quilt 序列干净应用:在 git archive 出的干净树上跑
    quilt push -a,8 个补丁全部成功(含 build_suexec-custom.patch 与
    reproducible_builds.diff 这两个同样改 Makefile.in 的补丁),最终
    htdigest-link-crypt.patch 为栈顶。
  3. 应用后确认实际生效内容:
    Makefile.in:7         ... $(AP_LIBS) $(LIBS) $(CRYPT_LIBS)
    support/Makefile.in:10 ... $(AP_LIBS) $(CRYPT_LIBS)
    
  4. debian/changelog 经 dpkg-parsechangelog 解析为
    2.4.71-1~deb13u1deepin1,仅一个新增条目,历史条目未被改动。
  5. 改动范围仅限 debian/。

待验证

  • sw64 实机/交叉构建(本地无 sw64 环境,未能实测编译)
  • amd64/arm64/loongarch 回归构建

Add $(CRYPT_LIBS) to PROGRAM_LDADD in both Makefile.in and
support/Makefile.in to fix build failures on sw64 architecture.
All binaries link against libaprutil-1.so via PROGRAM_LDADD, but
libcrypt.so.1.1 is not available on sw64, causing undefined reference
to crypt_r@XCRYPT_2.0 for tools that do not explicitly link with -lcrypt.
Only htpasswd and htdbm add $(CRYPT_LIBS) explicitly, so htdigest,
httxt2dbm, htcacheclean, rotatelogs, logresolve, ab, checkgid and the
main apache2 binary all fail at link time on sw64.

The patch was originally added on 2.4.67 in commit 6e19d90 and was
dropped by the automated 2.4.71 sync; this restores it and re-verifies
that it still applies cleanly on 2.4.71.

Log: Restored CRYPT_LIBS in PROGRAM_LDADD for sw64 build fix

Influence:
1. Build apache2 on sw64 architecture should succeed
2. Verify all support tools and the main binary link correctly on sw64
3. Confirm the whole quilt series still applies cleanly on 2.4.71
4. Ensure no regression on other architectures (amd64, arm64, loongarch)

fix: 恢复 PROGRAM_LDADD 中的 CRYPT_LIBS 以支持 sw64 构建

在 Makefile.in 和 support/Makefile.in 的 PROGRAM_LDADD 中添加
$(CRYPT_LIBS),修复 sw64 架构上的构建失败。所有二进制文件都通过
PROGRAM_LDADD 链接 libaprutil-1.so,但 sw64 上没有 libcrypt.so.1.1,
导致未显式链接 -lcrypt 的工具出现对 crypt_r@XCRYPT_2.0 的未定义引用。
当前只有 htpasswd 与 htdbm 显式加了 $(CRYPT_LIBS),因此 htdigest、
httxt2dbm、htcacheclean、rotatelogs、logresolve、ab、checkgid 以及
apache2 主程序在 sw64 上全部链接失败。

该补丁最初在 2.4.67 上以提交 6e19d90 引入,在自动同步 2.4.71 时被丢弃,
本次恢复并重新验证其在 2.4.71 上仍可干净应用。

Log: 恢复 PROGRAM_LDADD 中的 CRYPT_LIBS 以修复 sw64 构建

Influence:
1. 在 sw64 架构上构建 apache2 应该成功
2. 验证所有工具和主二进制文件在 sw64 上链接正确
3. 确认整个 quilt 序列在 2.4.71 上仍可干净应用
4. 确保其他架构(amd64、arm64、loongarch)无回归

repo: apache2 #master
@deepin-ci-robot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@github-actions

Copy link
Copy Markdown

TAG Bot

TAG: 2.4.71-1_deb13u1deepin1
EXISTED: no
DISTRIBUTION: unstable

@Zeno-sole
Zeno-sole merged commit d006b56 into master Nov 18, 2026
6 of 10 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in upgrade-20261118 Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants