public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/google-osconfig-agent] f44: Update to 200260717 - Closes rhbz#2336973
@ 2026-07-17 15:16 Mikel Olasagasti Uranga
  0 siblings, 0 replies; only message in thread
From: Mikel Olasagasti Uranga @ 2026-07-17 15:16 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/google-osconfig-agent
Branch : f44
Commit : 26741e96692e5b6902bebd3665684faf4c1e9634
Author : Mikel Olasagasti Uranga <mikel@olasagasti.info>
Date   : 2026-07-17T16:14:15+02:00
Stats  : +89/-617 in 8 file(s)
URL    : https://src.fedoraproject.org/rpms/google-osconfig-agent/c/26741e96692e5b6902bebd3665684faf4c1e9634?branch=f44

Log:
Update to 200260717 - Closes rhbz#2336973

---
diff --git a/.gitignore b/.gitignore
index 36405b3..274f270 100644
--- a/.gitignore
+++ b/.gitignore
@@ -68,3 +68,5 @@
 /osconfig-20241004.00-vendor.tar.gz
 /osconfig-20241029.01.tar.gz
 /osconfig-20241029.01-vendor.tar.gz
+/osconfig-20260717.00.tar.gz
+/osconfig-20260717.00-vendor.tar.bz2

diff --git a/.packit.yaml b/.packit.yaml
index 4c31395..4e86a79 100644
--- a/.packit.yaml
+++ b/.packit.yaml
@@ -1,23 +1,33 @@
-upstream_package_name: osconfig
+---
 downstream_package_name: google-osconfig-agent
-
 upstream_project_url: https://github.com/GoogleCloudPlatform/osconfig
-
-specfile_path: google-osconfig-agent.spec
+upstream_tag_template: "v{version}"
 
 jobs:
-  - job: koji_build
-    trigger: commit
+  - job: pull_from_upstream
+    trigger: release
     dist_git_branches:
-      - fedora-all
-    allowed_pr_authors:
-      - packit
-      - mhayden
-    allowed_committers:
-      - packit
-      - mhayden
+      rawhide:
+        fast_forward_merge_into:
+          - fedora-branched
 
-  - job: bodhi_update
+  - job: koji_build
     trigger: commit
     dist_git_branches:
-      - fedora-branched
+      - fedora-all
+actions:
+  post-modifications:
+    - |
+      sh -xeuc "
+        cd $PACKIT_DOWNSTREAM_REPO
+        export GOTOOLCHAIN=local+auto
+        spec="$PACKIT_DOWNSTREAM_PACKAGE_NAME.spec"
+        go_vendor_archive create --config go-vendor-tools.toml "$spec"
+        go_vendor_license \
+          --config go-vendor-tools.toml \
+          --path "$spec" \
+          report \
+          --verify-spec \
+          --autofill=auto
+      "
+create_sync_note: false

