Github messages for voidlinux
 help / color / mirror / Atom feed
From: classabbyamp <classabbyamp@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] linux6.{6..8}: sign-file utility requires pkg-config
Date: Mon, 25 Mar 2024 03:52:36 +0100	[thread overview]
Message-ID: <20240325025236.C274321672@inbox.vuxu.org> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-49491@inbox.vuxu.org>

[-- Attachment #1: Type: text/plain, Size: 818 bytes --]

There is an updated pull request by classabbyamp against master on the void-packages repository

https://github.com/classabbyamp/void-packages linux-sign-file
https://github.com/void-linux/void-packages/pull/49491

linux6.{6..8}: sign-file utility requires pkg-config
so it can find libcrypto: https://github.com/torvalds/linux/blob/2dde18cd1d8fac735875f2e4987f11817cc0bc2c/scripts/Makefile#L25-L26

failure symptom:
```
/void-packages/srcpkgs/linux6.8/files/mv-debug: line 7: /builddir/linux6.8-6.8.1/scripts/sign-file: No such file or directory
```

<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES**

[ci skip]


A patch file from https://github.com/void-linux/void-packages/pull/49491.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-linux-sign-file-49491.patch --]
[-- Type: text/x-diff, Size: 5621 bytes --]

From 4490b0f38c83e4785339fcbaccaa91d5fef04672 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Sat, 23 Mar 2024 19:32:09 -0400
Subject: [PATCH 1/3] linux6.6: fix module signing

sign-file needs pkg-config to find libcrypto

on cross, it is removed by make _mrproper_scripts, so copy it to
XBPS_WRAPPERDIR before running that.

failure symptom:
/void-packages/srcpkgs/linux6.8/files/mv-debug: line 7:
    /builddir/linux6.8-6.8.1/scripts/sign-file: No such file or directory
---
 srcpkgs/linux6.6/template | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/linux6.6/template b/srcpkgs/linux6.6/template
index 903bcb457a83c2..174016326fd16d 100644
--- a/srcpkgs/linux6.6/template
+++ b/srcpkgs/linux6.6/template
@@ -27,7 +27,7 @@ noshlibprovides=yes
 preserve=yes
 
 hostmakedepends="tar xz bc elfutils-devel flex gmp-devel kmod libmpc-devel
- openssl-devel perl uboot-mkimage cpio pahole python3 zstd"
+ pkg-config openssl-devel perl uboot-mkimage cpio pahole python3 zstd"
 
 _kernver="${version}_${revision}"
 triggers="kernel-hooks"
@@ -208,6 +208,9 @@ do_install() {
 	mkdir -p ${hdrdest}/arch/${arch}
 	cp -a arch/${arch}/include ${hdrdest}/arch/${arch}
 
+	# needed for mv-debug
+	cp scripts/sign-file "${XBPS_WRAPPERDIR}"
+
 	# Remove helper binaries built for host,
 	# if generated files from the scripts/ directory need to be included,
 	# they need to be copied to ${hdrdest} before this step
@@ -311,7 +314,7 @@ do_install() {
 	(
 	cd ${DESTDIR}
 	export DESTDIR
-	export SIGN_FILE="${wrksrc}/scripts/sign-file sha512 ${wrksrc}/certs/signing_key.pem ${wrksrc}/certs/signing_key.x509"
+	export SIGN_FILE="${XBPS_WRAPPERDIR}/sign-file sha512 ${wrksrc}/certs/signing_key.pem ${wrksrc}/certs/signing_key.x509"
 	find ./ -name '*.ko' -print0 | \
 		xargs -0r -n1 -P ${XBPS_MAKEJOBS} ${FILESDIR}/mv-debug
 	)

From 1b2807f226f5df17bb1992fda526587d01374f9b Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Sat, 23 Mar 2024 19:33:53 -0400
Subject: [PATCH 2/3] linux6.7: fix module signing

sign-file needs pkg-config to find libcrypto

on cross, it is removed by make _mrproper_scripts, so copy it to
XBPS_WRAPPERDIR before running that.

failure symptom:
/void-packages/srcpkgs/linux6.8/files/mv-debug: line 7:
    /builddir/linux6.8-6.8.1/scripts/sign-file: No such file or directory
---
 srcpkgs/linux6.7/template | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/linux6.7/template b/srcpkgs/linux6.7/template
index 0e9800fdaedc2e..b49cb06112d271 100644
--- a/srcpkgs/linux6.7/template
+++ b/srcpkgs/linux6.7/template
@@ -27,7 +27,7 @@ noshlibprovides=yes
 preserve=yes
 
 hostmakedepends="tar xz bc elfutils-devel flex gmp-devel kmod libmpc-devel
- openssl-devel perl uboot-mkimage cpio pahole python3 zstd"
+ pkg-config openssl-devel perl uboot-mkimage cpio pahole python3 zstd"
 
 _kernver="${version}_${revision}"
 triggers="kernel-hooks"
@@ -211,6 +211,9 @@ do_install() {
 	mkdir -p ${hdrdest}/arch/${arch}
 	cp -a arch/${arch}/include ${hdrdest}/arch/${arch}
 
+	# needed for mv-debug
+	cp scripts/sign-file "${XBPS_WRAPPERDIR}"
+
 	# Remove helper binaries built for host,
 	# if generated files from the scripts/ directory need to be included,
 	# they need to be copied to ${hdrdest} before this step
@@ -314,7 +317,7 @@ do_install() {
 	(
 	cd ${DESTDIR}
 	export DESTDIR
-	export SIGN_FILE="${wrksrc}/scripts/sign-file sha512 ${wrksrc}/certs/signing_key.pem ${wrksrc}/certs/signing_key.x509"
+	export SIGN_FILE="${XBPS_WRAPPERDIR}/sign-file sha512 ${wrksrc}/certs/signing_key.pem ${wrksrc}/certs/signing_key.x509"
 	find ./ -name '*.ko' -print0 | \
 		xargs -0r -n1 -P ${XBPS_MAKEJOBS} ${FILESDIR}/mv-debug
 	)

From 7e32bfed42fe768325dcfb030c09a1c0b196f1d2 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Sat, 23 Mar 2024 19:34:08 -0400
Subject: [PATCH 3/3] linux6.8: fix module signing

sign-file needs pkg-config to find libcrypto

on cross, it is removed by make _mrproper_scripts, so copy it to
XBPS_WRAPPERDIR before running that.

failure symptom:
/void-packages/srcpkgs/linux6.8/files/mv-debug: line 7:
    /builddir/linux6.8-6.8.1/scripts/sign-file: No such file or directory
---
 srcpkgs/linux6.8/template | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/linux6.8/template b/srcpkgs/linux6.8/template
index d060a08f883d4c..39857b710777c2 100644
--- a/srcpkgs/linux6.8/template
+++ b/srcpkgs/linux6.8/template
@@ -27,7 +27,7 @@ noshlibprovides=yes
 preserve=yes
 
 hostmakedepends="tar xz bc elfutils-devel flex gmp-devel kmod libmpc-devel
- openssl-devel perl uboot-mkimage cpio pahole python3 zstd"
+ pkg-config openssl-devel perl uboot-mkimage cpio pahole python3 zstd"
 
 _kernver="${version}_${revision}"
 triggers="kernel-hooks"
@@ -211,6 +211,9 @@ do_install() {
 	mkdir -p ${hdrdest}/arch/${arch}
 	cp -a arch/${arch}/include ${hdrdest}/arch/${arch}
 
+	# needed for mv-debug
+	cp scripts/sign-file "${XBPS_WRAPPERDIR}"
+
 	# Remove helper binaries built for host,
 	# if generated files from the scripts/ directory need to be included,
 	# they need to be copied to ${hdrdest} before this step
@@ -314,7 +317,7 @@ do_install() {
 	(
 	cd ${DESTDIR}
 	export DESTDIR
-	export SIGN_FILE="${wrksrc}/scripts/sign-file sha512 ${wrksrc}/certs/signing_key.pem ${wrksrc}/certs/signing_key.x509"
+	export SIGN_FILE="${XBPS_WRAPPERDIR}/sign-file sha512 ${wrksrc}/certs/signing_key.pem ${wrksrc}/certs/signing_key.x509"
 	find ./ -name '*.ko' -print0 | \
 		xargs -0r -n1 -P ${XBPS_MAKEJOBS} ${FILESDIR}/mv-debug
 	)

  parent reply	other threads:[~2024-03-25  2:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-23 23:36 [PR PATCH] " classabbyamp
2024-03-24  0:36 ` classabbyamp
2024-03-25  2:52 ` classabbyamp [this message]
2024-03-25 22:41 ` [PR PATCH] [Merged]: linux6.{6..8}: fix module signing classabbyamp

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240325025236.C274321672@inbox.vuxu.org \
    --to=classabbyamp@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).