Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lxc
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
lxc
Commits
693dcea5
Commit
693dcea5
authored
Oct 26, 2008
by
dlezcano
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed different compilation scheme by making /var/lxc directory relative to
the installation prefix and by adding some extra path to search for the 'setcap' command.
parent
65c46aef
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
35 additions
and
15 deletions
+35
-15
Makefile.am
Makefile.am
+4
-2
configure.in
configure.in
+3
-3
lxc.spec.in
lxc.spec.in
+21
-4
Makefile.am
src/lxc/Makefile.am
+6
-5
lxc.h
src/lxc/lxc.h
+1
-1
No files found.
Makefile.am
View file @
693dcea5
...
@@ -5,12 +5,14 @@ DIST_SUBDIRS = config src test etc
...
@@ -5,12 +5,14 @@ DIST_SUBDIRS = config src test etc
EXTRA_DIST
=
lxc.spec
EXTRA_DIST
=
lxc.spec
ChangeLog
::
ChangeLog
::
@
echo
"Generating ChangeLog"
touch
ChangeLog
@
cvs2cl
rpm
:
dist
rpm
:
dist
rpmbuild
--clean
-ta
${
distdir
}
.tar.gz
rpmbuild
--clean
-ta
${
distdir
}
.tar.gz
release
:
rpm
release
:
rpm
@
echo
"Generating ChangeLog"
@
cvs2cl
@
sh ./release.sh
$(PACKAGE_NAME)
\
@
sh ./release.sh
$(PACKAGE_NAME)
\
$(LXC_MAJOR_VERSION)
\
$(LXC_MAJOR_VERSION)
\
$(LXC_MINOR_VERSION)
\
$(LXC_MINOR_VERSION)
\
...
...
configure.in
View file @
693dcea5
...
@@ -12,7 +12,7 @@ AC_PROG_RANLIB
...
@@ -12,7 +12,7 @@ AC_PROG_RANLIB
AM_PROG_CC_C_O
AM_PROG_CC_C_O
AC_GNU_SOURCE
AC_GNU_SOURCE
AC_PROG_LIBTOOL
AC_PROG_LIBTOOL
AC_CHECK_PROG(SETCAP, setcap, yes, no
, "/usr/sbin"
)
AC_CHECK_PROG(SETCAP, setcap, yes, no)
AC_CHECK_HEADERS([linux/netlink.h linux/genetlink.h], [], AC_MSG_ERROR([netlink headers not found]),
AC_CHECK_HEADERS([linux/netlink.h linux/genetlink.h], [], AC_MSG_ERROR([netlink headers not found]),
[#include <linux/types.h>
[#include <linux/types.h>
...
@@ -59,8 +59,8 @@ Warning:
...
@@ -59,8 +59,8 @@ Warning:
--------
--------
The libcap-2 is not installed. That means the tools to
The libcap-2 is not installed. That means the tools to
set the privilege for the lxc commands are not available
set the privilege for the lxc commands are not available
,
and
you will need to run these commands as root
that's ok, but
you will need to run these commands as root
])
])
...
...
lxc.spec.in
View file @
693dcea5
...
@@ -75,7 +75,9 @@ development of containers
...
@@ -75,7 +75,9 @@ development of containers
%setup -q
%setup -q
%build
%build
%configure $args
# I don't understand why but I have to specify this prefix :(
%configure --prefix=/ $args
ncpus=`egrep -c "^cpu[0-9]+" /proc/stat || :`
ncpus=`egrep -c "^cpu[0-9]+" /proc/stat || :`
make -j$ncpus
make -j$ncpus
...
@@ -106,9 +108,24 @@ fi
...
@@ -106,9 +108,24 @@ fi
chmod ugo+w /var/lxc
chmod ugo+w /var/lxc
setcap cap_net_admin,cap_net_raw,cap_sys_admin,cap_dac_override=ep %{_bindir}/lxc-execute
PATH=$PATH:/usr/sbin:/sbin
setcap cap_net_admin,cap_net_raw,cap_sys_admin,cap_dac_override=ep %{_bindir}/lxc-start
setcap cap_net_admin,cap_net_raw,cap_sys_admin,cap_dac_override=ep %{_bindir}/lxc-restart
which setcap 2>&1 > /dev/null
RES=$?
if [ $RES != 0 ]; then
echo -e "\t********************WARNING*************************"
echo -e "\t* The 'setcap' command was not found, this is not *"
echo -e "\t* a problem and the 'lxc' package is installed but *"
echo -e "\t* you will have to run the 'lxc' commands as root. *"
echo -e "\t* If you wish to run these commands as a non-root *"
echo -e "\t* user, you will need to install libcap-2 package *"
echo -e "\t* and reinstall the lxc package *"
echo -e "\t****************************************************"
else
setcap cap_net_admin,cap_net_raw,cap_sys_admin,cap_dac_override=ep %{_bindir}/lxc-execute && setcap cap_net_admin,cap_net_raw,cap_sys_admin,cap_dac_override=ep %{_bindir}/lxc-start && setcap cap_net_admin,cap_net_raw,cap_sys_admin,cap_dac_override=ep %{_bindir}/lxc-restart
fi
%files
%files
%defattr(-,root,root)
%defattr(-,root,root)
...
...
src/lxc/Makefile.am
View file @
693dcea5
INCLUDES
=
-I
$(top_srcdir)
/sr
c
lxcpath
=
$(prefix)
/var/lx
c
INCLUDES
=
-I
$(top_srcdir)
/src
-DLXCPATH
=
"
\"
$(lxcpath)
\"
"
lib_LTLIBRARIES
=
liblxc.la
lib_LTLIBRARIES
=
liblxc.la
pkginclude_HEADERS
=
\
pkginclude_HEADERS
=
\
monitor.h
\
monitor.h
\
...
@@ -113,9 +113,10 @@ lxc_version_SOURCES = lxc_version.c
...
@@ -113,9 +113,10 @@ lxc_version_SOURCES = lxc_version.c
lxc_version_LDADD
=
liblxc.la
lxc_version_LDADD
=
liblxc.la
install-exec-local
:
install-exec-local
:
-
@/usr/sbin/setcap cap_net_admin,cap_net_raw,cap_sys_admin,cap_dac_override
=
ep
$(bindir)
/lxc-execute 2>&1
>
/dev/null
&&
\
-
@export
PATH
=
$$
PATH:/sbin:/usr/sbin
&&
\
/usr/sbin/setcap cap_net_admin,cap_net_raw,cap_sys_admin,cap_dac_override
=
ep
$(bindir)
/lxc-start
&&
\
setcap cap_net_admin,cap_net_raw,cap_sys_admin,cap_dac_override
=
ep
$(bindir)
/lxc-execute
&&
\
/usr/sbin/setcap cap_net_admin,cap_net_raw,cap_sys_admin,cap_dac_override
=
ep
$(bindir)
/lxc-restart
&&
\
setcap cap_net_admin,cap_net_raw,cap_sys_admin,cap_dac_override
=
ep
$(bindir)
/lxc-start
&&
\
setcap cap_net_admin,cap_net_raw,cap_sys_admin,cap_dac_override
=
ep
$(bindir)
/lxc-restart
&&
\
mkdir
-p
$(prefix)
/var/lxc
&&
\
mkdir
-p
$(prefix)
/var/lxc
&&
\
chmod
ugo+rw
$(prefix)
/var/lxc
||
\
chmod
ugo+rw
$(prefix)
/var/lxc
||
\
(
echo
&&
echo
&&
\
(
echo
&&
echo
&&
\
...
...
src/lxc/lxc.h
View file @
693dcea5
...
@@ -43,7 +43,7 @@ extern "C" {
...
@@ -43,7 +43,7 @@ extern "C" {
#include <lxc/cgroup.h>
#include <lxc/cgroup.h>
#include <lxc/monitor.h>
#include <lxc/monitor.h>
#define LXCPATH "/var/lxc"
/* #define LXCPATH "/var/lxc" */
#define MAXPIDLEN 20
#define MAXPIDLEN 20
struct
lxc_mem_stat
;
struct
lxc_mem_stat
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment