Skip to content

Adjust for FreeCAD v1 release #6

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

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

jaecktec
Copy link

linuxserver.io


  • I have read the contributing guideline and understand that I have made the correct modifications

Description:

Adjusted Dockerfile according to suggestions to support Freecad 1.0 with AppImage

Benefits of this PR and context:

Freecad 1.0

How Has This Been Tested?

I've build this on an M2 Macbook + X86 Linux machine and ran them

Source / References:

#4

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Thanks for opening this pull request! Be sure to follow the pull request template!

@LinuxServer-CI
Copy link
Collaborator

I am a bot, here are the test results for this PR:
https://ci-tests.linuxserver.io/lspipepr/freecad/0.20.2-pkg-294e4617-dev-8a297560bc4c93bd93d9466ed286a4ac7347922c-pr-6/index.html
https://ci-tests.linuxserver.io/lspipepr/freecad/0.20.2-pkg-294e4617-dev-8a297560bc4c93bd93d9466ed286a4ac7347922c-pr-6/shellcheck-result.xml

Tag Passed
amd64-0.20.2-pkg-294e4617-dev-8a297560bc4c93bd93d9466ed286a4ac7347922c-pr-6
arm64v8-0.20.2-pkg-294e4617-dev-8a297560bc4c93bd93d9466ed286a4ac7347922c-pr-6

@LinuxServer-CI
Copy link
Collaborator

I am a bot, here are the test results for this PR:
https://ci-tests.linuxserver.io/lspipepr/freecad/0.20.2-pkg-294e4617-dev-e4c72d1ab9cbf8d0e183d5f3b593d8c5c1028536-pr-6/index.html
https://ci-tests.linuxserver.io/lspipepr/freecad/0.20.2-pkg-294e4617-dev-e4c72d1ab9cbf8d0e183d5f3b593d8c5c1028536-pr-6/shellcheck-result.xml

Tag Passed
amd64-0.20.2-pkg-294e4617-dev-e4c72d1ab9cbf8d0e183d5f3b593d8c5c1028536-pr-6
arm64v8-0.20.2-pkg-294e4617-dev-e4c72d1ab9cbf8d0e183d5f3b593d8c5c1028536-pr-6

@LinuxServer-CI
Copy link
Collaborator

I am a bot, here are the test results for this PR:
https://ci-tests.linuxserver.io/lspipepr/freecad/0.20.2-pkg-294e4617-dev-724167f123d2d2131a06d829c387ddc64b30eacd-pr-6/index.html
https://ci-tests.linuxserver.io/lspipepr/freecad/0.20.2-pkg-294e4617-dev-724167f123d2d2131a06d829c387ddc64b30eacd-pr-6/shellcheck-result.xml

Tag Passed
amd64-0.20.2-pkg-294e4617-dev-724167f123d2d2131a06d829c387ddc64b30eacd-pr-6
arm64v8-0.20.2-pkg-294e4617-dev-724167f123d2d2131a06d829c387ddc64b30eacd-pr-6

@LinuxServer-CI
Copy link
Collaborator

I am a bot, here are the test results for this PR:
https://ci-tests.linuxserver.io/lspipepr/freecad/0.20.2-pkg-447045da-dev-8aa08eeaaf46460b0e7379f26be62a904318bd77-pr-6/index.html
https://ci-tests.linuxserver.io/lspipepr/freecad/0.20.2-pkg-447045da-dev-8aa08eeaaf46460b0e7379f26be62a904318bd77-pr-6/shellcheck-result.xml

Tag Passed
amd64-0.20.2-pkg-447045da-dev-8aa08eeaaf46460b0e7379f26be62a904318bd77-pr-6
arm64v8-0.20.2-pkg-447045da-dev-8aa08eeaaf46460b0e7379f26be62a904318bd77-pr-6

@baxerus baxerus mentioned this pull request Apr 4, 2025
1 task
@LinuxServer-CI
Copy link
Collaborator

I am a bot, here are the test results for this PR:
https://ci-tests.linuxserver.io/lspipepr/freecad/0.20.2-pkg-d3ceb5ed-dev-6b6dea80990329390f243fb52c32d295447e2cf7-pr-6/index.html
https://ci-tests.linuxserver.io/lspipepr/freecad/0.20.2-pkg-d3ceb5ed-dev-6b6dea80990329390f243fb52c32d295447e2cf7-pr-6/shellcheck-result.xml

Tag Passed
amd64-0.20.2-pkg-d3ceb5ed-dev-6b6dea80990329390f243fb52c32d295447e2cf7-pr-6
arm64v8-0.20.2-pkg-d3ceb5ed-dev-6b6dea80990329390f243fb52c32d295447e2cf7-pr-6

@tinuva
Copy link

tinuva commented Apr 18, 2025

Screenshot 2025-04-18 at 10 44 15 AM

Can confirm, building these changes works for me on x86-64 architecture.

Copy link
Member

@Roxedus Roxedus left a comment

Choose a reason for hiding this comment

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

Changing the location we ingest a application from does also need a chance in jenkins-vars, as well as a changelog entry.

Dockerfile Outdated
echo " install freecad from appimage " && \
freecad_version="1.0.0" && \
cd /tmp && \
curl -o /tmp/freecad.app -L https://github.com/FreeCAD/FreeCAD/releases/download/1.0.0/FreeCAD_1.0.0-conda-Linux-x86_64-py311.AppImage && \
Copy link
Member

Choose a reason for hiding this comment

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

We are not going to accept a hard coded version number.

Copy link
Author

Choose a reason for hiding this comment

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

replaced with environment variable

@tinuva
Copy link

tinuva commented Apr 30, 2025

Question, maybe suggestion, but would using the "continous" version be accepted?

Instead of using:

https://github.com/FreeCAD/FreeCAD/releases/download/1.0.0/FreeCAD_1.0.0-conda-Linux-x86_64-py311.AppImage

Use:

FREECAD_VERSION=$(curl -sX GET "https://api.github.com/repos/FreeCAD/FreeCAD/releases/latest" | awk '/tag_name/{print $4;exit}' FS='[""]'); 

curl -o /tmp/freecad.app -L "https://github.com/FreeCAD/FreeCAD/releases/download/${FREECAD_VERSION}/FreeCAD_$(echo ${FREECAD_VERSION} | sed 's/\b\(.\)/\u\1/g')-conda-Linux-x86_64-py311.AppImage" 

Though perhaps, the cleanest way is to use jq if available during docker image creation:

FREECAD_URL=$(curl -sX GET "https://api.github.com/repos/FreeCAD/FreeCAD/releases/latest" | jq '.assets[] | select(.name | contains("Linux") and contains("x86_64")) | select(.name | contains("SHA256") | not) | .browser_download_url');

curl -o /tmp/freecad.app -L FREECAD_URL

@LinuxServer-CI
Copy link
Collaborator

I am a bot, here are the test results for this PR:
https://ci-tests.linuxserver.io/lspipepr/freecad/0.20.2-pkg-f8b6d483-dev-3f998633f17a1048d6fce528cfee59d6327e87c2-pr-6/index.html
https://ci-tests.linuxserver.io/lspipepr/freecad/0.20.2-pkg-f8b6d483-dev-3f998633f17a1048d6fce528cfee59d6327e87c2-pr-6/shellcheck-result.xml

Tag Passed
amd64-0.20.2-pkg-f8b6d483-dev-3f998633f17a1048d6fce528cfee59d6327e87c2-pr-6
arm64v8-0.20.2-pkg-f8b6d483-dev-3f998633f17a1048d6fce528cfee59d6327e87c2-pr-6

@AceDenghar
Copy link

Hi,

Thanks for your efforts.

Any chance to be available in the official docker image ?

Still stucked in 0.20, and I have some projects started in 1.0...

Thanks for all

Ps : sorry for my English

@jaecktec
Copy link
Author

jaecktec commented May 20, 2025

Though perhaps, the cleanest way is to use jq if available during docker image creation:

While in genereal I like the idea, I'd prefer to have a idemporent behaviour.
Something like this would probably be better off on the pipeline side of things :)

@jaecktec
Copy link
Author

Where do I adjust the environment variable in Jenkins?

@jaecktec jaecktec requested a review from Roxedus May 26, 2025 11:30
@LinuxServer-CI LinuxServer-CI moved this from PRs to PRs Ready For Team Review in Issue & PR Tracker May 26, 2025
@Roxedus
Copy link
Member

