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

Cope better with non-ASCII encodings in spec files (plus change) #66

Merged

Conversation

nphilipp
Copy link
Member

@nphilipp nphilipp commented Feb 8, 2024

commit da1ee57b3f08548c47a0368c3c47fac5a5116487
Author: Nils Philippsen <nils@redhat.com>
Date:   Thu Feb 8 18:01:43 2024 +0100

    Ensure locale modifications stay isolated in tests
    
    Rename and refactor the setlocale() fixture for this and make it
    generally available.
    
    Signed-off-by: Nils Philippsen <nils@redhat.com>

commit 8cf6d66aec5aec7daa7f92e964fdbb2a3d3829ff (main--tests-break-encoding)
Author: Nils Philippsen <nils@redhat.com>
Date:   Thu Feb 8 18:05:37 2024 +0100

    Extract unpacking repo from test_process_distgit
    
    This makes the function a little less unwieldy.
    
    Signed-off-by: Nils Philippsen <nils@redhat.com>

commit 13384aeb2716cda21dc6e873d0ba3a68fc65b28f
Author: Nils Philippsen <nils@redhat.com>
Date:   Thu Feb 8 18:36:09 2024 +0100

    Test process_distgit.main() functionally
    
    Previously, this only checked if process_distgit.process_distgit() was
    called correctly. It’s easy enough to test that the whole operation
    works.
    
    Signed-off-by: Nils Philippsen <nils@redhat.com>

commit f99889d52b98050e2e0a3abac680ab9a2f7b25ef
Author: Nils Philippsen <nils@redhat.com>
Date:   Wed Feb 7 19:12:14 2024 +0100

    Cope better with non-ASCII encodings in spec files
    
    This broke with the change to use the rpm Python package to expand
    macros in-process. The reason was that the %lua_requires macro set the
    locale to "C" (_not_ "C.UTF-8") as a side effect which caused text files
    to be opened with "ascii" encoding from then on.
    
    Fixes: #64
    
    Signed-off-by: Nils Philippsen <nils@redhat.com>

Fixes: #64

@nphilipp nphilipp force-pushed the main--cope-better-with-non-ascii branch 2 times, most recently from f298d42 to cdff404 Compare February 8, 2024 18:05
Rename and refactor the setlocale() fixture for this and make it
generally available.

Signed-off-by: Nils Philippsen <nils@redhat.com>
This makes the function a little less unwieldy.

Signed-off-by: Nils Philippsen <nils@redhat.com>
Previously, this only checked if process_distgit.process_distgit() was
called correctly. It’s easy enough to test that the whole operation
works.

Signed-off-by: Nils Philippsen <nils@redhat.com>
This broke with the change to use the rpm Python package to expand
macros in-process. The reason was that the %lua_requires macro set the
locale to "C" (_not_ "C.UTF-8") as a side effect which caused text files
to be opened with "ascii" encoding from then on.

Fixes: fedora-infra#64

Signed-off-by: Nils Philippsen <nils@redhat.com>
@nphilipp nphilipp force-pushed the main--cope-better-with-non-ascii branch from cdff404 to 8dab373 Compare February 8, 2024 18:15
@nphilipp nphilipp merged commit d77edf3 into fedora-infra:main Feb 9, 2024
7 checks passed
@nphilipp nphilipp deleted the main--cope-better-with-non-ascii branch February 9, 2024 00:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rpmautospec trips over UTF-8 data
2 participants