Commit f0290acc authored by Wouter Verhelst's avatar Wouter Verhelst

Make the build fail on (useful) errors

parent 964757ef
......@@ -2,39 +2,37 @@ stages:
- english
- translations
- merge
.build-common: &common
before_script:
- apt-get update
- apt-get -y install wml make gettext git opencc diffstat libintl-perl libxml-rss-perl wget libtimedate-perl
# english, which we do always
english:
<<: *common
stage: english
image: debian:stretch
image: registry.salsa.debian.org/webmaster-team/webwml/build:latest
script:
- make LANGUAGES=english install
- make LANGUAGES=english STRICT_ERROR_CHECKS=1 USE_SAMPLE_FILES=1 install
after_script:
- mkdir -p .public
- mv ../www .public/english
artifacts:
untracked: true
when: always
paths:
- .public
# translations
.build: &build
<<: *common
image: debian:stretch
image: registry.salsa.debian.org/webmaster-team/webwml/build:latest
stage: translations
retry: 2
script:
- if [ ! -z "$(git log -p ${CI_COMMIT_BEFORE_SHA}..HEAD|diffstat -p1 -l|grep '/'|cut -d'/' -f1|uniq|grep ${CI_JOB_NAME})" ]; then make LANGUAGES=${CI_JOB_NAME} install; else echo "no changes for $CI_JOB_NAME"; fi
- if ci/build-me; then make LANGUAGES=${CI_JOB_NAME} STRICT_ERROR_CHECKS=1 USE_SAMPLE_FILES=1 install; else echo "no changes for $CI_JOB_NAME"; fi
after_script:
- mkdir -p .public
- mv ../www .public/${CI_JOB_NAME}
artifacts:
when: always
paths:
- .public
- .public/$CI_JOB_NAME
merge:
stage: merge
image: debian:stretch
before_script:
- apt-get update
- apt-get -y install rsync
......
......@@ -11,6 +11,10 @@ else
IGNORE =
endif
# Turn this on to use (small) sample files for data that generated from
# cronjobs on the official website.
USE_SAMPLE_FILES := 0
ENGLISHSRCDIR := $(WMLBASE)/../english
ENGLISHDIR := $(ENGLISHSRCDIR)
# ^ just an alias ^
......
Building the website with GitLab CI
===================================
On every commit, the website will be built. By default, only the
following parts will be built:
- The english website (always).
- If any files were touched under a translation directory, that
translation.
The built files will be made available as artifacts. These can be
browsed through the GitLab webinterface for basic review and validation
of any made changes. Note, however, that content negotiation does not
work on GitLab, and that internal links will be broken (because they
miss the `$language.html` suffix). This is expected.
The build can be fine-tuned by setting the list of forced translations.
This list can be set in two ways:
1. Add a line starting with `forced translations:` to the commit
message, followed by the list;
2. Set the environment variable `WEBWML_FORCED_TRANSLATIONS` to the
list of translations wanted. This can be done by going to the "CI/CD"
option in the left-hand-side menu of GitLab, then choosing
"Pipelines", and "Run Pipeline". There, fill out the name of the
variable in "Input variable key" and its value in "Input variable
value". You must be logged in and have access to the repository to be
able to do so (but you may fork the repository, if you prefer).
If the list of translations is set to 'all', then all translations will
be built. If the list of translations is set to a space-separated list
of languages, then any language in that list will be built.
To skip GitLab CI altogether, make sure that either `[skip ci]` or `[ci
skip]` occurs in the commit message.
The CI jobs use a docker image that is stored in the GitLab container
registry. The Dockerfile for this image is stored [in this
repository](docker-image/Dockerfile)
#!/usr/bin/perl -w
use strict;
use warnings;
my $is_forced = 0;
my @translations;
if(defined($ENV{WEBWML_FORCE_TRANSLATIONS})) {
@translations = split(' ', $ENV{WEBWML_FORCED_TRANSLATIONS});
} else {
if($ENV{CI_COMMIT_MESSAGE} =~ /force translations:(.*)/i) {
@translations = split(' ', $1);
}
}
if(scalar(grep(/$ENV{CI_JOB_NAME}/, @translations)) > 0) {
exit 0;
}
if(scalar(@translations) > 0 && $translations[0] eq 'all') {
exit 0;
}
open GIT, "git log -p \$CI_COMMIT_BEFORE_SHA..HEAD|diffstat -p1 -l|";
while(<GIT>) {
next unless /\//;
my @dirparts = split(\//);
if($dirparts[0] eq $ENV{CI_JOB_NAME}) {
close GIT;
exit 0;
}
}
close GIT;
exit 1;
FROM debian:stretch
MAINTAINER Wouter Verhelst <wouter@debian.org>
RUN apt-get update
# This creates several layers. This is *ON PURPOSE*. The alternative is
# to have a nearly 2G single layer; pushing that takes multiple hours,
# and pulling that is sloooow too.
RUN apt-get -y install wml make gettext && apt-get clean
RUN apt-get -y install git opencc diffstat && apt-get clean
RUN apt-get -y install libintl-perl libxml-rss-perl wget libtimedate-perl libsoap-lite-perl liblocale-gettext-perl && apt-get clean
RUN apt-get -y install texlive-latex-base texlive-binaries texlive-fonts-recommended && apt-get clean
RUN apt-get -y install debiandoc-sgml python-lxml && apt-get clean
......@@ -21,6 +21,9 @@ index.$(LANGUAGE).html: index.wml $(TEMPLDIR)/cdimage.wml \
$(TEMPLDIR)/release_info.wml $(TEMPLDIR)/release_images.wml | $(VCSREVCACHE)
ifeq "$(LANGUAGE)" "en"
$(ENGLISHDIR)/mirror/Mirrors.masterlist:
$(MAKE) -C $(ENGLISHDIR)/mirror Mirrors.masterlist
$(ENGLISHDIR)/CD/http-ftp/cdimage_mirrors.list: \
$(ENGLISHDIR)/mirror/mirror_list.pl $(ENGLISHDIR)/mirror/Mirrors.masterlist
$< -m $(word 2,$^) -t cdimages-httpftp > $@
......
......@@ -20,6 +20,10 @@ rsync-mirrors.$(LANGUAGE).html: rsync-mirrors.wml $(TEMPLDIR)/cdimage.wml \
$(ENGLISHDIR)/CD/mirroring/cdimage_mirrors.list | $(VCSREVCACHE)
ifeq "$(LANGUAGE)" "en"
$(ENGLISHDIR)/mirror/Mirrors.masterlist:
$(MAKE) -C $(ENGLISHDIR)/mirror Mirrors.masterlist
$(ENGLISHDIR)/CD/mirroring/cdimage_mirrors.list: \
$(ENGLISHDIR)/mirror/mirror_list.pl $(ENGLISHDIR)/mirror/Mirrors.masterlist
$< -m $(word 2,$^) -t cdimages-rsync > $@
......
......@@ -15,3 +15,8 @@ leader.$(LANGUAGE).html: leader.wml $(TEMPLDIR)/template.wml \
people.$(LANGUAGE).html: people.wml $(TEMPLDIR)/template.wml \
$(ENGLISHSRCDIR)/devel/people.names
index.$(LANGUAGE).html: index.wml $(TEMPLDIR)/template.wml
ifeq ($(USE_SAMPLE_FILES),1)
$(ENGLISHSRCDIR)/devel/people.names: $(ENGLISHSRCDIR)/devel/people.names.sample
if [ ! -f $@ ]; then cp $< $@; else touch $@; fi
endif
......@@ -32,5 +32,9 @@ card.dvi: card.tex bottle.eps
# the non-english directories shouldn't try to install them
$(HTMLDIR)/card.tex: card.tex
install -m 664 -p card.tex $(HTMLDIR)
else
# Create this rule so CI doesn't die
$(HTMLDIR)/card.tex:
endif
<dl>
<dt><strong><a name="MAINT_3-D_printer_team">3-D printer team</a></strong> &nbsp;<a href="mailto:3dprinter-general@lists.alioth.debian.org">&lt;3dprinter-general@lists.alioth.debian.org&gt;</a>
&nbsp;(<a href="https://qa.debian.org/developer.php?login=3dprinter-general@lists.alioth.debian.org">QA page</a>)
<dd><strong>main:</strong> &nbsp;&nbsp;arduino-mighty-1284p, cura-engine, libpolyclipping-dev, libpolyclipping16, libpolyclipping22, python-power, python3-power, sfact, skeinforge
<dt><strong><a name="MAINT_Aide_Maintainers">Aide Maintainers</a></strong> &nbsp;<a href="mailto:pkg-aide-maintainers@lists.alioth.debian.org">&lt;pkg-aide-maintainers@lists.alioth.debian.org&gt;</a>
&nbsp;(<a href="https://qa.debian.org/developer.php?login=pkg-aide-maintainers@lists.alioth.debian.org">QA page</a>)
<dd><strong>main:</strong> &nbsp;&nbsp;aide, aide-common, aide-dynamic, aide-xen
<dt><strong><a name="MAINT_Android_tools_Maintainer">Android tools Maintainer</a></strong> &nbsp;<a href="mailto:android-tools-devel@lists.alioth.debian.org">&lt;android-tools-devel@lists.alioth.debian.org&gt;</a>
&nbsp;(<a href="https://qa.debian.org/developer.php?login=android-tools-devel@lists.alioth.debian.org">QA page</a>)
<dd><strong>main:</strong> &nbsp;&nbsp;aapt, android-libandroidfw, android-libandroidfw-dev, android-libcutils, android-libcutils-dev, android-libhost, android-libhost-dev, android-liblog, android-liblog-dev, android-libutils, android-libutils-dev, android-libzipfile, android-libzipfile-dev, android-system-dev, android-tools-adb, android-tools-fastboot, android-tools-fsutils, dummydroid, enjarify, zipalign
<dd><strong>contrib:</strong> &nbsp;&nbsp;google-android-build-tools-17-installer, google-android-build-tools-18-installer, google-android-build-tools-19-installer, google-android-build-tools-20-installer, google-android-build-tools-21-installer, google-android-build-tools-22-installer, google-android-build-tools-23-installer, google-android-build-tools-24-installer, google-android-build-tools-installer, google-android-m2repository-installer, google-android-ndk-installer, google-android-platform-10-installer, google-android-platform-11-installer, google-android-platform-12-installer, google-android-platform-13-installer, google-android-platform-14-installer, google-android-platform-15-installer, google-android-platform-16-installer, google-android-platform-17-installer, google-android-platform-18-installer, google-android-platform-19-installer, google-android-platform-2-installer, google-android-platform-20-installer, google-android-platform-21-installer, google-android-platform-22-installer, google-android-platform-23-installer, google-android-platform-24-installer, google-android-platform-3-installer, google-android-platform-4-installer, google-android-platform-5-installer, google-android-platform-6-installer, google-android-platform-7-installer, google-android-platform-8-installer, google-android-platform-9-installer, google-android-sdk-docs-installer, repo
<dt><strong><a name="MAINT_wouter"></a><a name="MAINT_Verhelst">Verhelst</a>, Wouter</strong> &nbsp;<a href="mailto:wouter@debian.org">&lt;wouter@debian.org&gt;</a>
&nbsp;(<a href="https://qa.debian.org/developer.php?login=wouter@debian.org">QA page</a>)
(<a href="http://www.grep.be/">home page</a>)
<dd><strong>main:</strong> &nbsp;&nbsp;aspic, fdpowermon, fdpowermon-icons, libnet-ssh-authorizedkeysfile-perl*, libola-dev, libola1, logtool, nbd-client, nbd-client-udeb, nbd-server, ola, ola-python, ola-rdm-tests, partman-nbd*, pmw, pmw-doc, sreview-common, sreview-detect, sreview-encoder, sreview-master, sreview-web
</dl>
aide Aide Maintainers <aide@packages.debian.org>
aide-common Aide Maintainers <aide@packages.debian.org>
aide-dbgsym Aide Maintainers <pkg-aide-maintainers@lists.alioth.debian.org>
aide-dynamic Aide Maintainers <aide@packages.debian.org>
aide-dynamic-dbgsym Aide Maintainers <pkg-aide-maintainers@lists.alioth.debian.org>
aide-xen Aide Maintainers <aide@packages.debian.org>
aide-xen-dbgsym Aide Maintainers <pkg-aide-maintainers@lists.alioth.debian.org>
android-libhost Android tools Maintainer <android-tools-devel@lists.alioth.debian.org>
android-libhost-dev Android tools Maintainer <android-tools-devel@lists.alioth.debian.org>
android-libzipfile Android tools Maintainer <android-tools-devel@lists.alioth.debian.org>
android-libzipfile-dev Android tools Maintainer <android-tools-devel@lists.alioth.debian.org>
android-system-dev Android tools Maintainer <android-tools-devel@lists.alioth.debian.org>
arduino-mighty-1284p 3-D printer team <3dprinter-general@lists.alioth.debian.org>
aspic Wouter Verhelst <wouter@debian.org>
dummydroid Android tools Maintainer <android-tools-devel@lists.alioth.debian.org>
enjarify Android tools Maintainer <android-tools-devel@lists.alioth.debian.org>
fdpowermon-icons Wouter Verhelst <wouter@debian.org>
fdpowermon Wouter Verhelst <wouter@debian.org>
google-android-build-tools-17-installer Android tools Maintainer <android-tools-devel@lists.alioth.debian.org>
google-android-build-tools-18-installer Android tools Maintainer <android-tools-devel@lists.alioth.debian.org>
google-android-build-tools-19-installer Android tools Maintainer <android-tools-devel@lists.alioth.debian.org>
google-android-build-tools-20-installer Android tools Maintainer <android-tools-devel@lists.alioth.debian.org>
google-android-build-tools-21-installer Android tools Maintainer <android-tools-devel@lists.alioth.debian.org>
google-android-build-tools-22-installer Android tools Maintainer <android-tools-devel@lists.alioth.debian.org>
google-android-build-tools-23-installer Android tools Maintainer <android-tools-devel@lists.alioth.debian.org>
google-android-build-tools-24-installer Android tools Maintainer <android-tools-devel@lists.alioth.debian.org>
google-android-build-tools-installer Android tools Maintainer <android-tools-devel@lists.alioth.debian.org>
google-android-installers Android tools Maintainer <android-tools-devel@lists.alioth.debian.org>
google-android-m2repository-installer Android tools Maintainer <android-tools-devel@lists.alioth.debian.org>
google-android-ndk-installer Android tools Maintainer <android-tools-devel@lists.alioth.debian.org>
google-android-platform-10-installer Android tools Maintainer <android-tools-devel@lists.alioth.debian.org>
google-android-platform-11-installer Android tools Maintainer <android-tools-devel@lists.alioth.debian.org>
google-android-platform-12-installer Android tools Maintainer <android-tools-devel@lists.alioth.debian.org>
google-android-platform-13-installer Android tools Maintainer <android-tools-devel@lists.alioth.debian.org>
google-android-platform-14-installer Android tools Maintainer <android-tools-devel@lists.alioth.debian.org>
google-android-platform-15-installer Android tools Maintainer <android-tools-devel@lists.alioth.debian.org>
google-android-platform-16-installer Android tools Maintainer <android-tools-devel@lists.alioth.debian.org>
google-android-platform-17-installer Android tools Maintainer <android-tools-devel@lists.alioth.debian.org>
google-android-platform-18-installer Android tools Maintainer <android-tools-devel@lists.alioth.debian.org>
google-android-platform-19-installer Android tools Maintainer <android-tools-devel@lists.alioth.debian.org>
google-android-platform-20-installer Android tools Maintainer <android-tools-devel@lists.alioth.debian.org>
google-android-platform-21-installer Android tools Maintainer <android-tools-devel@lists.alioth.debian.org>
google-android-platform-22-installer Android tools Maintainer <android-tools-devel@lists.alioth.debian.org>
google-android-platform-23-installer Android tools Maintainer <android-tools-devel@lists.alioth.debian.org>
google-android-platform-24-installer Android tools Maintainer <android-tools-devel@lists.alioth.debian.org>
google-android-platform-2-installer Android tools Maintainer <android-tools-devel@lists.alioth.debian.org>
google-android-platform-3-installer Android tools Maintainer <android-tools-devel@lists.alioth.debian.org>
google-android-platform-4-installer Android tools Maintainer <android-tools-devel@lists.alioth.debian.org>
google-android-platform-5-installer Android tools Maintainer <android-tools-devel@lists.alioth.debian.org>
google-android-platform-6-installer Android tools Maintainer <android-tools-devel@lists.alioth.debian.org>
google-android-platform-7-installer Android tools Maintainer <android-tools-devel@lists.alioth.debian.org>
google-android-platform-8-installer Android tools Maintainer <android-tools-devel@lists.alioth.debian.org>
google-android-platform-9-installer Android tools Maintainer <android-tools-devel@lists.alioth.debian.org>
google-android-sdk-docs-installer Android tools Maintainer <android-tools-devel@lists.alioth.debian.org>
libola1 Wouter Verhelst <wouter@debian.org>
libola-dev Wouter Verhelst <wouter@debian.org>
libpolyclipping16 3-D printer team <3dprinter-general@lists.alioth.debian.org>
libpolyclipping22 3-D printer team <3dprinter-general@lists.alioth.debian.org>
libpolyclipping 3-D printer team <3dprinter-general@lists.alioth.debian.org>
libpolyclipping-dev 3-D printer team <3dprinter-general@lists.alioth.debian.org>
logtool Wouter Verhelst <wouter@debian.org>
nbd-client-udeb Wouter Verhelst <wouter@debian.org>
nbd-client Wouter Verhelst <wouter@debian.org>
nbd-server Wouter Verhelst <wouter@debian.org>
nbd Wouter Verhelst <wouter@debian.org>
ola-python Wouter Verhelst <wouter@debian.org>
ola-rdm-tests Wouter Verhelst <wouter@debian.org>
ola Wouter Verhelst <wouter@debian.org>
pmw-doc Wouter Verhelst <wouter@debian.org>
pmw Wouter Verhelst <wouter@debian.org>
repo Android tools Maintainer <android-tools-devel@lists.alioth.debian.org>
sfact 3-D printer team <3dprinter-general@lists.alioth.debian.org>
skeinforge 3-D printer team <3dprinter-general@lists.alioth.debian.org>
sreview-common Wouter Verhelst <wouter@debian.org>
sreview-detect Wouter Verhelst <wouter@debian.org>
sreview-encoder Wouter Verhelst <wouter@debian.org>
sreview-master Wouter Verhelst <wouter@debian.org>
sreview-web Wouter Verhelst <wouter@debian.org>
sreview Wouter Verhelst <wouter@debian.org>
......@@ -24,10 +24,18 @@ DATADIR = $(ENGLISHSRCDIR)/$(CUR_DIR)
$(GETTEXTDEP) | $(VCSREVCACHE)
$(WML) $(<F)
ifeq ($(USE_SAMPLE_FILES),1)
$(DATADIR)/Maintainers: $(DATADIR)/Maintainers.sample
if [ ! -f $@ ]; then cp $< $@; else touch $@; fi
endif
$(DATADIR)/wnpp.data: WMLOUTFILE=$(DATADIR)/wnpp.data
$(DATADIR)/wnpp.data:
$(DATADIR)/wnpp.data: $(DATADIR)/Maintainers $(ENGLISHSRCDIR)/international/l10n/data/popcon
$(WML) -W7,-Squotes $(DATADIR)/wnpp.pl
$(ENGLISHSRCDIR)/international/l10n/data/popcon:
$(MAKE) -C $(ENGLISHSRCDIR)/international/l10n data/popcon
ifeq "$(LANGUAGE)" "en"
.PHONY: $(DATADIR)/wnpp.data
.DELETE_ON_ERROR: $(DATADIR)/wnpp.data
......
......@@ -36,6 +36,9 @@ $(ENGLISHSRCDIR)/distrib/pre-installed.inc: pre-installed.data count
clean::
rm -f archive.mirrors
$(ENGLISHSRCDIR)/mirror/Mirrors.masterlist:
$(MAKE) -C $(ENGLISHSRCDIR)/mirror/Mirrors.masterlist
$(ENGLISHSRCDIR)/distrib/archive.mirrors: \
$(ENGLISHSRCDIR)/mirror/Mirrors.masterlist $(ENGLISHSRCDIR)/mirror/mirror_list.pl
echo "#use wml::debian::countries" > $@
......
......@@ -9,3 +9,10 @@ GETTEXTFILES += l10n.mo
include $(WMLBASE)/Make.lang
ifeq ($(USE_SAMPLE_FILES),1)
$(ENGLISHSRCDIR)/$(CUR_DIR)/data/%: $(ENGLISHSRCDIR)/$(CUR_DIR)/data/%.sample
if [ ! -f $@ ]; then cp $< $@; else touch $@; fi
data/popcon: $(ENGLISHSRCDIR)/$(CUR_DIR)/data/popcon
data/unstable: $(ENGLISHSRCDIR)/$(CUR_DIR)/data/unstable
endif
4979 python-pmw 1712 444 1132 75 61
5985 nbd 1088 464 599 25 0
6135 aide 1032 910 115 7 0
9093 maven-repo-helper 390 66 292 32 0
10089 libpolyclipping 295 0 0 0 295
10097 fdpowermon 294 71 115 4 104
10495 enjarify 269 24 230 15 0
10609 repo 263 38 214 11 0
10727 google-android-installers 255 0 0 0 255
11712 arduino-mighty-1284p 199 5 182 12 0
14167 ola 117 41 23 9 44
15657 google-android-ndk-installer 86 6 73 5 2
15658 google-android-sdk-docs-installer 86 0 0 0 86
17228 dummydroid 62 2 38 22 0
18218 logtool 50 12 36 1 1
18592 pmw 46 4 27 4 11
18828 google-android-build-tools-installer 43 3 36 3 1
19131 aspic 40 6 33 1 0
24357 google-android-m2repository-installer 12 0 11 1 0
28457 sreview 3 2 1 0 0
29152 golang-github-bshuster-repo-logrus-logstash-hook 1 0 0 0 1
This diff is collapsed.
......@@ -14,11 +14,12 @@ DIST = unstable
SORT_PKGS = $(L10N_DIR)/data/popcon
LANGS_PO := $(shell grep 'po:' $(L10N_DIR)/data/langs | sed -e 's/po: *//')
HTML_PO := $(foreach lang,$(LANGS_PO),$(lang).$(LANGUAGE).html)
all:: $(HTML_PO)
WEAK_FAILURES = $(wildcard *.wml)
tmpl.$(LANGUAGE).tmpl: tmpl.src $(L10N_DIR)/dtc.def $(ENGLISHDIR)/$(CUR_DIR)/menu.inc $(L10N_DIR)/date.gen $(GETTEXTDEP)
$(WML) tmpl.src
......@@ -34,6 +35,11 @@ $(HTMLFILES): $(ENGLISHDIR)/$(CUR_DIR)/menu.inc $(L10N_DIR)/dtc.def $(L10N_DIR)/
$(HTML_PO): tmpl.$(LANGUAGE).tmpl $(ENGLISHDIR)/$(CUR_DIR)/gen/main.exc
$(L10N_DIR)/scripts/fix-files.sh $(ENGLISHDIR)/$(CUR_DIR)/gen $(LANGUAGE) tmpl $(LANGS_PO)
ifeq ($(USE_SAMPLE_FILES),1)
$(L10N_DIR)/data/%:
$(MAKE) -C $(L10N_DIR) data/$(notdir $@)
endif
$(ENGLISHDIR)/$(CUR_DIR)/gen/main.exc $(ENGLISHDIR)/$(CUR_DIR)/gen/rank.inc $(L10N_DIR)/date.gen $(L10N_DIR)/data/langs: $(L10N_DIR)/scripts/gen-files.pl $(L10N_DIR)/data/$(DIST)
-rm -rf $(ENGLISHDIR)/$(CUR_DIR)/../*/gen
$(L10N_DIR)/scripts/isoquery.pl
......@@ -45,4 +51,3 @@ clean::
-rm -f $(L10N_DIR)/*.dir $(L10N_DIR)/*.pag
install:: $(patsubst %,$(HTMLDIR)/%,$(HTML_PO))
......@@ -25,6 +25,13 @@ list-full.$(LANGUAGE).html: list-full.wml $(TEMPLDIR)/template.wml \
$(ENGLISHDIR)/mirror/list-full.inc
size.$(LANGUAGE).html: size.wml $(ENGLISHDIR)/mirror/size.data
ifeq ($(USE_SAMPLE_FILES),1)
Mirrors.masterlist: $(ENGLISHDIR)/mirror/Mirrors.masterlist
$(ENGLISHDIR)/mirror/Mirrors.masterlist: $(ENGLISHDIR)/mirror/Mirrors.masterlist.sample
if [ ! -f $@ ]; then cp $< $@; else touch $@; fi
endif
# there only needs to be one version of the following so
# the non-english directories shouldn't try to install them
ifeq "$(LANGUAGE)" "en"
......
Site: ftp-master.debian.org
Archive-unlisted-http: /debian/
Type: Origin
Archive-architecture: amd64 arm64 armel armhf hurd-i386 i386 ia64 kfreebsd-amd64 kfreebsd-i386 mips mips64el mipsel powerpc ppc64el s390 s390x sparc
Archive-rsync: debian/
Country: US United States
Site: security-master.debian.org
Security-unlisted-http: /debian-security/
Type: Origin
Security-rsync: debian-security/
Country: DE Germany
Site: porta.debian.org
Alias: ftp.ports.debian.org
Type: Origin
Ports-architecture: alpha hppa m68k powerpcspe ppc64 sh4 sparc64 x32
Ports-rsync: debian-ports/
Country: GR Greece
Site: archive.debian.org
Type: RoundRobinDNS
Includes: archive-klecker.debian.org archive-gretchaninov.debian.org archive-sibelius.debian.org
Old-http: /debian-archive/
Old-rsync: debian-archive/
Site: cdimage.debian.org
Type: Origin
CDImage-http: /debian-cd/
CDImage-rsync: debian-cd/
Country: SE Sweden
Site: syncproxy2.wna.debian.org
Archive-unlisted-http: /debian/
Security-unlisted-http: /debian-security
Type: Push-Primary
Archive-architecture: amd64 arm64 armel armhf hurd-i386 i386 ia64 kfreebsd-amd64 kfreebsd-i386 mips mips64el mipsel powerpc ppc64el s390 s390x sparc
X-Archive-rsync: debian/
Archive-method: push
Country: US United States
Sponsor: ISC - Internet Systems Consortium http://www.isc.org/
Site: security.debian.org
Type: GeoDNS
Security-architecture: amd64 armel i386 ia64 kfreebsd-amd64 kfreebsd-i386 mips mipsel powerpc s390 sparc
Security-http: /debian-security/
Security-rsync: debian-security/
Comment: Automatically selects geographically close mirror
of security update archive.
Details: https://anonscm.debian.org/cgit/mirror/dsa-auto-dns.git
Site: www.nic.funet.fi
Alias: ftp.funet.fi
Type: leaf
Archive-architecture: amd64 arm64 armel armhf hurd-i386 i386 kfreebsd-amd64 kfreebsd-i386 mips mips64el mipsel powerpc ppc64el s390x sparc
Archive-http: /debian/
Archive-rsync: ftp/pub/mirrors/ftp.debian.org/debian/
Maintainer: Harri Salminen <hks@csc.fi>, mirrors-adm+debian@nic.funet.fi
Country: FI Finland
Location: Espoo
Sponsor: Finnish Academic and Research Network FUNET http://www.funet.fi/
......@@ -25,12 +25,16 @@ install:: $(XMLDESTFILES)
#
DebianSecTracker.json:
@if ! test -e "$@" || test `find "$@" -mmin +60` ; then \
wget https://security-tracker.debian.org/tracker/data/json --ca-directory=/etc/ssl/ca-debian -O $@ ;\
if test -d /etc/ssl/ca-debian; then \
wget https://security-tracker.debian.org/tracker/data/json --ca-directory=/etc/ssl/ca-debian -O $@ ;\
else \
wget https://security-tracker.debian.org/tracker/data/json -O $@; \
fi \
fi
oval-definitions-%.xml: force DebianSecTracker.json
@[ -e $(PYTHON) ] || { echo "ERROR: Required python binary $(PYTHON) is not available, aborting generation" >&2; exit 1; }
$(IGNORE)$(PYTHON) generate.py -d .. -j DebianSecTracker.json -r $(patsubst oval-definitions-%.xml,%,$@) >$@
$(IGNORE)$(PYTHON) generate.py -q -d .. -j DebianSecTracker.json -r $(patsubst oval-definitions-%.xml,%,$@) >$@
# Warn if empty files are generated
# Note: They cannot be removed or the install target will fail later
@[ -s $@ ] || echo "WARNING: OVAL Definition $@ is empty, please review script and/or DSAs"
......
......@@ -172,7 +172,10 @@ def main(args):
if args['verbose']:
logging.basicConfig(level=logging.DEBUG)
else:
logging.basicConfig(level=logging.WARNING)
if args['quiet']:
logging.basicConfig(level=logging.ERROR)
else:
logging.basicConfig(level=logging.WARNING)
# unpack args
......@@ -191,8 +194,9 @@ def main(args):
logging.log(logging.DEBUG, "Issuing wget for JSON file")
args = ['wget', 'https://security-tracker.debian.org/tracker/data/json',
'-O', temp_file]
if os.path.isdir('/etc/ssl/ca-debian'):
args.insert(1, '--ca-directory=/etc/ssl/ca-debian')
if os.path.isdir('/etc/ssl'):
if os.path.isdir('/etc/ssl/ca-debian'):
args.insert(1, '--ca-directory=/etc/ssl/ca-debian')
call(args)
logging.log(logging.DEBUG, "File %s received" % temp_file)
json_data = get_json_data(temp_file)
......@@ -211,6 +215,7 @@ if __name__ == "__main__":
'from the JSON file used to '
'build the Debian Security '
'Tracker.')
PARSER.add_argument('-q', '--quiet', help='Quiet mode', action="store_true")
PARSER.add_argument('-v', '--verbose', help='Verbose Mode',
action="store_true")
PARSER.add_argument('-j', '--JSONfile', type=str,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment