Skip to content
This repository has been archived by the owner on Dec 7, 2023. It is now read-only.

Update to python 3.11, improve build times #26

Merged
merged 5 commits into from
Sep 12, 2023

Conversation

oivindoh
Copy link
Contributor

@oivindoh oivindoh commented Sep 3, 2023

Image sizes:

  • arm64: 410.17MB
  • amd64: 469.85MB

modules/Dockerfile Outdated Show resolved Hide resolved
modules/Dockerfile Outdated Show resolved Hide resolved
docker-bake.hcl Outdated Show resolved Hide resolved
echo "pyeti" >> REQUIREMENTS
echo "greynoise" >> REQUIREMENTS
echo "git+https://github.com/abenassi/Google-Search-API" >> REQUIREMENTS
sed -i 's|apiosintds.*|git+https://github.com/davidonzo/apiosintDS\@misp|g' REQUIREMENTS
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like upstream's misp-module branch is now almost identical to the latest version AND pypi has an updated version.

In other words, we should probably use apiosintds==2.0.1 rather than the git repo.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah yeah, looks like the old sed was broken by that change too.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, how come? (I can't see the error)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't match anything anymore because it's not case-insensitive (though that's a good thing in this case)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fetching the latest apiosintDS package is somewhat of a pain because it depends on validators==0.20.0, while misp-modules wants 0.14.0. I cannot find release notes for 0.14.0 to 0.20.0 (only 0.21 and upwards), so no easy way of knowing whether there are breaking changes in the move.

However, I cannot find any instance of the package actually being used in misp-modules; this applies to pyeti and greynoise too, so I'm thinking it's fine to just blindly go for the version apios wants.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated the source now and let it choose validators release

cd /srv/misp-modules
echo "pyeti" >> REQUIREMENTS
echo "greynoise" >> REQUIREMENTS
echo "git+https://github.com/abenassi/Google-Search-API" >> REQUIREMENTS
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My understanding is that there are no better forks. At some point we should check if that is still true.

@ostefano
Copy link
Owner

ostefano commented Sep 7, 2023

A few nits left, and then we can merge.

echo "greynoise" >> REQUIREMENTS
echo "git+https://github.com/abenassi/Google-Search-API" >> REQUIREMENTS
sed -i 's|.*apiosintDS.*|apiosintDS==2.0.1|g' REQUIREMENTS
# let apiosintDS decide since misp-modules doesn't actually use this package anyway
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is that so? This however explains why the apiosintds repository has a misp branch with a different version for the validators dependency

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep. At least I can't find any trace of it being used by other modules

RUN <<-EOF
git clone --depth 1 https://github.com/stricaud/faup.git /srv/faup
cd /srv/faup
git checkout ${LIBFAUP_COMMIT}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shall we make this conditional iff ${LIBFAUP_COMMIT} is non-empty?

I am getting concerned about existing pipelines not setting it in the environment file

@ostefano ostefano merged commit 814d12a into ostefano:master Sep 12, 2023
1 check failed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants