<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/scripts/package/Makefile, branch v4.19.7</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.19.7</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.19.7'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2018-04-07T10:04:02Z</updated>
<entry>
<title>kbuild: deb-pkg: split generating packaging and build</title>
<updated>2018-04-07T10:04:02Z</updated>
<author>
<name>Riku Voipio</name>
<email>riku.voipio@linaro.org</email>
</author>
<published>2018-04-05T11:22:29Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=b41d920acff8305b8a25a183a8e4d41b8975097d'/>
<id>urn:sha1:b41d920acff8305b8a25a183a8e4d41b8975097d</id>
<content type='text'>
Move debian/ directory generation out of builddeb to a new script,
mkdebian. The package build commands are kept in builddeb, which
is now an internal command called from debian/rules.

With these changes in place, we can now use dpkg-buildpackage from
deb-pkg and bindeb-pkg removing need for handrolled source/changes
generation.

This patch is based on the criticism of the current state of builddeb
discussed on:

https://patchwork.kernel.org/patch/9656403/

Signed-off-by: Riku Voipio &lt;riku.voipio@linaro.org&gt;
Signed-off-by: Masahiro Yamada &lt;yamada.masahiro@socionext.com&gt;
</content>
</entry>
<entry>
<title>kbuild: pkg: make out-of-tree rpm/deb-pkg build immediately fail</title>
<updated>2017-12-12T15:07:00Z</updated>
<author>
<name>Masahiro Yamada</name>
<email>yamada.masahiro@socionext.com</email>
</author>
<published>2017-12-06T10:32:57Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=262dad68e152fda06e5c5666b3186c23dfd6ae2f'/>
<id>urn:sha1:262dad68e152fda06e5c5666b3186c23dfd6ae2f</id>
<content type='text'>
We do not support out-of-tree building of rpm-pkg / deb-pkg.  If O=
is given, the build should be terminated, but the "false" command is
not effective since it is not the last command in the cmd_src_tar.
Then, rpm-pkg / deb-pkg tries to continue building, and fails for a
different reason.

Set -e option so that the "false" terminates the building immediately.

I also put the error messages to stderr, and made it stand out more.

For example, "make O=foo rpm-pkg" will fail as follows:

  /bin/bash ../scripts/package/mkspec &gt;./kernel.spec
    TAR     kernel-4.15.0_rc2+.tar.gz

    ERROR:
    Building source tarball is not possible outside the
    kernel source tree. Don't set KBUILD_OUTPUT, or use the
    binrpm-pkg or bindeb-pkg target instead.

  ../scripts/package/Makefile:53: recipe for target 'rpm-pkg' failed

Signed-off-by: Masahiro Yamada &lt;yamada.masahiro@socionext.com&gt;
Tested-by: Jim Davis &lt;jim.epost@gmail.com&gt;
</content>
</entry>
<entry>
<title>scripts/package: snap-pkg target</title>
<updated>2017-12-12T15:00:18Z</updated>
<author>
<name>Paolo Pisati</name>
<email>paolo.pisati@canonical.com</email>
</author>
<published>2017-11-27T11:07:34Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=5704d4557f279962a1fa9ee9c5b562eb27376103'/>
<id>urn:sha1:5704d4557f279962a1fa9ee9c5b562eb27376103</id>
<content type='text'>
Following in footsteps of other targets like 'deb-pkg, 'rpm-pkg' and 'tar-pkg',
this patch adds a 'snap-pkg' target for the creation of a Linux kernel snap
package using the kbuild infrastructure.

A snap, in its general form, is a self contained, sandboxed, universal package
and it is intended to work across multiple distributions and/or devices. A snap
package is distributed as a single compressed squashfs filesystem.

A kernel snap is a snap package carrying the Linux kernel, kernel modules,
accessory files (DTBs, System.map, etc) and a manifesto file.  The purpose of a
kernel snap is to carry the Linux kernel during the creation of a system image,
eg. Ubuntu Core, and its subsequent upgrades.

For more information on snap packages: https://snapcraft.io/docs/

Signed-off-by: Paolo Pisati &lt;paolo.pisati@canonical.com&gt;
Signed-off-by: Masahiro Yamada &lt;yamada.masahiro@socionext.com&gt;
</content>
</entry>
<entry>
<title>kbuild: rpm: prompt to use "rpm-pkg" if "rpm" target is used</title>
<updated>2017-11-23T14:12:05Z</updated>
<author>
<name>Masahiro Yamada</name>
<email>yamada.masahiro@socionext.com</email>
</author>
<published>2017-11-15T09:19:20Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=ebaad7d36406d951159f43038a843edece1b7877'/>
<id>urn:sha1:ebaad7d36406d951159f43038a843edece1b7877</id>
<content type='text'>
The "rpm" has been kept for backward compatibility since pre-git era.
I am planning to remove it after the Linux 4.18 release.  Annouce the
end of the support, prompting to use "rpm-pkg" instead.

If you use "rpm", it will work like "rpm-pkg", but warning messages
will be displayed as follows:

  WARNING: "rpm" target will be removed after Linux 4.18
           Please use "rpm-pkg" instead.

Signed-off-by: Masahiro Yamada &lt;yamada.masahiro@socionext.com&gt;
</content>
</entry>
<entry>
<title>kbuild: pkg: use --transform option to prefix paths in tar</title>
<updated>2017-11-23T14:12:04Z</updated>
<author>
<name>Masahiro Yamada</name>
<email>yamada.masahiro@socionext.com</email>
</author>
<published>2017-11-15T09:17:07Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=2dbc644ac62bbcb9ee78e84719953f611be0413d'/>
<id>urn:sha1:2dbc644ac62bbcb9ee78e84719953f611be0413d</id>
<content type='text'>
For rpm-pkg and deb-pkg, a source tar file is created.  All paths in
the archive must be prefixed with the base name of the tar so that
everything is contained in the directory when you extract it.

Currently, scripts/package/Makefile uses a symlink for that, and
removes it after the tar is created.

If you terminate the build during the tar creation, the symlink is
left over.  Then, at the next package build, you will see a warning
like follows:

  ln: '.' and 'kernel-4.14.0+/.' are the same file

It is possible to fix it by adding -n (--no-dereference) option to
the "ln" command, but a cleaner way is to use --transform option
of "tar" command.  This option is GNU extension, but it should not
hurt to use it in the Linux build system.

The 'S' flag is needed to exclude symlinks from the path fixup.
Without it, symlinks in the kernel are broken.

Signed-off-by: Masahiro Yamada &lt;yamada.masahiro@socionext.com&gt;
</content>
</entry>
<entry>
<title>kbuild: rpm-pkg: do not force -jN in submake</title>
<updated>2017-11-14T14:19:02Z</updated>
<author>
<name>Masahiro Yamada</name>
<email>yamada.masahiro@socionext.com</email>
</author>
<published>2017-09-30T01:10:11Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=8a16a070abaa61e95354755a320ca37cee544209'/>
<id>urn:sha1:8a16a070abaa61e95354755a320ca37cee544209</id>
<content type='text'>
The spec file always passes %{?_smp_mflags}, but we have two
problems here.

[1] "make -jN rpm-pkg" emits the following warning message:

    make[2]: warning: -jN forced in submake: disabling jobserver mode.

[2] We can not specify the number of jobs that run in parallel.
    Whether we give -jN or not from the top Makefile, the spec file
    always passes ${?_smp_mflags} to the build commands.

${?_smp_mflags} will be useful when we run rpmbuild by hand.  When we
invoke it from Makefile, -jN is propagated down to submake; it should
not be overridden because we want to respect the number of jobs given
by the user.  Set _smp_mflags to empty string in this case.

Signed-off-by: Masahiro Yamada &lt;yamada.masahiro@socionext.com&gt;
</content>
</entry>
<entry>
<title>kbuild: rpm-pkg: keep spec file until make mrproper</title>
<updated>2017-11-14T14:19:01Z</updated>
<author>
<name>Masahiro Yamada</name>
<email>yamada.masahiro@socionext.com</email>
</author>
<published>2017-09-30T01:10:10Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=af60e207087975d069858741c44ed4f450330ac4'/>
<id>urn:sha1:af60e207087975d069858741c44ed4f450330ac4</id>
<content type='text'>
If build fails during (bin)rpm-pkg, the spec file is not cleaned by
anyone until the next successful build of the package.

We do not have to immediately delete the spec file in case somebody
may want to take a look at it.  Instead, make them ignored by git,
and cleaned up by make mrproper.

Signed-off-by: Masahiro Yamada &lt;yamada.masahiro@socionext.com&gt;
</content>
</entry>
<entry>
<title>kbuild: rpm-pkg: fix jobserver unavailable warning</title>
<updated>2017-11-14T14:19:01Z</updated>
<author>
<name>Masahiro Yamada</name>
<email>yamada.masahiro@socionext.com</email>
</author>
<published>2017-09-30T01:10:09Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=606625be47bc87b6fab0af10cd57aaa675cb9e42'/>
<id>urn:sha1:606625be47bc87b6fab0af10cd57aaa675cb9e42</id>
<content type='text'>
If "make rpm-pkg" or "make binrpm-pkg" is run with -j[jobs] option,
the following warning message is displayed.

  warning: jobserver unavailable: using -j1.  Add '+' to parent make rule.

Follow the suggestion.

Signed-off-by: Masahiro Yamada &lt;yamada.masahiro@socionext.com&gt;
</content>
</entry>
<entry>
<title>kbuild: rpm-pkg: fix version number handling</title>
<updated>2017-09-20T15:06:03Z</updated>
<author>
<name>Masahiro Yamada</name>
<email>yamada.masahiro@socionext.com</email>
</author>
<published>2017-09-20T13:01:26Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=25b080bd53f2873785fa049f570ac1b361c11d72'/>
<id>urn:sha1:25b080bd53f2873785fa049f570ac1b361c11d72</id>
<content type='text'>
The "Release:" field of the spec file is determined based on the
.version file.

However, the .version file is not copied to the source tar file.
So, when we build the kernel from the source package, the UTS_VERSION
always indicates #1.  This does not match with "rpm -q".

The kernel UTS_VERSION and "rpm -q" do not agree for binrpm-pkg, either.
Please note the kernel has already been built before the spec file is
created.  Currently, mkspec invokes mkversion.  This script returns an
incremented version.  So, the "Release:" field of the spec file is
greater than the version in the kernel by one.

For the source package build (where .version file is missing), we can
give KBUILD_BUILD_VERSION=%{release} to the build command.

For the binary package build, we can simply read out the .version file
because it contains the version number that was used for building the
kernel image.

We can remove scripts/mkversion because scripts/package/Makefile need
not touch the .version file.

Signed-off-by: Masahiro Yamada &lt;yamada.masahiro@socionext.com&gt;
</content>
</entry>
<entry>
<title>scripts/package/Makefile: rpmbuild add support of RPMOPTS</title>
<updated>2016-05-16T12:01:48Z</updated>
<author>
<name>Srinivas Pandruvada</name>
<email>srinivas.pandruvada@linux.intel.com</email>
</author>
<published>2016-05-15T03:09:52Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=65a9f31c5042e5bb50d30ed8ae374044be561054'/>
<id>urn:sha1:65a9f31c5042e5bb50d30ed8ae374044be561054</id>
<content type='text'>
After commit 21a59991ce0c ("scripts/package/Makefile: rpmbuild is needed
for rpm targets"), it is no longer possible to specify RPMOPTS.
For example, we can no longer able to control _topdir using the following
make command.
make RPMOPTS="--define '_topdir /home/xyz/workspace/'" binrpm-pkg

Fixes: 21a59991ce0c ("scripts/package/Makefile: rpmbuild is needed for rpm targets")
Cc: &lt;stable@vger.kernel.org&gt; # 4.3+
Signed-off-by: Srinivas Pandruvada &lt;srinivas.pandruvada@linux.intel.com&gt;
Signed-off-by: Michal Marek &lt;mmarek@suse.com&gt;
</content>
</entry>
</feed>
