• Stars
    star
    139
  • Rank 257,911 (Top 6 %)
  • Language
    Python
  • License
    GNU General Publi...
  • Created over 9 years ago
  • Updated 4 days ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A quilt-like series of patches plus scripts and .spec files to produce the kernel RPM package. If you are looking for a ready-to-use kernel tree, have a look at https://github.com/openSUSE/kernel
Kernel Repository Guidelines
============================


Table Of Contents
=================

    Getting Started
    Patch Headers
    Before You Commit -- Things To Check
    Config Option Changes
    Committing and Log Messages
    What Is The Kernel ABI?
    Kernel ABI Changes
    Embargoed Patches
    Related Information

Getting Started
===============

Make sure you have a decent git version (1.5.x should work) and quilt
installed.

Introduce yourself if you haven't done so already:
    $ git config --global user.name "Your Name"
    $ git config --global user.email your@email

If you ommit the --global option, the setting will only apply to this
clone.

Set up some git hooks and helpers:

    $ ./scripts/install-git-hooks

To hack on the kernel sources:

    $ ./scripts/sequence-patch.sh --quilt
    $ cd tmp/linux-$version-$branch
    $ quilt new patches.fixes/fix-foo-and-bar
    $ quilt edit some/file.c
    $ ./refresh_patch.sh
    $ quilt header -e # see next chapter

Refer to quilt documentation for details. When you are done, add the new
patch to an appropriate place in the series.conf file and run
./scripts/log to commit it. Patches should be named such that they
consist of alphanumeric characters, '-', and '.'. Typically, patches are
named by filtering the Subject of the patch to a lower-case, dash-separated
form like the one in the example above.

To build rpm packages:

    $ ./scripts/tar-up.sh

This creates a source package in the kernel-source directory. Use

    $ ./scripts/osc_wrapper [kernel-source/kernel-$flavor.spec]

to build a kernel package locally, or

    $ ./scripts/osc_wrapper upload [--ibs]

to have all flavors and architectures built by the Open Build Service.
The --ibs option uses the SUSE internal instance.


Patch Headers
=============

Each patch must have a RFC822-style header that at a minimum describes
what the patch does, who wrote it, and who inside SUSE we'll
"blame" about problems with the patch.  The rules for patch headers are:

 * Each patch must have a From: tag that identifies the author of the
   patch.

 * Each patch must have a Subject: tag that briefly describes what
   the patch does.  A brief summary is it could show up in a change
   log makes the most sense in most cases.

 * Unless the author identified in the From: tag has a @suse.de,
   @suse.com or @suse.cz, address, the patch must include a Signed-off-by:,
   Acked-by: or Reviewed-by: header which identifies the person in one of
   these domains who feels responsible for the patch inside the company.

 * The patch must include a Patch-mainline: tag that identifies where
   the patch came from (for backports from mainline), or when it is
   expected to be added to mainline. The format is one of:

   For backports from mainline:
        Patch-mainline: <upstream version, ex. "v3.5-rc1">
        Git-commit: <git hash>

   If the commit is from a maintainer repository or some other
   repository that isn't Linus's:
        Patch-mainline: Queued in subsystem maintainer repository
        Git-repo: <url>
        Git-commit: <git hash>

   If the patch is not upstream, depending on the situation:
        Patch-mainline: Submitted, <timestamp - destination>

        Patch-mainline: Not yet, <reason>

        Patch-mainline: Never, <reason>

 * The patch should include a References: tag that identifies the Bugzilla bug
   number, JIRA epic, etc. where the patch is discussed.  Please prefix
   bugzilla.suse.com bug numbers with bsc# and JIRA epic numbers with jsc#.
   Please make sure you reference a JIRA epic when referencin JIRA features.
   Have a look at
   http://en.opensuse.org/openSUSE:Packaging_Patches_guidelines#Current_set_of_abbreviations
   for a full list of abbreviations.

 * The patch header may (and often, should) include a more extensive
   description of what the patch does, why, and how.  The idea is to
   allow others to quickly identify what each patch is about, and to
   give enough information for reviewing.

More details about valid patch headers can be found in
scripts/patch-tag-template.  The helper script scripts/patch-tag can be
used for managing these tags.  Documentation for patch-tag can be found
at the top of the script itself.

Example usage of scripts/patch-tag-template:

    $ cp scripts/patch-tag-template ~/.patchtag

    Edit ~/.patchtag with any default values you want

    $ patch-tag -e file.diff

Example patch header:

    | Date: Fri, Sep 26 2008 15:20:10 +1000
    | From: Peter Leckie <[email protected]>
    | References: SGI:PV986789 bnc#482148
    | Subject: Clean up dquot pincount code
    | Patch-mainline: v2.6.28
    |
    | Clean up dquot pincount code.
    |
    | This is a code cleanup and optimization that removes a per mount point
    | spinlock from the quota code and cleans up the code.
    |
    | The patch changes the pincount from being an int protected by a spinlock
    | to an atomic_t allowing the pincount to be manipulated without holding
    | the spinlock.
    |
    | This cleanup also protects against random wakup's of both the aild and
    | xfssyncd by reevaluating the pincount after been woken. Two latter patches
    | will address the Spurious wakeups.
    |
    | Signed-off-by: Peter Leckie <[email protected]>
    | Acked-by: Jan Kara <[email protected]>

Patch sorting
=============

Patches added to the "sorted patches" section of series.conf must be sorted
according to the upstream order of the commit that they backport.

After you've added a patch file to one of the patches.* directory and added the
required tags described in the section "Patch Headers", run

    $ ./scripts/git_sort/series_insert.py <patch>

to insert an entry for a new patch file to the sorted section of series.conf.

For more information, please read "scripts/git_sort/README.md".

Before You Commit -- Things To Check
====================================

Make sure that all patches still apply after your changes.  One way of
doing this is using scripts/sequence-patch.sh:

    $ export SCRATCH_AREA=/var/tmp/scratch
    $ scripts/sequence-patch.sh
    Creating tree in /var/tmp/scratch/linux-5.3-SLE15-SP3
    Cleaning up from previous run
    Linking from /var/tmp/scratch/linux-5.3.orig
    Applying 50892 patches using 4 threads...
    Saving modified files...
    [ Tree: /var/tmp/scratch/linux-5.3-SLE15-SP3 ]
    [ Generating Module.supported ]
    [ Copying config/x86_64/default ]

Note the Tree: line output by the sequence-patch.sh script which
specifies the location of the expanded kernel tree that is configured
for local build.
Please test-compile the kernel or even test-build kernel packages,
depending on the impact of your changes.  Use scripts/tar-up.sh for
creating an OBS package directory.

The kernel source tree that scripts/sequence-patch.sh creates can be
test-compiled. Before that, make sure all prerequisites are installed.
These include libopenssl-devel, libelf-devel, and dwarves (look into
rpm/kernel-binary.spec.in for a complete list). Then, the compilation
can be done as follows:

    $ cd /var/tmp/scratch/linux-5.3-SLE15-SP3
    $ make oldconfig
    $ make

When committing a patch series try to make the series easy bisectable,
i.e. when applying only the first x patches (1 <= x <= n, n being the
number of patches in the series) the kernel is still buildable and
functional.

This means especially, that just adding upstream patches unmodified
to a series and doing a cleanup patch at the end of the series to
ensure the kernel is buildable and functional is to be avoided. Each
patch from upstream should be modified as required to fit into the
kernel it is backported to, both for build time and runtime.

In cases where upstream patches did cause a breakage (either build or
functional) which was corrected by a later patch and both patches are
part of the series, try to place the correcting patch as near as
possible to the patch causing breakage.

Config Option Changes
=====================

We are building kernel packages for various architectures and
configurations from the same sources.  Each such kernel has its own
configuration file in config/$ARCH/$FLAVOR.  There are checks in place
that abort the kernel build when those configuration files are missing
config options.

When adding patches that add kernel config options, please also update
all config files as follows:

    $ scripts/sequence-patch.sh
    $ cd /var/tmp/scratch/linux-5.3-SLE15-SP3
    $ patches/scripts/run_oldconfig.sh


Committing and Log Messages
===========================

