[packages/elogind] - up to 239.1 - removed outdated glibc-2.27 patch - added selinux-fix patch (add missing includes to
qboosh
qboosh at pld-linux.org
Thu Nov 22 20:48:57 CET 2018
commit 8cfb8cee46f89732174e755a3037644abc97f7d5
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Thu Nov 22 20:53:11 2018 +0100
- up to 239.1
- removed outdated glibc-2.27 patch
- added selinux-fix patch (add missing includes to selinux support implementation)
elogind-glibc-2.27.patch | 212 ----------------------------------------------
elogind-selinux-fix.patch | 17 ++++
elogind.spec | 29 +++++--
3 files changed, 40 insertions(+), 218 deletions(-)
---
diff --git a/elogind.spec b/elogind.spec
index b51200e..7ac8f2b 100644
--- a/elogind.spec
+++ b/elogind.spec
@@ -1,28 +1,36 @@
Summary: Elogind User, Seat and Session Manager
Summary(pl.UTF-8): Elogind - zarządca użytkowników, stanowisk i sesji
Name: elogind
-Version: 235.3
+Version: 239.1
Release: 1
License: LGPL v2.1+
Group: Daemons
# Source0Download: https://github.com/elogind/elogind/releases
Source0: https://github.com/elogind/elogind/archive/v%{version}/%{name}-%{version}.tar.gz
-# Source0-md5: 9e3dea2785fb32c9b83b9db06742db44
-Patch0: %{name}-glibc-2.27.patch
+# Source0-md5: 14bde82c205398bc4479284a7566e31c
+Patch0: %{name}-selinux-fix.patch
URL: https://github.com/elogind/elogind
BuildRequires: acl-devel
+BuildRequires: audit-libs-devel
BuildRequires: dbus-devel >= 1.4.0
BuildRequires: gcc >= 5:3.2
BuildRequires: gettext-tools
+# checked, but finally not used
+#BuildRequires: glib2-devel >= 1:2.22.0
BuildRequires: gperf
BuildRequires: libcap-devel
BuildRequires: libselinux-devel >= 2.1.9
BuildRequires: m4
-BuildRequires: meson
+BuildRequires: meson >= 0.44
+BuildRequires: ninja
BuildRequires: pam-devel >= 1:1.1.2
+BuildRequires: pcre2-8-devel
BuildRequires: rpmbuild(macros) >= 1.727
+BuildRequires: udev-devel >= 1:185
+BuildConflicts: polkit-devel < 0.106
Requires: %{name}-libs = %{version}-%{release}
Requires: dbus >= 1.4.0
+Requires: glib2 >= 1:2.22.0
Requires: pam >= 1:1.3.0-3
Requires: udev-core >= 1:185
Conflicts: systemd
@@ -119,6 +127,7 @@ Pliki nagłówkowe biblioteki elogind.
-Dpamlibdir=/%{_lib}/security \
-Drootlibdir=%{_libdir} \
-Drootlibexecdir=%{_libexecdir}/%{name} \
+ -Dsplit-bin=true \
-Dsplit-usr=true
%meson_build -C build
@@ -128,8 +137,7 @@ rm -rf $RPM_BUILD_ROOT
%meson_install -C build
-%{__sed} -i -e 's, at elogind@,%{_libexecdir}/%{name}/elogind,' \
- $RPM_BUILD_ROOT%{_datadir}/dbus-1/system-services/org.freedesktop.login1.service
+%{__rm} $RPM_BUILD_ROOT%{_libexecdir}/elogind/system-{shutdown,sleep}/.keep_dir
# provided by systemd-devel
%{__rm} \
@@ -140,6 +148,9 @@ rm -rf $RPM_BUILD_ROOT
# provided by udev-core
%{__rm} $RPM_BUILD_ROOT/lib/udev/rules.d/70-power-switch.rules
+# packaged as %doc
+%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
+
%find_lang %{name}
%clean
@@ -165,13 +176,19 @@ rm -rf $RPM_BUILD_ROOT
%attr(755,root,root) %{_libexecdir}/elogind/elogind-cgroups-agent
%attr(755,root,root) %{_libexecdir}/elogind/elogind-uaccess-command
%attr(755,root,root) %{_libexecdir}/elogind/libelogind-shared-%{version}.so
+%dir %{_libexecdir}/elogind/system-shutdown
+%dir %{_libexecdir}/elogind/system-sleep
%{_datadir}/dbus-1/system-services/org.freedesktop.login1.service
%{_datadir}/dbus-1/system.d/org.freedesktop.login1.conf
%{_datadir}/factory/etc/pam.d/other
%{_datadir}/factory/etc/pam.d/system-auth
%{_datadir}/polkit-1/actions/org.freedesktop.login1.policy
+%{_mandir}/man1/elogind-inhibit.1*
%{_mandir}/man1/loginctl.1*
%{_mandir}/man5/logind.conf.5*
+%{_mandir}/man7/elogind.directives.7*
+%{_mandir}/man7/elogind.index.7*
+%{_mandir}/man7/elogind.syntax.7*
%{_mandir}/man8/elogind.8*
%{_mandir}/man8/pam_elogind.8*
diff --git a/elogind-glibc-2.27.patch b/elogind-glibc-2.27.patch
deleted file mode 100644
index fd4065e..0000000
--- a/elogind-glibc-2.27.patch
+++ /dev/null
@@ -1,212 +0,0 @@
-diff -urpa elogind-235.3.orig/src/basic/missing_syscall.h elogind-235.3/src/basic/missing_syscall.h
---- elogind-235.3.orig/src/basic/missing_syscall.h 2018-03-09 06:57:50.000000000 +0000
-+++ elogind-235.3/src/basic/missing_syscall.h 2018-04-14 18:13:21.667411504 +0000
-@@ -26,9 +26,11 @@
- #include <sys/types.h>
-
- #if !HAVE_PIVOT_ROOT
--static inline int pivot_root(const char *new_root, const char *put_old) {
-+static inline int missing_pivot_root(const char *new_root, const char *put_old) {
- return syscall(SYS_pivot_root, new_root, put_old);
- }
-+
-+# define pivot_root missing_pivot_root
- #endif
- #endif // 0
-
-@@ -63,7 +65,7 @@ static inline int pivot_root(const char
- # endif
- # endif
-
--static inline int memfd_create(const char *name, unsigned int flags) {
-+static inline int missing_memfd_create(const char *name, unsigned int flags) {
- # ifdef __NR_memfd_create
- return syscall(__NR_memfd_create, name, flags);
- # else
-@@ -71,6 +73,8 @@ static inline int memfd_create(const cha
- return -1;
- # endif
- }
-+
-+# define memfd_create missing_memfd_create
- #endif
-
- /* ======================================================================= */
-@@ -110,7 +114,7 @@ static inline int memfd_create(const cha
- # endif
- # endif
-
--static inline int getrandom(void *buffer, size_t count, unsigned flags) {
-+static inline int missing_getrandom(void *buffer, size_t count, unsigned flags) {
- # ifdef __NR_getrandom
- return syscall(__NR_getrandom, buffer, count, flags);
- # else
-@@ -118,14 +122,18 @@ static inline int getrandom(void *buffer
- return -1;
- # endif
- }
-+
-+# define getrandom missing_getrandom
- #endif
-
- /* ======================================================================= */
-
- #if !HAVE_GETTID
--static inline pid_t gettid(void) {
-+static inline pid_t missing_gettid(void) {
- return (pid_t) syscall(SYS_gettid);
- }
-+
-+# define gettid missing_gettid
- #endif
-
- /* ======================================================================= */
-@@ -153,7 +161,7 @@ struct file_handle {
- unsigned char f_handle[0];
- };
-
--static inline int name_to_handle_at(int fd, const char *name, struct file_handle *handle, int *mnt_id, int flags) {
-+static inline int missing_name_to_handle_at(int fd, const char *name, struct file_handle *handle, int *mnt_id, int flags) {
- # ifdef __NR_name_to_handle_at
- return syscall(__NR_name_to_handle_at, fd, name, handle, mnt_id, flags);
- # else
-@@ -161,6 +169,8 @@ static inline int name_to_handle_at(int
- return -1;
- # endif
- }
-+
-+# define name_to_handle_at missing_name_to_handle_at
- #endif
-
- /* ======================================================================= */
-@@ -178,7 +188,7 @@ static inline int name_to_handle_at(int
- # endif
- # endif
-
--static inline int setns(int fd, int nstype) {
-+static inline int missing_setns(int fd, int nstype) {
- # ifdef __NR_setns
- return syscall(__NR_setns, fd, nstype);
- # else
-@@ -186,6 +196,8 @@ static inline int setns(int fd, int nsty
- return -1;
- # endif
- }
-+
-+# define setns missing_setns
- #endif
-
- /* ======================================================================= */
-@@ -231,7 +243,7 @@ static inline pid_t raw_getpid(void) {
- # endif
- # endif
-
--static inline int renameat2(int oldfd, const char *oldname, int newfd, const char *newname, unsigned flags) {
-+static inline int missing_renameat2(int oldfd, const char *oldname, int newfd, const char *newname, unsigned flags) {
- # ifdef __NR_renameat2
- return syscall(__NR_renameat2, oldfd, oldname, newfd, newname, flags);
- # else
-@@ -239,12 +251,14 @@ static inline int renameat2(int oldfd, c
- return -1;
- # endif
- }
-+
-+# define renameat2 missing_renameat2
- #endif
-
- /* ======================================================================= */
-
- #if !HAVE_KCMP
--static inline int kcmp(pid_t pid1, pid_t pid2, int type, unsigned long idx1, unsigned long idx2) {
-+static inline int missing_kcmp(pid_t pid1, pid_t pid2, int type, unsigned long idx1, unsigned long idx2) {
- # ifdef __NR_kcmp
- return syscall(__NR_kcmp, pid1, pid2, type, idx1, idx2);
- # else
-@@ -252,36 +266,45 @@ static inline int kcmp(pid_t pid1, pid_t
- return -1;
- # endif
- }
-+
-+# define kcmp missing_kcmp
- #endif
-
-+
- /* ======================================================================= */
-
- #if !HAVE_KEYCTL
--static inline long keyctl(int cmd, unsigned long arg2, unsigned long arg3, unsigned long arg4,unsigned long arg5) {
-+static inline long missing_keyctl(int cmd, unsigned long arg2, unsigned long arg3, unsigned long arg4,unsigned long arg5) {
- # ifdef __NR_keyctl
- return syscall(__NR_keyctl, cmd, arg2, arg3, arg4, arg5);
- # else
- errno = ENOSYS;
- return -1;
- # endif
-+
-+# define keyctl missing_keyctl
- }
-
--static inline key_serial_t add_key(const char *type, const char *description, const void *payload, size_t plen, key_serial_t ringid) {
-+static inline key_serial_t missing_add_key(const char *type, const char *description, const void *payload, size_t plen, key_serial_t ringid) {
- # ifdef __NR_add_key
- return syscall(__NR_add_key, type, description, payload, plen, ringid);
- # else
- errno = ENOSYS;
- return -1;
- # endif
-+
-+# define add_key missing_add_key
- }
-
--static inline key_serial_t request_key(const char *type, const char *description, const char * callout_info, key_serial_t destringid) {
-+static inline key_serial_t missing_request_key(const char *type, const char *description, const char * callout_info, key_serial_t destringid) {
- # ifdef __NR_request_key
- return syscall(__NR_request_key, type, description, callout_info, destringid);
- # else
- errno = ENOSYS;
- return -1;
- # endif
-+
-+# define request_key missing_request_key
- }
- #endif
-
-@@ -308,10 +331,10 @@ static inline key_serial_t request_key(c
- # endif
- # endif
-
--static inline ssize_t copy_file_range(int fd_in, loff_t *off_in,
-- int fd_out, loff_t *off_out,
-- size_t len,
-- unsigned int flags) {
-+static inline ssize_t missing_copy_file_range(int fd_in, loff_t *off_in,
-+ int fd_out, loff_t *off_out,
-+ size_t len,
-+ unsigned int flags) {
- # ifdef __NR_copy_file_range
- return syscall(__NR_copy_file_range, fd_in, off_in, fd_out, off_out, len, flags);
- # else
-@@ -319,6 +342,8 @@ static inline ssize_t copy_file_range(in
- return -1;
- # endif
- }
-+
-+# define copy_file_range missing_copy_file_range
- #endif
-
- #if !HAVE_BPF
-@@ -340,7 +365,7 @@ static inline ssize_t copy_file_range(in
-
- union bpf_attr;
-
--static inline int bpf(int cmd, union bpf_attr *attr, size_t size) {
-+static inline int missing_bpf(int cmd, union bpf_attr *attr, size_t size) {
- #ifdef __NR_bpf
- return (int) syscall(__NR_bpf, cmd, attr, size);
- #else
-@@ -349,4 +374,5 @@ static inline int bpf(int cmd, union bpf
- #endif
- }
-
-+# define bpf missing_bpf
- #endif
diff --git a/elogind-selinux-fix.patch b/elogind-selinux-fix.patch
new file mode 100644
index 0000000..61c6117
--- /dev/null
+++ b/elogind-selinux-fix.patch
@@ -0,0 +1,17 @@
+--- elogind-239.1/src/basic/selinux-util.c.orig 2018-10-17 19:50:46.000000000 +0200
++++ elogind-239.1/src/basic/selinux-util.c 2018-11-22 05:40:37.017117099 +0100
+@@ -16,12 +16,12 @@
+ #endif
+
+ #include "alloc-util.h"
+-//#include "fd-util.h"
++#include "fd-util.h"
+ #include "log.h"
+ #include "macro.h"
+ #include "path-util.h"
+ #include "selinux-util.h"
+-//#include "stdio-util.h"
++#include "stdio-util.h"
+ #include "time-util.h"
+ #include "util.h"
+
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/elogind.git/commitdiff/8cfb8cee46f89732174e755a3037644abc97f7d5
More information about the pld-cvs-commit
mailing list