Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make artifacts should not depend on GNU tar and GNU coreutils #81

Closed
AkihiroSuda opened this issue Nov 21, 2024 · 4 comments
Closed

make artifacts should not depend on GNU tar and GNU coreutils #81

AkihiroSuda opened this issue Nov 21, 2024 · 4 comments

Comments

@AkihiroSuda
Copy link
Member

socket_vmnet/Makefile

Lines 5 to 7 in 8664a96

# https://reproducible-builds.org/docs/archives/
TAR ?= gtar --sort=name --mtime="@$(SOURCE_DATE_EPOCH)" --owner=0 --group=0 --numeric-owner --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=atime,delete=ctime
TOUCH ?= gtouch -d @$(SOURCE_DATE_EPOCH)

@nirs
Copy link
Member

nirs commented Nov 25, 2024

This is not really refactoring, it changes the behaviour. For make artifacts is broken because I don't have gtar.

Replacing gtar with tar does not work:

% make artifacts
rm -rf _artifacts
/Applications/Xcode.app/Contents/Developer/usr/bin/make clean
rm -f socket_vmnet socket_vmnet_client *.o client/*.o
rm -rf _artifacts/x86_64
/Applications/Xcode.app/Contents/Developer/usr/bin/make ARCH=x86_64 DESTDIR=_artifacts/x86_64 install.bin install.doc
cc -O3 -Wall -Wextra -pedantic -DVERSION=\"v1.1.7-49-gd929ac7.m\" -arch x86_64 -c cli.c -o cli.o
cc -O3 -Wall -Wextra -pedantic -DVERSION=\"v1.1.7-49-gd929ac7.m\" -arch x86_64 -c main.c -o main.o
cc -O3 -Wall -Wextra -pedantic -DVERSION=\"v1.1.7-49-gd929ac7.m\" -arch x86_64 -o socket_vmnet  -framework vmnet cli.o main.o
cc -O3 -Wall -Wextra -pedantic -DVERSION=\"v1.1.7-49-gd929ac7.m\" -arch x86_64 -c client/main.c -o client/main.o
cc -O3 -Wall -Wextra -pedantic -DVERSION=\"v1.1.7-49-gd929ac7.m\" -arch x86_64 -o socket_vmnet_client  client/main.o
logger "Installing executables for socket_vmnet v1.1.7-49-gd929ac7.m in _artifacts/x86_64//opt/socket_vmnet/bin"
mkdir -p "_artifacts/x86_64//opt/socket_vmnet/bin"
cp -a socket_vmnet "_artifacts/x86_64//opt/socket_vmnet/bin/socket_vmnet"
cp -a socket_vmnet_client "_artifacts/x86_64//opt/socket_vmnet/bin/socket_vmnet_client"
strip "_artifacts/x86_64//opt/socket_vmnet/bin/socket_vmnet"
strip "_artifacts/x86_64//opt/socket_vmnet/bin/socket_vmnet_client"
logger "Installing documentation for socket_vmnet v1.1.7-49-gd929ac7.m in _artifacts/x86_64//opt/socket_vmnet/share/doc"
mkdir -p "_artifacts/x86_64//opt/socket_vmnet/share/doc/socket_vmnet"
cp -a README.md LICENSE launchd etc_sudoers.d "_artifacts/x86_64//opt/socket_vmnet/share/doc/socket_vmnet"
file -bp _artifacts/x86_64//opt/socket_vmnet/bin/socket_vmnet | grep -q "Mach-O 64-bit executable x86_64"
tar --sort=name --mtime="@1732561936" --owner=0 --group=0 --numeric-owner --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=atime,delete=ctime -C _artifacts/x86_64 -cf _artifacts/socket_vmnet-1.1.7-49-gd929ac7.m-x86_64.tar ./
tar: Option --sort=name is not supported
Usage:
  List:    tar -tf <archive-filename>
  Extract: tar -xf <archive-filename>
  Create:  tar -cf <archive-filename> [filenames...]
  Help:    tar --help
make: *** [artifacts] Error 1

@nirs
Copy link
Member

nirs commented Nov 26, 2024

brew install gnu-tar fixes the issue. If we document it I don't see the issue in using it.

We can add CONTRIBUTING.md with info for developers.

@AkihiroSuda
Copy link
Member Author

This only affects the CI, so not worth documenting

@nirs
Copy link
Member

nirs commented Nov 26, 2024

This affects developers that want to try make artifacts locally, added #91

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants