Github messages for voidlinux
 help / color / mirror / Atom feed
From: chili-b <chili-b@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] libcgroup: update to 2.0.2.
Date: Sat, 30 Jul 2022 17:29:56 +0200	[thread overview]
Message-ID: <20220730152956.ArZ6jThIoPYEHBojFSb10avPwni8h6jXLm5x-6fAh6A@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-38357@inbox.vuxu.org>

[-- Attachment #1: Type: text/plain, Size: 1217 bytes --]

There is an updated pull request by chili-b against master on the void-packages repository

https://github.com/chili-b/void-packages libcgroup
https://github.com/void-linux/void-packages/pull/38357

libcgroup: update to 2.0.2.
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES**

<!--
#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->

#### Local build testing
- I built this PR locally for my native architecture, (x86_64-glibc)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - x86_64-musl (crossbuild)


A patch file from https://github.com/void-linux/void-packages/pull/38357.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-libcgroup-38357.patch --]
[-- Type: text/x-diff, Size: 6347 bytes --]

From 3b840f4d3dbd4d7e6d8746bc6eced9b33a244367 Mon Sep 17 00:00:00 2001
From: chili-b <dexter.gaonshatford@gmail.com>
Date: Fri, 29 Jul 2022 12:46:03 -0400
Subject: [PATCH] libcgroup: update to 2.0.2.

---
 common/shlibs                                 |  2 +-
 .../libcgroup/patches/CVE-2018-14348.patch    | 12 ------
 .../patches/api.c-fix-infinite-loop.patch     | 38 -------------------
 srcpkgs/libcgroup/patches/musl-decls.patch    | 22 -----------
 .../libcgroup/patches/musl-strerror_r.patch   | 22 -----------
 srcpkgs/libcgroup/template                    | 23 ++++-------
 6 files changed, 9 insertions(+), 110 deletions(-)
 delete mode 100644 srcpkgs/libcgroup/patches/CVE-2018-14348.patch
 delete mode 100644 srcpkgs/libcgroup/patches/api.c-fix-infinite-loop.patch
 delete mode 100644 srcpkgs/libcgroup/patches/musl-decls.patch
 delete mode 100644 srcpkgs/libcgroup/patches/musl-strerror_r.patch

diff --git a/common/shlibs b/common/shlibs
index 221b8b705452..dbf29ad54ca2 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -963,7 +963,7 @@ libIceDiscovery.so.37 libIce-3.7.5_2
 libIceLocatorDiscovery.so.37 libIce-3.7.5_2
 libvdpau.so.1 libvdpau-0.4.1_1
 libgsm.so.1 libgsm-1.0.13_13
-libcgroup.so.1 libcgroup-0.37.1_1
+libcgroup.so.2 libcgroup-2.0.2_1
 libxdg-basedir.so.1 libxdg-basedir-1.1.1_1
 libev.so.4 libev-4.04_1
 libell.so.0 ell-0.45_1
diff --git a/srcpkgs/libcgroup/patches/CVE-2018-14348.patch b/srcpkgs/libcgroup/patches/CVE-2018-14348.patch
deleted file mode 100644
index bd083c2aad97..000000000000
--- a/srcpkgs/libcgroup/patches/CVE-2018-14348.patch
+++ /dev/null
@@ -1,12 +0,0 @@
---- a/src/daemon/cgrulesengd.c
-+++ b/src/daemon/cgrulesengd.c
-@@ -889,9 +889,6 @@
- 		} else if (pid > 0) {
- 			exit(EXIT_SUCCESS);
- 		}
--
--		/* Change the file mode mask. */
--		umask(0);
- 	} else {
- 		flog(LOG_DEBUG, "Not using daemon mode\n");
- 		pid = getpid();<Paste>
diff --git a/srcpkgs/libcgroup/patches/api.c-fix-infinite-loop.patch b/srcpkgs/libcgroup/patches/api.c-fix-infinite-loop.patch
deleted file mode 100644
index 12ee0eeebc84..000000000000
--- a/srcpkgs/libcgroup/patches/api.c-fix-infinite-loop.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-Date: Tue, 8 Dec 2015 16:53:41 +0100
-Subject: [PATCH] api.c: fix infinite loop
-
-If getgrnam or getpwuid functions failed, the program entered
-an infinite loop, because the rule pointer was never advanced.
-This is now fixed by updating the pointer before continuing
-to the next iteration.
----
- src/api.c | 8 ++++++--
- 1 file changed, 6 insertions(+), 2 deletions(-)
-
-diff --git a/src/api.c b/src/api.c
-index d6c9d3a..ef796ac 100644
---- a/src/api.c
-+++ b/src/api.c
-@@ -2775,13 +2775,17 @@ static struct cgroup_rule *cgroup_find_matching_rule_uid_gid(uid_t uid,
- 			/* Get the group data. */
- 			sp = &(rule->username[1]);
- 			grp = getgrnam(sp);
--			if (!grp)
-+			if (!grp) {
-+				rule = rule->next;
- 				continue;
-+			}
- 
- 			/* Get the data for UID. */
- 			usr = getpwuid(uid);
--			if (!usr)
-+			if (!usr) {
-+				rule = rule->next;
- 				continue;
-+			}
- 
- 			/* If UID is a member of group, we matched. */
- 			for (i = 0; grp->gr_mem[i]; i++) {
--- 
-2.10.2
-
diff --git a/srcpkgs/libcgroup/patches/musl-decls.patch b/srcpkgs/libcgroup/patches/musl-decls.patch
deleted file mode 100644
index eacf4e618d93..000000000000
--- a/srcpkgs/libcgroup/patches/musl-decls.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-In musl libc these macros are defined in the deprecated
-include file sys/cdefs.h
-
---- a/include/libcgroup.h	2014-01-13 15:05:56.000000000 +0100
-+++ b/include/libcgroup.h	2015-10-25 14:03:32.921207668 +0100
-@@ -16,6 +16,16 @@
- #ifndef _LIBCGROUP_H
- #define _LIBCGROUP_H
-
-+#if !defined(__GLIBC__)
-+#ifdef  __cplusplus
-+# define __BEGIN_DECLS	extern "C" {
-+# define __END_DECLS	}
-+#else
-+# define __BEGIN_DECLS
-+# define __END_DECLS
-+#endif
-+#endif /* !defined(__GLIBC__) */
-+
- #define _LIBCGROUP_H_INSIDE
- 
- #include <libcgroup/error.h>
diff --git a/srcpkgs/libcgroup/patches/musl-strerror_r.patch b/srcpkgs/libcgroup/patches/musl-strerror_r.patch
deleted file mode 100644
index 0f54e12b05d2..000000000000
--- a/srcpkgs/libcgroup/patches/musl-strerror_r.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-The musl libc strerror_r(3) semantics are different from
-GNU libc's if _GNU_SOURCE is defined.
-
---- a/src/api.c	2014-01-13 15:05:56.000000000 +0100
-+++ b/src/api.c	2015-10-25 14:09:18.690232596 +0100
-@@ -3332,8 +3332,16 @@
- 
- const char *cgroup_strerror(int code)
- {
-+#if defined(__GLIBC__)
- 	if (code == ECGOTHER)
- 		return strerror_r(cgroup_get_last_errno(), errtext, MAXLEN);
-+#else
-+	if (code == ECGOTHER) {
-+		if (0 == strerror_r(cgroup_get_last_errno(), errtext, MAXLEN))
-+			return errtext;
-+		return "strerror_r() failed";
-+	}
-+#endif
- 
- 	return cgroup_strerror_codes[code % ECGROUPNOTCOMPILED];
- }
diff --git a/srcpkgs/libcgroup/template b/srcpkgs/libcgroup/template
index c9c19120e597..e920e6fd6c6f 100644
--- a/srcpkgs/libcgroup/template
+++ b/srcpkgs/libcgroup/template
@@ -1,17 +1,18 @@
 # Template file for 'libcgroup'
 pkgname=libcgroup
-version=0.41
-revision=8
+version=2.0.2
+revision=1
 build_style=gnu-configure
 configure_args="--sbindir=/usr/bin --enable-pam-module-dir=/usr/lib/security"
-hostmakedepends="flex automake libtool"
+hostmakedepends="flex"
 makedepends="pam-devel"
 short_desc="Library that abstracts the control group file system in Linux"
 maintainer="Orphaned <orphan@voidlinux.org>"
-license="LGPL-2.1"
-homepage="http://libcg.sourceforge.net"
-distfiles="${SOURCEFORGE_SITE}/libcg/${pkgname}-${version}.tar.bz2"
-checksum=e4e38bdc7ef70645ce33740ddcca051248d56b53283c0dc6d404e17706f6fb51
+make_dirs="/etc/cgconfig.d 0755 root root"
+license="LGPL-2.1-only"
+homepage="https://github.com/libcgroup/libcgroup"
+distfiles="https://github.com/libcgroup/libcgroup/releases/download/v${version}/libcgroup-${version}.tar.gz"
+checksum=8ef63b32e0aff619547dbb8a25e1f6bab152d7c4864795cf915571a5994d0cf8
 
 case "$XBPS_TARGET_MACHINE" in
 	*-musl)	# Add musl-fts implementation
@@ -20,14 +21,6 @@ case "$XBPS_TARGET_MACHINE" in
 		;;
 esac
 
-pre_configure() {
-	autoreconf -if
-}
-post_configure() {
-	# Disable tests
-	sed -i Makefile -e "/SUBDIRS =/ s; tests;;"
-}
-
 libcgroup-utils_package() {
 	short_desc+=" - utilities"
 	conf_files="/etc/cgrules.conf /etc/cgconfig.conf"

  parent reply	other threads:[~2022-07-30 15:29 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-29 19:33 [PR PATCH] " chili-b
2022-07-30 15:20 ` [PR REVIEW] " paper42
2022-07-30 15:20 ` paper42
2022-07-30 15:22 ` chili-b
2022-07-30 15:23 ` [PR PATCH] [Updated] " chili-b
2022-07-30 15:23 ` [PR REVIEW] " chili-b
2022-07-30 15:25 ` paper42
2022-07-30 15:29 ` chili-b [this message]
2022-07-30 15:30 ` chili-b
2022-07-30 16:22 ` [PR PATCH] [Updated] " chili-b
2022-08-01 16:59 ` [PR PATCH] [Merged]: " classabbyamp

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220730152956.ArZ6jThIoPYEHBojFSb10avPwni8h6jXLm5x-6fAh6A@z \
    --to=chili-b@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).