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

Consider removing WF_SRC_DIR #1534

Closed
hosiet opened this issue Aug 1, 2022 · 1 comment · Fixed by #1585
Closed

Consider removing WF_SRC_DIR #1534

hosiet opened this issue Aug 1, 2022 · 1 comment · Fixed by #1585
Milestone

Comments

@hosiet
Copy link

hosiet commented Aug 1, 2022

Currently config.h.in defines the macro WF_SRC_DIR, which hardcodes the source code directory path during build:

#define WF_SRC_DIR "@WF_SRC_DIR@"

conf_data.set('WF_SRC_DIR', meson.source_root())

However, it seems that WF_SRC_DIR is not used anywhere in the wayfire project. Looking at project history, it was introduced for debugging at eb735a0

    static int srclen = sizeof(WF_SRC_DIR);
    if (strstr(filepath, WF_SRC_DIR) == filepath) {
        filepath += srclen;

...but its actual use was later removed. As seen in https://github.com/WayfireWM/wayfire/search?q=WF_SRC_DIR , no real code is using this macro.


Now, keeping WF_SRC_DIR macro is causing different files (to be more concrete, different config.h) being generated when the build src dir is different, which breaks the reproducible build initiative that aims to make software robustly generate bit-to-bit identical binaries during build.

You may find downstream distribution bug report at https://bugs.debian.org/1016486 . An analysis on current wayfire's reproducibility in Debian can be found at https://tests.reproducible-builds.org/debian/rb-pkg/unstable/amd64/wayfire.html .

If WF_SRC_DIR is not to be used for future Wayfire, I am wondering if it can be removed from upstream code base. If it will be kept, please let me know so that we can patch out this line from config.h with confidence. Thanks!

@ammen99 ammen99 added this to the 0.8 milestone Aug 2, 2022
@ammen99
Copy link
Member

ammen99 commented Aug 2, 2022

I see no reason not to remove this. Will be fixed for the next release.

soreau added a commit that referenced this issue Oct 12, 2022
soreau added a commit that referenced this issue Oct 12, 2022
ammen99 pushed a commit that referenced this issue Oct 12, 2022
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 a pull request may close this issue.

2 participants