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

unstructured module (dev) doesn't work on arch #1468

Open
liquidsec opened this issue Jun 17, 2024 · 5 comments
Open

unstructured module (dev) doesn't work on arch #1468

liquidsec opened this issue Jun 17, 2024 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@liquidsec
Copy link
Collaborator

The unstructured module tries to install several OS dependencies that do not work on arch linux.

In several other cases, we've needed conditional logic to support arch using different package names, installing from source, etc.

the packages in question:

["libmagic-dev", "poppler-utils", "tesseract-ocr", "libreoffice", "pandoc"]

Of these, at least libmagic-dev and poppler-utils are definitely not supported.

@liquidsec liquidsec added the bug Something isn't working label Jun 17, 2024
@TheTechromancer
Copy link
Collaborator

TheTechromancer commented Jun 17, 2024

Relevant: #1467 (comment)

@liquidsec
Copy link
Collaborator Author

@domwhewell-sage

@domwhewell-sage
Copy link
Contributor

domwhewell-sage commented Jun 18, 2024

Hey,
It looks like the equivalent package on arch for libmagic-dev is file and the one for poppler-utils is poppler. Arch has its own equivalents aswell. We could do something like this:

deps_ansible = [
        {
            "name": "Install Deps (Debian/Ubuntu)",
            "package": {"name": ["libmagic-dev", "poppler-utils", "tesseract-ocr", "libreoffice", "pandoc"], "state": "present"},
            "become": True,
            "when": "ansible_facts['os_family'] == 'Debian'",
        },
        {
            "name": "Install Deps (Arch)",
            "package": {"name": ["file", "poppler", "tesseract", "libreoffice", "pandoc"], "state": "present"},
            "become": True,
            "when": "ansible_facts['os_family'] == 'Archlinux'",
        },
        {
            "name": "Install Deps (Fedora)",
            "package": {"name": ["file-devel", "poppler-utils", "tesseract", "libreoffice", "pandoc"], "state": "present"},
            "become": True,
            "when": "ansible_facts['os_family'] == 'Fedora'",
        },
    ]

Although Im not sure how confident I am in this solution as the developer does not state how to install unstructured dependencies on archlinux / fedora-latest / gentoo or alpine...

@TheTechromancer
Copy link
Collaborator

Yes, that looks good. Up to this point, any time I've needed to test something on a specific distro, I've used docker:

docker run --rm -it archlinux

Very soon I want to set up tests for each of the main distro families, so we won't have to worry about testing this kind of thing manually.

@TheTechromancer
Copy link
Collaborator

@domwhewell-sage if you end up making a PR, can you fork from this branch? That will hopefully show us which distros are passing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants