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

build/pkgs: Split out spkg liblzma from xz #30948

Closed
mkoeppe opened this issue Nov 22, 2020 · 31 comments
Closed

build/pkgs: Split out spkg liblzma from xz #30948

mkoeppe opened this issue Nov 22, 2020 · 31 comments

Comments

@mkoeppe
Copy link
Contributor

mkoeppe commented Nov 22, 2020

(from #30559)

$ grep xz build/pkgs/*/dependencies
build/pkgs/cmake/dependencies:curl zlib bzip2 xz
build/pkgs/gcc/dependencies:| $(MP_LIBRARY) mpfr mpc zlib xz
build/pkgs/gdb/dependencies:mpfr zlib ncurses $(PYTHON) xz
build/pkgs/gfortran/dependencies:| $(MP_LIBRARY) mpfr mpc zlib xz
build/pkgs/p_group_cohomology/dependencies:$(PYTHON)... | $(PYTHON_TOOLCHAIN) matplotlib gap xz $(SAGERUNTIME) ipywidgets
build/pkgs/python3/dependencies:zlib readline sqlite libpng bzip2 xz libffi
build/pkgs/r/dependencies:$(BLAS) gfortran iconv readline bzip2 xz pcre curl | pkgconf

In this list, cmake, r, python3 all depend on liblzma.
The others are merely build-time dependencies on the xz binary (for unpacking the tarball in sage_bootstrap.uncompress.tar_file - when sage-bootstrap-python is < 3.3 - see https://docs.python.org/3/library/tarfile.html) and have nothing to do with the shared library.

The new liblzma package is a script package without installation steps; it delegates the actual installation to the xz spkg. This follows the same approach as the libnauty/nauty packages.

Depends on #31409
Depends on #30350

CC: @dimpase @jhpalmieri

Component: packages: standard

Author: Matthias Koeppe

Branch/Commit: 1fb1fa9

Reviewer: John Palmieri

Issue created by migration from https://trac.sagemath.org/ticket/30948

@mkoeppe mkoeppe added this to the sage-9.3 milestone Nov 22, 2020
@mkoeppe

This comment has been minimized.

@jhpalmieri
Copy link
Member

comment:2

Python should be able handle uncompressing .tar.xz files, so maybe we should modify the SageTarXZFile class in sage_bootstrap.uncompress.tar_file: only use it if Python can't already handle .xz files.

@jhpalmieri
Copy link
Member

comment:3

We could test

hasattr(tarfile.TarFile, 'xzopen')

for example.

@jhpalmieri
Copy link
Member

comment:4

I guess this shouldn't be necessary: sage_bootstrap.uncompress.action.open_archive should check to see if tarfile.is_tarfile(FILE) is True first, and it should be for xz files with a supported version of Python. So I still don't know what happened in Volker's case: using an old Python?

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Feb 13, 2021

comment:5

Setting new milestone based on a cursory review of ticket status, priority, and last modification date.

@mkoeppe mkoeppe modified the milestones: sage-9.3, sage-9.4 Feb 13, 2021
@mkoeppe
Copy link
Contributor Author

mkoeppe commented Mar 26, 2021

comment:6

If r is coming from the system or --disable-r (#31409) is used, then we can drop the SAGE_SPKG_DEPCHECK for xz in python3/spkg-configure.m4
because then there is no package depending on liblzma that will run in the same process as python3.
(cmake depends on liblzma but it does not run in the same process.)

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Mar 26, 2021

Dependencies: #31409

@mkoeppe mkoeppe modified the milestones: sage-9.4, sage-9.5 Jul 19, 2021
@mkoeppe
Copy link
Contributor Author

mkoeppe commented Sep 26, 2021

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Sep 26, 2021

Author: Matthias Koeppe

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Sep 26, 2021

Commit: 546df52

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Sep 26, 2021

New commits:

c504bb9build/pkgs: Split out spkg liblzma from xz
f83aac5build/pkgs/{cmake,r}/dependencies: Depend on liblzma, not xz
9e1e643build/pkgs/python3/dependencies: Add liblzma
fe36a64build/pkgs/r/spkg-configure.m4: Change DEPCHECK from xz to liblzma
212b03ebuild/pkgs/python3/spkg-configure.m4: Change DEPCHECK from xz to liblzma
546df52build/pkgs/xz/spkg-configure.m4: Set sage_require_xz=no if sage-bootstrap-python is new enough

@mkoeppe

This comment has been minimized.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Sep 26, 2021

comment:10

The changes discussed in comment:2 to comment:4 still need to be implemented

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Sep 26, 2021

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

2b4b142build/pkgs: Split out spkg liblzma from xz
5137ae9build/pkgs/{cmake,r}/dependencies: Depend on liblzma, not xz
462fd33build/pkgs/python3/dependencies: Add liblzma
ba6fdcdbuild/pkgs/r/spkg-configure.m4: Change DEPCHECK from xz to liblzma
bba3a93build/pkgs/python3/spkg-configure.m4: Change DEPCHECK from xz to liblzma
bf500bebuild/pkgs/xz/spkg-configure.m4: Set sage_require_xz=no if sage-bootstrap-python is new enough

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Sep 26, 2021

Changed commit from 546df52 to bf500be

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Sep 26, 2021

Branch pushed to git repo; I updated commit sha1. New commits:

bc01006build/pkgs/xz: Update to 5.2.5, add upstream_url

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Sep 26, 2021

Changed commit from bf500be to bc01006

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Sep 26, 2021

Branch pushed to git repo; I updated commit sha1. New commits:

009256ebuild/pkgs/liblzma/dependencies: Update

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Sep 26, 2021

Changed commit from bc01006 to 009256e

@jhpalmieri
Copy link
Member

comment:15

Should there be a symlink build/pkgs/liblzma/package-version.txt -> ../xz/package-version.txt? Or is it okay to omit the version for lzma?

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Sep 29, 2021

Changed commit from 009256e to de28c72

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Sep 29, 2021

Branch pushed to git repo; I updated commit sha1. New commits:

de28c72build/pkgs/liblzma: Add symlink for package-version.txt

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Sep 29, 2021

comment:17

It's ok to omit it (it is using "none" in this case), but I agree that it's probably nicer with a version

@jhpalmieri
Copy link
Member

comment:18

Thank you, looks good.

@jhpalmieri
Copy link
Member

Reviewer: John Palmieri

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Sep 30, 2021

comment:19

Thanks!

@vbraun
Copy link
Member

vbraun commented Oct 2, 2021

comment:20

Merge conflict

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Oct 2, 2021

Branch pushed to git repo; I updated commit sha1. New commits:

8ba1d79trac 30350: remove the ATLAS package
69db839trac 30350: remove "--with-blas=" option to ./configure
272424atrac 30350: remove remaining bits in build/pkgs/atlas/distros
1fb1fa9Merge #30350

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Oct 2, 2021

Changed commit from de28c72 to 1fb1fa9

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Oct 2, 2021

Changed dependencies from #31409 to #31409, #30350

@vbraun
Copy link
Member

vbraun commented Oct 10, 2021

Changed branch from u/mkoeppe/build_pkgs__split_out_spkg_liblzma_from_xz to 1fb1fa9

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

3 participants