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

Add license for bibliographic data and make Dockerfile more robust #1222

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 1 addition & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,7 @@ FROM xmppxsf/xeps-base:latest as build
ARG NCORES=1
ARG TARGETS="html inbox-html inbox-xml pdf xeplist refs xml"

COPY *.xml xep.* *.css *.xsl *.js *.xsl Makefile /src/
COPY resources/*.pdf /src/resources/
COPY tools/*.py /src/tools/
COPY inbox/*.xml inbox/*.ent inbox/*.dtd /src/inbox/
COPY texml-xsl/*.xsl /src/texml-xsl/

WORKDIR /src
RUN OUTDIR=/var/www/html/extensions/ make -j$NCORES $TARGETS
RUN --mount=target=/xeps make -C /xeps -j$NCORES $TARGETS OUTDIR=/var/www/html/extensions
Copy link
Contributor

Choose a reason for hiding this comment

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

This implies that I cannot do git operations (like switching branches) while the build is running, without corrupting the result, right?

That would be a blocker.

Copy link
Contributor Author

@Flowdalic Flowdalic Dec 16, 2022

Choose a reason for hiding this comment

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

You could do git operations, but those will be immediately be reflected in the container with all the consequences that may have.

I am not sure how why this makes this approach as non suitable? How often do you perform git actions while a build is running? Regardless of the existence of a docker layer used for the build or not. You wouldn't run cmake .. && ninja and simultaneously switch the git branch, would you?

And in addition, this changes simplifies the Dockerfile enormously, we do not longer have to explicitly COPY stuff into the docker build context.

RUN bash -c 'rm -f /var/www/html/extensions/*.{log,aux,toc,tex,tex.xml,out}'

FROM nginx:1-alpine
Expand Down
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,11 @@ inbox-xml: $(OUTDIR)/inbox $(proto_xep_xmls)
.PHONY: pdf
pdf: $(xep_pdfs)

$(REFSDIR)/LICENSE: refs-LICENSE
cp $< $@

.PHONY: refs
refs: $(xep_refs)
refs: $(xep_refs) $(REFSDIR)/LICENSE

.PHONY: examples
examples: $(xep_examples)
Expand Down
9 changes: 9 additions & 0 deletions refs-LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
To the extent possible under law, the XMPP Standards Foundation (XSF)
has waived all copyright and related or neighboring rights to XSF's
bibliographic data.

That is, the bibliographic data, which is also accessible via
https://xmpp.org/extensions/refs/, is put in the public domain via
CC0 1.0 [1].

1: https://creativecommons.org/publicdomain/zero/1.0/