Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to stable-0.62 grimoire by Vlad Glagolev (a54e070880718870ba7c34db2a085dec2f57c35a)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Vlad Glagolev <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to stable-0.62 grimoire by Vlad Glagolev (a54e070880718870ba7c34db2a085dec2f57c35a)
  • Date: Thu, 24 Dec 2015 07:44:51 +0000

GIT changes to stable-0.62 grimoire by Vlad Glagolev <stealth AT sourcemage.org>:

utils/ulimits/BUILD | 3
utils/ulimits/CONFIGURE | 16 ++++
utils/ulimits/DETAILS | 7 +
utils/ulimits/E25FBABB.gpg |binary
utils/ulimits/HISTORY | 14 +++
utils/ulimits/PRE_BUILD | 4 -
utils/ulimits/ulimits.patch | 157
--------------------------------------------
7 files changed, 38 insertions(+), 163 deletions(-)

New commits:
commit a54e070880718870ba7c34db2a085dec2f57c35a
Author: Vlad Glagolev <stealth AT sourcemage.org>
Commit: Vlad Glagolev <stealth AT sourcemage.org>

ulimits: fixed a typo in HISTORY

(cherry picked from commit d39daaa1b742ed8f2dc8d1314390c4498c3a8a67)

commit 6c03e65530fa29e8330042ab439baebcf5db7fa8
Author: Vlad Glagolev <stealth AT sourcemage.org>
Commit: Vlad Glagolev <stealth AT sourcemage.org>

ulimits: => 0.3.2

(cherry picked from commit 6f3b128a5b4136e5eee18ce816af7b22ed8f3342)

commit 1320531db9f4b9910d31e79de4005c41f7306ffd
Author: Vlad Glagolev <stealth AT sourcemage.org>
Commit: Vlad Glagolev <stealth AT sourcemage.org>

ulimits: => 0.3.1

(cherry picked from commit d3bb6183074fd98624b0ba922f70653003605a99)