diff --git a/LICENSES.dependencies b/LICENSES.dependencies
deleted file mode 100644
index c659d7f..0000000
--- a/LICENSES.dependencies
+++ /dev/null
@@ -1,75 +0,0 @@
-LICENSE: Apache-2.0
-THIRD_PARTY_LICENSES/cloud.google.com/go/LICENSE: Apache-2.0
-THIRD_PARTY_LICENSES/cloud.google.com/go/logging/LICENSE: Apache-2.0
-THIRD_PARTY_LICENSES/cloud.google.com/go/osconfig/agentendpoint/apiv1/LICENSE: Apache-2.0
-THIRD_PARTY_LICENSES/cloud.google.com/go/storage/LICENSE: Apache-2.0
-THIRD_PARTY_LICENSES/cos.googlesource.com/cos/tools.git/src/pkg/LICENSE: Apache-2.0
-THIRD_PARTY_LICENSES/github.com/GoogleCloudPlatform/guest-logging-go/logger/LICENSE: Apache-2.0
-THIRD_PARTY_LICENSES/github.com/GoogleCloudPlatform/osconfig/LICENSE: Apache-2.0
-THIRD_PARTY_LICENSES/github.com/golang/glog/LICENSE: Apache-2.0
-THIRD_PARTY_LICENSES/github.com/golang/groupcache/lru/LICENSE: Apache-2.0
-THIRD_PARTY_LICENSES/github.com/golang/mock/gomock/LICENSE: Apache-2.0
-THIRD_PARTY_LICENSES/github.com/golang/protobuf/LICENSE: BSD-3-Clause
-THIRD_PARTY_LICENSES/github.com/google/go-cmp/cmp/LICENSE: BSD-3-Clause
-THIRD_PARTY_LICENSES/github.com/googleapis/gax-go/v2/LICENSE: BSD-3-Clause
-THIRD_PARTY_LICENSES/github.com/julienschmidt/httprouter/LICENSE: BSD-3-Clause
-THIRD_PARTY_LICENSES/github.com/pkg/errors/LICENSE: BSD-2-Clause
-THIRD_PARTY_LICENSES/github.com/sirupsen/logrus/LICENSE: MIT
-THIRD_PARTY_LICENSES/github.com/tarm/serial/LICENSE: BSD-3-Clause
-THIRD_PARTY_LICENSES/github.com/ulikunitz/xz/LICENSE: BSD-3-Clause
-THIRD_PARTY_LICENSES/go.chromium.org/luci/LICENSE: Apache-2.0
-THIRD_PARTY_LICENSES/go.opencensus.io/LICENSE: Apache-2.0
-THIRD_PARTY_LICENSES/golang.org/x/crypto/LICENSE: BSD-3-Clause
-THIRD_PARTY_LICENSES/golang.org/x/net/LICENSE: BSD-3-Clause
-THIRD_PARTY_LICENSES/golang.org/x/oauth2/LICENSE: BSD-3-Clause
-THIRD_PARTY_LICENSES/golang.org/x/sync/semaphore/LICENSE: BSD-3-Clause
-THIRD_PARTY_LICENSES/golang.org/x/sys/LICENSE: BSD-3-Clause
-THIRD_PARTY_LICENSES/golang.org/x/text/LICENSE: BSD-3-Clause
-THIRD_PARTY_LICENSES/google.golang.org/api/LICENSE: BSD-3-Clause
-THIRD_PARTY_LICENSES/google.golang.org/api/internal/third_party/uritemplates/LICENSE: BSD-3-Clause
-THIRD_PARTY_LICENSES/google.golang.org/genproto/LICENSE: Apache-2.0
-THIRD_PARTY_LICENSES/google.golang.org/grpc/LICENSE: Apache-2.0
-THIRD_PARTY_LICENSES/google.golang.org/protobuf/LICENSE: BSD-3-Clause
-vendor/cloud.google.com/go/LICENSE: Apache-2.0
-vendor/cloud.google.com/go/compute/LICENSE: Apache-2.0
-vendor/cloud.google.com/go/compute/metadata/LICENSE: Apache-2.0
-vendor/cloud.google.com/go/iam/LICENSE: Apache-2.0
-vendor/cloud.google.com/go/logging/LICENSE: Apache-2.0
-vendor/cloud.google.com/go/longrunning/LICENSE: Apache-2.0
-vendor/cloud.google.com/go/osconfig/LICENSE: Apache-2.0
-vendor/cloud.google.com/go/storage/LICENSE: Apache-2.0
-vendor/cos.googlesource.com/cos/tools.git/LICENSE: Apache-2.0
-vendor/github.com/GoogleCloudPlatform/guest-logging-go/LICENSE: Apache-2.0
-vendor/github.com/StackExchange/wmi/LICENSE: MIT
-vendor/github.com/go-ole/go-ole/LICENSE: MIT
-vendor/github.com/golang/glog/LICENSE: Apache-2.0
-vendor/github.com/golang/groupcache/LICENSE: Apache-2.0
-vendor/github.com/golang/mock/LICENSE: Apache-2.0
-vendor/github.com/golang/protobuf/LICENSE: BSD-3-Clause
-vendor/github.com/google/go-cmp/LICENSE: BSD-3-Clause
-vendor/github.com/google/uuid/LICENSE: BSD-3-Clause
-vendor/github.com/googleapis/enterprise-certificate-proxy/LICENSE: Apache-2.0
-vendor/github.com/googleapis/gax-go/v2/LICENSE: BSD-3-Clause
-vendor/github.com/julienschmidt/httprouter/LICENSE: BSD-3-Clause
-vendor/github.com/konsorten/go-windows-terminal-sequences/LICENSE: MIT
-vendor/github.com/pkg/errors/LICENSE: BSD-2-Clause
-vendor/github.com/sirupsen/logrus/LICENSE: MIT
-vendor/github.com/tarm/serial/LICENSE: BSD-3-Clause
-vendor/github.com/ulikunitz/xz/LICENSE: BSD-3-Clause
-vendor/go.chromium.org/luci/LICENSE: Apache-2.0
-vendor/go.opencensus.io/LICENSE: Apache-2.0
-vendor/golang.org/x/crypto/LICENSE: BSD-3-Clause
-vendor/golang.org/x/net/LICENSE: BSD-3-Clause
-vendor/golang.org/x/oauth2/LICENSE: BSD-3-Clause
-vendor/golang.org/x/sync/LICENSE: BSD-3-Clause
-vendor/golang.org/x/sys/LICENSE: BSD-3-Clause
-vendor/golang.org/x/text/LICENSE: BSD-3-Clause
-vendor/golang.org/x/xerrors/LICENSE: BSD-3-Clause
-vendor/google.golang.org/api/LICENSE: BSD-3-Clause
-vendor/google.golang.org/api/internal/third_party/uritemplates/LICENSE: BSD-3-Clause
-vendor/google.golang.org/appengine/LICENSE: Apache-2.0
-vendor/google.golang.org/genproto/LICENSE: Apache-2.0
-vendor/google.golang.org/grpc/LICENSE: Apache-2.0
-vendor/google.golang.org/protobuf/LICENSE: BSD-3-Clause
-
-Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND MIT

