Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 17 additions & 6 deletions libs/libdht/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
include $(TOPDIR)/rules.mk

PKG_NAME:=libdht
PKG_RELEASE:=2
PKG_RELEASE:=3

PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/jech/dht
Expand All @@ -10,33 +10,44 @@ PKG_SOURCE_VERSION:=0bbb8f4a5bd914b60de5e9fbb51573aa33a1cf18
PKG_MIRROR_HASH:=4a24bd406dd0ac9e69d75f062b45bc0d660f1f8bed9672afc35a7afe4b13acf4

PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=LICENSE
PKG_LICENSE_FILES:=LICENCE

PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>

include $(INCLUDE_DIR)/package.mk

# Upstream ships a plain Makefile that builds only a test binary, so the
# shared object is built here -- and given a soname, since a bare libdht.so
# leaves no way to express an ABI break. jech/dht offers no ABI guarantee of
# its own, so this is a packaged ABI epoch: bump PKG_ABI_VERSION if the
# exported surface changes.
PKG_ABI_VERSION:=0

define Package/libdht
SECTION:=libs
CATEGORY:=Libraries
TITLE:=Kademlia Distributed Hash Table (DHT) library
DEPENDS:= +USE_GLIBC:libcrypt-compat
ABI_VERSION:=$(PKG_ABI_VERSION)
endef

define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include/dht $(1)/usr/lib
$(CP) $(PKG_BUILD_DIR)/dht.h $(1)/usr/include/dht
$(CP) $(PKG_BUILD_DIR)/libdht.so $(1)/usr/lib/
$(CP) $(PKG_BUILD_DIR)/libdht.so* $(1)/usr/lib/
endef

define Package/libdht/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_BUILD_DIR)/libdht.so $(1)/usr/lib/
$(CP) $(PKG_BUILD_DIR)/libdht.so.$(PKG_ABI_VERSION) $(1)/usr/lib/
endef

define Build/Compile
$(TARGET_CC) $(FPIC) -Wall -c -o $(PKG_BUILD_DIR)/dht.o $(PKG_BUILD_DIR)/dht.c
$(TARGET_CC) -shared -lcrypt -o $(PKG_BUILD_DIR)/libdht.so $(PKG_BUILD_DIR)/dht.o
$(TARGET_CC) $(FPIC) $(TARGET_CFLAGS) $(TARGET_CPPFLAGS) -Wall \
-c -o $(PKG_BUILD_DIR)/dht.o $(PKG_BUILD_DIR)/dht.c
$(TARGET_CC) $(TARGET_LDFLAGS) -shared -Wl,-soname,libdht.so.$(PKG_ABI_VERSION) \
-o $(PKG_BUILD_DIR)/libdht.so.$(PKG_ABI_VERSION) $(PKG_BUILD_DIR)/dht.o -lcrypt
ln -sf libdht.so.$(PKG_ABI_VERSION) $(PKG_BUILD_DIR)/libdht.so
endef

$(eval $(call BuildPackage,libdht))
2 changes: 1 addition & 1 deletion net/transmission/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk

PKG_NAME:=transmission
PKG_VERSION:=4.1.3

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: the PR description's Testing section reports transmission-daemon-4.1.2-r2.apk, but the package in tree is at 4.1.3 (this line), and CI on this head built transmission-daemon (4.1.3-r2). Looks like the local test build predates the 4.1.3 bump on master — worth correcting the description so the recorded evidence matches what actually gets built, or re-running the check against 4.1.3.

(The libdht0-2023.03.18~0bbb8f4a-r3 figure in the same section does match.)


Generated by Claude Code

PKG_RELEASE:=1
PKG_RELEASE:=2

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI on the five red test-build jobs (x86_64, aarch64_generic, i386_pentium-mmx, arm_cortex-a15_neon-vfpv4, mips_24kc) — they do not appear to be caused by anything in this PR. The failing check is on natpmpc, pulled in as a transmission dependency:

natpmpc: [pass] Binary /usr/bin/natpmpc is stripped
natpmpc: [pass] All linked libraries for /usr/bin/natpmpc are present
natpmpc: [skip] Version check override
natpmpc: No executables in the package provided version 20230423
natpmpc: Generic tests failed

natpmpc prints its usage screen without the version string and net/libnatpmp carries no test-version.sh override, so the generic version check fails for it on any PR that causes transmission's dependency set to be rebuilt. All four transmission subpackages and libdht0 itself pass their generic tests in the same runs — including All linked libraries for /usr/bin/transmission-daemon are present with libdht0 installed, which is the part this PR actually changes. Flagging only so the red X is not mistaken for a soname regression; the fix belongs in net/libnatpmp, not here.


Generated by Claude Code


PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://github.com/transmission/transmission/releases/download/$(PKG_VERSION)/
Expand Down
Loading