Update to 0.1.8

This commit is contained in:
Wim Taymans 2018-01-23 16:14:10 +01:00
parent 1e66bcf252
commit e447e18a11
4 changed files with 7 additions and 140 deletions

1
.gitignore vendored
View File

@ -3,3 +3,4 @@
/pipewire-0.1.5.tar.gz
/pipewire-0.1.6.tar.gz
/pipewire-0.1.7.tar.gz
/pipewire-0.1.8.tar.gz

View File

@ -1,135 +0,0 @@
From 41ef42b09fe397dd5d317f3022df48c644887cd1 Mon Sep 17 00:00:00 2001
From: Wim Taymans <wtaymans@redhat.com>
Date: Fri, 24 Nov 2017 17:23:40 +0100
Subject: [PATCH] Only define memfd_create when not already defined
---
config.h.meson | 1 +
meson.build | 4 +++
src/pipewire/mem.c | 4 +++
src/pipewire/memfd-wrappers.h | 60 -------------------------------------------
4 files changed, 9 insertions(+), 60 deletions(-)
delete mode 100644 src/pipewire/memfd-wrappers.h
diff --git a/config.h.meson b/config.h.meson
index 0d5add7..e0ff4f6 100644
--- a/config.h.meson
+++ b/config.h.meson
@@ -445,3 +445,4 @@
#mesondefine HAVE_ALARM
#mesondefine HAVE_DECL_LOCALTIME_R
#mesondefine HAVE_DECL_STRSIGNAL
+#mesondefine HAVE_MEMFD_CREATE
diff --git a/meson.build b/meson.build
index e7e3cf3..6ee6b58 100644
--- a/meson.build
+++ b/meson.build
@@ -117,6 +117,10 @@ if cc.has_function('mkstemp', prefix : '#include <stdlib.h>')
cdata.set('HAVE_MKSTEMP', 1)
endif
+if cc.has_function('memfd_create', prefix : '#include <sys/mman.h>', args : [ '-D_GNU_SOURCE' ])
+ cdata.set('HAVE_MEMFD_CREATE', 1)
+endif
+
configure_file(input : 'config.h.meson',
output : 'config.h',
configuration : cdata)
diff --git a/src/pipewire/mem.c b/src/pipewire/mem.c
index dcd1fe4..4e17c3a 100644
--- a/src/pipewire/mem.c
+++ b/src/pipewire/mem.c
@@ -21,6 +21,8 @@
#define _GNU_SOURCE
#endif
+#include "config.h"
+
#include <string.h>
#include <stddef.h>
#include <stdio.h>
@@ -34,6 +36,7 @@
#include <pipewire/log.h>
#include <pipewire/mem.h>
+#ifndef HAVE_MEMFD_CREATE
/*
* No glibc wrappers exist for memfd_create(2), so provide our own.
*
@@ -46,6 +49,7 @@ static inline int memfd_create(const char *name, unsigned int flags)
{
return syscall(SYS_memfd_create, name, flags);
}
+#endif
/* memfd_create(2) flags */
diff --git a/src/pipewire/memfd-wrappers.h b/src/pipewire/memfd-wrappers.h
deleted file mode 100644
index 05958fe..0000000
--- a/src/pipewire/memfd-wrappers.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/* PipeWire
- * Copyright (C) 2016 Wim Taymans <wim.taymans@gmail.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#include <sys/syscall.h>
-#include <fcntl.h>
-
-/*
- * No glibc wrappers exist for memfd_create(2), so provide our own.
- *
- * Also define memfd fcntl sealing macros. While they are already
- * defined in the kernel header file <linux/fcntl.h>, that file as
- * a whole conflicts with the original glibc header <fnctl.h>.
- */
-
-static inline int
-memfd_create(const char *name, unsigned int flags) {
- return syscall(SYS_memfd_create, name, flags);
-}
-
-/* memfd_create(2) flags */
-
-#ifndef MFD_CLOEXEC
-#define MFD_CLOEXEC 0x0001U
-#endif
-
-#ifndef MFD_ALLOW_SEALING
-#define MFD_ALLOW_SEALING 0x0002U
-#endif
-
-/* fcntl() seals-related flags */
-
-#ifndef F_LINUX_SPECIFIC_BASE
-#define F_LINUX_SPECIFIC_BASE 1024
-#endif
-
-#ifndef F_ADD_SEALS
-#define F_ADD_SEALS (F_LINUX_SPECIFIC_BASE + 9)
-#define F_GET_SEALS (F_LINUX_SPECIFIC_BASE + 10)
-
-#define F_SEAL_SEAL 0x0001 /* prevent further seals from being set */
-#define F_SEAL_SHRINK 0x0002 /* prevent file from shrinking */
-#define F_SEAL_GROW 0x0004 /* prevent file from growing */
-#define F_SEAL_WRITE 0x0008 /* prevent writes */
-#endif
--
2.14.3

View File

@ -13,7 +13,7 @@
Name: pipewire
Summary: Media Sharing Server
Version: 0.1.7
Version: 0.1.8
Release: 1%{?snap:.%{snap}git%{shortcommit}}%{?dist}
License: LGPLv2+
URL: https://pipewire.org/
@ -26,7 +26,6 @@ Source0: http://freedesktop.org/software/pipewire/releases/pipewire-%{ver
%endif
## upstream patches
Patch1: 0001-Only-define-memfd_create-when-not-already-defined.patch
## upstreamable patches
@ -48,6 +47,7 @@ BuildRequires: libv4l-devel
BuildRequires: doxygen
BuildRequires: xmltoman
BuildRequires: graphviz
BuildRequires: sbc-devel
Requires(pre): shadow-utils
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
@ -98,8 +98,6 @@ This package contains command line utilities for the PipeWire media server.
%prep
%setup -q -T -b0 -n %{name}-%{version}%{?gitrel:-%{gitrel}-g%{shortcommit}}
%patch1 -p1 -b .0001
%build
%meson -D enable_docs=true -D enable_man=true -D enable_gstreamer=true
%meson_build
@ -160,6 +158,9 @@ exit 0
%{_bindir}/spa-inspect
%changelog
* Tue Jan 23 2018 Wim Taymans <wtaymans@redhat.com> - 0.1.8-1
- Update to 0.1.8
* Fri Nov 24 2017 Wim Taymans <wtaymans@redhat.com> - 0.1.7-1
- Update to 0.1.7
- Add to build when memfd_create is already defined

View File

@ -1 +1 @@
SHA512 (pipewire-0.1.7.tar.gz) = e1457c0e1f0493575a358e069a4325f2b2032da0ef053e45ff8aa0437b503bd11a097be4e9bd3817262ec447a43322574c93a718eccc698364680bf16890dc23
SHA512 (pipewire-0.1.8.tar.gz) = 8a1e0f854e0a09536d9e881cd8ef654897ffdbf2d9cb5c25a60ea420eaf76bfa3c4c71cf8c85751b4dce7e09370f0da44626be55e1dccea8df55e1e4ed5f86da