diff --git a/go-vendor-tools.toml b/go-vendor-tools.toml
new file mode 100644
index 0000000..54016b3
--- /dev/null
+++ b/go-vendor-tools.toml
@@ -0,0 +1,34 @@
+[archive]
+
+[licensing]
+detector = "askalono"
+exclude_files = ["vendor/modernc.org/memory/LICENSE-LOGO"]
+[[licensing.licenses]]
+path = "vendor/github.com/spdx/tools-golang/LICENSE.code"
+sha256sum = "e914fb1f3927226e04b0438e0b541b3c6e3c65de4d64aa8f5cdaa803f05448fd"
+expression = "(Apache-2.0 OR GPL-2.0-or-later) AND Apache-2.0 AND GPL-2.0-only"
+
+[[licensing.licenses]]
+path = "vendor/modernc.org/sqlite/SQLITE-LICENSE"
+sha256sum = "8438c9c89b849131ead81d5435cb97fcf052df5b0b286dda8a2d4c29e6cb3fd0"
+expression = "LicenseRef-Fedora-Public-Domain"
+
+[[licensing.licenses]]
+path = "vendor/github.com/shirou/gopsutil/LICENSE"
+sha256sum = "8db64481897d4b1604821103bf9621244fa257c0a80eecb643630ae22e890289"
+expression = "BSD-3-Clause"
+
+[[licensing.licenses]]
+path = "vendor/go.yaml.in/yaml/v3/LICENSE"
+sha256sum = "d18f6323b71b0b768bb5e9616e36da390fbd39369a81807cca352de4e4e6aa0b"
+expression = "MIT AND (MIT AND Apache-2.0)"
+
+[[licensing.licenses]]
+path = "vendor/modernc.org/libc/COPYRIGHT-MUSL"
+sha256sum = "f9bc4423732350eb0b3f7ed7e91d530298476f8fec0c6c427a1c04ade22655af"
+expression = "MIT AND BSD-2-Clause AND BSD-3-Clause"
+
+[[licensing.licenses]]
+path = "vendor/gopkg.in/yaml.v3/LICENSE"
+sha256sum = "d18f6323b71b0b768bb5e9616e36da390fbd39369a81807cca352de4e4e6aa0b"
+expression = "MIT AND (MIT AND Apache-2.0)"

