[OS-BUILD PATCH] redhat/scripts/rh-dist-git.sh does not take any arguments: fix error message

2023-10-16 Thread Denys Vlasenko (via Email Bridge)
From: Denys Vlasenko 

redhat/scripts/rh-dist-git.sh does not take any arguments: fix error message

if [ -z "$RHDISTGIT_BRANCH" ]; then
echo "$0  [local clone] [alternate tmp] [alternate dist-git 
server]" >&2;
exit 1;

The above is wrong since

commit e2abc56bcaf0ed772e9f2c828342a5ab8fcd6f1f
Author: Prarit Bhargava 
redhat/scripts/rh-dist-git.sh: Use Makefile variables

Replacing it with

echo "$0: RHDISTGIT_BRANCH is not set" >&2

Signed-off-by: Denys Vlasenko 

diff --git a/redhat/scripts/rh-dist-git.sh b/redhat/scripts/rh-dist-git.sh
index blahblah..blahblah 100755
--- a/redhat/scripts/rh-dist-git.sh
+++ b/redhat/scripts/rh-dist-git.sh
@@ -17,8 +17,8 @@ function upload()
 }
 
 if [ -z "$RHDISTGIT_BRANCH" ]; then
-   echo "$0  [local clone] [alternate tmp] [alternate dist-git 
server]" >&2;
-   exit 1;
+   echo "$0: RHDISTGIT_BRANCH is not set" >&2
+   exit 1
 fi
 
 echo "Cloning the repository"

--
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2753
___
kernel mailing list -- kernel@lists.fedoraproject.org
To unsubscribe send an email to kernel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue


[OS-BUILD PATCH] redhat/scripts/rh-dist-git.sh: print list of uploaded files

2023-07-25 Thread Denys Vlasenko (via Email Bridge)
From: Denys Vlasenko 

redhat/scripts/rh-dist-git.sh: print list of uploaded files

Move
echo "Uploading new tarballs"
down, right before "upload $upload_list" line, and change it into
echo "Uploading new tarballs: $upload_list"

I needed this while debugging a problem.

Signed-off-by: Denys Vlasenko 

diff --git a/redhat/scripts/rh-dist-git.sh b/redhat/scripts/rh-dist-git.sh
index blahblah..blahblah 100755
--- a/redhat/scripts/rh-dist-git.sh
+++ b/redhat/scripts/rh-dist-git.sh
@@ -39,13 +39,13 @@ $RHPKG_BIN switch-branch "$RHDISTGIT_BRANCH" || die 
"switching to branch $RHDIST
 echo "Unpacking from SRPM"
 "$REDHAT"/scripts/expand_srpm.sh "$tmpdir"
 
-echo "Uploading new tarballs"
 # upload tarballs
 sed -i "/linux-.*.tar.xz/d" "$tmpdir/$SPECPACKAGE_NAME"/{sources,.gitignore};
 sed -i "/kernel-abi-stablelists.*.tar.bz2/d" 
"$tmpdir/$SPECPACKAGE_NAME"/{sources,.gitignore};
 sed -i "/kernel-kabi-dw-.*.tar.bz2/d" 
"$tmpdir/$SPECPACKAGE_NAME"/{sources,.gitignore};
 upload_list="$TARBALL $KABI_TARBALL $KABIDW_TARBALL"
 
+echo "Uploading new tarballs: $upload_list"
 # We depend on word splitting here:
 # shellcheck disable=SC2086
 upload $upload_list

--
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2620
___
kernel mailing list -- kernel@lists.fedoraproject.org
To unsubscribe send an email to kernel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue


[OS-BUILD PATCH] redhat/scripts/expand_srpm.sh: add missing function, robustify

2023-07-25 Thread Denys Vlasenko (via Email Bridge)
From: Denys Vlasenko 

redhat/scripts/expand_srpm.sh: add missing function, robustify

"die" (presumably a shell function) is not defined. Add it.

Delete the empty line at the end of the script,
git complained when I added a copy of this file to another tree.

This part will happily execute if someone just accidentally runs
the script from the command line with no arguments:
cd "$cloned/$PACKAGE_NAME"
rm -r -- *
...and might delete most of your files!
Add a safeguard against this.

While at it, remove superfluous stray semicolons.

Signed-off-by: Denys Vlasenko 

diff --git a/redhat/scripts/expand_srpm.sh b/redhat/scripts/expand_srpm.sh
index blahblah..blahblah 100755
--- a/redhat/scripts/expand_srpm.sh
+++ b/redhat/scripts/expand_srpm.sh
@@ -1,9 +1,18 @@
 #!/bin/sh
 
+die() {
+   echo "Error: $1" >&2
+   exit 1
+}
+
 # $1: cloned tree
-cloned="$1";
+cloned="$1"
+
+# Avoid accidental "rm *" in the root directory
+test "$cloned" || die '$1 is not given'
+test "$SPECPACKAGE_NAME" || die '$SPECPACKAGE_NAME is not set'
 
-cd "$cloned/$SPECPACKAGE_NAME" || die "\"$cloned\" doesn't seem to have a 
dist-git clone";
+cd "$cloned/$SPECPACKAGE_NAME" || die "\"$cloned\" doesn't seem to have a 
dist-git clone"
 
 # delete everything in the cloned tree to avoid having stale files
 rm -r -- *
@@ -17,4 +26,3 @@ echo "*.bz2" >> .gitignore
 rpm2cpio "$SRPM" | cpio -idmv
 
 git add -A
-

--
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2619
___
kernel mailing list -- kernel@lists.fedoraproject.org
To unsubscribe send an email to kernel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue


[OS-BUILD PATCH] redhat/scripts/rh-dist-git.sh: fix outdated message and comment

2023-07-24 Thread Denys Vlasenko (via Email Bridge)
From: Denys Vlasenko 

redhat/scripts/rh-dist-git.sh: fix outdated message and comment

redhat/git/files and redhat/scripts/copy_files.sh had been deleted
by the below commit, but the "copy the required files (redhat/git/files)"
comment in rh-dist-git.sh still references redhat/git/files:

commit 80480a22de503a67f3af6997565adaf7728b92cc
Author: Jeremy Cline 
Date:   Tue Sep 17 15:20:56 2019 +

Sync up the ARK build scripts

Signed-off-by: Jeremy Cline 
...
@@ -54,7 +55,7 @@ $rhpkg_bin switch-branch $rhdistgit_branch || die 
"switching to branch $rhdistgi

 echo "Copying updated files"
 # copy the required files (redhat/git/files)<=== HERE
-$redhat/scripts/copy_files.sh "$topdir" "$tmpdir" "$package_name";
+$redhat/scripts/expand_srpm.sh "$topdir" "$tmpdir" "$package_name" 
"$srpm_name";

Fix this.

Signed-off-by: Denys Vlasenko 

diff --git a/redhat/scripts/rh-dist-git.sh b/redhat/scripts/rh-dist-git.sh
index blahblah..blahblah 100755
--- a/redhat/scripts/rh-dist-git.sh
+++ b/redhat/scripts/rh-dist-git.sh
@@ -36,9 +36,8 @@ echo "Switching the branch"
 cd "$tmpdir/$SPECPACKAGE_NAME";
 $RHPKG_BIN switch-branch "$RHDISTGIT_BRANCH" || die "switching to branch 
$RHDISTGIT_BRANCH";
 
-echo "Copying updated files"
-# copy the required files (redhat/git/files)
-"$REDHAT"/scripts/expand_srpm.sh "$tmpdir";
+echo "Unpacking from SRPM"
+"$REDHAT"/scripts/expand_srpm.sh "$tmpdir"
 
 echo "Uploading new tarballs"
 # upload tarballs

--
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2617
___
kernel mailing list -- kernel@lists.fedoraproject.org
To unsubscribe send an email to kernel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue


[OS-BUILD PATCH] redhat: do not package *.mod.c generated files

2023-06-14 Thread Denys Vlasenko (via Email Bridge)
From: Denys Vlasenko 

redhat: do not package *.mod.c generated files

As an example, kernel-debuginfo-common.rpm was observed to contain
21865 files, 2274 of them (~10%) are *.mod.c files.

They are packaged because their names are present in some object files,
and rpmbuild (through find-debuginfo.sh, "debugedit -l")
grabs all referenced source files which still exist, and packages them
into debuginfo rpms. Just deleting them before that build stage
allows to avoid it.

Signed-off-by: Denys Vlasenko 

diff --git a/redhat/kernel.spec.template b/redhat/kernel.spec.template
index blahblah..blahblah 100644
--- a/redhat/kernel.spec.template
+++ b/redhat/kernel.spec.template
@@ -2396,6 +2396,8 @@ BuildKernel() {
 
 # prune junk from kernel-devel
 find $RPM_BUILD_ROOT/usr/src/kernels -name ".*.cmd" -delete
+# prune junk from kernel-debuginfo
+find $RPM_BUILD_ROOT/usr/src/kernels -name "*.mod.c" -delete
 
 # Red Hat UEFI Secure Boot CA cert, which can be used to authenticate the 
kernel
 mkdir -p $RPM_BUILD_ROOT%{_datadir}/doc/kernel-keys/$KernelVer

--
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2512
___
kernel mailing list -- kernel@lists.fedoraproject.org
To unsubscribe send an email to kernel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue


Re: [OS-BUILD PATCH] kernel.spec: remove "RPM_VMLINUX_H=$DevelDir/vmlinux.h" code chunk in %install

2023-05-02 Thread Denys Vlasenko (via Email Bridge)
From: Denys Vlasenko on gitlab.com
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2458#note_1375245387

Veronika, it is set here in specfile:

```
%build
...
InitBuildVars() {
...
DevelDir=/usr/src/kernels/%{KVERREL}${Variant:++${Variant}}
...
BuildKernel() {
...
InitBuildVars $Variant```
...
cd linux-%{KVERREL}
%if %{with_debug}
BuildKernel %make_target %kernel_image %{_use_vdso} debug
%endif
```

IOW: it's just an ordinary shell variable, set during %build. Of course shell
variables are not surviving into %install
___
kernel mailing list -- kernel@lists.fedoraproject.org
To unsubscribe send an email to kernel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue


Re: [OS-BUILD PATCH] kernel.spec: remove "RPM_VMLINUX_H=$DevelDir/vmlinux.h" code chunk in %install

2023-05-02 Thread Denys Vlasenko (via Email Bridge)
From: Denys Vlasenko on gitlab.com
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2458#note_1375234599

I'm 100% it's not set in %install. I see the following in the log:

+ '[' -f /vmlinux.h ']'

IOW: $DevelDir expanded to nothing.

If we do not remove that code, maybe it makes sense to code more defensively?
A-la
[ "$DevelDir" ] || { echo "DevelDir not set"; exit 1; }
[ -d "$DevelDir" ] || { echo "Not a directory: '%DevelDir'"; exit 1; }
if [ -f "$DevelDir/vmlinux.h" ] ...
___
kernel mailing list -- kernel@lists.fedoraproject.org
To unsubscribe send an email to kernel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue


[OS-BUILD PATCH] kernel.spec: remove "RPM_VMLINUX_H=$DevelDir/vmlinux.h" code chunk in %install

2023-05-02 Thread Denys Vlasenko (via Email Bridge)
From: Denys Vlasenko 

kernel.spec: remove "RPM_VMLINUX_H=$DevelDir/vmlinux.h" code chunk in %install

Remove this code block in %install:
if [ -f $DevelDir/vmlinux.h ]; then
  RPM_VMLINUX_H=$DevelDir/vmlinux.h
fi

It was added by commit b4cac22848f6cfdbd7e52bf5fd0a2e6381f7b552
kernel.spec: Add support to use vmlinux.h

The commit added two copies of it. The second instance, in %install,
does not actually work: $DevelDir is not set, so (unless your root
indeed has a /vmlinux.h file) RPM_VMLINUX_H is not set, but it
would not be used in %install anyway.

Signed-off-by: Denys Vlasenko 

diff --git a/redhat/kernel.spec.template b/redhat/kernel.spec.template
index blahblah..blahblah 100644
--- a/redhat/kernel.spec.template
+++ b/redhat/kernel.spec.template
@@ -2811,10 +2811,6 @@ rm -f %{buildroot}%{_bindir}/timerlat
 popd
 %endif
 
-if [ -f $DevelDir/vmlinux.h ]; then
-  RPM_VMLINUX_H=$DevelDir/vmlinux.h
-fi
-
 %if %{with_bpftool}
 pushd tools/bpf/bpftool
 %{bpftool_make} prefix=%{_prefix} 
bash_compdir=%{_sysconfdir}/bash_completion.d/ mandir=%{_mandir} install 
doc-install

--
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2458
___
kernel mailing list -- kernel@lists.fedoraproject.org
To unsubscribe send an email to kernel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue


[OS-BUILD PATCH] [redhat] trivial fixes in build messages and comments

2023-04-27 Thread Denys Vlasenko (via Email Bridge)
From: Denys Vlasenko 

[redhat] trivial fixes in build messages and comments

Signed-off-by: Denys Vlasenko 

diff --git a/redhat/kernel.spec.template b/redhat/kernel.spec.template
index blahblah..blahblah 100644
--- a/redhat/kernel.spec.template
+++ b/redhat/kernel.spec.template
@@ -2230,7 +2230,7 @@ BuildKernel() {
 
 # Identify modules in the kernel-modules-extras package
 %{SOURCE20} $RPM_BUILD_ROOT lib/modules/$KernelVer $(realpath 
configs/mod-extra.list)
-# Identify modules in the kernel-modules-extras package
+# Identify modules in the kernel-modules-internal package
 %{SOURCE20} $RPM_BUILD_ROOT lib/modules/$KernelVer %{SOURCE84} internal
 %if 0%{!?fedora:1}
 # Identify modules in the kernel-modules-partner package
@@ -2251,10 +2251,10 @@ BuildKernel() {
 
 # don't include anything going into kernel-modules-extra in the file lists
 xargs rm -rf < mod-extra.list
-# don't include anything going int kernel-modules-internal in the file 
lists
+# don't include anything going into kernel-modules-internal in the file 
lists
 xargs rm -rf < mod-internal.list
 %if 0%{!?fedora:1}
-# don't include anything going int kernel-modules-partner in the file lists
+# don't include anything going into kernel-modules-partner in the file 
lists
 xargs rm -rf < mod-partner.list
 %endif
 
diff --git a/redhat/scripts/mod/mod-denylist.sh 
b/redhat/scripts/mod/mod-denylist.sh
index blahblah..blahblah 100755
--- a/redhat/scripts/mod/mod-denylist.sh
+++ b/redhat/scripts/mod/mod-denylist.sh
@@ -129,7 +129,7 @@ popd
 
 if [ -z "$Dest" ]; then
sed -e "s|^.|${ModDir}|g" "$Dir"/dep2.list > "$RpmDir/$ListName"
-   echo "./$RpmDir/$ListName created."
+   echo "$RpmDir/$ListName created."
[ -d "$RpmDir/etc/modprobe.d/" ] || mkdir -p "$RpmDir/etc/modprobe.d/"
foreachp check_blacklist < "$List"
 fi

--
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2433
___
kernel mailing list -- kernel@lists.fedoraproject.org
To unsubscribe send an email to kernel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue


Re: [OS-BUILD PATCHv5] redhat/kernel.spec.template: Parallelize compression

2023-01-23 Thread Denys Vlasenko (via Email Bridge)
From: Denys Vlasenko on gitlab.com
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2254#note_1249493515

We usually have 2000..4000 modules.
With e.g. -n 1000, you obviously risk having fewer "xz" processes than CPUs.
Even with -n 100, conceivably on a big machine, you can underutilize CPUs.
OTOH, -n 1, you can spend more time starting a new xz process than compressing
a module, if it's a small module.
So yes, -n16 is an arbitrary choice, but there is logic why it should be
somewhere in [10,100] range.
___
kernel mailing list -- kernel@lists.fedoraproject.org
To unsubscribe send an email to kernel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue


Re: [OS-BUILD PATCHv5] redhat/kernel.spec.template: Parallelize compression

2023-01-23 Thread Denys Vlasenko (via Email Bridge)
From: Denys Vlasenko on gitlab.com
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2254#note_1249068590

"-n 1" will spawn one "xz" per every module. This incurs some startup costs
(fork+exec+library loading).
How about "-n 16", so that each xz process compresses 16 modules, decreasing
startup costs by more than 90%? rhel7 and rhel8 already use this approach.
___
kernel mailing list -- kernel@lists.fedoraproject.org
To unsubscribe send an email to kernel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue


Re: [OS-BUILD PATCH] redhat: Remove parallel_xz.sh

2022-10-10 Thread Denys Vlasenko (via Email Bridge)
From: Denys Vlasenko on gitlab.com
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2068#note_1129654095

There is "sources-rh:" rule in redhat/Makefile which still uses parallel_xz.sh
(copies it). Needs to be removed there too.
___
kernel mailing list -- kernel@lists.fedoraproject.org
To unsubscribe send an email to kernel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue


Re: [OS-BUILD PATCHv2 0/2] redhat/kernel.spec.template: clean up stray .hardlink-temporary files

2022-05-30 Thread Denys Vlasenko (via Email Bridge)
From: Denys Vlasenko on gitlab.com
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1811#note_964674440

I updated the MR to homefully address this.
___
kernel mailing list -- kernel@lists.fedoraproject.org
To unsubscribe send an email to kernel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org
Do not reply to spam on the list, report it: 
https://pagure.io/fedora-infrastructure


[OS-BUILD PATCHv2 2/2] redhat/kernel.spec.template: update selftest data via "make dist-self-test-data"

2022-05-30 Thread Denys Vlasenko (via Email Bridge)
From: Denys Vlasenko 

redhat/kernel.spec.template: update selftest data via "make dist-self-test-data"

Signed-off-by: Denys Vlasenko 

diff --git a/redhat/self-test/data/centos-2585cf9dfaad.el7.spec 
b/redhat/self-test/data/centos-2585cf9dfaad.el7.spec
index blahblah..blahblah 100755
--- a/redhat/self-test/data/centos-2585cf9dfaad.el7.spec
+++ b/redhat/self-test/data/centos-2585cf9dfaad.el7.spec
@@ -2649,6 +2649,10 @@ popd
 # a far more sophisticated hardlink implementation.
 # 
https://github.com/projectatomic/rpm-ostree/commit/58a79056a889be8814aa51f507b2c7a4dccee526
 #
+# The deletion of *.hardlink-temporary files is a temporary workaround
+# for this bug in the hardlink binary (fixed in util-linux 2.38):
+# https://github.com/util-linux/util-linux/issues/1602
+#
 %define kernel_devel_post() \
 %{expand:%%post %{?1:%{1}-}devel}\
 if [ -f /etc/sysconfig/kernel ]\
@@ -2660,7 +2664,9 @@ then\
 (cd /usr/src/kernels/%{KVERREL}%{?1:+%{1}} &&\
  /usr/bin/find . -type f | while read f; do\
hardlink -c /usr/src/kernels/*%{?dist}.*/$f $f > /dev/null\
- done)\
+ done;\
+ /usr/bin/find /usr/src/kernels -type f -name '*.hardlink-temporary' 
-delete\
+)\
 fi\
 %{nil}
 
diff --git a/redhat/self-test/data/centos-2585cf9dfaad.fc25.spec 
b/redhat/self-test/data/centos-2585cf9dfaad.fc25.spec
index blahblah..blahblah 100755
--- a/redhat/self-test/data/centos-2585cf9dfaad.fc25.spec
+++ b/redhat/self-test/data/centos-2585cf9dfaad.fc25.spec
@@ -2649,6 +2649,10 @@ popd
 # a far more sophisticated hardlink implementation.
 # 
https://github.com/projectatomic/rpm-ostree/commit/58a79056a889be8814aa51f507b2c7a4dccee526
 #
+# The deletion of *.hardlink-temporary files is a temporary workaround
+# for this bug in the hardlink binary (fixed in util-linux 2.38):
+# https://github.com/util-linux/util-linux/issues/1602
+#
 %define kernel_devel_post() \
 %{expand:%%post %{?1:%{1}-}devel}\
 if [ -f /etc/sysconfig/kernel ]\
@@ -2660,7 +2664,9 @@ then\
 (cd /usr/src/kernels/%{KVERREL}%{?1:+%{1}} &&\
  /usr/bin/find . -type f | while read f; do\
hardlink -c /usr/src/kernels/*%{?dist}.*/$f $f > /dev/null\
- done)\
+ done;\
+ /usr/bin/find /usr/src/kernels -type f -name '*.hardlink-temporary' 
-delete\
+)\
 fi\
 %{nil}
 
diff --git a/redhat/self-test/data/centos-78e36f3b0dae.el7.spec 
b/redhat/self-test/data/centos-78e36f3b0dae.el7.spec
index blahblah..blahblah 100755
--- a/redhat/self-test/data/centos-78e36f3b0dae.el7.spec
+++ b/redhat/self-test/data/centos-78e36f3b0dae.el7.spec
@@ -2649,6 +2649,10 @@ popd
 # a far more sophisticated hardlink implementation.
 # 
https://github.com/projectatomic/rpm-ostree/commit/58a79056a889be8814aa51f507b2c7a4dccee526
 #
+# The deletion of *.hardlink-temporary files is a temporary workaround
+# for this bug in the hardlink binary (fixed in util-linux 2.38):
+# https://github.com/util-linux/util-linux/issues/1602
+#
 %define kernel_devel_post() \
 %{expand:%%post %{?1:%{1}-}devel}\
 if [ -f /etc/sysconfig/kernel ]\
@@ -2660,7 +2664,9 @@ then\
 (cd /usr/src/kernels/%{KVERREL}%{?1:+%{1}} &&\
  /usr/bin/find . -type f | while read f; do\
hardlink -c /usr/src/kernels/*%{?dist}.*/$f $f > /dev/null\
- done)\
+ done;\
+ /usr/bin/find /usr/src/kernels -type f -name '*.hardlink-temporary' 
-delete\
+)\
 fi\
 %{nil}
 
diff --git a/redhat/self-test/data/centos-78e36f3b0dae.fc25.spec 
b/redhat/self-test/data/centos-78e36f3b0dae.fc25.spec
index blahblah..blahblah 100755
--- a/redhat/self-test/data/centos-78e36f3b0dae.fc25.spec
+++ b/redhat/self-test/data/centos-78e36f3b0dae.fc25.spec
@@ -2649,6 +2649,10 @@ popd
 # a far more sophisticated hardlink implementation.
 # 
https://github.com/projectatomic/rpm-ostree/commit/58a79056a889be8814aa51f507b2c7a4dccee526
 #
+# The deletion of *.hardlink-temporary files is a temporary workaround
+# for this bug in the hardlink binary (fixed in util-linux 2.38):
+# https://github.com/util-linux/util-linux/issues/1602
+#
 %define kernel_devel_post() \
 %{expand:%%post %{?1:%{1}-}devel}\
 if [ -f /etc/sysconfig/kernel ]\
@@ -2660,7 +2664,9 @@ then\
 (cd /usr/src/kernels/%{KVERREL}%{?1:+%{1}} &&\
  /usr/bin/find . -type f | while read f; do\
hardlink -c /usr/src/kernels/*%{?dist}.*/$f $f > /dev/null\
- done)\
+ done;\
+ /usr/bin/find /usr/src/kernels -type f -name '*.hardlink-temporary' 
-delete\
+)\
 fi\
 %{nil}
 
diff --git a/redhat/self-test/data/centos-df0cc57e057f.el7.spec 
b/redhat/self-test/data/centos-df0cc57e057f.el7.spec
index blahblah..blahblah 100755
--- a/redhat/self-test/data/centos-df0cc57e057f.el7.spec
+++ b/redhat/self-test/data/centos-df0cc57e057f.el7.spec
@@ -2649,6 +2649,10 @@ popd
 # a far more sophisticated hardlink implementation.
 # 
https://github.com/projectatomic/rpm-ostree/commit/58a79056a889be8814aa51f507b2c7a4dccee526
 #
+# The deletion of *.hardlink-temporary files is a temporary workaround
+# for this bug in the hardlink binary 

[OS-BUILD PATCHv2 1/2] redhat/kernel.spec.template: remove stray *.hardlink-temporary files, if any

2022-05-30 Thread Denys Vlasenko (via Email Bridge)
From: Denys Vlasenko 

redhat/kernel.spec.template: remove stray *.hardlink-temporary files, if any

Signed-off-by: Denys Vlasenko 

diff --git a/redhat/kernel.spec.template b/redhat/kernel.spec.template
index blahblah..blahblah 100755
--- a/redhat/kernel.spec.template
+++ b/redhat/kernel.spec.template
@@ -2649,6 +2649,10 @@ popd
 # a far more sophisticated hardlink implementation.
 # 
https://github.com/projectatomic/rpm-ostree/commit/58a79056a889be8814aa51f507b2c7a4dccee526
 #
+# The deletion of *.hardlink-temporary files is a temporary workaround
+# for this bug in the hardlink binary (fixed in util-linux 2.38):
+# https://github.com/util-linux/util-linux/issues/1602
+#
 %define kernel_devel_post() \
 %{expand:%%post %{?1:%{1}-}devel}\
 if [ -f /etc/sysconfig/kernel ]\
@@ -2660,7 +2664,9 @@ then\
 (cd /usr/src/kernels/%{KVERREL}%{?1:+%{1}} &&\
  /usr/bin/find . -type f | while read f; do\
hardlink -c /usr/src/kernels/*%{?dist}.*/$f $f > /dev/null\
- done)\
+ done;\
+ /usr/bin/find /usr/src/kernels -type f -name '*.hardlink-temporary' 
-delete\
+)\
 fi\
 %{nil}
 

--
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1811
___
kernel mailing list -- kernel@lists.fedoraproject.org
To unsubscribe send an email to kernel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org
Do not reply to spam on the list, report it: 
https://pagure.io/fedora-infrastructure


[OS-BUILD PATCHv2 0/2] redhat/kernel.spec.template: clean up stray .hardlink-temporary files

2022-05-30 Thread Denys Vlasenko (via Email Bridge)
From: Denys Vlasenko on gitlab.com
Merge Request: https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1811

As reported in RBHZ#2025157, the post scriptlet for the kernel-devel RPM
generates thousands upon thousands of .hardlink-temporary files. This is a
result of a bug in the hardlink binary (fixed in 2.38) that causes orphaned
temporary files if multiple aliases for the same path are provided.

Signed-off-by: Denys Vlasenko 

---
 redhat/self-test/data/centos-2585cf9dfaad.el7.spec  |  8 +++-
 redhat/self-test/data/centos-2585cf9dfaad.fc25.spec |  8 +++-
 redhat/self-test/data/centos-78e36f3b0dae.el7.spec  |  8 +++-
 redhat/self-test/data/centos-78e36f3b0dae.fc25.spec |  8 +++-
 redhat/self-test/data/centos-df0cc57e057f.el7.spec  |  8 +++-
 redhat/self-test/data/centos-df0cc57e057f.fc25.spec |  8 +++-
 redhat/self-test/data/centos-fce15c45d3fb.el7.spec  |  8 +++-
 redhat/self-test/data/centos-fce15c45d3fb.fc25.spec |  8 +++-
 redhat/self-test/data/fedora-2585cf9dfaad.el7.spec  |  8 +++-
 redhat/self-test/data/fedora-2585cf9dfaad.fc25.spec |  8 +++-
 redhat/self-test/data/fedora-78e36f3b0dae.el7.spec  |  8 +++-
 redhat/self-test/data/fedora-78e36f3b0dae.fc25.spec |  8 +++-
 redhat/self-test/data/fedora-df0cc57e057f.el7.spec  |  8 +++-
 redhat/self-test/data/fedora-df0cc57e057f.fc25.spec |  8 +++-
 redhat/self-test/data/fedora-fce15c45d3fb.el7.spec  |  8 +++-
 redhat/self-test/data/fedora-fce15c45d3fb.fc25.spec |  8 +++-
 redhat/self-test/data/rhel-2585cf9dfaad.el7.spec|  8 +++-
 redhat/self-test/data/rhel-2585cf9dfaad.fc25.spec   |  8 +++-
 redhat/self-test/data/rhel-78e36f3b0dae.el7.spec|  8 +++-
 redhat/self-test/data/rhel-78e36f3b0dae.fc25.spec   |  8 +++-
 redhat/self-test/data/rhel-df0cc57e057f.el7.spec|  8 +++-
 redhat/self-test/data/rhel-df0cc57e057f.fc25.spec   |  8 +++-
 redhat/self-test/data/rhel-fce15c45d3fb.el7.spec|  8 +++-
 redhat/self-test/data/rhel-fce15c45d3fb.fc25.spec   |  8 +++-
 redhat/kernel.spec.template |  8 +++-
 25 files changed, 175 insertions(+), 25 deletions(-)
___
kernel mailing list -- kernel@lists.fedoraproject.org
To unsubscribe send an email to kernel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org
Do not reply to spam on the list, report it: 
https://pagure.io/fedora-infrastructure


[OS-BUILD PATCH] redhat/kernel.spec.template: remove stray *.hardlink-temporary files, if any

2022-05-26 Thread Denys Vlasenko (via Email Bridge)
From: Denys Vlasenko 

redhat/kernel.spec.template: remove stray *.hardlink-temporary files, if any

Signed-off-by: Denys Vlasenko 

diff --git a/redhat/kernel.spec.template b/redhat/kernel.spec.template
index blahblah..blahblah 100755
--- a/redhat/kernel.spec.template
+++ b/redhat/kernel.spec.template
@@ -2649,6 +2649,10 @@ popd
 # a far more sophisticated hardlink implementation.
 # 
https://github.com/projectatomic/rpm-ostree/commit/58a79056a889be8814aa51f507b2c7a4dccee526
 #
+# The deletion of *.hardlink-temporary files is a temporary workaround
+# for this bug in the hardlink binary (fixed in util-linux 2.38):
+# https://github.com/util-linux/util-linux/issues/1602
+#
 %define kernel_devel_post() \
 %{expand:%%post %{?1:%{1}-}devel}\
 if [ -f /etc/sysconfig/kernel ]\
@@ -2660,7 +2664,9 @@ then\
 (cd /usr/src/kernels/%{KVERREL}%{?1:+%{1}} &&\
  /usr/bin/find . -type f | while read f; do\
hardlink -c /usr/src/kernels/*%{?dist}.*/$f $f > /dev/null\
- done)\
+ done;\
+ /usr/bin/find /usr/src/kernels -type f -name '*.hardlink-temporary' 
-delete\
+)\
 fi\
 %{nil}
 

--
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1811
___
kernel mailing list -- kernel@lists.fedoraproject.org
To unsubscribe send an email to kernel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org
Do not reply to spam on the list, report it: 
https://pagure.io/fedora-infrastructure