diff --git a/utils/ulimits/BUILD b/utils/ulimits/BUILD
new file mode 100755
index 0000000..ea61742
--- /dev/null
+++ b/utils/ulimits/BUILD
@@ -0,0 +1,3 @@
+OPTS="$ULIMITS_OPTS $OPTS" &&
+
+default_build
diff --git a/utils/ulimits/CONFIGURE b/utils/ulimits/CONFIGURE
new file mode 100755
index 0000000..ffcb5a7
--- /dev/null
+++ b/utils/ulimits/CONFIGURE
@@ -0,0 +1,16 @@
+# deprecate ulimits patch
+if [[ -n $ULIMITS_PATCH ]]; then
+ persistent_add ULIMITS_OPTS &&
+
+ if [[ $ULIMITS_PATCH == y ]]; then
+ list_add ULIMITS_OPTS '--enable-merged-limits'
+ else
+ list_add ULIMITS_OPTS '--disable-merged-limits'
+ fi &&
+
+ persistent_remove ULIMITS_PATCH
+fi &&
+
+config_query_option ULIMITS_OPTS "Enable ability to merge all limits strings
matching the user?" n \
+ "--enable-merged-limits" \
+ "--disable-merged-limits"
diff --git a/utils/ulimits/DETAILS b/utils/ulimits/DETAILS
index 4446c90..d9821c4 100755
--- a/utils/ulimits/DETAILS
+++ b/utils/ulimits/DETAILS
@@ -1,9 +1,12 @@
SPELL=ulimits
- VERSION=0.3.0
+ VERSION=0.3.2
BRANCH=`echo $VERSION|cut -d . -f 1,2`
SOURCE=$SPELL-$VERSION.tar.gz
+ SOURCE2=$SOURCE.sig
SOURCE_URL[0]=http://www.incenp.org/files/softs/$SPELL/$BRANCH/$SOURCE
-
SOURCE_HASH=sha512:1e355f3701e6ebb983a3b6ee391c0218946e3b9036e13cd1f93a10d4d4a0e6bb81a76cb576f3eeb842eabf21ffe998db661b45168710cb6d4882e4679567194c
+ SOURCE2_URL[0]=${SOURCE_URL[0]}.sig
+ SOURCE_GPG=E25FBABB.gpg:$SOURCE2:UPSTREAM_KEY
+ SOURCE2_IGNORE=signature
SOURCE_DIRECTORY="$BUILD_DIRECTORY/$SPELL-$VERSION"
WEB_SITE=http://www.incenp.org/dvlpt/ulimits.html
LICENSE[0]=GPL
diff --git a/utils/ulimits/E25FBABB.gpg b/utils/ulimits/E25FBABB.gpg
new file mode 100644
index 0000000..c1858ce
Binary files /dev/null and b/utils/ulimits/E25FBABB.gpg differ
diff --git a/utils/ulimits/HISTORY b/utils/ulimits/HISTORY
index 1144f35..1605452 100644
--- a/utils/ulimits/HISTORY
+++ b/utils/ulimits/HISTORY
@@ -1,2 +1,16 @@
+2015-03-03 Vlad Glagolev <stealth AT sourcemage.org>
+ * DETAILS: updated spell to 0.3.2
+ * CONFIGURE: deprecate ULIMITS_PATCH in favour of new configure flags
+ * BUILD: use ULIMITS_OPTS
+ * PRE_BUILD, ulimits.patch: dropped, fixed by upstream
+
+2015-03-02 Vlad Glagolev <stealth AT sourcemage.org>
+ * DETAILS: upddated spell to 0.3.1; converted to gpg signature
checking
+ * E25FBABB.gpg: added, E25FBABB public key (Damien Goutte-Gattat
+ <dgouttegattat AT incenp.org>) imported
+ * CONFIGURE: added, to optionally apply the patch
+ * PRE_BUILD: use ULIMITS_PATCH variable
+ * ulimits.patch: updated for new version
+
2014-10-02 Vlad Glagolev <stealth AT sourcemage.org>
* DETAILS, PRE_BUILD, ulimits.patch: spell created, version 0.3.0
diff --git a/utils/ulimits/PRE_BUILD b/utils/ulimits/PRE_BUILD
deleted file mode 100755
index 896ac92..0000000
--- a/utils/ulimits/PRE_BUILD
+++ /dev/null
@@ -1,4 +0,0 @@
-default_pre_build &&
-cd "$SOURCE_DIRECTORY" &&
-
-patch -p0 < "$SPELL_DIRECTORY/ulimits.patch"
diff --git a/utils/ulimits/ulimits.patch b/utils/ulimits/ulimits.patch
deleted file mode 100644
index 8116518..0000000
--- a/utils/ulimits/ulimits.patch
+++ /dev/null
@@ -1,157 +0,0 @@
-# Author: Vlad Glagolev <stealth AT sourcemage.org>
-#
-# Changes in this patch:
-# * groups and comments support
-# * bugfix for not found user or empty file
-# * bugfix for unlimited values
-# * bugfix for tab separators
-
---- src/ulimits.c.orig 2013-01-28 14:39:13.000000000 +0400
-+++ src/ulimits.c 2014-10-02 21:39:49.318495483 +0400
-@@ -29,6 +29,7 @@
-
- #include <unistd.h>
- #include <pwd.h>
-+#include <grp.h>
- #include <sys/stat.h>
- #include <sys/types.h>
- #include <sys/resource.h>
-@@ -95,6 +96,47 @@
- #define PLIMIT_PRIORITY RLIMIT_NLIMITS + 3
-
- /**
-+ * Check if user is in the group
-+ *
-+ * @param uname A pointer to a username
-+ * @param gname A pointer to a groupname
-+ * @return 0 if a user belongs to group, -1 otherwise
-+ */
-+static int user_in_group(const *uname, const char *gname)
-+{
-+ struct group *groupdata;
-+ char *const *list;
-+
-+ if (uname == NULL || gname == NULL) {
-+ return -1;
-+ }
-+
-+ if (*gname == '@') {
-+ gname++;
-+ } else {
-+ return -1;
-+ }
-+
-+ groupdata = getgrnam(gname);
-+
-+ if (groupdata == NULL) {
-+ return -1;
-+ }
-+
-+ list = groupdata->gr_mem;
-+
-+ while (*list != NULL) {
-+ if (strcmp(*list, uname) == 0) {
-+ return 0;
-+ }
-+
-+ list++;
-+ }
-+
-+ return -1;
-+}
-+
-+/**
- * Parses a single limit specification.
- * This function parses a single limit specification (that is, a single
- * letter followed by a numerical value) and fills the provided
-@@ -109,7 +151,7 @@
- parse_limit_value(char **s, struct rlimit_setting *rlimit)
- {
- char *c, *p;
-- int value;
-+ int value, inf;
-
- if ( s == NULL || *s == NULL || rlimit == NULL ) {
- errno = EINVAL;
-@@ -123,7 +165,16 @@
-
- /* Get the numerical value for the limit. */
- errno = 0;
-- value = strtol(c + 1, &p, 10);
-+
-+ /* A single dash means no limits. */
-+ if (*(c+1) == '-') {
-+ p = c+2;
-+ inf = 1;
-+ } else {
-+ value = strtol(c + 1, &p, 10);
-+ inf = 0;
-+ }
-+
- if ( errno || p == c + 1 )
- return -1;
-
-@@ -132,7 +183,7 @@
- #define ULIMIT(symbol, letter, unused1, factor, unused2) \
- case letter: \
- rlimit->resource = symbol; \
-- rlimit->limit = value * factor; \
-+ rlimit->limit = inf == 1 ? RLIM_INFINITY : value * factor; \
- break;
- #include "ulimits.h"
- #undef ULIMIT
-@@ -174,15 +225,6 @@
- while ( *s == ' ' || *s == '\t' )
- s += 1;
-
-- /* A single dash means no limits. */
-- if ( *s == '-' && *(s + 1) == '\0' ) {
-- for ( ; n < RLIMIT_NLIMITS && n < len - 1 ; n++ ) {
-- rlimits[n].resource = n;
-- rlimits[n].limit = RLIM_INFINITY;
-- }
-- s += 1;
-- }
--
- while ( *s != '\0' && n < len - 1 ) {
- if ( parse_limit_value(&s, &(rlimits[n])) < 0 )
- return -1;
-@@ -280,9 +322,11 @@
- while ( ! found && ! feof(f) ) {
- c = fgetc(f);
-
-- if ( isgraph(c) && n < len - 1 )
-+ if (c == '#')
-+ discard_line(f);
-+ else if ( isgraph(c) && n < len - 1 )
- buffer[n++] = (char)c;
-- else if ( c == ' ' && n > 0 )
-+ else if ( (c == ' ' || c == '\t') && n > 0 )
- found = 1;
- else {
- n = 0;
-@@ -357,18 +401,21 @@
-
- if ( strcmp(nbuf, "*") == 0 )
- default_found = get_line(f, lbuf, sizeof(lbuf)) != -1;
-- else if ( strcmp(nbuf, user) == 0 )
-+ else if ( strcmp(nbuf, user) == 0 || user_in_group(user, nbuf) == 0
)
- user_found = get_line(f, lbuf, sizeof(lbuf)) != -1;
- else
- discard_line(f);
- }
- fclose(f);
-
-- if ( user_found || default_found )
-+ if ( user_found || default_found ) {
- if ( (n = parse_limit_string(lbuf, rlimits, len)) == -1 )
- errno = EBADMSG;
-
-- return n;
-+ return n;
-+ }
-+
-+ return -1;
- }
-
- static int



  • [SM-Commit] GIT changes to stable-0.62 grimoire by Vlad Glagolev (a54e070880718870ba7c34db2a085dec2f57c35a), Vlad Glagolev, 12/24/2015

Archive powered by MHonArc 2.6.24.

Top of Page