diff --git a/go_vendor_licenses.py b/go_vendor_licenses.py
deleted file mode 100755
index 32af7d0..0000000
--- a/go_vendor_licenses.py
+++ /dev/null
@@ -1,444 +0,0 @@
-#!/usr/bin/env python3
-# SPDX-License-Identifier: MIT
-# SPDX-FileCopyright-Text: 2022 Maxwell G <gotmax@e.email>
-
-from __future__ import annotations
-
-import argparse
-import hashlib
-import hmac
-import json
-import re
-import shutil
-import sys
-from collections.abc import Callable, Collection, Iterable, Iterator
-from itertools import chain
-from pathlib import Path
-from subprocess import run
-from typing import TYPE_CHECKING, Any, TypedDict, cast
-
-import license_expression
-
-if sys.version_info >= (3, 11):
-    import tomllib
-else:
-    import tomli as tomllib
-
-try:
-    from termcolor import colored
-except ImportError:
-    red: Callable[..., Any] = print
-else:
-
-    def red(text: object, file=sys.stdout, **kwargs):
-        text = colored(text, "red") if file.isatty() else text
-        print(text, file=file, **kwargs)
-
-
-licensing = license_expression.get_spdx_licensing()
-
-
-if TYPE_CHECKING:
-    from _typeshed import StrPath
-
-MODULE_REGEX = re.compile(r"^# (?:.+=>)?(?P<ipath>\S+) v(?P<version>\S+)$")
-
-
-class LicenseEntry(TypedDict, total=False):
-    path: str
-    sha256sum: str
-    expression: str
-
-
-class LicenseConfig(TypedDict, total=False):
-    """
-    TypedDict representing the script's config file
-    """
-
-    licenses: list[LicenseEntry]
-
-
-def load_config(config: Path | None = None) -> LicenseConfig:
-    """
-    Load the configuration TOML file if `config` is not None
-    """
-    if not config:
-        return {"licenses": []}
-    with config.open("rb") as fp:
-        data = tomllib.load(fp)
-    return cast("LicenseConfig", data)
-
-
-def parseargs() -> argparse.Namespace:
-    """
-    Parse arguments and return an `argparse.Namespace`
-    """
-    parser = argparse.ArgumentParser(
-        description="Handle licenses for vendored go projects"
-    )
-    parser.add_argument("--config", type=Path)
-    parser.add_argument(
-        "-C",
-        "--directory",
-        type=Path,
-        default=Path(),
-        help="Top-level directory with a go.mod file and vendor directory",
-    )
-    subparsers = parser.add_subparsers(dest="subcommand")
-    report_parser = subparsers.add_parser("report", help="Main subcommand")
-    report_parser.add_argument("-i", "--ignore-undetected", action="store_true")
-    report_parser.add_argument(
-        "--verify",
-        help="Verify license expression to make sure it matches caluclated expression",
-        metavar="EXPRESSION",
-    )
-    report_parser.add_argument(
-        "mode",
-        nargs="?",
-        type=str,
-        choices=("all", "expression", "list"),
-    )
-    explict_parser = subparsers.add_parser(
-        "explicit", help="Add manual license entry to a config file"
-    )
-    explict_parser.add_argument(
-        "-f", "--file", dest="license_file", required=True, type=Path
-    )
-    explict_parser.add_argument("license_expression")
-    install_parser = subparsers.add_parser(
-        "install", description=f"INTERNAL: {install_command.__doc__}"
-    )
-    install_parser.add_argument(
-        "--install-directory", dest="install_directory", type=Path, required=True
-    )
-    install_parser.add_argument(
-        "--destdir", dest="install_destdir", type=Path, default=Path()
-    )
-    install_parser.add_argument(
-        "--filelist", dest="install_filelist", type=Path, required=True
-    )
-
-    args = parser.parse_args()
-    if args.subcommand == "report" and not args.mode:
-        args.mode = "list" if args.verify else "all"
-    if not args.directory.is_dir():
-        sys.exit(f"{args.directory} must exist and be a directory")
-    if not (modtxt := args.directory / "vendor/modules.txt"):
-        sys.exit(f"{modtxt} does not exist!")
-    return args
-
-
-def get_askalono_data(directory: StrPath) -> list[dict[str, Any]]:
-    """
-    Crawl `directory` with askalono and return the serialized JSON representation
-    """
-    licenses_json = run(
-        ("askalono", "--format=json", "crawl", directory),
-        check=True,
-        capture_output=True,
-    ).stdout.decode("utf-8")
-    licenses = []
-    for line in licenses_json.splitlines():
-        licensed = json.loads(line)
-        licenses.append(licensed)
-    return licenses
-
-
-def get_licenses(
-    directory, license_data, allow_undetected: Collection[Path] = frozenset()
-) -> tuple[set[str], list[Path], list[dict[str, Any]]]:
-    licenses: set[str] = set()
-    undetected_licenses: list[Path] = []
-    filtered_license_data: list[dict[str, Any]] = []
-    for licensed in license_data:
-        if "/PATENTS" not in licensed["path"] and "/NOTICE" not in licensed["path"]:
-            try:
-                license_name = licensed["result"]["license"]["name"]
-            except KeyError:
-                if Path(licensed["path"]) not in allow_undetected:
-                    undetected_licenses.append(Path(licensed["path"]))
-            else:
-                licenses.add(license_name)
-                filtered_license_data.append(licensed)
-    if not licenses:
-        sys.exit(f"No license files found in {directory}")
-    return licenses, undetected_licenses, filtered_license_data
-
-
-def get_simplified_license_map(
-    filtered_license_data: list[dict[str, Any]],
-    extra_license_mapping: dict[Path, str] | None = None,
-) -> dict[Path, str]:
-    results: dict[Path, str] = {}
-    for licensed in filtered_license_data:
-        license_name = licensed["result"]["license"]["name"]
-        license_path = Path(licensed["path"])
-        results[license_path] = license_name
-    results.update(extra_license_mapping or {})
-    return dict(sorted(results.items(), key=lambda item: item[0]))
-
-
-def get_go_module_names(directory: Path) -> dict[str, str]:
-    results: dict[str, str] = {}
-    with (directory / "vendor/modules.txt").open("r", encoding="utf-8") as fp:
-        for line in fp:
-            if match := MODULE_REGEX.match(line):
-                results[match["ipath"]] = match["version"]
-    return results
-
-
-def get_go_module_dirs(directory: Path) -> list[Path]:
-    results: list[Path] = []
-    for ipath in get_go_module_names(directory):
-        moddir = directory / "vendor" / ipath
-        if moddir.is_dir():
-            results.append(moddir)
-    return results
-
-
-def get_unlicensed_mods(directory: Path, license_paths: Collection[Path]) -> set[Path]:
-    licensed_dirs = {path.parent for path in license_paths}
-    all_dirs = set(get_go_module_dirs(directory))
-    return all_dirs - licensed_dirs
-
-
-def bullet_iterator(it: Iterable[object], bullet: str = "- ") -> Iterator[str]:
-    for item in it:
-        yield bullet + str(item)
-
-
-def print_if_true(items: Collection[object], message: str, bullet: str = "- ") -> None:
-    if not items:
-        return
-    red(message)
-    red("\n".join(bullet_iterator(items, bullet)))
-
-
-def print_licenses(
-    licenses: dict[Path, str],
-    license_expression: str,
-    undetected_licenses: list[Path],
-    unlicensed_mods: set[Path],
-    unmatched_licenses: list[Path],
-    mode: str,
-    show_undetected: bool,
-    directory: Path,
-) -> None:
-    r = 0
-    if mode in ("all", "list"):
-        for license_path, license_name in licenses.items():
-            print(f"{license_path.relative_to(directory)}: {license_name}")
-    if (
-        undetected_licenses or unlicensed_mods or undetected_licenses
-    ) and show_undetected:
-        r = 1
-        if mode != "expression":
-            print()
-        print_if_true(
-            undetected_licenses,
-            "The following license files were found "
-            "but the correct license identifier couldn't be determined:",
-        )
-        print_if_true(
-            unlicensed_mods, "The following modules are missing license files:"
-        )
-        print_if_true(
-            unmatched_licenses,
-            "The following license files that were specified in the configuration"
-            " have changed:",
-        )
-    if mode == "list":
-        sys.exit(r)
-    print()
-    print(license_expression)
-    sys.exit(r)
-
-
-def combine_licenses(*expressions: str) -> license_expression.LicenseExpression:
-    return license_expression.combine_expressions(
-        expressions, licensing=licensing
-    ).simplify()
-
-
-def simplify_license(expression: str) -> str:
-    return str(licensing.parse(expression, validate=True, strict=True).simplify())
-
-
-def compare_licenses(
-    simplified_expression: license_expression.LicenseExpression,
-    expression_str: str,
-    /,
-) -> bool:
-    expression2 = licensing.parse(expression_str).simplify()
-    return simplified_expression == expression2
-
-
-def get_hash(file: Path) -> str:
-    hasher = hashlib.sha256()
-    with file.open("rb") as fp:
-        while chunk := fp.read(4096):
-            hasher.update(chunk)
-    return hasher.hexdigest()
-
-
-def verify_hash(file: Path, sha256sum: str) -> bool:
-    if not file.is_file():
-        return False
-    return hmac.compare_digest(get_hash(file), sha256sum)
-
-
-def get_extra_licenses(
-    licenses: list[LicenseEntry],
-) -> tuple[dict[Path, str], list[Path]]:
-    results: dict[Path, str] = {}
-    not_matched: list[Path] = []
-    seen: set[Path] = set()
-    for lic in licenses:
-        path = Path(lic["path"])
-        if path in results:
-            sys.exit(f"{path} was specified multiple times in the configuration!")
-        seen.add(path)
-        if verify_hash(path, lic["sha256sum"]):
-            results[path] = lic["expression"]
-        else:
-            not_matched.append(path)
-    return results, not_matched
-
-
-def report_command(args: argparse.Namespace) -> None:
-    config = load_config(args.config)
-    license_data = get_askalono_data(args.directory)
-    extra_licenses, not_matched = get_extra_licenses(config["licenses"])
-    licenses, undetected_licenses, filtered_license_data = get_licenses(
-        args.directory, license_data, extra_licenses
-    )
-    simplified_license_map = get_simplified_license_map(
-        filtered_license_data, extra_licenses
-    )
-    unlicensed_mods = get_unlicensed_mods(
-        args.directory, (*simplified_license_map, *undetected_licenses)
-    )
-    license_expression = combine_licenses(*licenses)
-    print_licenses(
-        simplified_license_map,
-        str(license_expression),
-        undetected_licenses,
-        unlicensed_mods,
-        not_matched,
-        args.mode,
-        not args.ignore_undetected,
-        args.directory,
-    )
-    if args.verify and not compare_licenses(license_expression, args.verify):
-        sys.exit(f"Failed to verify license.\nExpected: {license_expression}")
-    sys.exit(bool(undetected_licenses or not_matched))
-
-
-def get_license_file_paths(
-    directory: Path,
-    extra_licenses: dict[Path, str],
-) -> list[Path]:
-    results: list[Path] = []
-
-    license_data = get_askalono_data(directory)
-    _, undetected_licenses, filtered_license_data = get_licenses(
-        directory, license_data, extra_licenses
-    )
-    simplified_license_map = get_simplified_license_map(
-        filtered_license_data, extra_licenses
-    )
-
-    for lic in chain(simplified_license_map, undetected_licenses):
-        results.append(directory / lic)
-    return results
-
-
-def copy_licenses(
-    license_paths: Iterable[Path],
-    install_destdir: Path,
-    install_directory: Path,
-    install_filelist: Path,
-) -> None:
-    installdir = install_destdir / install_directory
-
-    with install_filelist.open("w", encoding="utf-8") as fp:
-        installdir.mkdir(parents=True, exist_ok=True)
-        fp.write(f"%license %dir {install_directory}\n")
-        for lic in license_paths:
-            (installdir / lic).parent.mkdir(parents=True, exist_ok=True)
-            shutil.copy2(lic, installdir / lic)
-            fp.write(f"%license {install_directory / lic}\n")
-
-
-def install_command(args: argparse.Namespace) -> None:
-    """
-    Install license files into the license directory
-    """
-    config = load_config(args.config)
-    directory: Path = args.directory
-    install_destdir: Path = args.install_destdir
-    install_directory: Path = args.install_directory
-    install_filelist: Path = args.install_filelist
-    extra_licenses, _ = get_extra_licenses(config["licenses"])
-    license_paths = get_license_file_paths(directory, extra_licenses)
-    copy_licenses(license_paths, install_destdir, install_directory, install_filelist)
-
-
-def get_relpath(base_directory: Path, path: Path) -> Path:
-    if path.is_absolute():
-        return path.relative_to(base_directory)
-    return path
-
-
-def replace_entry(
-    data: list[LicenseEntry], new_entry: LicenseEntry, relpath: Path
-) -> None:
-    for entry in data:
-        if Path(entry["path"]) == relpath:
-            cast(dict, entry).clear()
-            entry.update(new_entry)
-            return
-    data.append(entry)
-
-
-def explicit_command(args: argparse.Namespace) -> None:
-    try:
-        import tomlkit
-    except ImportError:
-        sys.exit("tomlkit is required for the 'explicit' subcommand")
-    if not args.config or not args.config.is_file():
-        sys.exit("--config must be specified!")
-
-    data: LicenseConfig = {}
-    if args.config.is_file():
-        with args.config.open("r", encoding="utf-8") as fp:
-            data = cast("LicenseConfig", tomlkit.load(fp))
-
-    licenses = data.setdefault("licenses", tomlkit.aot())
-    relpath = get_relpath(args.directory, args.license_file)
-    try:
-        expression = simplify_license(args.license_expression)
-    except license_expression.ExpressionError as exc:
-        sys.exit(f"Failed to parse license: {exc}")
-    entry = LicenseEntry(
-        path=str(relpath),
-        sha256sum=get_hash(args.license_file),
-        expression=expression,
-    )
-    replace_entry(licenses, entry, relpath)
-    with args.config.open("w", encoding="utf-8") as fp:
-        tomlkit.dump(data, fp)
-
-
-def main() -> None:
-    args = parseargs()
-    if args.subcommand == "report":
-        report_command(args)
-    elif args.subcommand == "explicit":
-        explicit_command(args)
-    elif args.subcommand == "install":
-        install_command(args)
-
-
-if __name__ == "__main__":
-    main()

