archlinuxhardened / selinux

PKGBUILDs to build SELinux enabled packages for Arch Linux
146 stars 25 forks source link

.zstd vs. .zst on build scripts #33

Closed tqre closed 4 years ago

tqre commented 4 years ago

I'm running multiple Arches with QEMU and started experimenting with Arch & SELinux. Running Arch as the hypervisor as well. Many of the scripts refer to .zstd instead of .zst: at least clean.sh and build_and_install_all.sh I created a pull request for clean.sh, as I ran into other issues with build_and_install_all.sh.

I wonder if this has something to do with Docker? There is no reference how Docker should be used in this project.

==> Finished making: libsepol 3.1-1 (Mon 27 Jul 2020 08:20:46 PM EEST)
[sudo] password for tqre:
loading packages...
error: './libsepol/*.pkg.tar.xz': could not find or read package
Error: the following command failed, sudo LANG=C pacman --noconfirm --ask=4 -U ./libsepol/*.pkg.tar.xz
[tqre@selinux selinux]$ ls -la libsepol/
total 1068
drwxr-xr-x  4 tqre tqre   4096 Jul 27 20:20 .
drwxr-xr-x 42 tqre tqre   4096 Jul 27 20:19 ..
-rw-r--r--  1 tqre tqre 592349 Jul 27 20:20 libsepol-3.1-1-x86_64.pkg.tar.zst
-rw-r--r--  1 tqre tqre 473842 Jul 27 20:20 libsepol-3.1.tar.gz
tqre commented 4 years ago

It seems I can choose the package extension from /etc/makepkg.conf PKGEXT='.pkg.tar.zstd' Still wondering though why the default is not used...

fishilico commented 4 years ago

For .zstd vs. .zst, the only reason why .zstd is used is because the author of https://github.com/archlinuxhardened/selinux/pull/32/files used it. But indeed, https://www.archlinux.org/news/now-using-zstandard-instead-of-xz-for-package-compression/ is very clear that the default file extension is .pkg.tar.zst, not .pkg.tar.zstd. I will change this.

By the way, I only run tests on a VM and a system that were upgraded and not reinstalled, and when pacman got upgraded, /etc/makepkg.conf was not upgraded and still contained PKGEXT='.pkg.tar.xz' instead of PKGEXT='.pkg.tar.zst'. This is why I have not hit these issues so far...

About the docker configuration in this project (Dockerfile and `.dockerignore), it is mainly the remnants of some tests I did a few years ago to try building the packages (and hosting them as build artifacts). At the time, there was no official Arch Linux Docker image (now there is https://hub.docker.com/_/archlinux) and no free CI system would provide free hosting of build artifacts (now GitHub Actions might be used for this). I would be very helpful to configure a CI which builds automatically all packages from this repository (and detect bugs such as the one you reported), so if you or someone else wants to contribute to this project, it would be a nice thing to set up.

Thanks

shammancer commented 4 years ago

Sorry about, should have payed closer attention...