Commit 21af342d authored by Ben Hutchings's avatar Ben Hutchings Committed by Matthias Klumpp

Import Debian version 0.132

initramfs-tools (0.132) unstable; urgency=medium

  * [4e1f80e] mkinitramfs: Don't try to remove nonexistent /var/cache/ldconfig
    (Closes: #904065)
  * [d0212d3] hook-functions: Quote exclusions in copy_modules_dir
  * [8c806b4] hook-functions: Add support for compressed module files
    (Closes: #891560)
  * [71f5d61] mkinitramfs: Create usr-merged filesystem layout
    (Closes: #874523)
  * [4c0d86c] hooks/resume: Loop over all swap devices when selecting
    automatically
  * [312393b] hooks/resume: Reject zram swap devices when selecting
    automatically (Closes: #861228)
  * [c0ae42b] update-initramfs: Always take over other initramfs images
    (Closes: #765750, #804295)
  * [f39625a] update-initramfs: Make "-k all" take over other initramfs images
  * [f273172] scripts/functions: Fix parsing of device name from ip parameter
  * [abae896] scripts/functions: Merge information from BOOTIF/DEVICE and ip
    parameters (Closes: #721088)

initramfs-tools (0.131) unstable; urgency=medium

  [ Ben Hutchings ]
  * [34bf250] debian/control: Remove maximilian attems and Adam Conrad from
    Uploaders field
  * [5ad3976] hooks/resume: Generalise logic to replace dev name with UUID when
    RESUME=auto
  * [0170b7f] hooks/resume: Store /dev/mapper path for swap if possible when
    RESUMEauto (Closes: #883735)
  * [5bf4c29] debian/control: Point Vcs URLs to Salsa
  * [e8377b3] hooks/fsck: Fix invocation of fstype at build time.
    Thanks to Simon Tatham <anakin@pobox.com> (Closes: #865691)
  * [492763a] docs: Convert maintainer notes to Markdown format
  * [0214976] docs/maintainer-notes.md: Update references to Alioth, to Salsa
  * [b71c6c9] docs/maintainer-notes.md: Delete mention of git-core package
  * [89daebf] docs/maintainer-notes.md: Change BTS link to specify source
    package
  * [8e539dc] docs/maintainer-notes.md: Link to tracker.debian.org instead of
    PTS
  * [3f27197] docs/maintainer-notes.md: Remove stale link to Debian bug count
    graph
  * [7dece27] docs/maintainer-notes.md: Use HTTP-S for Debian wiki and popcon
    links
  * [838b6ec] docs/maintainer-notes.md: Link directly to Ubuntu bug list
  * [eaa61d4] docs/maintainer-notes.md: Add myself as co-author
  * [fa7df8f] hook-functions: Correct the comment above hidden_dep_add_modules
  * [0ffbeb9] hook-functions: Remove directory information from
    hidden_dep_add_modules
  * [78e95c1] hook-functions: Check modules.builtin in hidden_dep_add_modules
  * [976aeb9] hook-functions: Handle i8042 hidden dependency on psmouse
    (Closes: #878829)
  * [211e050] hook-functions: Handle nvme hidden dependency on vmd.
    Thanks to Mario Limonciello <Mario.Limonciello@dell.com> (Closes: #886349)
  * [28536f6] unmkinitramfs, lsinitramfs: Split multiple early initramfs
    sections (Closes: #886424)
  * [2a9d97d] debian/control: Add e2fsprogs to Depends for initramfs-tools-core
    (Closes: #887211)
  * [577c94e] initramfs.conf: Update documentation of the DEVICE variable
  * [f1cbe6f] mkinitramfs: Build reproducible images when SOURCE_DATE_EPOCH is
    set. Thanks to Chris Lamb <lamby@debian.org> (Closes: #845034)
  * [717e6bd] mkinitramfs: Exclude ldconfig auxiliary cache from initramfs
    image. Thanks to Kristian Klausen <klausenbusk@hotmail.com>
  * [8bddfe4] mkinitramfs(8): Remove description of nonexistent options
  * [ecd6ce2] mkinitramfs(8), hook-functions: Correct references to "ramdisk"
  * [63cec7b] docs: Move initramfs-tools man page to section 7
  * [562d86e] docs: Update man page header dates
  * [9bd960e] docs: Set man page header source and manual parameters correctly
  * [97cc7e7] docs: Don't package maintainer documentation in
    initramfs-tools-core
  * [4e19a6f] docs: Remove outdated "HACKING" documentation file
  * [6c02622] debian/control: Remove obsolete Breaks and Depends relations
  * [749751c] debian/control: Update Standards-Version to 4.1.5
    - Set Rules-Requires-Root: no
  * [db469f0] initramfs-tools: Override lintian warning "breaks-without-version
    upstart"

  [ Riku Voipio ]
  * [72b6419] auto_add_modules: add mfd for MODULES==most (Closes: #880584)

  [ Benjamin Drung ]
  * [7ca4d0d] Add mlx4 and mlx5 InfiniBand modules to hidden_dep_add_modules
    (Closes: #871595)
  * [df7d7e8] Add option to clear screen at the beginning (Closes: #856929)
  * [a33cb62] Fix indentation (spaces to tabs)
  * [3962c4f] Fix config directory in error message (Closes: #856589)
  * [be2b91c] Double quote to prevent globbing and word splitting
  * [ae339ff] Make size of /run configurable (Closes: #862013)

  [ Steve Langasek ]
  * [c198331] Skip dmsetup resume devices if they are randomly encrypted.

  [ Paul Menzel ]
  * [e28b865] mkinitramfs: Add LZ4 support (Closes: #893845)
  * [5091a5e] control: Remove suggestion of *lz4-tools*

  [ Colin Watson ]
  * [b4804dd] Only sync the filesystem containing the initramfs
    (Closes: #882380) (LP: #1667512)

  [ Karsten Merker ]
  * [281ad9a] Include the axp20x_usb_power module in the base modules list for
    MODULES=most (Closes: #866521)

  [ Ivan Kozik ]
  * [54367c0] init: export DEVICE so that when configured, it is actually set
    in configure_networking (Closes: #883664)
parent 7e22fcf9
> I am not sure how to modify mkinitramfs to do this automatically, maybe you know?
I need to document this more clearly, but the initramfs-tools have a collection of hooks that will solve your problem. While there's no way that Breezy could do this in the install, we could certainly include the scripts in the package (Especially if you're willing to test them to make sure they work! *g*)
There are two phases that need to be accounted for. The first is the install phase for generating the initramfs, the second is run-time phase for actually doing the needed magic.
To install the components you need, look at the scripts in /usr/share/initramfs-tools/hooks. evms and acpid are good choices. You can see a bunch of header stuff at the top that basically guarantees that things are run in the right order if they need to be. Two functions that will interest you:
copy_exec copies a binary and any libraries it depends on
manual_add_modules takes bareword module names (like fan, thermal, etc) and installs those modules and any of their dependancies into the initramfs.
The runtime phase is handled by scripts in /usr/share/initramfs-tools/scripts/ you probably want to start up at about the same point as lvm, md, and evms do, so local-top is a good directory to look in.
You can see the same sort of magic at the top of the script, although lvm and evms each require that md run first.
I hope this helps. I'll paste this text into a HACKING file on the hopes that someone will see fit to improve it. That person will probably be me, mind you... =)
Tks,
Jeff Bailey
...@@ -38,7 +38,7 @@ BUSYBOX=auto ...@@ -38,7 +38,7 @@ BUSYBOX=auto
KEYMAP=n KEYMAP=n
# #
# COMPRESS: [ gzip | bzip2 | lzma | lzop | xz ] # COMPRESS: [ gzip | bzip2 | lz4 | lzma | lzop | xz ]
# #
COMPRESS=gzip COMPRESS=gzip
...@@ -51,7 +51,7 @@ COMPRESS=gzip ...@@ -51,7 +51,7 @@ COMPRESS=gzip
# DEVICE: ... # DEVICE: ...
# #
# Specify a specific network interface, like eth0 # Specify a specific network interface, like eth0
# Overridden by optional ip= bootarg # Overridden by optional ip= or BOOTIF= bootarg
# #
DEVICE= DEVICE=
...@@ -62,3 +62,11 @@ DEVICE= ...@@ -62,3 +62,11 @@ DEVICE=
NFSROOT=auto NFSROOT=auto
#
# RUNSIZE: ...
#
# The size of the /run tmpfs mount point, like 256M or 10%
# Overridden by optional initramfs.runsize= bootarg
#
RUNSIZE=10%
/files
/*.debhelper.log
/*.substvars
/initramfs-tools/
/initramfs-tools-core/
initramfs-tools (0.130pureos2) green; urgency=medium initramfs-tools (0.132) unstable; urgency=medium
* [4e1f80e] mkinitramfs: Don't try to remove nonexistent /var/cache/ldconfig
(Closes: #904065)
* [d0212d3] hook-functions: Quote exclusions in copy_modules_dir
* [8c806b4] hook-functions: Add support for compressed module files
(Closes: #891560)
* [71f5d61] mkinitramfs: Create usr-merged filesystem layout
(Closes: #874523)
* [4c0d86c] hooks/resume: Loop over all swap devices when selecting
automatically
* [312393b] hooks/resume: Reject zram swap devices when selecting
automatically (Closes: #861228)
* [c0ae42b] update-initramfs: Always take over other initramfs images
(Closes: #765750, #804295)
* [f39625a] update-initramfs: Make "-k all" take over other initramfs images
* [f273172] scripts/functions: Fix parsing of device name from ip parameter
* [abae896] scripts/functions: Merge information from BOOTIF/DEVICE and ip
parameters (Closes: #721088)
-- Ben Hutchings <ben@decadent.org.uk> Thu, 26 Jul 2018 01:18:39 +0800
initramfs-tools (0.131) unstable; urgency=medium
* Use busybox-initramfs on PureOS [ Ben Hutchings ]
* Make busybox-initramfs a dependency, fixing kernel install * [34bf250] debian/control: Remove maximilian attems and Adam Conrad from
failures with cryptsetup Uploaders field
* [5ad3976] hooks/resume: Generalise logic to replace dev name with UUID when
RESUME=auto
* [0170b7f] hooks/resume: Store /dev/mapper path for swap if possible when
RESUMEauto (Closes: #883735)
* [5bf4c29] debian/control: Point Vcs URLs to Salsa
* [e8377b3] hooks/fsck: Fix invocation of fstype at build time.
Thanks to Simon Tatham <anakin@pobox.com> (Closes: #865691)
* [492763a] docs: Convert maintainer notes to Markdown format
* [0214976] docs/maintainer-notes.md: Update references to Alioth, to Salsa
* [b71c6c9] docs/maintainer-notes.md: Delete mention of git-core package
* [89daebf] docs/maintainer-notes.md: Change BTS link to specify source
package
* [8e539dc] docs/maintainer-notes.md: Link to tracker.debian.org instead of
PTS
* [3f27197] docs/maintainer-notes.md: Remove stale link to Debian bug count
graph
* [7dece27] docs/maintainer-notes.md: Use HTTP-S for Debian wiki and popcon
links
* [838b6ec] docs/maintainer-notes.md: Link directly to Ubuntu bug list
* [eaa61d4] docs/maintainer-notes.md: Add myself as co-author
* [fa7df8f] hook-functions: Correct the comment above hidden_dep_add_modules
* [0ffbeb9] hook-functions: Remove directory information from
hidden_dep_add_modules
* [78e95c1] hook-functions: Check modules.builtin in hidden_dep_add_modules
* [976aeb9] hook-functions: Handle i8042 hidden dependency on psmouse
(Closes: #878829)
* [211e050] hook-functions: Handle nvme hidden dependency on vmd.
Thanks to Mario Limonciello <Mario.Limonciello@dell.com> (Closes: #886349)
* [28536f6] unmkinitramfs, lsinitramfs: Split multiple early initramfs
sections (Closes: #886424)
* [2a9d97d] debian/control: Add e2fsprogs to Depends for initramfs-tools-core
(Closes: #887211)
* [577c94e] initramfs.conf: Update documentation of the DEVICE variable
* [f1cbe6f] mkinitramfs: Build reproducible images when SOURCE_DATE_EPOCH is
set. Thanks to Chris Lamb <lamby@debian.org> (Closes: #845034)
* [717e6bd] mkinitramfs: Exclude ldconfig auxiliary cache from initramfs
image. Thanks to Kristian Klausen <klausenbusk@hotmail.com>
* [8bddfe4] mkinitramfs(8): Remove description of nonexistent options
* [ecd6ce2] mkinitramfs(8), hook-functions: Correct references to "ramdisk"
* [63cec7b] docs: Move initramfs-tools man page to section 7
* [562d86e] docs: Update man page header dates
* [9bd960e] docs: Set man page header source and manual parameters correctly
* [97cc7e7] docs: Don't package maintainer documentation in
initramfs-tools-core
* [4e19a6f] docs: Remove outdated "HACKING" documentation file
* [6c02622] debian/control: Remove obsolete Breaks and Depends relations
* [749751c] debian/control: Update Standards-Version to 4.1.5
- Set Rules-Requires-Root: no
* [db469f0] initramfs-tools: Override lintian warning "breaks-without-version
upstart"
[ Riku Voipio ]
* [72b6419] auto_add_modules: add mfd for MODULES==most (Closes: #880584)
[ Benjamin Drung ]
* [7ca4d0d] Add mlx4 and mlx5 InfiniBand modules to hidden_dep_add_modules
(Closes: #871595)
* [df7d7e8] Add option to clear screen at the beginning (Closes: #856929)
* [a33cb62] Fix indentation (spaces to tabs)
* [3962c4f] Fix config directory in error message (Closes: #856589)
* [be2b91c] Double quote to prevent globbing and word splitting
* [ae339ff] Make size of /run configurable (Closes: #862013)
[ Steve Langasek ]
* [c198331] Skip dmsetup resume devices if they are randomly encrypted.
[ Paul Menzel ]
* [e28b865] mkinitramfs: Add LZ4 support (Closes: #893845)
* [5091a5e] control: Remove suggestion of *lz4-tools*
-- Matthias Klumpp <matthias.klumpp@puri.sm> Thu, 22 Mar 2018 11:04:18 +0100 [ Colin Watson ]
* [b4804dd] Only sync the filesystem containing the initramfs
(Closes: #882380) (LP: #1667512)
initramfs-tools (0.130pureos1) green; urgency=medium [ Karsten Merker ]
* [281ad9a] Include the axp20x_usb_power module in the base modules list for
MODULES=most (Closes: #866521)
* Fork for PureOS. [ Ivan Kozik ]
* Don't show "Possible missing firmware" messages unless "-v" is passed to * [54367c0] init: export DEVICE so that when configured, it is actually set
update-initramfs. <http://tracker.pureos.net/T362> in configure_networking (Closes: #883664)
-- Chris Lamb <chris.lamb@puri.sm> Sun, 11 Mar 2018 19:08:20 -0700 -- Ben Hutchings <ben@decadent.org.uk> Thu, 19 Jul 2018 01:06:01 +0100
initramfs-tools (0.130) unstable; urgency=medium initramfs-tools (0.130) unstable; urgency=medium
......
Source: initramfs-tools Source: initramfs-tools
Section: utils Section: utils
Priority: optional Priority: optional
Uploaders: Uploaders: Michael Prokop <mika@debian.org>, Ben Hutchings <ben@decadent.org.uk>
Chris Lamb <chris.lamb@puri.sm>, Maintainer: Debian kernel team <debian-kernel@lists.debian.org>
Matthias Klumpp <matthias.klumpp@puri.sm>,
Maintainer: PureOS Maintainers <pureos-project@lists.puri.sm>
Build-Depends: debhelper (>= 9), bash-completion Build-Depends: debhelper (>= 9), bash-completion
Standards-Version: 3.9.8 Rules-Requires-Root: no
Vcs-Browser: https://source.puri.sm/pureos/core/initramfs-tools Standards-Version: 4.1.5
Vcs-Git: https://source.puri.sm/pureos/core/initramfs-tools.git Vcs-Browser: https://salsa.debian.org/kernel-team/initramfs-tools
Vcs-Git: https://salsa.debian.org/kernel-team/initramfs-tools.git
Package: initramfs-tools Package: initramfs-tools
Architecture: all Architecture: all
...@@ -17,7 +16,7 @@ Depends: initramfs-tools-core (= ${binary:Version}), linux-base, ${misc:Depends} ...@@ -17,7 +16,7 @@ Depends: initramfs-tools-core (= ${binary:Version}), linux-base, ${misc:Depends}
Suggests: bash-completion Suggests: bash-completion
Provides: linux-initramfs-tool Provides: linux-initramfs-tool
Conflicts: linux-initramfs-tool, usplash (<< 0.5.50) Conflicts: linux-initramfs-tool, usplash (<< 0.5.50)
Breaks: cryptsetup (<< 2:1.6.6-4~), elilo (<< 3.12-3.1~), lilo (<< 22.8-8.2~), s390-tools (<< 1.8.3-2~), console-setup (<< 1.72), systemd-sysv (<< 186), lvm2 (<< 2.02.111-2.1~), initscripts (<< 2.88dsf-59.3~), upstart, e2fsprogs (<< 1.42.13) Breaks: initscripts (<< 2.88dsf-59.3~), upstart, e2fsprogs (<< 1.42.13)
Description: generic modular initramfs generator (automation) Description: generic modular initramfs generator (automation)
This package builds a bootable initramfs for Linux kernel packages. The This package builds a bootable initramfs for Linux kernel packages. The
initramfs is loaded along with the kernel and is responsible for initramfs is loaded along with the kernel and is responsible for
...@@ -26,7 +25,8 @@ Description: generic modular initramfs generator (automation) ...@@ -26,7 +25,8 @@ Description: generic modular initramfs generator (automation)
Package: initramfs-tools-core Package: initramfs-tools-core
Architecture: all Architecture: all
Multi-Arch: foreign Multi-Arch: foreign
Depends: ${busybox:Depends}, klibc-utils (>= 2.0.4-8~), cpio, kmod | module-init-tools, udev, ${misc:Depends} Recommends: ${busybox:Recommends}
Depends: klibc-utils (>= 2.0.4-8~), cpio (>= 2.12), kmod, udev, coreutils (>= 8.24), e2fsprogs, ${misc:Depends}
Suggests: bash-completion Suggests: bash-completion
Breaks: initramfs-tools (<< 0.121~), ${busybox:Breaks} Breaks: initramfs-tools (<< 0.121~), ${busybox:Breaks}
Replaces: initramfs-tools (<< 0.121~) Replaces: initramfs-tools (<< 0.121~)
......
Document: initramfs-maintainer
Title: Maintainer documentation for initramfs-tools
Author: Michael Prokop
Abstract: This document describes the workflow of
the initramfs-tools maintainers.
Section: Debian
Format: HTML
Index: /usr/share/doc/initramfs-tools-core/maintainer-notes.html
Files: /usr/share/doc/initramfs-tools-core/maintainer-notes.html
HACKING
docs/maintainer-notes.html
...@@ -2,4 +2,4 @@ lsinitramfs.8 ...@@ -2,4 +2,4 @@ lsinitramfs.8
mkinitramfs.8 mkinitramfs.8
unmkinitramfs.8 unmkinitramfs.8
initramfs.conf.5 initramfs.conf.5
initramfs-tools.8 initramfs-tools.7
# upstart will never be fixed, so it is correct to not specify a version
initramfs-tools: breaks-without-version upstart
...@@ -5,12 +5,12 @@ ...@@ -5,12 +5,12 @@
# On Debian we can use either busybox or busybox-static, but on Ubuntu # On Debian we can use either busybox or busybox-static, but on Ubuntu
# and derivatives only busybox-initramfs will work. # and derivatives only busybox-initramfs will work.
BUSYBOX_PACKAGES := $(shell if dpkg-vendor --derives-from ubuntu || dpkg-vendor --derives-from pureos; then echo busybox-initramfs; else echo busybox busybox-static; fi) BUSYBOX_PACKAGES := $(shell if dpkg-vendor --derives-from ubuntu; then echo busybox-initramfs; else echo busybox busybox-static; fi)
BUSYBOX_MIN_VERSION := 1:1.22.0-17~ BUSYBOX_MIN_VERSION := 1:1.22.0-17~
override_dh_gencontrol: override_dh_gencontrol:
echo >> debian/initramfs-tools-core.substvars "busybox:Breaks=$(wordlist 2,100,$(BUSYBOX_PACKAGES:%=, % (<< $(BUSYBOX_MIN_VERSION))))" echo >> debian/initramfs-tools-core.substvars "busybox:Breaks=$(wordlist 2,100,$(BUSYBOX_PACKAGES:%=, % (<< $(BUSYBOX_MIN_VERSION))))"
echo >> debian/initramfs-tools-core.substvars "busybox:Depends=$(wordlist 2,100,$(BUSYBOX_PACKAGES:%=| % (>= $(BUSYBOX_MIN_VERSION))))" echo >> debian/initramfs-tools-core.substvars "busybox:Recommends=$(wordlist 2,100,$(BUSYBOX_PACKAGES:%=| % (>= $(BUSYBOX_MIN_VERSION))))"
dh_gencontrol dh_gencontrol
override_dh_install: override_dh_install:
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
# #
# DESTDIR -- The staging directory where we are building the image. # DESTDIR -- The staging directory where we are building the image.
# #
# see initramfs-tools(8) # see initramfs-tools(7)
# #
# List the soft prerequisites here. This is a space separated list of # List the soft prerequisites here. This is a space separated list of
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
# The # package that owns it may opt to install it in an appropriate # The # package that owns it may opt to install it in an appropriate
# location under "/usr/share/initramfs-tools/scripts/". # location under "/usr/share/initramfs-tools/scripts/".
# #
# see initramfs-tools(8) for more details. # see initramfs-tools(7) for more details.
# #
# List the soft prerequisites here. This is a space separated list of # List the soft prerequisites here. This is a space separated list of
......
This diff is collapsed.
***
# Maintainer documentation for initramfs-tools
***
## Table of Contents
* [1. Definitions](#definitions)
* [2. Preparations](#preparations)
* [3. Workflow for daily work](#workflow)
* [3.1 Implement new features](#newfeature)
* [3.2 Merge branches](#merge)
* [3.3 Test specific branch](#test)
* [3.4 Build snapshot version](#snapshot)
* [4. Contribute](#contribute)
* [5. Release new version](#release)
* [6. Resources](#resources)
* [7. Credits](#credits)
* [8. License](#license)
***
**NOTE:** The most recent version of this document is available at
docs/maintainer-notes.md in the [the git repository](#checkout)
or online at [salsa.debian.org](https://salsa.debian.org/kernel-team/initramfs-tools/blob/master/docs/maintainer-notes.md).
***
## <a name="definitions">1. Definitions</a>
<table>
<tr><td><code><b>$mailaddress:</b></code></td><td>mailaddress of the user</td></tr>
<tr><td><code><b>$username:</b></code></td><td>name of the Salsa account</td></tr>
<tr><td><code><b>$version:</b></code></td><td>version string</td></tr>
<tr><td><code><b>$yourname:</b></code></td><td>your fullname</td></tr>
</table>
***
## <a name="preparations">2. Preparations</a>
1. Install required software:
# apt-get install git git-buildpackage dpkg-dev
1. Set environment variables (e.g. through your ~/.bashrc or ~/.zshrc) for devscripts (gbp dch):
export DEBEMAIL=$mailaddress
export DEBFULLNAME=$yourname
1. Set user name and email address for git (drop the --global option to use configuration per-repo basis):
% git config --global user.name "$yourname"
% git config --global user.email "$mailaddress"
1. <a name="checkout">Checkout repository (anonymous):</a>
% git clone https://salsa.debian.org/kernel-team/initramfs-tools.git
% cd initramfs-tools
1. Checkout repository (with developer access):
% git clone ssh://git@salsa.debian.org/kernel-team/initramfs-tools.git
% cd initramfs-tools
***
## <a name="workflow">3. Workflow for daily work</a>
### <a name="newfeature">3.1 Implement new features</a>
1. Checkout new branch and switch to it:
% git checkout -b $username/short-descr-of-new-feature
1. Hack and commit work:
% $EDITOR $somefile
% git add $somefile
% git commit -s
**NOTE:** Use 'Closes: #BUGID' for closing a bugreport and 'Thanks: Fullname
&lt;mailaddress&gt;' for giving credits in your commit message. gbp dch will use
this information for generating the changelog using the --meta option later
on.
1. Finally push your branch to Salsa:
% git push origin $username/short-descr-of-new-feature
### <a name="merge">3.2 Merge branches</a>
1. Switch to the branch you want to merge:
% git checkout $username/new-feature
1. Rebase to master:
% git rebase master
1. Switch to master branch and merge:
% git checkout master
% git merge $username/new-feature
1. Push:
% git push
1. After branch is merged delete branch on server and locally:
% git push origin :$username/short-descr-of-new-feature
% git branch -d $username/short-descr-of-new-feature
1. If a branch is removed from the server it will stay locally. You can get of
any stale remote branches locally by executing:
% git remote prune origin
### <a name="test">3.3 Test specific branch</a>
1. Checkout a specific branch iff branch is not already present locally:
% git checkout -b somename/short-descr-of-new-feature origin/somename/short-descr-of-new-feature
1. Checkout a specific branch iff branch is already present locally:
% git checkout -b somename/short-descr-of-new-feature
1. Adjust debian/changelog accordingly:
% gbp dch --debian-branch="$(git branch | awk -F\*\ '/^* / { print $2}' )" \
--since="v$(dpkg-parsechangelog | awk '/^Version:/ {print $2}')" -S --id-length=7 --meta --multimaint-merge
1. Build package:
% gbp buildpackage --git-ignore-new --git-debian-branch="$(git branch | awk -F\*\ '/^* / { print $2}' )" --post-clean
***
### <a name="snapshot">3.4 Build snapshot version</a>
1. Adjust debian/changelog accordingly:
% gbp dch --debian-branch="$(git branch | awk -F\*\ '/^* / { print $2}' )" \
--since="v$(dpkg-parsechangelog | awk '/^Version:/ {print $2}')" -S --id-length=7 --meta --multimaint-merge
1. Build package:
% gbp buildpackage --git-debian-branch="$(git branch | awk -F\*\ '/^* / { print $2}' )" --post-clean [-us -uc]
***
## <a name="contribute">4. Contribute</a>
1. Create patch:
% git format-patch -s -p origin/master
1. Send patch file(s) to maintainers via mail (requires Debian package git-email):
% git send-email --to=initramfs-tools@packages.debian.org $PATCHFILE[S]
1. The development mailinglists are [debian-kernel@lists.debian.org](mailto:debian-kernel@lists.debian.org)
and [initramfs@vger.kernel.org](mailto:initramfs@vger.kernel.org).
Discussion of features, bugs and patches are more than welcome on one
of these lists.
***
## <a name="release">5. Release new version</a>
1. Creating changelog:
% gbp dch --debian-branch master --release --since HASH
or more dynamically:
% gbp dch --meta --release --since v$(dpkg-parsechangelog | awk '/^Version:/ {print $2}') --debian-branch="$(git branch | awk -F\*\ '/^* / { print $2}' )" --id-length=7 --meta --multimaint-merge
**NOTE:** we do not use history based sorting for the changelog entries but
sort them by author.
1. Releasing:
% git commit -a -s -m "Releasing version $version."
1. Tagging:
% git tag -s v"$version" -m "release $version"
1. Pushing:
% git push
% git push --tags
1. Build in chroot and upload to ftp-master.
1. Send mail announcing the new initramfs-tools version with subject
"initramfs-tools $VERSION release" to initramfs@vger.kernel.org,
debian-kernel@lists.debian.org + kernel-team@lists.ubuntu.com - including a
shortlog (generated through "git shortlog $TAG..").
***
## <a name="resources">6. Resources</a>
* [initramfs-tools git web interface](https://salsa.debian.org/kernel-team/initramfs-tools)
* [initramfs @ debian-wiki](https://wiki.debian.org/initramfs)
* [bugreports](https://bugs.debian.org/cgi-bin/pkgreport.cgi?src=initramfs-tools;dist=unstable)
* [initramfs-tools @ tracker](https://tracker.debian.org/pkg/initramfs-tools)
* [popcon graph](https://qa.debian.org/popcon.php?package=initramfs-tools)
* [bugreports @ ubuntu](https://bugs.launchpad.net/ubuntu/+source/initramfs-tools)
* [qa page @ ubuntu](http://status.qa.ubuntu.com/qapkgstatus/initramfs-tools)
***
## <a name="credits">7. Credits</a>
* Thanks to Daniel Baumann for his "[Debian Packaging with Git](http://documentation.debian-projects.org/other/debian-packaging-git/)" which inspired this document.
***
## <a name="license">8. License</a>
* This document is licensed under GPL v2 or any later version.
***
*-- Michael Prokop &lt;[mika@debian.org](mailto:mika@debian.org)&gt;,
Ben Hutchings &lt;[ben@decadent.org.uk](mailto:ben@decadent.org.uk)&gt;*
***
...@@ -89,14 +89,11 @@ manual_add_modules() ...@@ -89,14 +89,11 @@ manual_add_modules()
if [ ! -e /proc/modules ] ; then if [ ! -e /proc/modules ] ; then
continue continue
fi fi
if [ "${verbose}" != "y" ]; then
continue
fi
kmod_modname="${kmod##*/}" kmod_modname="${kmod##*/}"
kmod_modname="${kmod_modname%.ko}" kmod_modname="${kmod_modname%%.*}"
if grep -q "^$kmod_modname\\>" /proc/modules "${CONFDIR}/modules"; then if grep -q "^$kmod_modname\\>" /proc/modules "${CONFDIR}/modules"; then
echo "W: Possible missing firmware /lib/firmware/${firmware} for module $(basename ${kmod} .ko)" >&2 echo "W: Possible missing firmware /lib/firmware/${firmware} for module ${kmod_modname}" >&2
fi fi
continue continue
fi fi
...@@ -112,8 +109,8 @@ manual_add_modules() ...@@ -112,8 +109,8 @@ manual_add_modules()
} }
# $1 = file type (for logging) # $1 = file type (for logging)
# $2 = file to copy to ramdisk # $2 = file to copy to initramfs
# $3 (optional) Name for the file on the ramdisk # $3 (optional) Name for the file on the initramfs
# Location of the image dir is assumed to be $DESTDIR # Location of the image dir is assumed to be $DESTDIR
# If the target exists, we leave it and return 1. # If the target exists, we leave it and return 1.
# On any other error, we return >1. # On any other error, we return >1.
...@@ -161,8 +158,8 @@ copy_file() { ...@@ -161,8 +158,8 @@ copy_file() {
cp -pP "${src}" "${DESTDIR}/${target}" || return $(($? + 1)) cp -pP "${src}" "${DESTDIR}/${target}" || return $(($? + 1))
} }
# $1 = executable to copy to ramdisk, with library dependencies # $1 = executable to copy to initramfs, with library dependencies
# $2 (optional) Name for the file on the ramdisk # $2 (optional) Name for the file on the initramfs
# Location of the image dir is assumed to be $DESTDIR # Location of the image dir is assumed to be $DESTDIR
# We never overwrite the target if it exists. # We never overwrite the target if it exists.
copy_exec() { copy_exec() {
...@@ -200,7 +197,7 @@ copy_exec() { ...@@ -200,7 +197,7 @@ copy_exec() {
# Copy entire subtrees to the initramfs # Copy entire subtrees to the initramfs
copy_modules_dir() copy_modules_dir()
{ {
local kmod exclude local kmod first exclude
local modules= local modules=
local dir="$1" local dir="$1"
shift shift
...@@ -214,12 +211,21 @@ copy_modules_dir() ...@@ -214,12 +211,21 @@ copy_modules_dir()
echo "(excluding $*)" echo "(excluding $*)"
fi fi
fi fi
while [ $# -ge 1 ]; do
exclude="${exclude:-} -name $1 -prune -o " # Build up an expression for find
shift first=true
for exclude in "$@"; do
# Change .ko suffix in exclusion to .ko*
if [ "${exclude%.ko}" != "${exclude}" ]; then
exclude="${exclude}*"
fi
$first && set --
set -- "$@" -name "${exclude}" -prune -o
first=false
done done
for kmod in $(find "${MODULESDIR}/${dir}" ${exclude:-} -name '*.ko' -printf '%f\n'); do
modules="$modules ${kmod%.ko}" for kmod in $(find "${MODULESDIR}/${dir}" "$@" -name '*.ko*' -printf '%f\n'); do
modules="$modules ${kmod%%.*}"
done done
manual_add_modules $modules manual_add_modules $modules
} }
...@@ -384,7 +390,7 @@ dep_add_modules_mount() ...@@ -384,7 +390,7 @@ dep_add_modules_mount()
|| ! [ -b "$dev_node" ]; then || ! [ -b "$dev_node" ]; then
echo "mkinitramfs: failed to determine device for $dir" >&2 echo "mkinitramfs: failed to determine device for $dir" >&2
echo "mkinitramfs: workaround is MODULES=most, check:" >&2 echo "mkinitramfs: workaround is MODULES=most, check:" >&2
echo "grep -r MODULES /etc/initramfs-tools/" >&2 echo "grep -r MODULES ${CONFDIR}" >&2
echo "" >&2 echo "" >&2
echo "Error please report bug on initramfs-tools" >&2 echo "Error please report bug on initramfs-tools" >&2
echo "Include the output of 'mount' and 'cat /proc/mounts'" >&2 echo "Include the output of 'mount' and 'cat /proc/mounts'" >&2
...@@ -516,6 +522,10 @@ auto_add_modules() ...@@ -516,6 +522,10 @@ auto_add_modules()
copy_modules_dir kernel/drivers/usb/renesas_usbhs copy_modules_dir kernel/drivers/usb/renesas_usbhs
# and any extcon drivers for USB # and any extcon drivers for USB
modules="$modules extcon-usb-gpio" modules="$modules extcon-usb-gpio"
# Add the axp20x_usb_power power supply driver,
# required to initialize the USB host controllers
# on a number of armhf systems
modules="$modules axp20x_usb_power"
# Include all HID drivers unless we're sure they # Include all HID drivers unless we're sure they
# don't support keyboards. hid-*ff covers various # don't support keyboards. hid-*ff covers various
...@@ -540,6 +550,7 @@ auto_add_modules() ...@@ -540,6 +550,7 @@ auto_add_modules()
copy_modules_dir kernel/drivers/gpio copy_modules_dir kernel/drivers/gpio
copy_modules_dir kernel/drivers/i2c/busses copy_modules_dir kernel/drivers/i2c/busses
copy_modules_dir kernel/drivers/i2c/muxes copy_modules_dir kernel/drivers/i2c/muxes
copy_modules_dir kernel/drivers/mfd
copy_modules_dir kernel/drivers/phy copy_modules_dir kernel/drivers/phy
copy_modules_dir kernel/drivers/pinctrl copy_modules_dir kernel/drivers/pinctrl
copy_modules_dir kernel/drivers/regulator copy_modules_dir kernel/drivers/regulator
...@@ -572,6 +583,7 @@ auto_add_modules() ...@@ -572,6 +583,7 @@ auto_add_modules()
block) block)
copy_modules_dir kernel/drivers/block copy_modules_dir kernel/drivers/block
copy_modules_dir kernel/drivers/nvme copy_modules_dir kernel/drivers/nvme
modules="$modules vmd"
;; ;;
ubi) ubi)
modules="$modules deflate zlib lzo ubi ubifs" modules="$modules deflate zlib lzo ubi ubifs"
...@@ -597,23 +609,46 @@ auto_add_modules() ...@@ -597,23 +609,46 @@ auto_add_modules()
manual_add_modules $modules manual_add_modules $modules
} }
# 'depmod' only looks at symbol dependencies; there is no way for # 'depmod' only looks at symbol dependencies and the 'softdep' module
# modules to declare explicit dependencies through module information, # information field; there is no way for modules to declare weaker
# so dependencies on e.g. crypto providers are hidden. Until this is # dependencies (modules that *might* be needed at run-time) through
# fixed, we need to handle those hidden dependencies. # module information, Until this is fixed, we need to handle those
# hidden dependencies.
hidden_dep_add_modules() hidden_dep_add_modules()
{ {
local modules= manual_add_modules $(
for dep in "lib/libcrc32c crc32c" \ {
"fs/ubifs/ubifs deflate zlib lzo" \ cat "${DESTDIR}/lib/modules/${version}/modules.builtin"
"fs/btrfs/btrfs crc32c"; do find "${DESTDIR}/lib/modules/${version}/kernel" -name '*.ko*'
set -- $dep } |
if [ -f "${DESTDIR}/lib/modules/${version}/kernel/$1.ko" ]; then while read module; do
shift module="${module##*/}"
modules="$modules $@" module="${module%%.*}"
fi case "$module" in
done libcrc32c)
manual_add_modules $modules echo crc32c
;;
ubifs)
echo deflate zlib lzo
;;
btrfs)
echo crc32c
;;
mlx4_core)
echo mlx4_ib
;;
mlx5_core)
echo mlx5_ib
;;
i8042)
echo psmouse
;;