Comments (6)
@Hooverdan96 Re:
will this issue be "reshaped" or even be closed because some of the cross-functional impact (posttrans & build.sh) is not valid anymore?
That was the aim of the issue you linked to actually. I found we had ended up in a tight corner with this installer failure and so set about digging us out re the re-do concerning the new rockstor-build.service. I've not re-tested yet as easiest once we have our next testing rpm. But just wanted to get that samba fix in first, then I'll have a re-test here.
But this does mean our installer needs internet access on first boot to build the .venv !! But that I think is just going to have to be the case anyway. We can add this info to the downloads page when it's next updated.
[EDIT] I'd intended to update this issue once the next testing was out and we have a confirmation either way that the changes fixed this installer issue. I think it will though.
from rockstor-installer.
A new installer was build using the Tumbleweed.x86_64 profile and upon installer boot, and JeOS first boot completion, we have a successful rockstor-build.service execution (build.sh):
With all services starting as expected on the subsequent reboot:
Note in the above subsequent reboot screen shot, the unmet condition for rockstor-build.service is that the .venv dir already exists: having been created during installer JeOS first boot config.
Closing as:
Fixed by rockstor-core PR: rockstor/rockstor-core#2795
And partnered rockstor-rpmbuild PR: rockstor/rockstor-rpmbuild#63
from rockstor-installer.
installer:/opt/rockstor # poetry env list
.venv (Activated)
installer:/opt/rockstor # poetry env info
Virtualenv
Python: 3.11.5
Implementation: CPython
Path: /opt/rockstor/.venv
Executable: /opt/rockstor/.venv/bin/python
Valid: True
System
Platform: linux
OS: posix
Python: 3.11.5
Path: /usr
Executable: /usr/bin/python3.11
installer:/opt/rockstor # ls -la /opt/rockstor/.venv/bin/python
lrwxrwxrwx 1 root root 19 Jan 18 12:28 /opt/rockstor/.venv/bin/python -> /usr/bin/python3.11
from rockstor-installer.
During rpmbuild in %build scriptlet we install Poetry and use it's poetry build --format sdist
packaging capability. We also by default run %check which also employs this same Poetry install. But these both only concerns the build host. We do not otherwise install Poetry directly from within the rpmbuild scriptlets except via build.sh - invoked only within the %posttrans scriptlet.
So we arrive at build.sh (rockstor-core) from rockstor.spec %posttrans (after %install scriptlet has instantiated build.sh) via:
PATH="/usr/local/bin:$PATH"
export LANG=C.UTF-8
cd %{prefix}/%{name}
./build.sh
And fail in build.sh at the last line in the following section:
# Install Poetry, a dependency management, packaging, and build system.
# Uninstall legacy/transitional Poetry version of 1.1.15
if which poetry && poetry --version | grep -q "1.1.15"; then
echo "Poetry version 1.1.15 found - UNINSTALLING"
curl -sSL https://install.python-poetry.org | python3 - --uninstall
fi
# Install Poetry via PIPX as a global app
# https://peps.python.org/pep-0668/#guide-users-towards-virtual-environments
export PIPX_HOME=/opt/pipx # virtual environment location, default ~/.local/pipx
export PIPX_BIN_DIR=/usr/local/bin # binary location for pipx-installed apps, default ~/.local/bin
python3.11 -m pipx install poetry==1.7.1
# Install project dependencies defined in cwd pyproject.toml using poetry.toml
# specific configuration, i.e. virtualenv in cwd/.venv
# /opt/rockstor/.venv
# poetry env remove --all # removes all venvs associated with a pyproject.toml
# rm -rf ~/.cache/pypoetry/virtualenvs/* # to delete default location venvs.
# ** --no-ansi avoids special characters **
# Resolve Python 3.6 Poetry issue re char \u2022: (bullet)
# https://github.com/python-poetry/poetry/issues/3078
export LANG=C.UTF-8
export PYTHONIOENCODING=utf8
/usr/local/bin/poetry install --no-interaction --no-ansi > poetry-install.txt 2>&1
Where we are successfully pre-located, pwd wise, via the rockstor.spec cd %{prefix}/%{name}
to the correct location for the actual install /opt/rockstor. But the pipx installed instance of Poetry returns:
installer:~ # cat /opt/rockstor/poetry-install.txt
[Errno 2] No such file or directory: 'python'
from rockstor-installer.
From the synopsis in the last comment we can see our %posttrans altered PATH env via the which
output to check for an existing Poetry, and for its version if found: in order that we might remove older version and install our preferred one.
[ DEBUG ]: 09:32:03 | system: which: no poetry in (/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin)
We may just have insufficient activation of PATH (for pipx and consequently poetry) at this point.
i.e. on a resulting install we have:
installer:~ # which poetry
/usr/local/bin/poetry
installer:~ # ls -la /usr/local/bin/poetry
lrwxrwxrwx 1 root root 33 Jan 18 09:16 /usr/local/bin/poetry -> /opt/pipx/venvs/poetry/bin/poetry
installer:~ # ls -la /opt/pipx/venvs/poetry/bin/
total 76
drwxr-xr-x 1 root root 344 Jan 18 09:16 .
drwxr-xr-x 1 root root 92 Jan 18 09:16 ..
-rw-r--r-- 1 root root 1993 Jan 18 09:16 activate
-rw-r--r-- 1 root root 919 Jan 18 09:16 activate.csh
-rw-r--r-- 1 root root 2199 Jan 18 09:16 activate.fish
-rw-r--r-- 1 root root 9033 Jan 18 09:16 Activate.ps1
-rwxr-xr-x 1 root root 233 Jan 18 09:16 doesitcache
-rwxr-xr-x 1 root root 1217 Jan 18 09:16 dul-receive-pack
-rwxr-xr-x 1 root root 1213 Jan 18 09:16 dul-upload-pack
-rwxr-xr-x 1 root root 227 Jan 18 09:16 dulwich
-rwxr-xr-x 1 root root 227 Jan 18 09:16 keyring
-rwxr-xr-x 1 root root 250 Jan 18 09:16 normalizer
-rwxr-xr-x 1 root root 235 Jan 18 09:16 pkginfo
-rwxr-xr-x 1 root root 242 Jan 18 09:16 poetry
-rwxr-xr-x 1 root root 242 Jan 18 09:16 pyproject-build
lrwxrwxrwx 1 root root 10 Jan 18 09:16 python -> python3.11
lrwxrwxrwx 1 root root 10 Jan 18 09:16 python3 -> python3.11
lrwxrwxrwx 1 root root 19 Jan 18 09:16 python3.11 -> /usr/bin/python3.11
-rwxr-xr-x 1 root root 255 Jan 18 09:16 virtualenv
Where our poetry
invocation script has the following content:
installer:~ # cat /opt/pipx/venvs/poetry/bin/poetry
#!/opt/pipx/venvs/poetry/bin/python
# -*- coding: utf-8 -*-
import re
import sys
from poetry.console.application import main
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
sys.exit(main())
from rockstor-installer.
@phillxnet. with
Move build.sh execution from %posttrans to rockstor-build.service #61 and
Add rockstor-build systemd service #2793
will this issue be "reshaped" or even be closed because some of the cross-functional impact (posttrans & build.sh) is not valid anymore?
from rockstor-installer.
Related Issues (20)
- Pre-install Tailscale HOT 11
- Raspberry Pi4 profile fails to build
- Add Leap 15.5 profiles HOT 10
- [warning] root subvolume is not explicitly defined HOT 2
- Ability to build full disk encryption with kiwi-ng HOT 5
- Consider the openSUSE-repos package HOT 4
- Tumbleweed build failures on all profiles HOT 7
- Tumbleweed: build.sh fails as no /etc/locale.conf HOT 2
- Remove Leap 15.4 profiles
- kiwi-ng version 10.0.2 requires <bootlader> definition to be subset to <type> tag HOT 5
- Inconsistency between README.md and website HOT 1
- Add Leap 15.6 profiles
- Update pre-installed testing rpm version to 5.0.9-0
- Update schema version
- Tailscale repo signature verification failed HOT 2
- Account for bls grub changes in upstream HOT 1
- remove now redundant in TW profile Virtualization OBS repo
- Failed to start SUSE JeOS First Boot Wizard - create system snapshot
- Failed to start Activation of DM RAID sets. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rockstor-installer.