Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libcap/2.73: Bump version #26246

Merged
merged 1 commit into from
Dec 30, 2024
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
10 changes: 10 additions & 0 deletions recipes/libcap/all/conandata.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
sources:
"2.73":
url: "https://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/libcap-2.73.tar.xz"
sha256: "6405f6089cf4cdd8c271540cd990654d78dd0b1989b2d9bda20f933a75a795a5"
"2.70":
url: "https://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/libcap-2.70.tar.xz"
sha256: "23a6ef8aadaf1e3e875f633bb2d116cfef8952dba7bc7c569b13458e1952b30f"
Expand Down Expand Up @@ -36,6 +39,13 @@ sources:
url: "https://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/libcap-2.45.tar.xz"
sha256: "d66639f765c0e10557666b00f519caf0bd07a95f867dddaee131cd284fac3286"
patches:
"2.73":
- patch_file: "patches/2.73/0001-libcap-Remove-hardcoded-fPIC.patch"
patch_description: "allow to configure fPIC option from conan recipe"
patch_type: "conan"
- patch_file: "patches/2.73/0002-Make.Rules-Make-compile-tools-configurable.patch"
patch_description: "allow to override compiler via environment variables"
patch_type: "conan"
"2.70":
- patch_file: "patches/2.57/0001-libcap-Remove-hardcoded-fPIC.patch"
patch_description: "allow to configure fPIC option from conan recipe"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
From 8b86ac7b057ce529900969ead958a9ca7ae85b3c Mon Sep 17 00:00:00 2001
From: Sergey Bobrenok <[email protected]>
Date: Sun, 22 Dec 2024 20:30:31 +0700
Subject: [PATCH 1/2] libcap: Remove hardcoded -fPIC

Signed-off-by: Sergey Bobrenok <[email protected]>
---
libcap/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libcap/Makefile b/libcap/Makefile
index 5f5c601..02be223 100644
--- a/libcap/Makefile
+++ b/libcap/Makefile
@@ -19,7 +19,7 @@ PSXFILES=../psx/psx ../psx/wrap/psx_wrap
PSXMAGICOBJ=psx_magic.o

# Always build libcap sources this way:
-CFLAGS += -fPIC -D_LIBPSX_PTHREAD_LINKAGE
+CFLAGS += -D_LIBPSX_PTHREAD_LINKAGE
Copy link
Contributor

Choose a reason for hiding this comment

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

Hi @bobrofon, Why is this line added if nothing similar was added in the previous patch? I couldn’t find anything
upstream—could you help me? 😄

https://github.com/conan-io/conan-center-index/blob/master/recipes/libcap/all/patches/2.57/0001-libcap-Remove-hardcoded-fPIC.patch#L21

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In the previous patch, the -fPIC flag was removed from CFLAGS. In this patch, the -fPIC flag is also removed from CFLAGS. Honestly, I don't see any difference.

-CFLAGS += -fPIC

vs

-CFLAGS += -fPIC -D_LIBPSX_PTHREAD_LINKAGE
+CFLAGS += -D_LIBPSX_PTHREAD_LINKAGE

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The associated change in the upstream: https://git.kernel.org/pub/scm/libs/libcap/libcap.git/diff/libcap/Makefile?id=libcap-2.73&id2=libcap-2.70

-CFLAGS += -fPIC
+CFLAGS += -fPIC -D_LIBPSX_PTHREAD_LINKAGE


# https://bugzilla.kernel.org/show_bug.cgi?id=219168
OVERRIDE_BSYMBOLIC_FUNCTIONS := -Wl,-Bsymbolic-functions
--
2.47.1

Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
From 903c526352f0cea70200c3f3231dffce8d1c9621 Mon Sep 17 00:00:00 2001
From: Sergey Bobrenok <[email protected]>
Date: Sun, 22 Dec 2024 20:52:43 +0700
Subject: [PATCH 2/2] Make.Rules: Make compile tools configurable

Signed-off-by: Sergey Bobrenok <[email protected]>
---
Make.Rules | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/Make.Rules b/Make.Rules
index d349697..7bec1af 100644
--- a/Make.Rules
+++ b/Make.Rules
@@ -66,11 +66,11 @@ DEFINES := -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
SYSTEM_HEADERS = /usr/include

SUDO := sudo
-CC := $(CROSS_COMPILE)gcc
+CC ?= $(CROSS_COMPILE)gcc
LD := $(CC) -Wl,-x -shared -Wl,-shared
-AR := $(CROSS_COMPILE)ar
-RANLIB := $(CROSS_COMPILE)ranlib
-OBJCOPY := $(CROSS_COMPILE)objcopy
+AR ?= $(CROSS_COMPILE)ar
+RANLIB ?= $(CROSS_COMPILE)ranlib
+OBJCOPY ?= $(CROSS_COMPILE)objcopy

# Reference:
# CPPFLAGS used for building .o files from .c & .h files
--
2.47.1

2 changes: 2 additions & 0 deletions recipes/libcap/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
versions:
"2.73":
folder: all
"2.70":
folder: all
"2.69":
Expand Down