package() step getting corrumpted file
Consider this APKBUILD aports!44628 (diffs)
When I do abuild -r
or abuild rootpkg
its generating/copying a corrupted file from my build() step.
alpine:~/aports/testing/recyclarr$ abuild rootpkg
>>> recyclarr: Entering fakeroot...
>>> recyclarr*: Running postcheck for recyclarr
>>> recyclarr*: Preparing package recyclarr...
>>> recyclarr*: Stripping binaries
>>> recyclarr*: Scanning shared objects
>>> recyclarr*: Tracing dependencies...
dotnet7-runtime
so:libc.musl-x86_64.so.1
so:libgcc_s.so.1
so:libstdc++.so.6
>>> recyclarr*: Package size: 2.0 KB
>>> recyclarr*: Compressing data...
>>> recyclarr*: Create checksum...
>>> recyclarr*: Create recyclarr-4.3.0-r0.apk
alpine:~/aports/testing/recyclarr$ ls -la pkg/recyclarr/usr/sbin/
total 58
drwxr-xr-x 2 fabricio fabricio 3 Feb 28 09:25 .
drwxr-sr-x 3 fabricio fabricio 3 Feb 28 09:25 ..
-rwxr-xr-x 1 fabricio fabricio 78320 Feb 28 09:25 recyclarr
(look to the file size 78320)
But If you do the manually steps, I can see that until the abuild build
step, my binary is right there and has correct size (and it works if I execute it)
alpine:~/aports/testing/recyclarr$ abuild unpack
>>> recyclarr: Fetching recyclarr-4.3.0.tar.gz::https://github.com/recyclarr/recyclarr/archive/refs/tags/v4.3.0.tar.gz
>>> recyclarr: Checking sha512sums...
recyclarr-4.3.0.tar.gz: OK
0001-disable-gitversion.patch: OK
>>> recyclarr: Unpacking /var/cache/distfiles/recyclarr-4.3.0.tar.gz...
alpine:~/aports/testing/recyclarr$ abuild prepare
>>> recyclarr: 0001-disable-gitversion.patch
patching file src/Directory.Build.props
patching file src/Recyclarr.Cli/Program.cs
Hunk #1 succeeded at 81 (offset -1 lines).
alpine:~/aports/testing/recyclarr$ abuild build
MSBuild version 17.4.1+fedecea9d for .NET
Determining projects to restore...
All projects are up-to-date for restore.
Recyclarr.Common -> /home/fabricio/aports/testing/recyclarr/src/recyclarr-4.3.0/src/Recyclarr.Common/bin/Release/net7.0/Recyclarr.Common.dll
Recyclarr.TrashLib -> /home/fabricio/aports/testing/recyclarr/src/recyclarr-4.3.0/src/Recyclarr.TrashLib/bin/Release/net7.0/Recyclarr.TrashLib.dll
Recyclarr.Cli -> /home/fabricio/aports/testing/recyclarr/src/recyclarr-4.3.0/src/Recyclarr.Cli/bin/Release/net7.0/linux-musl-x64/recyclarr.dll
Recyclarr.Cli -> /home/fabricio/aports/testing/recyclarr/src/recyclarr-4.3.0/publish/
alpine:~/aports/testing/recyclarr$ ls -la src/recyclarr-4.3.0/publish/
total 3734
drwxr-sr-x 2 fabricio fabricio 3 Feb 28 09:13 .
drwxr-sr-x 10 fabricio fabricio 23 Jan 22 20:51 ..
-rwxr-xr-x 1 fabricio fabricio 6561208 Feb 28 09:36 recyclarr
(look to the file size 6561208)
If I run the abuild rootpkg
now it returns the first statement I show with wrong binary.
I have tried to touch the package() instructions, nothing have work yet. Any advise in what could Im doing wrong?