diff --git a/google-osconfig-agent.spec b/google-osconfig-agent.spec
index b453b29..23498e9 100644
--- a/google-osconfig-agent.spec
+++ b/google-osconfig-agent.spec
@@ -1,48 +1,39 @@
-# Generated by go2rpm 1.8.0
-%bcond_without check
-
-# Upstream dependencies change often and specific versions are needed that aren't
-# always available in Fedora.
-%bcond vendor 1
+# Generated by go2rpm 1.19.0
+%bcond check 1
 
 # https://github.com/GoogleCloudPlatform/osconfig
 %global goipath         github.com/GoogleCloudPlatform/osconfig
-Version:                20241029.01
-%global tag             %{version}
+Version:                20260717.00
+%global tag             20260717.00
 
-%gometa -f
+%gometa -L -f
 
-%global common_description %{expand:
-Google OS Config Agent}
 
 Name:           google-osconfig-agent
 Release:        %autorelease
 Summary:        Google OS Config Agent
 
-License:        Apache-2.0
+# Generated by go-vendor-tools
+License:        Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND GPL-2.0-only AND ISC AND LicenseRef-Fedora-Public-Domain AND MIT AND MPL-2.0 AND Sleepycat AND (Apache-2.0 OR GPL-2.0-or-later)
 URL:            %{gourl}
 Source0:        %{gosource}
