Skip to content

add SYSCONFDIR variable to allow FHS-compliant builds#210

Merged
Gemba merged 1 commit intoGemba:masterfrom
Newchair2644:master
Jan 18, 2026
Merged

add SYSCONFDIR variable to allow FHS-compliant builds#210
Gemba merged 1 commit intoGemba:masterfrom
Newchair2644:master

Conversation

@Newchair2644
Copy link

This change separates the installation prefix (PREFIX) from the system configuration directory by introducing a new SYSCONFDIR variable.

Currently, the skyscraper.pro file installs configuration files under $${PREFIX}/etc/skyscraper, which can result in non-FHS-compliant paths such as /usr/etc/skyscraper. This makes it hard to package skyscraper for most distros without a patch. By separating the /etc installation prefix from the binary prefix we can build an an FHS-compliant build without a patch.

With this change

  • SYSCONFDIR defaults to $${PREFIX}/etc, preserving original behavior for local builds.
  • Distributors can override SYSCONFDIR to /etc (or any other desired path) without modifying the .pro file.
  • Binaries can still be installed under $${PREFIX}/bin as before.

Copy link
Owner

@Gemba Gemba left a comment

Choose a reason for hiding this comment

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

Thanks. A few minor corrections.

The SYSCONFDIR should also be reflected to the preprocessor, like in the line DEFINES+=PREFIX=\\\"$$PREFIX\\\" in this pro file.
Consequently, this line should utilize the SYSCONFDIR.

With this changes I am happy to merge.

BTW: What (distro)package are you about to create?

@Newchair2644
Copy link
Author

I just made the corrections, thanks.

I made a package for Void Linux, it builds with this patch and it works great. I will make the PR for the void package very soon but what I have so far is here: void-linux/void-packages@243c289.

@Gemba Gemba merged commit ec4c5c7 into Gemba:master Jan 18, 2026
1 check passed
@Gemba
Copy link
Owner

Gemba commented Jan 18, 2026

Thanks for putting this together. Happy to accept the follow-up PR for void Linux whenever it is ready.

@Newchair2644
Copy link
Author

I noticed some of the CI tests were failing, because I didn't set the new SYSCONFDIR variable in the tests, so I ran them locally and corrected the tests which were failing: abstractscraper, config, getsearchnames, pegasus, and settings. I I simply added the DEFINES+=SYSCONFDIR=\\\"$$SYSCONFDIR\\\" to the respective .pro files and set the default value for SYSCONFDIR as before. I pushed my changes to my branch as a separate commit for your review: master...Newchair2644:skyscraper:master. If these changes look good should I squash the commits and you can re-merge or make a new PR? Whatever is easiest for you I am not very experienced with git.

@Gemba
Copy link
Owner

Gemba commented Jan 19, 2026

Thanks for the heads up. I was too impatient to wait for the tests to finish, it escaped me too.

Nvm and no worries :

  1. Make a git format-patch bb56c1 (i.e. the changes for the testcases) on your fork. This will create some file 0001-<git commit msg>.patch
  2. Then update your fork/main with Gemba/main (there is a button at github when you are on your fork)
  3. make a new branch from your main: git checkout -b fix_sysconfdir_testcases (or whatever name you like)
  4. apply the patch git apply 0001-*
  5. add, commit and file another PR

This is from top of my head. If you are stuck it can also be I missed sth. Just shout in any case.

@Newchair2644
Copy link
Author

Thanks a lot for the guidance, I just made the PR.

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.

2 participants