[packages/sed] - fixed building with smack, add bconds for selinux and smack xattrs

qboosh qboosh at pld-linux.org
Thu Apr 23 20:47:59 CEST 2026


commit 9db8718f263d8e96d8fea14f4833e5a1266519ab
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Thu Apr 23 20:48:41 2026 +0200

    - fixed building with smack, add bconds for selinux and smack xattrs

 sed-smack.patch | 11 +++++++++++
 sed.spec        | 16 ++++++++++++----
 2 files changed, 23 insertions(+), 4 deletions(-)
---
diff --git a/sed.spec b/sed.spec
index 6d73fec..1b87c54 100644
--- a/sed.spec
+++ b/sed.spec
@@ -1,6 +1,8 @@
 #
 # Conditional build:
-%bcond_without	tests	# do not perform "make check"
+%bcond_without	tests	# unit tests
+%bcond_without	selinux	# SELinux xattr support
+%bcond_without	smack	# smack xattr support
 
 Summary:	A GNU stream text editor
 Summary(de.UTF-8):	GNU Stream-Text Editor
@@ -17,17 +19,19 @@ Version:	4.10
 Release:	1
 License:	GPL v3+
 Group:		Applications/Text
-Source0:	http://ftp.gnu.org/gnu/sed/%{name}-%{version}.tar.xz
+Source0:	https://ftp.gnu.org/gnu/sed/%{name}-%{version}.tar.xz
 # Source0-md5:	c70dc5372db95c816442ffedf77a0d0f
 Source1:	http://www.mif.pg.gda.pl/homepages/ankry/man-PLD/%{name}-non-english-man-pages.tar.bz2
 # Source1-md5:	5cd651063bfc00a82d820ba018672351
 Patch0:		%{name}-info.patch
+Patch1:		%{name}-smack.patch
 URL:		http://www.gnu.org/software/sed/
 BuildRequires:	acl-devel
 BuildRequires:	autoconf >= 2.64
 BuildRequires:	automake >= 1:1.11.1
 BuildRequires:	gettext-tools >= 0.19.2
-BuildRequires:	libselinux-devel
+%{?with_selinux:BuildRequires:	libselinux-devel}
+%{?with_smack:BuildRequires:	smack-devel}
 BuildRequires:	tar >= 1:1.22
 BuildRequires:	texinfo
 BuildRequires:	xz
@@ -108,13 +112,17 @@ sed (Stream EDitor) - це потоковий чи пакетний (не-інт
 %prep
 %setup -q
 %patch -P0 -p1
+%patch -P1 -p1
 
 # /etc/resolv.conf is stubbed on builders, change to something readable
 %{__sed} -i -e 's,"/etc/resolv\.conf","/etc/passwd",' gnulib-tests/test-read-file.c
 
 %build
 %configure \
-	--disable-silent-rules
+	--disable-silent-rules \
+	%{!?with_smack:--without-libsmack} \
+	%{!?with_selinux:--without-selinux}
+
 %{__make}
 
 # LC_ALL=C overrides LANG which is required to run tests
diff --git a/sed-smack.patch b/sed-smack.patch
new file mode 100644
index 0000000..ba68e49
--- /dev/null
+++ b/sed-smack.patch
@@ -0,0 +1,11 @@
+--- sed-4.10/m4/acl.m4.orig	2026-04-23 20:34:02.505098629 +0200
++++ sed-4.10/m4/acl.m4	2026-04-23 20:34:15.035030748 +0200
+@@ -208,7 +208,7 @@ AC_DEFUN([gl_FILE_HAS_ACL],
+                [Define to 1 if libsmack is usable.])
+              AS_CASE([$ac_cv_search_smack_new_label_from_path],
+                ["none required"], [],
+-               [FILE_HAS_ACL_LIB=$ac_cv_search_new_label_from_path])
++               [FILE_HAS_ACL_LIB=$ac_cv_search_smack_new_label_from_path])
+              gl_file_has_acl_uses_smack=yes],
+             [AS_CASE([$with_libsmack],
+                [yes], [AC_MSG_ERROR([libsmack not found or unusable])])])
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/sed.git/commitdiff/9db8718f263d8e96d8fea14f4833e5a1266519ab



More information about the pld-cvs-commit mailing list