+# Generated by go-vendor-tools
+Source1:        %{archivename}-vendor.tar.bz2
+Source2:        go-vendor-tools.toml
 
-# Bundled dependencies made with mkvendor.sh
-Source1:        osconfig-%{version}-vendor.tar.gz
-
-# https://git.sr.ht/~gotmax23/fedora-scripts/tree/main/item/retired/go_vendor_licenses.py
-Source2:        LICENSES.dependencies
-
+BuildRequires:  go-vendor-tools
 BuildRequires:  systemd
 BuildRequires:  systemd-rpm-macros
 
 # Google Cloud only offers Arm and x86 instances.
 ExcludeArch:    ppc64le s390x
 
-%description %{common_description}
-
-%gopkg
+%description
+Google OS Config Agent
 
 %prep
-%autosetup -p1 %{forgesetupargs} %{?with_vendor:-b1}
-%goprep -e %{?with_vendor:-k}
-cp %{SOURCE2} .
+%goprep -p1
+tar -xf %{S:1}
 
 # Examples directory isn't needed.
 rm -rf examples
@@ -50,27 +41,28 @@ rm -rf examples
 # e2e_tests require connectivity to Google's APIs and extra packages.
 rm -rf e2e_tests
 
+
 %generate_buildrequires
-%if %{without vendor}
-%go_generate_buildrequires
-%endif
+%go_vendor_license_buildrequires -c %{S:2}
 
 %build
