├── rpm ├── guards ├── arch-symbols ├── kernel-source.changes.old ├── obsolete-kmps ├── modflist ├── check-module-license ├── splitflist ├── moddep ├── old-flavors ├── release-projects ├── kernel-binary-conflicts ├── mergedep ├── kernel-source.rpmlintrc ├── modules.fips ├── config.sh ├── apply-patches ├── kernel-cert-subpackage ├── check-for-config-changes ├── compute-PATCHVERSION.sh ├── kernel-syms.spec.in └── kernel-obs-qa.spec.in ├── scripts ├── git_sort │ ├── qcp │ ├── qgoto │ ├── merge_tool.py │ ├── qdupcheck │ ├── series_conf │ ├── series_insert │ ├── series_insert.py │ ├── series_sort │ ├── series_sort.py │ ├── update_clone │ ├── update_clone.py │ ├── git_sort_debug │ ├── quiltrc.qf1 │ ├── sequence-insert │ ├── sequence-insert.py │ ├── git_sort.yaml │ ├── series_merge_tool │ ├── patch_header.awk │ ├── patch_body.awk │ ├── lib_from.sh │ ├── clean_conflicts.awk │ └── check_missing_fixes.sh ├── python │ ├── tests │ │ ├── __init__.py │ │ ├── kutil │ │ │ ├── dir │ │ │ │ ├── a file │ │ │ │ ├── another file │ │ │ │ ├── .a hidden file │ │ │ │ ├── a directory │ │ │ │ │ ├── a file in a directory │ │ │ │ │ ├── .a hidden file in a directory │ │ │ │ │ └── another file in a directory │ │ │ │ └── another directory │ │ │ │ │ └── a file in another directory │ │ │ └── rpm │ │ │ │ ├── krn │ │ │ │ ├── _constraints │ │ │ │ ├── kernel-docs.spec │ │ │ │ ├── kernel-source.spec │ │ │ │ ├── source-timestamp │ │ │ │ ├── config.sh │ │ │ │ ├── kernel-syms.spec │ │ │ │ ├── dtb-aarch64.spec │ │ │ │ ├── dtb-armv7l.spec │ │ │ │ ├── kernel-obs-qa.spec │ │ │ │ └── kernel-obs-build.spec │ │ │ │ ├── krna │ │ │ │ ├── _constraints │ │ │ │ ├── kernel-syms-azure.spec │ │ │ │ ├── kernel-source-azure.spec │ │ │ │ └── config.sh │ │ │ │ ├── krnf │ │ │ │ ├── _constraints │ │ │ │ ├── kernel-docs.spec │ │ │ │ ├── kernel-source.spec │ │ │ │ ├── source-timestamp │ │ │ │ ├── config.sh │ │ │ │ ├── kernel-syms.spec │ │ │ │ ├── dtb-aarch64.spec │ │ │ │ ├── dtb-riscv64.spec │ │ │ │ ├── dtb-armv6l.spec │ │ │ │ ├── dtb-armv7l.spec │ │ │ │ ├── kernel-obs-qa.spec │ │ │ │ └── kernel-obs-build.spec │ │ │ │ ├── kgr │ │ │ │ ├── config.sh │ │ │ │ └── kernel-livepatch-SLE15_Update_7.spec │ │ │ │ └── klp │ │ │ │ ├── config.sh │ │ │ │ └── kernel-livepatch-SLE15-SP7-RT_Update_0.spec │ │ ├── api │ │ │ ├── content │ │ │ │ ├── update │ │ │ │ │ ├── outdated │ │ │ │ │ ├── added │ │ │ │ │ ├── up-to-date │ │ │ │ │ ├── added.tar.bz2 │ │ │ │ │ ├── outdated.tar.bz2 │ │ │ │ │ └── up-to-date.tar.bz2 │ │ │ │ └── reference │ │ │ │ │ ├── outdated │ │ │ │ │ ├── to_be_removed │ │ │ │ │ ├── up-to-date │ │ │ │ │ ├── outdated.tar.bz2 │ │ │ │ │ ├── up-to-date.tar.bz2 │ │ │ │ │ └── to_be_removed.tar.bz2 │ │ │ ├── testkey.pub │ │ │ ├── testkey │ │ │ ├── certificate.pem │ │ │ ├── certkey.pem │ │ │ ├── certificate12.pem │ │ │ ├── obsapi_pkgrepo_nonexistent_pkg │ │ │ ├── gitattr_up_to_date │ │ │ └── gitattr_nonexistent_repo │ │ ├── git_sort.yaml │ │ ├── Docker │ │ │ ├── sle12-sp5.Dockerfile │ │ │ ├── sle15-sp4.Dockerfile │ │ │ ├── sle15-sp6.Dockerfile │ │ │ └── opensuse-tumbleweed.Dockerfile │ │ ├── run_all │ │ └── test_linux_git.py │ ├── git_sort │ │ ├── __init__.py │ │ └── pygit2_wrapper.py │ ├── suse_git │ │ ├── __init__.py │ │ └── exc.py │ ├── test-all │ ├── bugzilla │ │ ├── apiversion.py │ │ ├── rhbugzilla.py │ │ ├── _util.py │ │ ├── __init__.py │ │ ├── exceptions.py │ │ └── oldclasses.py │ ├── bugzilla-cli │ ├── www_authenticate │ │ ├── setup.py │ │ ├── LICENSE │ │ ├── README.rst │ │ └── tests.py │ ├── bugzilla-list-user-bugs │ ├── cve2bsc │ ├── ckf-count-user-bugs │ ├── git-package-submit │ ├── sequence-insert │ ├── check-patchhdr │ ├── qgoto │ ├── series_conf │ └── qdupcheck ├── tar-up.sh ├── cve_tools │ ├── .gitignore │ ├── dispatch-cves │ ├── kss-dashboard │ ├── add-missing-reference │ ├── cve2metadata.sh │ ├── README.md │ └── decorate-c-b-s.sh ├── bugzilla-cli ├── check-patchhdr ├── refresh_patch.sh ├── run_oldconfig.sh ├── sequence-patch.sh ├── series_insert ├── series_sort ├── series_sort.py ├── bs-upload-kernel ├── series_merge_tool ├── bugzilla-list-user-bugs ├── linux.keyring ├── deprecated-python ├── deprecated-shell ├── ld-version ├── grep_branches.sh ├── check-patch-blacklist ├── linux_git.sh ├── merging │ ├── README.md │ └── references ├── bugzilla-resolve ├── stop-sync ├── refresh_patch ├── config-merge ├── stablecmp ├── check-patch-released ├── check-conf ├── cvs-wd-timestamp ├── arch-symbols ├── git-commit-msg ├── check-embargoed-bugz ├── check-my-prs ├── git-fixes ├── check-patch-dirs ├── sort_supported ├── patch-tag-template ├── config-diff ├── renamepatches ├── check-cvs-add ├── breaker_age └── patch-tags-from-git ├── sysctl ├── i386 │ ├── pae │ └── arch-defaults ├── x86_64 │ ├── default │ └── arch-defaults ├── armv6hl │ └── arch-defaults ├── armv7hl │ └── arch-defaults ├── arm64 │ └── arch-defaults ├── ppc64 │ └── arch-defaults ├── s390x │ └── arch-defaults ├── ppc64le │ └── arch-defaults └── defaults ├── config ├── armv7hl │ └── vanilla ├── i386 │ └── vanilla ├── ppc64le │ └── vanilla ├── arm64 │ ├── vanilla │ └── 64kb ├── riscv64 │ └── vanilla ├── armv6hl │ └── vanilla ├── x86_64 │ ├── vanilla │ └── syzkaller └── s390x │ └── vanilla ├── run-tests ├── doc └── README.KSYMS ├── .gitignore ├── kabi └── severities ├── README.BRANCH ├── patches.suse ├── s390-export-symbols-for-crash-kmp.patch ├── rpm-kernel-config ├── build_bug.h-add-kabi-assert.patch ├── 0004-efi-Lock-down-the-kernel-at-the-integrity-level-if-b.patch ├── 0001-initcall_blacklist-Does-not-allow-kernel_lockdown-be.patch ├── add-product-identifying-information-to-vmcoreinfo.patch ├── btrfs-provide-super_operations-get_inode_dev ├── panic-do-not-print-uninitialized-taint_flags.patch ├── 0001-regulator-mt6360-Add-OF-match-table.patch ├── crypto-hkdf-skip-TVs-with-unapproved-salt-lengths-in.patch ├── arm64-lock-down-kernel-in-secure-boot-mode.patch ├── livepatch-dump-ipa-clones.patch ├── 0002-regulator-mt6358-Add-OF-match-table.patch ├── 0003-regulator-mt6323-Add-OF-match-table.patch ├── b43-missing-firmware-info.patch ├── wifi-iwlwifi-Add-missing-firmware-info-for-bz-b0-mod.patch ├── firmware-qemu_fw_cfg-Do-not-hard-depend-on-CONFIG_HA.patch ├── Input-elan_i2c-Add-deny-list-for-Lenovo-Yoga-Slim-7.patch ├── 0003-efi-Lock-down-the-kernel-if-booted-in-secure-boot-mode.patch └── kernel-add-release-status-to-kernel-build.patch ├── blacklist.conf ├── patches.rpmify ├── BTF-Don-t-break-ABI-when-debuginfo-is-disabled.patch ├── Revert-kconfig-only-write-CONFIG_FOO-is-not-set-for-.patch ├── btf-pahole-j1-option.patch └── usrmerge-Adjust-module-path-in-the-kernel-sources.patch ├── config.conf └── README.blacklist /rpm/guards: -------------------------------------------------------------------------------- 1 | ../scripts/guards -------------------------------------------------------------------------------- /scripts/git_sort/qcp: -------------------------------------------------------------------------------- 1 | ../python/qcp -------------------------------------------------------------------------------- /scripts/python/tests/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /scripts/tar-up.sh: -------------------------------------------------------------------------------- 1 | deprecated-shell -------------------------------------------------------------------------------- /scripts/cve_tools/.gitignore: -------------------------------------------------------------------------------- 1 | *.dat 2 | -------------------------------------------------------------------------------- /scripts/git_sort/qgoto: -------------------------------------------------------------------------------- 1 | ../python/qgoto -------------------------------------------------------------------------------- /scripts/python/git_sort/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /scripts/python/suse_git/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /scripts/python/tests/kutil/dir/a file: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /rpm/arch-symbols: -------------------------------------------------------------------------------- 1 | ../scripts/arch-symbols -------------------------------------------------------------------------------- /scripts/bugzilla-cli: -------------------------------------------------------------------------------- 1 | python/bugzilla-cli -------------------------------------------------------------------------------- /scripts/check-patchhdr: -------------------------------------------------------------------------------- 1 | python/check-patchhdr -------------------------------------------------------------------------------- /scripts/python/tests/kutil/dir/another file: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /scripts/refresh_patch.sh: -------------------------------------------------------------------------------- 1 | deprecated-shell -------------------------------------------------------------------------------- /scripts/run_oldconfig.sh: -------------------------------------------------------------------------------- 1 | deprecated-shell -------------------------------------------------------------------------------- /scripts/sequence-patch.sh: -------------------------------------------------------------------------------- 1 | deprecated-shell -------------------------------------------------------------------------------- /scripts/series_insert: -------------------------------------------------------------------------------- 1 | git_sort/series_insert -------------------------------------------------------------------------------- /scripts/series_sort: -------------------------------------------------------------------------------- 1 | git_sort/series_sort -------------------------------------------------------------------------------- /scripts/series_sort.py: -------------------------------------------------------------------------------- 1 | deprecated-python -------------------------------------------------------------------------------- /scripts/bs-upload-kernel: -------------------------------------------------------------------------------- 1 | python/bs-upload-kernel -------------------------------------------------------------------------------- /scripts/git_sort/merge_tool.py: -------------------------------------------------------------------------------- 1 | series_merge_tool -------------------------------------------------------------------------------- /scripts/git_sort/qdupcheck: -------------------------------------------------------------------------------- 1 | ../python/qdupcheck -------------------------------------------------------------------------------- /scripts/python/tests/kutil/dir/.a hidden file: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /scripts/python/tests/kutil/rpm/krn/_constraints: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /scripts/python/tests/kutil/rpm/krna/_constraints: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /scripts/python/tests/kutil/rpm/krnf/_constraints: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /scripts/git_sort/series_conf: -------------------------------------------------------------------------------- 1 | ../python/series_conf -------------------------------------------------------------------------------- /scripts/git_sort/series_insert: -------------------------------------------------------------------------------- 1 | ../python/series_insert -------------------------------------------------------------------------------- /scripts/git_sort/series_insert.py: -------------------------------------------------------------------------------- 1 | ../deprecated-python -------------------------------------------------------------------------------- /scripts/git_sort/series_sort: -------------------------------------------------------------------------------- 1 | ../python/series_sort -------------------------------------------------------------------------------- /scripts/git_sort/series_sort.py: -------------------------------------------------------------------------------- 1 | ../deprecated-python -------------------------------------------------------------------------------- /scripts/git_sort/update_clone: -------------------------------------------------------------------------------- 1 | ../python/update_clone -------------------------------------------------------------------------------- /scripts/git_sort/update_clone.py: -------------------------------------------------------------------------------- 1 | ../deprecated-python -------------------------------------------------------------------------------- /scripts/series_merge_tool: -------------------------------------------------------------------------------- 1 | git_sort/series_merge_tool -------------------------------------------------------------------------------- /scripts/cve_tools/dispatch-cves: -------------------------------------------------------------------------------- 1 | ../python/dispatch-cves -------------------------------------------------------------------------------- /scripts/cve_tools/kss-dashboard: -------------------------------------------------------------------------------- 1 | ../python/kss-dashboard -------------------------------------------------------------------------------- /scripts/git_sort/git_sort_debug: -------------------------------------------------------------------------------- 1 | ../python/git_sort_debug -------------------------------------------------------------------------------- /scripts/git_sort/quiltrc.qf1: -------------------------------------------------------------------------------- 1 | QUILT_PATCHES_PREFIX=yes 2 | -------------------------------------------------------------------------------- /scripts/git_sort/sequence-insert: -------------------------------------------------------------------------------- 1 | ../python/sequence-insert -------------------------------------------------------------------------------- /scripts/git_sort/sequence-insert.py: -------------------------------------------------------------------------------- 1 | ../deprecated-python -------------------------------------------------------------------------------- /scripts/bugzilla-list-user-bugs: -------------------------------------------------------------------------------- 1 | python/bugzilla-list-user-bugs -------------------------------------------------------------------------------- /scripts/git_sort/git_sort.yaml: -------------------------------------------------------------------------------- 1 | ../python/git_sort/git_sort.yaml -------------------------------------------------------------------------------- /scripts/git_sort/series_merge_tool: -------------------------------------------------------------------------------- 1 | ../python/series_merge_tool -------------------------------------------------------------------------------- /scripts/python/tests/api/content/update/outdated: -------------------------------------------------------------------------------- 1 | Some new text 2 | -------------------------------------------------------------------------------- /scripts/python/tests/kutil/dir/a directory/a file in a directory: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /scripts/python/tests/api/content/reference/outdated: -------------------------------------------------------------------------------- 1 | Some old text 2 | -------------------------------------------------------------------------------- /scripts/python/tests/api/content/reference/to_be_removed: -------------------------------------------------------------------------------- 1 | Some text 2 | -------------------------------------------------------------------------------- /scripts/python/tests/api/content/reference/up-to-date: -------------------------------------------------------------------------------- 1 | Some other text 2 | -------------------------------------------------------------------------------- /scripts/python/tests/api/content/update/added: -------------------------------------------------------------------------------- 1 | Some additional text 2 | -------------------------------------------------------------------------------- /scripts/python/tests/api/content/update/up-to-date: -------------------------------------------------------------------------------- 1 | Some other text 2 | -------------------------------------------------------------------------------- /scripts/python/tests/kutil/dir/a directory/.a hidden file in a directory: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /scripts/python/tests/kutil/dir/a directory/another file in a directory: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /scripts/python/tests/kutil/dir/another directory/a file in another directory: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /scripts/python/tests/kutil/rpm/kgr/config.sh: -------------------------------------------------------------------------------- 1 | IBS_PROJECT=SUSE:Maintenance:9216 2 | -------------------------------------------------------------------------------- /rpm/kernel-source.changes.old: -------------------------------------------------------------------------------- 1 | last commit: 1b6adc0cf5816ba802664c47dbb348f6426d9770 2 | -------------------------------------------------------------------------------- /scripts/linux.keyring: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SUSE/kernel-source/HEAD/scripts/linux.keyring -------------------------------------------------------------------------------- /scripts/python/tests/kutil/rpm/klp/config.sh: -------------------------------------------------------------------------------- 1 | IBS_PROJECT=SUSE:SLE-15-SP7:Update:Products:SLERT 2 | -------------------------------------------------------------------------------- /scripts/python/tests/kutil/rpm/krn/kernel-docs.spec: -------------------------------------------------------------------------------- 1 | # 2 | # spec file for package kernel-docs 3 | # 4 | -------------------------------------------------------------------------------- /scripts/python/tests/kutil/rpm/kgr/kernel-livepatch-SLE15_Update_7.spec: -------------------------------------------------------------------------------- 1 | ExclusiveArch: ppc64le x86_64 2 | -------------------------------------------------------------------------------- /scripts/python/tests/kutil/rpm/klp/kernel-livepatch-SLE15-SP7-RT_Update_0.spec: -------------------------------------------------------------------------------- 1 | ExclusiveArch: x86_64 2 | -------------------------------------------------------------------------------- /scripts/python/tests/kutil/rpm/krn/kernel-source.spec: -------------------------------------------------------------------------------- 1 | # 2 | # spec file for package kernel-source 3 | # 4 | -------------------------------------------------------------------------------- /scripts/python/tests/kutil/rpm/krnf/kernel-docs.spec: -------------------------------------------------------------------------------- 1 | # 2 | # spec file for package kernel-docs 3 | # 4 | -------------------------------------------------------------------------------- /scripts/python/tests/kutil/rpm/krnf/kernel-source.spec: -------------------------------------------------------------------------------- 1 | # 2 | # spec file for package kernel-source 3 | # 4 | -------------------------------------------------------------------------------- /scripts/python/test-all: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | dir="$(dirname $0)" 3 | cd "$dir" 4 | python3 -m unittest discover -v "$@" 5 | -------------------------------------------------------------------------------- /scripts/python/tests/kutil/rpm/krna/kernel-syms-azure.spec: -------------------------------------------------------------------------------- 1 | # 2 | # spec file for package kernel-syms-azure 3 | # 4 | -------------------------------------------------------------------------------- /scripts/python/tests/kutil/rpm/krna/kernel-source-azure.spec: -------------------------------------------------------------------------------- 1 | # 2 | # spec file for package kernel-source-azure 3 | # 4 | -------------------------------------------------------------------------------- /scripts/python/tests/api/testkey.pub: -------------------------------------------------------------------------------- 1 | ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHu1o/bj3VBPJ6g9pjyfEfbWS2dloMKo9TE+7CZRYSY+ hramrach@kitsune 2 | -------------------------------------------------------------------------------- /sysctl/i386/pae: -------------------------------------------------------------------------------- 1 | # The desktop workload is sensitive to latency, so start writeout earlier 2 | # (bnc#552883) 3 | vm.dirty_ratio=20 4 | -------------------------------------------------------------------------------- /sysctl/x86_64/default: -------------------------------------------------------------------------------- 1 | # The desktop workload is sensitive to latency, so start writeout earlier 2 | # (bnc#552883) 3 | vm.dirty_ratio=20 4 | -------------------------------------------------------------------------------- /config/armv7hl/vanilla: -------------------------------------------------------------------------------- 1 | CONFIG_LOCALVERSION="-vanilla" 2 | CONFIG_MODULES=y 3 | CONFIG_MODULE_SIG=y 4 | CONFIG_MODULE_SIG_HASH="sha256" 5 | CONFIG_EFI_STUB=y 6 | -------------------------------------------------------------------------------- /scripts/python/tests/api/content/update/added.tar.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SUSE/kernel-source/HEAD/scripts/python/tests/api/content/update/added.tar.bz2 -------------------------------------------------------------------------------- /scripts/python/tests/api/content/update/outdated.tar.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SUSE/kernel-source/HEAD/scripts/python/tests/api/content/update/outdated.tar.bz2 -------------------------------------------------------------------------------- /scripts/python/tests/kutil/rpm/krn/source-timestamp: -------------------------------------------------------------------------------- 1 | 2025-10-21 18:38:20 +0000 2 | GIT Revision: 198b4a41749350fc6fe0155e1f8d5631c89f1e28 3 | GIT Branch: SLE15-SP6 4 | -------------------------------------------------------------------------------- /scripts/python/tests/kutil/rpm/krnf/source-timestamp: -------------------------------------------------------------------------------- 1 | 2025-10-22 10:54:52 +0000 2 | GIT Revision: 918ee0494caad51c7895f5b9b6b7cfd78acad06a 3 | GIT Branch: master 4 | -------------------------------------------------------------------------------- /scripts/python/tests/api/content/reference/outdated.tar.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SUSE/kernel-source/HEAD/scripts/python/tests/api/content/reference/outdated.tar.bz2 -------------------------------------------------------------------------------- /scripts/python/tests/api/content/update/up-to-date.tar.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SUSE/kernel-source/HEAD/scripts/python/tests/api/content/update/up-to-date.tar.bz2 -------------------------------------------------------------------------------- /rpm/obsolete-kmps: -------------------------------------------------------------------------------- 1 | # List of KMPs integrated into the kernel 2 | # These KMPs shoud be removed when the kernel is installed 3 | # 4 | -------------------------------------------------------------------------------- /scripts/python/tests/api/content/reference/up-to-date.tar.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SUSE/kernel-source/HEAD/scripts/python/tests/api/content/reference/up-to-date.tar.bz2 -------------------------------------------------------------------------------- /run-tests: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | result=0 4 | 5 | scripts/python/tests/run_all 6 | ret=$? 7 | if ! [ $ret -eq 0 ] ; then 8 | result=$ret 9 | fi 10 | 11 | exit $result 12 | -------------------------------------------------------------------------------- /scripts/python/tests/api/content/reference/to_be_removed.tar.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SUSE/kernel-source/HEAD/scripts/python/tests/api/content/reference/to_be_removed.tar.bz2 -------------------------------------------------------------------------------- /config/i386/vanilla: -------------------------------------------------------------------------------- 1 | CONFIG_LOCALVERSION="-vanilla" 2 | CONFIG_MODULES=y 3 | # CONFIG_MODULE_SIG is not set 4 | CONFIG_MODULE_SIG_HASH="sha256" 5 | CONFIG_EFI_STUB=y 6 | CONFIG_PREEMPT_DYNAMIC=y 7 | -------------------------------------------------------------------------------- /sysctl/armv6hl/arch-defaults: -------------------------------------------------------------------------------- 1 | # Increase defaults for IPC (bnc#146656) (32-bit, 4k pages) 2 | kernel.shmmax = 0xffffffff 3 | # shmall = shmmax/page_size * shmmni/16 4 | kernel.shmall = 0x0fffffff 5 | -------------------------------------------------------------------------------- /sysctl/armv7hl/arch-defaults: -------------------------------------------------------------------------------- 1 | # Increase defaults for IPC (bnc#146656) (32-bit, 4k pages) 2 | kernel.shmmax = 0xffffffff 3 | # shmall = shmmax/page_size * shmmni/16 4 | kernel.shmall = 0x0fffffff 5 | -------------------------------------------------------------------------------- /sysctl/i386/arch-defaults: -------------------------------------------------------------------------------- 1 | # Increase defaults for IPC (bnc#146656) (32-bit, 4k pages) 2 | kernel.shmmax = 0xffffffff 3 | # shmall = shmmax/page_size * shmmni/16 4 | kernel.shmall = 0x0fffffff 5 | -------------------------------------------------------------------------------- /config/ppc64le/vanilla: -------------------------------------------------------------------------------- 1 | CONFIG_LOCALVERSION="-vanilla" 2 | CONFIG_MODULES=y 3 | CONFIG_MODULE_SIG=y 4 | CONFIG_MODULE_SIG_HASH="sha256" 5 | CONFIG_DEBUG_INFO_BTF_MODULES=y 6 | CONFIG_PREEMPT_DYNAMIC=y 7 | -------------------------------------------------------------------------------- /scripts/deprecated-python: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | self="$0" 4 | 5 | target="$(dirname $0)/$(basename $0 .py)" 6 | 7 | echo "$0 is deprecated, use $target please" >&2 8 | 9 | exec "$target" "$@" 10 | -------------------------------------------------------------------------------- /scripts/deprecated-shell: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | self="$0" 4 | 5 | target="$(dirname $0)/$(basename $0 .sh)" 6 | 7 | echo "$0 is deprecated, use $target please" >&2 8 | 9 | exec "$target" "$@" 10 | -------------------------------------------------------------------------------- /sysctl/arm64/arch-defaults: -------------------------------------------------------------------------------- 1 | # Increase defaults for IPC (bnc#146656) (64-bit, 4k pages) 2 | kernel.shmmax = 0xffffffffffffffff 3 | # SHMALL = SHMMAX/PAGE_SIZE*(SHMMNI/16) 4 | kernel.shmall = 0x0fffffffffffff00 5 | -------------------------------------------------------------------------------- /sysctl/ppc64/arch-defaults: -------------------------------------------------------------------------------- 1 | # Increase defaults for IPC (bnc#146656) (64-bit, 4k pages) 2 | kernel.shmmax = 0xffffffffffffffff 3 | # SHMALL = SHMMAX/PAGE_SIZE*(SHMMNI/16) 4 | kernel.shmall = 0x0fffffffffffff00 5 | -------------------------------------------------------------------------------- /sysctl/s390x/arch-defaults: -------------------------------------------------------------------------------- 1 | # Increase defaults for IPC (bnc#146656) (64-bit, 4k pages) 2 | kernel.shmmax = 0xffffffffffffffff 3 | # SHMALL = SHMMAX/PAGE_SIZE*(SHMMNI/16) 4 | kernel.shmall = 0x0fffffffffffff00 5 | -------------------------------------------------------------------------------- /sysctl/x86_64/arch-defaults: -------------------------------------------------------------------------------- 1 | # Increase defaults for IPC (bnc#146656) (64-bit, 4k pages) 2 | kernel.shmmax = 0xffffffffffffffff 3 | # SHMALL = SHMMAX/PAGE_SIZE*(SHMMNI/16) 4 | kernel.shmall = 0x0fffffffffffff00 5 | -------------------------------------------------------------------------------- /sysctl/ppc64le/arch-defaults: -------------------------------------------------------------------------------- 1 | # Increase defaults for IPC (bnc#146656) (64-bit, 4k pages) 2 | kernel.shmmax = 0xffffffffffffffff 3 | # SHMALL = SHMMAX/PAGE_SIZE*(SHMMNI/16) 4 | kernel.shmall = 0x0fffffffffffff00 5 | -------------------------------------------------------------------------------- /config/arm64/vanilla: -------------------------------------------------------------------------------- 1 | CONFIG_LOCALVERSION="-vanilla" 2 | CONFIG_MODULES=y 3 | CONFIG_MODULE_SIG=y 4 | CONFIG_MODULE_SIG_HASH="sha256" 5 | CONFIG_EFI_STUB=y 6 | CONFIG_DEBUG_INFO_BTF_MODULES=y 7 | CONFIG_PREEMPT_DYNAMIC=y 8 | -------------------------------------------------------------------------------- /config/riscv64/vanilla: -------------------------------------------------------------------------------- 1 | CONFIG_LOCALVERSION="-vanilla" 2 | CONFIG_MODULES=y 3 | CONFIG_MODULE_SIG=y 4 | CONFIG_MODULE_SIG_HASH="sha256" 5 | CONFIG_EFI_STUB=y 6 | CONFIG_DEBUG_INFO_BTF_MODULES=y 7 | CONFIG_PREEMPT_DYNAMIC=y 8 | -------------------------------------------------------------------------------- /config/armv6hl/vanilla: -------------------------------------------------------------------------------- 1 | CONFIG_LOCALVERSION="-vanilla" 2 | CONFIG_TICK_CPU_ACCOUNTING=y 3 | # CONFIG_VIRT_CPU_ACCOUNTING_GEN is not set 4 | CONFIG_MODULES=y 5 | CONFIG_MODULE_SIG=y 6 | CONFIG_MODULE_SIG_HASH="sha256" 7 | CONFIG_EFI_STUB=y 8 | -------------------------------------------------------------------------------- /scripts/python/bugzilla/apiversion.py: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2014 Red Hat Inc. 3 | # 4 | # This work is licensed under the GNU GPLv2 or later. 5 | # See the COPYING file in the top-level directory. 6 | 7 | version = "3.2.0" 8 | __version__ = version 9 | -------------------------------------------------------------------------------- /config/x86_64/vanilla: -------------------------------------------------------------------------------- 1 | CONFIG_LOCALVERSION="-vanilla" 2 | CONFIG_PER_VMA_LOCK_STATS=y 3 | CONFIG_MODULES=y 4 | CONFIG_MODULE_SIG=y 5 | CONFIG_MODULE_SIG_HASH="sha256" 6 | CONFIG_EFI_STUB=y 7 | CONFIG_DEBUG_INFO_BTF_MODULES=y 8 | CONFIG_PREEMPT_DYNAMIC=y 9 | -------------------------------------------------------------------------------- /sysctl/defaults: -------------------------------------------------------------------------------- 1 | # Disable the hung task timer by default. (bnc#552820) 2 | kernel.hung_task_timeout_secs = 0 3 | 4 | # Increase defaults for IPC (bnc#146656) 5 | kernel.msgmax = 65536 6 | kernel.msgmnb = 65536 7 | 8 | # Some Steam Play games need more than 64k (bsc#1214445) 9 | vm.max_map_count = 1048576 10 | -------------------------------------------------------------------------------- /scripts/ld-version: -------------------------------------------------------------------------------- 1 | #!/usr/bin/awk -f 2 | # SPDX-License-Identifier: GPL-2.0 3 | # extract linker version number from stdin and turn into single number 4 | { 5 | gsub(".*\\)", ""); 6 | gsub(".*version ", ""); 7 | gsub("-.*", ""); 8 | split($1,a, "."); 9 | print a[1]*100000000 + a[2]*1000000 + a[3]*10000; 10 | exit 11 | } 12 | -------------------------------------------------------------------------------- /scripts/python/bugzilla/rhbugzilla.py: -------------------------------------------------------------------------------- 1 | # This work is licensed under the GNU GPLv2 or later. 2 | # See the COPYING file in the top-level directory. 3 | 4 | # This class needs to live in rhbugzilla.py to preserve historical 5 | # 'bugzilla.rhbugzilla' import compat 6 | 7 | from .oldclasses import RHBugzilla # pylint: disable=unused-import 8 | -------------------------------------------------------------------------------- /rpm/modflist: -------------------------------------------------------------------------------- 1 | #!/bin/sh -e 2 | flist=$1 3 | modules=$2 4 | output=$3 5 | mod_builtin=$4 6 | 7 | while read MOD ; do 8 | [ -n "$MOD" ] || continue 9 | cat $flist | grep -E "/$MOD[.]ko([.]xz|[.]gz|[.]zst)?\$" >> $output || { grep -q /$MOD[.]ko\$ $mod_builtin && echo Module $MOD built-in ;} || echo Module $MOD missing 10 | done < $modules 11 | -------------------------------------------------------------------------------- /scripts/python/tests/git_sort.yaml: -------------------------------------------------------------------------------- 1 | - ["torvalds/linux.git"] 2 | - ["netdev/net.git"] 3 | - ["davem/net.git"] 4 | - ["netdev/net-next.git"] 5 | - ["davem/net-next.git"] 6 | - ["rdma/rdma.git", "for-rc"] 7 | - ["rdma/rdma.git", "for-next"] 8 | - ["dledford/rdma.git", "k.o/for-next"] 9 | - ["netfilter/nf.git"] 10 | - ["netfilter/nf-next.git"] 11 | -------------------------------------------------------------------------------- /rpm/check-module-license: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | rc=0 4 | for file in $(find "$@" -name '*.ko' -o -name '*.ko.xz' \ 5 | -o -name '*.ko.gz' -o -name '*.ko.zst'); do 6 | l=$(/sbin/modinfo -F license "$file") 7 | if [ -z "$l" ]; then 8 | echo "ERROR: No license is included for module ${file##*/lib/modules/}" 9 | rc=1 10 | fi 11 | done 12 | 13 | exit $rc 14 | -------------------------------------------------------------------------------- /doc/README.KSYMS: -------------------------------------------------------------------------------- 1 | This file is a place holder for the kernel-syms{,-rt} package. It is used 2 | to group build dependencies for all kernel flavors. 3 | 4 | The KMP build process will build KMPs against all installed kernel flavors 5 | automatically. If you don't need to build against other flavors than the 6 | ones you've already installed - it is safe to uninstall this package. 7 | -------------------------------------------------------------------------------- /scripts/python/tests/Docker/sle12-sp5.Dockerfile: -------------------------------------------------------------------------------- 1 | FROM registry.opensuse.org/kernel/tools/images/sle_12_sp5/kernel-scripts:latest AS base 2 | 3 | RUN git config --global user.email "you@example.com" 4 | RUN git config --global user.name "Your Name" 5 | 6 | FROM base 7 | 8 | VOLUME /scripts 9 | 10 | WORKDIR /scripts/python 11 | 12 | CMD python3 -m unittest discover -v 13 | -------------------------------------------------------------------------------- /scripts/python/tests/Docker/sle15-sp4.Dockerfile: -------------------------------------------------------------------------------- 1 | FROM registry.opensuse.org/kernel/tools/images/sle_15_sp4/kernel-scripts:latest AS base 2 | 3 | RUN git config --global user.email "you@example.com" 4 | RUN git config --global user.name "Your Name" 5 | 6 | FROM base 7 | 8 | VOLUME /scripts 9 | 10 | WORKDIR /scripts/python 11 | 12 | CMD python3 -m unittest discover -v 13 | -------------------------------------------------------------------------------- /scripts/python/tests/Docker/sle15-sp6.Dockerfile: -------------------------------------------------------------------------------- 1 | FROM registry.opensuse.org/kernel/tools/images/sle_15_sp6/kernel-scripts:latest AS base 2 | 3 | RUN git config --global user.email "you@example.com" 4 | RUN git config --global user.name "Your Name" 5 | 6 | FROM base 7 | 8 | VOLUME /scripts 9 | 10 | WORKDIR /scripts/python 11 | 12 | CMD python3 -m unittest discover -v 13 | -------------------------------------------------------------------------------- /scripts/python/tests/Docker/opensuse-tumbleweed.Dockerfile: -------------------------------------------------------------------------------- 1 | FROM registry.opensuse.org/kernel/tools/images/opensuse_factory/kernel-scripts:latest AS base 2 | 3 | RUN git config --global user.email "you@example.com" 4 | RUN git config --global user.name "Your Name" 5 | 6 | FROM base 7 | 8 | VOLUME /scripts 9 | 10 | WORKDIR /scripts/python 11 | 12 | CMD python3 -m unittest discover -v 13 | -------------------------------------------------------------------------------- /config/s390x/vanilla: -------------------------------------------------------------------------------- 1 | CONFIG_DEFERRED_STRUCT_PAGE_INIT=y 2 | # CONFIG_DM_UNSTRIPED is not set 3 | # CONFIG_IP6_NF_MATCH_SRH is not set 4 | CONFIG_LOCALVERSION="-vanilla" 5 | # CONFIG_NF_FLOW_TABLE is not set 6 | # CONFIG_RUNTIME_TESTING_MENU is not set 7 | CONFIG_MODULES=y 8 | CONFIG_MODULE_SIG=y 9 | CONFIG_MODULE_SIG_HASH="sha256" 10 | CONFIG_DEBUG_INFO_BTF_MODULES=y 11 | CONFIG_PREEMPT_DYNAMIC=y 12 | -------------------------------------------------------------------------------- /scripts/python/bugzilla/_util.py: -------------------------------------------------------------------------------- 1 | # This work is licensed under the GNU GPLv2 or later. 2 | # See the COPYING file in the top-level directory. 3 | 4 | 5 | def listify(val): 6 | """Ensure that value is either None or a list, converting single values 7 | into 1-element lists""" 8 | if val is None: 9 | return val 10 | if isinstance(val, list): 11 | return val 12 | return [val] 13 | -------------------------------------------------------------------------------- /scripts/python/bugzilla-cli: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python3 2 | 3 | # This is a small wrapper script to simplify running the 'bugzilla' 4 | # cli tool from a git checkout 5 | 6 | import sys 7 | import os 8 | import os.path 9 | 10 | from bugzilla import _cli 11 | if _cli.DEFAULT_BZ != "https://apibugzilla.suse.com": 12 | raise RuntimeError("Use of this script requires the SUSE version of python-bugzilla.") 13 | 14 | _cli.main() 15 | -------------------------------------------------------------------------------- /scripts/grep_branches.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # git grep over all branches defined by branches.conf 3 | # 4 | # all given arguments will be given as git grep arguments 5 | . $(dirname "$0")/common-functions 6 | 7 | grep_branch() 8 | { 9 | local branch=$1 10 | shift 11 | 12 | git --no-pager grep "$@" origin/$branch 13 | return 0 14 | } 15 | 16 | branches_conf="$(fetch_branches $refresh)" 17 | for_each_build_branch "$branches_conf" grep_branch "$@" 18 | -------------------------------------------------------------------------------- /scripts/python/tests/api/testkey: -------------------------------------------------------------------------------- 1 | -----BEGIN OPENSSH PRIVATE KEY----- 2 | b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtzc2gtZW 3 | QyNTUxOQAAACB7taP2491QTyeoPaY8nxH21ktnZaDCqPUxPuwmUWEmPgAAAJjJ/jtByf47 4 | QQAAAAtzc2gtZWQyNTUxOQAAACB7taP2491QTyeoPaY8nxH21ktnZaDCqPUxPuwmUWEmPg 5 | AAAEAn5Fygr6VyZ/8TlvW8ElqCPKQgETMdyEstdRR1ZcEGk3u1o/bj3VBPJ6g9pjyfEfbW 6 | S2dloMKo9TE+7CZRYSY+AAAAEGhyYW1yYWNoQGtpdHN1bmUBAgMEBQ== 7 | -----END OPENSSH PRIVATE KEY----- 8 | -------------------------------------------------------------------------------- /rpm/splitflist: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | 3 | package="$1" 4 | present="$2" 5 | ghost="$3" 6 | 7 | missing="" 8 | 9 | rpm -ql --noghost "$package" | while read x ; do 10 | [ -e "$x" -o -L "$x" ] && echo "$x" >> "$present" || echo Missing file "$x" 11 | done 12 | 13 | rpm -q --qf '[%{FILEFLAGS} %{FILENAMES} 0%{FILEMODES:octal} %{FILESIZES} %{FILEMTIMES} %{FILELINKTOS}\n]' $package | while read -a line; do 14 | [ $[line[0]&64] = 64 ] || continue 15 | echo "${line[@]:1}" 16 | done > "$ghost" 17 | -------------------------------------------------------------------------------- /rpm/moddep: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | dependencies=$1 4 | modules=$2 5 | result=$3 6 | 7 | cat $modules | tr ' ' '\n' > $result 8 | echo > $result~ 9 | 10 | while ! diff -q $result~ $result > /dev/null ; do 11 | cp $result $result~ 12 | while read MOD ; do 13 | moddeps="$(grep ^$MOD: $dependencies | sed -e 's/.*://' ||:)" 14 | for DEP in $moddeps ; do 15 | if ! grep -q ^$DEP\$ $result ; then 16 | echo $DEP >> $result 17 | echo $MOD: $DEP 18 | fi 19 | done 20 | done < $result 21 | done 22 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # NOTE! Please use 'git ls-files -i --exclude-standard' 2 | # command after changing this file, to see if there are 3 | # any tracked files which get ignored after the change. 4 | 5 | # Normal rules 6 | *~ 7 | .* 8 | 9 | # git files that we don't want to ignore even it they are dot-files 10 | !.gitignore 11 | !.gitattributes 12 | 13 | # package directories created by scripts/tar-up 14 | kernel-source 15 | kernel-source-rt 16 | 17 | # default scratch area for scripts/sequence-patch 18 | tmp 19 | 20 | *.pyc 21 | -------------------------------------------------------------------------------- /scripts/check-patch-blacklist: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # check-patch-blacklist blacklist patch-filename < patch-content 3 | 4 | test -f "$1" || exit 0 5 | 6 | hash=$(grep -Ei "^(Git|Alt)-commit:[ \t]+[a-f0-9]{40}\>") 7 | if [ -n "$hash" ] ; then 8 | hash=$(echo "${hash#*: }" | head -c 40) 9 | blacklist=$(grep -Ei "^$hash\>" < "$1") 10 | if [ -n "$blacklist" ]; then 11 | echo "Patch $2 12 | blacklisted: $blacklist 13 | 14 | Please remove from blacklist if you really think this patch should be included." 15 | exit 1 16 | fi 17 | fi 18 | -------------------------------------------------------------------------------- /scripts/linux_git.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Determine the location of the mainline linux git repository to use as a 4 | # reference by other scripts. 5 | 6 | gitdir=${LINUX_GIT:-$HOME/linux-2.6} 7 | if ! cd "$gitdir" 2>/dev/null; then 8 | echo "Error: could not change to LINUX_GIT directory" >&2 9 | exit 1 10 | fi 11 | unset GIT_DIR 12 | if ! result=$(git rev-parse --git-dir 2>/dev/null); then 13 | echo "No linux git tree found (please set the \"LINUX_GIT\" environment variable)" >&2 14 | exit 1 15 | fi 16 | readlink -f "$result" 17 | -------------------------------------------------------------------------------- /kabi/severities: -------------------------------------------------------------------------------- 1 | # KABI rules for symbols and modules 2 | # 3 | # A matching line with PASS allows kabi changes for given modules or symbols, 4 | # FAIL causes an error. The first matching line is considered, the default is 5 | # FAIL if no match is found. 6 | # 7 | # A pattern that contains slashes is matched against the module name a given 8 | # symbol is exported from. The special pattern "vmlinux" matches built-in 9 | # symbols. All other patterns match against symbol names. 10 | 11 | drivers/message/fusion/* PASS 12 | drivers/staging/* PASS 13 | 14 | -------------------------------------------------------------------------------- /scripts/merging/README.md: -------------------------------------------------------------------------------- 1 | ## Usage like a mergetool 2 | 3 | [mergetool "patch-references"] 4 | cmd = /path/to/kernel-source/scripts/merging/references $LOCAL $BASE $REMOTE $MERGED 5 | trustExitCode = true 6 | 7 | When you encounter a merge conflict in patch, apply the tool to offending 8 | patchfiles 9 | 10 | git status 11 | ... 12 | both modified: patches.suse/drm-amd-amdgpu-fix-potential-memleak.patch 13 | 14 | git mergetool --tool=patch-references patches.suse/drm-amd-amdgpu-fix-potential-memleak.patch 15 | -------------------------------------------------------------------------------- /scripts/python/www_authenticate/setup.py: -------------------------------------------------------------------------------- 1 | from setuptools import setup 2 | 3 | setup( 4 | name='www-authenticate', 5 | version='0.9.2', 6 | description='Parser for WWW-Authenticate headers.', 7 | long_description=open('README.rst').read(), 8 | author='Alexander Dutton', 9 | author_email='www-authenticate-lib@alexdutton.co.uk', 10 | url='https://github.com/alexsdutton/www-authenticate', 11 | license='BSD', 12 | py_modules=['www_authenticate'], 13 | tests_require=['nose'], 14 | test_suite='nose.collector', 15 | ) 16 | -------------------------------------------------------------------------------- /scripts/bugzilla-resolve: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | resolve_one() { 4 | ${BUGZILLA} modify -l "Automated update: This patch was committed to the kernel git repository. Closing as FIXED." -k FIXED $1 5 | } 6 | 7 | DIR="$(realpath $(dirname $0))" 8 | if [ ! -e "${DIR}/bugzilla-cli" ]; then 9 | echo "Missing ${DIR}/bugzilla-cli" >&2 10 | exit 1 11 | fi 12 | 13 | BUGZILLA="${DIR}/bugzilla-cli --ensure-logged-in" 14 | 15 | if [ "$#" -eq 0 ]; then 16 | echo "usage: $(basename $0) [bug ids ...]" >&2 17 | exit 1 18 | fi 19 | 20 | for bugid in "$@"; do 21 | resolve_one ${bugid} 22 | done 23 | -------------------------------------------------------------------------------- /scripts/python/bugzilla-list-user-bugs: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python3 2 | import bugzilla, sys 3 | from bugzilla._cli import DEFAULT_BZ 4 | 5 | if len(sys.argv) < 2 or len(sys.argv[1]) < 9: 6 | print("no valid bz email provided") 7 | sys.exit(1) 8 | 9 | bzapi = bugzilla.Bugzilla(DEFAULT_BZ) 10 | query = bzapi.build_query(status=['NEW', 'IN_PROGRESS', 'CONFIRMED'], 11 | assigned_to=sys.argv[1], 12 | include_fields=["id", "status", "summary"]) 13 | bugs = bzapi.query(query) 14 | 15 | for b in bugs: 16 | print("{} ; {:<13} ; {}".format(b.id, b.status, b.summary)) 17 | -------------------------------------------------------------------------------- /rpm/old-flavors: -------------------------------------------------------------------------------- 1 | # List of obsolete kernel flavors 2 | # / 3 | 4 | # SLES 11 SP3 / openSUSE 13.1 5 | i386/default trace 3.13 6 | 7 | x86_64/default trace 3.13 8 | x86_64/default bigsmp 3.1 9 | 10 | s390x/default trace 3.13 11 | 12 | # openSUSE 13.2 / Tumbleweed until 2015-10-01 13 | i386/pae desktop 4.3 14 | x86_64/default desktop 4.3 15 | 16 | # SLE 12 SP1 17 | i386/pae xen 4.4 18 | i386/pae ec2 4.4 19 | x86_64/default xen 4.4 20 | x86_64/default ec2 4.4 21 | 22 | x86_64/rt compute 3.13 23 | x86_64/rt_debug compute_debug 3.13 24 | 25 | 26 | -------------------------------------------------------------------------------- /scripts/stop-sync: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | echo "This script disables pushing of the internal git tree to public mirrors. Use it" 4 | echo "if an embargoed security fix has been accidentally pushed to a public branch." 5 | echo "Please describe the reason to cancel mirroring (hit Return to cancel):" 6 | read -p "> " -e 7 | if test -z "$REPLY"; then 8 | echo "No reason given, exiting" 9 | exit 1 10 | fi 11 | 12 | (set -x; curl -d "reason=$REPLY" http://kerncvs.suse.de/stop-sync.cgi) 13 | res=$? 14 | if test $res -ne 0; then 15 | echo "The curl command failed. Please check your vpn config before panicking." 16 | fi 17 | exit $res 18 | 19 | -------------------------------------------------------------------------------- /scripts/python/cve2bsc: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python3 2 | import bugzilla, sys 3 | from bugzilla._cli import DEFAULT_BZ 4 | 5 | def make_unique(alist): 6 | for a in alist: 7 | if a in sys.argv[1:]: 8 | return a 9 | raise Exception() 10 | 11 | try: 12 | bzapi = bugzilla.Bugzilla(DEFAULT_BZ) 13 | result = bzapi.query(bzapi.build_query(alias=sys.argv[1:], include_fields=['bug_id', 'alias'])) 14 | if len(result) < 1: 15 | raise Exception() 16 | t = { make_unique(entry.alias): entry.bug_id for entry in result } 17 | for cve in sys.argv[1:]: 18 | print(t.get(cve, 0)) 19 | except: 20 | print(0) 21 | -------------------------------------------------------------------------------- /rpm/release-projects: -------------------------------------------------------------------------------- 1 | # This file contains regular expressions that define which projects 2 | # are considered part of an official release channel. 3 | # This will mark the kernel as released when it's built. 4 | SUSE:SLFO:[0-9].* 5 | SUSE:ALP:Source:Standard:Core:1.0:Build 6 | SUSE:SLFO:Kernel:1.0:Build 7 | SUSE:SLE-.* 8 | SUSE:Maintenance:.* 9 | openSUSE:[0-9].*:Update 10 | openSUSE:[0-9].*:Update:Test 11 | openSUSE:[0-9].* 12 | openSUSE:Leap 13 | openSUSE:Leap:.* 14 | openSUSE:Maintenance 15 | openSUSE:Maintenance:.* 16 | openSUSE:Evergreen:Maintenance 17 | openSUSE:Evergreen:Maintenance:.* 18 | openSUSE:Tumbleweed 19 | openSUSE:Tumbleweed:.* 20 | openSUSE:Factory 21 | openSUSE:Factory:.* 22 | PTF:.* 23 | -------------------------------------------------------------------------------- /README.BRANCH: -------------------------------------------------------------------------------- 1 | This is the master kernel branch. It will eventually be branched into 2 | the next openSUSE kernel release, but for now it tracks the upstream 3 | kernel.org releases. 4 | 5 | Use this branch at your own risk and please report bugs against 6 | openSUSE Factory. 7 | 8 | The person in charge of this branch is: 9 | Jeff Mahoney 10 | Michal Kubecek 11 | Pedro Falcato 12 | 13 | It is the above person's responsiblity for checking in this kernel to 14 | the build system, anyone else who wishes to do so, needs to get 15 | permission from them first. 16 | 17 | If there are any questions about this branch, please contact the above 18 | mentioned maintainer. 19 | -------------------------------------------------------------------------------- /rpm/kernel-binary-conflicts: -------------------------------------------------------------------------------- 1 | # List of old packages not compatible with this kernel 2 | # The kernel cannot be installed without overriding the dependency 3 | # Listing the packages here means that OBS cannot see them and will start the 4 | # build and only fail at install check. On the other hand the message from 5 | # install check is much more intelligible than 'package has conflict' reported 6 | # by OBS. 7 | # 8 | # 9 | 10 | # dead network if installed on SLES10, otherwise it will work (mostly) 11 | sysfsutils 2.0 12 | apparmor-profiles 2.1.0 13 | apparmor-parser 2.3 14 | # root-lvm only works with newer udevs 15 | udev 118 16 | lvm2 2.02.33 17 | # Interface to hv_kvp_daemon changed 18 | hyper-v 4 19 | -------------------------------------------------------------------------------- /rpm/mergedep: -------------------------------------------------------------------------------- 1 | #!/bin/sh -e 2 | 3 | KREL=$1 4 | 5 | { cat /lib/modules/$KREL/modules.dep ; 6 | cat /lib/modules/$KREL/modules.softdep | grep : | sed -e 's/^softdep //' -e 's/ \(pre\|post\):/:/' ; } \ 7 | | \ 8 | while read l ; do 9 | MOD=$(echo "$l" | sed -e 's/:.*//') 10 | MOD=$(basename $MOD) 11 | case $MOD in 12 | *.ko.xz|*.ko.gz|*.ko.zst) 13 | MOD=${MOD%.*};; 14 | esac 15 | MOD=${MOD%.ko} 16 | DEPS="$(echo "$l" | sed -e 's/.*://')" 17 | moddeps="" 18 | for dep in $DEPS ; do 19 | dep=$(basename $dep) 20 | case $dep in 21 | *.ko.xz|*.ko.gz|*.ko.zst) 22 | dep=${dep%.*};; 23 | esac 24 | dep=${dep%.ko} 25 | moddeps="$moddeps $dep" 26 | done 27 | [ -n "$moddeps" ] && echo $MOD:$moddeps ||: 28 | done 29 | -------------------------------------------------------------------------------- /scripts/refresh_patch: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # keep noise between two revisions of a patch small: 4 | # fixed sort order 5 | # fixed filenames a/b, requires quilt 0.46+ 6 | # no timestamps 7 | # diffstat to get a quick overview what files get modified 8 | # 9 | export LC_ALL=C 10 | export LANG=C 11 | 12 | current="$(quilt top)" 13 | case "$current" in 14 | */patches.kernel.org/*) 15 | echo "Will not touch kernel.org patch '$current' because it will disappear soon." 16 | exit 0 17 | ;; 18 | */patches.xen/*) 19 | # Preserve file order in xen patches 20 | ;; 21 | *) 22 | # Sort files in other patches 23 | opt_sort=--sort 24 | ;; 25 | esac 26 | 27 | quilt refresh \ 28 | -U 3 \ 29 | --no-timestamps \ 30 | --no-index \ 31 | --diffstat \ 32 | $opt_sort \ 33 | --backup \ 34 | -p ab 35 | -------------------------------------------------------------------------------- /scripts/python/www_authenticate/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2015 Alexander Dutton. 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms are permitted 5 | provided that the above copyright notice and this paragraph are 6 | duplicated in all such forms and that any documentation, 7 | advertising materials, and other materials related to such 8 | distribution and use acknowledge that the software was developed 9 | by the Alexander Dutton. The name of the Alexander Dutton may not 10 | be used to endorse or promote products derived from this software 11 | without specific prior written permission. 12 | THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 13 | IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 14 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 15 | -------------------------------------------------------------------------------- /config/arm64/64kb: -------------------------------------------------------------------------------- 1 | CONFIG_ARCH_FORCE_MAX_ORDER=13 2 | CONFIG_ARCH_MMAP_RND_BITS_MAX=29 3 | CONFIG_ARCH_MMAP_RND_BITS_MIN=14 4 | CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MIN=7 5 | # CONFIG_ARCH_WANTS_THP_SWAP is not set 6 | # CONFIG_ARM64_4K_PAGES is not set 7 | CONFIG_ARM64_64K_PAGES=y 8 | CONFIG_ARM64_CONT_PMD_SHIFT=5 9 | CONFIG_ARM64_CONT_PTE_SHIFT=5 10 | # CONFIG_ARM64_PA_BITS_52 is not set 11 | # CONFIG_ARM64_VA_BITS_42 is not set 12 | CONFIG_HAVE_PAGE_SIZE_64KB=y 13 | CONFIG_LOCALVERSION="-64kb" 14 | CONFIG_PAGE_SHIFT=16 15 | CONFIG_PAGE_SIZE_64KB=y 16 | CONFIG_PGTABLE_LEVELS=3 17 | CONFIG_MODULES=y 18 | CONFIG_MODULE_SIG=y 19 | CONFIG_MODULE_SIG_HASH="sha256" 20 | # CONFIG_SUSE_KERNEL_SUPPORTED is not set 21 | CONFIG_EFI_STUB=y 22 | CONFIG_LIVEPATCH_IPA_CLONES=y 23 | CONFIG_DEBUG_INFO_BTF_MODULES=y 24 | CONFIG_PREEMPT_DYNAMIC=y 25 | -------------------------------------------------------------------------------- /patches.suse/s390-export-symbols-for-crash-kmp.patch: -------------------------------------------------------------------------------- 1 | From: Michal Suchanek 2 | Date: Wed, 16 Aug 2017 13:28:58 +0200 3 | Subject: [PATCH] s390: export symbols for crash-kmp 4 | Patch-mainline: Never, needed for an out-of-tree module 5 | References: bsc#1053915 6 | 7 | Export xlate_dev_mem_ptr and unxlate_dev_mem_ptr 8 | 9 | Signed-off-by: Michal Suchanek 10 | --- 11 | arch/s390/mm/maccess.c | 4 ++++ 12 | 1 file changed, 4 insertions(+) 13 | 14 | --- a/arch/s390/mm/maccess.c 15 | +++ b/arch/s390/mm/maccess.c 16 | @@ -249,3 +249,7 @@ void unxlate_dev_mem_ptr(phys_addr_t addr, void *ptr) 17 | if (addr != virt_to_phys(ptr)) 18 | free_page((unsigned long)ptr); 19 | } 20 | + 21 | +/* crash-kmp uses these */ 22 | +EXPORT_SYMBOL_GPL(xlate_dev_mem_ptr); 23 | +EXPORT_SYMBOL_GPL(unxlate_dev_mem_ptr); 24 | -------------------------------------------------------------------------------- /rpm/kernel-source.rpmlintrc: -------------------------------------------------------------------------------- 1 | # These zero-length files are correct: 2 | addFilter("zero-length /usr/src/linux-.*-obj/.*/include/config.*h") 3 | addFilter("zero-length /usr/src/linux-.*-obj/.*/include/config/.*") 4 | # vdsos are special 5 | addFilter("shared-lib-without-dependency-information .*/lib/modules/[1-9].*/vdso/.*") 6 | addFilter("missing-PT_GNU_STACK-section .*/lib/modules/[1-9].*/vdso/.*") 7 | # This is a stale symlink until the kernel-source package is installed: 8 | addFilter("dangling-symlink .*/lib/modules/[1-9].*/source") 9 | # These hidden files are fine: 10 | addFilter("hidden-file-or-dir /usr/src/linux-.*-obj/.*/.config") 11 | addFilter("hidden-file-or-dir /usr/src/linux-.*-obj/.*/.kernel-binary.spec.buildenv") 12 | addFilter("hidden-file-or-dir /boot/\..*\.hmac") 13 | # a precompiled eBPF test 14 | addFilter("arch-independent-package-contains-binary-or-object /usr/src/linux-.*/.*/action-ebpf") 15 | -------------------------------------------------------------------------------- /blacklist.conf: -------------------------------------------------------------------------------- 1 | # 2 | # blacklist.conf 3 | # ============== 4 | # 5 | # In this file the blacklist for the automatic fixes search is 6 | # configured. There are two ways to blacklist potential fixes: 7 | # 8 | # 1) Put a source code path on one line in this file. If a patch 9 | # touches only source code paths that are blacklisted in this 10 | # file, it will be automatically blacklisted too. 11 | # 12 | # 2) Put a full git commit-id on one line in this file. The 13 | # commit-id needs to be a 40 character-long hex string. 14 | # 15 | # As noted above, only one path or commit-id per line is allowed. 16 | # Everything behind a '#' character is considered a comment and ignored. 17 | # 18 | # This file is parsed by the git-suse tool. 19 | 20 | # Blacklisted Paths 21 | # ----------------- 22 | MAINTAINERS # We don't care about upstream MAINTAINERS file 23 | 24 | # Blacklisted Commits 25 | # ------------------- 26 | -------------------------------------------------------------------------------- /patches.suse/rpm-kernel-config: -------------------------------------------------------------------------------- 1 | From: Andreas Gruenbacher 2 | Subject: Add the CONFIG_SUSE_KERNEL option 3 | Patch-mainline: Never, SuSE-specific 4 | References: none 5 | 6 | CONFIG_SUSE_KERNEL is set automatically in our config files. It must 7 | still be added in kconfig so that the option does not disappear 8 | whenever the kernel is reconfigured (e.g., ``make oldconfig''). 9 | 10 | Signed-off-by: Andreas Gruenbacher 11 | --- 12 | Kconfig | 2 ++ 13 | init/Kconfig.suse | 2 ++ 14 | 2 files changed, 4 insertions(+) 15 | create mode 100644 init/Kconfig.suse 16 | 17 | --- a/Kconfig 18 | +++ b/Kconfig 19 | @@ -32,3 +32,5 @@ source "lib/Kconfig.debug" 20 | source "Documentation/Kconfig" 21 | 22 | source "io_uring/Kconfig" 23 | + 24 | +source "init/Kconfig.suse" 25 | --- /dev/null 26 | +++ b/init/Kconfig.suse 27 | @@ -0,0 +1,2 @@ 28 | +config SUSE_KERNEL 29 | + def_bool y 30 | -------------------------------------------------------------------------------- /scripts/git_sort/patch_header.awk: -------------------------------------------------------------------------------- 1 | #!/usr/bin/awk -f 2 | 3 | # Copyright (C) 2018 SUSE LLC 4 | # 5 | # This program is free software; you can redistribute it and/or 6 | # modify it under the terms of the GNU General Public License 7 | # as published by the Free Software Foundation; either version 2 8 | # of the License, or (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with this program; if not, write to the Free Software 17 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 18 | # USA. 19 | 20 | # from quilt's patchfns 21 | 22 | /^(---|\*\*\*|Index:)[ \t][^ \t]|^diff -/ { 23 | exit 24 | } 25 | 26 | { 27 | print 28 | } 29 | 30 | -------------------------------------------------------------------------------- /scripts/python/tests/run_all: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | enable_x() { 4 | local enable=true 5 | while [ $# -gt 0 ] ; do 6 | { [ "$1" = "-q" ] || [ "$1" = "--quiet" ] ; } && enable=false 7 | shift 8 | done 9 | $enable && set -x 10 | } 11 | 12 | enable_x "$@" 13 | 14 | testdir=$(dirname "$(readlink -f "$0")") 15 | 16 | result=0 17 | for release in \ 18 | sle12-sp5 \ 19 | sle15-sp4 \ 20 | sle15-sp6 \ 21 | opensuse-tumbleweed \ 22 | ; do 23 | echo "Building container image for $release..." 24 | docker build "$@" -t gs-test-$release -f $testdir/Docker/$release.Dockerfile --build-arg release=$release $testdir/Docker 25 | ret=$? 26 | if ! [ $ret -eq 0 ] ; then 27 | result=$ret 28 | continue 29 | fi 30 | echo "Running tests in $release:" 31 | docker run --rm --name=gs-test-$release \ 32 | --mount type=bind,source="$testdir/../../",target=/scripts,readonly \ 33 | gs-test-$release 34 | ret=$? 35 | if ! [ $ret -eq 0 ] ; then 36 | result=$ret 37 | continue 38 | fi 39 | done 40 | exit $result 41 | -------------------------------------------------------------------------------- /scripts/git_sort/patch_body.awk: -------------------------------------------------------------------------------- 1 | #!/usr/bin/awk -f 2 | 3 | # Copyright (C) 2018 SUSE LLC 4 | # 5 | # This program is free software; you can redistribute it and/or 6 | # modify it under the terms of the GNU General Public License 7 | # as published by the Free Software Foundation; either version 2 8 | # of the License, or (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with this program; if not, write to the Free Software 17 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 18 | # USA. 19 | 20 | # from quilt's patchfns 21 | 22 | !body && /^(---|\*\*\*|Index:)[ \t][^ \t]|^diff -/ { 23 | body = 1 24 | } 25 | 26 | body { 27 | print 28 | } 29 | -------------------------------------------------------------------------------- /patches.suse/build_bug.h-add-kabi-assert.patch: -------------------------------------------------------------------------------- 1 | From: Michal Koutný 2 | Date: Tue, 26 Aug 2025 17:23:03 +0200 3 | Subject: build_bug.h: Add KABI assert 4 | Patch-mainline: Never, SUSE-specific 5 | References: bsc#1249186 6 | 7 | Add a semantic macro for build checks of constraints for KABI workarounds. 8 | 9 | Suggested-by: Shung-Hsi Yu 10 | Signed-off-by: Michal Koutný 11 | --- 12 | include/linux/build_bug.h | 5 +++++ 13 | 1 file changed, 5 insertions(+) 14 | 15 | --- a/include/linux/build_bug.h 16 | +++ b/include/linux/build_bug.h 17 | @@ -77,6 +77,11 @@ 18 | #define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr) 19 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg) 20 | 21 | +#ifdef CONFIG_SUSE_HAVE_STABLE_KABI 22 | +#define suse_kabi_static_assert(...) static_assert(__VA_ARGS__) 23 | +#else 24 | +#define suse_kabi_static_assert(...) /* empty */ 25 | +#endif 26 | 27 | /* 28 | * Compile time check that field has an expected offset 29 | -------------------------------------------------------------------------------- /scripts/python/suse_git/exc.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python3 2 | # -*- coding: utf-8 -*- 3 | 4 | # Copyright (C) 2018 SUSE LLC 5 | # 6 | # This program is free software; you can redistribute it and/or 7 | # modify it under the terms of the GNU General Public License 8 | # as published by the Free Software Foundation; either version 2 9 | # of the License, or (at your option) any later version. 10 | # 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program; if not, write to the Free Software 18 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 19 | # USA. 20 | 21 | class KSException(BaseException): 22 | pass 23 | 24 | 25 | class KSError(KSException): 26 | pass 27 | 28 | 29 | class KSNotFound(KSError): 30 | pass 31 | -------------------------------------------------------------------------------- /patches.suse/0004-efi-Lock-down-the-kernel-at-the-integrity-level-if-b.patch: -------------------------------------------------------------------------------- 1 | From: "Lee, Chun-Yi" 2 | Date: Tue, 26 Nov 2019 14:40:07 +0800 3 | Subject: efi: Lock down the kernel at the integrity level if booted in secure boot mode 4 | Patch-mainline: Never, SUSE specific tweak 5 | References: jsc#SLE-9870 6 | 7 | The perf and bpf are restricted in confidentiality level, but those 8 | functions are available on SLE. So we use integrity level here. 9 | 10 | Signed-off-by: Lee, Chun-Yi 11 | --- 12 | arch/x86/kernel/setup.c | 2 +- 13 | 1 file changed, 1 insertion(+), 1 deletion(-) 14 | 15 | --- a/arch/x86/kernel/setup.c 16 | +++ b/arch/x86/kernel/setup.c 17 | @@ -1036,7 +1036,7 @@ void __init setup_arch(char **cmdline_p) 18 | 19 | #ifdef CONFIG_LOCK_DOWN_IN_EFI_SECURE_BOOT 20 | if (efi_enabled(EFI_SECURE_BOOT)) 21 | - security_lock_kernel_down("EFI Secure Boot mode", LOCKDOWN_CONFIDENTIALITY_MAX); 22 | + security_lock_kernel_down("EFI Secure Boot mode", LOCKDOWN_INTEGRITY_MAX); 23 | #endif 24 | 25 | reserve_ibft_region(); 26 | -------------------------------------------------------------------------------- /rpm/modules.fips: -------------------------------------------------------------------------------- 1 | ablk_helper 2 | aes-ce-ccm 3 | aes-neon-bs 4 | aes_s390 5 | aes_ti 6 | af_alg 7 | algif_hash 8 | ansi_cprng 9 | anubis 10 | arc4 11 | authenc 12 | blowfish_common 13 | blowfish_generic 14 | blowfish_x86_64 15 | camellia_generic 16 | camellia_x86_64 17 | cast5_generic 18 | cast6_generic 19 | cast_common 20 | cbc 21 | ccm 22 | cfb 23 | cmac 24 | cryptd 25 | crypto_user 26 | ctr 27 | cts 28 | deflate 29 | des3_ede-x86_64 30 | des_generic 31 | des_s390 32 | drbg 33 | ecb 34 | ecdh_generic 35 | fcrypt 36 | gcm 37 | gf128mul 38 | ghash_generic 39 | ghash_s390 40 | glue_helper 41 | khazad 42 | keywrap 43 | lrw 44 | md4 45 | michael_mic 46 | ofb 47 | pcbc 48 | rmd128 49 | rmd160 50 | rmd256 51 | rmd320 52 | salsa20_generic 53 | salsa20_x86_64 54 | seed 55 | serpent_generic 56 | serpent_sse2_x86_64 57 | sha1_s390 58 | sha256_s390 59 | sha3_generic 60 | sha512_generic 61 | sha512_s390 62 | sha512_ssse3 63 | tcrypt 64 | tea 65 | tgr192 66 | twofish_common 67 | twofish_generic 68 | twofish_x86_64 69 | twofish_x86_64_3way 70 | vmac 71 | wp512 72 | xcbc 73 | xts 74 | -------------------------------------------------------------------------------- /scripts/python/tests/kutil/rpm/krnf/config.sh: -------------------------------------------------------------------------------- 1 | # The version of the main tarball to use 2 | SRCVERSION=6.17 3 | # variant of the kernel-source package, either empty or "-rt" 4 | VARIANT= 5 | # enable kernel module compression 6 | COMPRESS_MODULES="zstd" 7 | COMPRESS_VMLINUX="xz" 8 | # Compile binary devicetrees on master and stable branches. 9 | BUILD_DTBS="Yes" 10 | # Generate a _multibuild file 11 | MULTIBUILD="Yes" 12 | # Use new style livepatch package names 13 | LIVEPATCH=livepatch 14 | # buildservice projects to build the kernel against 15 | OBS_PROJECT=openSUSE:Factory 16 | OBS_PROJECT_ARM=openSUSE:Factory:ARM 17 | OBS_PROJECT_LEGACYX86=openSUSE:Factory:LegacyX86 18 | OBS_PROJECT_PPC=openSUSE:Factory:PowerPC 19 | OBS_PROJECT_RISCV=openSUSE:Factory:RISCV 20 | OBS_PROJECT_S390=openSUSE:Factory:zSystems 21 | # Bugzilla info 22 | BUGZILLA_SERVER="apibugzilla.suse.com" 23 | BUGZILLA_PRODUCT="openSUSE Tumbleweed" 24 | # build documentation in HTML format 25 | BUILD_HTML=Yes 26 | # build documentation in PDF format 27 | BUILD_PDF=No 28 | # Generate compile_commands.json 29 | GENERATE_COMPILE_COMMANDS=Yes 30 | -------------------------------------------------------------------------------- /scripts/python/tests/kutil/rpm/krn/config.sh: -------------------------------------------------------------------------------- 1 | # The version of the main tarball to use 2 | SRCVERSION=6.4 3 | # variant of the kernel-source package, either empty or "-rt" 4 | VARIANT= 5 | # enable kernel module compression 6 | COMPRESS_MODULES="zstd" 7 | # Use new style livepatch package names 8 | LIVEPATCH=livepatch 9 | # Compile binary devicetrees for Leap 10 | BUILD_DTBS="Yes" 11 | # buildservice projects to build the kernel against 12 | OBS_PROJECT=SUSE:SLE-15-SP6:GA 13 | OBS_PROJECT_ARM=openSUSE:Step:15-SP6 14 | IBS_PROJECT=SUSE:SLE-15-SP6:Update 15 | # Bugzilla info 16 | BUGZILLA_SERVER="apibugzilla.suse.com" 17 | BUGZILLA_PRODUCT="SUSE Linux Enterprise Server 15 SP6" 18 | # Check the sorted patches section of series.conf 19 | SORT_SERIES=yes 20 | # Modules not listed in supported.conf will abort the kernel build 21 | SUPPORTED_MODULES_CHECK=Yes 22 | # Split Leap-only modules to kernel-*-optional subpackage 23 | SPLIT_OPTIONAL=Yes 24 | # build documentation in HTML format 25 | BUILD_HTML=Yes 26 | # build documentation in PDF format 27 | BUILD_PDF=No 28 | # Generate compile_commands.json 29 | GENERATE_COMPILE_COMMANDS=Yes 30 | -------------------------------------------------------------------------------- /scripts/cve_tools/add-missing-reference: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python3 2 | 3 | import argparse 4 | import sys 5 | import os.path 6 | 7 | sys.path.append(os.path.join(os.path.dirname(__file__), "../python")) 8 | from suse_git.patch import Patch, References 9 | 10 | if __name__ == "__main__": 11 | parser = argparse.ArgumentParser( 12 | description="Add references to patch file") 13 | parser.add_argument("-r", "--reference", action="append", 14 | help="bsc# or CVE token used to tag the patch file. The option can be used more times.") 15 | parser.add_argument("patches", help="Patch files.", 16 | nargs=argparse.REMAINDER) 17 | args = parser.parse_args() 18 | 19 | 20 | added_refs = References(args.reference) 21 | for f in args.patches: 22 | with Patch(open(f, "r+b")) as patch: 23 | refs = patch.get_list_normalized("References") 24 | new_refs = refs | added_refs 25 | if new_refs == refs: 26 | continue 27 | patch.change("References", " ".join(new_refs), Patch.ChangeMode.ALL_WITH_ONE) 28 | 29 | 30 | -------------------------------------------------------------------------------- /scripts/python/tests/kutil/rpm/krna/config.sh: -------------------------------------------------------------------------------- 1 | # The version of the main tarball to use 2 | SRCVERSION=6.4 3 | # variant of the kernel-source package, either empty or "-rt" 4 | VARIANT=-azure 5 | # enable kernel module compression 6 | COMPRESS_MODULES="zstd" 7 | # Use new style livepatch package names 8 | LIVEPATCH=livepatch 9 | # Compile binary devicetrees for Leap 10 | BUILD_DTBS="Yes" 11 | # buildservice projects to build the kernel against 12 | OBS_PROJECT=SUSE:SLE-15-SP6:GA 13 | OBS_PROJECT_ARM=openSUSE:Step:15-SP6 14 | IBS_PROJECT=SUSE:SLE-15-SP6:GA 15 | # Bugzilla info 16 | BUGZILLA_SERVER="apibugzilla.suse.com" 17 | BUGZILLA_PRODUCT="SUSE Linux Enterprise Server 15 SP6" 18 | # Check the sorted patches section of series.conf 19 | SORT_SERIES=yes 20 | # Modules not listed in supported.conf will abort the kernel build 21 | SUPPORTED_MODULES_CHECK=Yes 22 | # Split Leap-only modules to kernel-*-optional subpackage 23 | SPLIT_OPTIONAL=Yes 24 | # build documentation in HTML format 25 | BUILD_HTML=Yes 26 | # build documentation in PDF format 27 | BUILD_PDF=No 28 | # Generate compile_commands.json 29 | GENERATE_COMPILE_COMMANDS=Yes 30 | -------------------------------------------------------------------------------- /rpm/config.sh: -------------------------------------------------------------------------------- 1 | # The version of the main tarball to use 2 | SRCVERSION=6.19-rc2 3 | # variant of the kernel-source package, either empty or "-rt" 4 | VARIANT= 5 | # enable kernel module compression 6 | COMPRESS_MODULES="zstd" 7 | COMPRESS_VMLINUX="xz" 8 | # Compile binary devicetrees on master and stable branches. 9 | BUILD_DTBS="Yes" 10 | # Generate a _multibuild file 11 | MULTIBUILD="Yes" 12 | # Use new style livepatch package names 13 | LIVEPATCH=livepatch 14 | # buildservice projects to build the kernel against 15 | OBS_PROJECT=openSUSE:Factory 16 | OBS_PROJECT_ARM=openSUSE:Factory:ARM 17 | OBS_PROJECT_LEGACYX86=openSUSE:Factory:LegacyX86 18 | OBS_PROJECT_PPC=openSUSE:Factory:PowerPC 19 | OBS_PROJECT_RISCV=openSUSE:Factory:RISCV 20 | OBS_PROJECT_S390=openSUSE:Factory:zSystems 21 | # Bugzilla info 22 | BUGZILLA_SERVER="apibugzilla.suse.com" 23 | BUGZILLA_PRODUCT="openSUSE Tumbleweed" 24 | # build documentation in HTML format 25 | BUILD_HTML=Yes 26 | # build documentation in PDF format 27 | BUILD_PDF=No 28 | # Generate compile_commands.json 29 | GENERATE_COMPILE_COMMANDS=Yes 30 | # Use the new kABI tool 31 | USE_SUSE_KABI_TOOLS=Yes 32 | -------------------------------------------------------------------------------- /scripts/git_sort/lib_from.sh: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2018 SUSE LLC 2 | # 3 | # This program is free software; you can redistribute it and/or 4 | # modify it under the terms of the GNU General Public License 5 | # as published by the Free Software Foundation; either version 2 6 | # of the License, or (at your option) any later version. 7 | # 8 | # This program is distributed in the hope that it will be useful, 9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | # GNU General Public License for more details. 12 | # 13 | # You should have received a copy of the GNU General Public License 14 | # along with this program; if not, write to the Free Software 15 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 16 | # USA. 17 | 18 | # from_get 19 | from_get () { 20 | awk ' 21 | NR==1 && /^From [0-9a-f]+/ { 22 | print $2 23 | exit 24 | } 25 | ' 26 | } 27 | 28 | # from_extract 29 | from_extract () { 30 | awk ' 31 | NR==1 && /^From [0-9a-f]+/ { 32 | next 33 | } 34 | 35 | { 36 | print 37 | } 38 | ' 39 | } 40 | -------------------------------------------------------------------------------- /scripts/config-merge: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl -w 2 | use strict; 3 | 4 | if (@ARGV < 2) { 5 | print STDERR "Usage: $0 \n"; 6 | print STDERR "Merge kernel config files config1 and config2. " . 7 | "Differences will be selected from config2.\n"; 8 | exit 1; 9 | } 10 | 11 | my %config; 12 | my @lines; 13 | 14 | open CONFIG1, $ARGV[0] 15 | or die $ARGV[0] . ": $!\n"; 16 | while () { 17 | push(@lines, $_); 18 | next unless /^(CONFIG_[A-Za-z0-9_]+)/ || /^# (CONFIG_[A-Za-z0-9_]+) is not set/; 19 | $config{$1} = $_; 20 | } 21 | close(CONFIG1); 22 | 23 | open CONFIG2, $ARGV[1] 24 | or die $ARGV[1] . ": $!\n"; 25 | while () { 26 | next unless /^(CONFIG_[A-Za-z0-9_]+)/ || /^# (CONFIG_[A-Za-z0-9_]+) is not set/; 27 | $config{$1} = $_; 28 | } 29 | close(CONFIG2); 30 | 31 | foreach (@lines) { 32 | if (/^(CONFIG_[A-Za-z0-9_]+)/ || /^# (CONFIG_[A-Za-z0-9_]+) is not set/) { 33 | if (exists($config{$1})) { 34 | print $config{$1}; 35 | delete $config{$1}; 36 | } 37 | } else { 38 | print; 39 | } 40 | 41 | } 42 | 43 | foreach my $value (sort(values(%config))) { 44 | print $value; 45 | } 46 | -------------------------------------------------------------------------------- /scripts/cve_tools/cve2metadata.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Usage: 4 | # cve2metadata.sh CVE-NUM[...CVE-NUM] 5 | # 6 | # expects: 7 | # VULNS_GIT to point to vulns DB git tree (clone from https://git.kernel.org/pub/scm/linux/security/vulns.git) 8 | 9 | if [ -z "$VULNS_GIT" -o ! -d "$VULNS_GIT" ] 10 | then 11 | echo "VULNS_GIT should point to vulns git tree" >&2 12 | echo "clone from https://git.kernel.org/pub/scm/linux/security/vulns.git" >&2 13 | exit 1 14 | fi 15 | 16 | if [ -z "$CVEKERNELTREE" ] 17 | then 18 | export CVEKERNELTREE=$LINUX_GIT 19 | fi 20 | 21 | . scripts/common-functions 22 | 23 | while [ $# -gt 0 ] 24 | do 25 | arg=$1 26 | shas="$(cve2sha $arg)" 27 | if [ -n "$shas" ] 28 | then 29 | cve=$arg 30 | else 31 | cve=$(sha2cve $arg) 32 | if [ -z $cve ] 33 | then 34 | echo $arg cannot be resolved to a CVE >&2 35 | shift 36 | continue 37 | fi 38 | shas="$(cve2sha $cve)" 39 | fi 40 | echo -n "$(echo $shas | tr "\n" " ")" 41 | cvss="$(cve2cvss $cve)" 42 | echo -n " score:${cvss:-unknown}" 43 | bsc="$(cve2bugzilla $cve)" 44 | echo " $cve $bsc" 45 | is_cve_rejected $cve && echo "W: $cve has been rejected" >&2 46 | shift 47 | done 48 | -------------------------------------------------------------------------------- /patches.suse/0001-initcall_blacklist-Does-not-allow-kernel_lockdown-be.patch: -------------------------------------------------------------------------------- 1 | From d5c32294f97b6d402bc3e5c6bd68afd2cf8d37e8 Mon Sep 17 00:00:00 2001 2 | From: Chun-Yi Lee 3 | Date: Fri, 7 Mar 2025 14:04:06 +0800 4 | Subject: [PATCH] initcall_blacklist: Does not allow kernel_lockdown be 5 | blacklisted 6 | Patch-mainline: Never, SUSE specific 7 | References: bsc#1237521 8 | 9 | The arm64_kernel_lockdown should not be blacklisted. Otherwise that kernel 10 | lockdown mechanism can be disabled by kernel parameter when booting. 11 | 12 | Signed-off-by: Chun-Yi Lee 13 | --- 14 | init/main.c | 4 ++++ 15 | 1 file changed, 4 insertions(+) 16 | 17 | --- a/init/main.c 18 | +++ b/init/main.c 19 | @@ -1141,6 +1141,10 @@ static int __init initcall_blacklist(cha 20 | do { 21 | str_entry = strsep(&str, ","); 22 | if (str_entry) { 23 | + if (!strcmp(str_entry, "arm64_kernel_lockdown")) { 24 | + pr_debug("The arm64_kernel_lockdown initcall can not be blacklisted.\n"); 25 | + continue; 26 | + } 27 | pr_debug("blacklisting initcall %s\n", str_entry); 28 | entry = memblock_alloc_or_panic(sizeof(*entry), 29 | SMP_CACHE_BYTES); 30 | -------------------------------------------------------------------------------- /patches.rpmify/BTF-Don-t-break-ABI-when-debuginfo-is-disabled.patch: -------------------------------------------------------------------------------- 1 | From: Michal Suchanek 2 | Date: Fri, 11 Feb 2022 18:25:37 +0100 3 | Subject: BTF: Don't break ABI when debuginfo is disabled. 4 | Patch-mainline: Never, SUSE specific 5 | References: jsc#SLE-18805 6 | 7 | Disabling BTF removes a member from struct modinfo breaking ABI all over 8 | the place. We expect that disabling debuginfo builds the same kernel but 9 | with BTF disabling debuginfo also disables BTF causing this breakage. 10 | 11 | Simply include the BTF member in struct modinfo always. 12 | 13 | Signed-off-by: Michal Suchanek 14 | --- 15 | include/linux/module.h | 2 -- 16 | 1 file changed, 2 deletions(-) 17 | 18 | --- a/include/linux/module.h 19 | +++ b/include/linux/module.h 20 | @@ -507,12 +507,10 @@ struct module { 21 | unsigned int num_bpf_raw_events; 22 | struct bpf_raw_event_map *bpf_raw_events; 23 | #endif 24 | -#ifdef CONFIG_DEBUG_INFO_BTF_MODULES 25 | unsigned int btf_data_size; 26 | unsigned int btf_base_data_size; 27 | void *btf_data; 28 | void *btf_base_data; 29 | -#endif 30 | #ifdef CONFIG_JUMP_LABEL 31 | struct jump_entry *jump_entries; 32 | unsigned int num_jump_entries; 33 | -------------------------------------------------------------------------------- /patches.suse/add-product-identifying-information-to-vmcoreinfo.patch: -------------------------------------------------------------------------------- 1 | From: Petr Tesarik 2 | Subject: Add product identifying information to VMCOREINFO 3 | Patch-mainline: Never, SUSE-specific 4 | References: bsc#1123015 5 | 6 | Since SUSE kernels sometimes backport patches that change the structures 7 | required to save a dump file using makedumpfile, it is necessary to recognize 8 | such a patched kernel from a vanilla kernel in the kdump environment. The 9 | VMCOREINFO note is perfect for this purpose. 10 | 11 | Signed-off-by: Petr Tesarik 12 | --- 13 | kernel/vmcore_info.c | 2 ++ 14 | 1 file changed, 2 insertions(+) 15 | 16 | --- a/kernel/vmcore_info.c 17 | +++ b/kernel/vmcore_info.c 18 | @@ -14,6 +14,7 @@ 19 | #include 20 | #include 21 | #include 22 | +#include 23 | 24 | #include 25 | #include 26 | @@ -136,6 +137,7 @@ static int __init crash_save_vmcoreinfo_init(void) 27 | } 28 | 29 | VMCOREINFO_OSRELEASE(init_uts_ns.name.release); 30 | + VMCOREINFO_NUMBER(SUSE_PRODUCT_CODE); 31 | VMCOREINFO_BUILD_ID(); 32 | VMCOREINFO_PAGESIZE(PAGE_SIZE); 33 | 34 | -------------------------------------------------------------------------------- /config.conf: -------------------------------------------------------------------------------- 1 | # Kernel configuration file selection. 2 | # See the arch-symbols script for a list of symbols defined. 3 | # -syms excludes a flavor from the kernel-syms package (vanilla is excluded 4 | # automatically). 5 | 6 | # 7 | # IMPORTANT: the subdirectory names map to cpuarch 8 | # kernel-binary and kernel-source rely on this 9 | # 10 | 11 | +x86_64 x86_64/default 12 | - x86_64/syzkaller 13 | +x86_64 x86_64/vanilla 14 | +x86_64 -syms x86_64/kvmsmall 15 | 16 | +i386 i386/pae 17 | +i386 i386/default 18 | +i386 i386/vanilla 19 | 20 | +ppc64le ppc64le/default 21 | +ppc64le ppc64le/vanilla 22 | +ppc64le -syms ppc64le/kvmsmall 23 | 24 | # ARM architectures 25 | +armv6hl -!needs_updating armv6hl/default 26 | +armv6hl -!needs_updating armv6hl/vanilla 27 | +armv7hl -!needs_updating armv7hl/default 28 | +armv7hl -!needs_updating armv7hl/vanilla 29 | +armv7hl -!needs_updating armv7hl/lpae 30 | +arm64 -!needs_updating arm64/default 31 | +arm64 -!needs_updating arm64/64kb 32 | +arm64 -!needs_updating arm64/vanilla 33 | +arm64 -syms -!needs_updating arm64/kvmsmall 34 | 35 | +s390x s390x/default 36 | +s390x s390x/vanilla 37 | +s390x -syms s390x/zfcpdump 38 | 39 | +riscv64 riscv64/default 40 | +riscv64 riscv64/vanilla 41 | -------------------------------------------------------------------------------- /scripts/stablecmp: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl -w 2 | use strict; 3 | 4 | my $one = shift; 5 | my $two = shift; 6 | 7 | sub convert($$) { 8 | my $in = shift; 9 | my $out = shift; 10 | open(IN, "<$in") || die "cannot open '$in'"; 11 | 12 | while () { 13 | s/^[[ 0-9s]*\] //; 14 | last if (/^\+ make .*all CONFIG_DEBUG_SECTION_MISMATCH/); 15 | } 16 | 17 | my @lines; 18 | my $start = 1; 19 | while () { 20 | s/^[[ 0-9s]*\] //; 21 | next if ($start && /^\+/); 22 | $start = 0; 23 | last if (/^\+/); 24 | s/2\.6\.[0-9]+(\.[0-9]+)?//g; 25 | s/3\.[0-9]+(\.[0-9]+)?//g; 26 | s@/home/abuild/rpmbuild/@@g; 27 | s@/usr/src/packages/@@g; 28 | s/^CRC [0-9a-z]+$//g; 29 | s/^System is [0-9]+ kB$//g; 30 | s/^Root device is .*//g; 31 | if (/^(.+)( (CC|LD|UNROLL) .*)$/) { 32 | push @lines, "$1\n"; 33 | push @lines, "$2\n"; 34 | } else { 35 | push @lines, $_; 36 | } 37 | } 38 | close IN; 39 | 40 | open(OUT, ">", $out) || die "cannot open '$out'"; 41 | map { print OUT } sort @lines; 42 | close OUT; 43 | } 44 | 45 | convert($one, "/tmp/one.$$"); 46 | convert($two, "/tmp/two.$$"); 47 | 48 | system "diff -u -w -b -B /tmp/one.$$ /tmp/two.$$"; 49 | 50 | unlink "/tmp/one.$$"; 51 | unlink "/tmp/two.$$"; 52 | 53 | 1; 54 | -------------------------------------------------------------------------------- /scripts/python/tests/api/certificate.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIDIjCCAgqgAwIBAgIUL4mlI3462PvpwnVWA1E49afpvP8wDQYJKoZIhvcNAQEL 3 | BQAwFDESMBAGA1UEAwwJbG9jYWxob3N0MCAXDTI1MDgyMjEyMzcxOVoYDzIxMjUw 4 | NzI5MTIzNzE5WjAUMRIwEAYDVQQDDAlsb2NhbGhvc3QwggEiMA0GCSqGSIb3DQEB 5 | AQUAA4IBDwAwggEKAoIBAQC8aIGs5itbRSGsE7hOpydQZzuLe1wsVJ8Iy7JAqH+a 6 | R9uoZSp6eKPJoT1xTAZ+qjwclcfgzcCqQYXXHsDCN5+Eb9tNmFT+JMI1BJ3DKBEe 7 | 6FQRWA3aRnwFx9pX/AaudHX34CTYwnlwW6YZLiTxocKY/4kp1v91/5JPt0gdcLYM 8 | kDXWIv1fAzHEYa6u2E+A5L4hyNv2uo1hULfSTvKIqj/ASzKcYvTeEIHnODg/LjH0 9 | jhnFnJC+i/oYatZjaLIlNoP3jU1GZD3cDr+urIQR9pEjWiRjNcuUuemhHnlxSsXT 10 | bOI+8LfZe+6SZJuSsR47l+pUNy9NEOLI9U1RzSrDm94hAgMBAAGjajBoMCUGA1Ud 11 | EQQeMByCCWxvY2FsaG9zdIIJMTI3LjAuMC4xhwR/AAABMAsGA1UdDwQEAwIHgDAT 12 | BgNVHSUEDDAKBggrBgEFBQcDATAdBgNVHQ4EFgQUHC6v9kMHBecLnwbmqhISoVxW 13 | QLkwDQYJKoZIhvcNAQELBQADggEBAFgvubsANsCTgXvchAiUjkg6SFw6nIYUjs7l 14 | D9q3mMdkQCKOf5Z791vU8OTTGSVocjM4oneGTufq1K0p8kDoGXos0LxmET9BeuZO 15 | oKPI3qgL+7J0qf7db+pRETGRDq1xZfEN4Yhg2hdUovnNbLPhq6Z1ldjLsOvC/dKV 16 | Et94d+boirL8CjVFGFxsDOOhsZnB/Bs/jmIm6rlX/yXlIbmsE/pH/dwrh2NZmkhw 17 | Amariu91PMCbSAO8I+nWOWdsDDUPVsxzuLrJQYY4F8ILsI/AzcNta5TjvX8WV4Zt 18 | RgIx/sOCA3qWYGA4EQE7yW72ZVVotjqtwXxz3vS5ooImsVzaYQA= 19 | -----END CERTIFICATE----- 20 | -------------------------------------------------------------------------------- /patches.suse/btrfs-provide-super_operations-get_inode_dev: -------------------------------------------------------------------------------- 1 | From: Jeff Mahoney 2 | Subject: btrfs: provide super_operations->inode_get_dev 3 | References: bsc#927455 4 | Patch-mainline: Never, upstream wants a super_block per anon dev 5 | 6 | In order to ensure that the per-subvolume anonymous dev_t gets published 7 | to userspace, we need to provide the super_operations->get_inode_dev 8 | operation. 9 | 10 | Signed-off-by: Jeff Mahoney 11 | --- 12 | fs/btrfs/super.c | 6 ++++++ 13 | 1 file changed, 6 insertions(+) 14 | 15 | --- a/fs/btrfs/super.c 16 | +++ b/fs/btrfs/super.c 17 | @@ -2485,6 +2485,11 @@ static void btrfs_shutdown(struct super_ 18 | } 19 | #endif 20 | 21 | +static dev_t btrfs_get_inode_dev(const struct inode *inode) 22 | +{ 23 | + return BTRFS_I(inode)->root->anon_dev; 24 | +} 25 | + 26 | static const struct super_operations btrfs_super_ops = { 27 | .drop_inode = btrfs_drop_inode, 28 | .evict_inode = btrfs_evict_inode, 29 | @@ -2504,6 +2509,7 @@ static const struct super_operations btr 30 | .remove_bdev = btrfs_remove_bdev, 31 | .shutdown = btrfs_shutdown, 32 | #endif 33 | + .get_inode_dev = btrfs_get_inode_dev, 34 | }; 35 | 36 | static const struct file_operations btrfs_ctl_fops = { 37 | -------------------------------------------------------------------------------- /scripts/git_sort/clean_conflicts.awk: -------------------------------------------------------------------------------- 1 | #!/usr/bin/awk -f 2 | 3 | # Copyright (C) 2018 SUSE LLC 4 | # 5 | # This program is free software; you can redistribute it and/or 6 | # modify it under the terms of the GNU General Public License 7 | # as published by the Free Software Foundation; either version 2 8 | # of the License, or (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with this program; if not, write to the Free Software 17 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 18 | # USA. 19 | 20 | BEGIN { 21 | conflicts = 0 22 | } 23 | 24 | /^Conflicts:$/ { 25 | conflicts = 1 26 | getline 27 | next 28 | } 29 | 30 | /^---$/ { 31 | if (conflicts == 0) { 32 | print lastLine 33 | } 34 | conflicts = 2 35 | } 36 | 37 | { 38 | #print "statement 3 conflicts " conflicts $0 39 | if (conflicts == 0) { 40 | if (NR != 1) { 41 | print lastLine 42 | } 43 | lastLine = $0 44 | } else if (conflicts == 2) { 45 | print 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /rpm/apply-patches: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Given a series.conf file and a directory with patches, applies them to the 4 | # current directory. 5 | # Used by kernel-source.spec.in and kernel-binary.spec.in 6 | 7 | USAGE="$0 [--vanilla] [symbol ...]" 8 | 9 | set -e 10 | set -o pipefail 11 | vanilla=false 12 | if test "$1" == "--vanilla"; then 13 | vanilla=true 14 | shift 15 | fi 16 | if test $# -lt 2; then 17 | echo "$USAGE" >&2 18 | exit 1 19 | fi 20 | DIR="${0%/*}" 21 | SERIES_CONF=$1 22 | PATCH_DIR=$2 23 | shift 2 24 | 25 | trap 'rm -f "$series"' EXIT 26 | series=$(mktemp) 27 | # support for patches in patches.addon/series 28 | cp "$SERIES_CONF" "$series" 29 | if ! $vanilla && test -e "$PATCH_DIR/patches.addon/series"; then 30 | # make it user-friendly and automatically prepend "patches.addon/" 31 | # if there is no "/" 32 | sed -r 's|^([[:space:]]*)([^#[:space:]][^/]*)$|\1patches.addon/\2|' \ 33 | "$PATCH_DIR/patches.addon/series" >>"$series" 34 | fi 35 | 36 | ( 37 | echo "trap 'echo \"*** patch \$_ failed ***\"' ERR" 38 | echo "set -ex" 39 | "$DIR"/guards "$@" <"$series" | \ 40 | if $vanilla; then 41 | sed -rn '/^patches\.(kernel\.org|rpmify)\//p' 42 | else 43 | cat 44 | fi |\ 45 | sed "s|^|patch -s -F0 -E -p1 --no-backup-if-mismatch -i $PATCH_DIR/|" 46 | ) | sh 47 | 48 | -------------------------------------------------------------------------------- /scripts/python/bugzilla/__init__.py: -------------------------------------------------------------------------------- 1 | # python-bugzilla - a Python interface to bugzilla using xmlrpclib. 2 | # 3 | # Copyright (C) 2007, 2008 Red Hat Inc. 4 | # Author: Will Woods 5 | # 6 | # This work is licensed under the GNU GPLv2 or later. 7 | # See the COPYING file in the top-level directory. 8 | 9 | from .apiversion import version, __version__ 10 | from .base import Bugzilla 11 | from .exceptions import BugzillaError 12 | from .oldclasses import (Bugzilla3, Bugzilla32, Bugzilla34, Bugzilla36, 13 | Bugzilla4, Bugzilla42, Bugzilla44, 14 | NovellBugzilla, RHBugzilla, RHBugzilla3, RHBugzilla4) 15 | 16 | 17 | # This is the public API. If you are explicitly instantiating any other 18 | # class, using some function, or poking into internal files, don't complain 19 | # if things break on you. 20 | __all__ = [ 21 | "Bugzilla3", "Bugzilla32", "Bugzilla34", "Bugzilla36", 22 | "Bugzilla4", "Bugzilla42", "Bugzilla44", 23 | "NovellBugzilla", 24 | "RHBugzilla3", "RHBugzilla4", "RHBugzilla", 25 | 'BugzillaError', 26 | 'Bugzilla', "version", 27 | ] 28 | 29 | 30 | # Clear all other locals() from the public API 31 | for __sym in locals().copy(): 32 | if __sym.startswith("__") or __sym in __all__: 33 | continue 34 | locals().pop(__sym) 35 | locals().pop("__sym") 36 | -------------------------------------------------------------------------------- /patches.rpmify/Revert-kconfig-only-write-CONFIG_FOO-is-not-set-for-.patch: -------------------------------------------------------------------------------- 1 | From ed93c1f397972bd63e607b5566948df5f4831c20 Mon Sep 17 00:00:00 2001 2 | From: Michal Suchanek 3 | Date: Mon, 16 Jul 2018 12:52:20 +0200 4 | Subject: [PATCH] Revert "kconfig: only write '# CONFIG_FOO is not set' for 5 | visible symbols" 6 | 7 | References: bsc#1093118 8 | Patch-mainline: no, suse-specific. 9 | 10 | This reverts commit f467c5640c29ad258c3cd8186a776c82fc3b8057. 11 | 12 | This breaks config in our x86 builds. 13 | 14 | Signed-off-by: Michal Suchanek 15 | --- 16 | scripts/kconfig/symbol.c | 3 +-- 17 | 1 file changed, 1 insertion(+), 2 deletions(-) 18 | 19 | diff --git a/scripts/kconfig/symbol.c b/scripts/kconfig/symbol.c 20 | index 7c9a88e91cfa..1b9e8370fe98 100644 21 | --- a/scripts/kconfig/symbol.c 22 | +++ b/scripts/kconfig/symbol.c 23 | @@ -397,10 +397,9 @@ void sym_calc_value(struct symbol *sym) 24 | if (!sym_is_choice(sym)) { 25 | prop = sym_get_default_prop(sym); 26 | if (prop) { 27 | + sym->flags |= SYMBOL_WRITE; 28 | newval.tri = EXPR_AND(expr_calc_value(prop->expr), 29 | prop->visible.tri); 30 | - if (newval.tri != no) 31 | - sym->flags |= SYMBOL_WRITE; 32 | } 33 | if (sym->implied.tri != no) { 34 | sym->flags |= SYMBOL_WRITE; 35 | -- 36 | 2.13.7 37 | 38 | -------------------------------------------------------------------------------- /patches.suse/panic-do-not-print-uninitialized-taint_flags.patch: -------------------------------------------------------------------------------- 1 | From: Jessica Yu 2 | Date: Mon, 15 Jun 2020 16:51:03 +0200 3 | Subject: panic: do not print uninitialized taint_flags 4 | Patch-mainline: Never, SUSE-specific 5 | References: bsc#1172814 6 | 7 | In print_tainted(), the taint_flags array is iterated over and a character 8 | is printed depending on whether the taint bit is set (c_true and c_false). 9 | However, since TAINT_NO_SUPPORT is at the end of the taint_flags array, the 10 | uninitialized elements in-between are initialized to 0. Hence, the 11 | character for TAINT_NO_SUPPORT does not get printed as the first 0 in 12 | between serves as the null terminator for the taint string. 13 | 14 | Fix that by skipping any uninitialized taint_flag structs in the 15 | taint_flags array. 16 | 17 | Suggested-by: Michal Kubecek 18 | Signed-off-by: Jessica Yu 19 | --- 20 | kernel/panic.c | 2 ++ 21 | 1 file changed, 2 insertions(+) 22 | 23 | --- a/kernel/panic.c 24 | +++ b/kernel/panic.c 25 | @@ -525,6 +525,8 @@ static void print_tainted_seq(struct seq_buf *s, bool verbose) 26 | bool is_set = test_bit(i, &tainted_mask); 27 | char c = is_set ? t->c_true : t->c_false; 28 | 29 | + if (!c) 30 | + continue; 31 | if (verbose) { 32 | if (is_set) { 33 | seq_buf_printf(s, "%s[%c]=%s", sep, c, t->desc); 34 | -------------------------------------------------------------------------------- /scripts/cve_tools/README.md: -------------------------------------------------------------------------------- 1 | ## Usage 2 | 3 | * Set `VULNS_GIT` environment variable to a clone of https://git.kernel.org/pub/scm/linux/security/vulns.git 4 | * Set `KSOURCE_GIT` environment variable to a clone of kernel-source 5 | * Fetch the repo to base work on up-to-date branches 6 | * Pick a working directory `WD` (will store working data) 7 | 8 | * Run as 9 | ``` 10 | cd $WD 11 | make -f path/to/scripts/cve_tools/Makefile BRANCH=cve/linux-5.14-LTSS update_refs_history 12 | 13 | * Optionally with BASE_BRANCH (when different from origin/$BRANCH) 14 | ``` 15 | make -f path/to/scripts/cve_tools/Makefile BRANCH=SLE15-SP5 BASE_BRANCH=SLE15-SP5-with-cve-merged update_refs_history 16 | ``` 17 | 18 | * that will create a new git branch in `KSOURCE_GIT` and add commits with new 19 | references 20 | * it will create git worktree in the `WD` 21 | * conversely `KSOURCE_GIT` cannot be a worktree (implementation issue) 22 | * it will store processed data files in the `WD` 23 | * the data can be reused with different BRANCH= 24 | 25 | ## TODO 26 | 27 | * move working data from CWD to `XDG_CACHE_HOME` so that they can be used by 28 | other utils 29 | * integrate with branches.conf so that list of "root" branches is extracted 30 | * integrate with branches.conf so that non-root branches are handled too (easy 31 | if we allow multiplicities of RPM changelog messages) 32 | -------------------------------------------------------------------------------- /scripts/python/tests/kutil/rpm/krn/kernel-syms.spec: -------------------------------------------------------------------------------- 1 | # 2 | # spec file for package kernel-syms 3 | # 4 | # Copyright (c) 2025 SUSE LLC 5 | # 6 | # All modifications and additions to the file contributed by third parties 7 | # remain the property of their copyright owners, unless otherwise agreed 8 | # upon. The license for this file, and modifications and additions to the 9 | # file, is the same license as for the pristine package itself (unless the 10 | # license for the pristine package is not an Open Source License, in which 11 | # case the license is the MIT License). An "Open Source License" is a 12 | # license that conforms to the Open Source Definition (Version 1.9) 13 | # published by the Open Source Initiative. 14 | 15 | # Please submit bugfixes or comments via https://bugs.opensuse.org/ 16 | # 17 | 18 | 19 | %define git_commit ece3f96068f9dd4e96094e07980a9a1c7987c4a9 20 | %define variant %{nil} 21 | 22 | %include %_sourcedir/kernel-spec-macros 23 | 24 | Name: kernel-syms 25 | Version: 6.4.0 26 | %if 0%{?is_kotd} 27 | Release: .gece3f96 28 | %else 29 | Release: 0 30 | %endif 31 | Summary: Kernel Symbol Versions (modversions) 32 | License: GPL-2.0-only 33 | Group: Development/Sources 34 | URL: https://www.kernel.org/ 35 | BuildRequires: coreutils 36 | ExclusiveArch: aarch64 armv7hl ppc64le s390x x86_64 37 | -------------------------------------------------------------------------------- /scripts/check-patch-released: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Checks whether patches matching given pattern are released for given 4 | # branches 5 | # Usage: 6 | # scripts/check-patch-released pattern BRANCH1[ BRANCH2 ... BRANCHN] 7 | # E.g. 8 | # ./scripts/check-patch-released CVE-XXXX-YYYY BRANCHES 9 | # Output 10 | # BRANCH does not match pattern 11 | # if no patch with the given pattern is found 12 | # 13 | # $BRANCH $SHA $PATCH_FILE unreleased 14 | # there is a patch matching introduced by $SHA in $PATCH_FILE but not released yet 15 | # 16 | # $BRANCH $SHA $PATCH_FILE released in rpm-$VER-$PROD-update 17 | # there is a patch matching introduced by $SHA in $PATCH_FILE reachable from rpm-$VER-$PROD-update tag 18 | metadata="$1" 19 | shift 20 | 21 | while [ $# -gt 0 ] 22 | do 23 | branch=$1 24 | prod="$(echo $branch | tr "[:upper:]" "[:lower:]")" 25 | shift 26 | 27 | found=0 28 | for file in $(git grep -l "$metadata" origin/$branch -- :^patches.kabi :^series.conf | cut -d: -f2) 29 | do 30 | found=1 31 | sha=$(file2first_sha origin/$branch "$file") 32 | release="$(git describe --contains --match "rpm-*$prod-updates" $sha 2>/dev/null)" 33 | 34 | echo -n "$branch $sha $file " 35 | if [ -z "$release" ] 36 | then 37 | echo "unreleased" 38 | else 39 | echo "released in ${release}" 40 | fi 41 | done 42 | [ $found -eq 0 ] && echo "$branch does not match $metadata" 43 | done 44 | -------------------------------------------------------------------------------- /scripts/python/tests/kutil/rpm/krnf/kernel-syms.spec: -------------------------------------------------------------------------------- 1 | # 2 | # spec file for package kernel-syms 3 | # 4 | # Copyright (c) 2025 SUSE LLC 5 | # 6 | # All modifications and additions to the file contributed by third parties 7 | # remain the property of their copyright owners, unless otherwise agreed 8 | # upon. The license for this file, and modifications and additions to the 9 | # file, is the same license as for the pristine package itself (unless the 10 | # license for the pristine package is not an Open Source License, in which 11 | # case the license is the MIT License). An "Open Source License" is a 12 | # license that conforms to the Open Source Definition (Version 1.9) 13 | # published by the Open Source Initiative. 14 | 15 | # Please submit bugfixes or comments via https://bugs.opensuse.org/ 16 | # 17 | 18 | 19 | %define git_commit 513d2ec25a33ba4bd970269abb48e060007939b7 20 | %define variant %{nil} 21 | 22 | %include %_sourcedir/kernel-spec-macros 23 | 24 | Name: kernel-syms 25 | Version: 6.17.1 26 | %if 0%{?is_kotd} 27 | Release: .g513d2ec 28 | %else 29 | Release: 0 30 | %endif 31 | Summary: Kernel Symbol Versions (modversions) 32 | License: GPL-2.0-only 33 | Group: Development/Sources 34 | URL: https://www.kernel.org/ 35 | BuildRequires: coreutils 36 | ExclusiveArch: %ix86 aarch64 armv6hl armv7hl ppc64le riscv64 s390x x86_64 37 | -------------------------------------------------------------------------------- /scripts/python/bugzilla/exceptions.py: -------------------------------------------------------------------------------- 1 | # This work is licensed under the GNU GPLv2 or later. 2 | # See the COPYING file in the top-level directory. 3 | 4 | 5 | class BugzillaError(Exception): 6 | """ 7 | Error raised in the Bugzilla client code. 8 | """ 9 | @staticmethod 10 | def get_bugzilla_error_string(exc): 11 | """ 12 | Helper to return the bugzilla instance error message from an 13 | XMLRPC Fault, or any other exception type that's raised from bugzilla 14 | interaction 15 | """ 16 | return getattr(exc, "faultString", str(exc)) 17 | 18 | @staticmethod 19 | def get_bugzilla_error_code(exc): 20 | """ 21 | Helper to return the bugzilla instance error code from an 22 | XMLRPC Fault, or any other exception type that's raised from bugzilla 23 | interaction 24 | """ 25 | for propname in ["faultCode", "code"]: 26 | if hasattr(exc, propname): 27 | return getattr(exc, propname) 28 | return None 29 | 30 | def __init__(self, message, code=None): 31 | """ 32 | :param code: The error code from the remote bugzilla instance. Only 33 | set if the error came directly from the remove bugzilla 34 | """ 35 | self.code = code 36 | if self.code: 37 | message += " (code=%s)" % self.code 38 | Exception.__init__(self, message) 39 | -------------------------------------------------------------------------------- /scripts/python/www_authenticate/README.rst: -------------------------------------------------------------------------------- 1 | WWW-Authenticate header parser 2 | ============================== 3 | 4 | Parsing WWW-Authenticate headers is difficult. Let this tiny library do all the 5 | hard work for you. 6 | 7 | What's so difficult? 8 | -------------------- 9 | 10 | The header contains a set of comma-separated challenges, but the parameters for 11 | each challenge are also comma-separated. Some challenges in the wild don't have 12 | parameters, which violates the spec. The ``Negotiate`` challenge eschews the 13 | required name-value pairs and has a single string as its parameter. 14 | 15 | Some servers may offer more challenges than you were expecting, but you'd still 16 | like to notice the one you care about. 17 | 18 | Usage 19 | ----- 20 | 21 | It's really easy:: 22 | 23 | import www_authenticate 24 | 25 | parsed = www_authenticate.parse(response.headers['WWW-Authenticate']) 26 | 27 | if 'Basic' in parsed: 28 | realm = parsed['Basic']['realm'] 29 | if 'Negotiate' in parsed: 30 | challenge = parsed['Negotiate'] 31 | 32 | The returned object is a ``collections.OrderedDict`` with authentication scheme 33 | names as keys. The values are either dictionaries, a single string, or ``None`` 34 | if there are no parameters. 35 | 36 | Installation 37 | ------------ 38 | 39 | This package is in PyPI. Install with:: 40 | 41 | $ pip install www-authenticate 42 | 43 | There are no external dependencies. 44 | 45 | -------------------------------------------------------------------------------- /scripts/check-conf: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ############################################################################# 4 | # Copyright (c) 2003,2004,2009 Novell, Inc. 5 | # All Rights Reserved. 6 | # 7 | # This program is free software; you can redistribute it and/or 8 | # modify it under the terms of version 2 of the GNU General Public License as 9 | # published by the Free Software Foundation. 10 | # 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program; if not, contact Novell, Inc. 18 | # 19 | # To contact Novell about this file by physical or electronic mail, 20 | # you may find current contact information at www.novell.com 21 | ############################################################################# 22 | 23 | # check that series.conf and config.conf match reality 24 | 25 | # Check the patches 26 | scripts/guards --path "$(echo patches.* | sed -e 's/ /:/g')" \ 27 | --check --config=series.conf 28 | 29 | ret=$? 30 | if (( $ret != 0 )); then 31 | echo "series.conf needs more work, exiting... " 32 | exit $ret 33 | fi 34 | 35 | # Check the configuration files 36 | scripts/guards --prefix config --check --config=config.conf 37 | -------------------------------------------------------------------------------- /scripts/cvs-wd-timestamp: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | ############################################################################# 4 | # Copyright (c) 2004,2007-2009 Novell, Inc. 5 | # All Rights Reserved. 6 | # 7 | # This program is free software; you can redistribute it and/or 8 | # modify it under the terms of version 2 of the GNU General Public License as 9 | # published by the Free Software Foundation. 10 | # 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program; if not, contact Novell, Inc. 18 | # 19 | # To contact Novell about this file by physical or electronic mail, 20 | # you may find current contact information at www.novell.com 21 | ############################################################################# 22 | 23 | # A timestamp used to be the only way to describe the state of the cvs 24 | # repository, but it might be useful even now (e.g. "how old is this kernel?") 25 | 26 | . ${0%/*}/wd-functions.sh 27 | 28 | if $using_git; then 29 | # Just echo the commit timestamp of HEAD 30 | ts=$(git show --pretty=format:%ct HEAD | head -n 1) 31 | TZ=UTC date "+%Y-%m-%d %H:%M:%S %z" -d "1970-01-01 00:00 UTC $ts seconds" 32 | exit 33 | fi 34 | 35 | -------------------------------------------------------------------------------- /scripts/cve_tools/decorate-c-b-s.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Add more information to CVEs that need fixing. This should be part of 4 | # scripts/cve_tools/check-branch-status but we want to run that script 5 | # in parallel for performance reasons and then we can easily hit bugzilla 6 | # throttling even when we batch queries like in this script. 7 | # 8 | # scripts/cve_tools/check-branch-status output should be used as an input 9 | 10 | add_age() 11 | { 12 | local in="$1" 13 | local tmp_ages="$(mktemp)" 14 | local tmp_sed_pattern="$(mktemp)" 15 | local cves="" 16 | local now="$(date +%s)" 17 | 18 | # We need to prevent parallel runs from compeeting and triggering 19 | # the bugzilla rate limitting. 20 | grep -E "fix_missing|unapplied" $in | grep -Ev "code_disabled|unaffected|arch_disabled" | cut -d" " -f2 | xargs scripts/python/get-bugzilla-metadata -f cve,created,assignee,priority,status 2>/dev/null | sed 's@\(.*\);\(.*\) .*;\(.*\);\(P[0-9]\) .*;\(.*\)$@\1 \2 \3 \4 \5@' > $tmp_ages 21 | 22 | while read cve born assignee priority status 23 | do 24 | echo "s#\($cve.*\)#\1 $((($now - $(date -d $born +%s))/86400)) $assignee $priority $status#" 25 | done < $tmp_ages > $tmp_sed_pattern 26 | 27 | sed -i -f $tmp_sed_pattern $in 28 | rm $tmp_ages $tmp_sed_pattern 29 | } 30 | 31 | in="$1" 32 | if [ ! -f "$in" ] 33 | then 34 | in=$(mktemp) 35 | tmp_in=$in 36 | cat > $in 37 | fi 38 | 39 | add_age $in 40 | 41 | if [ -n "$tmp_in" ] 42 | then 43 | cat $tmp_in 44 | rm $tmp_in 45 | fi 46 | -------------------------------------------------------------------------------- /patches.suse/0001-regulator-mt6360-Add-OF-match-table.patch: -------------------------------------------------------------------------------- 1 | From: Matthias Brugger 2 | Date: Sat, 9 Jan 2021 02:38:10 +0100 3 | Subject: regulator: mt6360: Add OF match table 4 | Patch-mainline: Submitted, 20210109112612.1221-1-matthias.bgg@kernel.org 5 | References: bsc#1180731 6 | 7 | Binding documentation mentions that a compatible is required for the 8 | MT6360 device node, but the driver doesn't provide a OF match table. 9 | 10 | Fixes: d321571d5e4c ("regulator: mt6360: Add support for MT6360 regulator") 11 | Signed-off-by: Matthias Brugger 12 | 13 | --- 14 | drivers/regulator/mt6360-regulator.c | 9 +++++++++ 15 | 1 file changed, 9 insertions(+) 16 | 17 | --- a/drivers/regulator/mt6360-regulator.c 18 | +++ b/drivers/regulator/mt6360-regulator.c 19 | @@ -443,10 +443,19 @@ static const struct platform_device_id mt6360_regulator_id_table[] = { 20 | }; 21 | MODULE_DEVICE_TABLE(platform, mt6360_regulator_id_table); 22 | 23 | +#ifdef CONFIG_OF 24 | +static const struct of_device_id mt6360_of_match[] = { 25 | + { .compatible = "mediatek,mt6360-regulator", }, 26 | + { /* sentinel */ }, 27 | +}; 28 | +MODULE_DEVICE_TABLE(of, mt6360_of_match); 29 | +#endif 30 | + 31 | static struct platform_driver mt6360_regulator_driver = { 32 | .driver = { 33 | .name = "mt6360-regulator", 34 | .probe_type = PROBE_PREFER_ASYNCHRONOUS, 35 | + .of_match_table = of_match_ptr(mt6360_of_match), 36 | }, 37 | .probe = mt6360_regulator_probe, 38 | .id_table = mt6360_regulator_id_table, 39 | -------------------------------------------------------------------------------- /scripts/python/bugzilla/oldclasses.py: -------------------------------------------------------------------------------- 1 | # This work is licensed under the GNU GPLv2 or later. 2 | # See the COPYING file in the top-level directory. 3 | 4 | from .base import Bugzilla 5 | 6 | # These are old compat classes. Nothing new should be added here, 7 | # and these should not be altered 8 | 9 | 10 | class Bugzilla3(Bugzilla): 11 | pass 12 | 13 | 14 | class Bugzilla32(Bugzilla): 15 | pass 16 | 17 | 18 | class Bugzilla34(Bugzilla): 19 | pass 20 | 21 | 22 | class Bugzilla36(Bugzilla): 23 | pass 24 | 25 | 26 | class Bugzilla4(Bugzilla): 27 | pass 28 | 29 | 30 | class Bugzilla42(Bugzilla): 31 | pass 32 | 33 | 34 | class Bugzilla44(Bugzilla): 35 | pass 36 | 37 | 38 | class NovellBugzilla(Bugzilla): 39 | pass 40 | 41 | 42 | class RHBugzilla(Bugzilla): 43 | """ 44 | Helper class for historical bugzilla.redhat.com back compat 45 | 46 | Historically this class used many more non-upstream methods, but 47 | in 2012 RH started dropping most of its custom bits. By that time, 48 | upstream BZ had most of the important functionality. 49 | 50 | Much of the remaining code here is just trying to keep things operating 51 | in python-bugzilla back compatible manner. 52 | 53 | This class was written using bugzilla.redhat.com's API docs: 54 | https://bugzilla.redhat.com/docs/en/html/api/ 55 | """ 56 | _is_redhat_bugzilla = True 57 | 58 | 59 | class RHBugzilla3(RHBugzilla): 60 | pass 61 | 62 | 63 | class RHBugzilla4(RHBugzilla): 64 | pass 65 | -------------------------------------------------------------------------------- /README.blacklist: -------------------------------------------------------------------------------- 1 | Blacklisting Upstream Commit-IDs 2 | ================================ 3 | 4 | We track the git history of the upstream Linux kernel for fixes that we 5 | potentially need to backport to our kernel branches. The tooling creates 6 | a list of upstream commit-ids that are already part of our kernels and 7 | compares the 'Fixes:' tags in upstream commits with that list. If there 8 | is a match, we found a fix that might need to be backported. 9 | 10 | If the commit is not needed in our kernels, it can be blacklisted, so 11 | that the tools do not report that commit again. There are two ways to 12 | blacklist a commit: 13 | 14 | 1) Put the commit-id into blacklist.conf. This file exists to 15 | blacklist fixes for the base kernel version of the branch. 16 | 17 | 2) Use the 'No-Fix:' tag in the patch-files. The format of that 18 | tag is the same as for the 'Git-commit:' tag. Only one commit 19 | can be blacklisted per tag, you have to use 'No-Fix:' once 20 | for each commit to be blacklisted. This option can be used to 21 | blacklist fixes for an already backported upstream patch. 22 | 23 | Both options require a full 40-character git commit-id. 24 | 25 | The blacklist.conf file also supports blacklisting by source code path. 26 | A list of paths can be put into that file and patches that only touch 27 | these paths are automatically blacklisted too. 28 | 29 | Feel free to send any questions and/or suggestions about fixes-tracking 30 | and blacklisting to: 31 | 32 | 33 | Joerg Roedel 34 | 35 | -------------------------------------------------------------------------------- /patches.rpmify/btf-pahole-j1-option.patch: -------------------------------------------------------------------------------- 1 | From: Takashi Iwai 2 | Subject: Use pahole -j1 option for reproducible builds 3 | Patch-mainline: Never, temporary workaround 4 | References: bsc#1230414 bsc#1229450 5 | 6 | For achieving reproducible builds (and fixing another potential bug) 7 | we need to pass -j1 option to pahole instead of the default -j. 8 | Although this might lead to slightly longer build time, it's almost 9 | neglegible. 10 | 11 | Signed-off-by: Takashi Iwai 12 | 13 | --- 14 | scripts/Makefile.btf | 4 ++-- 15 | 1 file changed, 2 insertions(+), 2 deletions(-) 16 | 17 | --- a/scripts/Makefile.btf 18 | +++ b/scripts/Makefile.btf 19 | @@ -14,14 +14,14 @@ endif 20 | 21 | pahole-flags-$(call test-ge, $(pahole-ver), 121) += --btf_gen_floats 22 | 23 | -pahole-flags-$(call test-ge, $(pahole-ver), 122) += -j$(JOBS) 24 | +pahole-flags-$(call test-ge, $(pahole-ver), 122) += -j1 25 | 26 | pahole-flags-$(call test-ge, $(pahole-ver), 125) += --skip_encoding_btf_inconsistent_proto --btf_gen_optimized 27 | 28 | else 29 | 30 | # Switch to using --btf_features for v1.26 and later. 31 | -pahole-flags-$(call test-ge, $(pahole-ver), 126) = -j$(JOBS) --btf_features=encode_force,var,float,enum64,decl_tag,type_tag,optimized_func,consistent_func,decl_tag_kfuncs 32 | +pahole-flags-$(call test-ge, $(pahole-ver), 126) = -j1 --btf_features=encode_force,var,float,enum64,decl_tag,type_tag,optimized_func,consistent_func,decl_tag_kfuncs 33 | 34 | pahole-flags-$(call test-ge, $(pahole-ver), 130) += --btf_features=attributes 35 | 36 | -------------------------------------------------------------------------------- /config/x86_64/syzkaller: -------------------------------------------------------------------------------- 1 | CONFIG_CONSTRUCTORS=y 2 | CONFIG_DEBUG_KMEMLEAK=y 3 | # CONFIG_DEBUG_KMEMLEAK_DEFAULT_OFF is not set 4 | CONFIG_DEBUG_KMEMLEAK_EARLY_LOG_SIZE=4000 5 | # CONFIG_DEBUG_KMEMLEAK_TEST is not set 6 | # CONFIG_DEBUG_LOCKDEP is not set 7 | CONFIG_DEBUG_LOCK_ALLOC=y 8 | CONFIG_DEBUG_MUTEXES=y 9 | CONFIG_DEBUG_RT_MUTEXES=y 10 | CONFIG_DEBUG_RWSEMS=y 11 | CONFIG_DEBUG_SPINLOCK=y 12 | CONFIG_DEBUG_WW_MUTEX_SLOWPATH=y 13 | CONFIG_GCC_PLUGINS=y 14 | # CONFIG_GCC_PLUGIN_CYC_COMPLEXITY is not set 15 | # CONFIG_GCC_PLUGIN_LATENT_ENTROPY is not set 16 | # CONFIG_GCC_PLUGIN_RANDSTRUCT is not set 17 | CONFIG_GCC_PLUGIN_SANCOV=y 18 | CONFIG_HAVE_ALIGNED_STRUCT_PAGE=y 19 | CONFIG_KASAN=y 20 | CONFIG_KASAN_EXTRA=y 21 | CONFIG_KASAN_INLINE=y 22 | # CONFIG_KASAN_OUTLINE is not set 23 | CONFIG_KASAN_SHADOW_OFFSET=0xdffffc0000000000 24 | CONFIG_KCOV=y 25 | CONFIG_KCOV_ENABLE_COMPARISONS=y 26 | CONFIG_KCOV_INSTRUMENT_ALL=y 27 | CONFIG_LOCALVERSION="-syzkaller" 28 | CONFIG_LOCKDEP=y 29 | # CONFIG_MODULE_SIG is not set 30 | CONFIG_PROVE_LOCKING=y 31 | CONFIG_PROVE_RCU=y 32 | # CONFIG_SLAB is not set 33 | CONFIG_SLAB_FREELIST_HARDENED=y 34 | CONFIG_SLUB=y 35 | CONFIG_SLUB_CPU_PARTIAL=y 36 | CONFIG_SLUB_DEBUG=y 37 | CONFIG_SLUB_DEBUG_ON=y 38 | # CONFIG_SLUB_MEMCG_SYSFS_ON is not set 39 | # CONFIG_SLUB_STATS is not set 40 | CONFIG_STACKDEPOT=y 41 | # CONFIG_TEST_KASAN is not set 42 | # CONFIG_TEST_UBSAN is not set 43 | CONFIG_UBSAN=y 44 | # CONFIG_UBSAN_ALIGNMENT is not set 45 | CONFIG_UBSAN_NULL=y 46 | CONFIG_UBSAN_SANITIZE_ALL=y 47 | CONFIG_MODULES=y 48 | # CONFIG_SUSE_KERNEL_SUPPORTED is not set 49 | CONFIG_EFI_STUB=y 50 | -------------------------------------------------------------------------------- /scripts/python/tests/kutil/rpm/krn/dtb-aarch64.spec: -------------------------------------------------------------------------------- 1 | # 2 | # spec file for package dtb-aarch64 3 | # 4 | # Copyright (c) 2025 SUSE LLC 5 | # 6 | # All modifications and additions to the file contributed by third parties 7 | # remain the property of their copyright owners, unless otherwise agreed 8 | # upon. The license for this file, and modifications and additions to the 9 | # file, is the same license as for the pristine package itself (unless the 10 | # license for the pristine package is not an Open Source License, in which 11 | # case the license is the MIT License). An "Open Source License" is a 12 | # license that conforms to the Open Source Definition (Version 1.9) 13 | # published by the Open Source Initiative. 14 | 15 | # Please submit bugfixes or comments via https://bugs.opensuse.org/ 16 | # 17 | 18 | 19 | %define srcversion 6.4 20 | %define patchversion 6.4.0 21 | %define variant %{nil} 22 | 23 | %include %_sourcedir/kernel-spec-macros 24 | 25 | %(chmod +x %_sourcedir/{guards,apply-patches,check-for-config-changes,group-source-files.pl,split-modules,modversions,kabi.pl,arch-symbols,check-module-license,splitflist,mergedep,moddep,modflist,kernel-subpackage-build}) 26 | 27 | Name: dtb-aarch64 28 | Version: 6.4.0 29 | %if 0%{?is_kotd} 30 | Release: .gece3f96 31 | %else 32 | Release: 0 33 | %endif 34 | Summary: Device Tree files for $MACHINES 35 | License: GPL-2.0-only 36 | Group: System/Boot 37 | URL: https://www.kernel.org/ 38 | BuildRequires: cpp 39 | BuildRequires: dtc >= 1.4.3 40 | BuildRequires: xz 41 | ExclusiveArch: aarch64 42 | -------------------------------------------------------------------------------- /scripts/python/tests/kutil/rpm/krn/dtb-armv7l.spec: -------------------------------------------------------------------------------- 1 | # 2 | # spec file for package dtb-armv7l 3 | # 4 | # Copyright (c) 2025 SUSE LLC 5 | # 6 | # All modifications and additions to the file contributed by third parties 7 | # remain the property of their copyright owners, unless otherwise agreed 8 | # upon. The license for this file, and modifications and additions to the 9 | # file, is the same license as for the pristine package itself (unless the 10 | # license for the pristine package is not an Open Source License, in which 11 | # case the license is the MIT License). An "Open Source License" is a 12 | # license that conforms to the Open Source Definition (Version 1.9) 13 | # published by the Open Source Initiative. 14 | 15 | # Please submit bugfixes or comments via https://bugs.opensuse.org/ 16 | # 17 | 18 | 19 | %define srcversion 6.4 20 | %define patchversion 6.4.0 21 | %define variant %{nil} 22 | 23 | %include %_sourcedir/kernel-spec-macros 24 | 25 | %(chmod +x %_sourcedir/{guards,apply-patches,check-for-config-changes,group-source-files.pl,split-modules,modversions,kabi.pl,arch-symbols,check-module-license,splitflist,mergedep,moddep,modflist,kernel-subpackage-build}) 26 | 27 | Name: dtb-armv7l 28 | Version: 6.4.0 29 | %if 0%{?is_kotd} 30 | Release: .gece3f96 31 | %else 32 | Release: 0 33 | %endif 34 | Summary: Device Tree files for $MACHINES 35 | License: GPL-2.0-only 36 | Group: System/Boot 37 | URL: https://www.kernel.org/ 38 | BuildRequires: cpp 39 | BuildRequires: dtc >= 1.4.3 40 | BuildRequires: xz 41 | ExclusiveArch: armv7l armv7hl 42 | -------------------------------------------------------------------------------- /scripts/python/tests/kutil/rpm/krnf/dtb-aarch64.spec: -------------------------------------------------------------------------------- 1 | # 2 | # spec file for package dtb-aarch64 3 | # 4 | # Copyright (c) 2025 SUSE LLC 5 | # 6 | # All modifications and additions to the file contributed by third parties 7 | # remain the property of their copyright owners, unless otherwise agreed 8 | # upon. The license for this file, and modifications and additions to the 9 | # file, is the same license as for the pristine package itself (unless the 10 | # license for the pristine package is not an Open Source License, in which 11 | # case the license is the MIT License). An "Open Source License" is a 12 | # license that conforms to the Open Source Definition (Version 1.9) 13 | # published by the Open Source Initiative. 14 | 15 | # Please submit bugfixes or comments via https://bugs.opensuse.org/ 16 | # 17 | 18 | 19 | %define srcversion 6.17 20 | %define patchversion 6.17.1 21 | %define variant %{nil} 22 | 23 | %include %_sourcedir/kernel-spec-macros 24 | 25 | %(chmod +x %_sourcedir/{guards,apply-patches,check-for-config-changes,group-source-files.pl,split-modules,modversions,kabi.pl,arch-symbols,check-module-license,splitflist,mergedep,moddep,modflist,kernel-subpackage-build}) 26 | 27 | Name: dtb-aarch64 28 | Version: 6.17.1 29 | %if 0%{?is_kotd} 30 | Release: .g513d2ec 31 | %else 32 | Release: 0 33 | %endif 34 | Summary: Device Tree files for $MACHINES 35 | License: GPL-2.0-only 36 | Group: System/Boot 37 | URL: https://www.kernel.org/ 38 | BuildRequires: cpp 39 | BuildRequires: dtc >= 1.4.3 40 | BuildRequires: xz 41 | ExclusiveArch: aarch64 42 | -------------------------------------------------------------------------------- /scripts/python/tests/kutil/rpm/krnf/dtb-riscv64.spec: -------------------------------------------------------------------------------- 1 | # 2 | # spec file for package dtb-riscv64 3 | # 4 | # Copyright (c) 2025 SUSE LLC 5 | # 6 | # All modifications and additions to the file contributed by third parties 7 | # remain the property of their copyright owners, unless otherwise agreed 8 | # upon. The license for this file, and modifications and additions to the 9 | # file, is the same license as for the pristine package itself (unless the 10 | # license for the pristine package is not an Open Source License, in which 11 | # case the license is the MIT License). An "Open Source License" is a 12 | # license that conforms to the Open Source Definition (Version 1.9) 13 | # published by the Open Source Initiative. 14 | 15 | # Please submit bugfixes or comments via https://bugs.opensuse.org/ 16 | # 17 | 18 | 19 | %define srcversion 6.17 20 | %define patchversion 6.17.1 21 | %define variant %{nil} 22 | 23 | %include %_sourcedir/kernel-spec-macros 24 | 25 | %(chmod +x %_sourcedir/{guards,apply-patches,check-for-config-changes,group-source-files.pl,split-modules,modversions,kabi.pl,arch-symbols,check-module-license,splitflist,mergedep,moddep,modflist,kernel-subpackage-build}) 26 | 27 | Name: dtb-riscv64 28 | Version: 6.17.1 29 | %if 0%{?is_kotd} 30 | Release: .g513d2ec 31 | %else 32 | Release: 0 33 | %endif 34 | Summary: Device Tree files for $MACHINES 35 | License: GPL-2.0-only 36 | Group: System/Boot 37 | URL: https://www.kernel.org/ 38 | BuildRequires: cpp 39 | BuildRequires: dtc >= 1.4.3 40 | BuildRequires: xz 41 | ExclusiveArch: riscv64 42 | -------------------------------------------------------------------------------- /scripts/python/tests/kutil/rpm/krnf/dtb-armv6l.spec: -------------------------------------------------------------------------------- 1 | # 2 | # spec file for package dtb-armv6l 3 | # 4 | # Copyright (c) 2025 SUSE LLC 5 | # 6 | # All modifications and additions to the file contributed by third parties 7 | # remain the property of their copyright owners, unless otherwise agreed 8 | # upon. The license for this file, and modifications and additions to the 9 | # file, is the same license as for the pristine package itself (unless the 10 | # license for the pristine package is not an Open Source License, in which 11 | # case the license is the MIT License). An "Open Source License" is a 12 | # license that conforms to the Open Source Definition (Version 1.9) 13 | # published by the Open Source Initiative. 14 | 15 | # Please submit bugfixes or comments via https://bugs.opensuse.org/ 16 | # 17 | 18 | 19 | %define srcversion 6.17 20 | %define patchversion 6.17.1 21 | %define variant %{nil} 22 | 23 | %include %_sourcedir/kernel-spec-macros 24 | 25 | %(chmod +x %_sourcedir/{guards,apply-patches,check-for-config-changes,group-source-files.pl,split-modules,modversions,kabi.pl,arch-symbols,check-module-license,splitflist,mergedep,moddep,modflist,kernel-subpackage-build}) 26 | 27 | Name: dtb-armv6l 28 | Version: 6.17.1 29 | %if 0%{?is_kotd} 30 | Release: .g513d2ec 31 | %else 32 | Release: 0 33 | %endif 34 | Summary: Device Tree files for $MACHINES 35 | License: GPL-2.0-only 36 | Group: System/Boot 37 | URL: https://www.kernel.org/ 38 | BuildRequires: cpp 39 | BuildRequires: dtc >= 1.4.3 40 | BuildRequires: xz 41 | ExclusiveArch: armv6l armv6hl 42 | -------------------------------------------------------------------------------- /scripts/python/tests/kutil/rpm/krnf/dtb-armv7l.spec: -------------------------------------------------------------------------------- 1 | # 2 | # spec file for package dtb-armv7l 3 | # 4 | # Copyright (c) 2025 SUSE LLC 5 | # 6 | # All modifications and additions to the file contributed by third parties 7 | # remain the property of their copyright owners, unless otherwise agreed 8 | # upon. The license for this file, and modifications and additions to the 9 | # file, is the same license as for the pristine package itself (unless the 10 | # license for the pristine package is not an Open Source License, in which 11 | # case the license is the MIT License). An "Open Source License" is a 12 | # license that conforms to the Open Source Definition (Version 1.9) 13 | # published by the Open Source Initiative. 14 | 15 | # Please submit bugfixes or comments via https://bugs.opensuse.org/ 16 | # 17 | 18 | 19 | %define srcversion 6.17 20 | %define patchversion 6.17.1 21 | %define variant %{nil} 22 | 23 | %include %_sourcedir/kernel-spec-macros 24 | 25 | %(chmod +x %_sourcedir/{guards,apply-patches,check-for-config-changes,group-source-files.pl,split-modules,modversions,kabi.pl,arch-symbols,check-module-license,splitflist,mergedep,moddep,modflist,kernel-subpackage-build}) 26 | 27 | Name: dtb-armv7l 28 | Version: 6.17.1 29 | %if 0%{?is_kotd} 30 | Release: .g513d2ec 31 | %else 32 | Release: 0 33 | %endif 34 | Summary: Device Tree files for $MACHINES 35 | License: GPL-2.0-only 36 | Group: System/Boot 37 | URL: https://www.kernel.org/ 38 | BuildRequires: cpp 39 | BuildRequires: dtc >= 1.4.3 40 | BuildRequires: xz 41 | ExclusiveArch: armv7l armv7hl 42 | -------------------------------------------------------------------------------- /patches.suse/crypto-hkdf-skip-TVs-with-unapproved-salt-lengths-in.patch: -------------------------------------------------------------------------------- 1 | From a020dccec8686810acfecd1db1de438eb8f95dc1 Mon Sep 17 00:00:00 2001 2 | From: Nicolai Stange 3 | Date: Tue, 15 Jul 2025 10:15:26 +0200 4 | References: bsc#1241200 bsc#1246134 bsc#1245608 5 | Patch-mainline: Not yet, tentative fix 6 | Subject: [PATCH] crypto: hkdf - skip TVs with unapproved salt lengths in FIPS 7 | mode 8 | 9 | The HMAC implementation's ->setkey() rejects keys shorter than 112 bits 10 | with -EINVAL in FIPS mode and the hkdf_extract() on test vecs with a salt 11 | length less than that fails accordingly. 12 | 13 | Make hkdf_test() to skip over TVs with a salt length less than 112 bits. 14 | 15 | Fixes: 3241cd0c6c17 ("crypto,fs: Separate out hkdf_extract() and 16 | hkdf_expand()") 17 | Suggested-by: Hannes Reinecke 18 | Signed-off-by: Nicolai Stange 19 | --- 20 | crypto/hkdf.c | 8 ++++++++ 21 | 1 file changed, 8 insertions(+) 22 | 23 | --- a/crypto/hkdf.c 24 | +++ b/crypto/hkdf.c 25 | @@ -11,6 +11,7 @@ 26 | #include 27 | #include 28 | #include 29 | +#include 30 | 31 | /* 32 | * HKDF consists of two steps: 33 | @@ -490,6 +491,13 @@ static int hkdf_test(const char *shash, 34 | goto out_free; 35 | } 36 | 37 | + if (fips_enabled && tv->salt_size < 112 / 8) { 38 | + pr_debug("%s(%s): skipped in FIPS mode\n", 39 | + tv->test, driver); 40 | + err = 0; 41 | + goto out_free; 42 | + } 43 | + 44 | err = hkdf_extract(tfm, tv->ikm, tv->ikm_size, 45 | tv->salt, tv->salt_size, prk); 46 | if (err) { 47 | -------------------------------------------------------------------------------- /scripts/python/tests/kutil/rpm/krn/kernel-obs-qa.spec: -------------------------------------------------------------------------------- 1 | # 2 | # spec file for package kernel-obs-qa 3 | # 4 | # Copyright (c) 2025 SUSE LLC 5 | # 6 | # All modifications and additions to the file contributed by third parties 7 | # remain the property of their copyright owners, unless otherwise agreed 8 | # upon. The license for this file, and modifications and additions to the 9 | # file, is the same license as for the pristine package itself (unless the 10 | # license for the pristine package is not an Open Source License, in which 11 | # case the license is the MIT License). An "Open Source License" is a 12 | # license that conforms to the Open Source Definition (Version 1.9) 13 | # published by the Open Source Initiative. 14 | 15 | # Please submit bugfixes or comments via https://bugs.opensuse.org/ 16 | # 17 | # needsrootforbuild 18 | 19 | 20 | %define patchversion 6.4.0 21 | %define variant %{nil} 22 | 23 | %include %_sourcedir/kernel-spec-macros 24 | 25 | Name: kernel-obs-qa 26 | Version: 6.4.0 27 | %if 0%{?is_kotd} 28 | Release: .gece3f96 29 | %else 30 | Release: 0 31 | %endif 32 | Summary: Basic QA tests for the kernel 33 | License: GPL-2.0-only 34 | Group: SLES 35 | BuildRequires: kernel-default 36 | # kernel-obs-build must be also configured as VMinstall, but is required 37 | # here as well to avoid that qa and build package build parallel 38 | %if ! 0%{?qemu_user_space_build} 39 | BuildRequires: kernel-obs-build-srchash-ece3f96068f9dd4e96094e07980a9a1c7987c4a9 40 | %endif 41 | BuildRequires: modutils 42 | ExclusiveArch: aarch64 armv7hl ppc64le s390x x86_64 43 | -------------------------------------------------------------------------------- /patches.suse/arm64-lock-down-kernel-in-secure-boot-mode.patch: -------------------------------------------------------------------------------- 1 | From: Chester Lin 2 | Date: Fri, 20 Nov 2020 14:08:38 +0800 3 | Subject: arm64: lock down kernel in secure boot mode 4 | References: jsc#SLE-15020 5 | Patch-mainline: never, only for SLE 6 | 7 | This kernel lockdown feature on ARM64 depends on IMA and EFI to query 8 | secure boot mode. Because aarch64 initiates the EFI subsystem late so 9 | the lockdown check must be put off until the EFI subsystem has been 10 | initialized. 11 | 12 | Signed-off-by: Chester Lin 13 | --- 14 | drivers/firmware/efi/secureboot.c | 18 ++++++++++++++++++ 15 | 1 file changed, 18 insertions(+) 16 | 17 | --- a/drivers/firmware/efi/secureboot.c 18 | +++ b/drivers/firmware/efi/secureboot.c 19 | @@ -14,6 +14,8 @@ 20 | #include 21 | #include 22 | #include 23 | +#include 24 | +#include 25 | 26 | /* 27 | * Decide what to do when UEFI secure boot mode is enabled. 28 | @@ -36,3 +38,19 @@ void __init efi_set_secure_boot(enum efi 29 | } 30 | } 31 | } 32 | + 33 | +#if defined(CONFIG_ARM64) && defined(CONFIG_LOCK_DOWN_IN_EFI_SECURE_BOOT) 34 | +/* 35 | + * The arm64_kernel_lockdown() must run after efisubsys_init() because the 36 | + * the secure boot mode query relies on efi_rts_wq to call EFI_GET_VARIABLE. 37 | + */ 38 | +static int __init arm64_kernel_lockdown(void) 39 | +{ 40 | + if (arch_ima_get_secureboot()) 41 | + security_lock_kernel_down("EFI Secure Boot mode", 42 | + LOCKDOWN_INTEGRITY_MAX); 43 | + return 0; 44 | +} 45 | + 46 | +subsys_initcall(arm64_kernel_lockdown); 47 | +#endif 48 | -------------------------------------------------------------------------------- /rpm/kernel-cert-subpackage: -------------------------------------------------------------------------------- 1 | %package -n %{-n*}-ueficert 2 | Summary: UEFI Secure Boot Certificate For Package %{-n*}-kmp 3 | Group: System/Kernel 4 | Requires(pre): suse-kernel-rpm-scriptlets 5 | Requires(post): suse-kernel-rpm-scriptlets 6 | Requires: suse-kernel-rpm-scriptlets 7 | Requires(preun): suse-kernel-rpm-scriptlets 8 | Requires(postun): suse-kernel-rpm-scriptlets 9 | %description -n %{-n*}-ueficert 10 | This package contains the UEFI Secure Boot certificate used to sign 11 | modules in the %{-n*}-kmp packages. 12 | 13 | %define run_if_exists run_if_exists() { \ 14 | if [ -x "$1" ] ; then \ 15 | "$@" \ 16 | else \ 17 | echo Cannot execute "$1" >&2 \ 18 | fi \ 19 | } \ 20 | run_if_exists 21 | 22 | %pre -n %{-n*}-ueficert 23 | %run_if_exists /usr/lib/module-init-tools/kernel-scriptlets/cert-pre --certs "@CERTS@" "$@" 24 | 25 | %post -n %{-n*}-ueficert 26 | %run_if_exists /usr/lib/module-init-tools/kernel-scriptlets/cert-post --certs "@CERTS@" "$@" 27 | 28 | %preun -n %{-n*}-ueficert 29 | %run_if_exists /usr/lib/module-init-tools/kernel-scriptlets/cert-preun --certs "@CERTS@" "$@" 30 | 31 | %postun -n %{-n*}-ueficert 32 | %run_if_exists /usr/lib/module-init-tools/kernel-scriptlets/cert-postun --certs "@CERTS@" "$@" 33 | 34 | %posttrans -n %{-n*}-ueficert 35 | %run_if_exists /usr/lib/module-init-tools/kernel-scriptlets/cert-posttrans --certs "@CERTS@" "$@" 36 | 37 | %files -n %{-n*}-ueficert 38 | %defattr(-, root, root) 39 | %dir /etc/uefi 40 | /etc/uefi/certs 41 | -------------------------------------------------------------------------------- /scripts/arch-symbols: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ############################################################################# 4 | # Copyright (c) 2003-2005,2009 Novell, Inc. 5 | # Copyright (c) 2010-2022 SUSE LLC 6 | # 7 | # This program is free software; you can redistribute it and/or 8 | # modify it under the terms of version 2 of the GNU General Public License as 9 | # published by the Free Software Foundation. 10 | # 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program; if not, contact https://www.suse.com/source-code/ 18 | # 19 | ############################################################################# 20 | 21 | 22 | # With --list, list all known architectures, otherwise print the generic 23 | # name for this architecture (or the one specified on command line). 24 | 25 | if [ "$1" = "--list" ]; then 26 | # List all known architectures 27 | echo i386 mips{,64} sparc{,64} ppc{,64,64le} s390{,x} ia64 x86_64 alpha parisc armv6hl armv7hl arm64 riscv64 28 | exit 0 29 | fi 30 | 31 | if [ -n "$1" ]; then 32 | ARCH="$1" 33 | else 34 | ARCH="$(arch)" 35 | fi 36 | case "$ARCH" in 37 | # from rpm --eval '%ix86' 38 | i?86 | pentium3 | pentium4 | athlon | geode) 39 | echo i386 40 | ;; 41 | aarch64) 42 | echo arm64 43 | ;; 44 | *) 45 | echo "$ARCH" 46 | ;; 47 | esac 48 | -------------------------------------------------------------------------------- /scripts/python/tests/kutil/rpm/krnf/kernel-obs-qa.spec: -------------------------------------------------------------------------------- 1 | # 2 | # spec file for package kernel-obs-qa 3 | # 4 | # Copyright (c) 2025 SUSE LLC 5 | # 6 | # All modifications and additions to the file contributed by third parties 7 | # remain the property of their copyright owners, unless otherwise agreed 8 | # upon. The license for this file, and modifications and additions to the 9 | # file, is the same license as for the pristine package itself (unless the 10 | # license for the pristine package is not an Open Source License, in which 11 | # case the license is the MIT License). An "Open Source License" is a 12 | # license that conforms to the Open Source Definition (Version 1.9) 13 | # published by the Open Source Initiative. 14 | 15 | # Please submit bugfixes or comments via https://bugs.opensuse.org/ 16 | # 17 | # needsrootforbuild 18 | 19 | 20 | %define patchversion 6.17.1 21 | %define variant %{nil} 22 | 23 | %include %_sourcedir/kernel-spec-macros 24 | 25 | Name: kernel-obs-qa 26 | Version: 6.17.1 27 | %if 0%{?is_kotd} 28 | Release: .g513d2ec 29 | %else 30 | Release: 0 31 | %endif 32 | Summary: Basic QA tests for the kernel 33 | License: GPL-2.0-only 34 | Group: SLES 35 | BuildRequires: kernel-default 36 | # kernel-obs-build must be also configured as VMinstall, but is required 37 | # here as well to avoid that qa and build package build parallel 38 | %if ! 0%{?qemu_user_space_build} 39 | BuildRequires: kernel-obs-build-srchash-513d2ec25a33ba4bd970269abb48e060007939b7 40 | %endif 41 | BuildRequires: modutils 42 | ExclusiveArch: aarch64 armv6hl armv7hl ppc64le riscv64 s390x x86_64 43 | -------------------------------------------------------------------------------- /patches.suse/livepatch-dump-ipa-clones.patch: -------------------------------------------------------------------------------- 1 | From: Miroslav Benes 2 | Subject: livepatch: Add -fdump-ipa-clones to build 3 | Patch-mainline: Never, SUSE-specific 4 | References: jsc#SLE-17360 bsc#1190003 bsc#1229042 5 | 6 | When -fdump-ipa-clones option is enabled, GCC reports about its cloning 7 | operation during IPA optimizations. We use the information for live 8 | patches preparation, because it is crucial to know if and how functions 9 | are optimized. 10 | 11 | Introduce LIVEPATCH_IPA_CLONES to allow dumping the ipa clones during our 12 | kernel build. 13 | 14 | Signed-off-by: Miroslav Benes 15 | Signed-off-by: Marcos Paulo de Souza 16 | --- 17 | Makefile | 6 ++++++ 18 | kernel/livepatch/Kconfig | 8 ++++++++ 19 | 2 files changed, 14 insertions(+) 20 | 21 | --- a/Makefile 22 | +++ b/Makefile 23 | @@ -1079,6 +1079,12 @@ KBUILD_CFLAGS += -falign-functions=$(CON 24 | endif 25 | endif 26 | 27 | +ifdef CONFIG_LIVEPATCH_IPA_CLONES 28 | +ifeq ($(KBUILD_EXTMOD),) 29 | +KBUILD_CFLAGS += -fdump-ipa-clones 30 | +endif 31 | +endif 32 | + 33 | # arch Makefile may override CC so keep this after arch Makefile is included 34 | NOSTDINC_FLAGS += -nostdinc 35 | 36 | --- a/kernel/livepatch/Kconfig 37 | +++ b/kernel/livepatch/Kconfig 38 | @@ -30,3 +30,11 @@ config KLP_BUILD 39 | select OBJTOOL 40 | help 41 | Enable klp-build support 42 | + 43 | +config LIVEPATCH_IPA_CLONES 44 | + bool "Kernel Live Patching - Dump IPA Clones" 45 | + depends on LIVEPATCH 46 | + depends on $(cc-option, -fdump-ipa-clones) 47 | + help 48 | + Let GCC dump IPA clones during compilation. 49 | + Say N if you are unsure. 50 | -------------------------------------------------------------------------------- /scripts/python/tests/test_linux_git.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python3 2 | # -*- coding: utf-8 -*- 3 | 4 | import os.path 5 | import shutil 6 | import subprocess 7 | import tempfile 8 | import unittest 9 | 10 | from . import support 11 | 12 | 13 | class TestLinuxGit(unittest.TestCase): 14 | def setUp(self): 15 | self.tmpdir = tempfile.mkdtemp(prefix="ks_linux_git") 16 | self.lg_path = support.testdir() / '../../linux_git.sh' 17 | 18 | 19 | def tearDown(self): 20 | shutil.rmtree(self.tmpdir) 21 | 22 | 23 | def run_one(self, *, bare, var, output): 24 | args = ["git", "init", "--quiet"] 25 | if bare: 26 | args.append("--bare") 27 | args.append(self.tmpdir) 28 | 29 | subprocess.check_call(args, env={}, cwd=self.tmpdir) 30 | 31 | retval = subprocess.check_output([self.lg_path], 32 | env={"LINUX_GIT" : var}, cwd=self.tmpdir) 33 | self.assertEqual(output, retval.decode()) 34 | 35 | 36 | def test_bare(self): 37 | self.run_one(bare=True, var=self.tmpdir, output=self.tmpdir + "\n") 38 | 39 | 40 | def test_nonbare(self): 41 | self.run_one(bare=False, var=self.tmpdir, 42 | output=os.path.join(self.tmpdir, ".git") + "\n") 43 | 44 | 45 | def test_nonbare_git(self): 46 | self.run_one(bare=False, var=os.path.join(self.tmpdir, ".git"), 47 | output=os.path.join(self.tmpdir, ".git") + "\n") 48 | 49 | 50 | if __name__ == '__main__': 51 | # Run a single testcase 52 | suite = unittest.TestLoader().loadTestsFromTestCase(TestLinuxGit) 53 | unittest.TextTestRunner(verbosity=2).run(suite) 54 | -------------------------------------------------------------------------------- /patches.suse/0002-regulator-mt6358-Add-OF-match-table.patch: -------------------------------------------------------------------------------- 1 | From: Matthias Brugger 2 | Date: Sat, 9 Jan 2021 02:41:09 +0100 3 | Subject: regulator: mt6358: Add OF match table 4 | Patch-mainline: Submitted, 20210109112612.1221-2-matthias.bgg@kernel.org 5 | References: bsc#1180731 6 | 7 | The binding documentation mentions that a compatible is required for the 8 | MT6358 device node. But the driver does not provide a OF match table. 9 | This way auto-loading is broken as the MFD driver that registers the 10 | device has a .of_compatible set which makes the platform .uevent 11 | callback report a OF modalias, but that's not in the module. 12 | 13 | Fixes: f67ff1bd58f0 ("regulator: mt6358: Add support for MT6358 regulator") 14 | Signed-off-by: Matthias Brugger 15 | --- 16 | drivers/regulator/mt6358-regulator.c | 9 +++++++++ 17 | 1 file changed, 9 insertions(+) 18 | 19 | --- a/drivers/regulator/mt6358-regulator.c 20 | +++ b/drivers/regulator/mt6358-regulator.c 21 | @@ -730,10 +730,19 @@ static const struct platform_device_id mt6358_platform_ids[] = { 22 | }; 23 | MODULE_DEVICE_TABLE(platform, mt6358_platform_ids); 24 | 25 | +#ifdef CONFIG_OF 26 | +static const struct of_device_id mt6358_of_match[] = { 27 | + { .compatible = "mediatek,mt6358-regulator", }, 28 | + { /* sentinel */ }, 29 | +}; 30 | +MODULE_DEVICE_TABLE(of, mt6358_of_match); 31 | +#endif 32 | + 33 | static struct platform_driver mt6358_regulator_driver = { 34 | .driver = { 35 | .name = "mt6358-regulator", 36 | .probe_type = PROBE_PREFER_ASYNCHRONOUS, 37 | + .of_match_table = of_match_ptr(mt6358_of_match), 38 | }, 39 | .probe = mt6358_regulator_probe, 40 | .id_table = mt6358_platform_ids, 41 | -------------------------------------------------------------------------------- /patches.suse/0003-regulator-mt6323-Add-OF-match-table.patch: -------------------------------------------------------------------------------- 1 | From: Matthias Brugger 2 | Date: Sat, 9 Jan 2021 02:45:45 +0100 3 | Subject: regulator: mt6323: Add OF match table 4 | Patch-mainline: Submitted, 20210109112612.1221-3-matthias.bgg@kernel.org 5 | References: bsc#1180731 6 | 7 | The binding documentation mentions that a compatible is required for the 8 | MT6323 device node. But the driver does not provide a OF match table. 9 | This way auto-loading is broken as the MFD driver that registers the 10 | device has a .of_compatible set which makes the platform .uevent 11 | callback report a OF modalias, but that's not in the module. 12 | 13 | Fixes: 2fdf82923618 ("regulator: mt6323: Add support for MT6323 regulator") 14 | Signed-off-by: Matthias Brugger 15 | --- 16 | drivers/regulator/mt6323-regulator.c | 9 +++++++++ 17 | 1 file changed, 9 insertions(+) 18 | 19 | --- a/drivers/regulator/mt6323-regulator.c 20 | +++ b/drivers/regulator/mt6323-regulator.c 21 | @@ -406,10 +406,19 @@ static const struct platform_device_id mt6323_platform_ids[] = { 22 | }; 23 | MODULE_DEVICE_TABLE(platform, mt6323_platform_ids); 24 | 25 | +#ifdef CONFIG_OF 26 | +static const struct of_device_id mt6323_of_match[] = { 27 | + { .compatible = "mediatek,mt6323-regulator", }, 28 | + { /* sentinel */ }, 29 | +}; 30 | +MODULE_DEVICE_TABLE(of, mt6323_of_match); 31 | +#endif 32 | + 33 | static struct platform_driver mt6323_regulator_driver = { 34 | .driver = { 35 | .name = "mt6323-regulator", 36 | .probe_type = PROBE_PREFER_ASYNCHRONOUS, 37 | + .of_match_table = of_match_ptr(mt6323_of_match), 38 | }, 39 | .probe = mt6323_regulator_probe, 40 | .id_table = mt6323_platform_ids, 41 | -------------------------------------------------------------------------------- /patches.suse/b43-missing-firmware-info.patch: -------------------------------------------------------------------------------- 1 | Subject: b43: Change firmware missing message to refer to openSUSE script 2 | From: Larry Finger 3 | Patch-mainline: never, openSUSE-specific 4 | References: none 5 | 6 | The error message output by b43 contains instructions for obtaining 7 | firmware; however, this naturally does not take account of the script 8 | /usr/sbin/install_bcm43xx_firmware. Modify the messages to suggest use 9 | of the script. 10 | 11 | Signed-off-by: Larry Finger 12 | Modified-by: Jiri Benc 13 | Signed-off-by: Jiri Benc 14 | 15 | --- 16 | drivers/net/wireless/broadcom/b43/main.c | 10 ++++++---- 17 | 1 file changed, 6 insertions(+), 4 deletions(-) 18 | 19 | --- a/drivers/net/wireless/broadcom/b43/main.c 20 | +++ b/drivers/net/wireless/broadcom/b43/main.c 21 | @@ -2165,10 +2165,12 @@ static void b43_release_firmware(struct b43_wldev *dev) 22 | static void b43_print_fw_helptext(struct b43_wl *wl, bool error) 23 | { 24 | const char text[] = 25 | - "You must go to " \ 26 | - "https://wireless.docs.kernel.org/en/latest/en/users/drivers/b43/developers.html#list-of-firmware " \ 27 | - "and download the correct firmware for this driver version. " \ 28 | - "Please carefully read all instructions on this website.\n"; 29 | + "Please open a terminal and enter the command " \ 30 | + "\"sudo /usr/sbin/install_bcm43xx_firmware\" to download " \ 31 | + "the correct firmware for this driver version. " \ 32 | + "For an off-line installation, go to " \ 33 | + "https://en.opensuse.org/HCL:Network_(Wireless)#Broadcom" \ 34 | + " and follow the instructions above the table.\n"; 35 | 36 | if (error) 37 | b43err(wl, text); 38 | -------------------------------------------------------------------------------- /scripts/git-commit-msg: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | ############################################################################# 3 | # Copyright (c) 2024 SUSE 4 | # All Rights Reserved. 5 | # 6 | # This program is free software; you can redistribute it and/or 7 | # modify it under the terms of version 2 of the GNU General Public License as 8 | # published by the Free Software Foundation. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with this program; if not, contact Novell, Inc. 17 | # 18 | # To contact SUSE about this file by physical or electronic mail, 19 | # you may find current contact information at www.suse.com 20 | ############################################################################# 21 | 22 | commit_file="$1" 23 | 24 | # Empty means abort anyway 25 | test -z "$(grep -vE '^#|^\s*$' "$commit_file")" && exit 26 | 27 | git_dir=$(git rev-parse --git-dir) 28 | test -f "$git_dir/MERGE_HEAD" && exit 29 | 30 | err=0 31 | new_refs=$(git diff-index -M -p --cached HEAD "patches.*/*" | \ 32 | awk -v FPAT='[^, ]+' \ 33 | '/^+References:/ {for (i=2; i <= NF; i++) refs[$i]++} 34 | /^-References:/ {for (i=2; i <= NF; i++) refs[$i]--} 35 | END { for (r in refs) if (refs[r] > 0) print(r)}') 36 | for ref in $new_refs ; do 37 | grep -q $ref $commit_file || { echo "New reference '$ref' missing in the commit message." ; err=1 ; } 38 | done 39 | 40 | if test "$err" != 0; then 41 | echo "Aborting." 42 | exit "$err" 43 | fi 44 | -------------------------------------------------------------------------------- /scripts/check-embargoed-bugz: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Scan the bug numbers in commit logs and check whether it's still embargoed 4 | # 5 | # Put me on pre-push git hook 6 | # 7 | 8 | if [ ! -x /usr/bin/jq ]; then 9 | echo >&2 "embargoed check: jq is not present, please install jq package" 10 | exit 1 11 | fi 12 | 13 | remote="$1" 14 | url="$2" 15 | 16 | z40=0000000000000000000000000000000000000000 17 | 18 | jsonf="$(mktemp)" || exit 1 19 | trap "rm \"$jsonf\"" 0 1 2 3 15 20 | 21 | curl -s -o "$jsonf" https://smash.suse.de/api/embargoed-bugs/ || exit 1 22 | 23 | ids=$(jq -r '.[].bug.name | capture("^bnc#(?[[:digit:]]+)").id' "$jsonf") \ 24 | || exit 1 25 | 26 | declare -A emb_bugs 27 | for e in $ids; do 28 | emb_bugs[$e]=1 29 | done 30 | 31 | while read local_ref local_sha remote_ref remote_sha 32 | do 33 | test "$local_sha" = $z40 && continue 34 | case "$remote_ref" in 35 | *_EMBARGO/*|*_EMBARGO) 36 | continue;; 37 | refs/heads/users/*/for-next) 38 | base=${remote_ref#refs/heads/users/*/} 39 | base=${base%/*} 40 | ;; 41 | refs/heads/cve-*|refs/heads/SLE*|refs/heads/openSUSE*) 42 | base=${remote_ref#refs/heads/} 43 | ;; 44 | *) 45 | continue;; 46 | esac 47 | 48 | if [ "$remote_sha" = $z40 ]; then 49 | range="refs/remotes/origin/$base..$local_sha" 50 | else 51 | range="$remote_sha..$local_sha" 52 | fi 53 | bugs=$(git log "$range" | grep -E '\(bsc|bnc|boo)#?[0-9]\+' | sed -e's/[^a-z0-9#]/ /g') 54 | test -z "$bugs" && continue 55 | for w in $bugs; do 56 | case "$w" in 57 | bnc\#[0-9]*|bsc\#[0-9]*|boo\#[0-9]*) 58 | bug=${w#b*#} 59 | if [ -n "${emb_bugs[$bug]}" ]; then 60 | echo >&2 "Found EMABARGO bug (in bsc#$bug) at $local_ref, not pushing" 61 | exit 1 62 | fi 63 | esac 64 | done 65 | done 66 | 67 | exit 0 68 | -------------------------------------------------------------------------------- /scripts/python/ckf-count-user-bugs: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python3 2 | import bugzilla, sys, os, json, time 3 | from bugzilla.utils import get_bugzilla_api, create_cache_dir 4 | 5 | if len(sys.argv) < 2 or len(sys.argv[1]) < 9 or "@suse" not in sys.argv[1]: 6 | sys.exit(1) 7 | 8 | def ask_bugzilla(email): 9 | bzapi = get_bugzilla_api() 10 | query = bzapi.build_query(status=['NEW', 'IN_PROGRESS', 'CONFIRMED'], 11 | assigned_to=email, 12 | include_fields=["id"]) 13 | bugs = bzapi.query(query) 14 | return len(bugs) 15 | 16 | class BugzillaCache: 17 | def __init__(self, cache_file, expiry): 18 | self.file = cache_file 19 | self.json = {} 20 | self.expiry = expiry 21 | 22 | def _load(self): 23 | if os.path.exists(self.file): 24 | with open(self.file, 'r') as f: 25 | self.json = json.load(f) 26 | return 27 | 28 | def _save(self): 29 | with open(self.file, 'w') as f: 30 | json.dump(self.json, f) 31 | 32 | def get_data(self, email): 33 | self._load() 34 | if self.json and email in self.json and self.json[email]['expiry'] > int(time.time()): 35 | return self.json[email]['number_of_bugs'] 36 | ret = ask_bugzilla(email) 37 | self.json[email] = { 'expiry': int(time.time()) + self.expiry, 'number_of_bugs': ret } 38 | self._save() 39 | return ret; 40 | 41 | def main(argv): 42 | try: 43 | ckf_dir = create_cache_dir('check-kernel-fix') 44 | cache_file = ckf_dir + os.sep + 'bugzilla_cache.json' 45 | cache = BugzillaCache(cache_file, 2 * 60 * 60) 46 | print(cache.get_data(argv[1])) 47 | except: 48 | print(0) 49 | sys.exit(5) 50 | 51 | main(sys.argv) 52 | -------------------------------------------------------------------------------- /scripts/python/tests/api/certkey.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQC8aIGs5itbRSGs 3 | E7hOpydQZzuLe1wsVJ8Iy7JAqH+aR9uoZSp6eKPJoT1xTAZ+qjwclcfgzcCqQYXX 4 | HsDCN5+Eb9tNmFT+JMI1BJ3DKBEe6FQRWA3aRnwFx9pX/AaudHX34CTYwnlwW6YZ 5 | LiTxocKY/4kp1v91/5JPt0gdcLYMkDXWIv1fAzHEYa6u2E+A5L4hyNv2uo1hULfS 6 | TvKIqj/ASzKcYvTeEIHnODg/LjH0jhnFnJC+i/oYatZjaLIlNoP3jU1GZD3cDr+u 7 | rIQR9pEjWiRjNcuUuemhHnlxSsXTbOI+8LfZe+6SZJuSsR47l+pUNy9NEOLI9U1R 8 | zSrDm94hAgMBAAECggEAD2cUyNuFSmAftVdkXyu7o09ZNxk16xrc6IVslGwiCG0c 9 | +EqS+zGvJC32HbPLKSJGKUkWbtqrSE/0fuZw+D+/Xv6dBV4xfphnNxniQuDc63Ov 10 | Yb6a3VAbVgalY0GDk1IKjeHpaT4W2vhnHxJea1Gf3M2xOzYsKsuivLkdYGjFPUgN 11 | q7KjCNxQSGQluh6Ry1LuklKJiFJA6SQFUCF8IpTkvQIGNOTo+0XGoD0gr5NzemOH 12 | dy7dDb2kNolILhu/ZuM0xxmOIBhM/3bCeZOwcEDcCYxsR3tlNfc2VqLnt/VG+BS8 13 | A+De/YGWr31sogBS2vmPaKpoYhZhejVAKI5lQ0Cj9QKBgQD4gl7Pl+mIlZT0xH+b 14 | z6X26XVAu4XN236HKLH2TIfIOE1lCeXHe8I5Vd/fjkIm7SjeFi52ypWRJcWnpDiZ 15 | TNZwO4BcKykXdMazWE9Aw3GkmQ97XyQnWH7k+CHRprsFvo8TMoEFf4YOmoRsJjv7 16 | FB0RDVsS3Fzr33yBmfDgNSkZJQKBgQDCFl1aumK/VOJ8JTkD39hUB/qMjqd+5Eai 17 | nRSOnxy0uEYV9velhW/FYjVvFC5ZU3ya6kTXyGyrtrEkN1+E+svpVoX8H+3Y8wd/ 18 | pzz5WBXLd9BrjMNCVo/KoAQtDDmgyqP3CT2LamGpBB1Kpoy5ZmltE8pYmNm7hAJp 19 | g1ipnDO2TQKBgHWHmvWNQBqju94DLOLw0uoywYyK455XZ8Deg0QcL7+GuTvG8ZBl 20 | vJbHQWkGa8zjLwfR78moyBHsjk1ZwpbmGyjbSzrMAtQgG3Vol5rmlFGnPgY4Ge4t 21 | 0V3S6JOxyhPOavZGVXTXOfygIW7Qql91xMVyzpbd92hquwTEXIJ9QeGtAoGAO3X6 22 | l8cuZYut73a/5u33KpdfLRyvN/LbqQoSuDcK5lrmLeiBqlYdDg2ubR9zq64mKJfJ 23 | C4q9sEXCM2Q7gVQMkKoPVlS525NpIrSru4A+/Rzx32E6mOJIHz2yydJK/XXXkeFk 24 | 14d57/vwtWQdDNfRSLedcFMzsX0Z+BVjXmMafKkCgYEAt5beRFRqf7t52+MbIwEF 25 | fZwiArU0aF3XLTwX8S2VgvlBfQszzD+SaazfueNI+utSTWgpxjzSnLos1LBQRcqS 26 | Nt5esGvn6NIxcYmLku3buMa3l1qIxm4eCeKCuQdWFwBTk3BNMibvdJjuZdvKxYgU 27 | t2UwKPWuCiuEdI5c0yrpTqk= 28 | -----END PRIVATE KEY----- 29 | -------------------------------------------------------------------------------- /scripts/check-my-prs: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | [ -z "$KSOURCE_GIT" ] && KSOURCE_GIT="." 4 | USER_PATTERN="users/$USER/*/for-next" 5 | [ $# -ge 1 ] && USER_PATTERN="$@" 6 | 7 | for branch in $(git -C $KSOURCE_GIT branch -l $USER_PATTERN | sed 's@.*users@users@') 8 | do 9 | upstream_branch="origin/$(echo $branch | sed 's@users/'$USER'/\(.*\)/.*@\1@')" 10 | if ! git -C $KSOURCE_GIT rev-parse --verify $upstream_branch >/dev/null 2>/dev/null 11 | then 12 | echo No upstream branch for $branch >&2 13 | continue 14 | fi 15 | 16 | remote_head="$(git -C $KSOURCE_GIT rev-parse --verify origin/$branch 2>/dev/null)" 17 | if [ -z "$remote_head" ] 18 | then 19 | echo $branch not pushed to origin >&2 20 | continue 21 | fi 22 | 23 | local_head="$(git -C $KSOURCE_GIT rev-parse --verify $branch 2>/dev/null)" 24 | if [ $local_head != $remote_head ] 25 | then 26 | echo $branch differs from origin/$branch >&2 27 | continue 28 | fi 29 | 30 | if ! git -C $KSOURCE_GIT merge-base --is-ancestor origin/$branch $upstream_branch 31 | then 32 | echo -n $branch not merged into $upstream_branch >&2 33 | 34 | read base merge state < <(ssh appolonius.suse.de "cat /srv/kbuild/user-tests/results/$branch{,.status} 2>/dev/null| tr '\n' ' '") 35 | 36 | if [ "$base" != "$remote_head" ] 37 | then 38 | d=$(date -d "$(git show --pretty=%aD $branch | head -n1)" +%s) 39 | now=$(date +%s) 40 | age=$((($now - $d)/3600)) 41 | [ $age -gt 0 ] && echo -n " still pending test ${age}h" >&2 42 | else 43 | if [ "$state" -eq 1 ] 44 | then 45 | echo -n " failed the test" >&2 46 | else 47 | d=$(date -d "$(git show --pretty=%aD $branch | head -n1)" +%s) 48 | now=$(date +%s) 49 | age=$((($now - $d)/(24*3600))) 50 | [ $age -gt 1 ] && echo -n " $age days old" >&2 51 | fi 52 | fi 53 | echo 54 | 55 | continue 56 | fi 57 | done 58 | -------------------------------------------------------------------------------- /scripts/python/git-package-submit: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python3 2 | 3 | from obsapi.uploader import Uploader 4 | from obsapi.api import APIError 5 | import argparse 6 | import sys 7 | 8 | argv = sys.argv 9 | 10 | progname = sys.argv[0] 11 | params = sys.argv[1:] 12 | 13 | parser = argparse.ArgumentParser() 14 | parser.add_argument('-A', '--apiurl', default='https://api.opensuse.org') 15 | parser.add_argument('-c', '--commit-message') 16 | parser.add_argument('-s', '--submit-request-message') 17 | parser.add_argument('-l', '--log', action='store_true') 18 | parser.add_argument('--reset-branch', action='store_true') 19 | parser.add_argument('project') 20 | parser.add_argument('package') 21 | parser.add_argument('package_directory', nargs='?') 22 | args = parser.parse_args(params) 23 | 24 | if '/' in args.project: 25 | pp = args.project.split('/') 26 | if len(pp) != 2: 27 | sys.stderr.write('Invalid project/package specification %s\n' % (args.project,)) 28 | exit(1) 29 | if args.package_directory: 30 | sys.stderr.write('Too many arguments. Required: project/package package_directory\n') 31 | args.package_directory = args.package 32 | args.package = pp[1] 33 | args.project = pp[0] 34 | else: 35 | if not args.package_directory: 36 | sys.stderr.write('Too few arguments. Required: project package package_directory\n') 37 | 38 | 39 | logfile = None 40 | if args.log: 41 | logfile = tempfile.NamedTemporaryFile(prefix=progname + '.', delete=False) 42 | sys.stderr.write('Logging API calls to %s\n' % (logfile.name,)) 43 | 44 | try: 45 | ul = Uploader(api=args.apiurl, upstream_project=args.project, user_project=None, package=args.package, reset_branch=args.reset_branch, logfile=logfile) 46 | ul.upload(args.package_directory, args.commit_message) 47 | ul.submit(args.submit_request_message) 48 | except APIError as e: 49 | sys.stderr.write('ERROR: %s\n' % (e,)) 50 | exit(1) 51 | -------------------------------------------------------------------------------- /scripts/python/tests/api/certificate12.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIFCzCCAvOgAwIBAgIUSg6Uy2wbVXuT6fKkVLgKlBVmxsowDQYJKoZIhvcNAQEL 3 | BQAwFDESMBAGA1UEAwwJMTI3LjAuMC4xMCAXDTI1MDgyMjExMDQxNloYDzIxMjUw 4 | NzI5MTEwNDE2WjAUMRIwEAYDVQQDDAkxMjcuMC4wLjEwggIiMA0GCSqGSIb3DQEB 5 | AQUAA4ICDwAwggIKAoICAQCybscwcSOk59oIQk3JYqKg4JDNdfxsLZFMLZ1MLhwr 6 | /vjC9u5jU5oZK1/fsRcBEdVpMVkTgvGc3nxR/D5bIXK97Gi/qy7NWalMmyUbpATi 7 | fBOh7yMngLvNaLBI/Wu8CP3S4rOvQf5LgFvgMRyS1e/ZMg/ud8EKrHS4lcJ7S+n1 8 | zdiX9FwJU00tSxcr/D4gm7jTqb6EoHx59pW+xeow70xfw34ZLvP5D+NjxHBSQnKR 9 | u4xxbT3CWKfmnQygc+SoVwW9OMnDVOeLye36SYISEatWx67oXl71HaIbqIdG+yMM 10 | 1c+9TNEkqVNRkh8iVpF4KC3W6g3Exlesqu/J6Yl0XWFcVNH/Oln1SCiYhonRJnRI 11 | BjSUL08WlCr4cFIU6NJLuJ+96Ud2g9Xrix5v//F2xtLmFjQwNeXpq61OIte9x03q 12 | iSbeeW0QUBc4KbHrWRvB0MJc8Wg7xxLCK7bC0Io8+98VyHyW1j4R+k+AmToy0yNm 13 | te8vsuz8yC+AyV6pG3c/jKIGVVHh9eiReyOGWTIljmOdJ6Mi3t3WpSVqVE43rQ0P 14 | AV4J7wHCmCq7TGJH1tXbW1LakjrGr33w05G/kyB6qrk/xmLL8NNnMmhnRnnZssNY 15 | Zqk6cUylbgdUb2bmwWg8vLnLgaGT4/Vzm4n90BzdzIMBuwmLPI1L1VpJNxFy9HO8 16 | nQIDAQABo1MwUTAdBgNVHQ4EFgQUrgDKpFOybleMw8HFr24aLwY0rVQwHwYDVR0j 17 | BBgwFoAUrgDKpFOybleMw8HFr24aLwY0rVQwDwYDVR0TAQH/BAUwAwEB/zANBgkq 18 | hkiG9w0BAQsFAAOCAgEAX3SIUstc4qRteYEUhucIddTtDEysMAJxgqUgJlyOKno7 19 | ZSnNlsHeeEZUfpCvomNYlR2hwiv8F3Fh0TwTy4fDa4oJoIWPsCPoVB0DsG77zs8O 20 | O3WHPOknwctbTB/Eyi7cqhhjbp2zGUDF5UXHtDZ5a1GJLm29nvkFJG7nFfM6NsHO 21 | o2XbojHw9uFQV+zsN0gcv8NVuTH0uu8TzcBBUEHK/hxNpAE4WEXD4zMWHnUKrpMj 22 | iSazao5FFtP+ejpa1ldVwDAK60s7aUec7vt15IcGNXRjvZ3gBX8ARbrapl8AipBa 23 | uXvHE5swu5Baudwq46PIefOCoxGkDxLiYJFwaDuGpuz+OEbCwMBdRYfQtsQ1BBSS 24 | c87/lIpH0xY/SVXHlcACaAmZsBjifXZpZV9LGRLBvBk8XfQ2i3ycziQh4WRA4yfs 25 | Jy6sLMYpqNNj4dkxvwT7CvgftHi03ZrT45UIfGJViMkOYoOMRQ/sBu54hnw1KmhP 26 | QUanczbm510thxwZA83Sk2BmOQrhIVjyz/IdUVEEh6Vov1VMtJ9wk/yt5TcUsyPY 27 | HSh/YNbmyP0br2qcg6fxKN3E/TIy8Mytv+CGR+Lms8RcBawI7/FnsRoKTSwRX6Nl 28 | Ns1Y2uVhcjBjIElOi0Qzz8alYaEARYNjthuLCr5InfexcvdapS4E2nUaCMV0skA= 29 | -----END CERTIFICATE----- 30 | -------------------------------------------------------------------------------- /scripts/python/git_sort/pygit2_wrapper.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | # Copyright (C) 2019 SUSE LLC 4 | # 5 | # This program is free software; you can redistribute it and/or 6 | # modify it under the terms of the GNU General Public License 7 | # as published by the Free Software Foundation; either version 2 8 | # of the License, or (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with this program; if not, write to the Free Software 17 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 18 | # USA. 19 | 20 | import sys 21 | 22 | try: 23 | from pygit2 import * 24 | from pygit2 import __version__ 25 | if 'GIT_OBJ_TAG' in dir() and 'GIT_OBJECT_TAG' not in dir(): 26 | GIT_OBJECT_TAG = GIT_OBJ_TAG 27 | GIT_OBJECT_COMMIT = GIT_OBJ_COMMIT 28 | if 'enums' in dir(): 29 | if hasattr(enums.ReferenceType, 'DIRECT'): 30 | GIT_REF_OID = enums.ReferenceType.DIRECT 31 | if __version__ < '1': 32 | import pathlib 33 | _old_init_repository = init_repository 34 | def _fix_init_repository(*args, **kwargs): 35 | args = [str(a) if isinstance(a, pathlib.PurePath) else a for a in args] 36 | return _old_init_repository(*args, **kwargs) 37 | init_repository = _fix_init_repository 38 | except ImportError as err: 39 | print("Error: %s" % (err,), file=sys.stderr) 40 | print("Please install the \"pygit2\" python3 module. For more details, " 41 | "please refer to the \"Installation Requirements\" section of " 42 | "\"scripts/git_sort/README.md\".", file=sys.stderr) 43 | sys.exit(1) 44 | -------------------------------------------------------------------------------- /scripts/python/www_authenticate/tests.py: -------------------------------------------------------------------------------- 1 | import itertools 2 | import unittest 3 | 4 | import www_authenticate 5 | 6 | challenges = ( 7 | ('Negotiate', 8 | ('negotiate', None)), 9 | ('Negotiate abcdef', 10 | ('negotiate', 'abcdef')), 11 | ('Negotiate abcdef=', 12 | ('negotiate', 'abcdef=')), 13 | ('Negotiate abcdef==', 14 | ('negotiate', 'abcdef==')), 15 | ('Bearer realm=example.com', 16 | ('bearer', {'realm': 'example.com'})), 17 | ('Bearer realm="example.com"', 18 | ('bearer', {'realm': 'example.com'})), 19 | ('Digest realm="example.com", qop="auth,auth-int", nonce="abcdef", opaque="ghijkl"', 20 | ('digest', {'realm': 'example.com', 'qop': 'auth,auth-int', 'nonce': 'abcdef', 'opaque': 'ghijkl'})), 21 | ) 22 | 23 | 24 | class ParseTestCase(unittest.TestCase): 25 | def testValid(self): 26 | for r in range(1, len(challenges) + 1): 27 | for permutation in itertools.permutations(challenges, r): 28 | # Skip those that have the same authentication scheme more than once. 29 | if len(set(challenge[1][0] for challenge in permutation)) != len(permutation): 30 | continue 31 | # Skip any permutation that contains a Negotiate challenge 32 | # with a token, if it's not the only challenge. 33 | if len(permutation) > 1 and \ 34 | any(challenge[1][0] == 'negotiate' and challenge[1][1] != None 35 | for challenge in permutation): 36 | continue 37 | full_challenge = ', '.join(challenge[0] for challenge in permutation) 38 | print(full_challenge) 39 | parsed = www_authenticate.parse(full_challenge) 40 | for left, right in zip(permutation, parsed): 41 | self.assertEqual(left[1][0], right) 42 | self.assertEqual(left[1][1], parsed[right]) 43 | 44 | -------------------------------------------------------------------------------- /rpm/check-for-config-changes: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | # This is a list of toolchain-dependent configs. That is: only those which 4 | # change .config when gcc, ld, or similar changes. 5 | # 6 | # please keep them sorted alphabetically 7 | declare -a IGNORED_CONFIGS_RE=( 8 | 'ARCH_USING_PATCHABLE_FUNCTION_ENTRY' 9 | 'AS_IS_\(GNU\|LLVM\)' 10 | 'AS_HAS_[A-Z0-9_]*' 11 | 'AS_VERSION' 12 | 'AS_WRUSS' # x86_32 13 | 'BUILTIN_RETURN_ADDRESS_STRIPS_PAC' 14 | 'CC_ASM_FLAG_OUTPUT_BROKEN' 15 | 'CC_CAN_[A-Z_]*' 16 | 'CC_IMPLICIT_FALLTHROUGH' 17 | 'CC_IS_\(CLANG\|GCC\)' 18 | 'CC_HAS_[A-Z_]*' 19 | 'CC_HAVE_[A-Z_]*' 20 | 'CC_VERSION_TEXT' 21 | 'CLANG_VERSION' 22 | 'DRM_MSM_VALIDATE_XML' 23 | 'DYNAMIC_SIGFRAME' 24 | 'FTRACE_MCOUNT_USE_[A-Z_]*' 25 | 'GCC_ASM_FLAG_OUTPUT_BROKEN' 26 | 'GCC_ASM_GOTO_OUTPUT_BROKEN' 27 | 'GCC_ASM_GOTO_OUTPUT_WORKAROUND' 28 | 'GCC_VERSION' 29 | 'G*CC[0-9]*_NO_[A-Z_]*' 30 | 'HAS_LTO_CLANG' 31 | 'HAVE_[A-Z]*_COMPILER' 32 | 'HAVE_RUST' 33 | 'HAVE_SHADOW_CALL_STACK' 34 | 'LD_CAN_[A-Z_]*' 35 | 'LD_IS_\(BFD\|LLD\)' 36 | 'LD_VERSION' 37 | 'LLD_VERSION' 38 | 'OBJTOOL' 39 | 'PAHOLE_HAS_[A-Z0-9_]*' 40 | 'PAHOLE_VERSION' 41 | 'RISCV_ISA_[A-Z_]*' 42 | 'RUSTC_SUPPORTS_[A-Z0-9_]*' 43 | 'SCHED_PROXY_EXEC' 44 | 'TOOLCHAIN_HAS_[A-Z_]*' 45 | 'TOOLCHAIN_NEEDS_[A-Z_]*' 46 | 'TOOLS_SUPPORT_[A-Z_]*' 47 | 'USE_X86_SEG_SUPPORT' 48 | ) 49 | 50 | declare -a SED_ARGS=() 51 | 52 | for CONFIG in "${IGNORED_CONFIGS_RE[@]}"; do 53 | SED_ARGS+=(-e "/\\/ d") 54 | done 55 | 56 | SED_ARGS+=( 57 | -e '/^# .* is not set$/p' 58 | -e '/^$\|^#/d' 59 | ) 60 | 61 | differences="$( 62 | diff -bU0 <(sed "${SED_ARGS[@]}" "$1" | sort) \ 63 | <(sed "${SED_ARGS[@]}" "$2" | sort) \ 64 | | grep '^[-+][^-+]' 65 | )" || true 66 | if [ -n "$differences" ]; then 67 | echo 68 | echo "Changes after running \`make oldconfig':" 69 | echo "$differences" 70 | echo 71 | if echo "$differences" | grep -q '^+' ; then 72 | exit 1 73 | fi 74 | fi 75 | -------------------------------------------------------------------------------- /patches.suse/wifi-iwlwifi-Add-missing-firmware-info-for-bz-b0-mod.patch: -------------------------------------------------------------------------------- 1 | From: Takashi Iwai 2 | Subject: [PATCH] wifi: iwlwifi: Add missing firmware info for bz-b0-* models 3 | Date: Wed, 15 Oct 2025 16:12:56 +0200 4 | Message-id: <20251015141307.25305-1-tiwai@suse.de> 5 | Patch-mainline: Submitted, linux-wireless ML 6 | References: bsc#1252084 7 | 8 | The module firmware info is missing for iwlwifi-bz-b0-* models, which 9 | results in the non-working WiFi on some installers or images. 10 | 11 | Add the entries for iwlwifi-bz-b0-fm-c0, iwlwifi-bz-b0-gf-a0 and 12 | iwlwifi-bz-b0-hr-b0. 13 | 14 | Link: https://bugzilla.suse.com/show_bug.cgi?id=1252084 15 | Signed-off-by: Takashi Iwai 16 | 17 | --- 18 | drivers/net/wireless/intel/iwlwifi/cfg/bz.c | 7 +++++++ 19 | 1 file changed, 7 insertions(+) 20 | 21 | --- a/drivers/net/wireless/intel/iwlwifi/cfg/bz.c 22 | +++ b/drivers/net/wireless/intel/iwlwifi/cfg/bz.c 23 | @@ -22,6 +22,9 @@ 24 | #define IWL_BZ_A_FM_B_FW_PRE "iwlwifi-bz-a0-fm-b0" 25 | #define IWL_BZ_A_FM_C_FW_PRE "iwlwifi-bz-a0-fm-c0" 26 | #define IWL_BZ_A_FM4_B_FW_PRE "iwlwifi-bz-a0-fm4-b0" 27 | +#define IWL_BZ_B_FM_C_FW_PRE "iwlwifi-bz-b0-fm-c0" 28 | +#define IWL_BZ_B_GF_A_FW_PRE "iwlwifi-bz-b0-gf-a0" 29 | +#define IWL_BZ_B_HR_B_FW_PRE "iwlwifi-bz-b0-hr-b0" 30 | #define IWL_GL_B_FM_B_FW_PRE "iwlwifi-gl-b0-fm-b0" 31 | #define IWL_GL_C_FM_C_FW_PRE "iwlwifi-gl-c0-fm-c0" 32 | 33 | @@ -104,5 +107,9 @@ const struct iwl_mac_cfg iwl_gl_mac_cfg 34 | IWL_CORE_FW(IWL_BZ_A_FM_B_FW_PRE, IWL_BZ_UCODE_CORE_MAX); 35 | IWL_CORE_FW(IWL_BZ_A_FM_C_FW_PRE, IWL_BZ_UCODE_CORE_MAX); 36 | IWL_CORE_FW(IWL_BZ_A_FM4_B_FW_PRE, IWL_BZ_UCODE_CORE_MAX); 37 | +IWL_CORE_FW(IWL_BZ_B_FM_C_FW_PRE, IWL_BZ_UCODE_CORE_MAX); 38 | +IWL_CORE_FW(IWL_BZ_B_GF_A_FW_PRE, IWL_BZ_UCODE_CORE_MAX); 39 | +IWL_CORE_FW(IWL_BZ_B_HR_B_FW_PRE, IWL_BZ_UCODE_CORE_MAX); 40 | IWL_CORE_FW(IWL_GL_B_FM_B_FW_PRE, IWL_BZ_UCODE_CORE_MAX); 41 | IWL_CORE_FW(IWL_GL_C_FM_C_FW_PRE, IWL_BZ_UCODE_CORE_MAX); 42 | + 43 | -------------------------------------------------------------------------------- /rpm/compute-PATCHVERSION.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | export LANG=POSIX 4 | 5 | path=(.) 6 | while test $# -gt 0; do 7 | case "$1" in 8 | --patches) 9 | path[${#path[@]}]=$2 10 | shift 2 11 | ;; 12 | *) 13 | echo "Usage $0 [--patches ]" >&2 14 | exit 1 15 | esac 16 | done 17 | if test "${path[*]}" = "."; then 18 | path=(. ..) 19 | fi 20 | 21 | 22 | source $(dirname $0)/config.sh 23 | parse_srcversion() 24 | { 25 | local IFS=. 26 | set -- ${SRCVERSION%%-*} 27 | VERSION=$1 28 | PATCHLEVEL=${2:-0} 29 | SUBLEVEL=${3:-0} 30 | EXTRAVERSION=${SRCVERSION#${SRCVERSION%%-*}} 31 | } 32 | parse_srcversion 33 | 34 | EXTRA_SYMBOLS=$(set -- $([ -e $(dirname $0)/extra-symbols ] && cat $(dirname $0)/extra-symbols) ; echo $*) 35 | 36 | series=$(mktemp) 37 | tmp_files="$series" 38 | trap 'rm -rf $tmp_files' EXIT 39 | warned=false 40 | while read patch; do 41 | dir=${patch%/*} 42 | for p in "${path[@]}"; do 43 | if test -e "$p/$patch"; then 44 | echo "$p/$patch" 45 | continue 2 46 | fi 47 | done 48 | for p in "${path[@]}"; do 49 | if test -e "$p/$dir.tar.bz2"; then 50 | echo "unpacking $p/$dir.tar.bz2" >&2 51 | if ! $warned; then 52 | echo "pass --patches to avoid this" >&2 53 | warned=true 54 | fi 55 | tmp_files="$tmp_files $dir" 56 | tar -xjf "$p/$dir.tar.bz2" 57 | echo "$patch" 58 | continue 2 59 | fi 60 | done 61 | echo "Can't find $patch" >&2 62 | exit 1 63 | done >"$series" < <($(dirname $0)/guards $EXTRA_SYMBOLS 1 : 24 | parser.error("Only one filename can be used with --stdin") 25 | sys.exit(128) 26 | 27 | errors = 0 28 | if options.stdin: 29 | if args: 30 | fn = args[0] 31 | else: 32 | fn = "" 33 | try: 34 | checker = header.Checker(sys.stdin, options.update, fn) 35 | except header.HeaderException as e: 36 | print(e.error_message(fn), file=sys.stderr) 37 | if not fn.startswith("patches.xen/"): 38 | errors += 1 39 | else: 40 | for fn in args: 41 | try: 42 | f = open(fn) 43 | checker = header.Checker(f, options.update, fn) 44 | f.close() 45 | except header.HeaderException as e: 46 | print(e.error_message(fn), file=sys.stderr) 47 | if not fn.startswith("patches.xen/"): 48 | errors += 1 49 | if errors > 1: 50 | print("", file=sys.stderr) 51 | 52 | if errors: 53 | print("Please check README file for patch tag rules.", file=sys.stderr) 54 | sys.exit(1) 55 | -------------------------------------------------------------------------------- /scripts/git-fixes: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | _libdir=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")") 4 | 5 | . "$_libdir"/wd-functions.sh 6 | gitdir=$("$_libdir"/linux_git.sh) 7 | 8 | if ! $using_git; then 9 | echo "ERROR: not in a git working directory." 10 | exit 1 11 | fi 12 | 13 | trap 'rm -rf "$tmp"' EXIT 14 | tmp=$(mktemp -d /tmp/${0##*/}.XXXXXX) 15 | 16 | if [[ -n $1 ]]; then 17 | base="${1}" 18 | else 19 | base=$(git symbolic-ref --short HEAD) 20 | ret=$? 21 | if [[ $ret -ne 0 ]]; then 22 | echo "Try calling \`$0 \` or setup tracking branch with \`git branch -u ...\`." >&2 23 | exit $ret 24 | fi 25 | base=$(echo $base | sed 's@users/'$USER'/\(.*\)/for-next@origin/\1@') 26 | fi 27 | tag=v$(source rpm/config.sh; echo "$SRCVERSION") 28 | git --git-dir=$gitdir describe $tag > /dev/null || { echo Cannot find $tag in $gitdir ; exit 1 ; } 29 | 30 | fixes_res=0 31 | 32 | git suse -f "$tmp/gf-ign" --blacklist "$tmp/gf-bl" \ 33 | --path-blacklist "$tmp/gf-pbl" &>>"$tmp/check" 34 | fixes_cur=$?; [ $fixes_cur = 0 ] || fixes_res=$fixes_cur 35 | git suse -f "$tmp/gf-commits" --base "$base" \ 36 | &>>"$tmp/check" 37 | if [ ! -s "$tmp/gf-commits" ] 38 | then 39 | echo "PASS (0 commits checked)" 40 | exit 0 41 | fi 42 | 43 | fixes_cur=$?; [ $fixes_cur = 0 ] || fixes_res=$fixes_cur 44 | git fixes -f "$tmp/gf-commits" --blacklist "$tmp/gf-bl" \ 45 | --path-blacklist "$tmp/gf-pbl" \ 46 | --ignore-file "$tmp/gf-ign" \ 47 | --repo $gitdir \ 48 | --no-grouping "$tag..origin/master" &>>"$tmp/check" 49 | #FIXME ^^^^^^^^^^^^ hardcoded 50 | fixes_cur=$?; [ $fixes_cur = 0 ] || fixes_res=$fixes_cur 51 | if [ $fixes_res = 0 ] && grep -q '^Nothing found$' "$tmp/check"; then 52 | echo "PASS ($(grep 'gf-commits$' $tmp/check | cut -d' ' -f2) commits checked)" 53 | else 54 | echo FAIL 55 | echo "git fixes output:" 56 | cat "$tmp/check" 57 | echo 58 | echo "Please include these fixes or add the commit ids to blacklist.conf" 59 | # do not fail automerge due to missing fixes 60 | fi 61 | 62 | # vim: et:sts=4:sw=4 63 | -------------------------------------------------------------------------------- /scripts/python/tests/api/obsapi_pkgrepo_nonexistent_pkg: -------------------------------------------------------------------------------- 1 | --- 2 | args: {} 3 | code: 404 4 | content: !!binary | 5 | PHN0YXR1cyBjb2RlPSI0MDQiPgogIDxzdW1tYXJ5PnBhY2thZ2UgJ2tlcm5lbC1zb3VyY2UtZm9v 6 | YmFyJyBkb2VzIG5vdCBleGlzdCBpbiBwcm9qZWN0ICdTVVNFOlNMRk86MS4yJzwvc3VtbWFyeT4K 7 | ICA8ZGV0YWlscz40MDQgcGFja2FnZSAna2VybmVsLXNvdXJjZS1mb29iYXInIGRvZXMgbm90IGV4 8 | aXN0IGluIHByb2plY3QgJ1NVU0U6U0xGTzoxLjInPC9kZXRhaWxzPgo8L3N0YXR1cz4K 9 | encoding: null 10 | headers: 11 | - date: Wed, 27 Aug 2025 09:28:43 GMT 12 | - server: Apache/2.4.62 (Linux/SUSE) 13 | - strict-transport-security: max-age=31536000 14 | - cache-control: private, no-transform 15 | - referrer-policy: strict-origin-when-cross-origin 16 | - x-permitted-cross-domain-policies: none 17 | - x-xss-protection: '0' 18 | - x-opensuse-runtimes: '{"view":null,"db":8.024598471820354,"backend":0}' 19 | - x-request-id: 2311612f-a99c-41a3-be6a-2f504c6a99d9 20 | - x-opensuse-apiversion: 2.11~alpha.20250819T121401.f2dfe901d4 21 | - x-download-options: noopen 22 | - x-runtime: '0.016771' 23 | - x-frame-options: SAMEORIGIN 24 | - x-content-type-options: nosniff 25 | - x-powered-by: Phusion Passenger(R) 6.0.27 26 | - content-type: text/xml 27 | - cache-control: no-cache 28 | - content-length: '222' 29 | - access-control-allow-origin: https://build.suse.de 30 | - access-control-allow-credentials: 'true' 31 | - connection: close 32 | method: GET 33 | path: /source/SUSE:SLFO:1.2/kernel-source-foobar/_meta 34 | reason: package 'kernel-source-foobar' does not exist in project 'SUSE SLFO 1.2' 35 | request: 36 | body: null 37 | headers: {} 38 | method: GET 39 | unredirected_hdrs: 40 | Cookie: openSUSE_session=RedacteD 41 | Host: api.suse.de 42 | User-agent: Python-urllib/3.11 43 | url: https://api.suse.de/source/SUSE:SLFO:1.2/kernel-source-foobar/_meta 44 | text: "\n package 'kernel-source-foobar' does not exist\ 45 | \ in project 'SUSE:SLFO:1.2'\n
404 package 'kernel-source-foobar'\ 46 | \ does not exist in project 'SUSE:SLFO:1.2'
\n
\n" 47 | url: https://api.suse.de/source/SUSE:SLFO:1.2/kernel-source-foobar/_meta 48 | -------------------------------------------------------------------------------- /scripts/check-patch-dirs: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ############################################################################# 4 | # Copyright (c) 2017 SUSE 5 | # All Rights Reserved. 6 | # 7 | # This program is free software; you can redistribute it and/or 8 | # modify it under the terms of version 2 of the GNU General Public License as 9 | # published by the Free Software Foundation. 10 | # 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program; if not, contact Novell, Inc. 18 | # 19 | # To contact SUSE about this file by physical or electronic mail, 20 | # you may find current contact information at www.suse.com 21 | ############################################################################# 22 | 23 | . ${0%/*}/wd-functions.sh 24 | 25 | branch="$(get_branch_name)" 26 | 27 | result=true 28 | check=false 29 | 30 | # This policy starts with master and stable but will apply to 31 | # future releases starting with SLE15-SP1 and the next openSUSE release 32 | # following 42.3 33 | case $branch in 34 | SLES9*|SLES10*|SLE11-*|SLE12-*|SLE15) 35 | ;; 36 | openSUSE-1*|openSUSE-42.[123]) 37 | ;; 38 | *) 39 | check=true 40 | ;; 41 | esac 42 | 43 | if $check; then 44 | for file in "$@"; do 45 | # We don't care about anything outside of the patches.* directories 46 | case "$file" in 47 | patches.*) 48 | ;; 49 | *) 50 | continue 51 | ;; 52 | esac 53 | 54 | case "$file" in 55 | patches.suse/*|patches.rpmify/*|patches.kabi/*|patches.kernel.org/*) 56 | ;; 57 | *) 58 | echo "** $file is in obsolete directory \"${file%%/*}\"" 59 | result=false 60 | ;; 61 | esac 62 | done 63 | 64 | if ! $result; then 65 | echo "Valid patch directories are:" 66 | echo "* patches.kernel.org" 67 | echo "* patches.rpmify" 68 | echo "* patches.kabi" 69 | echo "* patches.suse" 70 | fi 71 | fi 72 | 73 | $result 74 | -------------------------------------------------------------------------------- /scripts/git_sort/check_missing_fixes.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Copyright (C) 2018 SUSE LLC 4 | # 5 | # This program is free software; you can redistribute it and/or 6 | # modify it under the terms of the GNU General Public License 7 | # as published by the Free Software Foundation; either version 2 8 | # of the License, or (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with this program; if not, write to the Free Software 17 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 18 | # USA. 19 | 20 | # Check if a commit is referenced in the log of later commits. 21 | # Useful to identify missing followup commits. 22 | 23 | 24 | progname=$(basename "$0") 25 | usage () { 26 | echo "Usage: $progname [OPTIONS]" 27 | echo "" 28 | cat <<"EOD" 29 | Read a list of git hashes from stdin and print information about commits which 30 | reference these hashes in their log and which are not part of the list. 31 | 32 | The input list must be partially ordered such that if it already contains some 33 | fixes, they appear after the commit they fix. Otherwise, fixes may appear 34 | multiple times in the output. Use `git sort` if needed. 35 | 36 | Options: 37 | -h Print this help 38 | EOD 39 | } 40 | 41 | while getopts ":h" opt; do 42 | case $opt in 43 | h) 44 | usage 45 | exit 0 46 | ;; 47 | ?) 48 | echo "Invalid option: -$OPTARG" >&2 49 | exit 1 50 | ;; 51 | esac 52 | done 53 | 54 | indent=" " 55 | declare -a known 56 | tac | while read line; do 57 | commit=$(git rev-parse --short=7 $(echo "$line" | awk '{print $1}')) 58 | git log --no-merges --pretty="$indent%h %s" --grep="$commit" $commit.. | \ 59 | grep -vf <(echo -n "${known[@]}" | \ 60 | awk 'BEGIN {RS=" "} {print "^'"$indent"'" $1}') 61 | known+=("$commit") 62 | echo "$line" 63 | done | tac 64 | -------------------------------------------------------------------------------- /patches.suse/firmware-qemu_fw_cfg-Do-not-hard-depend-on-CONFIG_HA.patch: -------------------------------------------------------------------------------- 1 | From: Fabian Vogt 2 | Date: Thu, 31 Aug 2023 10:35:58 +0200 3 | Subject: firmware: qemu_fw_cfg: Do not hard depend on CONFIG_HAS_IOPORT_MAP 4 | Message-ID: <2294036.ElGaqSPkdT@linux-e202.suse.de> 5 | Patch-mainline: Submitted, qemu-devel ML 6 | References: bsc#1214773 7 | 8 | Some platforms require CONFIG_NO_IOPORT_MAP=y but would also support 9 | qemu_fw_cfg over MMIO. Currently the qemu_fw_cfg module can't be built for 10 | those as it needs HAS_IOPORT_MAP=y for ioport remapping. 11 | 12 | This patch allows to build the qemu_fw_cfg in those cases. If 13 | CONFIG_HAS_IOPORT_MAP=n, qemu_fw_cfg is built without support for ioport 14 | based access. 15 | 16 | Signed-off-by: Fabian Vogt 17 | Signed-off-by: Takashi Iwai 18 | 19 | --- 20 | drivers/firmware/Kconfig | 1 - 21 | drivers/firmware/qemu_fw_cfg.c | 5 +++++ 22 | 2 files changed, 5 insertions(+), 1 deletion(-) 23 | 24 | --- a/drivers/firmware/Kconfig 25 | +++ b/drivers/firmware/Kconfig 26 | @@ -132,7 +132,6 @@ config RASPBERRYPI_FIRMWARE 27 | config FW_CFG_SYSFS 28 | tristate "QEMU fw_cfg device support in sysfs" 29 | depends on SYSFS && (ARM || ARM64 || PARISC || PPC_PMAC || RISCV || SPARC || X86) 30 | - depends on HAS_IOPORT_MAP 31 | default n 32 | help 33 | Say Y or M here to enable the exporting of the QEMU firmware 34 | --- a/drivers/firmware/qemu_fw_cfg.c 35 | +++ b/drivers/firmware/qemu_fw_cfg.c 36 | @@ -258,6 +258,7 @@ static int fw_cfg_do_platform_probe(struct platform_device *pdev) 37 | return -EFAULT; 38 | } 39 | } else { 40 | +#ifdef CONFIG_HAS_IOPORT_MAP 41 | if (!request_region(fw_cfg_p_base, 42 | fw_cfg_p_size, "fw_cfg_io")) 43 | return -EBUSY; 44 | @@ -266,6 +267,10 @@ static int fw_cfg_do_platform_probe(struct platform_device *pdev) 45 | release_region(fw_cfg_p_base, fw_cfg_p_size); 46 | return -EFAULT; 47 | } 48 | +#else 49 | + dev_err(&pdev->dev, "IO region given but CONFIG_HAS_IOPORT_MAP=n"); 50 | + return -EINVAL; 51 | +#endif 52 | } 53 | 54 | /* were custom register offsets provided (e.g. on the command line)? */ 55 | -------------------------------------------------------------------------------- /patches.rpmify/usrmerge-Adjust-module-path-in-the-kernel-sources.patch: -------------------------------------------------------------------------------- 1 | From bb1a83cf109eee56c8dee26f7910c772f8c246fc Mon Sep 17 00:00:00 2001 2 | From: Michal Suchanek 3 | Date: Thu, 29 Jun 2023 17:47:16 +0200 4 | Subject: [PATCH] depmod: Handle installing modules under a prefix 5 | 6 | References: bsc#1212835 7 | Patch-mainline: Never, upstream rejected 8 | 9 | Some distributions aim at shipping all files in /usr. 10 | 11 | The path under which kernel modules are installed is hardcoded to /lib 12 | which conflicts with this goal. 13 | 14 | When kmod provides the config command, use it to determine the correct 15 | module installation path. 16 | 17 | With kmod that does not provide the config command /lib/modules is used 18 | as before. 19 | 20 | Note: users can use 21 | 22 | make MODLIB='$(INSTALL_MOD_PATH)/usr/lib/modules/$(KERNELRELEASE)' 23 | 24 | to install modules from mainline kernel on usrmerged system. 25 | Not great for KMPs, though 26 | 27 | Signed-off-by: Michal Suchanek 28 | Nacked-by: Masahiro Yamada 29 | --- 30 | v2: Avoid error on systems with kmod that does not support config 31 | command 32 | v3: More verbose commit message 33 | v4: 34 | - Document jq requirement 35 | - fix bashism 36 | - Update to getting full module path, not just additional prefix 37 | v5: switch to pkgconfig 38 | --- 39 | Makefile | 4 +++- 40 | 1 file changed, 3 insertions(+), 1 deletion(-) 41 | 42 | diff --git a/Makefile b/Makefile 43 | index 658ec2b8aa74..5a1889fc43c7 100644 44 | --- a/Makefile 45 | +++ b/Makefile 46 | @@ -1165,7 +1165,9 @@ export INSTALL_DTBS_PATH ?= $(INSTALL_PATH)/dtbs/$(KERNELRELEASE) 47 | # makefile but the argument can be passed to make if needed. 48 | # 49 | 50 | -MODLIB = $(INSTALL_MOD_PATH)/lib/modules/$(KERNELRELEASE) 51 | +export KERNEL_MODULE_DIRECTORY := $(shell pkg-config --print-variables kmod 2>/dev/null | grep '^module_directory$$' >/dev/null && pkg-config --variable=module_directory kmod || echo /lib/modules) 52 | + 53 | +MODLIB = $(INSTALL_MOD_PATH)$(KERNEL_MODULE_DIRECTORY)/$(KERNELRELEASE) 54 | export MODLIB 55 | 56 | PHONY += prepare0 57 | -- 58 | 2.41.0 59 | 60 | -------------------------------------------------------------------------------- /scripts/python/tests/kutil/rpm/krn/kernel-obs-build.spec: -------------------------------------------------------------------------------- 1 | # 2 | # spec file for package kernel-obs-build 3 | # 4 | # Copyright (c) 2025 SUSE LLC 5 | # 6 | # All modifications and additions to the file contributed by third parties 7 | # remain the property of their copyright owners, unless otherwise agreed 8 | # upon. The license for this file, and modifications and additions to the 9 | # file, is the same license as for the pristine package itself (unless the 10 | # license for the pristine package is not an Open Source License, in which 11 | # case the license is the MIT License). An "Open Source License" is a 12 | # license that conforms to the Open Source Definition (Version 1.9) 13 | # published by the Open Source Initiative. 14 | 15 | # Please submit bugfixes or comments via https://bugs.opensuse.org/ 16 | # 17 | # needsrootforbuild 18 | 19 | 20 | #!BuildIgnore: post-build-checks 21 | 22 | %define patchversion 6.4.0 23 | %define variant %{nil} 24 | 25 | %include %_sourcedir/kernel-spec-macros 26 | 27 | %if 0%{?suse_version} 28 | %if "%{nil}" 29 | %global kernel_flavor %{nil} 30 | %else 31 | %ifarch %ix86 32 | %global kernel_flavor -pae 33 | %else 34 | %ifarch armv7l armv7hl 35 | %global kernel_flavor -lpae 36 | %else 37 | %global kernel_flavor -default 38 | %endif 39 | %endif 40 | %endif 41 | %global kernel_package kernel%kernel_flavor-srchash-ece3f96068f9dd4e96094e07980a9a1c7987c4a9 42 | %endif 43 | %if 0%{?rhel_version} 44 | %global kernel_package kernel 45 | %endif 46 | 47 | Name: kernel-obs-build 48 | Version: 6.4.0 49 | %if 0%{?is_kotd} 50 | Release: .gece3f96 51 | %else 52 | Release: 0 53 | %endif 54 | Summary: package kernel and initrd for OBS VM builds 55 | License: GPL-2.0-only 56 | Group: SLES 57 | Provides: kernel-obs-build-srchash-ece3f96068f9dd4e96094e07980a9a1c7987c4a9 58 | BuildRequires: coreutils 59 | BuildRequires: device-mapper 60 | BuildRequires: dracut 61 | BuildRequires: %kernel_package 62 | BuildRequires: util-linux 63 | %if 0%{?suse_version} > 1550 || 0%{?sle_version} > 150200 64 | BuildRequires: zstd 65 | %endif 66 | ExclusiveArch: aarch64 armv7hl ppc64le s390x x86_64 67 | -------------------------------------------------------------------------------- /scripts/python/qgoto: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python3 2 | # -*- coding: utf-8 -*- 3 | 4 | # Copyright (C) 2018 SUSE LLC 5 | # 6 | # This program is free software; you can redistribute it and/or 7 | # modify it under the terms of the GNU General Public License 8 | # as published by the Free Software Foundation; either version 2 9 | # of the License, or (at your option) any later version. 10 | # 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program; if not, write to the Free Software 18 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 19 | # USA. 20 | 21 | import argparse 22 | import os 23 | import subprocess 24 | import sys 25 | from git_sort import lib 26 | from suse_git import exc 27 | 28 | 29 | if __name__ == "__main__": 30 | parser = argparse.ArgumentParser( 31 | description="Print the quilt push or pop command required to reach the " 32 | "position where the specified commit should be imported.") 33 | parser.add_argument("rev", help="Upstream commit id.") 34 | args = parser.parse_args() 35 | 36 | if not lib.check_series(): 37 | sys.exit(1) 38 | 39 | try: 40 | top = subprocess.check_output( 41 | ("quilt", "--quiltrc", "-", "top",), 42 | stderr=subprocess.STDOUT).decode().strip() 43 | except subprocess.CalledProcessError as err: 44 | if err.output.decode() == "No patches applied\n": 45 | top = None 46 | else: 47 | raise 48 | 49 | series = open("series") 50 | os.chdir("patches") 51 | 52 | try: 53 | (name, delta,) = lib.sequence_insert(series, args.rev, top) 54 | except exc.KSException as err: 55 | print("Error: %s" % (err,), file=sys.stderr) 56 | sys.exit(1) 57 | 58 | if delta > 0: 59 | print("push %d" % (delta,)) 60 | elif delta < 0: 61 | print("pop %d" % (-1 * delta,)) 62 | -------------------------------------------------------------------------------- /scripts/python/tests/kutil/rpm/krnf/kernel-obs-build.spec: -------------------------------------------------------------------------------- 1 | # 2 | # spec file for package kernel-obs-build 3 | # 4 | # Copyright (c) 2025 SUSE LLC 5 | # 6 | # All modifications and additions to the file contributed by third parties 7 | # remain the property of their copyright owners, unless otherwise agreed 8 | # upon. The license for this file, and modifications and additions to the 9 | # file, is the same license as for the pristine package itself (unless the 10 | # license for the pristine package is not an Open Source License, in which 11 | # case the license is the MIT License). An "Open Source License" is a 12 | # license that conforms to the Open Source Definition (Version 1.9) 13 | # published by the Open Source Initiative. 14 | 15 | # Please submit bugfixes or comments via https://bugs.opensuse.org/ 16 | # 17 | # needsrootforbuild 18 | 19 | 20 | #!BuildIgnore: post-build-checks 21 | 22 | %define patchversion 6.17.1 23 | %define variant %{nil} 24 | 25 | %include %_sourcedir/kernel-spec-macros 26 | 27 | %if 0%{?suse_version} 28 | %if "%{nil}" 29 | %global kernel_flavor %{nil} 30 | %else 31 | %ifarch %ix86 32 | %global kernel_flavor -pae 33 | %else 34 | %ifarch armv7l armv7hl 35 | %global kernel_flavor -lpae 36 | %else 37 | %global kernel_flavor -default 38 | %endif 39 | %endif 40 | %endif 41 | %global kernel_package kernel%kernel_flavor-srchash-513d2ec25a33ba4bd970269abb48e060007939b7 42 | %endif 43 | %if 0%{?rhel_version} 44 | %global kernel_package kernel 45 | %endif 46 | 47 | Name: kernel-obs-build 48 | Version: 6.17.1 49 | %if 0%{?is_kotd} 50 | Release: .g513d2ec 51 | %else 52 | Release: 0 53 | %endif 54 | Summary: package kernel and initrd for OBS VM builds 55 | License: GPL-2.0-only 56 | Group: SLES 57 | Provides: kernel-obs-build-srchash-513d2ec25a33ba4bd970269abb48e060007939b7 58 | BuildRequires: coreutils 59 | BuildRequires: device-mapper 60 | BuildRequires: dracut 61 | BuildRequires: %kernel_package 62 | BuildRequires: util-linux 63 | %if 0%{?suse_version} > 1550 || 0%{?sle_version} > 150200 64 | BuildRequires: zstd 65 | %endif 66 | ExclusiveArch: aarch64 armv6hl armv7hl ppc64le riscv64 s390x x86_64 67 | -------------------------------------------------------------------------------- /patches.suse/Input-elan_i2c-Add-deny-list-for-Lenovo-Yoga-Slim-7.patch: -------------------------------------------------------------------------------- 1 | From: Takashi Iwai 2 | Subject: [PATCH] Input: elan_i2c: Add deny list for Lenovo Yoga Slim 7 3 | Date: Fri, 04 Feb 2022 17:57:14 +0100 4 | Message-ID: 5 | Patch-mainline: Submitted, linux-input ML 6 | References: bsc#1193064 7 | 8 | The touchpad on Lenovo Yoga Slim 7 doesn't work well with elan-i2c but 9 | rather better with i2c-hid. Add a deny list for avoiding to bind with 10 | elan-i2c. 11 | 12 | BugLink: https://bugzilla.opensuse.org/show_bug.cgi?id=1193064 13 | Signed-off-by: Takashi Iwai 14 | 15 | --- 16 | drivers/input/mouse/elan_i2c_core.c | 19 +++++++++++++++++++ 17 | 1 file changed, 19 insertions(+) 18 | 19 | --- a/drivers/input/mouse/elan_i2c_core.c 20 | +++ b/drivers/input/mouse/elan_i2c_core.c 21 | @@ -18,6 +18,7 @@ 22 | #include 23 | #include 24 | #include 25 | +#include 26 | #include 27 | #include 28 | #include 29 | @@ -1187,6 +1188,20 @@ static void elan_disable_regulator(void *_data) 30 | regulator_disable(data->vcc); 31 | } 32 | 33 | +static const struct dmi_system_id elan_i2c_denylist[] = { 34 | +#if IS_ENABLED(CONFIG_I2C_HID_ACPI) 35 | + { 36 | + /* Lenovo Yoga Slim 7 is better supported by i2c-hid */ 37 | + .matches = { 38 | + DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), 39 | + DMI_MATCH(DMI_PRODUCT_NAME, "82A3"), 40 | + DMI_MATCH(DMI_PRODUCT_VERSION, "Yoga Slim 7 14ITL05"), 41 | + }, 42 | + }, 43 | +#endif 44 | + { } 45 | +}; 46 | + 47 | static int elan_probe(struct i2c_client *client) 48 | { 49 | const struct elan_transport_ops *transport_ops; 50 | @@ -1197,6 +1212,10 @@ static int elan_probe(struct i2c_client *client) 51 | 52 | if (IS_ENABLED(CONFIG_MOUSE_ELAN_I2C_I2C) && 53 | i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) { 54 | + if (dmi_check_system(elan_i2c_denylist)) { 55 | + dev_info(dev, "Hits deny list, skipping\n"); 56 | + return -ENODEV; 57 | + } 58 | transport_ops = &elan_i2c_ops; 59 | } else if (IS_ENABLED(CONFIG_MOUSE_ELAN_I2C_SMBUS) && 60 | i2c_check_functionality(client->adapter, 61 | -------------------------------------------------------------------------------- /scripts/sort_supported: -------------------------------------------------------------------------------- 1 | #!/usr/bin/ruby 2 | 3 | def max x, y 4 | (x >= y) ? x : y 5 | end 6 | 7 | class String 8 | def tablen 9 | (length + 8) / 8 10 | end 11 | def tabfill tabs 12 | self + "\t" * (tabs - (length / 8)) 13 | end 14 | def ** other 15 | star = nil 16 | star = length - 1 if self[length - 1] == '*' 17 | star = other.length - 1 if other[other.length - 1] == '*' 18 | if star then 19 | if self[0...star] == other[0...star] then 20 | return 1 if star == length - 1 21 | return -1 22 | end 23 | end 24 | return self <=> other 25 | end 26 | end 27 | 28 | header = [] 29 | supported = [] 30 | maxtabs = [0,0] 31 | maxlen = [0,0] 32 | 33 | File.open("supported.conf"){|f| 34 | f.each_line{|l| 35 | l.chomp! 36 | l.gsub! %r, '/' 37 | split = (l.match %r<^([^[:blank:]/]*)[[:blank:]]+(?:([^[:blank:]/]+)[[:blank:]]+)?(?:([^[:blank:]/]+)[[:blank:]]+)?([^[:blank:]]+/[^[:blank:]]+)(?:[[:blank:]]+(.*))?$>) 38 | if ! split then 39 | header << l 40 | else 41 | # [[flag, ..],module,comment,is_kmp] 42 | s = [[]] 43 | slash = false 44 | split[1..-1].each{|e| 45 | if slash then 46 | raise l + split.inspect if s[2] 47 | s[2] = e 48 | else 49 | if e =~ %r then 50 | slash = true 51 | s[1] = e 52 | else 53 | s[0] << e if e 54 | s[3] = true if e =~ /-kmp/ 55 | end 56 | end 57 | } 58 | supported << s 59 | maxtabs[0] = max(maxtabs[0], s[0].join(" ").tablen) 60 | maxlen[0] = max(maxlen[0], s[0].join(" ").length) 61 | if s[2] then 62 | maxtabs[1] = max(maxtabs[1], s[1].tablen) 63 | maxlen[1] = max(maxlen[1], s[1].length) 64 | end 65 | end 66 | } 67 | } 68 | 69 | supported = supported.sort{|s1,s2| 70 | cmp = 0 71 | if s1[3] then 72 | if s2[3] then 73 | cmp = s1[0] <=> s2[0] 74 | else 75 | cmp = -1 76 | end 77 | elsif s2[3] 78 | cmp = 1 79 | end 80 | cmp != 0 ? cmp : s1[1] ** s2[1] 81 | } 82 | 83 | File.open("supported.conf",'wb'){|f| 84 | header.each{|l| f.puts l } 85 | supported.each{|s| 86 | f.puts s[0].join(" ").tabfill(maxtabs[0]) + (s[2] ? s[1].tabfill(maxtabs[1]) : s[1]) + s[2].to_s 87 | } 88 | } 89 | #STDERR.puts (0..maxlen[1]).each{|n| STDERR.puts ("a"*n).tabfill(maxtabs[1]) + "|"} 90 | -------------------------------------------------------------------------------- /scripts/patch-tag-template: -------------------------------------------------------------------------------- 1 | # Here all the valid metadata tags for suse patches are recorded. Patches 2 | # in the SUSE kernel repository must have a Subject tag, and there must 3 | # be a suse email address in a From:, Signed-off-by: or Acked-by: tag. 4 | # 5 | # Every patch in the SUSE repository must have a descriptive comment in 6 | # addition to any tags present 7 | # 8 | # The original patch author 9 | # 10 | From: 11 | 12 | # a brief one line description of the patch 13 | # 14 | Subject: 15 | 16 | # Signed off by means that you have reviewed the patch for correctness 17 | # Multiple signed-off-by tags are allowed 18 | # 19 | Signed-off-by: 20 | 21 | # Acked-by is not as strong as signed-off-by. This would be used when 22 | # the patch has already been signed off by someone you trust. 23 | # Multiple acked-by tags are allowed 24 | # 25 | Acked-by: 26 | 27 | # Patch-mainline indicates which version of Linus' kernel includes the patch. 28 | # Patch-mainline has a few special values for the first word of the tag. 29 | # These are used by scripts to check on the status of patches in the 30 | # repository, reminding us to send them into mainline. 31 | # 32 | # "never" indicates the patch will never be sent to mainline. A short 33 | # explanation should follow 34 | # 35 | # "submitted yyyy-mm-dd" gives the date the patch was sent for inclusion. 36 | # 37 | # examples: 38 | # Patch-mainline: never. fixes bugs in SUSE specific code 39 | # Patch-mainline: submitted 2004-11-01 40 | # Patch-mainline: v2.6.10-rc1 any free form text is valid after the version 41 | # 42 | Patch-mainline: 43 | 44 | # bug numbers corresponding to this patch. Any bugzilla database other 45 | # then SUSE needs to have ids qualified by some string (ie LTC11210) 46 | # Multiple bug numbers should be put into a single tag: 47 | # References: 32768 LTC1002 OSDL3080 48 | # 49 | References: 50 | 51 | # A patch can be merged through multiple branches and thus have more than one 52 | # hash. Use the Alt-commit tag followed by a hash to prevent git-fixes to report 53 | # multiple occurrences of the same patch. Additionally git-fixes can also find 54 | # potential fixes for the Alt-commit hash. 55 | # Only one hash is allowed per Alt-commit tag. 56 | # 57 | Alt-commit: 58 | -------------------------------------------------------------------------------- /scripts/config-diff: -------------------------------------------------------------------------------- 1 | #! /usr/bin/perl -w 2 | 3 | ############################################################################# 4 | # Copyright (c) 2007 Novell, Inc. 5 | # All Rights Reserved. 6 | # 7 | # This program is free software; you can redistribute it and/or 8 | # modify it under the terms of version 2 of the GNU General Public License as 9 | # published by the Free Software Foundation. 10 | # 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program; if not, contact Novell, Inc. 18 | # 19 | # To contact Novell about this file by physical or electronic mail, 20 | # you may find current contact information at www.novell.com 21 | ############################################################################# 22 | 23 | if (@ARGV < 2) { 24 | print STDERR "Usage: $0 []\n"; 25 | print STDERR "Diff kernel config files config1 and config2, or " . 26 | "apply those differences to config3\n"; 27 | exit 1; 28 | } 29 | 30 | open CONFIG1, $ARGV[0] 31 | or die $ARGV[0] . ": $!\n"; 32 | while () { 33 | next unless /^(CONFIG_\w+)/a || /^# (CONFIG_\w+) is not set/a; 34 | $config1{$1} = $_; 35 | } 36 | 37 | open CONFIG2, $ARGV[1] 38 | or die $ARGV[1] . ": $!\n"; 39 | while () { 40 | next unless /^(CONFIG_\w+)/a || /^# (CONFIG_\w+) is not set/a; 41 | $config2{$1} = $_; 42 | } 43 | 44 | while (($key, $value) = each %config2) { 45 | if (!exists $config1{$key} || $config1{$key} ne $value) { 46 | $diff{$key} = $value; 47 | } 48 | } 49 | 50 | if (@ARGV >= 3) { 51 | open OLD, $ARGV[2] 52 | or die $ARGV[2] . ": $!\n"; 53 | while () { 54 | if (/^(CONFIG_\w+)/a || /^# (CONFIG_\w+) is not set/a) { 55 | if (exists $diff{$1}) { 56 | print $diff{$1}; 57 | $diff_used{$1} = 1; 58 | next; 59 | } 60 | } 61 | print; 62 | } 63 | } 64 | 65 | foreach my $key (sort(keys(%diff))) { 66 | next if exists $diff_used{$key}; 67 | print $diff{$key}; 68 | } 69 | -------------------------------------------------------------------------------- /scripts/renamepatches: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Especially during feature development it can easily happen that a patch that 4 | # was added to base branch as fix is added to derived branch as part of a 5 | # feature by different developer under different name. Merging the base branch 6 | # then becomes difficult. 7 | 8 | # This script checks a few patch tags to match patch files across two 9 | # kernel-source branches and moves patch files in the working tree to match 10 | # filenames in the branch you specify. 11 | 12 | # This then allows merging more easily: instead of duplicated patch files that 13 | # git does not know how to detect you get conflicting added files under same 14 | # filename which git does point out. 15 | 16 | # Also if the reference branch contains duplicate files the rename is not 17 | # stable. That is if you run renamefiles, commit the result, run it again, and 18 | # there are changes again you have duplicate patches in the reference branch 19 | # with which you are trying to aling patch names. This can be either false 20 | # positive because mutiple patch tags are checked or an actual patch that 21 | # applies indefinitely because it adds the same context it applies to which is 22 | # applied multiple times. 23 | 24 | if [ $# != 1 ] ; then 25 | echo Usage: $0 "" 26 | echo Run in kernel-source to rename patches in the current branch to the same filename as they ahve in the given branch. 27 | exit 1 28 | fi 29 | branch=$1 30 | trap 'rm -f "$temp"' EXIT 31 | temp=$(mktemp) 32 | git grep -iE '^(Git-commit:|No-fix:|\(cherry picked from commit)' $branch -- 'patches.*' | tr ':' ' ' | \ 33 | awk '!/patches.kernel.org/ {fn=$2; hash=$NF; map[hash]=map[hash] fn;} 34 | END { for (hash in map) printf("map[%s]=\"%s\"\n", hash, map[hash]); }' \ 35 | >$temp 36 | 37 | declare -A map 38 | source $temp 39 | 40 | grep -E "^[[:space:]]*patches\.[a-z]+/" < series.conf | while read patch ; do 41 | [ ! -f "$patch" ] && continue 42 | commit="$(awk -v IGNORECASE=1 '/^(Git-commit|No-fix):/ { print $2} 43 | /^\(cherry picked from commit/ { print $5}' $patch)" 44 | [ -z "$commit" ] && continue 45 | for fn in ${map[$commit]} ; do 46 | [ $fn != $patch ] && git mv $patch $fn && sed -i -e "s,$patch,$fn," series.conf 47 | done 48 | done 49 | -------------------------------------------------------------------------------- /rpm/kernel-syms.spec.in: -------------------------------------------------------------------------------- 1 | # 2 | # spec file for package kernel-syms@VARIANT@ 3 | # 4 | # Copyright (c) @YEAR@ SUSE LLC 5 | # 6 | # All modifications and additions to the file contributed by third parties 7 | # remain the property of their copyright owners, unless otherwise agreed 8 | # upon. The license for this file, and modifications and additions to the 9 | # file, is the same license as for the pristine package itself (unless the 10 | # license for the pristine package is not an Open Source License, in which 11 | # case the license is the MIT License). An "Open Source License" is a 12 | # license that conforms to the Open Source Definition (Version 1.9) 13 | # published by the Open Source Initiative. 14 | 15 | # Please submit bugfixes or comments via https://bugs.opensuse.org/ 16 | # 17 | 18 | 19 | %define git_commit @COMMIT_FULL@ 20 | %define variant @VARIANT@%{nil} 21 | 22 | %include %_sourcedir/kernel-spec-macros 23 | 24 | Name: kernel-syms@VARIANT@ 25 | Version: @RPMVERSION@ 26 | %if 0%{?is_kotd} 27 | Release: .g@COMMIT@ 28 | %else 29 | Release: @RELEASE@ 30 | %endif 31 | Summary: Kernel Symbol Versions (modversions) 32 | License: GPL-2.0-only 33 | Group: Development/Sources 34 | URL: https://www.kernel.org/ 35 | BuildRequires: coreutils 36 | ExclusiveArch: @ARCHS@ 37 | Prefix: /usr/src 38 | AutoReqProv: off 39 | Source: README.KSYMS 40 | @REQUIRES@ 41 | Requires: kernel-devel%variant = %version-%source_rel 42 | Provides: %name = %version-%source_rel 43 | Provides: %name-srchash-%git_commit 44 | Provides: multiversion(kernel) 45 | 46 | # Force bzip2 instead of lzma compression to 47 | # 1) allow install on older dist versions, and 48 | # 2) decrease build times (bsc#962356 boo#1175882) 49 | %define _binary_payload w9.bzdio 50 | 51 | %description 52 | Kernel symbols, such as functions and variables, have version 53 | information attached to them. This package contains the symbol versions 54 | for the standard kernels. 55 | 56 | This package is needed for compiling kernel module packages with proper 57 | package dependencies. 58 | 59 | 60 | %source_timestamp 61 | 62 | %files 63 | %dir %_docdir/%name 64 | %_docdir/%name/README.SUSE 65 | 66 | %prep 67 | 68 | %install 69 | install -m 644 -D %{SOURCE0} %buildroot/%_docdir/%name/README.SUSE 70 | 71 | %changelog 72 | -------------------------------------------------------------------------------- /scripts/check-cvs-add: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | ############################################################################# 4 | # Copyright (c) 2004-2006,2008,2009 Novell, Inc. 5 | # All Rights Reserved. 6 | # 7 | # This program is free software; you can redistribute it and/or 8 | # modify it under the terms of version 2 of the GNU General Public License as 9 | # published by the Free Software Foundation. 10 | # 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program; if not, contact Novell, Inc. 18 | # 19 | # To contact Novell about this file by physical or electronic mail, 20 | # you may find current contact information at www.novell.com 21 | ############################################################################# 22 | 23 | # Check if all files referenced by series.conf are in GIT and vice versa. 24 | # Also check that none of the referenced files is deleted in the working tree. 25 | 26 | 27 | . ${0%/*}/wd-functions.sh 28 | 29 | if ! $using_git || test ! -e series.conf; then 30 | exit 0 31 | fi 32 | 33 | export LANG=C 34 | 35 | if test "$1" = "--committed"; then 36 | cmd="git ls-tree -r --name-only HEAD" 37 | # The kabi/ and sysctl/ directories are packaged as whole, so we need 38 | # to ensure that there are no untracked files in them 39 | kabi_untracked=$(git ls-files -d -o -m --directory --exclude-standard kabi/ sysctl/ | sort -u) 40 | else 41 | cmd="git ls-files --cached" 42 | kabi_untracked= 43 | fi 44 | in_repo="$($cmd | grep '^patches\..*/' | sort -u)" 45 | in_series="$(scripts/guards --list < series.conf | sort -u)" 46 | deleted=$(git ls-files --deleted | grep '^patches\..*/' | sort -u) 47 | in_repo=$(join -v1 <(echo "$in_repo") <(echo "$deleted")) 48 | 49 | series_missing=$(join -v1 <(echo "$in_repo") <(echo "$in_series")) 50 | repo_missing=$(join -v2 <(echo "$in_repo") <(echo "$in_series")) 51 | 52 | status=0 53 | if test -n "$series_missing"; then 54 | printf 'Not in series.conf: %s\n' $series_missing >&2 55 | status=1 56 | fi 57 | if test -n "$repo_missing$kabi_untracked"; then 58 | printf 'Not in GIT: %s\n' $repo_missing $kabi_untracked >&2 59 | status=1 60 | fi 61 | 62 | exit $status 63 | -------------------------------------------------------------------------------- /rpm/kernel-obs-qa.spec.in: -------------------------------------------------------------------------------- 1 | # 2 | # spec file for package kernel-obs-qa 3 | # 4 | # Copyright (c) @YEAR@ SUSE LLC 5 | # 6 | # All modifications and additions to the file contributed by third parties 7 | # remain the property of their copyright owners, unless otherwise agreed 8 | # upon. The license for this file, and modifications and additions to the 9 | # file, is the same license as for the pristine package itself (unless the 10 | # license for the pristine package is not an Open Source License, in which 11 | # case the license is the MIT License). An "Open Source License" is a 12 | # license that conforms to the Open Source Definition (Version 1.9) 13 | # published by the Open Source Initiative. 14 | 15 | # Please submit bugfixes or comments via https://bugs.opensuse.org/ 16 | # 17 | # needsrootforbuild 18 | 19 | 20 | %define patchversion @PATCHVERSION@ 21 | %define variant @VARIANT@%{nil} 22 | 23 | %include %_sourcedir/kernel-spec-macros 24 | 25 | Name: kernel-obs-qa 26 | Version: @RPMVERSION@ 27 | %if 0%{?is_kotd} 28 | Release: .g@COMMIT@ 29 | %else 30 | Release: @RELEASE@ 31 | %endif 32 | Summary: Basic QA tests for the kernel 33 | License: GPL-2.0-only 34 | Group: SLES 35 | BuildRequires: kernel-default 36 | # kernel-obs-build must be also configured as VMinstall, but is required 37 | # here as well to avoid that qa and build package build parallel 38 | %if ! 0%{?qemu_user_space_build} 39 | BuildRequires: kernel-obs-build-srchash-@COMMIT_FULL@ 40 | %endif 41 | BuildRequires: modutils 42 | ExclusiveArch: @ARCHS@ 43 | 44 | %description 45 | This package is using the kernel compiled within Open Build Service(OBS) 46 | projects and runs basic tests. 47 | 48 | %files 49 | /usr/share/%name 50 | 51 | %prep 52 | 53 | %build 54 | 55 | %check 56 | # More tests are comming, currently the main test is the existens of 57 | # this spec file. It does trigger a build within OBS VM which is using 58 | # the kernel of the same project. 59 | 60 | # test suites should be packaged in other packages, but build required 61 | # and called here. 62 | 63 | krel=$(uname -r) 64 | if test ! -d "/lib/modules/$krel/kernel" && test ! -d "/usr/lib/modules/$krel/kernel"; then 65 | echo "Kernel package for $krel not installed; exiting" 66 | exit 0 67 | fi 68 | /sbin/modprobe loop 69 | 70 | %install 71 | mkdir -p %{buildroot}/usr/share/%name 72 | touch %{buildroot}/usr/share/%name/logfile 73 | 74 | %changelog 75 | -------------------------------------------------------------------------------- /scripts/python/tests/api/gitattr_up_to_date: -------------------------------------------------------------------------------- 1 | --- 2 | args: 3 | params: 4 | ref: testbranch 5 | reauthenticated: true 6 | code: 200 7 | encoding: utf-8 8 | headers: 9 | - Cache-Control: max-age=0, private, must-revalidate, no-transform 10 | - Content-Type: application/json;charset=utf-8 11 | - X-Content-Type-Options: nosniff 12 | - X-Frame-Options: SAMEORIGIN 13 | - Date: Mon, 25 Aug 2025 16:39:09 GMT 14 | - Content-Length: '1305' 15 | - Connection: close 16 | json: 17 | _links: 18 | git: https://src.opensuse.org/api/v1/repos/michals/testrepo/git/blobs/85f0c86e8104316f3cd465e3d9ced7d5f6cad1031b0d1133ddc5f770058f0dc2 19 | html: https://src.opensuse.org/michals/testrepo/src/branch/testbranch/.gitattributes 20 | self: https://src.opensuse.org/api/v1/repos/michals/testrepo/contents/.gitattributes?ref=testbranch 21 | content: Ki50YXIuP3ogZmlsdGVyPWxmcyBkaWZmPWxmcyBtZXJnZT1sZnMgLXRleHQKZm9vYmFyCioudGFyLmJ6MiBmaWx0ZXI9bGZzIGRpZmY9bGZzIG1lcmdlPWxmcyAtdGV4dAo= 22 | content_decoded: '*.tar.?z filter=lfs diff=lfs merge=lfs -text 23 | 24 | foobar 25 | 26 | *.tar.bz2 filter=lfs diff=lfs merge=lfs -text 27 | 28 | ' 29 | download_url: https://src.opensuse.org/michals/testrepo/raw/branch/testbranch/.gitattributes 30 | encoding: base64 31 | git_url: https://src.opensuse.org/api/v1/repos/michals/testrepo/git/blobs/85f0c86e8104316f3cd465e3d9ced7d5f6cad1031b0d1133ddc5f770058f0dc2 32 | html_url: https://src.opensuse.org/michals/testrepo/src/branch/testbranch/.gitattributes 33 | last_author_date: '2025-08-25T18:38:51+02:00' 34 | last_commit_sha: a52d079fbfc299a1375848504d48c8b3581e3fd5bdf25baf769686bba5c2f28c 35 | last_committer_date: '2025-08-25T18:38:51+02:00' 36 | name: .gitattributes 37 | path: .gitattributes 38 | sha: 85f0c86e8104316f3cd465e3d9ced7d5f6cad1031b0d1133ddc5f770058f0dc2 39 | size: 98 40 | submodule_git_url: null 41 | target: null 42 | type: file 43 | url: https://src.opensuse.org/api/v1/repos/michals/testrepo/contents/.gitattributes?ref=testbranch 44 | method: GET 45 | path: /api/v1/repos/michals/testrepo/contents/.gitattributes 46 | reason: OK 47 | request: 48 | body: null 49 | headers: 50 | Authorization: token RedacteD 51 | method: GET 52 | unredirected_hdrs: 53 | Host: src.opensuse.org 54 | User-agent: Python-urllib/3.11 55 | url: https://src.opensuse.org/api/v1/repos/michals/testrepo/contents/.gitattributes?ref=testbranch 56 | url: https://src.opensuse.org/api/v1/repos/michals/testrepo/contents/.gitattributes?ref=testbranch 57 | -------------------------------------------------------------------------------- /scripts/breaker_age: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Expects the following on stdin 4 | # upstream_sha branch1[ branchN] 5 | # 6 | # Output 7 | # upstream_sha;breaker:branch1 age_in_days[:branchN age_in_days][;breaker:branch1 age_in_days[:branchN age_in_days]]; 8 | # upstream_sha no breaker 9 | # 10 | # age_in_days = fix_commit_date - breaker_commit_date 11 | # 12 | # is the number of days since the breaker hasn't been fixed. 13 | # fix_commit_date is commit date of the fix (upstream_sha) in kernel-source.git 14 | # in the given branch if the fix has been backported or now otherwise 15 | # breaker_commit_date is commit date of the breaker in kernel-source.git in 16 | # the given branch if the breaker has been backported or upstream (Linus) 17 | # commit date otherwise - i.e. it has been introduced by the base kernel 18 | # 19 | # If the breaker is not known then no breaker is printed. 20 | 21 | . $(dirname "$0")/common-functions 22 | 23 | file_age() 24 | { 25 | local file_name=$1 26 | local branch_name=$2 27 | 28 | # This is a dirty hack but it works for our kernel-source.git 29 | # patch files as they are seeing updates only for references 30 | # or diff body and neither tends to be on the first line 31 | # This is slightly more effective than git log method as our 32 | # history is really long and there is no effective way to cut 33 | # the history walk early 34 | local file_sha 35 | file_sha=$(file2first_sha $branch_name "$file_name") 36 | [ $? -gt 0 ] && return 37 | git log --format='%at' ${file_sha}^! 38 | } 39 | 40 | now="$(date +%s)" 41 | while read sha branches 42 | do 43 | echo -n $sha 44 | breakers="$(sha_get_upstream_git_fixes $sha)" 45 | if [ -z "$breakers" ] 46 | then 47 | echo " no breaker" 48 | continue 49 | fi 50 | 51 | for breaker_sha in $breakers 52 | do 53 | echo -n ";$breaker_sha" 54 | for branch in $branches 55 | do 56 | patch_file="$(sha_to_patch_in_branch $sha $branch)" 57 | if [ -n "$patch_file" ] 58 | then 59 | fix_date=$(file_age $patch_file origin/$branch) 60 | else 61 | fix_date=$now 62 | fi 63 | 64 | echo -n ":$branch" 65 | breaker_file="$(sha_to_patch_in_branch $breaker_sha origin/$branch)" 66 | if [ -z "$breaker_file" ] 67 | then 68 | breaker_commit_date=$(git --git-dir=$LINUX_GIT/.git log --format='%at' ${breaker_sha}^!) 69 | else 70 | breaker_commit_date=$(file_age $breaker_file origin/$branch) 71 | fi 72 | echo -n " $((($fix_date-$breaker_commit_date)/(60*60*24)))" 73 | done 74 | done 75 | echo 76 | done 77 | -------------------------------------------------------------------------------- /scripts/patch-tags-from-git: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Add suse Kernel repo headers to a patch created using git-format-patch 3 | # 4 | # Brandon Philips 5 | 6 | PATH=$(dirname $0):$PATH 7 | 8 | if [ $# -lt 1 ]; then 9 | echo "usage: $0 " 10 | echo "Add relevant headers for patches pulled from git" 11 | echo "" 12 | echo "Adds a Git-commit: tag using the From header" 13 | echo "" 14 | echo "Adds a Patch-mainline: tag if is given" 15 | echo " a useful tree name can be provided in " 16 | echo " otherwise basename will be used" 17 | echo "" 18 | echo "example usage" 19 | echo "-------------" 20 | echo "$0 NULL-pointer-fix.patch" 21 | echo "$0 NULL-pointer-fix.patch ~/kernel/linux-2.6" 22 | echo "$0 NULL-pointer-fix.patch ~/kernel/linux-2.6 pci 2.6" 23 | 24 | exit 1 25 | fi 26 | 27 | FILE=$1 28 | shift 29 | 30 | if [ ! -f $FILE ]; then 31 | echo "No such file $1" 32 | exit 2 33 | fi 34 | 35 | # try the git cherry-pick -x marker first 36 | commit=$(sed -n 's/^(cherry picked from commit \([0-9a-f]*\))/\1/p' "$FILE") 37 | if test -z "$commit"; then 38 | commit=$(head -n1 $FILE | sed -n "s%From\s\([0-9a-f]*\)\s.*%\1%p") 39 | else 40 | sed -i '/^(cherry picked from commit/d' "$FILE" 41 | fi 42 | if [ "z$commit" = "z" ]; then 43 | echo "$FILE doesn't look like a patch from git" 44 | else 45 | patch-tag -A git-commit="$commit" $FILE 46 | fi 47 | 48 | if [ $# -eq 0 ]; then 49 | libdir=$(dirname "$(readlink -f "$0")") 50 | DIR=$("$libdir"/linux_git.sh) || exit 1 51 | else 52 | DIR=$1 53 | shift 54 | fi 55 | 56 | commit=$(patch-tag -p git-commit $FILE | grep -i "git-commit:" | sed "s%.*:\s\(.*\)%\1%g") 57 | 58 | if [ "z$commit" = "z" ]; then 59 | echo "No git-commit tag in $FILE" 60 | exit 3 61 | fi 62 | 63 | export GIT_DIR=$DIR 64 | 65 | if [ ! -d $GIT_DIR ]; then 66 | echo "No such directory $GIT_DIR" 67 | echo 4 68 | fi 69 | 70 | mainline=$(git describe --contains --match 'v*' $commit 2> /dev/null) 71 | if test -z "$mainline"; then 72 | mainline=$(git describe --contains $commit 2> /dev/null) 73 | fi 74 | mainline=${mainline%%[~^]*} 75 | 76 | if [ "z$mainline" = "z" ]; then 77 | if git show $commit > /dev/null 2> /dev/null; then 78 | patch-tag -A Patch-mainline="Queued in subsystem maintainer repository" "$FILE" 79 | if test -n "$1"; then 80 | patch-tag -A Git-repo="$*" "$FILE" 81 | else 82 | echo "warning: Non-mainline commit in $FILE but no repo url specified" 83 | fi 84 | exit 0 85 | else 86 | echo "$commit from $FILE does not exist in $DIR" 87 | exit 5 88 | fi 89 | fi 90 | 91 | patch-tag -A Patch-mainline="$mainline" $FILE 92 | -------------------------------------------------------------------------------- /scripts/python/tests/api/gitattr_nonexistent_repo: -------------------------------------------------------------------------------- 1 | --- 2 | args: 3 | params: 4 | ref: testbranch 5 | reauthenticated: true 6 | code: 404 7 | encoding: utf-8 8 | headers: 9 | - Cache-Control: max-age=0, private, must-revalidate, no-transform 10 | - Content-Type: application/json;charset=utf-8 11 | - X-Content-Type-Options: nosniff 12 | - X-Frame-Options: SAMEORIGIN 13 | - Date: Mon, 25 Aug 2025 16:34:24 GMT 14 | - Content-Length: '103' 15 | - Connection: close 16 | json: 17 | errors: null 18 | message: The target couldn't be found. 19 | url: https://src.opensuse.org/api/swagger 20 | method: GET 21 | path: /api/v1/repos/michals/testrepo/contents/.gitattributes 22 | reason: Not Found 23 | request: 24 | body: null 25 | headers: 26 | Authorization: token RedacteD 27 | method: GET 28 | unredirected_hdrs: 29 | Host: src.opensuse.org 30 | User-agent: Python-urllib/3.11 31 | url: https://src.opensuse.org/api/v1/repos/michals/testrepo/contents/.gitattributes?ref=testbranch 32 | url: https://src.opensuse.org/api/v1/repos/michals/testrepo/contents/.gitattributes?ref=testbranch 33 | --- 34 | args: 35 | json: 36 | branch: testbranch 37 | content: Ki50YXIuYnoyIGZpbHRlcj1sZnMgZGlmZj1sZnMgbWVyZ2U9bGZzIC10ZXh0CioudGFyLj96IGZpbHRlcj1sZnMgZGlmZj1sZnMgbWVyZ2U9bGZzIC10ZXh0Cg== 38 | content_decoded: '*.tar.bz2 filter=lfs diff=lfs merge=lfs -text 39 | 40 | *.tar.?z filter=lfs diff=lfs merge=lfs -text 41 | 42 | ' 43 | reauthenticated: true 44 | code: 404 45 | encoding: utf-8 46 | headers: 47 | - Cache-Control: max-age=0, private, must-revalidate, no-transform 48 | - Content-Type: application/json;charset=utf-8 49 | - X-Content-Type-Options: nosniff 50 | - X-Frame-Options: SAMEORIGIN 51 | - Date: Mon, 25 Aug 2025 16:34:24 GMT 52 | - Content-Length: '103' 53 | - Connection: close 54 | json: 55 | errors: null 56 | message: The target couldn't be found. 57 | url: https://src.opensuse.org/api/swagger 58 | method: POST 59 | path: /api/v1/repos/michals/testrepo/contents/.gitattributes 60 | reason: Not Found 61 | request: 62 | body: !!binary | 63 | eyJicmFuY2giOiAidGVzdGJyYW5jaCIsICJjb250ZW50IjogIktpNTBZWEl1WW5veUlHWnBiSFJs 64 | Y2oxc1puTWdaR2xtWmoxc1puTWdiV1Z5WjJVOWJHWnpJQzEwWlhoMENpb3VkR0Z5TGo5NklHWnBi 65 | SFJsY2oxc1puTWdaR2xtWmoxc1puTWdiV1Z5WjJVOWJHWnpJQzEwWlhoMENnPT0ifQ== 66 | headers: 67 | Authorization: token RedacteD 68 | Content-type: application/json 69 | method: POST 70 | unredirected_hdrs: 71 | Content-length: '163' 72 | Host: src.opensuse.org 73 | User-agent: Python-urllib/3.11 74 | url: https://src.opensuse.org/api/v1/repos/michals/testrepo/contents/.gitattributes 75 | url: https://src.opensuse.org/api/v1/repos/michals/testrepo/contents/.gitattributes 76 | -------------------------------------------------------------------------------- /patches.suse/0003-efi-Lock-down-the-kernel-if-booted-in-secure-boot-mode.patch: -------------------------------------------------------------------------------- 1 | From 15368f76d4997912318d35c52bfeb9041d85098e Mon Sep 17 00:00:00 2001 2 | From: David Howells 3 | Date: Mon, 30 Sep 2019 21:28:16 +0000 4 | Subject: [PATCH 3/3] efi: Lock down the kernel if booted in secure boot mode 5 | Patch-mainline: Never, Fedora Core 32 6 | References: jsc#SLE-9870 7 | 8 | UEFI Secure Boot provides a mechanism for ensuring that the firmware 9 | will only load signed bootloaders and kernels. Certain use cases may 10 | also require that all kernel modules also be signed. Add a 11 | configuration option that to lock down the kernel - which includes 12 | requiring validly signed modules - if the kernel is secure-booted. 13 | 14 | Signed-off-by: David Howells 15 | Signed-off-by: Jeremy Cline 16 | Acked-by: Lee, Chun-Yi 17 | --- 18 | arch/x86/kernel/setup.c | 8 ++++++++ 19 | security/lockdown/Kconfig | 13 +++++++++++++ 20 | 2 files changed, 21 insertions(+) 21 | 22 | --- a/arch/x86/kernel/setup.c 23 | +++ b/arch/x86/kernel/setup.c 24 | @@ -21,6 +21,7 @@ 25 | #include 26 | #include 27 | #include 28 | +#include 29 | #include 30 | #include 31 | #include 32 | @@ -986,6 +987,13 @@ void __init setup_arch(char **cmdline_p) 33 | if (efi_enabled(EFI_BOOT)) 34 | efi_init(); 35 | 36 | + efi_set_secure_boot(boot_params.secure_boot); 37 | + 38 | +#ifdef CONFIG_LOCK_DOWN_IN_EFI_SECURE_BOOT 39 | + if (efi_enabled(EFI_SECURE_BOOT)) 40 | + security_lock_kernel_down("EFI Secure Boot mode", LOCKDOWN_CONFIDENTIALITY_MAX); 41 | +#endif 42 | + 43 | reserve_ibft_region(); 44 | x86_init.resources.dmi_setup(); 45 | 46 | --- a/security/lockdown/Kconfig 47 | +++ b/security/lockdown/Kconfig 48 | @@ -16,6 +16,19 @@ config SECURITY_LOCKDOWN_LSM_EARLY 49 | subsystem is fully initialised. If enabled, lockdown will 50 | unconditionally be called before any other LSMs. 51 | 52 | +config LOCK_DOWN_IN_EFI_SECURE_BOOT 53 | + bool "Lock down the kernel in EFI Secure Boot mode" 54 | + default n 55 | + depends on EFI && SECURITY_LOCKDOWN_LSM_EARLY 56 | + help 57 | + UEFI Secure Boot provides a mechanism for ensuring that the firmware 58 | + will only load signed bootloaders and kernels. Secure boot mode may 59 | + be determined from EFI variables provided by the system firmware if 60 | + not indicated by the boot parameters. 61 | + 62 | + Enabling this option results in kernel lockdown being triggered if 63 | + EFI Secure Boot is set. 64 | + 65 | choice 66 | prompt "Kernel default lockdown mode" 67 | default LOCK_DOWN_KERNEL_FORCE_NONE 68 | -------------------------------------------------------------------------------- /scripts/python/series_conf: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python3 2 | # -*- coding: utf-8 -*- 3 | 4 | # Copyright (C) 2018 SUSE LLC 5 | # 6 | # This program is free software; you can redistribute it and/or 7 | # modify it under the terms of the GNU General Public License 8 | # as published by the Free Software Foundation; either version 2 9 | # of the License, or (at your option) any later version. 10 | # 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program; if not, write to the Free Software 18 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 19 | # USA. 20 | 21 | # This script is used by the commit hook to detect if there are changes in the 22 | # sorted section. Developers may commit to kernel-source without having changed 23 | # the sorted section and used the git-sort tools, therefore without having the 24 | # pygit2 module available. Therefore, this script should avoid a dependency on 25 | # pygit2 since it's not present on a default python install and we don't want to 26 | # force developers to install pygit2 just to commit unrelated changes to 27 | # kernel-source. 28 | 29 | import argparse 30 | import sys 31 | from git_sort.series_conf import split, filter_series 32 | from suse_git.patch import Patch 33 | from suse_git import exc 34 | 35 | 36 | parser = argparse.ArgumentParser( 37 | description="Extract the sorted patches section of a series.conf file.") 38 | parser.add_argument("-n", "--name-only", action="store_true", 39 | help="Print only patch names.") 40 | parser.add_argument("series", nargs="?", metavar="series.conf", 41 | help="series.conf file. Default: read input from stdin.") 42 | args = parser.parse_args() 43 | 44 | if args.series is not None: 45 | f = open(args.series) 46 | else: 47 | f = sys.stdin 48 | lines = f.readlines() 49 | 50 | try: 51 | before, inside, after = split(lines) 52 | except exc.KSNotFound: 53 | pass 54 | else: 55 | if args.name_only: 56 | inside = filter_series(inside) 57 | inside = [line + "\n" for line in inside] 58 | 59 | try: 60 | sys.stdout.writelines(inside) 61 | # Avoid an unsightly error that may occur when not all output is 62 | # read: 63 | # Exception ignored in: <_io.TextIOWrapper name='' mode='w' encoding='UTF-8'> 64 | # BrokenPipeError: [Errno 32] Broken pipe 65 | sys.stdout.flush() 66 | except BrokenPipeError: 67 | sys.stderr.close() 68 | sys.exit() 69 | -------------------------------------------------------------------------------- /scripts/python/qdupcheck: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python3 2 | # -*- coding: utf-8 -*- 3 | 4 | # Copyright (C) 2018 SUSE LLC 5 | # 6 | # This program is free software; you can redistribute it and/or 7 | # modify it under the terms of the GNU General Public License 8 | # as published by the Free Software Foundation; either version 2 9 | # of the License, or (at your option) any later version. 10 | # 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program; if not, write to the Free Software 18 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 19 | # USA. 20 | 21 | import argparse 22 | import os 23 | import os.path 24 | import subprocess 25 | import sys 26 | 27 | from git_sort import pygit2_wrapper as pygit2 28 | from git_sort import series_conf 29 | from git_sort import lib 30 | from suse_git import exc 31 | 32 | 33 | if __name__ == "__main__": 34 | parser = argparse.ArgumentParser( 35 | description="Check if a commit id is already backported by a patch in " 36 | "series.conf.") 37 | parser.add_argument("rev", help="Upstream commit id.") 38 | args = parser.parse_args() 39 | 40 | if not lib.check_series(): 41 | sys.exit(1) 42 | 43 | repo_path = lib.repo_path() 44 | repo = pygit2.Repository(repo_path) 45 | try: 46 | commit = str(repo.revparse_single(args.rev).id) 47 | except KeyError: 48 | print("Error: revision \"%s\" not found in \"%s\"." % 49 | (args.rev, repo_path), file=sys.stderr) 50 | sys.exit(1) 51 | 52 | series = open("series") 53 | cwd = os.getcwd() 54 | os.chdir("patches") 55 | try: 56 | with series_conf.find_commit(commit, series) as (name, patch,): 57 | print("Commit %s already present in patch\n\t%s" % ( 58 | commit[:12], name,)) 59 | references = " ".join(patch.get("References")) 60 | if references: 61 | print("for\n\t%s" % (references,)) 62 | 63 | try: 64 | top = subprocess.check_output( 65 | ("quilt", "--quiltrc", "-", "top",), 66 | cwd=cwd, stderr=subprocess.STDOUT,).decode().strip() 67 | except subprocess.CalledProcessError as err: 68 | if err.output.decode() == "No patches applied\n": 69 | top = None 70 | else: 71 | raise 72 | if top == name: 73 | print("This is the top patch.") 74 | sys.exit(1) 75 | except exc.KSNotFound: 76 | pass 77 | -------------------------------------------------------------------------------- /scripts/merging/references: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python3 2 | 3 | import argparse 4 | import errno 5 | import shutil 6 | import subprocess 7 | import sys 8 | import os 9 | import os.path 10 | 11 | sys.path.append(os.path.join(os.path.dirname(__file__), "../python")) 12 | from suse_git.patch import Patch 13 | 14 | if __name__ == "__main__": 15 | parser = argparse.ArgumentParser(description="Merge references in patch file") 16 | parser.add_argument("--ours", help="Only merge references, keep our version of patch") 17 | parser.add_argument("mergetool", nargs=4) 18 | 19 | args = parser.parse_args() 20 | local_path, base_path, remote_path, merged_path = args.mergetool 21 | 22 | local_patch = Patch(open(local_path, "rb")) 23 | base_patch = Patch(open(base_path, "r+b")) 24 | remote_patch = Patch(open(remote_path, "r+b")) 25 | shutil.copy(local_path, merged_path ) 26 | merged_patch = Patch(open(merged_path, "r+b")) 27 | 28 | args.ours = os.stat(base_path).st_size == 0 29 | 30 | local_refs = local_patch.get_list_normalized("References") 31 | base_refs = base_patch.get_list_normalized("References") 32 | remote_refs = remote_patch.get_list_normalized("References") 33 | 34 | 35 | # Remove refs that remote removed and add refs that are new for us 36 | removed_refs = base_refs - remote_refs 37 | merged_refs = (local_refs - removed_refs) | remote_refs 38 | 39 | # Use trick from git_sort/series_merge_tool by resolving all but refs via `merge` utility 40 | # XXX refactor to a single function, incl. ENOENT const below 41 | for p in [merged_patch, base_patch, remote_patch]: 42 | try: 43 | p.change("References", " ".join(merged_refs), Patch.ChangeMode.ALL_WITH_ONE) 44 | p.writeback() 45 | except KeyError as e: 46 | if p == merged_patch: 47 | raise 48 | # References are alloed to be missing in unmerged sources 49 | 50 | result = 0 51 | if args.ours: 52 | print("Info: Using --ours") 53 | else: 54 | try: 55 | cmd = "merge" 56 | name_ours = "%s.ours%d" % (merged_path, os.getpid(),) 57 | result = subprocess.call([cmd, merged_path, base_path, remote_path]) 58 | except OSError as e: 59 | if e.errno == 2: 60 | print("Error: could not run `%s`. Please make sure it is " 61 | "installed (from the \"rcs\" package)." % (cmd,), 62 | file=sys.stderr) 63 | sys.exit(1) 64 | else: 65 | raise 66 | if result != 0: 67 | name = "%s.merged%d" % (merged_path, os.getpid(),) 68 | print("Warning: conflicts outside of References:, leaving " 69 | "merged result in %s " % (name,)) 70 | shutil.copy(merged_path, name) 71 | sys.exit(result) 72 | -------------------------------------------------------------------------------- /patches.suse/kernel-add-release-status-to-kernel-build.patch: -------------------------------------------------------------------------------- 1 | From: Jeff Mahoney 2 | Subject: kernel: add release status to kernel build 3 | Patch-mainline: Never, SUSE specific 4 | References: FATE#325281 5 | 6 | We build many kernels from the same sources but not all packages are 7 | destined to be officially released kernel. This adds a new config 8 | option to mark a kernel as released. It defaults to no. If it 9 | is an unreleased kernel it will show " (unreleased)" after the version 10 | string in Oopses and also show "No, Unreleased kernel" whenever 11 | supported status is printed. 12 | 13 | Signed-off-by: Jeff Mahoney 14 | --- 15 | init/Kconfig.suse | 6 ++++++ 16 | kernel/ksysfs.c | 4 ++++ 17 | lib/dump_stack.c | 10 ++++++++-- 18 | 3 files changed, 18 insertions(+), 2 deletions(-) 19 | 20 | --- a/init/Kconfig.suse 21 | +++ b/init/Kconfig.suse 22 | @@ -104,4 +104,10 @@ config SUSE_KERNEL_SUPPORTED 23 | If you aren't building a kernel for an enterprise distribution, 24 | say n. 25 | 26 | +config SUSE_KERNEL_RELEASED 27 | + bool "Release kernel" 28 | + default n 29 | + help 30 | + This kernel is built for release through official channels. 31 | + 32 | endmenu 33 | --- a/kernel/ksysfs.c 34 | +++ b/kernel/ksysfs.c 35 | @@ -247,6 +247,7 @@ EXPORT_SYMBOL_GPL(kernel_kobj); 36 | #ifdef CONFIG_SUSE_KERNEL_SUPPORTED 37 | const char *supported_printable(int taint) 38 | { 39 | +#ifdef CONFIG_SUSE_KERNEL_RELEASED 40 | int mask = (1 << TAINT_PROPRIETARY_MODULE) | (1 << TAINT_NO_SUPPORT); 41 | if ((taint & mask) == mask) 42 | return "No, Proprietary and Unsupported modules are loaded"; 43 | @@ -258,6 +259,9 @@ const char *supported_printable(int taint) 44 | return "Yes, External"; 45 | else 46 | return "Yes"; 47 | +#else 48 | + return "No, Unreleased kernel"; 49 | +#endif 50 | } 51 | 52 | static ssize_t supported_show(struct kobject *kobj, 53 | --- a/lib/dump_stack.c 54 | +++ b/lib/dump_stack.c 55 | @@ -55,7 +55,7 @@ void __init dump_stack_set_arch_desc(const char *fmt, ...) 56 | */ 57 | void dump_stack_print_info(const char *log_lvl) 58 | { 59 | - printk("%sCPU: %d UID: %u PID: %d Comm: %.20s %s%s %s %.*s %s %s " BUILD_ID_FMT "\n", 60 | + printk("%sCPU: %d UID: %u PID: %d Comm: %.20s %s%s %s %.*s %s %s%s " BUILD_ID_FMT "\n", 61 | log_lvl, raw_smp_processor_id(), 62 | __kuid_val(current_real_cred()->euid), 63 | current->pid, current->comm, 64 | @@ -64,7 +64,13 @@ void dump_stack_print_info(const char *log_lvl) 65 | init_utsname()->release, 66 | (int)strcspn(init_utsname()->version, " "), 67 | init_utsname()->version, preempt_model_str(), 68 | - SUSE_PRODUCT_SHORTNAME, BUILD_ID_VAL); 69 | + SUSE_PRODUCT_SHORTNAME, 70 | +#ifndef CONFIG_SUSE_KERNEL_RELEASED 71 | + " (unreleased)", 72 | +#else 73 | + "", 74 | +#endif 75 | + BUILD_ID_VAL); 76 | 77 | if (get_taint()) 78 | printk("%s%s\n", log_lvl, print_tainted_verbose()); 79 | --------------------------------------------------------------------------------