-
-
Notifications
You must be signed in to change notification settings - Fork 7k
Buildfixes: Better linux packaging and https #5438
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
Conversation
<antcall target="untar-unzip-download-web" /> | ||
<antcall target="untar-unzip-download-local" /> | ||
</target> | ||
<target name="untar-unzip-download-web" unless="local_sources"> |
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.
Is this distinction really needed?
AFAIR if you copy the needed archives in the right place before launching the build, the file is not downloaded again (this is done in the untar-unzip-check
that is a dependency of untar-unzip-download
).
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.
One of the biggest reasons I remember is that some paths are different for different architectures or not existant (mkdir -p). On top of that you need to always change the PKGBUILD and need to carefully check where the build script wants to have its downloaded files. This makes it harder to maintain.
This patch makes it simpler to search the download files from a local source instead.
@@ -220,7 +220,8 @@ | |||
</target> | |||
|
|||
<!-- copy library folder --> | |||
<target name="assemble-libraries" unless="light_bundle"> | |||
<target name="assemble-libraries" depends="assemble-libraries-full, assemble-libraries-light" /> | |||
<target name="assemble-libraries-full" unless="light_bundle"> |
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 guees this is to keep the empty libraries
folder. Is it really needed?
<copy todir="${target.path}/hardware"> | ||
<fileset dir="../hardware"> | ||
<exclude name="arduino/sam/**"/> | ||
</fileset> | ||
</copy> | ||
</target> | ||
<target name="assemble-hardware-light" if="light_bundle"> | ||
<copy file="../hardware/package_index_bundled.json" todir="${target.path}/hardware" /> |
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.
In this case the file ../hardware/package_index_bundled.json
is wrong, it should be a json with zero platforms defined. I don't know maybe the best thing to do is to add a check to the IDE...
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 had a lot of problems with this file. Currently I add a copy fo the avr core to the hardware path with a different name and patches to use the archlinux tools. However If i define this package in this json the IDE always crashs on a name not equal to "arduino". I am not sure if the file is required in this case.
If it should be empty, maybe you should add a stub with no data in it instead. However this works for now.
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.
package_index_bundled.json
is, basically, a core-package json that describe what's bundled inside the IDE hardware
folder. The IDE merges the content of package_index_bundled.json
with the general package_index.json
that is downloaded from arduino.cc. The bundled index has priority over the downloaded index.
If you want to make a real no-bundle (or light) version of the IDE, the correct thing to do is to create an empty (== with zero platforms defined) package_index_bundled.json
.
Any problems left with the PR? I'd also like to address some more build changes, but possibly in another PR then. |
Another release has been tagged and still no progress in this PR. It makes it complicated to package arduino if those patches are not applied. Could you please consider to add this? |
1.6.13 has been a bugfix release, so we tried to include the minimum number of changes. We are currently merging a lot of pending PRs and we'll surely analyze this in the next days. |
Thank you for the information. If you consider to fix the suggested build improvements you might also want to think of adding GPG signatures: #5619 I am about to put arduino into [community] of ArchLinux, but I hesitate to do that because of the missing gpg checks and also because there was no clear statement if we are allowed to do so. I see no point why we should not, but in any case, feel free to contact me for making a clear statement about yes or no. The ArchLinux team would be happy about some more clear statements and gpg checks. Thanks. |
I've resolved the merging conflicts. Please consider to merge this, as it is a real struggle to patch back the sources with those patches. |
@facchinm yes, could you plese include this patch in the next release? It makes it difficult for us linux users who have to wait longer for a new release (until the patches are merged manually). Tante grazie!! |
@facchinm any news about this? Another required fix would be to exclude arduino-builder from the build, Please run the builder on this pr as I cannot test the mac builds |
The arduino-builder download contains a file But ctags is also missing then. I built it myself and included it as several package, so people who exclude arduino-builder should be also aware that ctags is missing. I also do not understand why ctags is packaged with arduino-builder and not as separate download. |
@NicoHood
can you rebase this PR on top of master so we can continue discussion on the other points? |
…no-builder" This reverts commit 4f41384.
@cmaglie Thanks a lot! I rebased my PR. And I've also removed the platform.txt again. A user pointed me to the information that it needs to be packaged with arduino-builder instead. It would be good if those 2 file would be inside the arduino-builder github repository though. Dont know where they are currently coming from in the zip download. So left in my pr is the arduino-builder, hardware and libraries exclusion. I also want to exclude liblistserial and libastyle so that every dependency is built from source for arduino on archlinux. This makes it simpler and safer for us to link against shared libraries at build time. It would be nice if you can link against those binaries in a simpler way. I am also not sure if it will work to replace those liblistserial etc because of the shared libraries used. |
mmh not exactly, you merged the master branch in your PR, but this leaves a lot of useless history (various upstream merge, reverts, and the commits that I have already cherry picked duplicated in your branch). I suggest to experiment with interactive rebase if you didn't already: https://www.atlassian.com/git/tutorials/rewriting-history/git-rebase once rebased you can force push your branch and get a clean history with only the meaningful commits. |
Those file are here: |
<param name="final_folder" value="${staging_folder}/arduino-builder-${platform}/arduino-builder" /> | ||
<param name="dest_folder" value="${staging_folder}/arduino-builder-${platform}" /> | ||
</antcall> | ||
<copy file="${staging_folder}/arduino-builder-${platform}/arduino-builder" tofile="linux/work/arduino-builder" /> |
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.
This is wrong because the file is always copied into tofile="linux/work/arduino-builder"
while it should be something like ${staging_folder}/work/arduino-builder
. BTW this is still not correct for macosx, probably the best way is to use ${staging_folder}/work/${staging_hardware_folder}/../arduino-builder
for everything.
<delete dir="${staging_folder}/arduino-builder-${platform}" includeemptydirs="true"/> | ||
<mkdir dir="${staging_folder}/arduino-builder-${platform}"/> | ||
<antcall target="untar"> | ||
<param name="archive_file" value="./arduino-builder-${platform}-${ARDUINO-BUILDER-VERSION}.tar.bz2" /> |
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.
For linuxarm the filename is arduino-builder-linuxarm-1.3.23.tar.bz2
, but the file is actually called arduino-builder-arm-1.3.23.tar.bz2
. I'm going to copy arduino-builder-arm-1.3.23.tar.bz2
to arduino-builder-linuxarm-1.3.23.tar.bz2
on the download server (and change the build script on jenkins to output the archive with linuxarm
for the new releases).
This allows also conditional build of arduino-builder. See arduino#5438
Superseded by #5778 |
This allows also conditional build of arduino-builder. See #5438
This PR fixes several build bugs or adds missing features that are essential when packaging arduino for a linux distribution. More details can be found here #5379 (comment) and here #5437
The edits are small, please look at the separate commits.
The build can be called like this as an example with all new features: