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
adfe9cb4
Unverified
Commit
adfe9cb4
authored
Aug 01, 2017
by
Thomas Lamprecht
Committed by
Stéphane Graber
Aug 15, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
templates/opensuse: tumbleweed has no update repo
As tumbleweed is a rolling release it has not update repository. Signed-off-by:
Thomas Lamprecht
<
t.lamprecht@proxmox.com
>
parent
5d04eb33
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
12 deletions
+23
-12
lxc-opensuse.in
templates/lxc-opensuse.in
+23
-12
No files found.
templates/lxc-opensuse.in
View file @
adfe9cb4
...
@@ -12,6 +12,7 @@
...
@@ -12,6 +12,7 @@
# Frederic Crozat <fcrozat@suse.com>
# Frederic Crozat <fcrozat@suse.com>
# Michael H. Warfield <mhw@WittsEnd.com>
# Michael H. Warfield <mhw@WittsEnd.com>
# Johannes Kastl <mail@ojkastl.de>
# Johannes Kastl <mail@ojkastl.de>
# Thomas Lamprecht <t.lamprecht@proxmox.com>
# This library is free software; you can redistribute it and/or
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# modify it under the terms of the GNU Lesser General Public
...
@@ -138,19 +139,26 @@ download_opensuse()
...
@@ -138,19 +139,26 @@ download_opensuse()
# download a mini opensuse into a cache
# download a mini opensuse into a cache
echo
"Downloading opensuse minimal ..."
echo
"Downloading opensuse minimal ..."
mkdir
-p
"
$cache
/partial-
$arch
-packages"
mkdir
-p
"
$cache
/partial-
$arch
-packages"
oss_repo_url
=
"http://download.opensuse.org/distribution/
$DISTRO
/repo/oss/"
if
[[
$DISTRO
==
"tumbleweed"
]]
;
then
if
[[
$DISTRO
==
"tumbleweed"
]]
;
then
zypper
--quiet
--root
$cache
/partial-
$arch
-packages
--non-interactive
ar http://download.opensuse.org/
$DISTRO
/repo/oss/ repo-oss
||
return
1
oss_repo_url
=
"http://download.opensuse.org/
$DISTRO
/repo/oss/"
else
zypper
--quiet
--root
$cache
/partial-
$arch
-packages
--non-interactive
ar http://download.opensuse.org/distribution/
$DISTRO
/repo/oss/ repo-oss
||
return
1
fi
fi
zypper
--quiet
--root
$cache
/partial-
$arch
-packages
--non-interactive
ar
"
$oss_repo_url
"
repo-oss
||
return
1
update_repo_url
=
"http://download.opensuse.org/update/
$DISTRO
/repo/oss"
# Leap update repos were rearranged
# Leap update repos were rearranged
if
[[
$DISTRO
==
"leap/4"
*
]]
;
then
if
[[
$DISTRO
==
"leap/4"
*
]]
;
then
zypper
--quiet
--root
$cache
/partial-
$arch
-packages
--non-interactive
ar http://download.opensuse.org/update/
$DISTRO
/oss/ update
||
return
1
update_repo_url
=
"http://download.opensuse.org/update/
$DISTRO
/oss/"
else
fi
zypper
--quiet
--root
$cache
/partial-
$arch
-packages
--non-interactive
ar http://download.opensuse.org/update/
$DISTRO
/ update
||
return
1
# tumbleweed has no update repo
if
[[
$DISTRO
!=
"tumbleweed"
]]
;
then
zypper
--quiet
--root
$cache
/partial-
$arch
-packages
--non-interactive
ar
"
$update_repo_url
"
update
||
return
1
fi
fi
zypper
--quiet
--root
$cache
/partial-
$arch
-packages
--non-interactive
--gpg-auto-import-keys
update
||
return
1
zypper
--quiet
--root
$cache
/partial-
$arch
-packages
--non-interactive
--gpg-auto-import-keys
update
||
return
1
zypper
--root
$cache
/partial-
$arch
-packages
--non-interactive
in
--auto-agree-with-licenses
--download-only
zypper lxc patterns-openSUSE-base bash iputils
sed tar
rsyslog
||
return
1
zypper
--root
$cache
/partial-
$arch
-packages
--non-interactive
in
--auto-agree-with-licenses
--download-only
zypper lxc patterns-openSUSE-base bash iputils
sed tar
rsyslog
||
return
1
cat
>
$cache
/partial-
$arch
-packages
/opensuse.conf
<<
EOF
cat
>
$cache
/partial-
$arch
-packages
/opensuse.conf
<<
EOF
Preinstall: aaa_base bash coreutils diffutils
Preinstall: aaa_base bash coreutils diffutils
Preinstall: filesystem fillup glibc grep insserv-compat perl-base
Preinstall: filesystem fillup glibc grep insserv-compat perl-base
...
@@ -207,13 +215,16 @@ EOF
...
@@ -207,13 +215,16 @@ EOF
# openSUSE 13.2 has no noarch directory in update
# 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
[
-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
:
$BUILD_DIR
"
$BUILD_DIR
/init_buildsystem
--clean
--configdir
$BUILD_DIR
/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
repos
=(
"--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"
)
chroot
$cache
/partial-
$arch
/usr/bin/zypper
--quiet
--non-interactive
ar http://download.opensuse.org/distribution/
$DISTRO
/repo/oss repo-oss
||
return
1
if
[[
$DISTRO
!=
"tumbleweed"
]]
;
then
# tumbleweed has no update repo
repos+
=(
"--repository"
"
$cache
/partial-
$arch
-packages/var/cache/zypp/packages/update/
$arch
"
"--repository"
"
$cache
/partial-
$arch
-packages/var/cache/zypp/packages/update/noarch"
)
fi
if
[[
$DISTRO
==
"leap/4"
*
]]
;
then
CLEAN_BUILD
=
1
BUILD_ARCH
=
"
$arch
"
BUILD_ROOT
=
"
$cache
/partial-
$arch
"
BUILD_DIST
=
"
$cache
/partial-
$arch
-packages/opensuse.conf"
PATH
=
"
$PATH
:
$BUILD_DIR
"
$BUILD_DIR
/init_buildsystem
--clean
--configdir
$BUILD_DIR
/configs
--cachedir
$cache
/partial-
$arch
-cache
${
repos
[*]
}
||
return
1
chroot
$cache
/partial-
$arch
/usr/bin/zypper
--quiet
--non-interactive
ar http://download.opensuse.org/update/
$DISTRO
/oss update
||
return
1
else
chroot
$cache
/partial-
$arch
/usr/bin/zypper
--quiet
--non-interactive
ar
"
$oss_repo_url
"
repo-oss
||
return
1
chroot
$cache
/partial-
$arch
/usr/bin/zypper
--quiet
--non-interactive
ar http://download.opensuse.org/update/
$DISTRO
/ update
||
return
1
if
[[
$DISTRO
!=
"tumbleweed"
]]
;
then
chroot
$cache
/partial-
$arch
/usr/bin/zypper
--quiet
--non-interactive
ar
"
$update_repo_url
"
update
||
return
1
fi
fi
# really clean the image
# really clean the image
...
...
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