SHA256
1
0
forked from pool/gjs

Accepting request 136672 from GNOME:Factory

Pushing GNOME:Factory towards openSUSE:Factory

OBS-URL: https://build.opensuse.org/request/show/136672
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/gjs?expand=0&rev=40
This commit is contained in:
Stephan Kulow 2012-10-03 06:47:13 +00:00 committed by Git OBS Bridge
commit ffb565258e
5 changed files with 91 additions and 123 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:b9f1dc156c15806824c936bb08ddc5048f52f6921654146c47025a62457108c0
size 464372

3
gjs-1.34.0.tar.xz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:3d62c717a0522a36c6faa1eb021872255e3cd285a72786afe23b7cca2e3084cb
size 474004

View File

@ -1,105 +0,0 @@
From 457a90fecc74c0a36da1b9252c9f9028932f42a0 Mon Sep 17 00:00:00 2001
From: Giovanni Campagna <gcampagna@src.gnome.org>
Date: Tue, 7 Feb 2012 15:36:26 +0100
Subject: [PATCH] system: add getpid(), getuid(), getgid()
These functions are useful sometimes (for example when building
a PolkitSubject), and have no equivalent in GLib, therefore it's
appropriate to place them in the system module.
https://bugzilla.gnome.org/show_bug.cgi?id=646187
---
modules/system.c | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 64 insertions(+)
diff --git a/modules/system.c b/modules/system.c
index ea8a9a8..c7c5b5c 100644
--- a/modules/system.c
+++ b/modules/system.c
@@ -24,6 +24,9 @@
#include <config.h>
+#include <sys/types.h>
+#include <unistd.h>
+
#include <gjs/gjs-module.h>
#include <jsapi.h>
@@ -75,6 +78,49 @@ gjs_gc(JSContext *context,
JS_GC(context);
return JS_TRUE;
}
+
+static JSBool
+gjs_getpid(JSContext *context,
+ uintN argc,
+ jsval *vp)
+{
+ jsval *argv = JS_ARGV(cx, vp);
+ jsval rval;
+ if (!gjs_parse_args(context, "getpid", "", argc, argv))
+ return JS_FALSE;
+ rval = INT_TO_JSVAL(getpid());
+ JS_SET_RVAL(context, vp, rval);
+ return JS_TRUE;
+}
+
+static JSBool
+gjs_getuid(JSContext *context,
+ uintN argc,
+ jsval *vp)
+{
+ jsval *argv = JS_ARGV(cx, vp);
+ jsval rval;
+ if (!gjs_parse_args(context, "getuid", "", argc, argv))
+ return JS_FALSE;
+ rval = INT_TO_JSVAL(getuid());
+ JS_SET_RVAL(context, vp, rval);
+ return JS_TRUE;
+}
+
+static JSBool
+gjs_getgid(JSContext *context,
+ uintN argc,
+ jsval *vp)
+{
+ jsval *argv = JS_ARGV(cx, vp);
+ jsval rval;
+ if (!gjs_parse_args(context, "getgid", "", argc, argv))
+ return JS_FALSE;
+ rval = INT_TO_JSVAL(getgid());
+ JS_SET_RVAL(context, vp, rval);
+ return JS_TRUE;
+}
+
JSBool
gjs_js_define_system_stuff(JSContext *context,
JSObject *module)
@@ -97,6 +143,24 @@ gjs_js_define_system_stuff(JSContext *context,
0, GJS_MODULE_PROP_FLAGS))
return JS_FALSE;
+ if (!JS_DefineFunction(context, module,
+ "getpid",
+ (JSNative) gjs_getpid,
+ 0, GJS_MODULE_PROP_FLAGS))
+ return FALSE;
+
+ if (!JS_DefineFunction(context, module,
+ "getuid",
+ (JSNative) gjs_getuid,
+ 0, GJS_MODULE_PROP_FLAGS))
+ return FALSE;
+
+ if (!JS_DefineFunction(context, module,
+ "getgid",
+ (JSNative) gjs_getgid,
+ 0, GJS_MODULE_PROP_FLAGS))
+ return FALSE;
+
return JS_TRUE;
}
--
1.7.10

View File

@ -1,3 +1,77 @@
-------------------------------------------------------------------
Mon Sep 24 18:54:41 UTC 2012 - dimstar@opensuse.org
- Update to version 1.34.0:
+ stack: Fix gjs_dumpstack (bgo#683992).
-------------------------------------------------------------------
Tue Sep 18 21:03:52 UTC 2012 - dimstar@opensuse.org
- Update to version 1.33.14:
+ Bugs fixed: bgo#684064.
- Add pkgconfig(libffi) BuildRequires: since gjs uses ffi
functions, confiure now checks for libffi presence.
-------------------------------------------------------------------
Tue Sep 4 19:08:07 UTC 2012 - dimstar@opensuse.org
- Update to version 1.33.10:
+ Throw an exception when registering a GType that already exists
+ Object: don't access priv->info if it's NULL
+ Misc bug fixes.
- Drop gjs-avoid_crash.patch: fixed upstream.
-------------------------------------------------------------------
Mon Aug 27 18:13:21 UTC 2012 - dimstar@opensuse.org
- Add gjs-avoid_crash.patch: Fix crashes in gnome-shell.
-------------------------------------------------------------------
Mon Aug 20 17:12:32 UTC 2012 - dimstar@opensuse.org
- Update to version 1.33.9:
+ Several changes in the GC system.
+ Fix memory leaks.
+ Fix compiler warnings.
-------------------------------------------------------------------
Tue Jul 17 20:16:59 UTC 2012 - dimstar@opensuse.org
- Update to version 1.33.4:
+ Build: link everything to gio
+ Fix memory leaks
+ Fix various bugs and issues caught by the Clang static
analyzer.
-------------------------------------------------------------------
Tue Jun 29 17:39:10 UTC 2012 - dimstar@opensuse.org
- Update to version 1.33.3:
+ Introduce special marshalling for GErrors
+ Gio: Split GDBus implementation into helpers
+ Gio: modernize DBus bindings
+ Trace signal closures from the gobject instead of the context
keep-alive.
-------------------------------------------------------------------
Fri Jun 29 11:04:30 UTC 2012 - dimstar@opensuse.org
- Update to version 1.33.2:
+ gi: Improve error message when we get a non-function for a
callback
+ Fold libgjs-gdbus.so into libgjs.so
+ GDBus: fix NotImplementedError message
+ system: add getpid(), getuid(), getgid()
+ Handle arrays of filenames
+ Rename GjsDBus to GjsPrivate
+ Import a new "format" module
+ Add argument names to our function's toString
+ Support Function.prototype.length
+ Fix various memory leaks.
- Rename typelib-1_0-GjsDBus-1_0 subpackage to
typelib-1_0-GjsPrivate-1_0, following upstream change.
- Drop gjs-getpid_uid_gid.patch: fixed upstream.
-------------------------------------------------------------------
Thu Jun 28 21:14:51 UTC 2012 - dimstar@opensuse.org

View File

@ -17,24 +17,23 @@
Name: gjs
Version: 1.32.0
Version: 1.34.0
Release: 0
# FIXME: find out if tapsets should really be in devel package or in main package
Summary: JavaScript bindings based on gobject-introspection and Mozilla
License: MIT
Group: Development/Libraries/GNOME
Url: http://live.gnome.org/Gjs
Source: http://download.gnome.org/sources/gjs/1.32/%{name}-%{version}.tar.xz
# PATCH-FIX-UPSTREAM gjs-getpid_uid_gid.patch bnc#751211 bgo#646187 dimstar@opensuse.org -- Add getpid(), getuid() getgid(), taken from upstream git.
Patch0: gjs-getpid_uid_gid.patch
Source: http://download.gnome.org/sources/gjs/1.34/%{name}-%{version}.tar.xz
BuildRequires: gcc-c++
BuildRequires: python
BuildRequires: readline-devel
BuildRequires: systemtap-sdt-devel
BuildRequires: pkgconfig(cairo)
BuildRequires: pkgconfig(dbus-glib-1)
BuildRequires: pkgconfig(glib-2.0) >= 2.31.0
BuildRequires: pkgconfig(gobject-introspection-1.0) >= 1.31.22
BuildRequires: pkgconfig(glib-2.0) >= 2.32.0
BuildRequires: pkgconfig(gobject-introspection-1.0) >= 1.33.10
BuildRequires: pkgconfig(libffi)
BuildRequires: pkgconfig(mozjs185)
Requires: libgjs0 = %{version}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@ -45,7 +44,7 @@ Mozilla SpiderMonkey JavaScript engine.
%package -n libgjs0
Summary: JavaScript bindings based on gobject-introspection and Mozilla
Group: Development/Libraries/GNOME
Group: System/Libraries
Provides: libgjs-0 = %{version}
Obsoletes: libgjs-0 < %{version}
@ -53,11 +52,11 @@ Obsoletes: libgjs-0 < %{version}
This module contains JavaScript bindings based on gobject-introspection and the
Mozilla SpiderMonkey JavaScript engine.
%package -n typelib-1_0-GjsDBus-1_0
%package -n typelib-1_0-GjsPrivate-1_0
Summary: GJS DBus utility library -- Introspection bindings
Group: Development/Libraries/GNOME
Group: System/Libraries
%description -n typelib-1_0-GjsDBus-1_0
%description -n typelib-1_0-GjsPrivate-1_0
This module contains JavaScript bindings based on gobject-introspection and the
Mozilla SpiderMonkey JavaScript engine.
@ -65,7 +64,7 @@ Mozilla SpiderMonkey JavaScript engine.
Summary: JavaScript bindings based on gobject-introspection and Mozilla
Group: Development/Libraries/GNOME
Requires: libgjs0 = %{version}
Requires: typelib-1_0-GjsDBus-1_0
Requires: typelib-1_0-GjsPrivate-1_0 = %{version}
# Just a helper provides
Provides: gjs-devel = %{version}
@ -75,7 +74,6 @@ Mozilla SpiderMonkey JavaScript engine.
%prep
%setup -q
%patch0 -p1
%build
%configure \
@ -108,16 +106,17 @@ rm -rf %{buildroot}
%{_libdir}/*.so.*
%{_libdir}/gjs-1.0/
%files -n typelib-1_0-GjsDBus-1_0
%files -n typelib-1_0-GjsPrivate-1_0
%defattr(-,root,root)
%{_libdir}/girepository-1.0/GjsDBus-1.0.typelib
%dir %{_libdir}/gjs
%dir %{_libdir}/gjs/girepository-1.0/
%{_libdir}/gjs/girepository-1.0/GjsPrivate-1.0.typelib
%files -n libgjs-devel
%defattr(-,root,root)
%{_includedir}/*
%{_libdir}/*.so
%{_libdir}/pkgconfig/*.pc
%{_datadir}/gir-1.0/GjsDBus-1.0.gir
%{_datadir}/systemtap/tapset/*.stp
%changelog