Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package openSUSE-release-tools for
openSUSE:Factory checked in at 2023-06-03 00:06:45
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/openSUSE-release-tools (Old)
and /work/SRC/openSUSE:Factory/.openSUSE-release-tools.new.15902 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "openSUSE-release-tools"
Sat Jun 3 00:06:45 2023 rev:464 rq:1090473 version:20230602.41b6a00
Changes:
--------
---
/work/SRC/openSUSE:Factory/openSUSE-release-tools/openSUSE-release-tools.changes
2023-05-19 11:56:28.971593081 +0200
+++
/work/SRC/openSUSE:Factory/.openSUSE-release-tools.new.15902/openSUSE-release-tools.changes
2023-06-03 00:07:00.165910661 +0200
@@ -1,0 +2,25 @@
+Fri Jun 02 10:12:56 UTC 2023 - [email protected]
+
+- Update to version 20230602.41b6a00:
+ * dist: fix rpm scriptlets call to systemd_postun
+
+-------------------------------------------------------------------
+Thu May 25 10:50:48 UTC 2023 - [email protected]
+
+- Update to version 20230525.002c3c0:
+ * Add Leap 15.5 to access metrics
+
+-------------------------------------------------------------------
+Tue May 23 07:23:59 UTC 2023 - [email protected]
+
+- Update to version 20230523.bb5a644:
+ * Drop redundant `unique_product_flavor`
+ * Do not drop the database on every run
+ * Fixes
+ * Refactor 'unique_product' object
+ * Fix merging and syntax errors
+ * Write points with flavor tag
+ * Parse flavor type to cached data
+ * Aggregate unique flavor access data
+
+-------------------------------------------------------------------
Old:
----
openSUSE-release-tools-20230512.422701c.obscpio
New:
----
openSUSE-release-tools-20230602.41b6a00.obscpio
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ openSUSE-release-tools.spec ++++++
--- /var/tmp/diff_new_pack.p2yXdd/_old 2023-06-03 00:07:00.953915314 +0200
+++ /var/tmp/diff_new_pack.p2yXdd/_new 2023-06-03 00:07:00.961915361 +0200
@@ -20,7 +20,7 @@
%define source_dir openSUSE-release-tools
%define announcer_filename factory-package-news
Name: openSUSE-release-tools
-Version: 20230512.422701c
+Version: 20230602.41b6a00
Release: 0
Summary: Tools to aid in staging and release work for openSUSE/SUSE
License: GPL-2.0-or-later AND MIT
@@ -314,40 +314,28 @@
useradd -r -m -s /sbin/nologin -c "user for
openSUSE-release-tools-announcer" osrt-announcer
exit 0
-%postun announcer
-%{systemd_postun}
-
%pre check-source
getent passwd osrt-check-source > /dev/null || \
useradd -r -m -s /sbin/nologin -c "user for
openSUSE-release-tools-check-source" osrt-check-source
exit 0
-%postun check-source
-%{systemd_postun}
-
%pre docker-publisher
getent passwd osrt-docker-publisher > /dev/null || \
useradd -r -m -s /sbin/nologin -c "user for
openSUSE-release-tools-docker-publisher" osrt-docker-publisher
exit 0
-%postun docker-publisher
-%{systemd_postun}
-
%pre maintenance
getent passwd osrt-maintenance > /dev/null || \
useradd -r -m -s /sbin/nologin -c "user for
openSUSE-release-tools-maintenance" osrt-maintenance
exit 0
-%postun maintenance
-%{systemd_postun}
-
%pre metrics
getent passwd osrt-metrics > /dev/null || \
useradd -r -m -s /sbin/nologin -c "user for openSUSE-release-tools-metrics"
osrt-metrics
exit 0
%postun metrics
-%{systemd_postun}
+%systemd_postun osrt-metrics-telegraf.service
# If grafana-server.service is enabled then restart it to load new dashboards.
if [ -x %{_bindir}/systemctl ] && %{_bindir}/systemctl is-enabled
grafana-server ; then
%{_bindir}/systemctl try-restart --no-block grafana-server
@@ -358,28 +346,16 @@
useradd -r -m -s /sbin/nologin -c "user for
openSUSE-release-tools-origin-manager" osrt-origin-manager
exit 0
-%postun origin-manager
-%{systemd_postun}
-
%pre repo-checker
getent passwd osrt-repo-checker > /dev/null || \
useradd -r -m -s /sbin/nologin -c "user for
openSUSE-release-tools-repo-checker" osrt-repo-checker
exit 0
-%postun repo-checker
-%{systemd_postun}
-
%pre staging-bot
getent passwd osrt-staging-bot > /dev/null || \
useradd -r -m -s /sbin/nologin -c "user for
openSUSE-release-tools-staging-bot" osrt-staging-bot
exit 0
-%postun staging-bot
-%{systemd_postun}
-
-%postun pkglistgen
-%{systemd_postun}
-
%files
%doc README.md
%{_bindir}/osrt-biarchtool
++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.p2yXdd/_old 2023-06-03 00:07:01.005915621 +0200
+++ /var/tmp/diff_new_pack.p2yXdd/_new 2023-06-03 00:07:01.009915645 +0200
@@ -1,7 +1,7 @@
<servicedata>
<service name="tar_scm">
<param
name="url">https://github.com/openSUSE/openSUSE-release-tools.git</param>
- <param
name="changesrevision">422701c6bb0e7c5634a4eca0d8f24a89968f70b6</param>
+ <param
name="changesrevision">41b6a00e92bb5d7e1f99926ae21ca2baa462299f</param>
</service>
</servicedata>
++++++ openSUSE-release-tools-20230512.422701c.obscpio ->
openSUSE-release-tools-20230602.41b6a00.obscpio ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/openSUSE-release-tools-20230512.422701c/dist/package/openSUSE-release-tools.spec
new/openSUSE-release-tools-20230602.41b6a00/dist/package/openSUSE-release-tools.spec
---
old/openSUSE-release-tools-20230512.422701c/dist/package/openSUSE-release-tools.spec
2023-05-12 09:54:46.000000000 +0200
+++
new/openSUSE-release-tools-20230602.41b6a00/dist/package/openSUSE-release-tools.spec
2023-06-02 12:12:07.000000000 +0200
@@ -314,40 +314,28 @@
useradd -r -m -s /sbin/nologin -c "user for
openSUSE-release-tools-announcer" osrt-announcer
exit 0
-%postun announcer
-%{systemd_postun}
-
%pre check-source
getent passwd osrt-check-source > /dev/null || \
useradd -r -m -s /sbin/nologin -c "user for
openSUSE-release-tools-check-source" osrt-check-source
exit 0
-%postun check-source
-%{systemd_postun}
-
%pre docker-publisher
getent passwd osrt-docker-publisher > /dev/null || \
useradd -r -m -s /sbin/nologin -c "user for
openSUSE-release-tools-docker-publisher" osrt-docker-publisher
exit 0
-%postun docker-publisher
-%{systemd_postun}
-
%pre maintenance
getent passwd osrt-maintenance > /dev/null || \
useradd -r -m -s /sbin/nologin -c "user for
openSUSE-release-tools-maintenance" osrt-maintenance
exit 0
-%postun maintenance
-%{systemd_postun}
-
%pre metrics
getent passwd osrt-metrics > /dev/null || \
useradd -r -m -s /sbin/nologin -c "user for openSUSE-release-tools-metrics"
osrt-metrics
exit 0
%postun metrics
-%{systemd_postun}
+%systemd_postun osrt-metrics-telegraf.service
# If grafana-server.service is enabled then restart it to load new dashboards.
if [ -x %{_bindir}/systemctl ] && %{_bindir}/systemctl is-enabled
grafana-server ; then
%{_bindir}/systemctl try-restart --no-block grafana-server
@@ -358,28 +346,16 @@
useradd -r -m -s /sbin/nologin -c "user for
openSUSE-release-tools-origin-manager" osrt-origin-manager
exit 0
-%postun origin-manager
-%{systemd_postun}
-
%pre repo-checker
getent passwd osrt-repo-checker > /dev/null || \
useradd -r -m -s /sbin/nologin -c "user for
openSUSE-release-tools-repo-checker" osrt-repo-checker
exit 0
-%postun repo-checker
-%{systemd_postun}
-
%pre staging-bot
getent passwd osrt-staging-bot > /dev/null || \
useradd -r -m -s /sbin/nologin -c "user for
openSUSE-release-tools-staging-bot" osrt-staging-bot
exit 0
-%postun staging-bot
-%{systemd_postun}
-
-%postun pkglistgen
-%{systemd_postun}
-
%files
%doc README.md
%{_bindir}/osrt-biarchtool
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/openSUSE-release-tools-20230512.422701c/metrics/access/aggregate.php
new/openSUSE-release-tools-20230602.41b6a00/metrics/access/aggregate.php
--- old/openSUSE-release-tools-20230512.422701c/metrics/access/aggregate.php
2023-05-12 09:54:46.000000000 +0200
+++ new/openSUSE-release-tools-20230602.41b6a00/metrics/access/aggregate.php
2023-06-02 12:12:07.000000000 +0200
@@ -11,7 +11,7 @@
const VHOST = 'download.opensuse.org';
const FILENAME = 'download.opensuse.org-%s-access_log.xz';
const IPV6_PREFIX = 'ipv6.';
-const PRODUCT_PATTERN =
'/^(10\.[2-3]|11\.[0-4]|12\.[1-3]|13\.[1-2]|42\.[1-3]|15\.[0-4]|tumbleweed)$/';
+const PRODUCT_PATTERN =
'/^(10\.[2-3]|11\.[0-4]|12\.[1-3]|13\.[1-2]|42\.[1-3]|15\.[0-5]|tumbleweed)$/';
$begin = new DateTime();
// Skip the current day since the logs are incomplete and not compressed yet.
@@ -199,7 +199,7 @@
}
// Write out any remaining data by simulating a date beyond all intervals.
- error_log('write remaining data');
+ /*error_log('write remaining data');
$date = clone $date;
$date->add(date_interval_create_from_date_string('1 year'));
@@ -207,7 +207,7 @@
aggregate($intervals, $merged_protocol[$protocol], $date, $date_previous,
null,
['protocol' => $protocol], 'protocol');
}
- aggregate($intervals, $merged, $date, $date_previous, null);
+ aggregate($intervals, $merged, $date, $date_previous, null);*/
}
function aggregate($intervals, &$merged, $date, $date_previous, $data, $tags =
[], $prefix = 'access')
@@ -234,9 +234,19 @@
if ($prefix == 'protocol') {
$summary = ['-' => $summary['-']];
}
+ $flavors = [];
+ foreach ($summary as $product => $details) {
+ if (isset($details['flavors'])) {
+ $flavors[$product] = $details['flavors'];
+ unset($summary[$product]['flavors']);
+ }
+ }
if (isset($value_previous) and $value != $value_previous) {
$count = write_summary($interval, $date_previous, $summary, $tags,
$prefix);
+ if (isset($flavors)) {
+ $count += write_flavors($interval, $date_previous, $flavors);
+ }
if ($prefix == 'access') {
$summary =
summarize_product_plus_key($merged[$interval]['data']['total_image_product']);
@@ -284,6 +294,15 @@
if (!isset($data['total_image_product'])) {
$data['total_image_product'] = [];
}
+ $first_product = reset($data['unique_product']);
+ $first_key = reset($first_product);
+ if (is_int($first_key)) {
+ foreach ($data['unique_product'] as $product => $pairs) {
+ foreach ($pairs as $key => $count) {
+ $data['unique_product'][$product][$key] = ['count' => $count];
+ }
+ }
+ }
}
function merge(&$data1, $data2)
@@ -297,7 +316,7 @@
$data1['total_product'][$product] += $data2['total_product'][$product];
}
- merge_product_plus_key($data1['unique_product'], $data2['unique_product']);
+ merge_unique_products($data1['unique_product'], $data2['unique_product']);
merge_product_plus_key($data1['total_image_product'],
$data2['total_image_product']);
$data1['total_invalid'] += $data2['total_invalid'];
@@ -319,6 +338,23 @@
}
}
+function merge_unique_products(&$data1, $data2)
+{
+ foreach ($data2 as $product => $arrays) {
+ if (empty($data1[$product]))
+ $data1[$product] = [];
+
+ foreach ($arrays as $key => $array) {
+ if (empty($data1[$product][$key]))
+ $data1[$product][$key] = ['count' => 0];
+
+ $data1[$product][$key]['count'] += $array['count'];
+ if (isset($array['flavor'])) $data1[$product][$key]['flavor'] =
$array['flavor'];
+ if (isset($array['ip'])) $data1[$product][$key]['ip'] = $array['ip'];
+ }
+ }
+}
+
function summarize($data)
{
static $products = [];
@@ -339,20 +375,21 @@
];
if (isset($data['unique_product'][$product])) {
$unique_product = $data['unique_product'][$product];
- $summary_product += [
- 'unique' => count($unique_product),
- 'unqiue_average' => (float) (array_sum($unique_product) /
count($unique_product)),
- 'unqiue_max' => max($unique_product),
- ];
+ $summary_product += [ 'unique' => count($unique_product) ];
// A UUID should be unique to a product, as such this should provide an
// accurate count of total unique across all products.
$summary['-']['unique'] += $summary_product['unique'];
+ $first_key = reset($data['unique_product'][$product]);
+ if (isset($first_key['flavor'])) {
+ $unique_flavors = array_column($data['unique_product'][$product],
'flavor');
+ $flavors = array_unique($unique_flavors);
+ $summary_product['flavors'] = [];
+ foreach ($flavors as $flavor) {
+ $summary_product['flavors'][$flavor] =
count(array_keys($unique_flavors, $flavor));
+ }
+ }
} else {
- $summary_product += [
- 'unique' => 0,
- 'unqiue_average' => (float) 0,
- 'unqiue_max' => 0,
- ];
+ $summary_product += [ 'unique' => 0 ];
}
$summary[$product] = $summary_product;
@@ -366,8 +403,6 @@
$summary[$product] = [
'total' => 0,
'unique' => 0,
- 'unqiue_average' => (float) 0,
- 'unqiue_max' => 0,
];
}
@@ -423,6 +458,20 @@
return count($points);
}
+function write_flavors($interval, DateTime $value, $flavors)
+{
+ $measurement = 'access_' . $interval;
+ $points = [];
+ foreach ($flavors as $product => $unique_flavors) {
+ foreach($unique_flavors as $flavor => $unique_count) {
+ $tags = ['product' => $product, 'flavor' => $flavor];
+ $points[] = new Point($measurement, $unique_count, $tags, [],
$value->getTimestamp());
+ }
+ }
+ write($points);
+ return count($points);
+}
+
function write_summary_product_plus_key($interval, DateTime $date, $summary,
$prefix)
{
$measurement = $prefix . '_' . $interval;
@@ -443,8 +492,8 @@
if (!$database) {
$database =
InfluxDB\Client::fromDSN('influxdb://0.0.0.0:8086/osrt_access');
- $database->drop();
- $database->create();
+ // $database->drop();
+ // $database->create();
}
if (!$database->writePoints($points, Database::PRECISION_SECONDS))
die('failed to write points');
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/openSUSE-release-tools-20230512.422701c/metrics/access/ingest.php
new/openSUSE-release-tools-20230602.41b6a00/metrics/access/ingest.php
--- old/openSUSE-release-tools-20230512.422701c/metrics/access/ingest.php
2023-05-12 09:54:46.000000000 +0200
+++ new/openSUSE-release-tools-20230602.41b6a00/metrics/access/ingest.php
2023-06-02 12:12:07.000000000 +0200
@@ -1,7 +1,7 @@
#!/usr/bin/php
<?php
-const REGEX_LINE = '/\S+ \S+ \S+ \[([^:]+:\d+:\d+:\d+ [^\]]+)\] "(\S+)(?:
(\S+) \S+)?" (\S+) (\S+) "[^"]*" "[^"]*" .* (?:size:|want:- give:- \d+ )(\S+)
\S+(?: +"?(\S+-\S+-\S+-\S+-[^\s"]+|-)"?
"?(dvd|ftp|mini|usb-[^"]*|livecd-[^"]*|appliance-?[^"]*|-)"?)?/';
+const REGEX_LINE = '/(\S+) \S+ \S+ \[([^:]+:\d+:\d+:\d+ [^\]]+)\] "(\S+)(?:
(\S+) \S+)?" (\S+) (\S+) "[^"]*" "[^"]*" .* (?:size:|want:- give:- \d+ )(\S+)
\S+(?: +"?(\S+-\S+-\S+-\S+-[^\s"]+|-)"?
"?(dvd|ftp|mini|usb-[^"]*|livecd-[^"]*|appliance-?[^"]*|-)"?)?/';
const REGEX_PRODUCT =
'#/(?:(tumbleweed)|distribution/(?:leap/)?(\d+\.\d+)|openSUSE(?:_|:/)(?:leap(?:_|:/))?(factory|tumbleweed|\d+\.\d+))#i';
const REGEX_IMAGE =
'#(?:/(?:iso|live)/[^/]+-(DVD|NET|GNOME-Live|KDE-Live|Rescue-CD|Kubic-DVD)-[^/]+\.iso(?:\.torrent)?|/jeos/[^/]+-(JeOS)\.[^/]+\.(?:qcow2|vhdx|vmdk|vmx)$)#';
@@ -21,13 +21,13 @@
}
// Only interested in GET or HEAD requests, others are invalid.
- if ($match[2] != 'GET' && $match[2] != 'HEAD') continue;
+ if ($match[3] != 'GET' && $match[3] != 'HEAD') continue;
// Not interested on errors.
- if ($match[4] >= '400') continue;
+ if ($match[5] >= '400') continue;
$total++;
// Attempt to determine for which product was the request.
- if (!preg_match(REGEX_PRODUCT, $match[3], $match_product)) {
+ if (!preg_match(REGEX_PRODUCT, $match[4], $match_product)) {
continue;
}
@@ -38,14 +38,20 @@
if (!isset($total_product[$product])) $total_product[$product] = 0;
$total_product[$product] += 1;
- if (count($match) == 9 && $match[7] != '-') {
- $uuid = $match[7];
+ if (count($match) == 10 && $match[8] != '-') {
+ $uuid = $match[8];
if (!isset($unique_product[$product])) $unique_product[$product] = [];
- if (!isset($unique_product[$product][$uuid]))
$unique_product[$product][$uuid] = 0;
- $unique_product[$product][$uuid] += 1;
+ if (!isset($unique_product[$product][$uuid])) {
+ $unique_product[$product][$uuid] = [
+ 'count' => 0,
+ 'flavor' => $match[9],
+ 'ip' => $match[1],
+ ];
+ }
+ $unique_product[$product][$uuid]['count'] += 1;
}
- if (preg_match(REGEX_IMAGE, $match[3], $match_image)) {
+ if (preg_match(REGEX_IMAGE, $match[4], $match_image)) {
// Remove empty match groups and select non-all match.
$values = array_filter($match_image);
$image = next($values);
++++++ openSUSE-release-tools.obsinfo ++++++
--- /var/tmp/diff_new_pack.p2yXdd/_old 2023-06-03 00:07:01.809920369 +0200
+++ /var/tmp/diff_new_pack.p2yXdd/_new 2023-06-03 00:07:01.813920392 +0200
@@ -1,5 +1,5 @@
name: openSUSE-release-tools
-version: 20230512.422701c
-mtime: 1683878086
-commit: 422701c6bb0e7c5634a4eca0d8f24a89968f70b6
+version: 20230602.41b6a00
+mtime: 1685700727
+commit: 41b6a00e92bb5d7e1f99926ae21ca2baa462299f