Roxedus commented May 26, 2025

you dont

@stefgia
Copy link

stefgia commented May 27, 2025

The merge build is failing because FREECAD_VERSION is set as "0.20.2" and there is no app image at the corresponding gitub address https://github.com/FreeCAD/FreeCAD/releases/download/${FREECAD_VERSION}/FreeCAD_${FREECAD_VERSION}-conda-Linux-x86_64-py311.AppImage

I looked around the repository to see where this env var is set, but I couldn't find anything, except usages of it, which I guess means that the version is set through jenkins somehow and not through the files. So I guess unless the version env var is bumped this can't work.

Also since we will now be using the appimage, maybe we should delete the following packages from the package-versions.txt ?

freecad, 0.20.2+dfsg1-4, deb freecad-common, 0.20.2+dfsg1-4, deb freecad-python3, 0.20.2+dfsg1-4, deb

@thespad
Copy link
Member

thespad commented May 27, 2025

There isn't anything you can do as a 3rd party to get Jenkins to build using your version logic, because we specifically prevent it for security reasons.

This https://github.com/linuxserver/docker-freecad/blob/master/jenkins-vars.yml#L5-L6 needs changing, probably to something like https://github.com/linuxserver/docker-webcord/blob/master/jenkins-vars.yml#L5-L13 as this uses the GH release and the Dockerfiles themselves need something like https://github.com/linuxserver/docker-webcord/blob/master/Dockerfile#L19-L23 to fetch the latest version for scenarios where it's not passed into the build process.

Finally the readme-vars will need a new changelog entry to document the change of install process.

package_versions.txt is an output not an input so does not need to be touched.

@tinuva
Copy link

tinuva commented May 27, 2025

The merge build is failing because FREECAD_VERSION is set as "0.20.2" and there is no app image at the corresponding gitub address https://github.com/FreeCAD/FreeCAD/releases/download/${FREECAD_VERSION}/FreeCAD_${FREECAD_VERSION}-conda-Linux-x86_64-py311.AppImage

I looked around the repository to see where this env var is set, but I couldn't find anything, except usages of it, which I guess means that the version is set through jenkins somehow and not through the files. So I guess unless the version env var is bumped this can't work.

Also since we will now be using the appimage, maybe we should delete the following packages from the package-versions.txt ?

freecad, 0.20.2+dfsg1-4, deb freecad-common, 0.20.2+dfsg1-4, deb freecad-python3, 0.20.2+dfsg1-4, deb

If you look at pr #7 then you will see. That was my attempt at a better approach to switch yogithub.

Jenkins currently uses a apt command to see existing version available in the repository of the Linux distribution.

I that pr I attempted to switch jenkins to use a github api lookup to get the latest version.

I asked on discourse why the jenkins build fail for my pr. @Roxedus

@tinuva
Copy link

tinuva commented May 27, 2025

The merge build is failing because FREECAD_VERSION is set as "0.20.2" and there is no app image at the corresponding gitub address https://github.com/FreeCAD/FreeCAD/releases/download/${FREECAD_VERSION}/FreeCAD_${FREECAD_VERSION}-conda-Linux-x86_64-py311.AppImage

I looked around the repository to see where this env var is set, but I couldn't find anything, except usages of it, which I guess means that the version is set through jenkins somehow and not through the files. So I guess unless the version env var is bumped this can't work.

Also since we will now be using the appimage, maybe we should delete the following packages from the package-versions.txt ?

freecad, 0.20.2+dfsg1-4, deb freecad-common, 0.20.2+dfsg1-4, deb freecad-python3, 0.20.2+dfsg1-4, deb

Have a look at pr #7 which is my attemot to switch to github releases.

Currently jenkins is configured to look up latest version from the apt repo.

I tried to switch to the github api for relates version lookup, but jenkins still run the old config files from the existing repo before the pr, even for pr builds. This is what @Roxedus explained to me discourse.

I am however in hospital so can't take up that conversation further.

But somehow, a pr will have to be accepted to get an updated jenkins config into the main branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: PRs Ready For Team Review
Development

Successfully merging this pull request may close these issues.

7 participants