Salamek / gitlab-tools

Web application providing tools not avaiable in GitLab CE (Gitlab push/pull mirror and more)
GNU General Public License v3.0
99 stars 15 forks source link

Gitlab Tools on Fresh Ubuntu Jammy 22.04 #46

Closed preussal closed 8 months ago

preussal commented 9 months ago

I installed a new Gitlab with Ubuntu 22.04 Jammy, and when installing Gitlab tools I noticed that the python3-flask package was not available in the required version.

And in the end there are too many Python packages that are not compatible and require a downgrade. so it must be an Ubuntu Focal 20.04 after all.

Here is my attempt to resolve the dependencies.

Try to install Gitlab-Tool

apt-get install gitlab-tools

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 gitlab-tools : Depends: python3-flask (< 1.2) but 2.0.1-2ubuntu1.1 is to be installed
E: Unable to correct problems, you have held broken packages.

Check Version of python3-flask

apt-cache policy python3-flask

python3-flask:
  Installed: (none)
  Candidate: 2.0.1-2ubuntu1.1
  Version table:
     2.0.1-2ubuntu1.1 500
        500 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages
        500 http://archive.ubuntu.com/ubuntu jammy-security/main amd64 Packages
     2.0.1-2ubuntu1 500
        500 http://archive.ubuntu.com/ubuntu jammy/main amd64 Packages

Check Version of gitlab-tools

apt-cache policy gitlab-tools

gitlab-tools:
  Installed: (none)
  Candidate: 1.4.7-1
  Version table:
     1.4.7-1 500
        500 https://repository.salamek.cz/deb/pub all/main amd64 Packages

Download vom PPA https://answers.launchpad.net/ubuntu/jammy/amd64/python3-flask/1.1.2-2

Install python3-flask via dpkg to get dependency

wget http://launchpadlibrarian.net/504048010/python3-flask_1.1.2-2_all.deb

dpkg -i python3-flask_1.1.2-2_all.deb

Selecting previously unselected package python3-flask.
(Reading database ... 110161 files and directories currently installed.)
Preparing to unpack python3-flask_1.1.2-2_all.deb ...
Unpacking python3-flask (1.1.2-2) ...
dpkg: dependency problems prevent configuration of python3-flask:
 python3-flask depends on python3-click (>= 5.1); however:
  Package python3-click is not installed.
 python3-flask depends on python3-itsdangerous (>= 0.24); however:
  Package python3-itsdangerous is not installed.
 python3-flask depends on python3-jinja2 (>= 2.10); however:
  Package python3-jinja2 is not installed.
 python3-flask depends on python3-werkzeug (>= 0.15); however:
  Package python3-werkzeug is not installed.

dpkg: error processing package python3-flask (--install):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 python3-flask

Install dependency and python3-flask

apt-get install  -f

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
  javascript-common libjs-jquery python-babel-localedata python3-babel python3-cffi-backend python3-click python3-colorama python3-cryptography
  python3-itsdangerous python3-jinja2 python3-markupsafe python3-openssl python3-pyinotify python3-simplejson python3-six python3-tz python3-werkzeug
Suggested packages:
  apache2 | lighttpd | httpd python-cryptography-doc python3-cryptography-vectors python-jinja2-doc python-openssl-doc python3-openssl-dbg python-pyinotify-doc
  ipython3 python-werkzeug-doc python3-lxml python3-watchdog
The following NEW packages will be installed:
  javascript-common libjs-jquery python-babel-localedata python3-babel python3-cffi-backend python3-click python3-colorama python3-cryptography
  python3-itsdangerous python3-jinja2 python3-markupsafe python3-openssl python3-pyinotify python3-simplejson python3-six python3-tz python3-werkzeug
0 upgraded, 17 newly installed, 0 to remove and 1 not upgraded.
1 not fully installed or removed.
Need to get 0 B/6294 kB of archives.
After this operation, 32.9 MB of additional disk space will be used.

Set on Hold

apt-mark hold python3-flask

python3-flask set on hold.

Install Gitlab-tools

apt-get install gitlab-tools

Reading package lists... Done
Building dependency tree... Done

Reading state information... Done
The following additional packages will be installed:
  alembic erlang-asn1 erlang-base erlang-crypto erlang-eldap erlang-ftp erlang-inets erlang-mnesia erlang-os-mon erlang-parsetools erlang-public-key
  erlang-runtime-tools erlang-snmp erlang-ssl erlang-syntax-tools erlang-tftp erlang-tools erlang-xmerl git git-man libatomic1 libcurl3-gnutls liberror-perl
  libjemalloc2 libjs-sphinxdoc libjs-underscore liblua5.1-0 liblzf1 libpq5 libsctp1 libsodium23 lua-bitop lua-cjson patch python3-alembic python3-amqp
  python3-anyjson python3-bcrypt python3-billiard python3-blinker python3-celery python3-certifi python3-chardet python3-click-didyoumean python3-click-plugins
  python3-click-repl python3-cron-descriptor python3-dateutil python3-docopt python3-ephem python3-flask-babel python3-flask-celery-tools python3-flask-login
  python3-flask-migrate python3-flask-sqlalchemy python3-git python3-gitdb python3-gitlab python3-greenlet python3-idna python3-kombu python3-mako
  python3-memcache python3-nacl python3-paramiko python3-prompt-toolkit python3-psycopg2 python3-pycryptodome python3-pygments python3-pyparsing python3-raven
  python3-redis python3-requests python3-requests-toolbelt python3-smmap python3-sqlalchemy python3-sqlalchemy-ext python3-urllib3 python3-vine python3-wcwidth
  python3-wtforms rabbitmq-server redis-server redis-tools socat
Suggested packages:
  erlang erlang-manpages erlang-doc git-daemon-run | git-daemon-sysvinit git-doc git-email git-gui gitk gitweb git-cvs git-mediawiki git-svn lksctp-tools
  diffutils-doc python-amqp-doc python-billiard-doc python-blinker-doc python-celery-doc python-flask-babel-doc python-flask-login-doc python-git-doc
  python-gitlab-doc python-greenlet-dev python-greenlet-doc python-kombu-doc python3-boto python3-django python3-pymongo python3-beaker python-mako-doc memcached
  python-nacl-doc python3-gssapi python3-invoke python-psycopg2-doc python-pygments-doc ttf-bitstream-vera python-pyparsing-doc python3-hiredis python3-socks
  python-requests-doc python3-nose python-sqlalchemy-doc python3-fdb python3-pymssql python3-mysqldb python3-asyncpg python3-aiosqlite python3-django-localflavor
  ruby-redis
The following NEW packages will be installed:
  alembic erlang-asn1 erlang-base erlang-crypto erlang-eldap erlang-ftp erlang-inets erlang-mnesia erlang-os-mon erlang-parsetools erlang-public-key
  erlang-runtime-tools erlang-snmp erlang-ssl erlang-syntax-tools erlang-tftp erlang-tools erlang-xmerl git git-man gitlab-tools libatomic1 libcurl3-gnutls
  liberror-perl libjemalloc2 libjs-sphinxdoc libjs-underscore liblua5.1-0 liblzf1 libpq5 libsctp1 libsodium23 lua-bitop lua-cjson patch python3-alembic
  python3-amqp python3-anyjson python3-bcrypt python3-billiard python3-blinker python3-celery python3-certifi python3-chardet python3-click-didyoumean
  python3-click-plugins python3-click-repl python3-cron-descriptor python3-dateutil python3-docopt python3-ephem python3-flask-babel python3-flask-celery-tools
  python3-flask-login python3-flask-migrate python3-flask-sqlalchemy python3-git python3-gitdb python3-gitlab python3-greenlet python3-idna python3-kombu
  python3-mako python3-memcache python3-nacl python3-paramiko python3-prompt-toolkit python3-psycopg2 python3-pycryptodome python3-pygments python3-pyparsing
  python3-raven python3-redis python3-requests python3-requests-toolbelt python3-smmap python3-sqlalchemy python3-sqlalchemy-ext python3-urllib3 python3-vine
  python3-wcwidth python3-wtforms rabbitmq-server redis-server redis-tools socat
0 upgraded, 86 newly installed, 0 to remove and 1 not upgraded.
Need to get 50.0 MB/50.0 MB of archives.
After this operation, 127 MB of additional disk space will be used.

On this Point you need to add a ubuntu Focal Mirror and Downgrade some Packages

apt-get install -t focal python3-flask-babel=0.11.2-3 python3-flask-login=0.4.1-3 python3-flask-migrate=2.5.2-1 python3-flask-sqlalchemy=2.1-4 python3-itsdangerous=1.1.0-1 python3-werkzeug=0.16.1+dfsg1-2ubuntu0.1
apt-mark hold python3-flask-babel python3-flask-login python3-flask-migrate python3-flask-sqlalchemy python3-itsdangerous python3-werkzeug

but no luck here either because of Python 3.7 vs 3.10

Salamek commented 9 months ago

Hmm deps needs to be updated, will do ASAP

preussal commented 9 months ago

Thanks, but first of all, Merry Christmas. I did an Ubuntu Focal installation. I just had to install the package.

wget http://launchpadlibrarian.net/504048010/python3-flask_1.1.2-2_all.deb
dpkg -i python3-flask_1.1.2-2_all.deb

then everything worked

Salamek commented 9 months ago

Ok i have updated dependencies to match what is available in Debian 12 (I always try to target Debian stable deps for my apts)

Salamek commented 9 months ago

Aaand i have loosened dep requirements to hopefully match packages provided in Ubuntu 22.04