Any commit which affects the kernel package (rather than internals of the
repository such as helper scripts) should be documented in
kernel-source.changes.  The log entry must include the timestamp
(`date`), email address of the committer, and a change summary, and
should include the names of the affected files, as in the following
example:

    | -------------------------------------------------------------------
    | Wed Dec  1 18:29:44 CET 2004 - [email protected]
    |
    | - patches.fixes/serialize-dgram-read.diff: Serialize dgram read
    |   using semaphore just like stream (#48427).
    |

There is a simple helper script for creating changelog entries in this
format (/work/src/bin/vc).

An advanced script (scripts/log) for creating changelog entries from
patch headers, and then automatically committing the change, exists as
well.  This script extracts Subject: and References: headers from added
or modified patches and generates a changelog entry proposal that the
user can further modify.  This approach works well for new or removed
patches.  When modifying existing patches, it usually is necessary to
modify the generated changelog entry by hand.  (scripts/log requires the
vc helper script either in the PATH, or in /work/src/bin/).


What Is The Kernel ABI?
=======================

All symbols that the kernel exports for use by modules, and all symbols
that modules export for use by other modules, are associated with a
so-called modversion, which is a checksum of the type of the symbol
(including all sub-types involved).  Symbols that a module imports are
associated with the identical checksum.

When a module is loaded, the kernel makes sure that the checksums of the
exported symbols match the checksums of the imported symbols.

The kernel exports a large number of symbols (in the range of 5000).  We
could Provide and Require all those symbols as RPM package dependencies,
so that then those dependencies would make sure that all packages
containing kernel modules would have a matching kernel installed.

RPM does not easily handle such large amounts of dependencies though,
and so instead of modeling dependencies based on individual symbols, we
compute distinct classes of symbols, and we create one "kernel(...)"
RPM dependency per class.

Modifying, adding, or removing kernel exports will also change the
kernel(...) symbols.


Kernel ABI Changes
==================

During kernel builds, two things related to the kernel ABI happen:

 * If a reference symvers file (/boot/symvers-* in kernel-$FLAVOR
   packages) for the particular architecture and flavor is available, we
   check how severe the ABI changes are compared to this reference.
   These reference files are located in kabi/$ARCH/symvers-$FLAVOR.  Too
   severe changes will abort the build.  See rpm/kernel-binary.spec.in
   and scripts/kabi-checks (SLES9 - SLES10) or rpm/symsets.pl (SLES11)
   for details.

 * We want to avoid losing kernel(...) symbols when additional symbols
   are added, but all previous symbols are still available: in this
   case, all modules will continue to load into the new kernel just
   fine.

   If a reference symsets file (/boot/symsets-* in kernel-$FLAVOR
   packages) for the particular architecture and flavor is available, we
   check which of the symbol sets in the reference file can still be
   exported, even though symbols have meanwhile been added.  We also
   export the kernel(...) symbols from reference symset files.


To update the reference files, use scripts/update-symvers:

    $ ./scripts/update-symvers kernel-default-2.6.27.25-0.1.1.x86_64.rpm \
         kernel-default-2.6.27.25-0.1.1.i586.rpm ...

It is also possible to update only a subset of the symbols, e.g.:

    $ ./scripts/update-symvers --filter=fs/xfs ...

In either case, ask the branch owner and kernel packager for permission
before touching the kabi files.



Ignoring Kernel ABI Changes
---------------------------

Sometimes we want to tolerate particular kernel ABI changes (and not
abort the builds).  At the same time, we do not want to update the
reference symvers and symsets files, because we still want to monitor the
relative changes, and we want to continue preserving all symbol sets
which are still compatible.

Particular kernel can be marked so that kernel ABI changes are ignored.
This is done by creating kabi/$ARCH/ignore-$FLAVOR files (e.g.,
kabi/x86_64/ignore-xen, kabi/s390/ignore-default).  The kernel ABI checks
will still be produced, but the build will not be aborted.  The file
contents d not matter.

All kernel ABI changes in all kernel packages can be ignored by creating
a file called IGNORE-KABI-BADNESS in the kernel-source/ sub-directory of
the repository that scripts/tar-up.sh creates.  (This may be necessary
for PTF kernels occasionally.)


Embargoed Patches
=================

At certain times during development, the kernel may include "embargoed"
patches, i.e., patches that must not be mad available to parties outside
of SUSE before an agreed-upon time.  Such patches usually have a
date of publication that has been coordinated among linux distributors,
etc. Such patches must not be committed to the usual branches, because
these are pushed to a public mirror, but instead to a branch named with
an _EMBARGO suffix, e.g. SLE11_BRANCH_EMBARGO. The KOTD scripts will
testbuild such branches, but won't publish them. Once the fix becomes
public, the branch needs to be merged back info the "mainline" branch,
e.g.:

    $ git checkout SLE11_BRANCH
    $ git merge SLE11_BRANCH_EMBARGO


Related Information
===================

Internal:
https://wiki.suse.net/index.php/SUSE-Labs_Publications/Kernel_Building
https://wiki.suse.net/index.php/SUSE-Labs_Publications/kernel_patches_rules

Public:
TBD

More Repositories

1

open-build-service

Build and distribute Linux packages from sources in an automatic, consistent and reproducible way #obs
Ruby
852
star
2

osem

Open Source Event Manager. An event management tool tailored to Free and Open Source Software conferences.
Ruby
826
star
3

snapper

Manage filesystem snapshots and allow undo of system modifications
C++
736
star
4

libsolv

Library for solving packages and reading repositories
C
469
star
5

zypper

World's most powerful command line package manager
C++
354
star
6

opi

OBS Package Installer (CLI)
Python
225
star
7

hwinfo

Hardware information tool
C
220
star
8

kernel

Our patched kernel sources. This repository is generated from https://github.com/openSUSE/kernel-source
C
179
star
9

imagewriter

Utility for writing raw disk images & hybrid isos to USB keys
C++
166
star
10

catatonit

A container init that is so simple it's effectively brain-dead.
C
158
star
11

osc

The Command Line Interface to work with an Open Build Service
Python
151
star
12

artwork

Contains the collaborative work of the openSUSE marketing and artwork teams. Content is licensed under CC-BY-SA 3.0 (Creative Commons Attribution-ShareAlike 3.0 Unported License).
HTML
148
star
13

obs-build

OBS build script, can be used with OBS or stand alone
Perl
123
star
14

software-o-o

The site behind https://software.opensuse.org. It is the default web interface to download openSUSE distributions and to search for OBS packages. Packaged at https://build.opensuse.org/project/show/openSUSE:infrastructure:software.opensuse.org
SCSS
121
star
15

agama

A service-based Linux installer
JavaScript
116
star
16

libzypp

ZYpp Package Management library
C++
107
star
17

wicked

Framework for network configuration
C
98
star
18

transactional-update

Atomic updates for Linux operating systems
C++
98
star
19

docker-containers

Source files required used to build the official openSUSE containers for Docker
Dockerfile
88
star
20

openSUSEway

dotfiles for Sway on openSUSE
CSS
81
star
21

libeconf

Enhanced config file parser, which merges config files placed in several locations into one.
C
78
star
22

libpathrs

C-friendly API to make path resolution safer on Linux.
Rust
66
star
23

SUSEPrime

Provide nvidia-prime like package for openSUSE
Shell
65
star
24

py2pack

Generate distribution packages from PyPI
Python
64
star
25

daps

DocBook Authoring and Publishing Suite (DAPS)
Shell
60
star
26

mentoring

The openSUSE Developer Mentoring Program
JavaScript
59
star
27

openSUSE-release-tools

Tools to aid in staging and release work for openSUSE/SUSE
Python
55
star
28

Customize-IBus

Full customization of appearance, behavior, system tray and input source indicator for IBus. (深度定制 IBus 的外观、行为、系统托盘以及输入指示)
JavaScript
54
star
29

landing-page

openSUSE landing page which features Tumbleweed and Leap
HTML
49
star
30

microos-toolbox

Script to run a toolbox container on openSUSE MicroOS
Shell
49
star
31

openSUSE-docs-revamped-temp

We're creating new, refreshed community user guides and documentation for the openSUSE distributions, centered on Tumbleweed, catering for inexperienced users and veterans alike. Target release: 2021
HTML
47
star
32

yomi

Yet one more installer
Python
41
star
33

trollolo

Trello command line client
Ruby
40
star
34

MirrorCache

Download Redirector
Perl
35
star
35

get-o-o

Website that provides detailed information about openSUSE distributions
HTML
34
star
36

docker-containers-build

openSUSE container builds used by Docker's stackbrew system
33
star
37

cheetah

Simple library for executing external commands safely and conveniently
Ruby
32
star
38

obs-docu

Official Open Build Service Documentation. Content gets reviewed and edited. Generated books are available at http://www.openbuildservice.org
32
star
39

obs-service-tar_scm

An OBS source service: fetches code from any SCM and archives it
Python
31
star
40

branding

openSUSE branding for the distribution - both branding-openSUSE and branding-baseonopensuse
29
star
41

supportutils

SUSE Linux Enterprise support utilities. Gathers system information.
Shell
28
star
42

cepces

cepces is an application for enrolling certificates through CEP and CES.
Python
28
star
43

scanny

Scanny — Ruby on Rails security scanner
Ruby
27
star
44

libstorage-ng

Next generation libstorage
C++
25
star
45

cavil

The legal review app used by SUSE Lawyers
Perl
25
star
46

vagrant

openSUSE for Vagrant
Shell
25
star
47

helm-mirror

Helm plugin used to mirror repositories
Go
24
star
48

salt-toaster

Salt Toaster: An ultimate test suite for Salt
Python
24
star
49

health-checker

Systemd service to check, if the system does come up correct after an update
Shell
24
star
50

multipath-tools-pre2021

Old (pre-2021) SUSE/SLES fork of Linux multipath tools. See github.com/openSUSE/multipath-tools for current code.
C
24
star
51

ca-certificates

Utilities for system wide CA certificate installation
Python
23
star
52

fuel-ignition

Easily generate new or edit existing Ignition configs. No more fiddling around with JSON or Butane.
Vue
23
star
53

wiki

openSUSE Wiki
PHP
23
star
54

salt

openSUSE and SUSE patches and backports for SaltStack
Python
22
star
55

python-rpm-macros

Multi-Python, Single-Spec macros generator
Lua
21
star
56

news-o-o

📰 News from the openSUSE Land
HTML
21
star
57

rapidquilt

Rust
20
star
58

mksusecd

Script to create a SUSE installation ISO image.
Perl
19
star
59

IBus-Theme-Hub

This is the hub for IBus theme that can be used by Customize IBus GNOME Shell Extension.(可被自定义IBus GNOME Shell 扩展使用的IBus主题集合)
CSS
19
star
60

kdump

kernel dump helpers
Shell
19
star
61

vagrant-ceph

Builds a cluster of servers using libvirt. Supports multiple configurations.
Ruby
17
star
62

osc2

The next Command Line Interface to work with an openSUSE Build Service
Python
17
star
63

kmozillahelper

KDE mozilla integration
C++
17
star
64

gfxboot

Graphical boot screen for GRUB, LILO, and SYSLINUX
HTML
17
star
65

linuxrc

Installation Setup
C
16
star
66

installation-images

openSUSE Installation Images
Perl
16
star
67

obs-landing

The Open Build Service project landing page
HTML
16
star
68

travel-support-program

A rails app to support the travel support program of openSUSE (TSP)
Ruby
16
star
69

old-landing-page

Former opensuse.org landing page
JavaScript
15
star
70

obs-service-cargo_vendor

OBS Source Service and utilities for Rust software packaging
Rust
15
star
71

gitarro

run all your test against a GitHub Pull request
Ruby
15
star
72

IBus-Theme-Tools

Generate the IBus GTK or GNOME Shell theme from existing themes. (从现有主题中生成 IBus GTK 或 GNOME Shell 主题)
Python
15
star
73

nailed

Collect and visualize product related data from Bugzilla and Github
Ruby
14
star
74

suse-vale-styleguide

Humble style guide for technical writers by a technical writer
14
star
75

containers-systemd

Systemd service files to run various openSUSE containers by systemd and podman
13
star
76

opensuse-themes

Themes used in openSUSE and OBS
Makefile
13
star
77

obsgit

Simple bridge between Open Build Server and git
Python
13
star
78

firefox-maintenance

Shell
13
star
79

orthos2

Orthos is a machine administration tool.
Python
13
star
80

chameleon

openSUSE Design System for Web
SCSS
13
star
81

jeos-firstboot

Lightweight firstboot wizard systemd service for SLE and openSUSE JeOS Images
Shell
12
star
82

sdbootutil

Shell
12
star
83

gloves

System configuration library, started by YaST developers
Ruby
12
star
84

obs-sign

sign daemon and client for remote gpg signing.
C
12
star
85

portusctl

A client for your Portus instance
Go
12
star
86

combustion

Configure MicroOS on the first boot
Shell
12
star
87

obs-service-format_spec_file

An OBS source service: reformats a spec file to SUSE standard
Python
12
star
88

suseviclient

SUSE VI Client: Lightweight tool for ESXi management from Linux box
JavaScript
11
star
89

suse-xsl

DocBook XSL Stylesheets for SUSE branding
XSLT
11
star
90

defrag-api

Python
11
star
91

openSUSE-repos

openSUSE-repos
11
star
92

os-update

Update automatically package based OS and reboot if necessary
Shell
11
star
93

perl-bootloader

Perl modules for configuring various boot loaders
Perl
11
star
94

cockpit-wicked

Cockpit module to configure the network using Wicked.
JavaScript
11
star
95

build-compare

Compare content of rpm package and find differences inside the files.
Shell
11
star
96

sat-solver

Library for solving packages and reading repositories (superseded by libsolv)
C
10
star
97

patterns

openSUSE patterns
Python
10
star
98

sysconfig

Shell
10
star
99

release-notes-openSUSE

Release Notes for openSUSE
Makefile
10
star
100

Mojo-IOLoop-ReadWriteProcess

Execute external programs or internal code blocks as separate process
Perl
9
star