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
Build phase 6: %install cleanup #233
Conversation
7e3a347
to
0d4d9d7
Compare
Rebased on top of current master. |
Build failed
|
@@ -19,6 +19,10 @@ SUBDIRS = \ | |||
$(NULL) | |||
|
|||
install-exec-local: | |||
mkdir -p $(DESTDIR)$(IPA_SYSCONF_DIR)/custodia | |||
chmod 700 $(DESTDIR)$(IPA_SYSCONF_DIR)/custodia |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use $(INSTALL) -d -m 700 -o root -g root
here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wanted to be consistent but good point, I will change it to $(INSTALL). -o root
cannot be used as explained below. Changing file ownership is job of package manager.
htmldatadir = $(datarootdir)/ipa/html | ||
install-data-hook: | ||
$(INSTALL) -d -D -m 755 $(DESTDIR)$(htmldatadir) | ||
RELATIVE_PATH=$$(python -c "import os.path; print(os.path.relpath('$(appdir)', '$(htmldatadir)'))"); \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't need Python here. ln has -r
for create symbolic links relative to link location
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! I will use that.
@@ -34,3 +34,6 @@ MAINTAINERCLEANFILES = \ | |||
*~ \ | |||
Makefile.in | |||
$(NULL) | |||
|
|||
install-data-hook: | |||
$(INSTALL) -d -D -m 755 $(DESTDIR)$(appdir)/js/plugins |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please make sure you install files and directories as root:root.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make install cannot install files as root (or any other user) because make intall is typically called as unprivileged user by the rpmbuild.
Damn it! I added the last commit with comment in SPEC file and did not run tests on that. Surprise surprise, RPM is PARSIN TEXT INSIDE COMMENTS and if you put %install into comment, guess what: It will blow up! Grrrr. (Another joke is that DNF builddep is throwing away error descrption from RPM SPEC file parser.) |
0d4d9d7
to
243f846
Compare
This version fixes the fixable issues, i.e. everything mentioned above except changing file ownership. |
@tiran Please re-review and set review status accordingly. Thanks! |
243f846
to
86baa91
Compare
This is next step towards fully functional make install. https://fedorahosted.org/freeipa/ticket/6418
This is next step towards fully functional make install. https://fedorahosted.org/freeipa/ticket/6418
This is next step towards fully functional make install. https://fedorahosted.org/freeipa/ticket/6418
86baa91
to
37e4df1
Compare
I've fixed incorrect use of |
@tiran do you agree with changes? |
This patch set is based on phase 5 - PR #226.
Now all the installation steps (except Python2/3) are handled by make install.
Python 2/3 support will deserve separate PR.