Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Mattia Rizzolo
jenkins.d.n
Commits
985685a8
Commit
985685a8
authored
Oct 15, 2014
by
Holger Levsen
Browse files
reproducible: add new helper script to blacklist packages + document it
parent
f369c862
Changes
2
Hide whitespace changes
Inline
Side-by-side
README
View file @
985685a8
...
@@ -111,9 +111,16 @@ Installation tests inside chroot environments.
...
@@ -111,9 +111,16 @@ Installation tests inside chroot environments.
* manual rescheduling is easy, if you have console access. (Hint: you don't but someone on #debian-reproducible will have.) This is how to:
* manual rescheduling is easy, if you have console access. (Hint: you don't but someone on #debian-reproducible will have.) This is how to:
----
----
jenkins@jenkins:~$ /srv/jenkins/bin/reproducible_schedule_on_demand.sh package1 package2 abcde
</code>
jenkins@jenkins:~$ /srv/jenkins/bin/reproducible_schedule_on_demand.sh package1 package2 abcde
----
----
* blacklisting packages can be done similarily, optionally list reaons in 'notes.git/packages.yml'
----
jenkins@jenkins:~$ /srv/jenkins/bin/reproducible_blacklist.sh package1
----
=== dvswitch jobs
=== dvswitch jobs
* FIXME: describe dvswitch jobs
* FIXME: describe dvswitch jobs
...
...
bin/reproducible_blacklist.sh
0 → 100755
View file @
985685a8
#!/bin/bash
# Copyright 2014 Holger Levsen <holger@layer-acht.org>
# released under the GPLv=2
.
/srv/jenkins/bin/common-functions.sh
common_init
"
$@
"
# common code defining db access
.
/srv/jenkins/bin/reproducible_common.sh
blacklist_packages
()
{
DATE
=
$(
date
+
'%Y-%m-%d %H:%M'
)
TMPFILE
=
$(
mktemp
)
for
PKG
in
$PACKAGES
;
do
VERSION
=
$(
sqlite3
-init
$INIT
${
PACKAGES_DB
}
"SELECT version from sources WHERE name = '
$PKG
';"
)
sqlite3
-init
$INIT
${
PACKAGES_DB
}
"REPLACE INTO source_packages VALUES ('
$PKG
','
$VERSION
','blacklisted','
$DATE
');"
done
echo
"============================================================================="
echo
"The following
$TOTAL
source packages have been (re-)scheduled:
$PACKAGES
"
echo
"============================================================================="
echo
}
check_candidates
()
{
PACKAGES
=
""
TOTAL
=
0
for
PKG
in
$CANDIDATES
;
do
RESULT
=
$(
sqlite3
-init
$INIT
${
PACKAGES_DB
}
"SELECT name from sources WHERE name = '
$PKG
';"
)
if
[
!
-z
"
$RESULT
"
]
;
then
PACKAGES
=
"
$PACKAGES
$RESULT
"
let
"TOTAL+=1"
fi
done
}
#
# main
#
set
+x
CANDIDATES
=
"
$@
"
check_candidates
PACKAGES
=
$(
echo
$PACKAGES
)
MESSAGE
=
"
$TOTAL
package(s) blacklisted:
${
PACKAGES
}
"
if
[
$TOTAL
-lt
1
]
;
then
exit
1
fi
# finally
blacklist_packages
echo
echo
"
$MESSAGE
"
kgb-client
--conf
/srv/jenkins/kgb/debian-reproducible.conf
--relay-msg
"
$MESSAGE
"
echo
echo
"Probably edit notes.git/packages.yml now and enter reasons for blacklisting there"
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment