From 3e74fde47ed058a59040e68c0ce2b3153563da92 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Sun, 22 Apr 2018 17:05:51 +0200 Subject: `binary_packages`.`last_moved` new --- misc/database-layout.dmf | 1440 +++++++++++++++++++++++---------------------- misc/database-layout.dump | 1 + 2 files changed, 724 insertions(+), 717 deletions(-) diff --git a/misc/database-layout.dmf b/misc/database-layout.dmf index b74c264..faf2eff 100644 --- a/misc/database-layout.dmf +++ b/misc/database-layout.dmf @@ -2,13 +2,13 @@ Relational - + - 237 - 40 + 42 + 135 - ssh_keys + ssh_log#ffffff @@ -18,13 +18,25 @@ True - owner + date + DATETIME + True + False + + + build_slave MEDIUMINT + False + False + + + action + VARCHAR(32) True False - fingerprint + parameters TEXT True False @@ -32,145 +44,199 @@
- + - -68 - 71 + -55 + -72 - email_actions + email_log#ffffff id - MEDIUMINT + BIGINT True True - name - VARCHAR(32) + date + DATETIME True False + + success + BIT + True + False + + + action + MEDIUMINT + False + False + + + count + MEDIUMINT + False + False + + + gpg_key + BIGINT + False + False + + + comment + TEXT + False + False +
- + - 68 - 49 + 481 + 395 - allowed_email_actions + repository_moves#ffffff id - BIGINT + MEDIUMINT True True - gpg_key - BIGINT + from_repository + MEDIUMINT True False - action + to_repository MEDIUMINT True False + + upstream_package_repository + SMALLINT + True + False +
- + - 106 - -51 + 763 + 241 - gpg_keys + repository_stabilities#ffffff id - BIGINT + SMALLINT True True - fingerprint - VARCHAR(40) + name + VARCHAR(32) True False - owner - MEDIUMINT - True + bugtracker_category + VARCHAR(32) + False False
- + - 258 - -44 + 53 + 501 - persons + build_dependency_loops#ffffff id - MEDIUMINT + BIGINT True True - name - VARCHAR(32) + loop + MEDIUMINT + True + False + + + build_assignment + BIGINT True False
- + - 788 - -60 + 540 + -64 - todo_links + dependency_types#ffffff - dependent - BIGINT + id + SMALLINT + True + True + + + name + VARCHAR(32) True False - depending_on - BIGINT + relevant_for_building + BIT + True + False + + + relevant_for_binary_packages + BIT True False
- + - 945 - -70 + 348 + -60 - todos + dependencies#ffffff @@ -180,39 +246,33 @@ True - file - VARCHAR(64) - True - False - - - line - MEDIUMINT + dependent + BIGINT True False - description - TEXT + depending_on + BIGINT True False - importance + dependency_type SMALLINT - False + True False
- + - 737 - 38 + 563 + 42 - statitstics + install_targets#ffffff @@ -222,111 +282,135 @@ True - date - DATETIME + name + VARCHAR(64) True False + +
+
+ + + 415 + 321 + + + architectures + #ffffff + - stable_packages_count - MEDIUMINT + id + SMALLINT True - False + True - pending_tasks_count - MEDIUMINT + name + VARCHAR(16) True False + +
+
+ + + 226 + 473 + + + package_sources + #ffffff + - staging_packages_count - MEDIUMINT + id + BIGINT True - False + True - testing_packages_count - MEDIUMINT + pkgbase + VARCHAR(64) True False - broken_tasks_count - MEDIUMINT + git_revision + VARCHAR(40) True False - dependency_loops_count - MEDIUMINT + mod_git_revision + VARCHAR(40) True False - dependency_looped_tasks_count - MEDIUMINT + upsream_package_repository + SMALLINT True False - locked_tasks_count - MEDIUMINT + uses_upstream + BIT True False - blocked_tasks_count - MEDIUMINT + uses_modification + BIT True False - next_tasks_count - MEDIUMINT + commit_time + DATETIME True False
- + - 754 - 399 + 539 + 533 - repository_stability_relations + upstream_repositories#ffffff id - MEDIUMINT + SMALLINT True True - more_stable - MEDIUMINT + name + VARCHAR(64) True False - less_stable - MEDIUMINT + git_repository + SMALLINT True False
- + - -62 - 370 + 770 + 508 - fail_reasons + git_repositories#ffffff @@ -337,32 +421,38 @@ name - VARCHAR(32) + VARCHAR(64) True False - identifier - VARCHAR(64) + url + VARCHAR(128) True False - severity - SMALLINT + directory + VARCHAR(128) + True + False + + + head + VARCHAR(40) True False
- + - 53 - 346 + 529 + 273 - failed_builds + repositories#ffffff @@ -372,45 +462,63 @@ True - build_slave - MEDIUMINT + name + VARCHAR(64) True False - build_assignment - BIGINT + stability + SMALLINT True False - date - DATETIME + is_on_master_mirror + BIT True False + +
+
+ + + 554 + 117 + + + install_target_providers + #ffffff + - reason - SMALLINT + id + BIGINT + True + True + + + package + BIGINT True False - log_file - VARCHAR(512) + install_target + BIGINT True False
- + - 247 - 291 + 360 + 56 - build_assignments + binary_packages#ffffff @@ -420,47 +528,83 @@ True - package_source + build_assignment BIGINT True False - architecture - SMALLINT + repository + MEDIUMINT True False - is_blocked - VARCHAR(128) - False + epoch + MEDIUMINT + True False - is_black_listed - VARCHAR(128) - False + pkgver + VARCHAR(64) + True False - is_broken + pkgrel + MEDIUMINT + True + False + + + sub_pkgrel + MEDIUMINT + True + False + + + has_issues BIT True False - priority + is_tested + BIT + True + False + + + is_to_be_deleted + BIT + True + False + + + pkgname + VARCHAR(64) + True + False + + + architecture SMALLINT True False - return_date - DATETIME + sha512sum + VARCHAR(128) False False + + last_moved + DATETIME + True + False +
@@ -518,13 +662,13 @@
- + - 360 - 56 + 247 + 291 - binary_packages + build_assignments#ffffff @@ -534,153 +678,105 @@ True - build_assignment + package_source BIGINT True False - repository - MEDIUMINT - True - False - - - epoch - MEDIUMINT - True - False - - - pkgver - VARCHAR(64) - True - False - - - pkgrel - MEDIUMINT - True - False - - - sub_pkgrel - MEDIUMINT - True - False - - - has_issues - BIT + architecture + SMALLINT True False - is_tested - BIT - True + is_blocked + VARCHAR(128) + False False - is_to_be_deleted - BIT - True + is_black_listed + VARCHAR(128) + False False - pkgname - VARCHAR(64) + is_broken + BIT True False - architecture + priority SMALLINT True False - sha512sum - VARCHAR(128) + return_date + DATETIME False False
- + - 554 - 117 + 53 + 346 - install_target_providers + failed_builds#ffffff id - BIGINT + MEDIUMINT True True - package - BIGINT + build_slave + MEDIUMINT True False - install_target + build_assignment BIGINT True False - -
-
- - - 529 - 273 - - - repositories - #ffffff - - - id - MEDIUMINT - True - True - - name - VARCHAR(64) + date + DATETIME True False - stability + reason SMALLINT True False - is_on_master_mirror - BIT + log_file + VARCHAR(512) True False
- + - 770 - 508 + -62 + 370 - git_repositories + fail_reasons#ffffff @@ -691,68 +787,62 @@ name - VARCHAR(64) - True - False - - - url - VARCHAR(128) + VARCHAR(32) True False - directory - VARCHAR(128) + identifier + VARCHAR(64) True False - head - VARCHAR(40) + severity + SMALLINT True False
- + - 539 - 533 + 754 + 399 - upstream_repositories + repository_stability_relations#ffffff id - SMALLINT + MEDIUMINT True True - name - VARCHAR(64) + more_stable + MEDIUMINT True False - git_repository - SMALLINT + less_stable + MEDIUMINT True False
- + - 226 - 473 + 737 + 38 - package_sources + statitstics#ffffff @@ -762,105 +852,81 @@ True - pkgbase - VARCHAR(64) + date + DATETIME True False - git_revision - VARCHAR(40) + stable_packages_count + MEDIUMINT True False - mod_git_revision - VARCHAR(40) + pending_tasks_count + MEDIUMINT True False - upsream_package_repository - SMALLINT + staging_packages_count + MEDIUMINT True False - uses_upstream - BIT + testing_packages_count + MEDIUMINT True False - uses_modification - BIT + broken_tasks_count + MEDIUMINT True False - commit_time - DATETIME + dependency_loops_count + MEDIUMINT True False - -
-
- - - 415 - 321 - - - architectures - #ffffff - - id - SMALLINT + dependency_looped_tasks_count + MEDIUMINT True - True + False - name - VARCHAR(16) + locked_tasks_count + MEDIUMINT True False - -
-
- - - 563 - 42 - - - install_targets - #ffffff - - id - BIGINT + blocked_tasks_count + MEDIUMINT True - True + False - name - VARCHAR(64) + next_tasks_count + MEDIUMINT True False
- + - 348 - -60 + 945 + -70 - dependencies + todos#ffffff @@ -870,85 +936,49 @@ True - dependent - BIGINT + file + VARCHAR(64) True False - depending_on - BIGINT + line + MEDIUMINT True False - dependency_type - SMALLINT + description + TEXT True False - -
-
- - - 540 - -64 - - - dependency_types - #ffffff - - id + importance SMALLINT - True - True - - - name - VARCHAR(32) - True - False - - - relevant_for_building - BIT - True - False - - - relevant_for_binary_packages - BIT - True + False False
- + - 53 - 501 + 788 + -60 - build_dependency_loops + todo_links#ffffff - id + dependent BIGINT True - True - - - loop - MEDIUMINT - True False - build_assignment + depending_on BIGINT True False @@ -956,18 +986,18 @@
- - - 763 - 241 + + + 258 + -44 - repository_stabilities + persons#ffffff id - SMALLINT + MEDIUMINT True True @@ -977,58 +1007,46 @@ True False - - bugtracker_category - VARCHAR(32) - False - False -
- + - 481 - 395 + 106 + -51 - repository_moves + gpg_keys#ffffff id - MEDIUMINT + BIGINT True True - from_repository - MEDIUMINT + fingerprint + VARCHAR(40) True False - to_repository + owner MEDIUMINT True False - - upstream_package_repository - SMALLINT - True - False -
- + - -55 - -72 + 68 + 49 - email_log + allowed_email_actions#ffffff @@ -1038,51 +1056,51 @@ True - date - DATETIME - True - False - - - success - BIT + gpg_key + BIGINT True False action MEDIUMINT - False + True False + +
+
+ + + -68 + 71 + + + email_actions + #ffffff + - count + id MEDIUMINT - False - False - - - gpg_key - BIGINT - False - False + True + True - comment - TEXT - False + name + VARCHAR(32) + True False
- + - 42 - 135 + 237 + 40 - ssh_log + ssh_keys#ffffff @@ -1092,25 +1110,13 @@ True - date - DATETIME - True - False - - - build_slave + owner MEDIUMINT - False - False - - - action - VARCHAR(32) True False - parameters + fingerprint TEXT True False @@ -1118,24 +1124,24 @@
- + - 290.109 - 40 + 148.781 + 186.812 - 90 - + 0 + - 293.289 - 5.8125 + 186 + 204.812 - 270 - + 180 + @@ -1146,29 +1152,29 @@ Mandatory - 1 + 2 0 - + - 256.727 - 137 + 596.758 + 482.625 - 90 - + 270 + - 290.109 - 103.812 + 600.391 + 533 - 270 - + 90 + @@ -1179,29 +1185,29 @@ Mandatory - 2 + 3 0 - + - -9.85156 - 47.8125 + 558.172 + 395 - 270 - + 90 + - -19.2734 - 71 + 583.885 + 360.625 - 90 - + 270 + @@ -1212,29 +1218,29 @@ Mandatory - 3 + 1 0 - + - 68 - 80.9062 + 635.344 + 395 - 180 - + 90 + - 29.4531 - 95.9062 + 638.771 + 360.625 - 0 - + 270 + @@ -1250,24 +1256,24 @@ - + - 142.789 - 49 + 433.484 + 303.625 - 90 - + 270 + - 159.109 - 12.8125 + 447.914 + 321 - 270 - + 90 + @@ -1278,29 +1284,29 @@ Mandatory - 1 + 11 0 - + - 35.2969 - -12.0938 + 494.922 + -30.7917 0 - + - 106 - -19.0938 + 540 + -20.1875 180 - + @@ -1311,29 +1317,29 @@ Mandatory - 5 + 3 0 - + - 212.219 - -19.0938 + 693.656 + 316.812 0 - + - 258 - -19.0938 + 763 + 276.812 180 - + @@ -1349,24 +1355,24 @@ - + - 915.234 - -43.3958 + 494.922 + -1.58333 0 - + - 945 - -39.3958 + 563 + 69.8125 180 - + @@ -1377,29 +1383,29 @@ Mandatory - 0 + 2 0 - + - 915.234 - -26.7917 + 613.289 + 117 - 0 - + 90 + - 945 - -8.79167 + 599.156 + 97.625 - 180 - + 270 + @@ -1410,29 +1416,29 @@ Mandatory - 1 + 2 0 - + - 816.656 - 399 + 421.461 + 27.625 - 90 - + 270 + - 815.635 - 304.812 + 433.484 + 56 - 270 - + 90 + @@ -1443,29 +1449,29 @@ Mandatory - 2 + 1 0 - + - 879.312 - 399 + 554 + 152.812 - 90 - + 180 + - 868.271 - 304.812 + 506.969 + 138.542 - 270 - + 0 + @@ -1481,24 +1487,24 @@ - + - 53 - 398.906 + 451.781 + 548.812 - 180 - + 0 + - 33.4375 - 408.906 + 539 + 568.812 - 0 - + 180 + @@ -1514,24 +1520,24 @@ - + - 204.719 - 398.906 + 506.969 + 221.083 0 - + - 247 - 357.906 + 611.328 + 273 - 180 - + 90 + @@ -1547,24 +1553,24 @@ - + - 128.859 - 346 + 661.781 + 568.812 - 90 - + 0 + - 233.151 - 256.812 + 770 + 559.812 - 270 - + 180 + @@ -1575,29 +1581,29 @@ Mandatory - 1 + 2 0 - + - 134.195 - 501 + 315.086 + 442.625 - 90 - + 270 + - 293.974 - 424.812 + 338.891 + 473 - 270 - + 90 + @@ -1608,29 +1614,29 @@ Mandatory - 2 + 1 0 - + - 280.302 - 256.812 + 383.172 + 366.812 - 270 - + 0 + - 293.974 - 291 + 415 + 348.812 - 90 - + 180 + @@ -1641,7 +1647,7 @@ Mandatory - 3 + 2 0 @@ -1651,15 +1657,15 @@ - 410.573 - 259.812 + 360 + 179.812 - 270 + 180 - 340.948 + 337.781 291 90 @@ -1679,24 +1685,24 @@ - + - 387.922 - 357.906 + 275.271 + 272.625 - 0 - + 270 + - 415 - 345.906 + 292.391 + 291 - 180 - + 90 + @@ -1707,29 +1713,29 @@ Mandatory - 2 + 3 0 - + - 340.948 - 424.812 + 126.484 + 501 - 270 - + 90 + - 341.266 - 473 + 247 + 392.083 - 90 - + 180 + @@ -1740,29 +1746,29 @@ Mandatory - 1 + 2 0 - + - 688.453 - 564.906 + 126.484 + 346 - 0 - + 90 + - 770 - 553.906 + 230.635 + 272.625 - 180 - + 270 + @@ -1773,29 +1779,29 @@ Mandatory - 2 + 1 0 - + - 511.719 - 191.875 + 199.969 + 405.812 0 - + - 613.703 - 273 + 247 + 341.542 - 90 - + 180 + @@ -1811,24 +1817,24 @@ - + - 456.531 - 539.906 + 53 + 405.812 - 0 - + 180 + - 539 - 564.906 + 28.6875 + 413.812 - 180 - + 0 + @@ -1844,24 +1850,24 @@ - + - 554 - 148.906 + 799.115 + 399 - 180 - + 90 + - 511.719 - 123.938 + 801.13 + 312.625 - 0 - + 270 + @@ -1877,24 +1883,24 @@ - + - 423.836 - 17.8125 + 844.229 + 399 - 270 - + 90 + - 435.859 - 56 + 839.26 + 312.625 - 90 - + 270 + @@ -1905,29 +1911,29 @@ Mandatory - 1 + 2 0 - + - 632.109 - 117 + 910.484 + -41.4583 - 90 - + 0 + - 613.016 - 91.8125 + 945 + -35.4583 - 270 - + 180 + @@ -1938,29 +1944,29 @@ Mandatory - 2 + 1 0 - + - 499.672 - -8.125 + 910.484 + -22.9167 0 - + - 563 - 66.9062 + 945 + -0.916667 180 - + @@ -1971,29 +1977,29 @@ Mandatory - 2 + 0 0 - + - 698.406 - 311.906 + 207.469 + -15.1875 0 - + - 763 - 272.906 + 258 + -16.1875 180 - + @@ -2009,24 +2015,24 @@ - + - 499.672 - -34.0625 + 25.875 + -4.1875 0 - + - 540 - -25.0938 + 106 + -15.1875 180 - + @@ -2037,29 +2043,29 @@ Mandatory - 3 + 5 0 - + - 461.146 - 259.812 + 121.914 + 49 - 270 - + 90 + - 462.273 - 321 + 156.734 + 20.625 - 90 - + 270 + @@ -2070,29 +2076,29 @@ Mandatory - 11 + 1 0 - + - 559.755 - 395 + 68 + 84.8125 - 90 - + 180 + - 585.469 - 350.812 + 0.75 + 98.8125 - 270 - + 0 + @@ -2108,24 +2114,24 @@ - + - 638.51 - 395 + -14.5625 + 63.625 - 90 - + 270 + - 641.938 - 350.812 + -33.625 + 71 - 270 - + 90 + @@ -2136,29 +2142,29 @@ Mandatory - 1 + 3 0 - + - 599.133 - 472.812 + 252.953 + 137 - 270 - + 90 + - 613.727 - 533 + 287.734 + 111.625 - 90 - + 270 + @@ -2169,29 +2175,29 @@ Mandatory - 3 + 2 0 - + - 153.531 - 180.906 + 287.734 + 40 - 0 - + 90 + - 186 - 196.906 + 290.914 + 11.625 - 180 - + 270 + @@ -2202,7 +2208,7 @@ Mandatory - 2 + 1 0 diff --git a/misc/database-layout.dump b/misc/database-layout.dump index fffdef4..84c17cb 100644 --- a/misc/database-layout.dump +++ b/misc/database-layout.dump @@ -259,6 +259,7 @@ binary_packages CREATE TABLE `binary_packages` ( `architecture` smallint(6) NOT NULL, `is_to_be_deleted` bit(1) NOT NULL, `sha512sum` varchar(128) COLLATE utf8mb4_unicode_ci DEFAULT NULL, + `last_moved` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`), UNIQUE KEY `file_name` (`pkgname`,`epoch`,`pkgver`,`pkgrel`,`sub_pkgrel`,`architecture`,`repository`), UNIQUE KEY `content` (`build_assignment`,`sub_pkgrel`,`pkgname`,`architecture`,`repository`), -- cgit v1.2.3-54-g00ecf From 4e708195f1ccb3c2abad5cc6335b4b5d7dd17ffa Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Sun, 22 Apr 2018 17:10:33 +0200 Subject: bin/db-update,bin/return-assignment: update `binary_packages`.`last_moved` --- bin/db-update | 4 +++- bin/return-assignment | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/bin/db-update b/bin/db-update index 54d2f87..98bc884 100755 --- a/bin/db-update +++ b/bin/db-update @@ -392,7 +392,9 @@ for source_stability in 'testing' 'staging'; do printf ' JOIN `replaced_binary_packages` ON `binary_packages`.`id`=`replaced_binary_packages`.`id`;\n' printf 'UPDATE `binary_packages`' printf ' JOIN `moved_binary_packages` ON `binary_packages`.`id`=`moved_binary_packages`.`id`' - printf ' SET `binary_packages`.`repository`=`moved_binary_packages`.`new_repository`;\n' + printf ' SET `binary_packages`.`repository`=`moved_binary_packages`.`new_repository`,' + printf ' `binary_packages`.`last_moved`=NOW()' + printf ' WHERE `binary_packages`.`repository`!=`moved_binary_packages`.`new_repository`;\n' } | \ mysql_run_query done diff --git a/bin/return-assignment b/bin/return-assignment index 9e64ff0..1b7a872 100755 --- a/bin/return-assignment +++ b/bin/return-assignment @@ -536,7 +536,8 @@ trigger_mirror_refreshs base64 -w0 )" printf ' `binary_packages`.`has_issues`=0,' - printf ' `binary_packages`.`is_tested`=0' + printf ' `binary_packages`.`is_tested`=0,' + printf ' `binary_packages`.`last_moved`=NOW()' printf ' WHERE `build_slaves`.`name`=from_base64("%s")' \ "$( printf '%s' "${slave}" | \ -- cgit v1.2.3-54-g00ecf From 317a62223535ecec121c19f7b10c590ee3b2e7a7 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Mon, 23 Apr 2018 08:55:58 +0200 Subject: bin/ii-connect: "whatsup" new --- bin/ii-connect | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/bin/ii-connect b/bin/ii-connect index ca8ea99..d678af1 100755 --- a/bin/ii-connect +++ b/bin/ii-connect @@ -79,8 +79,10 @@ if [ "$1" = 'watch' ]; then channel="${channel##*/}" if [ -z "${channel%%#*}" ]; then prefix='buildmaster: ' + sloppy_salutation='buildmaster' else prefix='' + sloppy_salutation='' fi regex='^\(\S\+ \)\?\S\+ <\S\+> '"${prefix}"'why[- ]don'"'"'\?t[- ]you \(build\|stabilize\|unstage\|keep\|stubbornly_keep\) ' if grep -q "${regex}" "${out_file}"; then @@ -130,6 +132,14 @@ if [ "$1" = 'watch' ]; then done sed -i "/${regex}/d" "${out_file}" fi + regex='^\(\S\+ \)\?\S\+ <\S\+> .*[Ww]hat'"'"'\?s *[Uu]p' + if grep "${regex}" "${out_file}" | \ + grep -q "${sloppy_salutation}"; then + done_something=true + sed -i "/${regex}/d" "${out_file}" + printf 'up? I'"'"'m up for %s, %s\n' "$(uptime -p | sed 's/^up //')" "$(uptime | sed 's/.*, //')" | \ + sponge "${out_file%/out}/in" + fi done sleep 1 done -- cgit v1.2.3-54-g00ecf From 3ba80fbc9c1231c8612ce25798383192c38bbad5 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Mon, 23 Apr 2018 15:14:36 +0200 Subject: bin/cleanup: do not prune ssh-log --- bin/cleanup | 4 ---- 1 file changed, 4 deletions(-) diff --git a/bin/cleanup b/bin/cleanup index 83bb209..830cb94 100755 --- a/bin/cleanup +++ b/bin/cleanup @@ -60,10 +60,6 @@ find "${build_log_directory}/error" -maxdepth 1 -type f -printf '%f\n' | \ done } -# only keep last 50 lines of ssh-log -tail -n50 "${work_dir}/ssh-log" | \ - sponge "${work_dir}/ssh-log" - # only keep namcap logs of last 2 weeks for succeeded packages find "${build_log_directory}/success" -maxdepth 1 -type f -mtime +14 \ -not -exec zgrep -q '^+.*ELF file .* has text relocations' '{}' \; \ -- cgit v1.2.3-54-g00ecf From baba38d4dd908df6a1b24eeec935f3dad3d89a93 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Mon, 23 Apr 2018 15:16:58 +0200 Subject: lib/common-functions: decomission command-log --- lib/common-functions | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/lib/common-functions b/lib/common-functions index 59af46f..d959094 100755 --- a/lib/common-functions +++ b/lib/common-functions @@ -9,17 +9,6 @@ if [ -z "${base_dir}" ]; then . '../conf/default.conf' fi -if [ ! -s "${work_dir}/build-master-sanity" ]; then - { - date - printf 'sourcing common-functions for %s\n' "$0" - printf '%s parameters:' "$#" - printf ' "%s"' "$@" - printf '\n' - } >> \ - "${work_dir}/command-log" -fi - # find_pkgbuilds package repository git_repository git_revision mod_git_revision # find the PKGBUILD and modification of $package from $repository # sets $PKGBUILD and $PKGBUILD_mod -- cgit v1.2.3-54-g00ecf From 0f4f0c9c0df8dab6c6bb0f763a03a146dd6453a7 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Mon, 23 Apr 2018 15:45:16 +0200 Subject: bin/get-package-updates: trigger rebuild on any changed file for build-list packages --- bin/get-package-updates | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/bin/get-package-updates b/bin/get-package-updates index f581e13..3c2758d 100755 --- a/bin/get-package-updates +++ b/bin/get-package-updates @@ -189,6 +189,27 @@ echo 'Check modified packages from the last update, and put them to the build li # If a package is deleted, remove from the rebuild list, and add it to the deletion list. # If a new package is added, then ensure that it's not on the deletion list. +trigger_rebuild_on_any_file_sed_expression=$( + # shellcheck disable=SC2016 + { + printf 'SELECT DISTINCT CONCAT(' + printf '`package_sources`.`pkgbase`,"/repos/",' + printf '`upstream_repositories`.`name`,"-",' + printf 'IF(`architectures`.`name`="any","any","x86_64"))' + printf ' FROM `binary_packages`' + mysql_join_binary_packages_repositories + mysql_join_binary_packages_build_assignments + mysql_join_build_assignments_architectures + mysql_join_build_assignments_package_sources + mysql_join_package_sources_upstream_repositories + printf ' WHERE `repositories`.`name`="build-list";\n' + } | \ + mysql_run_query | \ + sed ' + s@.*@s,^\\(.\\t\0/\\)[^/]\\+,\\1PKGBUILD,@ + ' +) + for repo in ${repo_names}; do eval repo_path='"${repo_paths__'"${repo}"'}"' eval old_repo_revision='"${old_repo_revisions__'"${repo}"'}"' @@ -205,8 +226,7 @@ for repo in ${repo_names}; do fi } | \ # only track changes in PKGBUILDs - # TODO: However, packages which are already on the build list should - # receive a git_revision bump if _any_ file changed. + sed "${trigger_rebuild_on_any_file_sed_expression}" | \ grep '/PKGBUILD$' | \ if [ "${repo}" = "archlinux32" ]; then # modify the directory structure from the modifiaction-repository -- cgit v1.2.3-54-g00ecf From de83633cf54bc28c7f5244ccc8557a2e1583d6b2 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Mon, 23 Apr 2018 15:51:39 +0200 Subject: bin/get-package-updates: fix comments --- bin/get-package-updates | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/get-package-updates b/bin/get-package-updates index 3c2758d..2a64219 100755 --- a/bin/get-package-updates +++ b/bin/get-package-updates @@ -225,8 +225,9 @@ for repo in ${repo_names}; do git -C "${repo_path}" diff --no-renames --name-status "${old_repo_revision}" "${new_repo_revision}" fi } | \ - # only track changes in PKGBUILDs + # rename any file to "PKGBUILD" for packages on the build-list sed "${trigger_rebuild_on_any_file_sed_expression}" | \ + # only track changes in PKGBUILDs grep '/PKGBUILD$' | \ if [ "${repo}" = "archlinux32" ]; then # modify the directory structure from the modifiaction-repository -- cgit v1.2.3-54-g00ecf From deb86cc435f380d7084f727176bf964691c6196d Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Mon, 23 Apr 2018 16:18:34 +0200 Subject: bin/get-package-updates: add comment --- bin/get-package-updates | 1 + 1 file changed, 1 insertion(+) diff --git a/bin/get-package-updates b/bin/get-package-updates index 2a64219..6054379 100755 --- a/bin/get-package-updates +++ b/bin/get-package-updates @@ -190,6 +190,7 @@ echo 'Check modified packages from the last update, and put them to the build li # If a new package is added, then ensure that it's not on the deletion list. trigger_rebuild_on_any_file_sed_expression=$( + # note: This only works for upstream sources! # shellcheck disable=SC2016 { printf 'SELECT DISTINCT CONCAT(' -- cgit v1.2.3-54-g00ecf From d17e88db80016613822451191b2be8cff4adcefc Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Mon, 23 Apr 2018 16:33:52 +0200 Subject: bin/get-package-updates: trigger rebuild of packages removed from blacklist --- bin/get-package-updates | 119 +++++++++++++++++++++++++++++++----------------- 1 file changed, 78 insertions(+), 41 deletions(-) diff --git a/bin/get-package-updates b/bin/get-package-updates index 6054379..6cc8897 100755 --- a/bin/get-package-updates +++ b/bin/get-package-updates @@ -211,11 +211,45 @@ trigger_rebuild_on_any_file_sed_expression=$( ' ) -for repo in ${repo_names}; do - eval repo_path='"${repo_paths__'"${repo}"'}"' - eval old_repo_revision='"${old_repo_revisions__'"${repo}"'}"' - eval new_repo_revision='"${new_repo_revisions__'"${repo}"'}"' +{ + # trigger rebuild of packages removed from blacklist + # shellcheck disable=SC2016 { + printf 'SELECT `package_sources`.`pkgbase`,`upstream_repositories`.`name`,`git_repositories`.`name`' + printf ' FROM `package_sources`' + mysql_join_package_sources_upstream_repositories + mysql_join_upstream_repositories_git_repositories + printf ' WHERE `package_sources`.`pkgbase` IN (' + # shellcheck disable=SC2154 + git -C "${repo_paths__archlinux32}" diff "${old_repo_revisions__archlinux32}" "${new_repo_revisions__archlinux32}" -- blacklist | \ + sed -n ' + s/^-\([^-]\)/\1/ + T + s/\s*#.*$// + p + ' | \ + base64_encode_each | \ + sed ' + s/^/from_base64("/ + s/$/")/ + ' | \ + tr '\n' ',' | \ + sed 's/,$//' + printf ');\n' + } | \ + mysql_run_query | \ + while read -r pkgbase repository git_repository; do + printf 'A %s ' \ + "${pkgbase}" + eval 'printf '"'"'%s'"'"' "${new_repo_revisions__'"${git_repository}"'}"' + printf ' empty %s\n' \ + "${repository}" + done + # actual updates/removes + for repo in ${repo_names}; do + eval repo_path='"${repo_paths__'"${repo}"'}"' + eval old_repo_revision='"${old_repo_revisions__'"${repo}"'}"' + eval new_repo_revision='"${new_repo_revisions__'"${repo}"'}"' # if old revision unknown, mimic "git diff"-output # shellcheck disable=SC2154 if [ "${old_repo_revision}" = "NONE" ]; then @@ -224,45 +258,48 @@ for repo in ${repo_names}; do sed 's|^|A\t|' else git -C "${repo_path}" diff --no-renames --name-status "${old_repo_revision}" "${new_repo_revision}" - fi - } | \ - # rename any file to "PKGBUILD" for packages on the build-list - sed "${trigger_rebuild_on_any_file_sed_expression}" | \ - # only track changes in PKGBUILDs - grep '/PKGBUILD$' | \ - if [ "${repo}" = "archlinux32" ]; then - # modify the directory structure from the modifiaction-repository - # to the one of an original source repository - # shellcheck disable=SC2016 - sed 's|^\(.\t\)\([^/]\+\)/\([^/]\+\)/\(.\+\)$|\2 \1\3/repos/\2-x86_64/\4|' | \ - while read -r pkg_repo rest; do - repo=$(find_git_repository_to_package_repository "${pkg_repo}") - eval 'printf '"'"'%s %s %s\n'"'" \ - "$(printf '"${new_repo_revisions__%s}"' "${repo}")" \ - "$(printf '"${old_repo_revisions__%s}"' "${repo}")" \ - "'${rest}'" - done - else - sed "s|^|${new_repo_revision} ${old_repo_revision} |" fi | \ - grep '^\S\+ \S\+ .\s[^/]\+/repos/[^/]\+/PKGBUILD$' | \ - # ignore i686 - grep -v -- '-i686/PKGBUILD$' | \ - # ignore staging and testing - grep -v -- '[-/]\(staging\|testing\|unstable\)-[^/]\+/PKGBUILD$' | \ - sed 's|^\(\S\+ \S\+\) \(.\)\t\([^/]\+\)/repos/\([^/]\+\)-[^/-]\+/PKGBUILD$|\2 \3 \1 \4|' -done | \ - sort -u | \ - sed ' - s|^D\s|0 \0| - t - s|^[AM]\s|1 \0| - t - s|^|2 | - ' | \ - sort -k1,1 | \ - sed 's|^[012] ||' | \ + # rename any file to "PKGBUILD" for packages on the build-list + sed "${trigger_rebuild_on_any_file_sed_expression}" | \ + # only track changes in PKGBUILDs + grep '/PKGBUILD$' | \ + if [ "${repo}" = "archlinux32" ]; then + # modify the directory structure from the modifiaction-repository + # to the one of an original source repository + # shellcheck disable=SC2016 + sed 's|^\(.\t\)\([^/]\+\)/\([^/]\+\)/\(.\+\)$|\2 \1\3/repos/\2-x86_64/\4|' | \ + while read -r pkg_repo rest; do + repo=$(find_git_repository_to_package_repository "${pkg_repo}") + eval 'printf '"'"'%s %s %s\n'"'" \ + "$(printf '"${new_repo_revisions__%s}"' "${repo}")" \ + "$(printf '"${old_repo_revisions__%s}"' "${repo}")" \ + "'${rest}'" + done + else + sed "s|^|${new_repo_revision} ${old_repo_revision} |" + fi | \ + grep '^\S\+ \S\+ .\s[^/]\+/repos/[^/]\+/PKGBUILD$' | \ + # ignore i686 + grep -v -- '-i686/PKGBUILD$' | \ + # ignore staging and testing + grep -v -- '[-/]\(staging\|testing\|unstable\)-[^/]\+/PKGBUILD$' | \ + sed 's|^\(\S\+ \S\+\) \(.\)\t\([^/]\+\)/repos/\([^/]\+\)-[^/-]\+/PKGBUILD$|\2 \3 \1 \4|' + done | \ + sort -u | \ + sed ' + s|^D\s|0 \0| + t + s|^[AM]\s|1 \0| + t + s|^|2 | + ' | \ + sort -k1,1 | \ + sed 's|^[012] ||' +} | \ while read -r mode package git_revision old_git_revision repository; do + if [ "${old_git_revision}" = 'empty' ]; then + old_git_revision='' + fi if [ "${mode}" = 'D' ]; then # deleted PKGBUILD # shellcheck disable=SC2154 -- cgit v1.2.3-54-g00ecf From 018bc84c8445d8d5ccb418ec4c6563a0f586b525 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Mon, 23 Apr 2018 16:39:58 +0200 Subject: bin/ping-from-slave: do not abort build if database is funny --- bin/ping-from-slave | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/ping-from-slave b/bin/ping-from-slave index 3c03b45..7611f44 100755 --- a/bin/ping-from-slave +++ b/bin/ping-from-slave @@ -18,7 +18,8 @@ if [ "$( printf ' WHERE `build_slaves`.`name`=from_base64("%s");\n' \ "$(printf '%s' "${slave}" | base64 -w0)" } | \ - mysql_run_query 'unimportant' + mysql_run_query 'unimportant' || \ + echo '1' )" -ne 1 ]; then >&2 echo 'You do not build anything currently - abort whatever you are doing.' exit 2 -- cgit v1.2.3-54-g00ecf From 2feb9e4eafea12167b337e29e96c04cdb0e52d42 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Mon, 23 Apr 2018 16:48:02 +0200 Subject: bin/get-package-updates: fix mysql query --- bin/get-package-updates | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/bin/get-package-updates b/bin/get-package-updates index 6cc8897..31e0b68 100755 --- a/bin/get-package-updates +++ b/bin/get-package-updates @@ -233,9 +233,8 @@ trigger_rebuild_on_any_file_sed_expression=$( s/^/from_base64("/ s/$/")/ ' | \ - tr '\n' ',' | \ - sed 's/,$//' - printf ');\n' + tr '\n' ',' + printf '"");\n' } | \ mysql_run_query | \ while read -r pkgbase repository git_repository; do -- cgit v1.2.3-54-g00ecf From cefea1135f1a88ceb77f45758b07c0c824cd9d71 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Tue, 24 Apr 2018 12:49:12 +0200 Subject: bin/return-assignment: do not try to add failures if none were identified --- bin/return-assignment | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/bin/return-assignment b/bin/return-assignment index 1b7a872..bcdb717 100755 --- a/bin/return-assignment +++ b/bin/return-assignment @@ -99,7 +99,6 @@ if [ "$5" = 'ERROR' ]; then 'log_file' 'VARCHAR(512)' | \ sed 's/,$//' printf ');\n' - printf 'INSERT INTO `failures` (`date`,`reason`,`log_file`) VALUES' fail_reason_identifiers=$( { printf 'SELECT `fail_reasons`.`id`,replace(to_base64(`fail_reasons`.`identifier`),"\\n","")' @@ -131,8 +130,10 @@ if [ "$5" = 'ERROR' ]; then fi done done | \ - sed 's/,$//' - printf ';\n' + sed ' + 1 s/^/INSERT INTO `failures` (`date`,`reason`,`log_file`) VALUES / + s/,$/;\n/ + ' printf 'INSERT INTO `failed_builds` (`build_slave`,`build_assignment`,`date`,`reason`,`log_file`)' printf ' SELECT ' printf '`build_slaves`.`%s`,' \ -- cgit v1.2.3-54-g00ecf From 7673a80a19fa5c8cbd71afe9ecf93ee5ede223de Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Tue, 24 Apr 2018 13:28:26 +0200 Subject: bin/bootstrap-mysql,misc/database-layout.dump: small cleanup --- bin/bootstrap-mysql | 6 ++++-- misc/database-layout.dump | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/bin/bootstrap-mysql b/bin/bootstrap-mysql index 822d995..8ccb2a2 100755 --- a/bin/bootstrap-mysql +++ b/bin/bootstrap-mysql @@ -408,6 +408,7 @@ if [ ! "$1" = 'slim' ]; then # now we delete all unreplaceable and unmoveable packages from the respective # list until no further changes are required printf 'REPEAT\n' + printf 'SET row_count_saved = 0;\n' # create copies of our temporary tables *yuck* for table in 'replaced' 'moveable'; do for copy in '' '2'; do @@ -449,7 +450,7 @@ if [ ! "$1" = 'slim' ]; then printf ' JOIN `moveable_binary_packages_copy` ON `moveable_binary_packages_copy`.`id`=`install_target_providers`.`package`' printf ' WHERE `install_target_providers`.`install_target`=`dependencies`.`depending_on`' printf ');\n' - printf 'SET @row_count_saved = ROW_COUNT();\n' + printf 'SET row_count_saved = row_count_saved + ROW_COUNT();\n' # refresh copies of our temporary tables *yuck* for table in 'replaced' 'moveable'; do @@ -529,7 +530,8 @@ if [ ! "$1" = 'slim' ]; then printf ' AND `subst_itp`.`install_target`=`install_target_providers`.`install_target`' # b) 2) ^ printf ');\n' - printf 'UNTIL row_count_saved=0 AND ROW_COUNT()=0\n' + printf 'SET row_count_saved = row_count_saved + ROW_COUNT();\n' + printf 'UNTIL row_count_saved=0\n' printf 'END REPEAT;\n' for table in 'moveable' 'replaced'; do for copy in '' '2'; do diff --git a/misc/database-layout.dump b/misc/database-layout.dump index 84c17cb..33c4e4a 100644 --- a/misc/database-layout.dump +++ b/misc/database-layout.dump @@ -80,6 +80,7 @@ INSERT IGNORE INTO `replaced_binary_packages` (`id`,`replaced_by`) JOIN `binary_packages` AS `r_bp` ON `r_r`.`id`=`r_bp`.`repository` AND `r_bp`.`pkgname`=`m_bp`.`pkgname`; REPEAT +SET row_count_saved = 0; DELETE FROM `replaced_binary_packages_copy`; INSERT IGNORE INTO `replaced_binary_packages_copy` @@ -125,7 +126,7 @@ SELECT * JOIN `moveable_binary_packages_copy` ON `moveable_binary_packages_copy`.`id`=`install_target_providers`.`package` WHERE `install_target_providers`.`install_target`=`dependencies`.`depending_on`); -SET @row_count_saved = ROW_COUNT(); +SET row_count_saved = row_count_saved + ROW_COUNT(); DELETE FROM `replaced_binary_packages_copy`; INSERT IGNORE INTO `replaced_binary_packages_copy` @@ -182,7 +183,8 @@ SELECT * SELECT * FROM `replaced_binary_packages_copy2` WHERE `replaced_binary_packages_copy2`.`id`=`subst_bp`.`id`) AND `subst_itp`.`install_target`=`install_target_providers`.`install_target`); -UNTIL row_count_saved=0 AND ROW_COUNT()=0 +SET row_count_saved = row_count_saved + ROW_COUNT(); +UNTIL row_count_saved=0 END REPEAT; DROP TEMPORARY TABLE `moveable_binary_packages_copy`; DROP TEMPORARY TABLE `replaced_binary_packages_copy`; -- cgit v1.2.3-54-g00ecf From ae36f67281ba7a8c2ca1baa3f51e922d27f93fe1 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Tue, 24 Apr 2018 14:19:37 +0200 Subject: bin/bootstrap-mysql,misc/database-layout.dump: do not move packages commited to svn within 10 seconds separately --- bin/bootstrap-mysql | 52 ++++++++++++++++++++++++++++++++++++++++++ misc/database-layout.dump | 58 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 110 insertions(+) diff --git a/bin/bootstrap-mysql b/bin/bootstrap-mysql index 8ccb2a2..2bcd212 100755 --- a/bin/bootstrap-mysql +++ b/bin/bootstrap-mysql @@ -367,6 +367,25 @@ if [ ! "$1" = 'slim' ]; then printf 'CREATE TEMPORARY TABLE `moveable_binary_packages%s` (`id` BIGINT, `to_repository` MEDIUMINT, UNIQUE KEY (`id`));\n' \ "${copy}" done + printf 'DROP TEMPORARY TABLE IF EXISTS `package_blobs`;\n' + printf 'CREATE TEMPORARY TABLE `package_blobs` (`ps_a` BIGINT, `ps_b` BIGINT, UNIQUE KEY `content` (`ps_a`,`ps_b`));\n' + # all packages being vaguely relevant enter `package_blobs`, because + # they might block any other package from moving + printf 'INSERT IGNORE INTO `package_blobs` (`ps_a`,`ps_b`)' + printf ' SELECT `a_ps`.`id`,`b_ps`.`id`' + printf ' FROM `package_sources` AS `a_ps`' + printf ' JOIN `package_sources` AS `b_ps`' + printf ' ON UNIX_TIMESTAMP(`a_ps`.`commit_time`) - UNIX_TIMESTAMP(`b_ps`.`commit_time`) BETWEEN -10 AND 10' + mysql_join_package_sources_build_assignments 'a_ps' 'a_ba' + mysql_join_package_sources_build_assignments 'b_ps' 'b_ba' + mysql_join_build_assignments_binary_packages 'a_ba' 'a_bp' + mysql_join_build_assignments_binary_packages 'b_ba' 'b_bp' + mysql_join_binary_packages_repositories 'a_bp' 'a_r' + mysql_join_binary_packages_repositories 'b_bp' 'b_r' + mysql_join_repositories_repository_stabilities 'a_r' 'a_rs' + mysql_join_repositories_repository_stabilities 'b_r' 'b_rs' + printf ' WHERE `a_rs`.`name` = `from_stability`' + printf ' AND `b_rs`.`name` = `from_stability`;\n' # these packages are considered for moving: printf 'INSERT IGNORE INTO `moveable_binary_packages` (`id`,`to_repository`)' printf ' SELECT `binary_packages`.`id`,`repository_moves`.`to_repository`' @@ -409,6 +428,7 @@ if [ ! "$1" = 'slim' ]; then # list until no further changes are required printf 'REPEAT\n' printf 'SET row_count_saved = 0;\n' + # create copies of our temporary tables *yuck* for table in 'replaced' 'moveable'; do for copy in '' '2'; do @@ -531,6 +551,38 @@ if [ ! "$1" = 'slim' ]; then # b) 2) ^ printf ');\n' printf 'SET row_count_saved = row_count_saved + ROW_COUNT();\n' + + # refresh copies of our temporary tables *yuck* + for table in 'replaced' 'moveable'; do + for copy in '' '2'; do + if [ "${table}" = 'moveable' ] && \ + [ "${copy}" = '2' ]; then + continue + fi + printf 'DELETE FROM `%s_binary_packages_copy%s`;\n' "${table}" "${copy}" + printf 'INSERT IGNORE INTO `%s_binary_packages_copy%s`' "${table}" "${copy}" + printf ' SELECT `%s_binary_packages`.*' "${table}" + printf ' FROM `%s_binary_packages`;\n' "${table}" + done + done + + printf 'DELETE `replaced_binary_packages`,`moveable_binary_packages` FROM `replaced_binary_packages`' + printf ' RIGHT JOIN `moveable_binary_packages`' + printf ' ON `replaced_binary_packages`.`replaced_by`=`moveable_binary_packages`.`id`' + printf ' JOIN `binary_packages`' + printf ' ON `binary_packages`.`id`=`moveable_binary_packages`.`id`' + mysql_join_binary_packages_build_assignments + printf ' JOIN `package_blobs`' + printf ' ON `build_assignments`.`package_source`=`package_blobs`.`ps_a`' + printf ' JOIN `build_assignments` AS `bl_ba`' + printf ' ON `bl_ba`.`package_source`=`package_blobs`.`ps_b`' + mysql_join_build_assignments_binary_packages 'bl_ba' 'bl_bp' + printf ' WHERE NOT EXISTS (' + printf 'SELECT 1 FROM `moveable_binary_packages_copy`' + printf ' WHERE `moveable_binary_packages_copy`.`id`=`bl_bp`.`id`' + printf ');\n' + printf 'SET row_count_saved = row_count_saved + ROW_COUNT();\n' + printf 'UNTIL row_count_saved=0\n' printf 'END REPEAT;\n' for table in 'moveable' 'replaced'; do diff --git a/misc/database-layout.dump b/misc/database-layout.dump index 33c4e4a..d35d100 100644 --- a/misc/database-layout.dump +++ b/misc/database-layout.dump @@ -44,6 +44,30 @@ CREATE TEMPORARY TABLE `moveable_binary_packages_copy` (`id` BIGINT, `to_reposit DROP TEMPORARY TABLE IF EXISTS `moveable_binary_packages_copy2`; DROP TEMPORARY TABLE IF EXISTS `replaced_binary_packages_copy2`; CREATE TEMPORARY TABLE `replaced_binary_packages_copy2` (`id` BIGINT, `replaced_by` BIGINT, UNIQUE KEY (`id`)); +DROP TEMPORARY TABLE IF EXISTS `package_blobs`; +CREATE TEMPORARY TABLE `package_blobs` (`ps_a` BIGINT, `ps_b` BIGINT, UNIQUE KEY `content` (`ps_a`,`ps_b`)); +INSERT IGNORE INTO `package_blobs` (`ps_a`,`ps_b`) + SELECT `a_ps`.`id`,`b_ps`.`id` + FROM `package_sources` AS `a_ps` + JOIN `package_sources` AS `b_ps` + ON UNIX_TIMESTAMP(`a_ps`.`commit_time`) - UNIX_TIMESTAMP(`b_ps`.`commit_time`) BETWEEN -10 AND 10 + JOIN `build_assignments` AS `a_ba` + ON `a_ps`.`id`=`a_ba`.`package_source` + JOIN `build_assignments` AS `b_ba` + ON `b_ps`.`id`=`b_ba`.`package_source` + JOIN `binary_packages` AS `a_bp` + ON `a_ba`.`id`=`a_bp`.`build_assignment` + JOIN `binary_packages` AS `b_bp` + ON `b_ba`.`id`=`b_bp`.`build_assignment` + JOIN `repositories` AS `a_r` + ON `a_bp`.`repository`=`a_r`.`id` + JOIN `repositories` AS `b_r` + ON `b_bp`.`repository`=`b_r`.`id` + JOIN `repository_stabilities` AS `a_rs` + ON `a_r`.`stability`=`a_rs`.`id` + JOIN `repository_stabilities` AS `b_rs` + ON `b_r`.`stability`=`b_rs`.`id` + WHERE `a_rs`.`name` = `from_stability` AND `b_rs`.`name` = `from_stability`; INSERT IGNORE INTO `moveable_binary_packages` (`id`,`to_repository`) SELECT `binary_packages`.`id`,`repository_moves`.`to_repository` FROM `binary_packages` @@ -184,6 +208,40 @@ SELECT * FROM `replaced_binary_packages_copy2` WHERE `replaced_binary_packages_copy2`.`id`=`subst_bp`.`id`) AND `subst_itp`.`install_target`=`install_target_providers`.`install_target`); SET row_count_saved = row_count_saved + ROW_COUNT(); +DELETE + FROM `replaced_binary_packages_copy`; +INSERT IGNORE INTO `replaced_binary_packages_copy` + SELECT `replaced_binary_packages`.* + FROM `replaced_binary_packages`; +DELETE + FROM `replaced_binary_packages_copy2`; +INSERT IGNORE INTO `replaced_binary_packages_copy2` + SELECT `replaced_binary_packages`.* + FROM `replaced_binary_packages`; +DELETE + FROM `moveable_binary_packages_copy`; +INSERT IGNORE INTO `moveable_binary_packages_copy` + SELECT `moveable_binary_packages`.* + FROM `moveable_binary_packages`; +DELETE `replaced_binary_packages`,`moveable_binary_packages` + FROM `replaced_binary_packages` + RIGHT JOIN `moveable_binary_packages` + ON `replaced_binary_packages`.`replaced_by`=`moveable_binary_packages`.`id` + JOIN `binary_packages` + ON `binary_packages`.`id`=`moveable_binary_packages`.`id` + JOIN `build_assignments` + ON `binary_packages`.`build_assignment`=`build_assignments`.`id` + JOIN `package_blobs` + ON `build_assignments`.`package_source`=`package_blobs`.`ps_a` + JOIN `build_assignments` AS `bl_ba` + ON `bl_ba`.`package_source`=`package_blobs`.`ps_b` + JOIN `binary_packages` AS `bl_bp` + ON `bl_ba`.`id`=`bl_bp`.`build_assignment` + WHERE NOT EXISTS ( +SELECT 1 + FROM `moveable_binary_packages_copy` + WHERE `moveable_binary_packages_copy`.`id`=`bl_bp`.`id`); +SET row_count_saved = row_count_saved + ROW_COUNT(); UNTIL row_count_saved=0 END REPEAT; DROP TEMPORARY TABLE `moveable_binary_packages_copy`; -- cgit v1.2.3-54-g00ecf From bea2e56b0b86d478c0d5247b2c8ed8a939eac349 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Tue, 24 Apr 2018 14:22:19 +0200 Subject: bin/bootstrap-mysql,misc/database-layout.dump: "EXISTS (SELECT * FROM ...)" -> "EXISTS (SELECT 1 FROM ...)" --- bin/bootstrap-mysql | 14 +++++++------- misc/database-layout.dump | 14 +++++++------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/bin/bootstrap-mysql b/bin/bootstrap-mysql index 2bcd212..35f5398 100755 --- a/bin/bootstrap-mysql +++ b/bin/bootstrap-mysql @@ -454,19 +454,19 @@ if [ ! "$1" = 'slim' ]; then printf ' AND `dependency_types`.`relevant_for_binary_packages`' # ... by a not-deleted, "more stable" package already in place or ... printf ' WHERE NOT EXISTS (' - printf 'SELECT * FROM `install_target_providers`' + printf 'SELECT 1 FROM `install_target_providers`' mysql_join_install_target_providers_binary_packages '' 'prov_bp' mysql_join_binary_packages_repositories 'prov_bp' 'prov_r' printf ' JOIN `repository_stability_relations` ON `prov_r`.`stability`=`repository_stability_relations`.`more_stable`' printf ' WHERE `install_target_providers`.`install_target`=`dependencies`.`depending_on`' printf ' AND `target_repositories`.`stability`=`repository_stability_relations`.`less_stable`' printf ' AND NOT EXISTS (' - printf 'SELECT * FROM `replaced_binary_packages_copy`' + printf 'SELECT 1 FROM `replaced_binary_packages_copy`' printf ' WHERE `replaced_binary_packages_copy`.`id`=`prov_bp`.`id`' printf ')' # ... by a moved package printf ') AND NOT EXISTS (' - printf 'SELECT * FROM `install_target_providers`' + printf 'SELECT 1 FROM `install_target_providers`' printf ' JOIN `moveable_binary_packages_copy` ON `moveable_binary_packages_copy`.`id`=`install_target_providers`.`package`' printf ' WHERE `install_target_providers`.`install_target`=`dependencies`.`depending_on`' printf ');\n' @@ -506,7 +506,7 @@ if [ ! "$1" = 'slim' ]; then mysql_join_install_target_providers_dependencies printf ' AND NOT EXISTS (' # dependencies of replaced packages don't matter - printf 'SELECT * FROM `replaced_binary_packages_copy`' + printf 'SELECT 1 FROM `replaced_binary_packages_copy`' printf ' WHERE `replaced_binary_packages_copy`.`id`=`dependencies`.`dependent`' printf ')' mysql_join_dependencies_dependency_types @@ -523,7 +523,7 @@ if [ ! "$1" = 'slim' ]; then # a) ^ printf ' WHERE NOT EXISTS (' # no moved package ... - printf 'SELECT *' + printf 'SELECT 1' printf ' FROM `moveable_binary_packages_copy`' mysql_join_binary_packages_install_target_providers 'moveable_binary_packages_copy' 'subst_itp' # ... provides the same @@ -531,7 +531,7 @@ if [ ! "$1" = 'slim' ]; then # b) 1) ^ printf ') AND NOT EXISTS (' # no current package ... - printf 'SELECT *' + printf 'SELECT 1' printf ' FROM `binary_packages` AS `subst_bp`' mysql_join_binary_packages_install_target_providers 'subst_bp' 'subst_itp' # ... in a repository ... @@ -543,7 +543,7 @@ if [ ! "$1" = 'slim' ]; then printf ' WHERE `subst_rr`.`less_stable`=`repl_r`.`stability`' printf ' AND NOT EXISTS (' # ... and which is not replaced ... - printf 'SELECT * FROM `replaced_binary_packages_copy2`' + printf 'SELECT 1 FROM `replaced_binary_packages_copy2`' printf ' WHERE `replaced_binary_packages_copy2`.`id`=`subst_bp`.`id`' printf ')' # ... and provides the same diff --git a/misc/database-layout.dump b/misc/database-layout.dump index d35d100..e27afbd 100644 --- a/misc/database-layout.dump +++ b/misc/database-layout.dump @@ -133,7 +133,7 @@ DELETE `replaced_binary_packages`,`moveable_binary_packages` JOIN `dependency_types` ON `dependencies`.`dependency_type`=`dependency_types`.`id` AND `dependency_types`.`relevant_for_binary_packages` WHERE NOT EXISTS ( -SELECT * +SELECT 1 FROM `install_target_providers` JOIN `binary_packages` AS `prov_bp` ON `install_target_providers`.`package`=`prov_bp`.`id` @@ -142,10 +142,10 @@ SELECT * JOIN `repository_stability_relations` ON `prov_r`.`stability`=`repository_stability_relations`.`more_stable` WHERE `install_target_providers`.`install_target`=`dependencies`.`depending_on` AND `target_repositories`.`stability`=`repository_stability_relations`.`less_stable` AND NOT EXISTS ( -SELECT * +SELECT 1 FROM `replaced_binary_packages_copy` WHERE `replaced_binary_packages_copy`.`id`=`prov_bp`.`id`)) AND NOT EXISTS ( -SELECT * +SELECT 1 FROM `install_target_providers` JOIN `moveable_binary_packages_copy` ON `moveable_binary_packages_copy`.`id`=`install_target_providers`.`package` @@ -176,7 +176,7 @@ DELETE `replaced_binary_packages`,`moveable_binary_packages` ON `repl_bp`.`id`=`install_target_providers`.`package` JOIN `dependencies` ON `install_target_providers`.`install_target`=`dependencies`.`depending_on` AND NOT EXISTS ( -SELECT * +SELECT 1 FROM `replaced_binary_packages_copy` WHERE `replaced_binary_packages_copy`.`id`=`dependencies`.`dependent`) JOIN `dependency_types` @@ -190,12 +190,12 @@ SELECT * JOIN `repository_stability_relations` AS `repl_rr` ON `repl_rr`.`more_stable`=`repl_r`.`stability` AND `repl_rr`.`less_stable`=`req_r`.`stability` WHERE NOT EXISTS ( -SELECT * +SELECT 1 FROM `moveable_binary_packages_copy` JOIN `install_target_providers` AS `subst_itp` ON `moveable_binary_packages_copy`.`id`=`subst_itp`.`package` WHERE `subst_itp`.`install_target`=`install_target_providers`.`install_target`) AND NOT EXISTS ( -SELECT * +SELECT 1 FROM `binary_packages` AS `subst_bp` JOIN `install_target_providers` AS `subst_itp` ON `subst_bp`.`id`=`subst_itp`.`package` @@ -204,7 +204,7 @@ SELECT * JOIN `repository_stability_relations` AS `subst_rr` ON `subst_rr`.`more_stable`=`subst_r`.`stability` WHERE `subst_rr`.`less_stable`=`repl_r`.`stability` AND NOT EXISTS ( -SELECT * +SELECT 1 FROM `replaced_binary_packages_copy2` WHERE `replaced_binary_packages_copy2`.`id`=`subst_bp`.`id`) AND `subst_itp`.`install_target`=`install_target_providers`.`install_target`); SET row_count_saved = row_count_saved + ROW_COUNT(); -- cgit v1.2.3-54-g00ecf From 42235c298c9666b06cf1d6ced7346882ce0f1b33 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Wed, 25 Apr 2018 14:14:39 +0200 Subject: lib/mysql-functions: mysql_cleanup: a build_assignment might be handed out a couple of times, with one set of built packages not on the build-list anymore - do not remove build_assignments in that case --- lib/mysql-functions | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/lib/mysql-functions b/lib/mysql-functions index 8101e0c..a15a8bb 100755 --- a/lib/mysql-functions +++ b/lib/mysql-functions @@ -882,16 +882,19 @@ mysql_cleanup() { printf ');\n' # remove jobs from build slaves that are not on the build-list if [ "${operator}" = 'DELETE' ]; then - printf 'UPDATE `build_slaves`' + printf 'UPDATE `repositories`' else - printf 'SELECT COUNT(DISTINCT `build_slaves`.`id`) FROM `build_slaves`' + printf 'SELECT COUNT(DISTINCT `build_slaves`.`id`) FROM `repositories`' fi - mysql_join_build_slaves_binary_packages - mysql_join_binary_packages_repositories + mysql_join_repositories_binary_packages + printf ' AND `repositories`.`name`="build-list"' + printf ' RIGHT' + mysql_join_binary_packages_build_slaves if [ "${operator}" = 'DELETE' ]; then printf ' SET `build_slaves`.`currently_building`=NULL' fi - printf ' WHERE `repositories`.`name`!="build-list";\n' + printf ' WHERE `build_slaves`.`currently_building` IS NOT NULL' + printf ' AND `repositories`.`id` IS NULL;\n' # remove build orders from build slaves which have not connected within 1h if [ "${operator}" = 'DELETE' ]; then printf 'UPDATE `build_slaves`' -- cgit v1.2.3-54-g00ecf From d65b3fe76adfad2c1db5285bf6fe35aee0f777f2 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Wed, 25 Apr 2018 14:40:16 +0200 Subject: lib/mysql-functions: add TODO --- lib/mysql-functions | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/mysql-functions b/lib/mysql-functions index a15a8bb..359caf3 100755 --- a/lib/mysql-functions +++ b/lib/mysql-functions @@ -9,6 +9,9 @@ if [ -z "${base_dir}" ]; then . '../conf/default.conf' fi +# TODO: replace most/all insert-select queries by separate select and insert +# queries + # base64_encode_each encode each line of stdin with base64 base64_encode_each() { -- cgit v1.2.3-54-g00ecf From 98082a53d27bdc880b47ada00c9300f3094e18fc Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Wed, 25 Apr 2018 15:31:00 +0200 Subject: bin/build-packages: do not consider link dependencies of 64 bit stuff --- bin/build-packages | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bin/build-packages b/bin/build-packages index e9ac0c4..c109feb 100755 --- a/bin/build-packages +++ b/bin/build-packages @@ -466,6 +466,9 @@ while [ "${count}" -ne 0 ]; do find "${package_content_dir}/${pkgfile##*/}" \ -name 'opt' -prune , \ -exec objdump -x '{}' \; 2>/dev/null | \ + sed ' + / i386:x86-64, /,/ i386:x86-32, / d + ' | \ grep -w 'NEEDED' | \ awk '{print $2}' | \ sed ' -- cgit v1.2.3-54-g00ecf From 8a7888b2d23d79de6826763301320ad7dab1357d Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Wed, 25 Apr 2018 15:41:12 +0200 Subject: bin/build-packages: make architecture filter of libraries more precise --- bin/build-packages | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/build-packages b/bin/build-packages index c109feb..fc80ab1 100755 --- a/bin/build-packages +++ b/bin/build-packages @@ -467,7 +467,7 @@ while [ "${count}" -ne 0 ]; do -name 'opt' -prune , \ -exec objdump -x '{}' \; 2>/dev/null | \ sed ' - / i386:x86-64, /,/ i386:x86-32, / d + /^architecture:.* i386:x86-64, /,/^architecture:.* i386:x86-32, / d ' | \ grep -w 'NEEDED' | \ awk '{print $2}' | \ -- cgit v1.2.3-54-g00ecf From 3cc18396b92c2bcfb795eff17b9592a6b42473f9 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Wed, 25 Apr 2018 15:47:00 +0200 Subject: bin/build-master-status: todos may be in lib/, too --- bin/build-master-status | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/build-master-status b/bin/build-master-status index 9503d71..9d8f2d1 100755 --- a/bin/build-master-status +++ b/bin/build-master-status @@ -19,7 +19,7 @@ fi mysql_cleanup # update todos -find "${base_dir}/bin/" "${base_dir}/conf/" -type f \ +find "${base_dir}/bin/" "${base_dir}/conf/" "${base_dir}/lib/" -type f \ -exec grep -nHF '' '{}' \; | \ sed 's,^'"$(str_to_regex "${base_dir}")"'/,,' | \ sed -n ' -- cgit v1.2.3-54-g00ecf From 47e2bc0ba30bf2eb66abf59429ae085366c01056 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Wed, 25 Apr 2018 15:48:43 +0200 Subject: bin/get-package-updates: remove done todo --- bin/get-package-updates | 3 --- 1 file changed, 3 deletions(-) diff --git a/bin/get-package-updates b/bin/get-package-updates index 31e0b68..56addd7 100755 --- a/bin/get-package-updates +++ b/bin/get-package-updates @@ -14,9 +14,6 @@ # TODO: keep database clean in case of abort -# TODO: removing something from the blacklist should trigger a build -# (if it is found in upstreams repositories) - # shellcheck disable=SC2016 usage() { >&2 echo '' -- cgit v1.2.3-54-g00ecf From f25ab9159d34ffc58ce3f9a3edd76c0315fdedc4 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Wed, 25 Apr 2018 16:07:47 +0200 Subject: bin/slave-build-connect: extract id slave of slave for further commands --- bin/slave-build-connect | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/bin/slave-build-connect b/bin/slave-build-connect index b176c8f..4fcb38a 100755 --- a/bin/slave-build-connect +++ b/bin/slave-build-connect @@ -16,10 +16,28 @@ if [ "x${SSH_ORIGINAL_COMMAND%% *}" = 'xget-assignment' ] || \ fi + # shellcheck disable=SC2016 + slave_id=$( + { + printf 'SELECT `build_slaves`.`id` FROM `build_slaves`' + printf ' WHERE `build_slaves`.`name`=from_base64("%s");\n' \ + "$( + printf '%s' "$1" | \ + base64 -w0 + )" + } | \ + mysql_run_query + ) + if [ -z "${slave_id}" ]; then + >&2 printf 'Build slave "%s" is unnknown to the database.\n' "$1" + exit 42 + fi + # shellcheck disable=SC2016 { printf 'INSERT INTO `ssh_log` (`build_slave`,`action`,`parameters`)' - printf ' SELECT `build_slaves`.`id`' + printf ' VALUES (%s' \ + "${slave_id}" printf ',from_base64("%s")' \ "$( printf '%s' "${SSH_ORIGINAL_COMMAND%% *}" | \ @@ -29,16 +47,11 @@ if [ "x${SSH_ORIGINAL_COMMAND%% *}" = 'xget-assignment' ] || \ printf '%s' "${SSH_ORIGINAL_COMMAND#* }" | \ base64 -w0 )" - printf ' FROM `build_slaves`' - printf ' WHERE `build_slaves`.`name`=from_base64("%s");\n' \ - "$( - printf '%s' "$1" | \ - base64 -w0 - )" + printf ');\n' } | \ mysql_run_query 'unimportant' - slave="$1" /bin/sh -c "${base_dir}/bin/${SSH_ORIGINAL_COMMAND}" + slave="$1" slave_id="${slave_id}" /bin/sh -c "${base_dir}/bin/${SSH_ORIGINAL_COMMAND}" else -- cgit v1.2.3-54-g00ecf From b9528adaf20dc1bc9d4ed25648239fb9afaf4157 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Wed, 25 Apr 2018 16:42:12 +0200 Subject: misc/database-layout.dump: datetime -> timestamp --- misc/database-layout.dump | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/misc/database-layout.dump b/misc/database-layout.dump index e27afbd..8ff5049 100644 --- a/misc/database-layout.dump +++ b/misc/database-layout.dump @@ -319,7 +319,7 @@ binary_packages CREATE TABLE `binary_packages` ( `architecture` smallint(6) NOT NULL, `is_to_be_deleted` bit(1) NOT NULL, `sha512sum` varchar(128) COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `last_moved` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, + `last_moved` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`), UNIQUE KEY `file_name` (`pkgname`,`epoch`,`pkgver`,`pkgrel`,`sub_pkgrel`,`architecture`,`repository`), UNIQUE KEY `content` (`build_assignment`,`sub_pkgrel`,`pkgname`,`architecture`,`repository`), @@ -337,7 +337,7 @@ build_assignments CREATE TABLE `build_assignments` ( `is_broken` bit(1) NOT NULL, `priority` smallint(6) NOT NULL, `is_black_listed` text COLLATE utf8mb4_unicode_ci, - `return_date` datetime DEFAULT NULL, + `return_date` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `content` (`package_source`,`architecture`), KEY `architecture` (`architecture`), @@ -396,7 +396,7 @@ email_actions CREATE TABLE `email_actions` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci email_log CREATE TABLE `email_log` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, - `date` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, + `date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `success` bit(1) NOT NULL, `action` mediumint(9) DEFAULT NULL, `count` mediumint(9) DEFAULT NULL, @@ -420,7 +420,7 @@ failed_builds CREATE TABLE `failed_builds` ( `id` mediumint(9) NOT NULL AUTO_INCREMENT, `build_slave` mediumint(9) NOT NULL, `build_assignment` bigint(20) NOT NULL, - `date` datetime NOT NULL, + `date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `reason` smallint(6) NOT NULL, `log_file` varchar(512) COLLATE utf8mb4_unicode_ci NOT NULL, PRIMARY KEY (`id`), @@ -475,7 +475,7 @@ package_sources CREATE TABLE `package_sources` ( `upstream_package_repository` smallint(6) NOT NULL, `uses_upstream` bit(1) NOT NULL, `uses_modification` bit(1) NOT NULL, - `commit_time` datetime NOT NULL, + `commit_time` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', PRIMARY KEY (`id`), UNIQUE KEY `content` (`pkgbase`,`git_revision`,`mod_git_revision`), KEY `upstream_package_repository` (`upstream_package_repository`), @@ -537,7 +537,7 @@ ssh_keys CREATE TABLE `ssh_keys` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ssh_log CREATE TABLE `ssh_log` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, - `date` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, + `date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `build_slave` mediumint(9) DEFAULT NULL, `action` varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL, `parameters` text COLLATE utf8mb4_unicode_ci NOT NULL, @@ -547,7 +547,7 @@ ssh_log CREATE TABLE `ssh_log` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci statistics CREATE TABLE `statistics` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, - `date` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, + `date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `stable_packages_count` mediumint(9) NOT NULL, `pending_tasks_count` mediumint(9) NOT NULL, `pending_packages_count` mediumint(9) NOT NULL, -- cgit v1.2.3-54-g00ecf From d55eee94ace8c1bd2948438d73cc56729331da66 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Thu, 26 Apr 2018 11:04:10 +0200 Subject: bin/delete-packages: fix indentation --- bin/delete-packages | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/delete-packages b/bin/delete-packages index 7d2a3bd..1d4b230 100755 --- a/bin/delete-packages +++ b/bin/delete-packages @@ -135,19 +135,19 @@ export TMPDIR="${tmp_dir}" printf ')' printf ');\n' - printf ' SELECT DISTINCT "repo",`repositories`.`name`' + printf 'SELECT DISTINCT "repo",`repositories`.`name`' printf ' FROM `to_deletes`' printf ' JOIN `binary_packages` ON `to_deletes`.`id`=`binary_packages`.`id`' mysql_join_binary_packages_repositories printf ';\n' - printf ' SELECT "package",`repositories`.`name`,`binary_packages`.`pkgname`' + printf 'SELECT "package",`repositories`.`name`,`binary_packages`.`pkgname`' printf ' FROM `to_deletes`' printf ' JOIN `binary_packages` ON `to_deletes`.`id`=`binary_packages`.`id`' mysql_join_binary_packages_repositories printf ';\n' - printf ' SELECT "package-file",`repositories`.`name`,' + printf 'SELECT "package-file",`repositories`.`name`,' mysql_package_name_query printf ' FROM `to_deletes`' printf ' JOIN `binary_packages` ON `to_deletes`.`id`=`binary_packages`.`id`' @@ -155,7 +155,7 @@ export TMPDIR="${tmp_dir}" mysql_join_binary_packages_architectures printf ';\n' - printf ' SELECT "package-id",`to_deletes`.`id`' + printf 'SELECT "package-id",`to_deletes`.`id`' printf ' FROM `to_deletes`' printf ';\n' } | \ -- cgit v1.2.3-54-g00ecf From debfc92ee0263d726c4bb9587351e7f9f2f8aef3 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Thu, 26 Apr 2018 11:13:12 +0200 Subject: lib/mysql-functions: mysql_add_package_source: insert-select -> select + insert --- lib/mysql-functions | 39 +++++++++++++++++++++++++++++---------- 1 file changed, 29 insertions(+), 10 deletions(-) diff --git a/lib/mysql-functions b/lib/mysql-functions index 359caf3..6739485 100755 --- a/lib/mysql-functions +++ b/lib/mysql-functions @@ -109,6 +109,7 @@ mysql_add_package_source() { local repo_path local commit_time local pkgbuild + local upstream_package_repository_id if grep -qx 'PKGBUILD_mod = \S\+' "${srcinfo_file}"; then uses_modification=1 @@ -148,11 +149,31 @@ mysql_add_package_source() { fi printf 'I' >&2 + upstream_package_repository_id=$( + { + printf 'SELECT `upstream_repositories`.`id`' + printf ' FROM `upstream_repositories`' + printf ' WHERE `upstream_repositories`.`name` = from_base64("%s")' \ + "$( + printf '%s' "${upstream_package_repository}" | \ + base64 -w0 + )" + printf ' LIMIT 1;\n' + } | \ + mysql_run_query + ) + + if [ -z "${upstream_package_repository_id}" ]; then + >&2 printf 'Cannot find upstream package repository "%s" in the database.\n' \ + "${upstream_package_repository}" + exit 2 + fi + { printf 'INSERT IGNORE INTO package_sources' printf ' (`pkgbase`,`git_revision`,`mod_git_revision`,`upstream_package_repository`,`uses_upstream`,`uses_modification`,`commit_time`)' - printf ' SELECT' - printf ' from_base64("%s"),' \ + printf ' VALUES (' + printf 'from_base64("%s"),' \ "$( printf '%s' "${pkgbase}" | \ base64 -w0 @@ -165,14 +186,12 @@ mysql_add_package_source() { printf '%s' "${mod_git_revision}" | \ base64 -w0 )" - printf ' `upstream_repositories`.`id`,%s,%s,from_unixtime(%s)' \ - "${uses_upstream}" "${uses_modification}" "${commit_time}" - printf ' FROM `upstream_repositories`' - printf ' WHERE `upstream_repositories`.`name` = from_base64("%s");' \ - "$( - printf '%s' "${upstream_package_repository}" | \ - base64 -w0 - )" + printf '%s,' \ + "${upstream_package_repository_id}" \ + "${uses_upstream}" \ + "${uses_modification}" + printf 'from_unixtime(%s));\n' \ + "${commit_time}" } | \ mysql_run_query printf 'J' >&2 -- cgit v1.2.3-54-g00ecf From 35efee7d4caa708b0971df9a4c2c8da092b93a7a Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Thu, 26 Apr 2018 15:03:24 +0200 Subject: bin/build-master-status: fix "next_packages" --- bin/build-master-status | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/bin/build-master-status b/bin/build-master-status index 9d8f2d1..7ab38d4 100755 --- a/bin/build-master-status +++ b/bin/build-master-status @@ -206,15 +206,20 @@ if [ ! -s "${work_dir}/build-master-sanity" ]; then mysql_join_build_assignments_binary_packages mysql_join_binary_packages_repositories printf ' WHERE `repositories`.`name`="build-list"' - printf ' AND NOT EXISTS (' - printf 'SELECT * FROM `dependencies`' - mysql_join_dependencies_dependency_types - printf ' AND `dependency_types`.`relevant_for_binary_packages`' - mysql_join_dependencies_install_target_providers - mysql_join_install_target_providers_binary_packages '' 'prov_bp' - mysql_join_binary_packages_repositories 'prov_bp' 'prov_r' - printf ' WHERE `prov_r`.`name`="build-list"' - printf ' AND `dependencies`.`dependent`=`binary_packages`.`id`' + printf ' AND (' + printf 'NOT EXISTS (' + printf 'SELECT 1 FROM `dependencies`' + mysql_join_dependencies_dependency_types + printf ' AND `dependency_types`.`relevant_for_building`' + mysql_join_dependencies_install_target_providers + mysql_join_install_target_providers_binary_packages '' 'prov_bp' + mysql_join_binary_packages_repositories 'prov_bp' 'prov_r' + printf ' WHERE `prov_r`.`name`="build-list"' + printf ' AND `dependencies`.`dependent`=`binary_packages`.`id`' + printf ') OR EXISTS (' + printf 'SELECT 1 FROM `build_dependency_loops`' + printf ' WHERE `build_dependency_loops`.`build_assignment`=`build_assignments`.`id`' + printf ')' printf '))' printf ');\n' } | \ -- cgit v1.2.3-54-g00ecf From ed62e2cb3798bd8f587b027c5eefc09d5ce7dbdb Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Tue, 1 May 2018 22:59:08 +0200 Subject: bin/get-package-updates: -d|--date new for debugging --- bin/get-package-updates | 29 +++++++++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-) diff --git a/bin/get-package-updates b/bin/get-package-updates index 56addd7..d18ebe2 100755 --- a/bin/get-package-updates +++ b/bin/get-package-updates @@ -22,8 +22,12 @@ usage() { >&2 echo '' >&2 echo 'possible options:' >&2 echo ' -b|--block: If necessary, wait for lock blocking.' + >&2 echo ' -d|--date $datetime:' + >&2 echo ' Pull latest commit before $datetime' + >&2 echo ' (yyyy-mm-ddThh:mm:ss). Conflicts -n.' >&2 echo ' -h|--help: Show this help and exit.' >&2 echo ' -n|--no-pull: Do not pull git repos, merely reorder build list.' + >&2 echo ' Conflicts -d.' >&2 echo ' -x|--test-exclusion $package:' >&2 echo ' Print additionally deleted/excluded packages if' >&2 echo ' "$package" would be black listed.' @@ -31,8 +35,9 @@ usage() { } eval set -- "$( - getopt -o bhnx: \ + getopt -o bd:hnx: \ --long block \ + --long date: \ --long help \ --long no-pull \ --long test-exclusion: \ @@ -41,6 +46,7 @@ eval set -- "$( )" block_flag='-n' +date_time='' test_exclusion='' pull=true @@ -50,6 +56,10 @@ do -b|--block) block_flag='' ;; + -d|--date) + shift + date_time="$1" + ;; -h|--help) usage 0 ;; @@ -82,6 +92,11 @@ if [ $# -ne 0 ]; then usage fi +if [ -n "${date_time}" ] && ! ${pull}; then + >&2 printf -- '-d and -n are mutually exclusive.\n' + usage +fi + if [ -s "${work_dir}/build-master-sanity" ]; then >&2 echo 'Build master is not sane.' exit @@ -143,9 +158,15 @@ for repo in ${repo_names}; do )'" # determine new git revision if ${pull}; then - eval "new_repo_revisions__${repo}='$( - git -C "${repo_path}" rev-parse HEAD - )'" + if [ -z "${date_time}" ]; then + eval "new_repo_revisions__${repo}='$( + git -C "${repo_path}" rev-parse HEAD + )'" + else + eval "new_repo_revisions__${repo}='$( + git -C "${repo_path}" rev-list -n1 --until "${date_time}" HEAD + )'" + fi else eval 'new_repo_revisions__'"${repo}"'="${old_repo_revisions__'"${repo}"'}"' fi -- cgit v1.2.3-54-g00ecf From ac07214218710b41db233b387b4bcb816b489e86 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Tue, 1 May 2018 23:12:03 +0200 Subject: bin/ii-connect: some more manners --- bin/ii-connect | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/bin/ii-connect b/bin/ii-connect index d678af1..07f47c6 100755 --- a/bin/ii-connect +++ b/bin/ii-connect @@ -140,6 +140,14 @@ if [ "$1" = 'watch' ]; then printf 'up? I'"'"'m up for %s, %s\n' "$(uptime -p | sed 's/^up //')" "$(uptime | sed 's/.*, //')" | \ sponge "${out_file%/out}/in" fi + regex='^\(\S\+ \)\?\S\+ <\S\+> \(.* \)\?[Tt]h\(anks\|x\)\([ ,.]\|$\)' + if grep "${regex}" "${out_file}" | \ + grep -q "${sloppy_salutation}"; then + done_something=true + sed -i "/${regex}/d" "${out_file}" + printf 'np\n' | \ + sponge "${out_file%/out}/in" + fi done sleep 1 done -- cgit v1.2.3-54-g00ecf From b8763816fbc71d088aa0ff6945507d19f8833dcd Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Tue, 1 May 2018 23:13:54 +0200 Subject: bin/ii-connect: accept !, too --- bin/ii-connect | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/ii-connect b/bin/ii-connect index 07f47c6..5fc5f37 100755 --- a/bin/ii-connect +++ b/bin/ii-connect @@ -140,7 +140,7 @@ if [ "$1" = 'watch' ]; then printf 'up? I'"'"'m up for %s, %s\n' "$(uptime -p | sed 's/^up //')" "$(uptime | sed 's/.*, //')" | \ sponge "${out_file%/out}/in" fi - regex='^\(\S\+ \)\?\S\+ <\S\+> \(.* \)\?[Tt]h\(anks\|x\)\([ ,.]\|$\)' + regex='^\(\S\+ \)\?\S\+ <\S\+> \(.* \)\?[Tt]h\(anks\|x\)\([ ,.!]\|$\)' if grep "${regex}" "${out_file}" | \ grep -q "${sloppy_salutation}"; then done_something=true -- cgit v1.2.3-54-g00ecf From 3665e56a097fd44285f014715e8d7af31d41663e Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Tue, 1 May 2018 23:55:17 +0200 Subject: bin/get-package-updates: check-dependencies are not a reason to blacklist a package --- bin/get-package-updates | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bin/get-package-updates b/bin/get-package-updates index d18ebe2..ef701a9 100755 --- a/bin/get-package-updates +++ b/bin/get-package-updates @@ -452,6 +452,9 @@ while [ -n "${black_listed_new}" ]; do mysql_join_package_sources_build_assignments 'a_ps' 'a_ba' mysql_join_build_assignments_binary_packages 'a_ba' 'a_bp' mysql_join_binary_packages_dependencies 'a_bp' + mysql_join_dependencies_dependency_types + printf ' AND `dependency_types`.`relevant_for_building`' + printf ' AND `dependency_types`.`relevant_for_binary_packages`' printf ' WHERE NOT EXISTS (' printf ' SELECT *' printf ' FROM `install_target_providers`' -- cgit v1.2.3-54-g00ecf From fb4e4757f7ca9ea8c12ed97c1887bb67ebd5505f Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Wed, 2 May 2018 11:25:16 +0200 Subject: lib/mysql-functions: mysql_cleanup is "unimportant" --- lib/mysql-functions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/mysql-functions b/lib/mysql-functions index 6739485..dad6bc6 100755 --- a/lib/mysql-functions +++ b/lib/mysql-functions @@ -941,7 +941,7 @@ mysql_cleanup() { printf ' AND (`build_slaves`.`last_action` IS NOT NULL' printf ' OR `build_slaves`.`logged_lines` IS NOT NULL);\n' } | \ - mysql_run_query + mysql_run_query 'unimportant' } # mysql_query_has_pending_dependencies `build_assignment`.`id` -- cgit v1.2.3-54-g00ecf From 71e15c002d5596d84b52c05625478a2ed3123695 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Wed, 2 May 2018 11:32:17 +0200 Subject: lib/mysql-functions: remove residues of unimportant mysql queries in case of error --- lib/mysql-functions | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/lib/mysql-functions b/lib/mysql-functions index dad6bc6..5ce7e0c 100755 --- a/lib/mysql-functions +++ b/lib/mysql-functions @@ -62,21 +62,27 @@ mysql_run_query() { # a present query_file means there was an error if [ -f "${query_stdin}" ]; then >&2 printf 'I could not complete a mysql query!\n' - if [ ! -s "${work_dir}/build-master-sanity" ]; then + if [ ! -s "${work_dir}/build-master-sanity" ] && \ + [ -z "${file_name_extra}" ]; then printf '\001ACTION failed to execute a mysql query - can you have a look at "%s"?.\001\n' \ "${query_stdin##*/}" \ | irc_say - for file in \ - "${query_stdin}" \ - "${query_stdout}" \ - "${query_stderr}"; do - cp "${file}" "${webserver_directory}/mysql-queries/${file##*/}.txt" - chmod go+r "${webserver_directory}/mysql-queries/${file##*/}.txt" - done fi + for file in \ + "${query_stdin}" \ + "${query_stdout}" \ + "${query_stderr}"; do + cp "${file}" "${webserver_directory}/mysql-queries/${file##*/}.txt" + chmod go+r "${webserver_directory}/mysql-queries/${file##*/}.txt" + done if [ -z "${file_name_extra}" ]; then echo 'A mysql query failed.' > \ "${work_dir}/build-master-sanity" + else + rm -f \ + "${query_stdin}" \ + "${query_stdout}" \ + "${query_stderr}" fi return 2 fi -- cgit v1.2.3-54-g00ecf From 6ba009bc8b913d1f35971470a393d84ac20bde67 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Wed, 2 May 2018 14:43:42 +0200 Subject: bin/get-assignment: use separate queries for select and insert/update --- bin/get-assignment | 137 +++++++++++++++++++++++------------------------------ 1 file changed, 59 insertions(+), 78 deletions(-) diff --git a/bin/get-assignment b/bin/get-assignment index 7f08d42..9e9a258 100755 --- a/bin/get-assignment +++ b/bin/get-assignment @@ -18,6 +18,7 @@ # TODO: honor manual build order of tool-chain: # toolchain build order: linux-api-headers->glibc->binutils->gcc->binutils->glibc +# hand_out_assignment $build_assignments.id hand_out_assignment() { # shellcheck disable=SC2016 @@ -32,46 +33,28 @@ hand_out_assignment() { mysql_join_build_assignments_binary_packages mysql_join_binary_packages_repositories printf ' WHERE `repositories`.`name`="build-list"' - printf ' AND `package_sources`.`%s`=from_base64("%s")' \ - 'pkgbase' "$(printf '%s' "$1" | base64 -w0)" \ - 'git_revision' "$(printf '%s' "$2" | base64 -w0)" \ - 'mod_git_revision' "$(printf '%s' "$3" | base64 -w0)" - printf ' AND `upstream_repositories`.`name`=from_base64("%s")' \ - "$(printf '%s' "$4" | base64 -w0)" + printf ' AND `build_assignments`.`id`=from_base64("%s")' \ + "$(printf '%s' "$1" | base64 -w0)" printf ' LIMIT 1;\n' + } | \ + mysql_run_query | \ + tr '\t' ' ' + # shellcheck disable=SC2016 + { printf 'UPDATE `build_slaves`' - printf ' SET `currently_building` = (' - printf ' SELECT `build_assignments`.`id`' - printf ' FROM `build_assignments`' - mysql_join_build_assignments_package_sources - mysql_join_package_sources_upstream_repositories - printf ' WHERE' - printf ' `package_sources`.`%s` = from_base64("%s") AND' \ - 'pkgbase' "$(printf '%s' "$1" | base64 -w0)" \ - 'git_revision' "$(printf '%s' "$2" | base64 -w0)" \ - 'mod_git_revision' "$(printf '%s' "$3" | base64 -w0)" - printf ' `upstream_repositories`.`name` = from_base64("%s")' \ - "$(printf '%s' "$4" | base64 -w0)" - printf ')' + printf ' SET `currently_building` = from_base64(%s)' \ + "$(printf '%s' "$1" | base64 -w0)" # shellcheck disable=SC2154 - printf ' WHERE `build_slaves`.`name`=from_base64("%s");\n' \ - "$(printf '%s' "${slave}" | base64 -w0)" + printf ' WHERE `build_slaves`.`id`=from_base64("%s");\n' \ + "$(printf '%s' "${slave_id}" | base64 -w0)" printf 'UPDATE `build_assignments`' - mysql_join_build_assignments_package_sources - mysql_join_package_sources_upstream_repositories printf ' SET `build_assignments`.`priority`=0' - printf ' WHERE' - printf ' `package_sources`.`%s` = from_base64("%s") AND' \ - 'pkgbase' "$(printf '%s' "$1" | base64 -w0)" \ - 'git_revision' "$(printf '%s' "$2" | base64 -w0)" \ - 'mod_git_revision' "$(printf '%s' "$3" | base64 -w0)" - printf ' `upstream_repositories`.`name` = from_base64("%s");\n' \ - "$(printf '%s' "$4" | base64 -w0)" + printf ' WHERE `build_assignments`.`id`=from_base64(%s);\n' \ + "$(printf '%s' "${slave_id}" | base64 -w0)" } | \ - mysql_run_query | \ - tr '\t' ' ' + mysql_run_query exit 0 @@ -108,13 +91,13 @@ trap clean_up EXIT currently_building=$( # shellcheck disable=SC2016 { - printf 'SELECT ' - mysql_query_select_pkgbase_and_revision + printf 'SELECT `build_assignments`.`id`' + printf ' FROM `build_assignments`' mysql_join_build_assignments_build_slaves mysql_join_build_assignments_binary_packages mysql_join_binary_packages_repositories - printf ' WHERE `build_slaves`.`name`=from_base64("%s")' \ - "$(printf '%s' "${slave}" | base64 -w0)" + printf ' WHERE `build_slaves`.`id`=from_base64("%s")' \ + "$(printf '%s' "${slave_id}" | base64 -w0)" printf ' AND `repositories`.`name`="build-list"' printf ' LIMIT 1;\n' } | \ @@ -122,8 +105,7 @@ currently_building=$( ) if [ -n "${currently_building}" ]; then - # shellcheck disable=SC2086 - hand_out_assignment ${currently_building} + hand_out_assignment "${currently_building}" fi # a package with [all dependencies met or which is part of a loop] @@ -135,54 +117,53 @@ fi next_building=$( # shellcheck disable=SC2016 { - printf 'SELECT ' - printf '`package_sources`.`pkgbase`=from_base64("%s") AS `requested`,' \ - "$( - printf '%s' "$1" | \ - base64 -w0 - )" - printf '`build_assignments`.`priority`,' - printf 'COALESCE(' - printf 'MAX(`failed_builds`.`date`),0' - printf ') AS `last_trial`,' - mysql_query_is_part_of_loop '`build_assignments`.`id`' - printf ' AS `part_of_loop`,' - mysql_query_select_pkgbase_and_revision - mysql_join_build_assignments_binary_packages - mysql_join_binary_packages_repositories - printf ' LEFT' - mysql_join_build_assignments_failed_builds - printf ' WHERE `repositories`.`name`="build-list"' - printf ' AND NOT EXISTS (' - printf ' SELECT *' - printf ' FROM `build_slaves`' - printf ' WHERE `build_slaves`.`currently_building`=`build_assignments`.`id`' - printf ') AND (' - printf '`build_assignments`.`is_blocked` IS NULL' - printf ' OR' - printf ' `package_sources`.`pkgbase`=from_base64("%s")' \ + printf 'SELECT `q`.`ba_id` FROM' + printf '(' + printf 'SELECT ' + printf '`package_sources`.`pkgbase`=from_base64("%s") AS `requested`,' \ "$( printf '%s' "$1" | \ base64 -w0 )" - printf ') AND (' + printf '`build_assignments`.`priority`,' + printf 'COALESCE(' + printf 'MAX(`failed_builds`.`date`),0' + printf ') AS `last_trial`,' mysql_query_is_part_of_loop '`build_assignments`.`id`' - printf ' OR NOT ' - mysql_query_has_pending_dependencies '`build_assignments`.`id`' - printf ')' - printf ' GROUP BY `build_assignments`.`id`' - printf ' ORDER BY `requested` DESC, `priority` DESC, `last_trial`, `part_of_loop`, `build_assignments`.`id`' - printf ' LIMIT 1;\n' + printf ' AS `part_of_loop`,' + printf '`build_assignments`.`id` AS `ba_id`' + printf ' FROM `build_assignments`' + mysql_join_build_assignments_binary_packages + mysql_join_binary_packages_repositories + printf ' LEFT' + mysql_join_build_assignments_failed_builds + printf ' WHERE `repositories`.`name`="build-list"' + printf ' AND NOT EXISTS (' + printf ' SELECT 1' + printf ' FROM `build_slaves`' + printf ' WHERE `build_slaves`.`currently_building`=`build_assignments`.`id`' + printf ') AND (' + printf '`build_assignments`.`is_blocked` IS NULL' + printf ' OR' + printf ' `package_sources`.`pkgbase`=from_base64("%s")' \ + "$( + printf '%s' "$1" | \ + base64 -w0 + )" + printf ') AND (' + mysql_query_is_part_of_loop '`build_assignments`.`id`' + printf ' OR NOT ' + mysql_query_has_pending_dependencies '`build_assignments`.`id`' + printf ')' + printf ' GROUP BY `build_assignments`.`id`' + printf ' ORDER BY `requested` DESC, `priority` DESC, `last_trial`, `part_of_loop`, `build_assignments`.`id`' + printf ' LIMIT 1' + printf ') AS `q`;\n' } | \ - mysql_run_query | \ - sed ' - y/\t/ / - s/^.* \(\S\+\( \S\+\)\{3\}\)$/\1/ - ' + mysql_run_query ) if [ -n "${next_building}" ]; then - # shellcheck disable=SC2086 - hand_out_assignment ${next_building} + hand_out_assignment "${next_building}" fi # Check if there are any pending packages at all -- cgit v1.2.3-54-g00ecf From 15421458d7acd49b561cc4c518be002ade4356b4 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Wed, 2 May 2018 14:48:11 +0200 Subject: bin/get-package-updates: select * -> select 1 --- bin/get-package-updates | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/get-package-updates b/bin/get-package-updates index ef701a9..73766c8 100755 --- a/bin/get-package-updates +++ b/bin/get-package-updates @@ -456,10 +456,10 @@ while [ -n "${black_listed_new}" ]; do printf ' AND `dependency_types`.`relevant_for_building`' printf ' AND `dependency_types`.`relevant_for_binary_packages`' printf ' WHERE NOT EXISTS (' - printf ' SELECT *' + printf ' SELECT 1' printf ' FROM `install_target_providers`' printf ' WHERE NOT EXISTS (' - printf ' SELECT *' + printf ' SELECT 1' printf ' FROM `bl`' printf ' JOIN `package_sources` AS `b_ps` ON `bl`.`pkgbase`=`b_ps`.`pkgbase`' mysql_join_package_sources_build_assignments 'b_ps' 'b_ba' @@ -470,7 +470,7 @@ while [ -n "${black_listed_new}" ]; do printf ') AND EXISTS (' # TODO: This should be corrected at the root: automatic install targets, which are bogus should # not be added in the first place - but how do we detect that? - printf ' SELECT *' + printf ' SELECT 1' printf ' FROM `install_target_providers`' printf ' WHERE `install_target_providers`.`install_target`=`dependencies`.`depending_on`' printf ');\n' -- cgit v1.2.3-54-g00ecf From 0f3ded1fe95a667a78061b7ff798befbbcc2403f Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Wed, 2 May 2018 14:57:56 +0200 Subject: bin/get-assignment: fix query --- bin/get-assignment | 1 + 1 file changed, 1 insertion(+) diff --git a/bin/get-assignment b/bin/get-assignment index 9e9a258..d8a77ca 100755 --- a/bin/get-assignment +++ b/bin/get-assignment @@ -133,6 +133,7 @@ next_building=$( printf ' AS `part_of_loop`,' printf '`build_assignments`.`id` AS `ba_id`' printf ' FROM `build_assignments`' + mysql_join_build_assignments_package_sources mysql_join_build_assignments_binary_packages mysql_join_binary_packages_repositories printf ' LEFT' -- cgit v1.2.3-54-g00ecf From a4cded36236c30ae66f1abeb9190ac17c1483c7f Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Wed, 2 May 2018 14:59:51 +0200 Subject: bin/get-assignment: fix yet another query --- bin/get-assignment | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/get-assignment b/bin/get-assignment index d8a77ca..34a990e 100755 --- a/bin/get-assignment +++ b/bin/get-assignment @@ -43,7 +43,7 @@ hand_out_assignment() { # shellcheck disable=SC2016 { printf 'UPDATE `build_slaves`' - printf ' SET `currently_building` = from_base64(%s)' \ + printf ' SET `currently_building` = from_base64("%s")' \ "$(printf '%s' "$1" | base64 -w0)" # shellcheck disable=SC2154 printf ' WHERE `build_slaves`.`id`=from_base64("%s");\n' \ @@ -51,7 +51,7 @@ hand_out_assignment() { printf 'UPDATE `build_assignments`' printf ' SET `build_assignments`.`priority`=0' - printf ' WHERE `build_assignments`.`id`=from_base64(%s);\n' \ + printf ' WHERE `build_assignments`.`id`=from_base64("%s");\n' \ "$(printf '%s' "${slave_id}" | base64 -w0)" } | \ mysql_run_query -- cgit v1.2.3-54-g00ecf From fb4ff76bc68d97c43bb8bcbb2c533d7b3e3b60a5 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Wed, 2 May 2018 16:09:13 +0200 Subject: bin/find-obsolete-packages new --- bin/find-obsolete-packages | 127 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 127 insertions(+) create mode 100755 bin/find-obsolete-packages diff --git a/bin/find-obsolete-packages b/bin/find-obsolete-packages new file mode 100755 index 0000000..3a4bebc --- /dev/null +++ b/bin/find-obsolete-packages @@ -0,0 +1,127 @@ +#!/bin/sh + +# shellcheck source=../conf/default.conf +. "${0%/*}/../conf/default.conf" + +usage() { + >&2 echo '' + >&2 echo 'find-obsolete-packages: find packages which are no longer available upstream.' + >&2 echo '' + >&2 echo 'possible options:' + >&2 echo ' -h|--help:' + >&2 echo ' Show this help and exit.' + >&2 echo ' -m|--mirror https://mirror.example.com/archlinux' + >&2 echo ' Mirror url to take upstream'"'"'s packages from.' + >&2 echo ' -n|--no-action:' + >&2 echo ' Do not mark packages as to_be_deleted.' + >&2 echo ' -w|--wait:' + >&2 echo ' Wait for lock if necessary.' + [ -z "$1" ] && exit 1 || exit "$1" +} + +eval set -- "$( + getopt -o hm:nw \ + --long help \ + --long mirror: \ + --long no-action \ + --long wait \ + -n "$(basename "$0")" -- "$@" || \ + echo usage +)" + +mirror='' +no_action=false +wait_for_lock='-n' + +while true +do + case "$1" in + -h|--help) + usage 0 + ;; + -m|--mirror) + if [ -n "${mirror}" ]; then + >&2 echo 'Already have one -m flag.' + usage + fi + shift + mirror="$1" + ;; + -n|--no-action) + no_action=true + ;; + -w|--wait) + wait_for_lock='' + ;; + --) + shift + break + ;; + *) + >&2 echo 'Whoops, forgot to implement option "'"$1"'" internally.' + exit 42 + ;; + esac + shift +done + +if [ $# -ne 0 ]; then + >&2 echo 'Too many arguments.' + usage +fi + +if [ -z "${mirror}" ]; then + >&2 echo 'Flag -m missing' + usage +fi + +if ! ${no_action}; then + exec 9> "${sanity_check_lock_file}" + if ! flock -s ${wait_for_lock} 9; then + >&2 echo 'Cannot get sanity-check lock.' + exit 1 + fi + + exec 8> "${build_list_lock_file}" + if ! flock ${wait_for_lock} 8; then + >&2 echo 'Cannot get build-list lock.' + exit 1 + fi +fi + +{ + for repo in core extra community; do + curl -Ss "${mirror}/${repo}/os/x86_64/${repo}.db.tar.gz" | \ + tar -tz + done | \ + sed -n ' + s,\(-[^-]*\)\{2\}/desc$,, + T + p + p + ' + # shellcheck disable=SC2016 + { + printf 'SELECT DISTINCT `binary_packages`.`pkgname`' + printf ' FROM `binary_packages`' + mysql_join_binary_packages_repositories + printf ' WHERE `repositories`.`is_on_master_mirror`' + printf ' AND NOT `binary_packages`.`is_to_be_deleted`' + } | \ + mysql_run_query +} | \ + sort | \ + uniq -u | \ + if ${no_action}; then + cat + else + # shellcheck disable=SC2016 + base64_encode_each | \ + sed ' + s/^/from_base64("/ + s/$/"),/ + 1 s/^/UPDATE `binary_packages` SET `is_to_be_deleted`=1 WHERE `binary_packages`.`pkgname` IN (/ + $ s/,$/);/ + ' | \ + mysql_run_query + fi -- cgit v1.2.3-54-g00ecf From 4814b1e2732cca03f4b557a9aa7a796c5e690e1f Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Thu, 3 May 2018 13:50:11 +0200 Subject: misc/database-layout.dmf: new column `repositories`.`architecture` + links now all 1:1 --- misc/database-layout.dmf | 1541 ++++++++++++++++++++++++---------------------- 1 file changed, 790 insertions(+), 751 deletions(-) diff --git a/misc/database-layout.dmf b/misc/database-layout.dmf index faf2eff..b9d8612 100644 --- a/misc/database-layout.dmf +++ b/misc/database-layout.dmf @@ -2,13 +2,13 @@ Relational - + - 42 - 135 + 237 + 40 - ssh_log + ssh_keys#ffffff @@ -18,25 +18,13 @@ True - date - DATETIME - True - False - - - build_slave + owner MEDIUMINT - False - False - - - action - VARCHAR(32) True False - parameters + fingerprint TEXT True False @@ -44,108 +32,102 @@
- + - -55 - -72 + -68 + 71 - email_log + email_actions#ffffff id - BIGINT + MEDIUMINT True True - date - DATETIME + name + VARCHAR(32) True False + +
+
+ + + 68 + 49 + + + allowed_email_actions + #ffffff + - success - BIT + id + BIGINT True - False - - - action - MEDIUMINT - False - False - - - count - MEDIUMINT - False - False + True gpg_key BIGINT - False + True False - comment - TEXT - False + action + MEDIUMINT + True False
- + - 481 - 395 + 106 + -51 - repository_moves + gpg_keys#ffffff id - MEDIUMINT + BIGINT True True - from_repository - MEDIUMINT + fingerprint + VARCHAR(40) True False - to_repository + owner MEDIUMINT True False - - upstream_package_repository - SMALLINT - True - False -
- + - 763 - 241 + 258 + -44 - repository_stabilities + persons#ffffff id - SMALLINT + MEDIUMINT True True @@ -155,38 +137,26 @@ True False - - bugtracker_category - VARCHAR(32) - False - False -
- + - 53 - 501 + 788 + -60 - build_dependency_loops + todo_links#ffffff - id + dependent BIGINT True - True - - - loop - MEDIUMINT - True False - build_assignment + depending_on BIGINT True False @@ -194,49 +164,55 @@
- + - 540 - -64 + 945 + -70 - dependency_types + todos#ffffff id - SMALLINT + BIGINT True True - name - VARCHAR(32) + file + VARCHAR(64) True False - relevant_for_building - BIT + line + MEDIUMINT True False - relevant_for_binary_packages - BIT + description + TEXT True False + + importance + SMALLINT + False + False +
- + - 348 - -60 + 737 + 38 - dependencies + statitstics#ffffff @@ -246,141 +222,111 @@ True - dependent - BIGINT + date + DATETIME True False - depending_on - BIGINT + stable_packages_count + MEDIUMINT True False - dependency_type - SMALLINT + pending_tasks_count + MEDIUMINT True False - -
-
- - - 563 - 42 - - - install_targets - #ffffff - - - id - BIGINT - True - True - - name - VARCHAR(64) + staging_packages_count + MEDIUMINT True False - -
-
- - - 415 - 321 - - - architectures - #ffffff - - id - SMALLINT + testing_packages_count + MEDIUMINT True - True + False - name - VARCHAR(16) + broken_tasks_count + MEDIUMINT True False - -
-
- - - 226 - 473 - - - package_sources - #ffffff - - id - BIGINT + dependency_loops_count + MEDIUMINT True - True + False - pkgbase - VARCHAR(64) + dependency_looped_tasks_count + MEDIUMINT True False - git_revision - VARCHAR(40) + locked_tasks_count + MEDIUMINT True False - mod_git_revision - VARCHAR(40) + blocked_tasks_count + MEDIUMINT True False - upsream_package_repository - SMALLINT + next_tasks_count + MEDIUMINT True False + +
+
+ + + 754 + 399 + + + repository_stability_relations + #ffffff + - uses_upstream - BIT + id + MEDIUMINT True - False + True - uses_modification - BIT + more_stable + MEDIUMINT True False - commit_time - DATETIME + less_stable + MEDIUMINT True False
- + - 539 - 533 + -62 + 370 - upstream_repositories + fail_reasons#ffffff @@ -391,12 +337,18 @@ name + VARCHAR(32) + True + False + + + identifier VARCHAR(64) True False - git_repository + severity SMALLINT True False @@ -404,111 +356,165 @@
- + - 770 - 508 + 53 + 346 - git_repositories + failed_builds#ffffff id - SMALLINT + MEDIUMINT True True - name - VARCHAR(64) + build_slave + MEDIUMINT True False - url - VARCHAR(128) + build_assignment + BIGINT True False - directory - VARCHAR(128) + date + DATETIME True False - head - VARCHAR(40) + reason + SMALLINT + True + False + + + log_file + VARCHAR(512) True False
- + - 529 - 273 + 247 + 291 - repositories + build_assignments#ffffff id - MEDIUMINT + BIGINT True True - name - VARCHAR(64) + package_source + BIGINT True False - stability + architecture SMALLINT True False - is_on_master_mirror + is_blocked + VARCHAR(128) + False + False + + + is_black_listed + VARCHAR(128) + False + False + + + is_broken BIT True False + + priority + SMALLINT + True + False + + + return_date + DATETIME + False + False +
- + - 554 - 117 + 186 + 137 - install_target_providers + build_slaves#ffffff id - BIGINT + MEDIUMINT True True - package + name + VARCHAR(32) + True + False + + + ssh_key BIGINT True False - install_target + currently_building BIGINT + False + False + + + last_connection + TIME True False + + logged_lines + BIGINT + False + False + + + last_action + VARCHAR(32) + False + False +
@@ -608,67 +614,13 @@
- - - 186 - 137 - - - build_slaves - #ffffff - - - id - MEDIUMINT - True - True - - - name - VARCHAR(32) - True - False - - - ssh_key - BIGINT - True - False - - - currently_building - BIGINT - False - False - - - last_connection - TIME - True - False - - - logged_lines - BIGINT - False - False - - - last_action - VARCHAR(32) - False - False - - -
-
- + - 247 - 291 + 554 + 117 - build_assignments + install_target_providers#ffffff @@ -678,57 +630,27 @@ True - package_source - BIGINT - True - False - - - architecture - SMALLINT - True - False - - - is_blocked - VARCHAR(128) - False - False - - - is_black_listed - VARCHAR(128) - False - False - - - is_broken - BIT - True - False - - - priority - SMALLINT + package + BIGINT True False - return_date - DATETIME - False + install_target + BIGINT + True False
- + - 53 - 346 + 529 + 273 - failed_builds + repositories#ffffff @@ -738,45 +660,39 @@ True - build_slave - MEDIUMINT + name + VARCHAR(64) True False - build_assignment - BIGINT + stability + SMALLINT True False - date - DATETIME + is_on_master_mirror + BIT True False - reason + architecture SMALLINT True False - - log_file - VARCHAR(512) - True - False -
- + - -62 - 370 + 770 + 508 - fail_reasons + git_repositories#ffffff @@ -787,62 +703,68 @@ name - VARCHAR(32) + VARCHAR(64) True False - identifier - VARCHAR(64) + url + VARCHAR(128) True False - severity - SMALLINT + directory + VARCHAR(128) + True + False + + + head + VARCHAR(40) True False
- + - 754 - 399 + 539 + 533 - repository_stability_relations + upstream_repositories#ffffff id - MEDIUMINT + SMALLINT True True - more_stable - MEDIUMINT + name + VARCHAR(64) True False - less_stable - MEDIUMINT + git_repository + SMALLINT True False
- + - 737 - 38 + 226 + 473 - statitstics + package_sources#ffffff @@ -852,81 +774,105 @@ True - date - DATETIME + pkgbase + VARCHAR(64) True False - stable_packages_count - MEDIUMINT + git_revision + VARCHAR(40) True False - pending_tasks_count - MEDIUMINT + mod_git_revision + VARCHAR(40) True False - staging_packages_count - MEDIUMINT + upsream_package_repository + SMALLINT True False - testing_packages_count - MEDIUMINT + uses_upstream + BIT True False - broken_tasks_count - MEDIUMINT + uses_modification + BIT True False - dependency_loops_count - MEDIUMINT + commit_time + DATETIME True False + +
+
+ + + 415 + 321 + + + architectures + #ffffff + - dependency_looped_tasks_count - MEDIUMINT + id + SMALLINT True - False + True - locked_tasks_count - MEDIUMINT + name + VARCHAR(16) True False + +
+
+ + + 563 + 42 + + + install_targets + #ffffff + - blocked_tasks_count - MEDIUMINT + id + BIGINT True - False + True - next_tasks_count - MEDIUMINT + name + VARCHAR(64) True False
- + - 945 - -70 + 348 + -60 - todos + dependencies#ffffff @@ -936,49 +882,85 @@ True - file - VARCHAR(64) + dependent + BIGINT True False - line - MEDIUMINT + depending_on + BIGINT True False - description - TEXT + dependency_type + SMALLINT True False + +
+
+ + + 540 + -64 + + + dependency_types + #ffffff + - importance + id SMALLINT - False + True + True + + + name + VARCHAR(32) + True + False + + + relevant_for_building + BIT + True + False + + + relevant_for_binary_packages + BIT + True False
- + - 788 - -60 + 53 + 501 - todo_links + build_dependency_loops#ffffff - dependent + id BIGINT True + True + + + loop + MEDIUMINT + True False - depending_on + build_assignment BIGINT True False @@ -986,18 +968,18 @@
- + - 258 - -44 + 763 + 241 - persons + repository_stabilities#ffffff id - MEDIUMINT + SMALLINT True True @@ -1007,46 +989,58 @@ True False + + bugtracker_category + VARCHAR(32) + False + False +
- + - 106 - -51 + 481 + 395 - gpg_keys + repository_moves#ffffff id - BIGINT + MEDIUMINT True True - fingerprint - VARCHAR(40) + from_repository + MEDIUMINT True False - owner + to_repository MEDIUMINT True False + + upstream_package_repository + SMALLINT + True + False +
- + - 68 - 49 + -55 + -72 - allowed_email_actions + email_log#ffffff @@ -1056,51 +1050,51 @@ True - gpg_key - BIGINT + date + DATETIME + True + False + + + success + BIT True False action MEDIUMINT - True + False False - -
-
- - - -68 - 71 - - - email_actions - #ffffff - - id + count MEDIUMINT - True - True + False + False - name - VARCHAR(32) - True + gpg_key + BIGINT + False + False + + + comment + TEXT + False False
- + - 237 - 40 + 42 + 135 - ssh_keys + ssh_log#ffffff @@ -1110,13 +1104,25 @@ True - owner + date + DATETIME + True + False + + + build_slave MEDIUMINT + False + False + + + action + VARCHAR(32) True False - fingerprint + parameters TEXT True False @@ -1124,128 +1130,161 @@
- + - 148.781 - 186.812 + 529 + 318.906 - 0 - + 180 + - 186 - 204.812 + 509.547 + 345.906 - 180 - + 0 + - OneToMany + OneToOne Mandatory Mandatory - 2 + 4 0 - + - 596.758 - 482.625 + 290.109 + 40 - 270 - + 90 + - 600.391 - 533 + 293.289 + 5.8125 - 90 - + 270 + - OneToMany + OneToOne Mandatory Mandatory - 3 + 1 0 - + - 558.172 - 395 + 256.727 + 137 90 - + - 583.885 - 360.625 + 290.109 + 103.812 270 - + - OneToMany + OneToOne Mandatory Mandatory - 1 + 2 0 - + - 635.344 - 395 + -9.85156 + 47.8125 + + 270 + + + + + -19.2734 + 71 90 - + + + + + OneToOne + + Mandatory + Mandatory + + + 3 + 0 + + + + + + - 638.771 - 360.625 + 68 + 80.9062 - 270 - + 180 + + + + + 29.4531 + 95.9062 + + 0 + - OneToMany + OneToOne Mandatory Mandatory @@ -1256,95 +1295,95 @@ - + - 433.484 - 303.625 + 142.789 + 49 - 270 - + 90 + - 447.914 - 321 + 159.109 + 12.8125 - 90 - + 270 + - OneToMany + OneToOne Mandatory Mandatory - 11 + 1 0 - + - 494.922 - -30.7917 + 35.2969 + -12.0938 0 - + - 540 - -20.1875 + 106 + -19.0938 180 - + - OneToMany + OneToOne Mandatory Mandatory - 3 + 5 0 - + - 693.656 - 316.812 + 212.219 + -19.0938 0 - + - 763 - 276.812 + 258 + -19.0938 180 - + - OneToMany + OneToOne Mandatory Mandatory @@ -1355,128 +1394,128 @@ - + - 494.922 - -1.58333 + 915.234 + -43.3958 0 - + - 563 - 69.8125 + 945 + -39.3958 180 - + - OneToMany + OneToOne Mandatory Mandatory - 2 + 0 0 - + - 613.289 - 117 + 915.234 + -26.7917 - 90 - + 0 + - 599.156 - 97.625 + 945 + -8.79167 - 270 - + 180 + - OneToMany + OneToOne Mandatory Mandatory - 2 + 1 0 - + - 421.461 - 27.625 + 816.656 + 399 - 270 - + 90 + - 433.484 - 56 + 815.635 + 304.812 - 90 - + 270 + - OneToMany + OneToOne Mandatory Mandatory - 1 + 2 0 - + - 554 - 152.812 + 879.312 + 399 - 180 - + 90 + - 506.969 - 138.542 + 868.271 + 304.812 - 0 - + 270 + - OneToMany + OneToOne Mandatory Mandatory @@ -1487,29 +1526,29 @@ - + - 451.781 - 548.812 + 53 + 398.906 - 0 - + 180 + - 539 - 568.812 + 33.4375 + 408.906 - 180 - + 0 + - OneToMany + OneToOne Mandatory Mandatory @@ -1520,29 +1559,29 @@ - + - 506.969 - 221.083 + 204.719 + 398.906 0 - + - 611.328 - 273 + 247 + 357.906 - 90 - + 180 + - OneToMany + OneToOne Mandatory Mandatory @@ -1553,101 +1592,101 @@ - + - 661.781 - 568.812 + 128.859 + 346 - 0 - + 90 + - 770 - 559.812 + 233.151 + 256.812 - 180 - + 270 + - OneToMany + OneToOne Mandatory Mandatory - 2 + 1 0 - + - 315.086 - 442.625 + 134.195 + 501 - 270 - + 90 + - 338.891 - 473 + 293.974 + 424.812 - 90 - + 270 + - OneToMany + OneToOne Mandatory Mandatory - 1 + 2 0 - + - 383.172 - 366.812 + 280.302 + 256.812 - 0 - + 270 + - 415 - 348.812 + 293.974 + 291 - 180 - + 90 + - OneToMany + OneToOne Mandatory Mandatory - 2 + 3 0 @@ -1657,15 +1696,15 @@ - 360 - 179.812 + 410.573 + 273.812 - 180 + 270 - 337.781 + 340.948 291 90 @@ -1674,7 +1713,7 @@ - OneToMany + OneToOne Mandatory Mandatory @@ -1685,128 +1724,128 @@ - + - 275.271 - 272.625 + 387.922 + 357.906 - 270 - + 0 + - 292.391 - 291 + 415 + 345.906 - 90 - + 180 + - OneToMany + OneToOne Mandatory Mandatory - 3 + 2 0 - + - 126.484 - 501 + 340.948 + 424.812 - 90 - + 270 + - 247 - 392.083 + 341.266 + 473 - 180 - + 90 + - OneToMany + OneToOne Mandatory Mandatory - 2 + 1 0 - + - 126.484 - 346 + 688.453 + 564.906 - 90 - + 0 + - 230.635 - 272.625 + 770 + 553.906 - 270 - + 180 + - OneToMany + OneToOne Mandatory Mandatory - 1 + 2 0 - + - 199.969 - 405.812 + 511.719 + 201.208 0 - + - 247 - 341.542 + 613.703 + 273 - 180 - + 90 + - OneToMany + OneToOne Mandatory Mandatory @@ -1817,29 +1856,29 @@ - + - 53 - 405.812 + 456.531 + 539.906 - 180 - + 0 + - 28.6875 - 413.812 + 539 + 564.906 - 0 - + 180 + - OneToMany + OneToOne Mandatory Mandatory @@ -1850,29 +1889,29 @@ - + - 799.115 - 399 + 554 + 148.906 - 90 - + 180 + - 801.13 - 312.625 + 511.719 + 128.604 - 270 - + 0 + - OneToMany + OneToOne Mandatory Mandatory @@ -1883,128 +1922,128 @@ - + - 844.229 - 399 + 423.836 + 17.8125 - 90 - + 270 + - 839.26 - 312.625 + 435.859 + 56 - 270 - + 90 + - OneToMany + OneToOne Mandatory Mandatory - 2 + 1 0 - + - 910.484 - -41.4583 + 632.109 + 117 - 0 - + 90 + - 945 - -35.4583 + 613.016 + 91.8125 - 180 - + 270 + - OneToMany + OneToOne Mandatory Mandatory - 1 + 2 0 - + - 910.484 - -22.9167 + 499.672 + -8.125 0 - + - 945 - -0.916667 + 563 + 66.9062 180 - + - OneToMany + OneToOne Mandatory Mandatory - 0 + 2 0 - + - 207.469 - -15.1875 + 698.406 + 318.906 0 - + - 258 - -16.1875 + 763 + 272.906 180 - + - OneToMany + OneToOne Mandatory Mandatory @@ -2015,95 +2054,95 @@ - + - 25.875 - -4.1875 + 499.672 + -34.0625 0 - + - 106 - -15.1875 + 540 + -25.0938 180 - + - OneToMany + OneToOne Mandatory Mandatory - 5 + 3 0 - + - 121.914 - 49 + 461.146 + 273.812 - 90 - + 270 + - 156.734 - 20.625 + 462.273 + 321 - 270 - + 90 + - OneToMany + OneToOne Mandatory Mandatory - 1 + 11 0 - + - 68 - 84.8125 + 559.755 + 395 - 180 - + 90 + - 0.75 - 98.8125 + 585.469 + 364.812 - 0 - + 270 + - OneToMany + OneToOne Mandatory Mandatory @@ -2114,101 +2153,101 @@ - + - -14.5625 - 63.625 + 638.51 + 395 - 270 - + 90 + - -33.625 - 71 + 641.938 + 364.812 - 90 - + 270 + - OneToMany + OneToOne Mandatory Mandatory - 3 + 1 0 - + - 252.953 - 137 + 599.133 + 472.812 - 90 - + 270 + - 287.734 - 111.625 + 613.727 + 533 - 270 - + 90 + - OneToMany + OneToOne Mandatory Mandatory - 2 + 3 0 - + - 287.734 - 40 + 153.531 + 180.906 - 90 - + 0 + - 290.914 - 11.625 + 186 + 196.906 - 270 - + 180 + - OneToMany + OneToOne Mandatory Mandatory - 1 + 2 0 -- cgit v1.2.3-54-g00ecf From a3cfcc18ebd248e9f2f16cd0d5166da5de222d3d Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Thu, 3 May 2018 13:57:00 +0200 Subject: misc/database-layout.dump: new column in database: `repositories`.`architecture` --- misc/database-layout.dump | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/misc/database-layout.dump b/misc/database-layout.dump index 8ff5049..620326c 100644 --- a/misc/database-layout.dump +++ b/misc/database-layout.dump @@ -492,10 +492,13 @@ repositories CREATE TABLE `repositories` ( `name` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL, `stability` mediumint(9) NOT NULL, `is_on_master_mirror` bit(1) NOT NULL, + `architecture` smallint(6) NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `name` (`name`), KEY `stability` (`stability`), - CONSTRAINT `repositories_ibfk_1` FOREIGN KEY (`stability`) REFERENCES `repository_stabilities` (`id`) ON DELETE CASCADE ON UPDATE CASCADE + KEY `architecture` (`architecture`), + CONSTRAINT `repositories_ibfk_1` FOREIGN KEY (`stability`) REFERENCES `repository_stabilities` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `repositories_ibfk_2` FOREIGN KEY (`architecture`) REFERENCES `architectures` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci repository_moves CREATE TABLE `repository_moves` ( `id` mediumint(9) NOT NULL AUTO_INCREMENT, -- cgit v1.2.3-54-g00ecf From 62e0e1d35072dcd91ad19a863b27f069c6ed0f38 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Thu, 3 May 2018 14:13:40 +0200 Subject: lib/mysql-functions: new columns => new joins --- lib/mysql-functions | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/mysql-functions b/lib/mysql-functions index 5ce7e0c..df9cf77 100755 --- a/lib/mysql-functions +++ b/lib/mysql-functions @@ -1186,6 +1186,7 @@ for link in \ 'package_sources:upstream_package_repository:upstream_repositories' \ \ 'repositories:stability:repository_stabilities' \ + 'repositories:architecture:architectures' \ \ 'repository_moves:upstream_package_repository:upstream_repositories' \ 'repository_moves:upstream_package_repository upstream_package_repository:package_sources' \ -- cgit v1.2.3-54-g00ecf From e7165b896d38518068b91d7aaac52cb16bbbe59c Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Thu, 3 May 2018 14:15:04 +0200 Subject: bin/sanity-check: check all archs --- bin/sanity-check | 216 ++++++++++++++++++++++++++++--------------------------- 1 file changed, 112 insertions(+), 104 deletions(-) diff --git a/bin/sanity-check b/bin/sanity-check index 06da288..96f028f 100755 --- a/bin/sanity-check +++ b/bin/sanity-check @@ -41,6 +41,7 @@ eval set -- "$( silence=0 repos="${standalone_package_repositories} ${stable_package_repositories} ${testing_package_repositories} ${staging_package_repositories}" +archs='i686' web=false while true @@ -218,11 +219,13 @@ while [ $# -gt 0 ]; do errors=$( { # shellcheck disable=SC2086 - printf 'expected %s\n' ${repos} - ls_master_mirror 'i686' | \ - sed 's|^|found |' + for arch in ${archs}; do + printf 'expected '"${arch}"' %s\n' ${repos} + ls_master_mirror "${arch}" | \ + sed 's|^|found '"${arch}"' |' + done } | \ - sort -k2 | \ + sort -k2,3 | \ uniq -uf1 ) if [ -n "${errors}" ]; then @@ -242,109 +245,111 @@ while [ $# -gt 0 ]; do package-database) - for repo in ${repos}; do - - [ ${silence} -gt 0 ] || \ - printf 'checking consistency of repository "%s" on the master mirror ...' "${repo}" >> \ - "${tmp_dir}/messages" + for arch in ${archs}; do + for repo in ${repos}; do - packages=$( - ls_master_mirror "i686/${repo}" | \ - grep '\.pkg\.tar\.xz\(\.sig\)\?$' - ) || true - - errors=$( - echo "${packages}" | \ - grep '\S' | \ - sed ' - s|^\(.*\.pkg\.tar\.xz\)$|package \1| - s|^\(.*\.pkg\.tar\.xz\)\.sig$|signature \1| - ' | \ - sort -k2 | \ - uniq -cf1 | \ - grep -v '^\s*2\s' | \ - awk '{print $2 " " $3}' - ) || true - if [ -n "${errors}" ]; then - if [ ${silence} -le 1 ]; then - printf '\nThe following packages in %s are missing a signature or vice versa:\n%s\n' \ - "${repo}" \ - "${errors}" >> \ - "${tmp_dir}/messages" - fi - i_am_insane - fi + [ ${silence} -gt 0 ] || \ + printf 'checking consistency of repository "%s/%s" on the master mirror ...' "${arch}" "${repo}" >> \ + "${tmp_dir}/messages" - ${master_mirror_rsync_command} \ - "${master_mirror_rsync_directory}/i686/${repo}/${repo}.db.tar.gz" \ - "${master_mirror_rsync_directory}/i686/${repo}/${repo}.files.tar.gz" \ - "${tmp_dir}/" + packages=$( + ls_master_mirror "${arch}/${repo}" | \ + grep '\.pkg\.tar\.xz\(\.sig\)\?$' + ) || true - errors=$( - { - tar -Oxzf "${tmp_dir}/${repo}.db.tar.gz" --wildcards '*/desc' 2>/dev/null | \ - sed -n ' - /^%FILENAME%$/ { - N - s/^.*\n/in_database / - p - } - ' + errors=$( echo "${packages}" | \ + grep '\S' | \ sed ' - /\.pkg\.tar\.xz$/ !d - s/^/in_repository / + s|^\(.*\.pkg\.tar\.xz\)$|package \1| + s|^\(.*\.pkg\.tar\.xz\)\.sig$|signature \1| ' | \ - sort -u - } | \ - sort -k2 | \ - uniq -uf1 - ) - if [ -n "${errors}" ]; then - if [ ${silence} -le 1 ]; then - printf '\nThe following packages in %s are missing from the database or vice versa:\n%s\n' \ - "${repo}" \ - "${errors}" >> \ - "${tmp_dir}/messages" + sort -k2 | \ + uniq -cf1 | \ + grep -v '^\s*2\s' | \ + awk '{print $2 " " $3}' + ) || true + if [ -n "${errors}" ]; then + if [ ${silence} -le 1 ]; then + printf '\nThe following packages in %s are missing a signature or vice versa:\n%s\n' \ + "${repo}" \ + "${errors}" >> \ + "${tmp_dir}/messages" + fi + i_am_insane fi - i_am_insane - fi - errors=$( - { - tar -tzf "${tmp_dir}/${repo}.files.tar.gz" | \ - grep '/$' | \ - sed ' - s|/$|| - s|^|in_database | - ' - echo "${packages}" | \ - grep '\S' | \ - sed ' - s|-[^-]\+$|| - s|^|in_repository | - ' | \ - sort -u - } | \ - sort -k2 | \ - uniq -uf1 - ) - if [ -n "${errors}" ]; then - if [ ${silence} -le 1 ]; then - printf '\nThe following packages in %s are missing from the file-database or vice versa:\n%s\n' \ - "${repo}" \ - "${errors}" >> \ - "${tmp_dir}/messages" + ${master_mirror_rsync_command} \ + "${master_mirror_rsync_directory}/${arch}/${repo}/${repo}.db.tar.gz" \ + "${master_mirror_rsync_directory}/${arch}/${repo}/${repo}.files.tar.gz" \ + "${tmp_dir}/" + + errors=$( + { + tar -Oxzf "${tmp_dir}/${repo}.db.tar.gz" --wildcards '*/desc' 2>/dev/null | \ + sed -n ' + /^%FILENAME%$/ { + N + s/^.*\n/in_database / + p + } + ' + echo "${packages}" | \ + sed ' + /\.pkg\.tar\.xz$/ !d + s/^/in_repository / + ' | \ + sort -u + } | \ + sort -k2 | \ + uniq -uf1 + ) + if [ -n "${errors}" ]; then + if [ ${silence} -le 1 ]; then + printf '\nThe following packages in %s are missing from the database or vice versa:\n%s\n' \ + "${repo}" \ + "${errors}" >> \ + "${tmp_dir}/messages" + fi + i_am_insane + fi + + errors=$( + { + tar -tzf "${tmp_dir}/${repo}.files.tar.gz" | \ + grep '/$' | \ + sed ' + s|/$|| + s|^|in_database | + ' + echo "${packages}" | \ + grep '\S' | \ + sed ' + s|-[^-]\+$|| + s|^|in_repository | + ' | \ + sort -u + } | \ + sort -k2 | \ + uniq -uf1 + ) + if [ -n "${errors}" ]; then + if [ ${silence} -le 1 ]; then + printf '\nThe following packages in %s are missing from the file-database or vice versa:\n%s\n' \ + "${repo}" \ + "${errors}" >> \ + "${tmp_dir}/messages" + fi + i_am_insane fi - i_am_insane - fi - find "${tmp_dir:?}" -mindepth 1 \( -not -name 'messages' \) -delete + find "${tmp_dir:?}" -mindepth 1 \( -not -name 'messages' \) -delete - [ ${silence} -gt 0 ] || \ - echo ' passed.' >> \ - "${tmp_dir}/messages" + [ ${silence} -gt 0 ] || \ + echo ' passed.' >> \ + "${tmp_dir}/messages" + done done ;; @@ -359,23 +364,26 @@ while [ $# -gt 0 ]; do { # shellcheck disable=SC2016 { - printf 'SELECT "mysql",CONCAT(`repositories`.`name`,"/",' + printf 'SELECT "mysql",CONCAT(`r_a`.`name`,"/",`repositories`.`name`,"/",' mysql_package_name_query printf ') FROM `binary_packages`' mysql_join_binary_packages_repositories printf ' AND `repositories`.`is_on_master_mirror`' mysql_join_binary_packages_architectures + mysql_join_repositories_architectures '' 'r_a' } | \ mysql_run_query | \ tr '\t' ' ' - ls_master_mirror 'i686' | \ - while read -r repo; do - ls_master_mirror "i686/${repo}" | \ - sed ' - /\.pkg\.tar\.xz$/!d - s,^,package-file '"${repo}"'/, - ' - done + for arch in ${archs}; do + ls_master_mirror "${arch}" | \ + while read -r repo; do + ls_master_mirror "${arch}/${repo}" | \ + sed ' + /\.pkg\.tar\.xz$/!d + s,^,package-file '"${arch}"'/'"${repo}"'/, + ' + done + done } | \ sed 's/\(-[0-9]\+\)\.0\(-[^- ]\+$\)/\1\2/' | \ sort -k2 | \ -- cgit v1.2.3-54-g00ecf From 05f9e7441da092c9353c8bd4a050aab9868b2e22 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Thu, 3 May 2018 14:34:19 +0200 Subject: lib/mysql-functions: check more architectures in mysql_sanity_check() --- lib/mysql-functions | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/lib/mysql-functions b/lib/mysql-functions index df9cf77..b925b2e 100755 --- a/lib/mysql-functions +++ b/lib/mysql-functions @@ -746,29 +746,34 @@ mysql_sanity_check() { temp_dir=$(mktemp -d 'tmp.mysql-functions.mysql_sanity_check.XXXXXXXXXX' --tmpdir) trap 'rm -rf --one-file-system "${temp_dir}"' EXIT - for dir in $(ls_master_mirror 'i686'); do - ls_master_mirror "i686/${dir}" | \ - sed -n ' - s/\.pkg\.tar\.xz$// - T - s/-\([0-9]\+\)-\([^-]\+\)$/-\1.0-\2/ - s/-\([^-:]\+-[^-]\+-[^-]\+\)$/-0:\1/ - s|^|'"${dir}"'/| - p - ' + # shellcheck disable=SC2041 + for arch in 'i686'; do + for dir in $(ls_master_mirror "${arch}"); do + ls_master_mirror "${arch}/${dir}" | \ + sed -n ' + s/\.pkg\.tar\.xz$// + T + s/-\([0-9]\+\)-\([^-]\+\)$/-\1.0-\2/ + s/-\([^-:]\+-[^-]\+-[^-]\+\)$/-0:\1/ + s|^|'"${arch}"'/'"${dir}"'/| + p + ' + done done | \ sort > \ "${temp_dir}/master-mirror-listing" { - printf 'SELECT `repositories`.`name`,`pkgname`,`epoch`,`pkgver`,`pkgrel`,`sub_pkgrel`,`architectures`.`name`' + printf 'SELECT `r_a`.`name`,`repositories`.`name`,`pkgname`,`epoch`,`pkgver`,`pkgrel`,`sub_pkgrel`,`architectures`.`name`' printf ' FROM `binary_packages`' mysql_join_binary_packages_architectures mysql_join_binary_packages_repositories + mysql_join_repositories_architectures '' 'r_a' printf ' WHERE `repositories`.`is_on_master_mirror`' } | \ mysql_run_query | \ sed ' + s,\t,/, s,\t,/, s,\t,-, s,\t,:, -- cgit v1.2.3-54-g00ecf From 0dc5104fae587127b9219ca9e79f434d64c5bb90 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Thu, 3 May 2018 14:36:14 +0200 Subject: add several todos --- bin/copy-to-build-support | 2 ++ bin/db-update | 2 ++ bin/delete-packages | 2 ++ lib/common-functions | 2 ++ lib/mysql-functions | 1 + 5 files changed, 9 insertions(+) diff --git a/bin/copy-to-build-support b/bin/copy-to-build-support index 5382235..1164c1d 100755 --- a/bin/copy-to-build-support +++ b/bin/copy-to-build-support @@ -2,6 +2,8 @@ # copy the given package(s) into build-support +# TODO: enable separate repositories for each architecture + # shellcheck source=../conf/default.conf . "${0%/*}/../conf/default.conf" diff --git a/bin/db-update b/bin/db-update index 98bc884..28e9861 100755 --- a/bin/db-update +++ b/bin/db-update @@ -12,6 +12,8 @@ # TODO: we should delete more packages than just the ones in repositories # where we move to (think of [extra] -> [community]) +# TODO: enable separate repositories for each architecture + # shellcheck disable=SC2039 # shellcheck source=../conf/default.conf . "${0%/*}/../conf/default.conf" diff --git a/bin/delete-packages b/bin/delete-packages index 1d4b230..5f60b40 100755 --- a/bin/delete-packages +++ b/bin/delete-packages @@ -15,6 +15,8 @@ # TODO: delete other to-be-deleted packages if asked to do so +# TODO: enable separate repositories for each architecture + # shellcheck disable=SC2016 usage() { >&2 echo '' diff --git a/lib/common-functions b/lib/common-functions index d959094..038af38 100755 --- a/lib/common-functions +++ b/lib/common-functions @@ -550,6 +550,8 @@ recursively_umount_and_rm() { # mangle $arch in PKBUILDs to contain i486, i586, i686 # append $sub_pkgrel to the pkgrel +# TODO: actually include the other architectures + mangle_pkgbuild() { local PKGBUILD="$1" local sub_pkgrel="$2" diff --git a/lib/mysql-functions b/lib/mysql-functions index b925b2e..83b9296 100755 --- a/lib/mysql-functions +++ b/lib/mysql-functions @@ -292,6 +292,7 @@ mysql_generate_package_metadata() { exit 2 fi # remove empty lines and unsupported architectures + # TODO: support more architectures sed -i ' /^[^=]*=\s*$/d /^\s*arch = /{ -- cgit v1.2.3-54-g00ecf From 5450a8b73b77b4ceae59a283b38b0601f3f7a7ab Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Thu, 3 May 2018 15:31:54 +0200 Subject: `binary_packages_in_repositories` new, but not yet used --- misc/database-layout.dmf | 1469 +++++++++++++++++++++++---------------------- misc/database-layout.dump | 10 + 2 files changed, 776 insertions(+), 703 deletions(-) diff --git a/misc/database-layout.dmf b/misc/database-layout.dmf index b9d8612..1e3a23a 100644 --- a/misc/database-layout.dmf +++ b/misc/database-layout.dmf @@ -2,13 +2,13 @@ Relational - + - 237 - 40 + 543 + 182 - ssh_keys + binary_packages_in_repositories#ffffff @@ -18,51 +18,69 @@ True - owner - MEDIUMINT + package + BIGINT True False - fingerprint - TEXT + repository + MEDIUMINT True False
- + - -68 - 71 + 42 + 135 - email_actions + ssh_log#ffffff id - MEDIUMINT + BIGINT True True - name + date + DATETIME + True + False + + + build_slave + MEDIUMINT + False + False + + + action VARCHAR(32) True False + + parameters + TEXT + True + False +
- + - 68 - 49 + -55 + -72 - allowed_email_actions + email_log#ffffff @@ -72,62 +90,92 @@ True - gpg_key - BIGINT + date + DATETIME + True + False + + + success + BIT True False action MEDIUMINT - True + False + False + + + count + MEDIUMINT + False + False + + + gpg_key + BIGINT + False + False + + + comment + TEXT + False False
- + - 106 - -51 + 481 + 395 - gpg_keys + repository_moves#ffffff id - BIGINT + MEDIUMINT True True - fingerprint - VARCHAR(40) + from_repository + MEDIUMINT True False - owner + to_repository MEDIUMINT True False + + upstream_package_repository + SMALLINT + True + False +
- + - 258 - -44 + 763 + 241 - persons + repository_stabilities#ffffff id - MEDIUMINT + SMALLINT True True @@ -137,26 +185,38 @@ True False + + bugtracker_category + VARCHAR(32) + False + False +
- + - 788 - -60 + 53 + 501 - todo_links + build_dependency_loops#ffffff - dependent + id BIGINT True + True + + + loop + MEDIUMINT + True False - depending_on + build_assignment BIGINT True False @@ -164,55 +224,49 @@
- + - 945 - -70 + 540 + -64 - todos + dependency_types#ffffff id - BIGINT + SMALLINT True True - file - VARCHAR(64) + name + VARCHAR(32) True False - line - MEDIUMINT + relevant_for_building + BIT True False - description - TEXT + relevant_for_binary_packages + BIT True False - - importance - SMALLINT - False - False -
- + - 737 - 38 + 348 + -60 - statitstics + dependencies#ffffff @@ -222,111 +276,141 @@ True - date - DATETIME + dependent + BIGINT True False - stable_packages_count - MEDIUMINT + depending_on + BIGINT True False - pending_tasks_count - MEDIUMINT + dependency_type + SMALLINT True False + +
+
+ + + 557 + 30 + + + install_targets + #ffffff + - staging_packages_count - MEDIUMINT + id + BIGINT True - False + True - testing_packages_count - MEDIUMINT + name + VARCHAR(64) True False + +
+
+ + + 415 + 321 + + + architectures + #ffffff + - broken_tasks_count - MEDIUMINT + id + SMALLINT True - False + True - dependency_loops_count - MEDIUMINT + name + VARCHAR(16) True False + +
+
+ + + 226 + 473 + + + package_sources + #ffffff + + + id + BIGINT + True + True + - dependency_looped_tasks_count - MEDIUMINT + pkgbase + VARCHAR(64) True False - locked_tasks_count - MEDIUMINT + git_revision + VARCHAR(40) True False - blocked_tasks_count - MEDIUMINT + mod_git_revision + VARCHAR(40) True False - next_tasks_count - MEDIUMINT + upsream_package_repository + SMALLINT True False - -
-
- - - 754 - 399 - - - repository_stability_relations - #ffffff - - id - MEDIUMINT + uses_upstream + BIT True - True + False - more_stable - MEDIUMINT + uses_modification + BIT True False - less_stable - MEDIUMINT + commit_time + DATETIME True False
- + - -62 - 370 + 539 + 533 - fail_reasons + upstream_repositories#ffffff @@ -337,18 +421,12 @@ name - VARCHAR(32) - True - False - - - identifier VARCHAR(64) True False - severity + git_repository SMALLINT True False @@ -356,163 +434,115 @@
- + - 53 - 346 + 770 + 508 - failed_builds + git_repositories#ffffff id - MEDIUMINT + SMALLINT True True - build_slave - MEDIUMINT - True - False - - - build_assignment - BIGINT + name + VARCHAR(64) True False - date - DATETIME + url + VARCHAR(128) True False - reason - SMALLINT + directory + VARCHAR(128) True False - log_file - VARCHAR(512) + head + VARCHAR(40) True False
- + - 247 - 291 + 529 + 273 - build_assignments + repositories#ffffff id - BIGINT + MEDIUMINT True True - package_source - BIGINT + name + VARCHAR(64) True False - architecture + stability SMALLINT True False - is_blocked - VARCHAR(128) - False - False - - - is_black_listed - VARCHAR(128) - False - False - - - is_broken + is_on_master_mirror BIT True False - priority + architecture SMALLINT True False - - return_date - DATETIME - False - False -
- + - 186 - 137 + 549 + 105 - build_slaves + install_target_providers#ffffff id - MEDIUMINT - True - True - - - name - VARCHAR(32) - True - False - - - ssh_key BIGINT True - False - - - currently_building - BIGINT - False - False - - - last_connection - TIME - True - False + True - logged_lines + package BIGINT - False + True False - last_action - VARCHAR(32) - False + install_target + BIGINT + True False @@ -614,127 +644,175 @@
- + - 554 - 117 + 186 + 137 - install_target_providers + build_slaves#ffffff id - BIGINT + MEDIUMINT True True - package + name + VARCHAR(32) + True + False + + + ssh_key BIGINT True False - install_target + currently_building BIGINT + False + False + + + last_connection + TIME True False + + logged_lines + BIGINT + False + False + + + last_action + VARCHAR(32) + False + False +
- + - 529 - 273 + 247 + 291 - repositories + build_assignments#ffffff id - MEDIUMINT + BIGINT True True - name - VARCHAR(64) + package_source + BIGINT True False - stability + architecture SMALLINT True False - is_on_master_mirror + is_blocked + VARCHAR(128) + False + False + + + is_black_listed + VARCHAR(128) + False + False + + + is_broken BIT True False - architecture + priority SMALLINT True False + + return_date + DATETIME + False + False +
- + - 770 - 508 + 53 + 346 - git_repositories + failed_builds#ffffff id - SMALLINT + MEDIUMINT True True - name - VARCHAR(64) + build_slave + MEDIUMINT True False - url - VARCHAR(128) + build_assignment + BIGINT True False - directory - VARCHAR(128) + date + DATETIME True False - head - VARCHAR(40) + reason + SMALLINT + True + False + + + log_file + VARCHAR(512) True False
- + - 539 - 533 + -62 + 370 - upstream_repositories + fail_reasons#ffffff @@ -745,12 +823,18 @@ name + VARCHAR(32) + True + False + + + identifier VARCHAR(64) True False - git_repository + severity SMALLINT True False @@ -758,209 +842,179 @@
- + - 226 - 473 + 754 + 399 - package_sources + repository_stability_relations#ffffff id - BIGINT + MEDIUMINT True True - pkgbase - VARCHAR(64) + more_stable + MEDIUMINT True False - git_revision - VARCHAR(40) + less_stable + MEDIUMINT True False + +
+
+ + + 777 + 32 + + + statitstics + #ffffff + - mod_git_revision - VARCHAR(40) + id + BIGINT True - False + True - upsream_package_repository - SMALLINT + date + DATETIME True False - uses_upstream - BIT + stable_packages_count + MEDIUMINT True False - uses_modification - BIT + pending_tasks_count + MEDIUMINT True False - commit_time - DATETIME + staging_packages_count + MEDIUMINT True False - -
-
- - - 415 - 321 - - - architectures - #ffffff - - - id - SMALLINT - True - True - - name - VARCHAR(16) + testing_packages_count + MEDIUMINT True False - -
-
- - - 563 - 42 - - - install_targets - #ffffff - - id - BIGINT + broken_tasks_count + MEDIUMINT True - True + False - name - VARCHAR(64) + dependency_loops_count + MEDIUMINT True False - -
-
- - - 348 - -60 - - - dependencies - #ffffff - - id - BIGINT + dependency_looped_tasks_count + MEDIUMINT True - True + False - dependent - BIGINT + locked_tasks_count + MEDIUMINT True False - depending_on - BIGINT + blocked_tasks_count + MEDIUMINT True False - dependency_type - SMALLINT + next_tasks_count + MEDIUMINT True False
- + - 540 - -64 + 945 + -70 - dependency_types + todos#ffffff id - SMALLINT + BIGINT True True - name - VARCHAR(32) + file + VARCHAR(64) True False - relevant_for_building - BIT + line + MEDIUMINT True False - relevant_for_binary_packages - BIT + description + TEXT True False + + importance + SMALLINT + False + False +
- + - 53 - 501 + 788 + -60 - build_dependency_loops + todo_links#ffffff - id + dependent BIGINT True - True - - - loop - MEDIUMINT - True False - build_assignment + depending_on BIGINT True False @@ -968,18 +1022,18 @@
- + - 763 - 241 + 258 + -44 - repository_stabilities + persons#ffffff id - SMALLINT + MEDIUMINT True True @@ -989,58 +1043,46 @@ True False - - bugtracker_category - VARCHAR(32) - False - False -
- + - 481 - 395 + 106 + -51 - repository_moves + gpg_keys#ffffff id - MEDIUMINT + BIGINT True True - from_repository - MEDIUMINT + fingerprint + VARCHAR(40) True False - to_repository + owner MEDIUMINT True False - - upstream_package_repository - SMALLINT - True - False -
- + - -55 - -72 + 68 + 49 - email_log + allowed_email_actions#ffffff @@ -1050,51 +1092,51 @@ True - date - DATETIME - True - False - - - success - BIT + gpg_key + BIGINT True False action MEDIUMINT - False + True False + +
+
+ + + -68 + 71 + + + email_actions + #ffffff + - count + id MEDIUMINT - False - False - - - gpg_key - BIGINT - False - False + True + True - comment - TEXT - False + name + VARCHAR(32) + True False
- + - 42 - 135 + 237 + 40 - ssh_log + ssh_keys#ffffff @@ -1104,25 +1146,13 @@ True - date - DATETIME - True - False - - - build_slave + owner MEDIUMINT - False - False - - - action - VARCHAR(32) True False - parameters + fingerprint TEXT True False @@ -1130,57 +1160,57 @@
- + - 529 - 318.906 + 647.922 + 245.812 - 180 - + 270 + - 509.547 - 345.906 + 613.703 + 273 - 0 - + 90 + - OneToOne + OneToMany - Mandatory - Mandatory + Optional + Optional - 4 + 2 0 - + - 290.109 - 40 + 543 + 213.906 - 90 - + 180 + - 293.289 - 5.8125 + 511.719 + 201.208 - 270 - + 0 + @@ -1196,24 +1226,24 @@ - + - 256.727 - 137 + 153.531 + 180.906 - 90 - + 0 + - 290.109 - 103.812 + 186 + 196.906 - 270 - + 180 + @@ -1229,24 +1259,24 @@ - + - -9.85156 - 47.8125 + 599.133 + 472.812 270 - + - -19.2734 - 71 + 613.727 + 533 90 - + @@ -1262,24 +1292,57 @@ - + + + + + + 559.755 + 395 + + 90 + + + + + 585.469 + 364.812 + + 270 + + + + + + OneToOne + + Mandatory + Mandatory + + + 1 + 0 + + + + - 68 - 80.9062 + 638.51 + 395 - 180 - + 90 + - 29.4531 - 95.9062 + 641.938 + 364.812 - 0 - + 270 + @@ -1295,24 +1358,24 @@ - + - 142.789 - 49 + 461.146 + 273.812 - 90 - + 270 + - 159.109 - 12.8125 + 462.273 + 321 - 270 - + 90 + @@ -1323,29 +1386,29 @@ Mandatory - 1 + 11 0 - + - 35.2969 - -12.0938 + 499.672 + -34.0625 0 - + - 106 - -19.0938 + 540 + -25.0938 180 - + @@ -1356,29 +1419,29 @@ Mandatory - 5 + 3 0 - + - 212.219 - -19.0938 + 698.406 + 318.906 0 - + - 258 - -19.0938 + 763 + 272.906 180 - + @@ -1394,24 +1457,24 @@ - + - 915.234 - -43.3958 + 499.672 + -8.125 0 - + - 945 - -39.3958 + 557 + 54.9062 180 - + @@ -1422,29 +1485,29 @@ Mandatory - 0 + 2 0 - + - 915.234 - -26.7917 + 627.109 + 105 - 0 - + 90 + - 945 - -8.79167 + 607.016 + 79.8125 - 180 - + 270 + @@ -1455,29 +1518,29 @@ Mandatory - 1 + 2 0 - + - 816.656 - 399 + 423.836 + 17.8125 - 90 - + 270 + - 815.635 - 304.812 + 435.859 + 56 - 270 - + 90 + @@ -1488,29 +1551,29 @@ Mandatory - 2 + 1 0 - + - 879.312 - 399 + 549 + 136.906 - 90 - + 180 + - 868.271 - 304.812 + 511.719 + 128.604 - 270 - + 0 + @@ -1526,24 +1589,24 @@ - + - 53 - 398.906 + 456.531 + 539.906 - 180 - + 0 + - 33.4375 - 408.906 + 539 + 564.906 - 0 - + 180 + @@ -1559,24 +1622,24 @@ - + - 204.719 - 398.906 + 688.453 + 564.906 0 - + - 247 - 357.906 + 770 + 553.906 180 - + @@ -1592,24 +1655,24 @@ - + - 128.859 - 346 + 340.948 + 424.812 - 90 - + 270 + - 233.151 - 256.812 + 341.266 + 473 - 270 - + 90 + @@ -1625,24 +1688,24 @@ - + - 134.195 - 501 + 387.922 + 357.906 - 90 - + 0 + - 293.974 - 424.812 + 415 + 345.906 - 270 - + 180 + @@ -1658,20 +1721,20 @@ - + - 280.302 - 256.812 + 410.573 + 273.812 270 - + - 293.974 + 340.948 291 90 @@ -1686,25 +1749,25 @@ Mandatory - 3 + 1 0 - + - 410.573 - 273.812 + 280.302 + 256.812 270 - + - 340.948 + 293.974 291 90 @@ -1719,29 +1782,29 @@ Mandatory - 1 + 3 0 - + - 387.922 - 357.906 + 134.195 + 501 - 0 - + 90 + - 415 - 345.906 + 293.974 + 424.812 - 180 - + 270 + @@ -1757,24 +1820,24 @@ - + - 340.948 - 424.812 + 128.859 + 346 - 270 - + 90 + - - 341.266 - 473 + + 233.151 + 256.812 - 90 - + 270 + @@ -1790,24 +1853,24 @@ - + - 688.453 - 564.906 + 204.719 + 398.906 0 - + - 770 - 553.906 + 247 + 357.906 180 - + @@ -1823,24 +1886,24 @@ - + - 511.719 - 201.208 + 53 + 398.906 - 0 - + 180 + - 613.703 - 273 + 33.4375 + 408.906 - 90 - + 0 + @@ -1851,29 +1914,29 @@ Mandatory - 2 + 4 0 - + - 456.531 - 539.906 + 816.656 + 399 - 0 - + 90 + - 539 - 564.906 + 815.635 + 304.812 - 180 - + 270 + @@ -1884,29 +1947,29 @@ Mandatory - 4 + 1 0 - + - 554 - 148.906 + 879.312 + 399 - 180 - + 90 + - 511.719 - 128.604 + 868.271 + 304.812 - 0 - + 270 + @@ -1917,29 +1980,29 @@ Mandatory - 1 + 2 0 - + - 423.836 - 17.8125 + 915.234 + -43.3958 - 270 - + 0 + - 435.859 - 56 + 945 + -39.3958 - 90 - + 180 + @@ -1955,24 +2018,24 @@ - + - 632.109 - 117 + 915.234 + -26.7917 - 90 - + 0 + - 613.016 - 91.8125 + 945 + -8.79167 - 270 - + 180 + @@ -1983,29 +2046,29 @@ Mandatory - 2 + 0 0 - + - 499.672 - -8.125 + 212.219 + -19.0938 0 - + - 563 - 66.9062 + 258 + -19.0938 180 - + @@ -2021,24 +2084,24 @@ - + - 698.406 - 318.906 + 35.2969 + -12.0938 0 - + - 763 - 272.906 + 106 + -19.0938 180 - + @@ -2049,29 +2112,29 @@ Mandatory - 2 + 5 0 - + - 499.672 - -34.0625 + 142.789 + 49 - 0 - + 90 + - 540 - -25.0938 + 159.109 + 12.8125 - 180 - + 270 + @@ -2082,29 +2145,29 @@ Mandatory - 3 + 1 0 - + - 461.146 - 273.812 + 68 + 80.9062 - 270 - + 180 + - 462.273 - 321 + 29.4531 + 95.9062 - 90 - + 0 + @@ -2115,29 +2178,29 @@ Mandatory - 11 + 2 0 - + - 559.755 - 395 + -9.85156 + 47.8125 - 90 - + 270 + - 585.469 - 364.812 + -19.2734 + 71 - 270 - + 90 + @@ -2148,29 +2211,29 @@ Mandatory - 2 + 3 0 - + - 638.51 - 395 + 256.727 + 137 90 - + - 641.938 - 364.812 + 290.109 + 103.812 270 - + @@ -2181,29 +2244,29 @@ Mandatory - 1 + 2 0 - + - 599.133 - 472.812 + 290.109 + 40 - 270 - + 90 + - 613.727 - 533 + 293.289 + 5.8125 - 90 - + 270 + @@ -2214,29 +2277,29 @@ Mandatory - 3 + 1 0 - + - 153.531 - 180.906 + 529 + 318.906 - 0 - + 180 + - 186 - 196.906 + 509.547 + 345.906 - 180 - + 0 + @@ -2247,7 +2310,7 @@ Mandatory - 2 + 4 0 diff --git a/misc/database-layout.dump b/misc/database-layout.dump index 620326c..dc0b537 100644 --- a/misc/database-layout.dump +++ b/misc/database-layout.dump @@ -329,6 +329,16 @@ binary_packages CREATE TABLE `binary_packages` ( CONSTRAINT `binary_packages_ibfk_2` FOREIGN KEY (`architecture`) REFERENCES `architectures` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `binary_packages_ibfk_3` FOREIGN KEY (`build_assignment`) REFERENCES `build_assignments` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci +binary_packages_in_repositories CREATE TABLE `binary_packages_in_repositories` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `package` bigint(20) NOT NULL, + `repository` mediumint(9) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `content` (`package`,`repository`), + KEY `binary_packages_in_repositories_ibfk_2` (`repository`), + CONSTRAINT `binary_packages_in_repositories_ibfk_1` FOREIGN KEY (`package`) REFERENCES `binary_packages` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `binary_packages_in_repositories_ibfk_2` FOREIGN KEY (`repository`) REFERENCES `repositories` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci build_assignments CREATE TABLE `build_assignments` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `package_source` bigint(20) NOT NULL, -- cgit v1.2.3-54-g00ecf From 0bc88d347f7d5f3b4fc51e277c3e0489d34dfe04 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Thu, 3 May 2018 15:50:48 +0200 Subject: remove `binary_packages`.`repository` from the graph (but the column is still there for now --- misc/database-layout.dmf | 1450 +++++++++++++++++++++++----------------------- 1 file changed, 722 insertions(+), 728 deletions(-) diff --git a/misc/database-layout.dmf b/misc/database-layout.dmf index 1e3a23a..f53237b 100644 --- a/misc/database-layout.dmf +++ b/misc/database-layout.dmf @@ -2,13 +2,13 @@ Relational - + - 543 - 182 + 237 + 40 - binary_packages_in_repositories + ssh_keys#ffffff @@ -18,69 +18,51 @@ True - package - BIGINT + owner + MEDIUMINT True False - repository - MEDIUMINT + fingerprint + TEXT True False
- + - 42 - 135 + -68 + 71 - ssh_log + email_actions#ffffff id - BIGINT + MEDIUMINT True True - date - DATETIME - True - False - - - build_slave - MEDIUMINT - False - False - - - action + name VARCHAR(32) True False - - parameters - TEXT - True - False -
- + - -55 - -72 + 68 + 49 - email_log + allowed_email_actions#ffffff @@ -90,92 +72,62 @@ True - date - DATETIME - True - False - - - success - BIT + gpg_key + BIGINT True False action MEDIUMINT - False - False - - - count - MEDIUMINT - False - False - - - gpg_key - BIGINT - False - False - - - comment - TEXT - False + True False
- + - 481 - 395 + 106 + -51 - repository_moves + gpg_keys#ffffff id - MEDIUMINT + BIGINT True True - from_repository - MEDIUMINT + fingerprint + VARCHAR(40) True False - to_repository + owner MEDIUMINT True False - - upstream_package_repository - SMALLINT - True - False -
- + - 763 - 241 + 258 + -44 - repository_stabilities + persons#ffffff id - SMALLINT + MEDIUMINT True True @@ -185,38 +137,26 @@ True False - - bugtracker_category - VARCHAR(32) - False - False -
- + - 53 - 501 + 788 + -60 - build_dependency_loops + todo_links#ffffff - id + dependent BIGINT True - True - - - loop - MEDIUMINT - True False - build_assignment + depending_on BIGINT True False @@ -224,49 +164,55 @@
- + - 540 - -64 + 945 + -70 - dependency_types + todos#ffffff id - SMALLINT + BIGINT True True - name - VARCHAR(32) + file + VARCHAR(64) True False - relevant_for_building - BIT + line + MEDIUMINT True False - relevant_for_binary_packages - BIT + description + TEXT True False + + importance + SMALLINT + False + False +
- + - 348 - -60 + 777 + 32 - dependencies + statitstics#ffffff @@ -276,141 +222,111 @@ True - dependent - BIGINT + date + DATETIME True False - depending_on - BIGINT + stable_packages_count + MEDIUMINT True False - dependency_type - SMALLINT + pending_tasks_count + MEDIUMINT True False - -
-
- - - 557 - 30 - - - install_targets - #ffffff - - - id - BIGINT - True - True - - name - VARCHAR(64) + staging_packages_count + MEDIUMINT True False - -
-
- - - 415 - 321 - - - architectures - #ffffff - - id - SMALLINT + testing_packages_count + MEDIUMINT True - True + False - name - VARCHAR(16) + broken_tasks_count + MEDIUMINT True False - -
-
- - - 226 - 473 - - - package_sources - #ffffff - - id - BIGINT + dependency_loops_count + MEDIUMINT True - True + False - pkgbase - VARCHAR(64) + dependency_looped_tasks_count + MEDIUMINT True False - git_revision - VARCHAR(40) + locked_tasks_count + MEDIUMINT True False - mod_git_revision - VARCHAR(40) + blocked_tasks_count + MEDIUMINT True False - upsream_package_repository - SMALLINT + next_tasks_count + MEDIUMINT True False + +
+
+ + + 754 + 399 + + + repository_stability_relations + #ffffff + - uses_upstream - BIT + id + MEDIUMINT True - False + True - uses_modification - BIT + more_stable + MEDIUMINT True False - commit_time - DATETIME + less_stable + MEDIUMINT True False
- + - 539 - 533 + -62 + 370 - upstream_repositories + fail_reasons#ffffff @@ -421,12 +337,18 @@ name + VARCHAR(32) + True + False + + + identifier VARCHAR(64) True False - git_repository + severity SMALLINT True False @@ -434,117 +356,165 @@
- + - 770 - 508 + 53 + 346 - git_repositories + failed_builds#ffffff id - SMALLINT + MEDIUMINT True True - name - VARCHAR(64) + build_slave + MEDIUMINT True False - url - VARCHAR(128) + build_assignment + BIGINT True False - directory - VARCHAR(128) + date + DATETIME True False - head - VARCHAR(40) + reason + SMALLINT + True + False + + + log_file + VARCHAR(512) True False
- + - 529 - 273 + 247 + 291 - repositories + build_assignments#ffffff id - MEDIUMINT + BIGINT True True - name - VARCHAR(64) + package_source + BIGINT True False - stability + architecture SMALLINT True False - is_on_master_mirror + is_blocked + VARCHAR(128) + False + False + + + is_black_listed + VARCHAR(128) + False + False + + + is_broken BIT True False - architecture + priority SMALLINT True False + + return_date + DATETIME + False + False +
- + - 549 - 105 + 186 + 137 - install_target_providers + build_slaves#ffffff id - BIGINT + MEDIUMINT True True - package + name + VARCHAR(32) + True + False + + + ssh_key BIGINT True False - install_target + currently_building BIGINT + False + False + + + last_connection + TIME True False + + logged_lines + BIGINT + False + False + + + last_action + VARCHAR(32) + False + False +
@@ -569,12 +539,6 @@ True False - - repository - MEDIUMINT - True - False - epoch MEDIUMINT @@ -644,175 +608,127 @@
- + - 186 - 137 + 549 + 105 - build_slaves + install_target_providers#ffffff id - MEDIUMINT + BIGINT True True - name - VARCHAR(32) - True - False - - - ssh_key + package BIGINT True False - currently_building + install_target BIGINT - False - False - - - last_connection - TIME True False - - logged_lines - BIGINT - False - False - - - last_action - VARCHAR(32) - False - False -
- + - 247 - 291 + 529 + 273 - build_assignments + repositories#ffffff id - BIGINT + MEDIUMINT True True - package_source - BIGINT + name + VARCHAR(64) True False - architecture + stability SMALLINT True False - is_blocked - VARCHAR(128) - False - False - - - is_black_listed - VARCHAR(128) - False - False - - - is_broken + is_on_master_mirror BIT True False - priority + architecture SMALLINT True False - - return_date - DATETIME - False - False -
- + - 53 - 346 + 770 + 508 - failed_builds + git_repositories#ffffff id - MEDIUMINT + SMALLINT True True - build_slave - MEDIUMINT - True - False - - - build_assignment - BIGINT + name + VARCHAR(64) True False - date - DATETIME + url + VARCHAR(128) True False - reason - SMALLINT + directory + VARCHAR(128) True False - log_file - VARCHAR(512) + head + VARCHAR(40) True False
- + - -62 - 370 + 539 + 533 - fail_reasons + upstream_repositories#ffffff @@ -823,18 +739,12 @@ name - VARCHAR(32) - True - False - - - identifier VARCHAR(64) True False - severity + git_repository SMALLINT True False @@ -842,179 +752,209 @@
- + - 754 - 399 + 226 + 473 - repository_stability_relations + package_sources#ffffff id - MEDIUMINT + BIGINT True True - more_stable - MEDIUMINT + pkgbase + VARCHAR(64) True False - less_stable - MEDIUMINT + git_revision + VARCHAR(40) True False - -
-
- - - 777 - 32 - - - statitstics - #ffffff - - id - BIGINT + mod_git_revision + VARCHAR(40) True - True + False - date - DATETIME + upsream_package_repository + SMALLINT True False - stable_packages_count - MEDIUMINT + uses_upstream + BIT True False - pending_tasks_count - MEDIUMINT + uses_modification + BIT True False - staging_packages_count - MEDIUMINT + commit_time + DATETIME True False + +
+
+ + + 415 + 321 + + + architectures + #ffffff + + + id + SMALLINT + True + True + - testing_packages_count - MEDIUMINT + name + VARCHAR(16) True False + +
+
+ + + 557 + 30 + + + install_targets + #ffffff + - broken_tasks_count - MEDIUMINT + id + BIGINT True - False + True - dependency_loops_count - MEDIUMINT + name + VARCHAR(64) True False + +
+
+ + + 348 + -60 + + + dependencies + #ffffff + - dependency_looped_tasks_count - MEDIUMINT + id + BIGINT True - False + True - locked_tasks_count - MEDIUMINT + dependent + BIGINT True False - blocked_tasks_count - MEDIUMINT + depending_on + BIGINT True False - next_tasks_count - MEDIUMINT + dependency_type + SMALLINT True False
- + - 945 - -70 + 540 + -64 - todos + dependency_types#ffffff id - BIGINT + SMALLINT True True - file - VARCHAR(64) + name + VARCHAR(32) True False - line - MEDIUMINT + relevant_for_building + BIT True False - description - TEXT + relevant_for_binary_packages + BIT True False - - importance - SMALLINT - False - False -
- + - 788 - -60 + 53 + 501 - todo_links + build_dependency_loops#ffffff - dependent + id BIGINT True + True + + + loop + MEDIUMINT + True False - depending_on + build_assignment BIGINT True False @@ -1022,18 +962,18 @@
- + - 258 - -44 + 763 + 241 - persons + repository_stabilities#ffffff id - MEDIUMINT + SMALLINT True True @@ -1043,46 +983,58 @@ True False + + bugtracker_category + VARCHAR(32) + False + False +
- + - 106 - -51 + 481 + 395 - gpg_keys + repository_moves#ffffff id - BIGINT + MEDIUMINT True True - fingerprint - VARCHAR(40) + from_repository + MEDIUMINT True False - owner + to_repository MEDIUMINT True False + + upstream_package_repository + SMALLINT + True + False +
- + - 68 - 49 + -55 + -72 - allowed_email_actions + email_log#ffffff @@ -1092,51 +1044,93 @@ True - gpg_key - BIGINT + date + DATETIME + True + False + + + success + BIT True False action MEDIUMINT - True + False + False + + + count + MEDIUMINT + False + False + + + gpg_key + BIGINT + False + False + + + comment + TEXT + False False
- + - -68 - 71 + 42 + 135 - email_actions + ssh_log#ffffff id - MEDIUMINT + BIGINT True True - name + date + DATETIME + True + False + + + build_slave + MEDIUMINT + False + False + + + action VARCHAR(32) True False + + parameters + TEXT + True + False +
- + - 237 - 40 + 543 + 182 - ssh_keys + binary_packages_in_repositories#ffffff @@ -1146,71 +1140,71 @@ True - owner - MEDIUMINT + package + BIGINT True False - fingerprint - TEXT + repository + MEDIUMINT True False
- + - 647.922 - 245.812 + 529 + 318.906 - 270 - + 180 + - 613.703 - 273 + 509.547 + 345.906 - 90 - + 0 + - OneToMany + OneToOne - Optional - Optional + Mandatory + Mandatory - 2 + 4 0 - + - 543 - 213.906 + 290.109 + 40 - 180 - + 90 + - 511.719 - 201.208 + 293.289 + 5.8125 - 0 - + 270 + @@ -1226,24 +1220,24 @@ - + - 153.531 - 180.906 + 256.727 + 137 - 0 - + 90 + - 186 - 196.906 + 290.109 + 103.812 - 180 - + 270 + @@ -1259,24 +1253,24 @@ - + - 599.133 - 472.812 + -9.85156 + 47.8125 270 - + - 613.727 - 533 + -19.2734 + 71 90 - + @@ -1292,24 +1286,24 @@ - + - 559.755 - 395 + 68 + 80.9062 - 90 - + 180 + - 585.469 - 364.812 + 29.4531 + 95.9062 - 270 - + 0 + @@ -1320,29 +1314,29 @@ Mandatory - 1 + 2 0 - + - 638.51 - 395 + 142.789 + 49 90 - + - 641.938 - 364.812 + 159.109 + 12.8125 270 - + @@ -1353,29 +1347,29 @@ Mandatory - 2 + 1 0 - + - 461.146 - 273.812 + 35.2969 + -12.0938 - 270 - + 0 + - 462.273 - 321 + 106 + -19.0938 - 90 - + 180 + @@ -1386,29 +1380,29 @@ Mandatory - 11 + 5 0 - + - 499.672 - -34.0625 + 212.219 + -19.0938 0 - + - 540 - -25.0938 + 258 + -19.0938 180 - + @@ -1419,29 +1413,29 @@ Mandatory - 3 + 2 0 - + - 698.406 - 318.906 + 915.234 + -43.3958 0 - + - 763 - 272.906 + 945 + -39.3958 180 - + @@ -1452,29 +1446,29 @@ Mandatory - 2 + 0 0 - + - 499.672 - -8.125 + 915.234 + -26.7917 0 - + - 557 - 54.9062 + 945 + -8.79167 180 - + @@ -1485,29 +1479,29 @@ Mandatory - 2 + 1 0 - + - 627.109 - 105 + 816.656 + 399 90 - + - 607.016 - 79.8125 + 815.635 + 304.812 270 - + @@ -1523,24 +1517,24 @@ - + - 423.836 - 17.8125 + 879.312 + 399 - 270 - + 90 + - 435.859 - 56 + 868.271 + 304.812 - 90 - + 270 + @@ -1556,24 +1550,24 @@ - + - 549 - 136.906 + 53 + 398.906 180 - + - 511.719 - 128.604 + 33.4375 + 408.906 0 - + @@ -1584,29 +1578,29 @@ Mandatory - 1 + 4 0 - + - 456.531 - 539.906 + 204.719 + 398.906 0 - + - 539 - 564.906 + 247 + 357.906 180 - + @@ -1617,29 +1611,29 @@ Mandatory - 4 + 2 0 - + - 688.453 - 564.906 + 128.859 + 346 - 0 - + 90 + - 770 - 553.906 + 233.151 + 256.812 - 180 - + 270 + @@ -1650,29 +1644,29 @@ Mandatory - 2 + 1 0 - + - 340.948 - 424.812 + 134.195 + 501 - 270 - + 90 + - 341.266 - 473 + 293.974 + 424.812 - 90 - + 270 + @@ -1683,29 +1677,29 @@ Mandatory - 1 + 2 0 - + - 387.922 - 357.906 + 280.302 + 256.812 - 0 - + 270 + - 415 - 345.906 + 293.974 + 291 - 180 - + 90 + @@ -1716,7 +1710,7 @@ Mandatory - 2 + 3 0 @@ -1727,7 +1721,7 @@ 410.573 - 273.812 + 259.812 270 @@ -1754,24 +1748,24 @@ - + - 280.302 - 256.812 + 387.922 + 357.906 - 270 - + 0 + - 293.974 - 291 + 415 + 345.906 - 90 - + 180 + @@ -1782,29 +1776,29 @@ Mandatory - 3 + 2 0 - + - 134.195 - 501 + 340.948 + 424.812 - 90 - + 270 + - 293.974 - 424.812 + 341.266 + 473 - 270 - + 90 + @@ -1815,29 +1809,29 @@ Mandatory - 2 + 1 0 - + - 128.859 - 346 + 688.453 + 564.906 - 90 - + 0 + - 233.151 - 256.812 + 770 + 553.906 - 270 - + 180 + @@ -1848,29 +1842,29 @@ Mandatory - 1 + 2 0 - + - 204.719 - 398.906 + 456.531 + 539.906 0 - + - 247 - 357.906 + 539 + 564.906 180 - + @@ -1881,29 +1875,29 @@ Mandatory - 2 + 4 0 - + - 53 - 398.906 + 549 + 136.906 180 - + - 33.4375 - 408.906 + 511.719 + 123.938 0 - + @@ -1914,29 +1908,29 @@ Mandatory - 4 + 1 0 - + - 816.656 - 399 + 423.836 + 17.8125 - 90 - + 270 + - 815.635 - 304.812 + 435.859 + 56 - 270 - + 90 + @@ -1952,24 +1946,24 @@ - + - 879.312 - 399 + 627.109 + 105 90 - + - 868.271 - 304.812 + 607.016 + 79.8125 270 - + @@ -1985,24 +1979,24 @@ - + - 915.234 - -43.3958 + 499.672 + -8.125 0 - + - 945 - -39.3958 + 557 + 54.9062 180 - + @@ -2013,29 +2007,29 @@ Mandatory - 1 + 2 0 - + - 915.234 - -26.7917 + 698.406 + 318.906 0 - + - 945 - -8.79167 + 763 + 272.906 180 - + @@ -2046,29 +2040,29 @@ Mandatory - 0 + 2 0 - + - 212.219 - -19.0938 + 499.672 + -34.0625 0 - + - 258 - -19.0938 + 540 + -25.0938 180 - + @@ -2079,29 +2073,29 @@ Mandatory - 2 + 3 0 - + - 35.2969 - -12.0938 + 461.146 + 259.812 - 0 - + 270 + - 106 - -19.0938 + 462.273 + 321 - 180 - + 90 + @@ -2112,29 +2106,29 @@ Mandatory - 5 + 10 0 - + - 142.789 - 49 + 638.51 + 395 90 - + - 159.109 - 12.8125 + 641.938 + 364.812 270 - + @@ -2145,29 +2139,29 @@ Mandatory - 1 + 2 0 - + - 68 - 80.9062 + 559.755 + 395 - 180 - + 90 + - 29.4531 - 95.9062 + 585.469 + 364.812 - 0 - + 270 + @@ -2178,29 +2172,29 @@ Mandatory - 2 + 1 0 - + - -9.85156 - 47.8125 + 599.133 + 472.812 270 - + - -19.2734 - 71 + 613.727 + 533 90 - + @@ -2216,24 +2210,24 @@ - + - 256.727 - 137 + 153.531 + 180.906 - 90 - + 0 + - 290.109 - 103.812 + 186 + 196.906 - 270 - + 180 + @@ -2249,24 +2243,24 @@ - + - 290.109 - 40 + 543 + 213.906 - 90 - + 180 + - 293.289 - 5.8125 + 511.719 + 191.875 - 270 - + 0 + @@ -2282,35 +2276,35 @@ - + - 529 - 318.906 + 647.922 + 245.812 - 180 - + 270 + - 509.547 - 345.906 + 613.703 + 273 - 0 - + 90 + - OneToOne + OneToMany - Mandatory - Mandatory + Optional + Optional - 4 + 2 0 -- cgit v1.2.3-54-g00ecf