I can reproduce the problem with fscrypt on my ext4 /home partition:
```
$ mount | grep "/boot"
/dev/sda1 on /boot type ext4 (rw,relatime,data=ordered)
```

Steps to reproduce:

[Step A]
Make sure fscrypt is installed and set up.

[Step B]
Create base test directory:
```
cd ~ 
mkdir test_rpm
cd test_rpm
```

[Step C]
Create a non-encrypted directory to check that rpmbuild works normally:
```
mkdir no_encryption
cd no_encryption
```

[Step D]
Download spec file from here and build:
```
wget https://github.com/rpm-software-management/rpm/files/6457257/hello.spec.txt
mv hello.spec{.txt,}
rpmbuild -bb --define 'input_dir input' --buildroot ${PWD}/build hello.spec
```
[Step E]
Observe that the rpm has been built successfully.

[Step F]
Create an encrypted directory:
```
cd ~/test_rpm
mkdir fscrypt
```
```
fscrypt encrypt fscrypt

Should we create a new protector? [y/N] y
Enter the source number for the new protector [2 - custom_passphrase]: 2
Enter a name for the new protector: rpm_test_protector
Enter custom passphrase for protector "rpm_test_protector": 123456 (<-- 
invisible)
Confirm passphrase: 123456 (<-- invisible)
"fscrypt" is now encrypted, unlocked, and ready for use.
```
```
cd fscrypt
```
[Step G]
Perform step D again.

[Step H]
Observe that the build has failed.

output of rpmbuild:
```
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.mhWm7Y
+ umask 022
+ cd /home/dns/rpmbuild/BUILD
+ RPM_EC=0
++ jobs -p
+ exit 0
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.a6AYr1
+ umask 022
+ cd /home/dns/rpmbuild/BUILD
+ mkdir -p /home/dns/test_rpm/fscrypt/build
+ mkdir -p input/opt
+ cat
+ g++ /home/dns/test_rpm/fscrypt/build/someprog.cpp -o input/opt/someprog
+ RPM_EC=0
++ jobs -p
+ exit 0
Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.Ev5cH9
+ umask 022
+ cd /home/dns/rpmbuild/BUILD
+ /usr/bin/rm -rf /home/dns/test_rpm/fscrypt/build
+ /usr/bin/mkdir -p /home/dns/test_rpm/fscrypt
+ /usr/bin/mkdir /home/dns/test_rpm/fscrypt/build
+ cp -r input/opt /home/dns/test_rpm/fscrypt/build
+ '[' '%{buildarch}' = noarch ']'
+ QA_CHECK_RPATHS=1
+ case "${QA_CHECK_RPATHS:-}" in
+ /usr/lib/rpm/check-rpaths
+ /usr/lib/rpm/check-buildroot
+ /usr/lib/rpm/brp-compress /usr
+ /usr/lib/rpm/brp-strip /usr/bin/strip
+ /usr/lib/rpm/brp-strip-static-archive /usr/bin/strip
+ /usr/lib/rpm/brp-strip-comment-note /usr/bin/strip /usr/bin/objdump
Processing files: hello-world-1-1.x86_64
Provides: hello-world = 1-1 hello-world(x86-64) = 1-1
Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(FileDigests) <= 
4.6.0-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1
Checking for unpackaged file(s): /usr/lib/rpm/check-files 
/home/dns/test_rpm/fscrypt/build
error: create archive failed: cpio: write failed - No such file or directory


RPM build errors:
    create archive failed: cpio: write failed - No such file or directory
```

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/1682#issuecomment-850412352
_______________________________________________
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint

Reply via email to