Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
su_debuild
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
puppetpublic
su_debuild
Commits
fc3261b6
Commit
fc3261b6
authored
5 years ago
by
Adam Lewenberg
Browse files
Options
Downloads
Patches
Plain Diff
work on chroot bootstrap issues
parent
e284ae3b
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
manifests/chroot.pp
+16
-5
16 additions, 5 deletions
manifests/chroot.pp
templates/etc/pbuilder/debian.erb
+16
-6
16 additions, 6 deletions
templates/etc/pbuilder/debian.erb
with
32 additions
and
11 deletions
manifests/chroot.pp
+
16
−
5
View file @
fc3261b6
...
@@ -57,8 +57,12 @@ define su_debuild::chroot(
...
@@ -57,8 +57,12 @@ define su_debuild::chroot(
}
}
}
}
file
{
'/etc/pbuilder'
:
ensure
=>
directory
,
}
# There is a chicken-and-egg problem in getting the stanford
# There is a chicken-and-egg problem in getting the stanford
# repository's public key installed. We d
o
this as follows:
# repository's public key installed. We
work aroun
d this as follows:
#
#
# 0. Install the chroot WITHOUT the stanford-keyring.
# 0. Install the chroot WITHOUT the stanford-keyring.
# 1. Copy the correct distribution's sources.list file to /etc/apt.
# 1. Copy the correct distribution's sources.list file to /etc/apt.
...
@@ -85,10 +89,17 @@ define su_debuild::chroot(
...
@@ -85,10 +89,17 @@ define su_debuild::chroot(
require
=>
Exec
[
"cowbuilder --create
${name}
"
];
require
=>
Exec
[
"cowbuilder --create
${name}
"
];
}
}
# 2. Copy the correct sources.list.
# 2. Install the correct sources.list to /etc/pbuild so we can use
file
{
"
$path
/etc/apt/sources.list"
:
# it later. We only need it once.
file
{
"/etc/pbuilder/sources.list.
${name}
"
:
source
=>
"puppet:///modules/su_debuild/etc/apt/sources.list.
${name}
"
,
source
=>
"puppet:///modules/su_debuild/etc/apt/sources.list.
${name}
"
,
require
=>
File
[
"
${path}
/etc/apt/trusted.gpg.d/stanford-keyring.gpg"
],
require
=>
File
[
'/etc/pbuilder'
],
notify
=>
Exec
[
'copy-correct-sources-list'
],
}
exec
{
'copy-correct-sources-list'
:
path
=>
'/usr/sbin:/usr/bin:/bin:/sbin'
,
refreshonly
=>
true
,
command
=>
"cp /etc/pbuilder/sources.list.
${name}
$path
/etc/apt/sources.list"
,
}
}
# 3. Install stanford-keyring. Be sure to run "apt-get update" first.
# 3. Install stanford-keyring. Be sure to run "apt-get update" first.
...
@@ -99,7 +110,7 @@ define su_debuild::chroot(
...
@@ -99,7 +110,7 @@ define su_debuild::chroot(
command
=>
"chroot
$path
apt-get update; chroot
$path
apt-get install stanford-keyring"
,
command
=>
"chroot
$path
apt-get update; chroot
$path
apt-get install stanford-keyring"
,
creates
=>
"
$path
/usr/share/keyrings/stanford-keyring.gpg"
,
creates
=>
"
$path
/usr/share/keyrings/stanford-keyring.gpg"
,
require
=>
[
require
=>
[
File
[
"
$path
/etc/apt/
sources
.
list
"
],
Exec
[
'copy-correct-
sources
-
list
'
],
File
[
"
${path}
/etc/apt/trusted.gpg.d/stanford-keyring.gpg"
],
File
[
"
${path}
/etc/apt/trusted.gpg.d/stanford-keyring.gpg"
],
]
]
}
}
...
...
This diff is collapsed.
Click to expand it.
templates/etc/pbuilder/debian.erb
+
16
−
6
View file @
fc3261b6
# /etc/pbuilder/
<%=
@distribution
%>
-- Debian override configuration file for pbuilder.
# /etc/pbuilder/
<%=
@distribution
%>
-- Debian override configuration file for pbuilder.
MIRRORSITE=http://debian.stanford.edu/debian
MIRRORSITE=http://debian.stanford.edu/debian
# We always want the "stanford" and "local" Stanford-specific Debian repository.
OTHERMIRROR="deb http://debian.stanford.edu/debian-stanford
<%=
@distribution
%>
main contrib non-free"
OTHERMIRROR="$OTHERMIRROR |deb http://debian.stanford.edu/debian-local
<%=
@distribution
%>
main contrib non-free"
<%-
<%-
if
(
@include_backports
)
then
if
(
@include_backports
)
then
backports_comment_character
=
""
backports_message
=
"We want backports."
else
backports_comment
=
"# "
backports_message
=
"Backports distribution either no longer available or not yet
\n
"
+
"available so omitting"
end
-%>
-%>
OTHERMIRROR="deb http://debian.stanford.edu/debian
<%=
@distribution
%>
-backports main contrib non-free"
<%=
backports_message
%>
<%-
else
-%>
<%=
backports_comment
%>
OTHERMIRROR="$OTHERMIRROR |deb http://debian.stanford.edu/debian
<%=
@distribution
%>
-backports main contrib non-free"
# Backports distribution either no longer available or not yet
<%=
backports_comment
%>
OTHERMIRROR="$OTHERMIRROR |deb http://debian.stanford.edu/debian-stanford
<%=
@distribution
%>
-backports main contrib non-free"
# available so omitting
# OTHERMIRROR="deb http://debian.stanford.edu/debian
<%=
@distribution
%>
-backports main contrib non-free"
<%-
end
-%>
<%-
if
(
@include_stanford_keyring
)
then
-%>
<%-
if
(
@include_stanford_keyring
)
then
-%>
EXTRAPACKAGES="aptitude debconf-utils debhelper gnupg stanford-keyring"
EXTRAPACKAGES="aptitude debconf-utils debhelper gnupg stanford-keyring"
<%-
else
-%>
<%-
else
-%>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment