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
Create release source artifact containing all submodules #1712
Conversation
Generally looks good, source is now in a directory instead at the top level. Why not replace
Comparing s local checkout of
but this probably shouldn't be in the repo in the first place and it seems to build fine anyway. Other differences can be ignored. |
Keeping the OMERO.source was my not knowing what is currently using it. I'm also not sure of the name |
Doesn't the lack of submodules prevent any functional use of OMERO.source? |
If we rename the repo, then we can simply rename the archive at the same time. I'll double-check why we're losing the executable bit. Looks like the ant zip task doesn't handle this. WRT the missing bits, the .git directories are intentional; CVS is unintentional but OK I imagine--legacy from CVS days? For JWlz.so, I opened #11655. |
So looking at the ant tar/zip/untar/unzip tasks, it appears that they are completely incapable of handling posix permissions until they are updated to use the Java7 File API which introduces support for them. So if we want to run an external shell script to do the source generation, that's the best way to do it, but at the expense of portability. Mind you, we can't create an archive with correct permissions on Windows anyway, so maybe this isn't such a bad limitation. Thoughts? |
|
@rleigh-dundee : are you ok to make those changes? |
The main outstanding blocker is how to keep the executable files executable in the generated zips. We could change from using ant to a shell or python script to run git and zip by hand (which will not work on Windows), but would correctly preserve the execute permissions [packing on Windows would destroy the permissions anyway, so it's not workable there anyway I think]. Insight uses the CVS is an obsolete relic (had empty CVS/Entries); so can definitely be removed. For the naming, I'm not sure what you mean here; I was suggesting to do the opposite and drop the
Fedora does not permit dots as separators in a package name; Debian does not permit uppercase package names, so our being gratuitously different from the rest of the world here does make us incompatible with these two projects (and doubtless many others), so this does have a cost. |
re: permissions. There are far more than I would have expected:
Most likey the goal of this PR shouldn't be to make the new source zip completely build-able, since that's too much work. It didn't build previously, so adding the submodules will already be an improvement. I filed handling the exec bit as: https://trac.openmicroscopy.org.uk/ome/ticket/11593 |
Re: zip naming -- I filed https://trac.openmicroscopy.org.uk/ome/ticket/11701 Let's not try to make such decisions here but get several people together to chat. For the moment, please make use of |
How many of those are required, as opposed to permissions which were inadvertently committed? The default build target actually works fine after making ./builld.py executable, server runs, however OMERO.web doesn't work due to some version number problems: |
@manics : not many are needed, I don't think. |
Ping. |
@joshmoore My question about the execute perms which I've asked twice remains unanswered. We need the permissions preserving, and this isn't possible with ant. We could use either a simple shell script or a python script, for example, run git archive/unzip/zip to do this, but whichever we choose it's not going to be possible for this to (ever) work well on windows as is. One possibility is that
gives us a list of files which are executable in git. This would be a means of setting explicit permissions, which would be worth looking at. However, we would need to find a way to exclude these entries from the other lists. Doing this in ant will not be pleasant. It wouldn't be hard with shell or python. This might even work for windows--we can add the execute property with the python "zipfile" module, for example. If it would be OK to move the zipfile creation out from ant to an external script, I'll be happy to do the above. Where would be the best place to put such a script? |
I have 3 different reactions (at least):
Happy to discuss any of them, but since the rest of the build fixes have been ticketed and moved to a later milestone, I would tend to do 1 unless someone has tried 3 and knows it to be easy and feasible. |
@rleigh-dundee : is this something you want to come back to now? |
Yes. I'll redo this as a python script. shoehorning this into ant works up to a point, but really just isn't good enough. |
Given the age of the branch, I've rebased it onto current develop. I've added a separate python script to do the archive creation which doesn't have the limitations of the ant-based approach. This now creates a source archive containing all submodules and with correct permissions across the board. |
|
And trying to
Which also seems acceptable. Assuming there are no problems with the builds tomorrow, I'd say let's merge this and make other minor modifications as need be. |
Version number is now preserved by release-src. |
Having it in 5.0 would be ideal. I'll be happy to backport as soon as we know all the targets work correctly. Further down the line, many of the jobs which use git clones could be converted to download the source zip from an upstream job, which reduce the diskspace and download times significantly, as well as ensure that the release source is always buildable. |
👍 for backporting to 5.0. Happy to test this tomorrow.
|
@sbesson to answer your questions:
|
@rleigh-dundee : would you mind enabling |
NB:
|
@joshmoore Does this work if you unpack outside the git repo? |
Nope:
but just to be clear: this is my expected, preferred behavior. |
Ah, OK. I've added release-src to OMERO.sh now. |
Nice. We can look at the artifacts of the next build and then merge. (In the future we'll probably need this in OMERO.bat as well) |
OK. Note that the source-archive script was also copied into the bioformats PR. Once that's merged, we can move over to using that in openmicroscopy as well. |
- Correct version to use plainversion. - Add archive prefix.
This reverts commit 5b0098333130d3b01eb3aaa081ab188589dfe354.
Following commands worked fine:
Merging. |
Create release source artifact containing all submodules
--rebased-to #2064 |
Testing:
This will create a source release. If the repo is tagged, you should get the correct release version here.
The resulting zip file should contain
components/antlib/resources/gitversion.xml
containing the release version numbersThe unpacked zip file should build all the same targets as for the git repo, the only exception being that the release-src target will not work, so
./build.py release-all
will exclude the source zip when run outside git. We could remove this from release-all so that it's only for binary artifacts.