Import Debian changes 0.41-ok1

libcgroup (0.41-ok1) yangtze; urgency=medium

  * Build for openKylin.
This commit is contained in:
openKylinBot 2022-04-25 22:03:04 +08:00 committed by Lu zhiping
parent 99c45c3924
commit d510ea5c1f
26 changed files with 1782 additions and 0 deletions

12
debian/cgroup-tools.NEWS vendored Normal file
View File

@ -0,0 +1,12 @@
libcgroup (0.38-1) unstable; urgency=low
This version sees the removal of both initscripts cgconfig and cgred from
the cgroup-bin package. This means that cgroups will not be mounted by
default and no classification will occur during boot. There are numerous
issues surrounding the boot-time classification including race conditions
and collisions with lxc and libvirt.
I may replace support for mounting available cgroups at boot time as time
allows. This version provides a stable point from which to move forward.
-- Jon Bernard <jbernard@debian.org> Mon, 18 Jun 2012 21:29:29 -0400

1
debian/cgroup-tools.TODO vendored Normal file
View File

@ -0,0 +1 @@
* come up with an failsafe, upgrade-proof and admin friendly initscript.

9
debian/cgroup-tools.bug-script vendored Normal file
View File

@ -0,0 +1,9 @@
#!/bin/sh
if [ -e /proc/cmdline ]
then
# see if user has or has not certain controller related kernel parameters
echo "/proc/cmdline: $(cat /proc/cmdline)"
fi
exit 0

1
debian/cgroup-tools.docs vendored Normal file
View File

@ -0,0 +1 @@
README*

8
debian/cgroup-tools.examples vendored Normal file
View File

@ -0,0 +1,8 @@
samples/cgconfig.conf
samples/cgconfig.sysconfig
samples/cgred.conf
samples/cgrules.conf
samples/cgsnapshot_blacklist.conf
scripts/init.d/cgconfig
scripts/init.d/cgred

3
debian/cgroup-tools.install vendored Normal file
View File

@ -0,0 +1,3 @@
usr/bin
usr/sbin
usr/share/man

5
debian/changelog vendored Normal file
View File

@ -0,0 +1,5 @@
libcgroup (0.41-ok1) yangtze; urgency=medium
* Build for openKylin.
-- openKylinBot <openKylinBot@openkylin.com> Mon, 25 Apr 2022 22:03:04 +0800

86
debian/control vendored Normal file
View File

@ -0,0 +1,86 @@
Source: libcgroup
Priority: optional
Section: libs
Maintainer: Debian QA Group <packages@qa.debian.org>
Build-Depends:
debhelper-compat (= 12),
bison,
flex,
libpam-dev,
Rules-Requires-Root: no
Standards-Version: 4.3.0
Homepage: http://libcg.sourceforge.net/
Vcs-Git: https://salsa.debian.org/debian/libcgroup.git
Vcs-Browser: https://salsa.debian.org/debian/libcgroup
Package: cgroup-tools
Section: admin
Architecture: linux-any
Multi-Arch: foreign
Depends:
${misc:Depends},
${shlibs:Depends},
Breaks: cgroup-bin (<< 0.40~rc1-0)
Replaces: cgroup-bin (<< 0.40~rc1-0)
Description: control and monitor control groups (tools)
Control Groups (cgroups) provide a mechanism for aggregating/partitioning sets
of tasks, and all their future children, into hierarchical groups with
specialized behaviour.
.
libcgroup allows one to manipulate, control, administrate and monitor cgroups
and the associated controllers.
.
This package contains the command-line tools.
Package: libcgroup1
Architecture: linux-any
Multi-Arch: same
Pre-Depends: ${misc:Pre-Depends}
Depends:
${misc:Depends},
${shlibs:Depends},
Description: control and monitor control groups (library)
Control Groups (cgroups) provide a mechanism for aggregating/partitioning sets
of tasks, and all their future children, into hierarchical groups with
specialized behaviour.
.
libcgroup allows one to manipulate, control, administrate and monitor cgroups
and the associated controllers.
.
This package contains the shared library.
Package: libcgroup-dev
Section: libdevel
Architecture: linux-any
Multi-Arch: same
Depends:
${misc:Depends},
libcgroup1 (= ${binary:Version}),
Description: control and monitor control groups (development)
Control Groups (cgroups) provide a mechanism for aggregating/partitioning sets
of tasks, and all their future children, into hierarchical groups with
specialized behaviour.
.
libcgroup allows one to manipulate, control, administrate and monitor cgroups
and the associated controllers.
.
This package contains the development files.
Package: libpam-cgroup
Section: admin
Architecture: linux-any
Multi-Arch: same
Depends:
${misc:Depends},
${shlibs:Depends},
Description: control and monitor control groups (PAM)
Control Groups (cgroups) provide a mechanism for aggregating/partitioning sets
of tasks, and all their future children, into hierarchical groups with
specialized behaviour.
.
libcgroup allows one to manipulate, control, administrate and monitor cgroups
and the associated controllers.
.
This package contains the PAM module to move a user session into an existing
cgroup by attempting to match uid and gid against the defined cgroup rules
configuration.

95
debian/copyright vendored Normal file
View File

@ -0,0 +1,95 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: libcg
Upstream-Contact: libcg-devel@lists.sourceforge.net
Source: https://sourceforge.net/projects/libcg/files/
Files: *
Copyright: 2007-2009 IBM Corporation
Copyright (C) 2008-2009 RedHat Inc.
License: LGPL-2.1
Files: src/pam/pam_cgroup.c
Copyright: 1996-1997 Cristian Gafton <gafton@redhat.com>
2008 Vivek Goyal <vgoyal@redhat.com>
License: BSD-3-clause or GPL-2, and LGPL-2.1
Files: debian/*
Copyright: 2009 Jon Bernard <jbernard@debian.org>
2013-2014 Daniel Baumann <mail@daniel-baumann.ch>
2014-2016, Christian Kastner <ckk@debian.org>
License: GPL-3
License: BSD-3-clause
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
.
1. Redistributions of source code must retain the above copyright
notice, and the entire permission notice in its entirety,
including the disclaimer of warranties.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. The name of the author may not be used to endorse or promote
products derived from this software without specific prior
written permission.
.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
OF THE POSSIBILITY OF SUCH DAMAGE.
License: GPL-2
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, version 2 of the License.
.
This program 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 General Public License for more details.
.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
.
The complete text of the GNU General Public License
can be found in /usr/share/common-licenses/GPL-2 file.
License: GPL-3
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, version 3 of the License.
.
This program 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 General Public License for more details.
.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
.
The complete text of the GNU General Public License
can be found in /usr/share/common-licenses/GPL-3 file.
License: LGPL-2.1
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation.
.
This program 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 Lesser General Public License for more details.
.
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
.
The complete text of the GNU Lesser General Public License
can be found in /usr/share/common-licenses/LGPL-2.1 file.

9
debian/gbp.conf vendored Normal file
View File

@ -0,0 +1,9 @@
[DEFAULT]
pristine-tar = True
[buildpackage]
compression = xz
sign-tags = True
[pq]
patch-numbers = False

3
debian/libcgroup-dev.install vendored Normal file
View File

@ -0,0 +1,3 @@
usr/include
usr/lib/*/*.so
usr/lib/*/pkgconfig

1
debian/libcgroup1.install vendored Normal file
View File

@ -0,0 +1 @@
lib/*/*.so.*

96
debian/libcgroup1.symbols vendored Normal file
View File

@ -0,0 +1,96 @@
libcgroup.so.1 libcgroup1 #MINVER#
CGROUP_0.32.1@CGROUP_0.32.1 0.36.2
CGROUP_0.32@CGROUP_0.32 0.36.2
CGROUP_0.33@CGROUP_0.33 0.36.2
CGROUP_0.34@CGROUP_0.34 0.36.2
CGROUP_0.35@CGROUP_0.35 0.36.2
CGROUP_0.36@CGROUP_0.36 0.37.1
CGROUP_0.37@CGROUP_0.37 0.37.1
CGROUP_0.38@CGROUP_0.38 0.38
CGROUP_0.39@CGROUP_0.39 0.40~rc1
cg_chmod_recursive@CGROUP_0.37 0.37.1
cgroup_add_controller@CGROUP_0.32 0.36.2
cgroup_add_value_bool@CGROUP_0.32 0.36.2
cgroup_add_value_int64@CGROUP_0.32 0.36.2
cgroup_add_value_string@CGROUP_0.32 0.36.2
cgroup_add_value_uint64@CGROUP_0.32 0.36.2
cgroup_attach_task@CGROUP_0.32 0.36.2
cgroup_attach_task_pid@CGROUP_0.32 0.36.2
cgroup_change_all_cgroups@CGROUP_0.39 0.40~rc1
cgroup_change_cgroup_flags@CGROUP_0.34 0.36.2
cgroup_change_cgroup_path@CGROUP_0.32 0.36.2
cgroup_change_cgroup_uid_gid@CGROUP_0.32 0.36.2
cgroup_change_cgroup_uid_gid_flags@CGROUP_0.32 0.36.2
cgroup_compare_cgroup@CGROUP_0.32 0.36.2
cgroup_compare_controllers@CGROUP_0.32 0.36.2
cgroup_config_create_template_group@CGROUP_0.39 0.40~rc1
cgroup_config_load_config@CGROUP_0.32 0.36.2
cgroup_config_set_default@CGROUP_0.38 0.38
cgroup_config_unload_config@CGROUP_0.38 0.38
cgroup_copy_cgroup@CGROUP_0.32 0.36.2
cgroup_create_cgroup@CGROUP_0.32 0.36.2
cgroup_create_cgroup_from_parent@CGROUP_0.32 0.36.2
cgroup_delete_cgroup@CGROUP_0.32 0.36.2
cgroup_delete_cgroup_ext@CGROUP_0.35 0.36.2
cgroup_free@CGROUP_0.32 0.36.2
cgroup_free_controllers@CGROUP_0.32 0.36.2
cgroup_get_all_controller_begin@CGROUP_0.35 0.36.2
cgroup_get_all_controller_end@CGROUP_0.35 0.36.2
cgroup_get_all_controller_next@CGROUP_0.35 0.36.2
cgroup_get_cgroup@CGROUP_0.32 0.36.2
cgroup_get_controller@CGROUP_0.34 0.36.2
cgroup_get_controller_begin@CGROUP_0.34 0.36.2
cgroup_get_controller_end@CGROUP_0.34 0.36.2
cgroup_get_controller_next@CGROUP_0.34 0.36.2
cgroup_get_current_controller_path@CGROUP_0.32 0.36.2
cgroup_get_last_errno@CGROUP_0.33 0.36.2
cgroup_get_procname_from_procfs@CGROUP_0.34 0.36.2
cgroup_get_procs@CGROUP_0.37 0.37.1
cgroup_get_subsys_mount_point@CGROUP_0.34 0.36.2
cgroup_get_subsys_mount_point_begin@CGROUP_0.38 0.38
cgroup_get_subsys_mount_point_end@CGROUP_0.38 0.38
cgroup_get_subsys_mount_point_next@CGROUP_0.38 0.38
cgroup_get_task_begin@CGROUP_0.34 0.36.2
cgroup_get_task_end@CGROUP_0.34 0.36.2
cgroup_get_task_next@CGROUP_0.34 0.36.2
cgroup_get_uid_gid@CGROUP_0.32 0.36.2
cgroup_get_uid_gid_from_procfs@CGROUP_0.34 0.36.2
cgroup_get_value_bool@CGROUP_0.32 0.36.2
cgroup_get_value_int64@CGROUP_0.32 0.36.2
cgroup_get_value_name@CGROUP_0.35 0.36.2
cgroup_get_value_name_count@CGROUP_0.35 0.36.2
cgroup_get_value_string@CGROUP_0.32 0.36.2
cgroup_get_value_uint64@CGROUP_0.32 0.36.2
cgroup_init@CGROUP_0.32 0.36.2
cgroup_init_rules_cache@CGROUP_0.32 0.36.2
cgroup_init_templates_cache@CGROUP_0.39 0.40~rc1
cgroup_log@CGROUP_0.39 0.40~rc1
cgroup_modify_cgroup@CGROUP_0.32 0.36.2
cgroup_new_cgroup@CGROUP_0.32 0.36.2
cgroup_parse_log_level_str@CGROUP_0.39 0.40~rc
cgroup_print_rules_config@CGROUP_0.32 0.36.2
cgroup_read_stats_begin@CGROUP_0.34 0.36.2
cgroup_read_stats_end@CGROUP_0.34 0.36.2
cgroup_read_stats_next@CGROUP_0.34 0.36.2
cgroup_read_value_begin@CGROUP_0.37 0.37.1
cgroup_read_value_end@CGROUP_0.37 0.37.1
cgroup_read_value_next@CGROUP_0.37 0.37.1
cgroup_register_unchanged_process@CGROUP_0.34 0.36.2
cgroup_reload_cached_rules@CGROUP_0.32 0.36.2
cgroup_reload_cached_templates@CGROUP_0.39 0.40~rc1
cgroup_set_default_logger@CGROUP_0.39 0.40~rc1
cgroup_set_logger@CGROUP_0.39 0.40~rc1
cgroup_set_loglevel@CGROUP_0.39 0.40~rc1
cgroup_set_permissions@CGROUP_0.38 0.38
cgroup_set_uid_gid@CGROUP_0.32 0.36.2
cgroup_set_value_bool@CGROUP_0.32 0.36.2
cgroup_set_value_int64@CGROUP_0.32 0.36.2
cgroup_set_value_string@CGROUP_0.32 0.36.2
cgroup_set_value_uint64@CGROUP_0.32 0.36.2
cgroup_strerror@CGROUP_0.32.1 0.36.2
cgroup_unload_cgroups@CGROUP_0.34 0.36.2
cgroup_walk_tree_begin@CGROUP_0.33 0.36.2
cgroup_walk_tree_end@CGROUP_0.33 0.36.2
cgroup_walk_tree_next@CGROUP_0.33 0.36.2
cgroup_walk_tree_set_flags@CGROUP_0.34 0.36.2
create_cgroup_from_name_value_pairs@CGROUP_0.35 0.36.2

1
debian/libpam-cgroup.install vendored Normal file
View File

@ -0,0 +1 @@
lib/*/security/*.so

23
debian/patches/CVE-2018-14348.patch vendored Normal file
View File

@ -0,0 +1,23 @@
From: Markus Koschany <apo@debian.org>
Date: Sun, 19 Aug 2018 23:09:25 +0200
Subject: CVE-2018-14348
Bug-Debian: https://bugs.debian.org/906308
Origin: https://sourceforge.net/p/libcg/libcg/ci/0d88b73d189ea3440ccaab00418d6469f76fa590/
---
src/daemon/cgrulesengd.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/src/daemon/cgrulesengd.c b/src/daemon/cgrulesengd.c
index 367b898..ffd1fc3 100644
--- a/src/daemon/cgrulesengd.c
+++ b/src/daemon/cgrulesengd.c
@@ -886,8 +886,6 @@ int cgre_start_daemon(const char *logp, const int logf,
exit(EXIT_SUCCESS);
}
- /* Change the file mode mask. */
- umask(0);
} else {
flog(LOG_DEBUG, "Not using daemon mode\n");
pid = getpid();

View File

@ -0,0 +1,878 @@
From: Christian Kastner <ckk@debian.org>
Date: Sat, 26 Jul 2014 14:31:39 +0200
Subject: Syntax fixes for man pages
Hyphens used as minus signs must be escaped.
Last-Update: 2015-10-02
---
doc/man/cgclassify.1 | 8 +++---
doc/man/cgclear.1 | 16 ++++++------
doc/man/cgconfig.conf.5 | 66 ++++++++++++++++++++++++------------------------
doc/man/cgconfigparser.8 | 30 +++++++++++-----------
doc/man/cgcreate.1 | 24 +++++++++---------
doc/man/cgdelete.1 | 10 ++++----
doc/man/cgexec.1 | 18 ++++++-------
doc/man/cgget.1 | 30 +++++++++++-----------
doc/man/cgred.conf.5 | 6 ++---
doc/man/cgrulesengd.8 | 32 +++++++++++------------
doc/man/cgset.1 | 8 +++---
doc/man/cgsnapshot.1 | 20 +++++++--------
doc/man/lscgroup.1 | 4 +--
doc/man/lssubsys.1 | 28 ++++++++++----------
14 files changed, 150 insertions(+), 150 deletions(-)
diff --git a/doc/man/cgclassify.1 b/doc/man/cgclassify.1
index db4e086..4a24b31 100644
--- a/doc/man/cgclassify.1
+++ b/doc/man/cgclassify.1
@@ -6,7 +6,7 @@
cgclassify \- move running task(s) to given cgroups
.SH SYNOPSIS
-\fBcgclassify\fR [\fB-g\fR <\fIcontrollers>:<path\fR>] [--sticky | --cancel-sticky] <\fIpidlist\fR>
+\fBcgclassify\fR [\fB\-g\fR <\fIcontrollers>:<path\fR>] [\-\-sticky | \-\-cancel-sticky] <\fIpidlist\fR>
.SH DESCRIPTION
this command moves processes defined by the list
@@ -17,7 +17,7 @@ to the given control groups.
The pids in the pidlist are separated by spaces
.TP
-.B -g <controllers>:<path>
+.B \-g <controllers>:<path>
defines the control groups where the task will be moved.
\fBcontrollers\fR is a list of controllers and
\fBpath\fR is the relative path to control groups
@@ -34,7 +34,7 @@ If this option is not used then
control group based on \fB/etc/cgrules.conf\fR.
.TP
-.B --sticky
+.B \-\-sticky
If this option is used, the daemon of service cgred (cgrulesengd process)
does not change both the specified \fBpidlist\fR and their children tasks.
Without this option, the daemon does not change the specified \fBpidlist\fR
@@ -42,7 +42,7 @@ but it automatically changes their child tasks to the right cgroup based on
\fB/etc/cgrules.conf\fR.
.TP
-.B --cancel-sticky
+.B \-\-cancel-sticky
If this option is used, the daemon of service cgred (cgrulesengd process)
can automatically change both the specified \fBpidlist\fR and their child
tasks to the right cgroup based on \fB/etc/cgrules.conf\fR.
diff --git a/doc/man/cgclear.1 b/doc/man/cgclear.1
index 318c925..ff179de 100644
--- a/doc/man/cgclear.1
+++ b/doc/man/cgclear.1
@@ -6,7 +6,7 @@
cgclear \- unload the cgroup filesystem
.SH SYNOPSIS
-\fBcgclear\fR [\fB-e\fR] [\fB-l\fR <\fIfilename\fR>] [\fB-L\fR <\fIdirectory\fR>] [...]
+\fBcgclear\fR [\fB\-e\fR] [\fB\-l\fR <\fIfilename\fR>] [\fB\-L\fR <\fIdirectory\fR>] [...]
.SH DESCRIPTION
@@ -20,22 +20,22 @@ file on command line is processed first, so \fBcgclear\fR can have the same
command line arguments as appropriate \fBcgconfigparser\fR.
.TP
-.B -l, --load=<filename>
+.B \-l, \-\-load=<filename>
specifies the config file to read. This option can be used multiple times and
-can be mixed with \fB-L\fR option.
+can be mixed with \fB\-L\fR option.
.TP
-.B -L, --load-directory=<directory>
+.B \-L, \-\-load-directory=<directory>
specifies the directory, which is searched for configuration files. All files
in this directory will be processed in alphabetical order as they were specified
-by \fB-l\fR option. This option can be used multiple times and
-can be mixed with \fB-l\fR option.
+by \fB\-l\fR option. This option can be used multiple times and
+can be mixed with \fB\-l\fR option.
.TP
-.B -e
+.B \-e
specifies that only empty groups should be removed. If a group defined in a
config file has tasks inside or has a subgroup, it won't be removed. This
-option works only with \fB-l\fR or \fB-L\fR options.
+option works only with \fB\-l\fR or \fB\-L\fR options.
.SH ENVIRONMENT VARIABLES
.TP
diff --git a/doc/man/cgconfig.conf.5 b/doc/man/cgconfig.conf.5
index 5ebd879..76a986d 100644
--- a/doc/man/cgconfig.conf.5
+++ b/doc/man/cgconfig.conf.5
@@ -275,7 +275,7 @@ inside. It corresponds to the following operations:
.RS
.nf
mkdir /sys/fs/cgroup/cpu
-mount -t cgroup -o cpu,cpuacct cpu /sys/fs/cgroup/cpu
+mount \-t cgroup \-o cpu,cpuacct cpu /sys/fs/cgroup/cpu
.fi
.RE
@@ -318,8 +318,8 @@ following operations:
.RS
.nf
mkdir /sys/fs/cgroup/cpu
-mount -t cgroup -o cpu,name=scheduler cpu /sys/fs/cgroup/cpu
-mount -t cgroup -o none,name=noctrl none /sys/fs/cgroup/noctrl
+mount \-t cgroup \-o cpu,name=scheduler cpu /sys/fs/cgroup/cpu
+mount \-t cgroup \-o none,name=noctrl none /sys/fs/cgroup/noctrl
mkdir /sys/fs/cgroup/cpu/daemons
echo 1000 > /sys/fs/cgroup/cpu/daemons/www/cpu.shares
@@ -427,7 +427,7 @@ which are little bit trickier to emulate via chmod):
.RS
.nf
mkdir /sys/fs/cgroup/cpu
-mount -t cgroup -o cpu,cpuacct cpu /sys/fs/cgroup/cpu
+mount \-t cgroup \-o cpu,cpuacct cpu /sys/fs/cgroup/cpu
mkdir /sys/fs/cgroup/cpu/daemons
@@ -437,23 +437,23 @@ chown root:webmaster /sys/fs/cgroup/cpu/daemons/www/tasks
echo 1000 > /sys/fs/cgroup/cpu/daemons/www/cpu.shares
# + chmod the files so the result looks like:
- # ls -la /sys/fs/cgroup/cpu/daemons/www/
+ # ls \-la /sys/fs/cgroup/cpu/daemons/www/
# admin.dperm = 755:
- # drwxr-xr-x. 2 root webmaster 0 Jun 16 11:51 .
+ # drwxr\-xr\-x. 2 root webmaster 0 Jun 16 11:51 .
#
# admin.fperm = 744:
- # --w-------. 1 root webmaster 0 Jun 16 11:51 cgroup.event_control
- # -r--r--r--. 1 root webmaster 0 Jun 16 11:51 cgroup.procs
- # -r--r--r--. 1 root webmaster 0 Jun 16 11:51 cpuacct.stat
- # -rw-r--r--. 1 root webmaster 0 Jun 16 11:51 cpuacct.usage
- # -r--r--r--. 1 root webmaster 0 Jun 16 11:51 cpuacct.usage_percpu
- # -rw-r--r--. 1 root webmaster 0 Jun 16 11:51 cpu.rt_period_us
- # -rw-r--r--. 1 root webmaster 0 Jun 16 11:51 cpu.rt_runtime_us
- # -rw-r--r--. 1 root webmaster 0 Jun 16 11:51 cpu.shares
- # -rw-r--r--. 1 root webmaster 0 Jun 16 11:51 notify_on_release
+ # \-\-w\-\-\-\-\-\-\-. 1 root webmaster 0 Jun 16 11:51 cgroup.event_control
+ # \-r\-\-r\-\-r\-\-. 1 root webmaster 0 Jun 16 11:51 cgroup.procs
+ # \-r\-\-r\-\-r\-\-. 1 root webmaster 0 Jun 16 11:51 cpuacct.stat
+ # \-rw\-r\-\-r\-\-. 1 root webmaster 0 Jun 16 11:51 cpuacct.usage
+ # \-r\-\-r\-\-r\-\-. 1 root webmaster 0 Jun 16 11:51 cpuacct.usage_percpu
+ # \-rw\-r\-\-r\-\-. 1 root webmaster 0 Jun 16 11:51 cpu.rt_period_us
+ # \-rw\-r\-\-r\-\-. 1 root webmaster 0 Jun 16 11:51 cpu.rt_runtime_us
+ # \-rw\-r\-\-r\-\-. 1 root webmaster 0 Jun 16 11:51 cpu.shares
+ # \-rw\-r\-\-r\-\-. 1 root webmaster 0 Jun 16 11:51 notify_on_release
#
# tasks.fperm = 770
- # -rw-rw----. 1 root webmaster 0 Jun 16 11:51 tasks
+ # \-rw\-rw\-\-\-\-. 1 root webmaster 0 Jun 16 11:51 tasks
mkdir /sys/fs/cgroup/cpu/daemons/ftp
@@ -462,23 +462,23 @@ chown root:ftpmaster /sys/fs/cgroup/cpu/daemons/ftp/tasks
echo 500 > /sys/fs/cgroup/cpu/daemons/ftp/cpu.shares
# + chmod the files so the result looks like:
- # ls -la /sys/fs/cgroup/cpu/daemons/ftp/
+ # ls \-la /sys/fs/cgroup/cpu/daemons/ftp/
# admin.dperm = 755:
- # drwxr-xr-x. 2 root ftpmaster 0 Jun 16 11:51 .
+ # drwxr\-xr\-x. 2 root ftpmaster 0 Jun 16 11:51 .
#
# admin.fperm = 700:
- # --w-------. 1 root ftpmaster 0 Jun 16 11:51 cgroup.event_control
- # -r--------. 1 root ftpmaster 0 Jun 16 11:51 cgroup.procs
- # -r--------. 1 root ftpmaster 0 Jun 16 11:51 cpuacct.stat
- # -rw-------. 1 root ftpmaster 0 Jun 16 11:51 cpuacct.usage
- # -r--------. 1 root ftpmaster 0 Jun 16 11:51 cpuacct.usage_percpu
- # -rw-------. 1 root ftpmaster 0 Jun 16 11:51 cpu.rt_period_us
- # -rw-------. 1 root ftpmaster 0 Jun 16 11:51 cpu.rt_runtime_us
- # -rw-------. 1 root ftpmaster 0 Jun 16 11:51 cpu.shares
- # -rw-------. 1 root ftpmaster 0 Jun 16 11:51 notify_on_release
+ # \-\-w\-\-\-\-\-\-\-. 1 root ftpmaster 0 Jun 16 11:51 cgroup.event_control
+ # \-r\-\-\-\-\-\-\-\-. 1 root ftpmaster 0 Jun 16 11:51 cgroup.procs
+ # \-r\-\-\-\-\-\-\-\-. 1 root ftpmaster 0 Jun 16 11:51 cpuacct.stat
+ # \-rw\-\-\-\-\-\-\-. 1 root ftpmaster 0 Jun 16 11:51 cpuacct.usage
+ # \-r\-\-\-\-\-\-\-\-. 1 root ftpmaster 0 Jun 16 11:51 cpuacct.usage_percpu
+ # \-rw\-\-\-\-\-\-\-. 1 root ftpmaster 0 Jun 16 11:51 cpu.rt_period_us
+ # \-rw\-\-\-\-\-\-\-. 1 root ftpmaster 0 Jun 16 11:51 cpu.rt_runtime_us
+ # \-rw\-\-\-\-\-\-\-. 1 root ftpmaster 0 Jun 16 11:51 cpu.shares
+ # \-rw\-\-\-\-\-\-\-. 1 root ftpmaster 0 Jun 16 11:51 notify_on_release
#
# tasks.fperm = 774:
- # -rw-rw-r--. 1 root ftpmaster 0 Jun 16 11:51 tasks
+ # \-rw\-rw\-r\-\-. 1 root ftpmaster 0 Jun 16 11:51 tasks
.fi
.RE
@@ -532,8 +532,8 @@ It corresponds to the following operations:
.nf
mkdir /sys/fs/cgroup/cpu
mkdir /sys/fs/cgroup/cpuacct
-mount -t cgroup -o cpu cpu /sys/fs/cgroup/cpu
-mount -t cgroup -o cpuacct cpuacct /sys/fs/cgroup/cpuacct
+mount \-t cgroup \-o cpu cpu /sys/fs/cgroup/cpu
+mount \-t cgroup \-o cpuacct cpuacct /sys/fs/cgroup/cpuacct
mkdir /sys/fs/cgroup/cpu/daemons
mkdir /sys/fs/cgroup/cpuacct/daemons
@@ -599,8 +599,8 @@ It corresponds to the following operations:
.nf
mkdir /sys/fs/cgroup/cpu
mkdir /sys/fs/cgroup/cpuacct
-mount -t cgroup -o cpu cpu /sys/fs/cgroup/cpu
-mount -t cgroup -o cpuacct cpuacct /sys/fs/cgroup/cpuacct
+mount \-t cgroup \-o cpu cpu /sys/fs/cgroup/cpu
+mount \-t cgroup \-o cpuacct cpuacct /sys/fs/cgroup/cpuacct
mkdir /sys/fs/cgroup/cpuacct/daemons
mkdir /sys/fs/cgroup/cpu/daemons
@@ -697,7 +697,7 @@ It corresponds to the following operations:
.RS
.nf
mkdir /sys/fs/cgroup/cpu
-mount -t cgroup -o cpu,cpuacct cpu /sys/fs/cgroup/cpu
+mount \-t cgroup \-o cpu,cpuacct cpu /sys/fs/cgroup/cpu
chown root:operator /sys/fs/cgroup/cpu/*
chown root:operator /sys/fs/cgroup/cpu/tasks
diff --git a/doc/man/cgconfigparser.8 b/doc/man/cgconfigparser.8
index 0a20f95..dd70484 100644
--- a/doc/man/cgconfigparser.8
+++ b/doc/man/cgconfigparser.8
@@ -7,61 +7,61 @@
cgconfigparser \- setup control group file system
.SH SYNOPSIS
-\fBcgconfigparser\fR [\fB-h\fR] [\fB-l\fR \fI<filename>\fR] [\fB-L\fR \fI<directory>\fR] [...]
+\fBcgconfigparser\fR [\fB\-h\fR] [\fB\-l\fR \fI<filename>\fR] [\fB\-L\fR \fI<directory>\fR] [...]
.SH OPTIONS
.TP
-.B -h, --help
+.B \-h, \-\-help
Displays help.
.TP
-.B -l, --load=FILE
+.B \-l, \-\-load=FILE
Parses the control groups configuration file
Sets up the control group file system
defined by the configuration file and mounts
mount points defined by the configuration file.
The format of the file is described in
\fBcgconfig.conf\fR. This option can be used multiple times and can be mixed
-with \fB-L\fR option.
+with \fB\-L\fR option.
.TP
-.B -L, --load-directory=DIR
+.B \-L, \-\-load-directory=DIR
Finds all files in given directory and parses them in alphabetical order
-like they were specified by \fB-l\fR option. This option can be used
-multiple times and can be mixed with \fB-l\fR option.
+like they were specified by \fB\-l\fR option. This option can be used
+multiple times and can be mixed with \fB\-l\fR option.
.TP
-.B -a <agid>:<auid>
+.B \-a <agid>:<auid>
defines the default owner of the
rest of the defined control groups files. These users are
allowed to set subsystem parameters and create subgroups.
The default value is the same as has the parent cgroup.
.TP
-.B -d, --dperm=mode
+.B \-d, \-\-dperm=mode
sets the default permissions of a control groups directory.
The permissions needs to be specified as octal numbers e.g.
-\fB-d 775\fR.
+\fB\-d 775\fR.
.TP
-.B -f, --fperm=mode
+.B \-f, \-\-fperm=mode
sets the default permissions of the control group files.
The permissions needs to be specified as octal numbers e.g.
-\fB-f 775\fR.
+\fB\-f 775\fR.
The value is not used as given because the current owner's
permissions are used as an umask (so 777 will set group and
others permissions to the owners permissions).
.TP
-.B -s, --tperm=mode
+.B \-s, \-\-tperm=mode
sets the default permissions of the control group tasks files.
The permissions needs to be specified as octal numbers e.g.
-\fB-f 775\fR.
+\fB\-f 775\fR.
The value is not used as given because the current owner's
permissions are used as an umask (so 777 will set group and
others permissions to the owners permissions).
.TP
-.B -t <tuid>:<tgid>
+.B \-t <tuid>:<tgid>
defines the default owner of tasks file of the defined control
group. I.e. this user and members
of this group have write access to the file.
diff --git a/doc/man/cgcreate.1 b/doc/man/cgcreate.1
index 7068073..e95873c 100644
--- a/doc/man/cgcreate.1
+++ b/doc/man/cgcreate.1
@@ -5,38 +5,38 @@
cgcreate \- create new cgroup(s)
.SH SYNOPSIS
-\fBcgcreate\fR [\fB-h\fR] [\fB-t\fR <\fItuid>:<tgid\fR>]
-[\fB-a\fR <\fIagid>:<auid\fR>] [\fB-f\fR mode] [\fB-d\fR mode]
-[\fB-s\fR mode] \fB-g\fR <\fIcontrollers>:<path\fR> [\fB-g\fR ...]
+\fBcgcreate\fR [\fB\-h\fR] [\fB\-t\fR <\fItuid>:<tgid\fR>]
+[\fB\-a\fR <\fIagid>:<auid\fR>] [\fB\-f\fR mode] [\fB\-d\fR mode]
+[\fB\-s\fR mode] \fB\-g\fR <\fIcontrollers>:<path\fR> [\fB\-g\fR ...]
.SH DESCRIPTION
The command creates new cgroup(s) defined by the options
\fB-g\fR.
.TP
-.B -a <agid>:<auid>
+.B \-a <agid>:<auid>
defines the name of the user and the group which own the
rest of the defined control groups files. These users are
allowed to set subsystem parameters and create subgroups.
The default value is the same as has the parent cgroup.
.TP
-.B -d, --dperm=mode
+.B \-d, \-\-dperm=mode
sets the permissions of a control groups directory.
The permissions needs to be specified as octal numbers e.g.
\fB-d 775\fR.
.TP
-.B -f, --fperm=mode
+.B \-f, \-\-fperm=mode
sets the permissions of the control groups parameters.
The permissions needs to be specified as octal numbers e.g.
-\fB-f 775\fR.
+\fB\-f 775\fR.
The value is not used as given because the current owner's
permissions are used as an umask (so 777 will set group and
others permissions to the owners permissions).
.TP
-.B -g <controllers>:<path>
+.B \-g <controllers>:<path>
defines control groups to be added.
\fBcontrollers\fR is a list of controllers and
\fBpath\fR is the relative path to control groups
@@ -44,20 +44,20 @@ in the given controllers list. This option can be specified
multiple times.
.TP
-.B -h, --help
+.B \-h, \-\-help
display this help and exit
.TP
-.B -s, --tperm=mode
+.B \-s, \-\-tperm=mode
sets the permissions of the control group tasks file.
The permissions needs to be specified as octal numbers e.g.
-\fB-s 775\fR.
+\fB\-s 775\fR.
The value is not used as given because the current owner's
permissions are used as an umask (so 777 will set group and
others permissions to the owners permissions).
.TP
-.B -t <tuid>:<tgid>
+.B \-t <tuid>:<tgid>
defines the name of the user and the group, which owns tasks
file of the defined control group. I.e. this user and members
of this group have write access to the file.
diff --git a/doc/man/cgdelete.1 b/doc/man/cgdelete.1
index 025a799..92dbcfb 100644
--- a/doc/man/cgdelete.1
+++ b/doc/man/cgdelete.1
@@ -7,7 +7,7 @@
cgdelete \- remove control group(s)
.SH SYNOPSIS
-\fBcgdelete\fR [\fB-h\fR] [\fB-r\fR] [[\fB-g\fR]
+\fBcgdelete\fR [\fB\-h\fR] [\fB\-r\fR] [[\fB\-g\fR]
<\fIcontrollers\fR>:\fI<path\fR>] ...
.SH DESCRIPTION
@@ -15,18 +15,18 @@ The \fBcgdelete\fR
program removes all specified control groups.
.TP
-.B [-g] <controllers>:<path>
+.B [\-g] <controllers>:<path>
Defines the control group to delete. Multiple control groups nay be
specified.
-.B -g
+.B \-g
is optional.
.TP
-.B -h, --help
+.B \-h, \-\-help
Display this help and exit.
.TP
-.B -r, --recursive
+.B \-r, \-\-recursive
Recursively remove all subgroups.
.SH ENVIRONMENT VARIABLES
diff --git a/doc/man/cgexec.1 b/doc/man/cgexec.1
index cacbd3a..c34edf1 100644
--- a/doc/man/cgexec.1
+++ b/doc/man/cgexec.1
@@ -7,7 +7,7 @@
cgexec \- run the task in given control groups
.SH SYNOPSIS
-\fBcgexec\fR [\fB-h\fR] [\fB-g\fR <\fIcontrollers>:<path\fR>] [--sticky] \fBcommand\fR [\fIarguments\fR]
+\fBcgexec\fR [\fB\-h\fR] [\fB\-g\fR <\fIcontrollers>:<path\fR>] [\-\-sticky] \fBcommand\fR [\fIarguments\fR]
.SH DESCRIPTION
The \fBcgexec\fR
@@ -15,7 +15,7 @@ program executes the task \fBcommand\fR
with arguments \fBarguments\fR in the given control groups.
.TP
-.B -g <controllers>:<path>
+.B \-g <controllers>:<path>
defines the control groups in which the task will be run.
\fBcontrollers\fR is a list of controllers and
\fBpath\fR is the relative path to control groups
@@ -40,11 +40,11 @@ If the specifications are not present the group is created with the default
kernel values.
.TP
-.B -h, --help
+.B \-h, \-\-help
Display this help and exit.
.TP
-.B --sticky
+.B \-\-sticky
If running the task \fBcommand\fR with this option, the daemon of
service cgred (cgrulesengd process) does not change both the task
of the \fBcommand\fR and the child tasks. Without this option,
@@ -58,7 +58,7 @@ changes the child tasks to the right cgroup based on
.nf
.ft B
-cgexec -g *:test1 ls
+cgexec \-g *:test1 ls
.ft R
.fi
runs command \fBls\fR in control group test1
@@ -66,18 +66,18 @@ in all mounted controllers.
.nf
.ft B
-cgexec -g cpu,memory:test1 ls -l
+cgexec \-g cpu,memory:test1 ls \-l
.ft R
.fi
-runs command \fBls -l\fR in control group test1
+runs command \fBls \-l\fR in control group test1
in controllers cpu and memory.
.nf
.ft B
-cgexec -g cpu,memory:test1 -g swap:test2 ls -l
+cgexec \-g cpu,memory:test1 \-g swap:test2 ls \-l
.ft R
.fi
-runs command \fBls -l\fR in control group test1
+runs command \fBls \-l\fR in control group test1
in controllers cpu and memory and control group
test2 in controller swap.
diff --git a/doc/man/cgget.1 b/doc/man/cgget.1
index 744a329..73a1eb0 100644
--- a/doc/man/cgget.1
+++ b/doc/man/cgget.1
@@ -7,11 +7,11 @@
cgget \- print parameter(s) of given group(s)
.SH SYNOPSIS
-\fBcgget\fR [\fB-n\fR] [\fB-v\fR] [\fB-r\fR <\fIname\fR>]
-[\fB-g\fR <\fIcontroller\fR>] [\fB-a\fR] <\fBpath\fR> ...
+\fBcgget\fR [\fB\-n\fR] [\fB\-v\fR] [\fB\-r\fR <\fIname\fR>]
+[\fB\-g\fR <\fIcontroller\fR>] [\fB\-a\fR] <\fBpath\fR> ...
.br
-\fBcgget\fR [\fB-n\fR] [\fB-v\fR] [\fB-r\fR <\fIname\fR>]
-\fB-g\fR <\fIcontroller\fR>:<\fBpath\fR> ...
+\fBcgget\fR [\fB\-n\fR] [\fB\-v\fR] [\fB\-r\fR <\fIname\fR>]
+\fB\-g\fR <\fIcontroller\fR>:<\fBpath\fR> ...
.SH DESCRIPTION
Prints the parameter(s) of input cgroup(s).
@@ -24,40 +24,40 @@ is the name of the cgroup which should be read.
This parameter can be used multiple times.
.TP
-.B -a, --all
+.B \-a, \-\-all
print the variables for all controllers which consist in the given cgroup
.TP
-.B -g <controller>
+.B \-g <controller>
defines controllers whose values should be displayed.
This option can be used multiple times.
.TP
-.B -g <controller>:<path>
+.B \-g <controller>:<path>
defines control groups whose values should be displayed.
This option can be used multiple times.
.TP
-.B -h, --help
+.B \-h, \-\-help
display help and exit
.TP
-.B -n
+.B \-n
do not print headers, i.e. names of groups.
.TP
-.B -r, --variable <name>
+.B \-r, \-\-variable <name>
defines parameter to display.
This option can be used multiple times.
.TP
-.B -v, --values-only
+.B \-v, \-\-values-only
print only values, not parameter names.
.SH EXAMPLES
.nf
-$ cgget -r cpuset.cpus -r cpuset.mems first second
+$ cgget \-r cpuset.cpus \-r cpuset.mems first second
first:
cpuset.cpus=0-1
cpuset.mems=0
@@ -66,19 +66,19 @@ second:
cpuset.cpus=0
cpuset.mems=0
-$ cgget -n -r cpuset.cpus -r cpuset.mems first second
+$ cgget \-n \-r cpuset.cpus \-r cpuset.mems first second
cpuset.cpus=0-1
cpuset.mems=0
cpuset.cpus=0
cpuset.mems=0
-$ cgget -nv -r cpuset.cpus -r cpuset.mems first second
+$ cgget \-nv \-r cpuset.cpus \-r cpuset.mems first second
0-1
0
0
0
-$ cgget -n -g cpu /
+$ cgget \-n \-g cpu /
cpu.rt_period_us=1000000
cpu.rt_runtime_us=950000
cpu.shares=1024
diff --git a/doc/man/cgred.conf.5 b/doc/man/cgred.conf.5
index 3fe760f..f4ee956 100644
--- a/doc/man/cgred.conf.5
+++ b/doc/man/cgred.conf.5
@@ -21,13 +21,13 @@ variable specifies the file to which logs will be written
.TP
\fBNODAEMON\fR
-if it is equal to "--nodamon" then
+if it is equal to "\-\-nodamon" then
run cgred in non-daemon mode
.TP
\fBLOG\fR
-define the verbosity of logging. Accepted values are '-v', '-vv', '-q'
-and '--nolog'.
+define the verbosity of logging. Accepted values are '\-v', '\-vv', '\-q'
+and '\-\-nolog'.
.LP
diff --git a/doc/man/cgrulesengd.8 b/doc/man/cgrulesengd.8
index 2e89c5b..ee74870 100644
--- a/doc/man/cgrulesengd.8
+++ b/doc/man/cgrulesengd.8
@@ -21,40 +21,40 @@ The daemon opens a standard unix socket to receive 'sticky' requests from \fBcge
.SH OPTIONS
.TP
-.B -h|--help
+.B \-h|\-\-help
Display help.
.TP
-.B -f <path>|--logfile=<path>
-Write log messages to the given log file. When '-' is used as <path>, log messages
-are written to the standard output. If '\fB-f\fR' and '\fB-s\fR' are used together,
+.B \-f <path>|\-\-logfile=<path>
+Write log messages to the given log file. When '\-' is used as <path>, log messages
+are written to the standard output. If '\fB\-f\fR' and '\fB\-s\fR' are used together,
the logs are sent to both destinations.
.TP
-.B -s[facility]|--syslog=[facility]
-Write log messages to syslog. The default facility is DAEMON. If '\fB-f\fR'
-and '\fB-s\fR' are used together, the logs are sent to both destinations.
+.B \-s[facility]|\-\-syslog=[facility]
+Write log messages to syslog. The default facility is DAEMON. If '\fB\-f\fR'
+and '\fB\-s\fR' are used together, the logs are sent to both destinations.
.TP
-.B -n|--nodaemon
+.B \-n|\-\-nodaemon
Don't fork the daemon, stay in the foreground.
.TP
-.B -v|--verbose
+.B \-v|\-\-verbose
Display more log messages. This option can be used three times to enable more
verbose log messages.
.TP
-.B -q|--quiet
+.B \-q|\-\-quiet
Display less log messages.
.TP
-.B -Q|--nolog
+.B \-Q|\-\-nolog
Disable logging.
.TP
-.B -d|--debug
-Equivalent to '-nvvvf -', i.e. don't fork the daemon, display all log messages and
+.B \-d|\-\-debug
+Equivalent to '\-nvvvf \-', i.e. don't fork the daemon, display all log messages and
write them to the standard output.
.TP
-.B -u <user>|--socket-user=<user>
-.B -g <group>|--socket-group=<group>
+.B \-u <user>|\-\-socket-user=<user>
+.B \-g <group>|\-\-socket-group=<group>
Set the owner of cgrulesengd socket. Assumes that \fBcgexec\fR runs with proper
-suid permissions so it can write to the socket when \fBcgexec\fR --sticky is used.
+suid permissions so it can write to the socket when \fBcgexec\fR \-\-sticky is used.
.SH ENVIRONMENT VARIABLES
.TP
diff --git a/doc/man/cgset.1 b/doc/man/cgset.1
index be886c6..4e63aa2 100644
--- a/doc/man/cgset.1
+++ b/doc/man/cgset.1
@@ -7,9 +7,9 @@
cgset \- set the parameters of given cgroup(s)
.SH SYNOPSIS
-\fBcgset\fR [\fB-r\fR <\fIname=value\fR>] <\fBcgroup_path\fR> ...
+\fBcgset\fR [\fB\-r\fR <\fIname=value\fR>] <\fBcgroup_path\fR> ...
.br
-\fBcgset\fR \fB--copy-from\fR <\fIsource_cgroup_path\fR> <\fBcgroup_path\fR> ...
+\fBcgset\fR \fB\-\-copy-from\fR <\fIsource_cgroup_path\fR> <\fBcgroup_path\fR> ...
.SH DESCRIPTION
Set the parameters of input cgroups.
@@ -20,13 +20,13 @@ is the name of the cgroup which should be changed.
This parameter can be used multiple times.
.TP
-.B -r <name=value>
+.B \-r <name=value>
defines the name of the file to set and
the value which should be written to that file.
This parameter can be used multiple times.
.TP
-.B --copy-from <source_cgroup_path>
+.B \-\-copy-from <source_cgroup_path>
defines the name of the cgroup whose parameters will be
copied to the input cgroup.
diff --git a/doc/man/cgsnapshot.1 b/doc/man/cgsnapshot.1
index 03c85f6..a6bb96e 100644
--- a/doc/man/cgsnapshot.1
+++ b/doc/man/cgsnapshot.1
@@ -7,8 +7,8 @@
cgsnapshot \- generate the configuration file for given controllers
.SH SYNOPSIS
-\fBcgsnapshot\fR [\fB-h\fR] [\fB-s\fR] [\fB-t\fR] [\fB-b\fR \fIfile\fR]
-[\fB-w\fR \fIfile\fR] [\fB-f\fR \fIoutput_file\fR] [\fBcontroller\fR] [...]
+\fBcgsnapshot\fR [\fB\-h\fR] [\fB\-s\fR] [\fB\-t\fR] [\fB\-b\fR \fIfile\fR]
+[\fB\-w\fR \fIfile\fR] [\fB\-f\fR \fIoutput_file\fR] [\fBcontroller\fR] [...]
.SH DESCRIPTION
\fBcgsnapshot\fR
@@ -21,7 +21,7 @@ The output is in the same format as the
configuration file.
.TP
-.B -b file
+.B \-b file
Display only variables from the blacklist.
The default location of the blacklist is
.B /etc/cgsnapshot_blacklist.conf.
@@ -33,25 +33,25 @@ If it is not present on the blacklist, the whitelist
is checked.
.TP
-.B -h, --help
+.B \-h, \-\-help
display this help and exit
.TP
-.B -f, --file
+.B \-f, \-\-file
Redirect the output to output_file
.TP
-.B -s, --silent
+.B \-s, \-\-silent
Ignore all warnings
.TP
-.B -t, --strict
+.B \-t, \-\-strict
Do not display the variables which are not on the whitelist
.TP
-.B -w file
+.B \-w file
Set the blacklist configuration file.
This list contains all variables which should be displayed by
.B cgsnapshot
@@ -65,10 +65,10 @@ the variable is displayed and a warning message is produced.
By default the whitelist is not used.
The warning message can be omitted using the
-.B -s, --silent
+.B \-s, \-\-silent
flag.
If the
-.B -t, --strict
+.B \-t, \-\-strict
flag is used, the variable which is not on the whitelist is
not displayed.
diff --git a/doc/man/lscgroup.1 b/doc/man/lscgroup.1
index 693fbbc..27fec7d 100644
--- a/doc/man/lscgroup.1
+++ b/doc/man/lscgroup.1
@@ -7,9 +7,9 @@
lscgroup \- list all cgroups
.SH SYNOPSIS
-\fBlscgroup\fR [[\fB-g\fR] <\fIcontrollers>:<path\fR>] [...]
+\fBlscgroup\fR [[\fB\-g\fR] <\fIcontrollers>:<path\fR>] [...]
.br
-\fBlscgroup\fR [\fB-h|--help\fR]
+\fBlscgroup\fR [\fB\-h|\-\-help\fR]
.SH DESCRIPTION
List all/chosen cgroups.
diff --git a/doc/man/lssubsys.1 b/doc/man/lssubsys.1
index 790c627..1be272e 100644
--- a/doc/man/lssubsys.1
+++ b/doc/man/lssubsys.1
@@ -7,13 +7,13 @@
lssubsys \- list hierarchies containing given subsystem
.SH SYNOPSIS
-\fBlssubsys\fR [\fB-m|--mount-points\fR] [\fB-M|--all-mount-points\fR]
+\fBlssubsys\fR [\fB\-m|\-\-mount-points\fR] [\fB\-M|\-\-all-mount-points\fR]
[\fIcontroller\fR] [...]
.br
-\fBlssubsys\fR [\fB-m|--mount-points\fR] [\fB-M|--all-mount-points\fR]
-[\fB-i|--hierarchies\fR] [\fB-a|--all\fR]
+\fBlssubsys\fR [\fB\-m|\-\-mount-points\fR] [\fB\-M|\-\-all-mount-points\fR]
+[\fB\-i|\-\-hierarchies\fR] [\fB\-a|\-\-all\fR]
.br
-\fBlssubsys\fR [\fB-h|--help\fR]
+\fBlssubsys\fR [\fB\-h|\-\-help\fR]
.SH DESCRIPTION
\fBlssubsys\fR list the hierarchies containing
@@ -27,37 +27,37 @@ If this parameter is not used, the command will
list all mounted subsystems.
.TP
-.B -m, --mount-points
+.B \-m, \-\-mount-points
Display mount points. Only the first mount points of shown hierarchies are displayed.
.TP
-.B -M, --all-mount-points
+.B \-M, \-\-all-mount-points
Display mount points. All mount points of shown hierarchies are displayed, each on
separate line.
.TP
-.B -a, --all
+.B \-a, \-\-all
Display all subsystems (including unmounted ones).
.TP
-.B -i, --hierarchies
+.B \-i, \-\-hierarchies
Display the attached hierarchy number if the subsystem is in a hierarchy.
If the option
-.B -m
+.B \-m
is also used, the hierarchy number is shown only for unmounted hierarchies.
.TP
-.B -h, --help
+.B \-h, \-\-help
Display help and exit.
.SH EXAMPLE
The command
-.B lssubsys -am
+.B lssubsys \-am
lists all subsystems which are present in the system,
mounted ones will be shown with their mount point:
.RS
.nf
-$ lssubsys -am
+$ lssubsys \-am
ns
cpuset
cpu,devices
@@ -69,13 +69,13 @@ net_cls /cgroup/net_cls
.RE
.LP
The command
-.B lssubsys -ami
+.B lssubsys \-ami
lists all subsystems which are present in the system,
mounted subsystems are listed with their mount points,
unmounted ones which are in a hierarchy are listed with their hierarchy number:
.RS
.nf
-$ lssubsys -ami
+$ lssubsys \-ami
ns
cpuset 5
cpu,devices 6

281
debian/patches/cgroup-directory.patch vendored Normal file
View File

@ -0,0 +1,281 @@
From: Daniel Baumann <mail@daniel-baumann.ch>
Date: Thu, 19 Sep 2013 08:33:12 +0200
Subject: Updating cgroup directory
Last-Update: 2014-07-26
---
README | 2 +-
doc/man/cgconfig.conf.5 | 124 ++++++++++++++++++++++++------------------------
samples/cgconfig.conf | 4 +-
3 files changed, 65 insertions(+), 65 deletions(-)
diff --git a/README b/README
index 54e0f7b..d7b7bc0 100644
--- a/README
+++ b/README
@@ -16,7 +16,7 @@ this file will be managed by root.
Basic idea is that to begin with provide facility to implement rules
based on uid and gid. So a hierarchy might look like as follows.
- /mnt/cgroup
+ /sys/fs/cgroup
| |
gid1 gid2
| |
diff --git a/doc/man/cgconfig.conf.5 b/doc/man/cgconfig.conf.5
index be80e4e..5ebd879 100644
--- a/doc/man/cgconfig.conf.5
+++ b/doc/man/cgconfig.conf.5
@@ -262,8 +262,8 @@ The configuration file:
.nf
mount {
.RS
-cpu = /mnt/cgroups/cpu;
-cpuacct = /mnt/cgroups/cpu;
+cpu = /sys/fs/cgroup/cpu;
+cpuacct = /sys/fs/cgroup/cpu;
.RE
}
.fi
@@ -274,8 +274,8 @@ inside. It corresponds to the following operations:
.LP
.RS
.nf
-mkdir /mnt/cgroups/cpu
-mount -t cgroup -o cpu,cpuacct cpu /mnt/cgroups/cpu
+mkdir /sys/fs/cgroup/cpu
+mount -t cgroup -o cpu,cpuacct cpu /sys/fs/cgroup/cpu
.fi
.RE
@@ -287,9 +287,9 @@ The configuration file:
.nf
mount {
.RS
-cpu = /mnt/cgroups/cpu;
-"name=scheduler" = /mnt/cgroups/cpu;
-"name=noctrl" = /mnt/cgroups/noctrl;
+cpu = /sys/fs/cgroup/cpu;
+"name=scheduler" = /sys/fs/cgroup/cpu;
+"name=noctrl" = /sys/fs/cgroup/noctrl;
.RE
}
@@ -317,14 +317,14 @@ following operations:
.LP
.RS
.nf
-mkdir /mnt/cgroups/cpu
-mount -t cgroup -o cpu,name=scheduler cpu /mnt/cgroups/cpu
-mount -t cgroup -o none,name=noctrl none /mnt/cgroups/noctrl
+mkdir /sys/fs/cgroup/cpu
+mount -t cgroup -o cpu,name=scheduler cpu /sys/fs/cgroup/cpu
+mount -t cgroup -o none,name=noctrl none /sys/fs/cgroup/noctrl
-mkdir /mnt/cgroups/cpu/daemons
-echo 1000 > /mnt/cgroups/cpu/daemons/www/cpu.shares
+mkdir /sys/fs/cgroup/cpu/daemons
+echo 1000 > /sys/fs/cgroup/cpu/daemons/www/cpu.shares
-mkdir /mnt/cgroups/noctrl/tests
+mkdir /sys/fs/cgroup/noctrl/tests
.fi
.RE
@@ -354,8 +354,8 @@ The configuration file:
.nf
mount {
.RS
-cpu = /mnt/cgroups/cpu;
-cpuacct = /mnt/cgroups/cpu;
+cpu = /sys/fs/cgroup/cpu;
+cpuacct = /sys/fs/cgroup/cpu;
.RE
}
@@ -426,18 +426,18 @@ which are little bit trickier to emulate via chmod):
.LP
.RS
.nf
-mkdir /mnt/cgroups/cpu
-mount -t cgroup -o cpu,cpuacct cpu /mnt/cgroups/cpu
+mkdir /sys/fs/cgroup/cpu
+mount -t cgroup -o cpu,cpuacct cpu /sys/fs/cgroup/cpu
-mkdir /mnt/cgroups/cpu/daemons
+mkdir /sys/fs/cgroup/cpu/daemons
-mkdir /mnt/cgroups/cpu/daemons/www
-chown root:root /mnt/cgroups/cpu/daemons/www/*
-chown root:webmaster /mnt/cgroups/cpu/daemons/www/tasks
-echo 1000 > /mnt/cgroups/cpu/daemons/www/cpu.shares
+mkdir /sys/fs/cgroup/cpu/daemons/www
+chown root:root /sys/fs/cgroup/cpu/daemons/www/*
+chown root:webmaster /sys/fs/cgroup/cpu/daemons/www/tasks
+echo 1000 > /sys/fs/cgroup/cpu/daemons/www/cpu.shares
# + chmod the files so the result looks like:
- # ls -la /mnt/cgroups/cpu/daemons/www/
+ # ls -la /sys/fs/cgroup/cpu/daemons/www/
# admin.dperm = 755:
# drwxr-xr-x. 2 root webmaster 0 Jun 16 11:51 .
#
@@ -456,13 +456,13 @@ echo 1000 > /mnt/cgroups/cpu/daemons/www/cpu.shares
# -rw-rw----. 1 root webmaster 0 Jun 16 11:51 tasks
-mkdir /mnt/cgroups/cpu/daemons/ftp
-chown root:root /mnt/cgroups/cpu/daemons/ftp/*
-chown root:ftpmaster /mnt/cgroups/cpu/daemons/ftp/tasks
-echo 500 > /mnt/cgroups/cpu/daemons/ftp/cpu.shares
+mkdir /sys/fs/cgroup/cpu/daemons/ftp
+chown root:root /sys/fs/cgroup/cpu/daemons/ftp/*
+chown root:ftpmaster /sys/fs/cgroup/cpu/daemons/ftp/tasks
+echo 500 > /sys/fs/cgroup/cpu/daemons/ftp/cpu.shares
# + chmod the files so the result looks like:
- # ls -la /mnt/cgroups/cpu/daemons/ftp/
+ # ls -la /sys/fs/cgroup/cpu/daemons/ftp/
# admin.dperm = 755:
# drwxr-xr-x. 2 root ftpmaster 0 Jun 16 11:51 .
#
@@ -510,8 +510,8 @@ The configuration file:
.nf
mount {
.RS
-cpu = /mnt/cgroups/cpu;
-cpuacct = /mnt/cgroups/cpuacct;
+cpu = /sys/fs/cgroup/cpu;
+cpuacct = /sys/fs/cgroup/cpuacct;
.RE
}
@@ -530,13 +530,13 @@ It corresponds to the following operations:
.LP
.RS
.nf
-mkdir /mnt/cgroups/cpu
-mkdir /mnt/cgroups/cpuacct
-mount -t cgroup -o cpu cpu /mnt/cgroups/cpu
-mount -t cgroup -o cpuacct cpuacct /mnt/cgroups/cpuacct
+mkdir /sys/fs/cgroup/cpu
+mkdir /sys/fs/cgroup/cpuacct
+mount -t cgroup -o cpu cpu /sys/fs/cgroup/cpu
+mount -t cgroup -o cpuacct cpuacct /sys/fs/cgroup/cpuacct
-mkdir /mnt/cgroups/cpu/daemons
-mkdir /mnt/cgroups/cpuacct/daemons
+mkdir /sys/fs/cgroup/cpu/daemons
+mkdir /sys/fs/cgroup/cpuacct/daemons
.fi
.RE
@@ -557,8 +557,8 @@ The configuration file:
.nf
mount {
.RS
-cpu = /mnt/cgroups/cpu;
-cpuacct = /mnt/cgroups/cpuacct;
+cpu = /sys/fs/cgroup/cpu;
+cpuacct = /sys/fs/cgroup/cpuacct;
.RE
}
@@ -597,17 +597,17 @@ It corresponds to the following operations:
.LP
.RS
.nf
-mkdir /mnt/cgroups/cpu
-mkdir /mnt/cgroups/cpuacct
-mount -t cgroup -o cpu cpu /mnt/cgroups/cpu
-mount -t cgroup -o cpuacct cpuacct /mnt/cgroups/cpuacct
-
-mkdir /mnt/cgroups/cpuacct/daemons
-mkdir /mnt/cgroups/cpu/daemons
-mkdir /mnt/cgroups/cpu/daemons/www
-echo 1000 > /mnt/cgroups/cpu/daemons/www/cpu.shares
-mkdir /mnt/cgroups/cpu/daemons/ftp
-echo 500 > /mnt/cgroups/cpu/daemons/ftp/cpu.shares
+mkdir /sys/fs/cgroup/cpu
+mkdir /sys/fs/cgroup/cpuacct
+mount -t cgroup -o cpu cpu /sys/fs/cgroup/cpu
+mount -t cgroup -o cpuacct cpuacct /sys/fs/cgroup/cpuacct
+
+mkdir /sys/fs/cgroup/cpuacct/daemons
+mkdir /sys/fs/cgroup/cpu/daemons
+mkdir /sys/fs/cgroup/cpu/daemons/www
+echo 1000 > /sys/fs/cgroup/cpu/daemons/www/cpu.shares
+mkdir /sys/fs/cgroup/cpu/daemons/ftp
+echo 500 > /sys/fs/cgroup/cpu/daemons/ftp/cpu.shares
.fi
.RE
Group
@@ -638,8 +638,8 @@ The configuration file:
.nf
mount {
.RS
-cpu = /mnt/cgroups/cpu;
-cpuacct = /mnt/cgroups/cpu;
+cpu = /sys/fs/cgroup/cpu;
+cpuacct = /sys/fs/cgroup/cpu;
.RE
}
@@ -696,15 +696,15 @@ It corresponds to the following operations:
.LP
.RS
.nf
-mkdir /mnt/cgroups/cpu
-mount -t cgroup -o cpu,cpuacct cpu /mnt/cgroups/cpu
+mkdir /sys/fs/cgroup/cpu
+mount -t cgroup -o cpu,cpuacct cpu /sys/fs/cgroup/cpu
-chown root:operator /mnt/cgroups/cpu/*
-chown root:operator /mnt/cgroups/cpu/tasks
+chown root:operator /sys/fs/cgroup/cpu/*
+chown root:operator /sys/fs/cgroup/cpu/tasks
-mkdir /mnt/cgroups/cpu/daemons
-chown root:operator /mnt/cgroups/cpu/daemons/*
-chown root:daemonmaster /mnt/cgroups/cpu/daemons/tasks
+mkdir /sys/fs/cgroup/cpu/daemons
+chown root:operator /sys/fs/cgroup/cpu/daemons/*
+chown root:daemonmaster /sys/fs/cgroup/cpu/daemons/tasks
.fi
.RE
@@ -731,8 +731,8 @@ The configuration file:
.nf
mount {
.RS
-cpu = /mnt/cgroups/cpu;
-cpuacct = /mnt/cgroups/cpuacct;
+cpu = /sys/fs/cgroup/cpu;
+cpuacct = /sys/fs/cgroup/cpuacct;
.RE
}
@@ -754,8 +754,8 @@ cpu {
.RE
}
-mkdir /mnt/cgroups/cpu/daemons
-mkdir /mnt/cgroups/cpuacct/daemons
+mkdir /sys/fs/cgroup/cpu/daemons
+mkdir /sys/fs/cgroup/cpuacct/daemons
.fi
.RE
diff --git a/samples/cgconfig.conf b/samples/cgconfig.conf
index de77e4b..5e668a8 100644
--- a/samples/cgconfig.conf
+++ b/samples/cgconfig.conf
@@ -43,6 +43,6 @@
#}
#
#mount {
-# cpu = /mnt/cgroups/cpu;
-# cpuacct = /mnt/cgroups/cpuacct;
+# cpu = /sys/fs/cgroup/cpu;
+# cpuacct = /sys/fs/cgroup/cpuacct;
#}

View File

@ -0,0 +1,55 @@
From: James Clarke <jrtc27@debian.org>
Date: Tue, 9 Jan 2018 13:23:26 +0000
Subject: libcgroup: FTBFS on ia64
Currently libcgroup FTBFS on ia64. This is a result of cgrulesengd.h
defining __USE_GNU itself after features.h has been included, and since
_GNU_SOURCE was not defined before features.h was included, this breaks
assumptions in the glibc headers about the implications of the different
__USE_FOO macros, eventually leading to siginfo-consts-arch.h being
included but TRAP_TRACE not having been defined (which is guarded by
__USE_XOPEN_EXTENDED). The attached patch fixes this on ia64, although
is untested elsewhere.
Bug-Debian: https://bugs.debian.org/886744
Last-Update: 2019-02-22
--- a/src/daemon/cgrulesengd.c
+++ b/src/daemon/cgrulesengd.c
@@ -31,6 +31,10 @@
* TODO Stop using netlink for communication (or at least rewrite that part).
*/
+#ifndef _GNU_SOURCE
+#define _GNU_SOURCE
+#endif
+
#include "libcgroup.h"
#include "cgrulesengd.h"
#include "../libcgroup-internal.h"
--- a/src/daemon/cgrulesengd.h
+++ b/src/daemon/cgrulesengd.h
@@ -15,8 +15,6 @@
#ifndef _CGRULESENGD_H
#define _CGRULESENGD_H
-#include <features.h>
-
__BEGIN_DECLS
#include "config.h"
@@ -24,14 +22,6 @@ __BEGIN_DECLS
#include <linux/connector.h>
#include <linux/cn_proc.h>
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE
-#endif
-
-#ifndef __USE_GNU
-#define __USE_GNU
-#endif
-
/* The following ten macros are all for the Netlink code. */
#define SEND_MESSAGE_LEN (NLMSG_LENGTH(sizeof(struct cn_msg) + \
sizeof(enum proc_cn_mcast_op)))