+%global gomodulesmode GO111MODULE=on
 %gobuild -o %{gobuilddir}/bin/google_osconfig_agent %{goipath}
 
 %install
-install -m0755 -vd                      %{buildroot}%{_bindir}
-install -m0755 -vp %{gobuilddir}/bin/*  %{buildroot}%{_bindir}/
+%go_vendor_license_install -c %{S:2}
+install -m 0755 -vd                     %{buildroot}%{_bindir}
+install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/
 install -m0644 -Dp %{name}.service      %{buildroot}%{_unitdir}/%{name}.service
 
-%if %{with check}
 %check
-# Skip some tests that require network access when they run.
-%gocheck -d config -d policies
+%go_vendor_license_check -c %{S:2}
+%if %{with check}
+# agentendpoint fails with go 1.27
+%gocheck2 -t agentendpoint -t config -t policies
 %endif
 
-%files
-%license LICENSE %{?with_vendor:vendor/modules.txt LICENSES.dependencies}
+%files -f %{go_vendor_license_filelist}
 %doc CONTRIBUTING.md README.md
 %{_bindir}/google_osconfig_agent
 %{_unitdir}/%{name}.service

diff --git a/mkvendor.sh b/mkvendor.sh
deleted file mode 100755
index a47633d..0000000
--- a/mkvendor.sh
+++ /dev/null
@@ -1,47 +0,0 @@
-#!/usr/bin/bash -x
-
-set -euo pipefail
-
-NAME="osconfig"
-googlestuff="false"
-
-usage() {
-    echo "./mkvendor.sh [-n (disable proxy and sumbdb)] VERSION"
-    if [ -n "${1-}" ]; then
-        exit "${1}"
-    fi
-}
-
-do_env() {
-    if [ "${googlestuff}" = "true" ]; then
-        GOPROXY=https://proxy.golang.org,direct
-        GOSUMDB=sum.golang.org
-        export GOPROXY GOSUMDB
-    fi
-}
-
-
-while getopts "-nh" OPT; do
-    case "${OPT}" in
-        n)
-            googlestuff=""
-            ;;
-        h)
-            usage 0
-            ;;
-        *)
-            usage 1
-            ;;
-    esac
-done
-shift "$((OPTIND-1))"
-version="${1}" || usage 1
-
-
-rm -rf "${NAME}-${version}/"
-tar xf "${NAME}-${version}.tar.gz"
-cd "${NAME}-${version}"
-do_env
-go mod vendor
-cd -
-tar czf "${NAME}-${version}-vendor.tar.gz" "${NAME}-${version}/vendor"

diff --git a/sources b/sources
index 16d0d85..f1336b3 100644
--- a/sources
+++ b/sources
@@ -1,2 +1,2 @@
-SHA512 (osconfig-20241029.01.tar.gz) = dac1223b53ae30bfd845d6c51883edc7ad1ab642f0168c4837f11f13a918172fa623c3a4fa3a4518554cc20846db681aefe7314e1ef5c3f017a38d4009f0f0ae
-SHA512 (osconfig-20241029.01-vendor.tar.gz) = 31e0ef35ceed205133bd5df8bad1d3bcef6e9325d453e5575a5d03c933c6496b7752db822ecf34167d9372204dc21194ad0a7ee56f16014d687e7d948857fc6b
+SHA512 (osconfig-20260717.00.tar.gz) = 0a4cb0467ef2f2e824fcd7c89ff124898d91ac1b8ec1786de2b0969efa9d02d58894dd96cbe318c8a6302f3e065fa3fbd9bdadf098361db9855039a20d02a9d3
+SHA512 (osconfig-20260717.00-vendor.tar.bz2) = fe005531f85de7a6438f17d033ffff0eae1f119515515dbf6d5ef376e556156b247c073df09a5370bdbf6535fcb62f605a8116b8f413cb32d9f369fbff9d357b

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-07-17 15:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-17 15:16 [rpms/google-osconfig-agent] f44: Update to 200260717 - Closes rhbz#2336973 Mikel Olasagasti Uranga

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox