Преглед на файлове

security mirror, command line commit specification

tags/0.1
devrandom преди 10 години
родител
ревизия
d765459667
променени са 3 файла, в които са добавени 25 реда и са изтрити 1 реда
  1. 4
    0
      README.md
  2. 19
    0
      bin/gbuild
  3. 2
    1
      bin/make-base-vm

+ 4
- 0
README.md Целия файл

@@ -25,6 +25,10 @@ Then execute the build using a YAML description file (can be run as non-root):

bin/gbuild <package>-desc.yml

or if you need to specify a commit for one of the git remotes:

bin/gbuild --commit <dir>=<hash> <package>-desc.yml

The resulting report will appear in result/\<package\>-res.yml

## Poking around

+ 19
- 0
bin/gbuild Целия файл

@@ -109,6 +109,9 @@ OptionParser.new do |opts|
opts.on("-q", "--quiet", "be quiet") do |v|
@options[:skip_image] = v
end
opts.on("-c PAIRS", "--commit PAIRS", "comma separated list of DIRECTORY=COMMIT pairs") do |v|
@options[:commit] = v
end
end.parse!

base_dir = Pathname.new(__FILE__).expand_path.dirname.parent
@@ -146,6 +149,22 @@ build_desc["files"].each do |filename|
in_sums << `cd inputs && sha256sum #{filename}`
end

commits = {}

if @options[:commit]
@options[:commit].split(',').each do |pair|
(dir, commit) = pair.split('=')
commits[dir] = commit
end
end

build_desc["remotes"].each do |remote|
if !remote["commit"]
remote["commit"] = commits[remote["dir"]]
raise "must specify a commit for directory #{remote["dir"]}" unless remote["commit"]
end
end

base_manifests = YAML::Omap.new

suites.each do |suite|

+ 2
- 1
bin/make-base-vm Целия файл

@@ -4,6 +4,7 @@ set -e
SUITE=lucid
ARCH=amd64
MIRROR=http://${MIRROR_HOST:-`hostname`}:3142/archive.ubuntu.com/ubuntu
SECURITY_MIRROR=http://${MIRROR_HOST:-`hostname`}:3142/security.ubuntu.com/ubuntu

usage() {
echo "Usage: ${0##*/} [OPTION]... <command>"
@@ -60,7 +61,7 @@ fi

rm -rf $OUT

sudo vmbuilder kvm ubuntu --arch=$ARCH --suite=$SUITE --addpkg=openssh-server,pciutils,build-essential,git-core,subversion --ssh-key=var/id_dsa.pub --ssh-user-key=var/id_dsa.pub --mirror=$MIRROR --dest=$OUT --flavour=virtual --overwrite
sudo vmbuilder kvm ubuntu --arch=$ARCH --suite=$SUITE --addpkg=openssh-server,pciutils,build-essential,git-core,subversion --ssh-key=var/id_dsa.pub --ssh-user-key=var/id_dsa.pub --mirror=$MIRROR --security-mirror=$SECURITY_MIRROR --dest=$OUT --flavour=virtual

mv $OUT/*.qcow2 $OUT.qcow2


Loading…
Отказ
Запис