Skip to content

Commit

Permalink
CI: get rid of Lua
Browse files Browse the repository at this point in the history
Generating a Lua script using Python is too much fragile complexity.
We can just do everything from Python.
  • Loading branch information
flowerysong committed Oct 9, 2024
1 parent b3484db commit e6e66a7
Show file tree
Hide file tree
Showing 3 changed files with 101 additions and 210 deletions.
16 changes: 1 addition & 15 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,28 +29,14 @@ jobs:
run: sudo apt install libbsd-dev liblua5.4-dev libmilter-dev libssl-dev

- name: Install Python dependencies
run: sudo pip install pytest
run: sudo pip install pytest git+https://github.com/flowerysong/python-libmilter#egg=libmilter

- name: Build OpenARC
run: |
autoreconf -fiv
CFLAGS='-Wall' ./configure
make -j4
- name: Check out miltertest
uses: actions/checkout@v4
with:
repository: flowerysong/miltertest
path: miltertest

- name: Build miltertest
run: |
autoreconf -fiv
./configure
make
echo $PWD >> $GITHUB_PATH
working-directory: ${{ github.workspace }}/miltertest

- name: Test OpenARC
run: |
make check
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ you will also need:

Tests can be run with `make check`. OpenARC's test suite requires
Python >= 3.7, [pytest](https://pytest.org), and
[miltertest](https://github.com/flowerysong/miltertest).
[a Python library](https://github.com/flowerysong/python-libmilter).

## Additional Documentation

Expand Down
Loading

5 comments on commit e6e66a7

@lquidfire
Copy link
Contributor

Choose a reason for hiding this comment

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

Hi,

On my system the libmilter module (python-pymilter) is called milter, not libmilter. Is libmilter working for you? If so, which module do you have installed please?

Also, the tests don't pass on my system currently.

Thank you for your work on this!

@flowerysong
Copy link
Owner Author

@flowerysong flowerysong commented on e6e66a7 Oct 13, 2024

Choose a reason for hiding this comment

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

@lquidfire You don't need pymilter (or even python-libmilter), you need libmilter from https://github.com/flowerysong/python-libmilter. (Yes, this is a confusing naming situation, which is one reason I haven't considered uploading the package to PyPI; I want to see if I can come up with a better name.) As is done in Actions, you can install this locally using pip install git+https://github.com/flowerysong/python-libmilter#egg=libmilter.

Like the C libmilter, most of the existing Python implementations focus on the milter side of the protocol. I found an old one that implemented both and updated it for modern Python and milter protocol v6.

@lquidfire
Copy link
Contributor

Choose a reason for hiding this comment

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

Hi @flowerysong, I was just about to write that I had found out about your library (based on Chris Siebenmann's!). I hope you will publish it, and give it a release or tag on GitHub (that makes it easier to write a PKGBUILD for Archlinux).

I now have 10 failed and 2 passed tests. I will have to open a GitHub Issue about those, to find out what I am missing.

@flowerysong
Copy link
Owner Author

Choose a reason for hiding this comment

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

libmilter is now named miltertest and released on PyPI.94dbbc2ef9d8b32f8d0e03df94c081d380863c3a is now required in order for tests to pass.

@lquidfire
Copy link
Contributor

Choose a reason for hiding this comment

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

Perfect, thank you so much! Both your openarc and miltertest are available on AUR for Archlinux, and build fine.

P.S.: The issues with not passing tests that I had was related to my building on a tmpfs in RAM - no issues on disk with different permissions.

Please sign in to comment.