Unverified Commit 595035eb authored by Maciej Krüger's avatar Maciej Krüger Committed by GitHub
Browse files

[Backport release-25.11] odoo16: drop (#465267)

parents 1e8b9592 bbe492f1
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -266,6 +266,8 @@

- The main binary of `tomlq` has been renamed from `tomlq` to `tq`.

- `odoo16` has been dropped due to end of support by upstream, consider upgrading supported version.

- `opensoldat` binaries and user configuration directory names have been prefixed by 'open', becoming opensoldat and opensoldatserver. Configuration will be moved automatically before launch when possible.

- `emacs-macport` has been moved to a fork of Mitsuharu Yamamoto's patched source code starting with Emacs v30 as the original project seems to be currently dormant. All older versions of this package have been dropped.
+0 −22
Original line number Diff line number Diff line
diff --git a/odoo/http.py b/odoo/http.py
index f26dd52db235c..9689fc894b2b1 100644
--- a/odoo/http.py
+++ b/odoo/http.py
@@ -117,6 +117,7 @@
 import glob
 import hashlib
 import hmac
+import importlib.metadata
 import inspect
 import json
 import logging
@@ -256,7 +257,7 @@ def get_default_session():
     'alias', 'host', 'methods',
 }
 
-if parse_version(werkzeug.__version__) >= parse_version('2.0.2'):
+if parse_version(importlib.metadata.version('werkzeug')) >= parse_version('2.0.2'):
     # Werkzeug 2.0.2 adds the websocket option. If a websocket request
     # (ws/wss) is trying to access an HTTP route, a WebsocketMismatch
     # exception is raised. On the other hand, Werkzeug 0.16 does not
+0 −105
Original line number Diff line number Diff line
{
  lib,
  fetchzip,
  python311,
  rtlcss,
  wkhtmltopdf,
  nixosTests,
}:

let
  odoo_version = "16.0";
  odoo_release = "20250506";
  python = python311.override {
    self = python;
  };
in
python.pkgs.buildPythonApplication rec {
  pname = "odoo";
  version = "${odoo_version}.${odoo_release}";

  format = "setuptools";

  # latest release is at https://github.com/odoo/docker/blob/master/16.0/Dockerfile
  src = fetchzip {
    url = "https://nightly.odoo.com/${odoo_version}/nightly/src/odoo_${version}.zip";
    name = "odoo-${version}";
    hash = "sha256-dBqRZ3cf4/udP9hm+u9zhuUCkH176uG2NPAy5sujyNc="; # odoo
  };

  patches = [ ./fix-test.patch ];

  makeWrapperArgs = [
    "--prefix"
    "PATH"
    ":"
    "${lib.makeBinPath [
      wkhtmltopdf
      rtlcss
    ]}"
  ];

  propagatedBuildInputs = with python.pkgs; [
    babel
    chardet
    cryptography
    decorator
    docutils
    ebaysdk
    freezegun
    gevent
    greenlet
    idna
    jinja2
    libsass
    lxml
    lxml-html-clean
    markupsafe
    num2words
    ofxparse
    passlib
    pillow
    polib
    psutil
    psycopg2
    pydot
    pyopenssl
    pypdf2
    pyserial
    python-dateutil
    python-ldap
    python-stdnum
    pytz
    pyusb
    qrcode
    reportlab
    requests
    urllib3
    vobject
    werkzeug
    xlrd
    xlsxwriter
    xlwt
    zeep

    setuptools
    mock
  ];

  # takes 5+ minutes and there are not files to strip
  dontStrip = true;

  passthru = {
    updateScript = ./update.sh;
    tests = {
      inherit (nixosTests) odoo16;
    };
  };

  meta = {
    description = "Open Source ERP and CRM";
    homepage = "https://www.odoo.com/";
    license = lib.licenses.lgpl3Only;
    maintainers = with lib.maintainers; [ mkg20001 ];
  };
}

pkgs/by-name/od/odoo16/update.sh

deleted100755 → 0
+0 −32
Original line number Diff line number Diff line
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl gnused nix coreutils nix-prefetch
# shellcheck shell=bash

set -euo pipefail

SCRIPT_DIR="$(dirname "${BASH_SOURCE[0]}")"
PKG=$(basename "$SCRIPT_DIR")

LATEST="18" # increment manually
VERSION="${PKG/#odoo}"
VERSION="${VERSION:-$LATEST}.0"

RELEASE="$(
    curl "https://nightly.odoo.com/$VERSION/nightly/src/" |
        sed -nE 's/.*odoo_'"$VERSION"'.(20[0-9]{6}).tar.gz.*/\1/p' |
        tail -n 1
)"

latestVersion="$VERSION.$RELEASE"
currentVersion=$(nix-instantiate --eval -E "with import ./. {}; $PKG.version or (lib.getVersion $PKG)" | tr -d '"')

if [[ "$currentVersion" == "$latestVersion" ]]; then
    echo "$PKG is up-to-date: $currentVersion"
    exit 0
fi

cd "$SCRIPT_DIR"

sed -ri "s| hash.+ # odoo| hash = \"$(nix-prefetch -q fetchzip --option extra-experimental-features flakes --url "https://nightly.odoo.com/${VERSION}/nightly/src/odoo_${latestVersion}.zip")\"; # odoo|g" package.nix
sed -ri "s|odoo_version = .+|odoo_version = \"$VERSION\";|" package.nix
sed -ri "s|odoo_release = .+|odoo_release = \"$RELEASE\";|" package.nix