37
debian/patches/initscript-exit.patch vendored Normal file
View File

@ -0,0 +1,37 @@
From: Daniel Baumann <mail@daniel-baumann.ch>
Date: Thu, 19 Sep 2013 08:33:12 +0200
Subject: Correcting sanity checks in example initscripts (Closes: #704926).
Last-Update: 2014-07-26
---
scripts/init.d/cgconfig.in | 3 +++
scripts/init.d/cgred.in | 2 +-
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/scripts/init.d/cgconfig.in b/scripts/init.d/cgconfig.in
index f299d0f..d293c62 100644
--- a/scripts/init.d/cgconfig.in
+++ b/scripts/init.d/cgconfig.in
@@ -36,6 +36,9 @@ CONFIG_FILE=/etc/cgconfig.conf
servicename=cgconfig
lockfile=/var/lock/subsys/$servicename
+# Sanity checks
+[ -x $CGCONFIGPARSER_BIN ] || exit 0
+
#
# Source LSB routines
#
diff --git a/scripts/init.d/cgred.in b/scripts/init.d/cgred.in
index 247ec61..c13920d 100644
--- a/scripts/init.d/cgred.in
+++ b/scripts/init.d/cgred.in
@@ -37,7 +37,7 @@ CGRED_BIN=$sbindir/cgrulesengd
CGRED_CONF=/etc/cgrules.conf
# Sanity checks
-[ -x $CGRED_BIN ] || exit 1
+[ -x $CGRED_BIN ] || exit 0
# Source function library & LSB routines
. /etc/rc.d/init.d/functions

26
debian/patches/initscript-return.patch vendored Normal file
View File

@ -0,0 +1,26 @@
From: Daniel Baumann <mail@daniel-baumann.ch>
Date: Mon, 21 Oct 2013 17:23:33 +0200
Subject: Make initscript exit if stop fails (Closes: #642946).
Last-Update: 2014-07-26
---
scripts/init.d/cgconfig.in | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/scripts/init.d/cgconfig.in b/scripts/init.d/cgconfig.in
index d293c62..b5e6740 100644
--- a/scripts/init.d/cgconfig.in
+++ b/scripts/init.d/cgconfig.in
@@ -135,10 +135,8 @@ start() {
stop() {
echo -n "Stopping cgconfig service: "
- cgclear
- rm -f "$lockfile"
- log_success_msg
- return 0
+ cgclear && rm -f "$lockfile" && log_success_msg && return 0
+ exit 1
}
trapped() {

View File

@ -0,0 +1,39 @@
From: Christian Kastner <ckk@debian.org>
Date: Fri, 2 Oct 2015 14:41:56 +0200
Subject: pam_cgroup: Revert broken cache usage
This reverts the following upstream commit:
commit ac6173f74922b7dbc46e87370b9bc42cd0fa892d
Author: Peter Schiffer <pschiffe@redhat.com>
Date: Tue Jun 25 06:37:41 2013 +0200
Subject: Use cache when reading /etc/passwd file
The cache that is to be used is not initialized and therefore remains empty,
hence pam_cgroup doesn't really do anything.
Thanks, Reco, for the report!
Bug: http://sourceforge.net/p/libcg/bugs/52/
Bug-Debian: https://bugs.debian.org/788244
Bug-RedHat: https://bugzilla.redhat.com/show_bug.cgi?id=1060227
Forwarded: not-needed
Last-Update: 2015-10-02
---
src/pam/pam_cgroup.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/pam/pam_cgroup.c b/src/pam/pam_cgroup.c
index 1d78b81..c4ce633 100644
--- a/src/pam/pam_cgroup.c
+++ b/src/pam/pam_cgroup.c
@@ -137,8 +137,7 @@ PAM_EXTERN int pam_sm_open_session(pam_handle_t *pamh, int flags,
/* Note: We are using default gid here. Is there a way to determine
* under what egid service will be provided?
*/
- ret = cgroup_change_cgroup_uid_gid_flags(pwd->pw_uid,
- pwd->pw_gid, pid, CGFLAG_USECACHE);
+ ret = cgroup_change_cgroup_uid_gid(pwd->pw_uid, pwd->pw_gid, pid);
if (ret) {
if (ctrl & PAM_DEBUG_ARG)
pam_syslog(pamh, LOG_ERR, "Change of cgroup for process"

8
debian/patches/series vendored Normal file
View File

@ -0,0 +1,8 @@
cgroup-directory.patch
initscript-exit.patch
template-doc.patch
initscript-return.patch
Syntax-fixes-for-man-pages.patch
pam_cgroup-Revert-broken-cache-usage.patch
CVE-2018-14348.patch
cgrulesengd-_GNU_SOURCE.patch

32
debian/patches/template-doc.patch vendored Normal file
View File

@ -0,0 +1,32 @@
From: Daniel Baumann <mail@daniel-baumann.ch>
Date: Thu, 19 Sep 2013 08:33:12 +0200
Subject: Updating template documentation to match template code (Closes: #682748).
Last-Update: 2014-07-26
---
doc/man/cgrules.conf.5 | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/doc/man/cgrules.conf.5 b/doc/man/cgrules.conf.5
index 7a89fb5..29061b9 100644
--- a/doc/man/cgrules.conf.5
+++ b/doc/man/cgrules.conf.5
@@ -58,12 +58,12 @@ can be:
- path relative to the controller hierarchy (ex. pgrp1/gid1/uid1)
- following strings called "\fBtemplates\fR" and will get expanded
- %u username, uid if name resolving fails
- %U uid
- %g group name, gid if name resolving fails
- %G gid
- %p process name, pid if name not available
- %P pid
+ %u uid
+ %U username, uid if name resolving fails
+ %g gid
+ %G group name, gid if name resolving fails
+ %p pid
+ %P process name, pid if name not available
'\\' can be used to escape '%'
.fi

66
debian/rules vendored Executable file
View File

@ -0,0 +1,66 @@
#!/usr/bin/make -f
# -*- makefile -*-
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
%:
dh ${@}
override_dh_auto_configure:
dh_auto_configure -- \
--libdir /lib/$(DEB_HOST_MULTIARCH) \
--disable-silent-rules \
--enable-opaque-hierarchy="name=systemd"
override_dh_auto_test:
# Disabled. Requires root and also modifies the testbed.
override_dh_installdirs:
dh_installdirs
# While the PAM module and the library are in /lib, according to the
# FHS, development files must go into usr/lib/<triplet>.
mkdir -p debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)
override_dh_auto_install:
dh_auto_install
# libcgroup-dev:
# Move the development files from lib/ to usr/lib. The pkgconfig files
# can be moved as-is, but we need to redirect the .so symlink. dh_link
# will later correct this link for us (from relative to absolute).
cd debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH) && \
mv ../../../lib/$(DEB_HOST_MULTIARCH)/pkgconfig . && \
ln -s ../../../lib/$(DEB_HOST_MULTIARCH)/libcgroup.so.*.*.* libcgroup.so
# libpam-cgroup:
# Rename the PAM module to pam_cgroup.so
cd debian/tmp/lib/$(DEB_HOST_MULTIARCH)/security && \
rm -f pam_cgroup.so && \
mv pam_cgroup.so.*.*.* pam_cgroup.so
# Remove unwanted/unused files (because of --fail-missing)
cd debian/tmp/lib/$(DEB_HOST_MULTIARCH) && \
rm -f *.so security/pam_cgroup.so.* *.la security/*.la
override_dh_missing:
dh_missing --fail-missing
override_dh_compress:
dh_compress -Xexamples
override_dh_makeshlibs:
dh_makeshlibs -Xpam_cgroup.so

1
debian/source/format vendored Normal file
View File

@ -0,0 +1 @@
3.0 (quilt)

6
debian/watch vendored Normal file
View File

@ -0,0 +1,6 @@
version=4
# We have to un-break some upstream version numbers, and transfrom .rc to ~rc
opts="uversionmangle=s/v(\d\.\d+)/$1/;s/\.rc/~rc/" \
https://sf.net/libcg/libcgroup-(.+)\.tar\.bz2