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
2e7a16a5
Commit
2e7a16a5
authored
Nov 06, 2014
by
Johannes Kastl
Committed by
Stéphane Graber
Nov 25, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lxc-opensuse: template now understands release arguments
Signed-off-by:
Johannes Kastl
<
git@ojkastl.de
>
Acked-by:
Stéphane Graber
<
stgraber@ubuntu.com
>
parent
3726cda2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
4 deletions
+18
-4
lxc-opensuse.in
templates/lxc-opensuse.in
+18
-4
No files found.
templates/lxc-opensuse.in
View file @
2e7a16a5
...
@@ -39,8 +39,6 @@ done
...
@@ -39,8 +39,6 @@ done
# Make sure the usual locations are in PATH
# Make sure the usual locations are in PATH
export
PATH
=
$PATH
:/usr/sbin:/usr/bin:/sbin:/bin
export
PATH
=
$PATH
:/usr/sbin:/usr/bin:/sbin:/bin
DISTRO
=
12.3
configure_opensuse
()
configure_opensuse
()
{
{
rootfs
=
$1
rootfs
=
$1
...
@@ -164,6 +162,12 @@ Support: pwdutils rpcbind sysconfig
...
@@ -164,6 +162,12 @@ Support: pwdutils rpcbind sysconfig
Ignore: rpm:suse-build-key,build-key
Ignore: rpm:suse-build-key,build-key
Ignore: systemd:systemd-presets-branding
Ignore: systemd:systemd-presets-branding
EOF
EOF
if
[
$DISTRO
=
"13.2"
]
then
echo
"Support: python3-base"
>>
$cache
/partial-
$arch
-packages
/opensuse.conf
fi
if
[
"
$arch
"
=
"i686"
]
;
then
if
[
"
$arch
"
=
"i686"
]
;
then
mkdir
-p
$cache
/partial-
$arch
-packages
/var/cache/zypp/packages/repo-oss/suse/i686/
mkdir
-p
$cache
/partial-
$arch
-packages
/var/cache/zypp/packages/repo-oss/suse/i686/
for
i
in
"
$cache
/partial-
$arch
-packages/var/cache/zypp/packages/repo-oss/suse/i586/*"
;
do
for
i
in
"
$cache
/partial-
$arch
-packages/var/cache/zypp/packages/repo-oss/suse/i586/*"
;
do
...
@@ -175,6 +179,9 @@ EOF
...
@@ -175,6 +179,9 @@ EOF
done
done
fi
fi
# openSUSE 13.2 has no noarch directory in update
[
-d
$cache
/partial-
$arch
-packages
/var/cache/zypp/packages/update/noarch
]
||
mkdir
-p
$cache
/partial-
$arch
-packages
/var/cache/zypp/packages/update/noarch
CLEAN_BUILD
=
1
BUILD_ARCH
=
"
$arch
"
BUILD_ROOT
=
"
$cache
/partial-
$arch
"
BUILD_DIST
=
"
$cache
/partial-
$arch
-packages/opensuse.conf"
PATH
=
"
$PATH
:/usr/lib/build"
/usr/lib/build/init_buildsystem
--clean
--configdir
/usr/lib/build/configs
--cachedir
$cache
/partial-
$arch
-cache
--repository
$cache
/partial-
$arch
-packages
/var/cache/zypp/packages/repo-oss/suse/
$arch
--repository
$cache
/partial-
$arch
-packages
/var/cache/zypp/packages/repo-oss/suse/noarch
--repository
$cache
/partial-
$arch
-packages
/var/cache/zypp/packages/update/
$arch
--repository
$cache
/partial-
$arch
-packages
/var/cache/zypp/packages/update/noarch
||
return
1
CLEAN_BUILD
=
1
BUILD_ARCH
=
"
$arch
"
BUILD_ROOT
=
"
$cache
/partial-
$arch
"
BUILD_DIST
=
"
$cache
/partial-
$arch
-packages/opensuse.conf"
PATH
=
"
$PATH
:/usr/lib/build"
/usr/lib/build/init_buildsystem
--clean
--configdir
/usr/lib/build/configs
--cachedir
$cache
/partial-
$arch
-cache
--repository
$cache
/partial-
$arch
-packages
/var/cache/zypp/packages/repo-oss/suse/
$arch
--repository
$cache
/partial-
$arch
-packages
/var/cache/zypp/packages/repo-oss/suse/noarch
--repository
$cache
/partial-
$arch
-packages
/var/cache/zypp/packages/update/
$arch
--repository
$cache
/partial-
$arch
-packages
/var/cache/zypp/packages/update/noarch
||
return
1
chroot
$cache
/partial-
$arch
/usr/bin/zypper
--quiet
--non-interactive
ar http://download.opensuse.org/distribution/
$DISTRO
/repo/oss repo-oss
||
return
1
chroot
$cache
/partial-
$arch
/usr/bin/zypper
--quiet
--non-interactive
ar http://download.opensuse.org/distribution/
$DISTRO
/repo/oss repo-oss
||
return
1
chroot
$cache
/partial-
$arch
/usr/bin/zypper
--quiet
--non-interactive
ar http://download.opensuse.org/update/
$DISTRO
/ update
||
return
1
chroot
$cache
/partial-
$arch
/usr/bin/zypper
--quiet
--non-interactive
ar http://download.opensuse.org/update/
$DISTRO
/ update
||
return
1
...
@@ -219,7 +226,7 @@ copy_opensuse()
...
@@ -219,7 +226,7 @@ copy_opensuse()
install_opensuse
()
install_opensuse
()
{
{
cache
=
"@LOCALSTATEDIR@/cache/lxc/opensuse"
cache
=
"@LOCALSTATEDIR@/cache/lxc/opensuse
/
$DISTRO
"
rootfs
=
$1
rootfs
=
$1
mkdir
-p
@LOCALSTATEDIR@/lock/subsys/
mkdir
-p
@LOCALSTATEDIR@/lock/subsys/
(
(
...
@@ -379,7 +386,7 @@ EOF
...
@@ -379,7 +386,7 @@ EOF
# Make arch a global. This may become configurable?
# Make arch a global. This may become configurable?
arch
=
$(
uname
-m
)
arch
=
$(
uname
-m
)
options
=
$(
getopt
-o
hp:n:
c
-l
help
,rootfs:,path:,nam
e:,clean
--
"
$@
"
)
options
=
$(
getopt
-o
hp:n:
r:c
-l
help
,rootfs:,path:,name:,releas
e:,clean
--
"
$@
"
)
if
[
$?
-ne
0
]
;
then
if
[
$?
-ne
0
]
;
then
usage
$(
basename
$0
)
usage
$(
basename
$0
)
exit
1
exit
1
...
@@ -393,6 +400,7 @@ do
...
@@ -393,6 +400,7 @@ do
-p
|
--path
)
path
=
$2
;
shift
2
;;
-p
|
--path
)
path
=
$2
;
shift
2
;;
--rootfs
)
rootfs
=
$2
;
shift
2
;;
--rootfs
)
rootfs
=
$2
;
shift
2
;;
-n
|
--name
)
name
=
$2
;
shift
2
;;
-n
|
--name
)
name
=
$2
;
shift
2
;;
-r
|
--release
)
DISTRO
=
$2
;
shift
2
;;
-c
|
--clean
)
clean
=
$2
;
shift
2
;;
-c
|
--clean
)
clean
=
$2
;
shift
2
;;
--
)
shift
1
;
break
;;
--
)
shift
1
;
break
;;
*
)
break
;;
*
)
break
;;
...
@@ -415,6 +423,12 @@ if [ -z "$path" ]; then
...
@@ -415,6 +423,12 @@ if [ -z "$path" ]; then
exit
1
exit
1
fi
fi
if
[
-z
"
$DISTRO
"
]
;
then
echo
"No release selected, using openSUSE 12.3"
DISTRO
=
12.3
fi
if
[
"
$(
id
-u
)
"
!=
"0"
]
;
then
if
[
"
$(
id
-u
)
"
!=
"0"
]
;
then
echo
"This script should be run as 'root'"
echo
"This script should be run as 'root'"
exit
1
exit
1
...
...
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