diff --git a/build/arm/resolute/Dockerfile b/build/arm/resolute/Dockerfile new file mode 100644 index 00000000..b36681e2 --- /dev/null +++ b/build/arm/resolute/Dockerfile @@ -0,0 +1,11 @@ +FROM ubuntu:resolute +ADD stdeb.patch /tmp/ +ADD buildapt.sh /bin/ +ADD distributions.tmpl /bin/ +RUN ["apt-get", "update"] +RUN ["apt-get", "install", "-y", "reprepro", "python3-stdeb", "gnupg-agent", "devscripts", "debhelper", "libsoap-lite-perl", "libdbi-perl", "quilt", "git", "python3-pyparsing", "python3-dnspython", "python3-netifaces", "python3-asyncssh", "dh-python", "libjson-perl", "ronn", "alien", "gcc", "make"] +RUN ["mkdir", "-p", "/sources/git/"] +RUN ["mkdir", "-p", "/debs/"] +RUN ["mkdir", "-p", "/apt/"] +CMD ["/bin/bash", "/bin/buildapt.sh"] + diff --git a/build/arm/resolute/buildapt.sh b/build/arm/resolute/buildapt.sh new file mode 100644 index 00000000..600e832c --- /dev/null +++ b/build/arm/resolute/buildapt.sh @@ -0,0 +1,21 @@ +#cp -a /sources/git /tmp +for builder in $(find /sources/git -name builddeb); do + cd $(dirname $builder) + ./builddeb /debs/ +done +cp /prebuilt/* /debs/ +cp /osd/*.deb /debs/ +mkdir -p /apt/conf/ +CODENAME=$(grep VERSION_CODENAME= /etc/os-release | sed -e 's/.*=//') +if [ -z "$CODENAME" ]; then + CODENAME=$(grep VERSION= /etc/os-release | sed -e 's/.*(//' -e 's/).*//') +fi +if ! grep $CODENAME /apt/conf/distributions; then + sed -e s/#CODENAME#/$CODENAME/ /bin/distributions.tmpl >> /apt/conf/distributions +fi +cd /apt/ +reprepro includedeb $CODENAME /debs/*.deb +for dsc in /debs/*.dsc; do + reprepro includedsc $CODENAME $dsc +done + diff --git a/build/arm/resolute/distributions.tmpl b/build/arm/resolute/distributions.tmpl new file mode 100644 index 00000000..b2000a43 --- /dev/null +++ b/build/arm/resolute/distributions.tmpl @@ -0,0 +1,7 @@ +Origin: Lenovo HPC Packages +Label: Lenovo HPC Packages +Codename: #CODENAME# +Architectures: amd64 source +Components: main +Description: Lenovo HPC Packages + diff --git a/build/arm/resolute/stdeb.patch b/build/arm/resolute/stdeb.patch new file mode 100644 index 00000000..0eab2038 --- /dev/null +++ b/build/arm/resolute/stdeb.patch @@ -0,0 +1,34 @@ +diff -urN t/usr/lib/python3/dist-packages/stdeb/cli_runner.py t.patch/usr/lib/python3/dist-packages/stdeb/cli_runner.py +--- t/usr/lib/python3/dist-packages/stdeb/cli_runner.py 2024-06-11 18:30:13.930328999 +0000 ++++ t.patch/usr/lib/python3/dist-packages/stdeb/cli_runner.py 2024-06-11 18:32:05.392731405 +0000 +@@ -8,7 +8,7 @@ + from ConfigParser import SafeConfigParser # noqa: F401 + except ImportError: + # python 3.x +- from configparser import SafeConfigParser # noqa: F401 ++ from configparser import ConfigParser # noqa: F401 + from distutils.util import strtobool + from distutils.fancy_getopt import FancyGetopt, translate_longopt + from stdeb.util import stdeb_cmdline_opts, stdeb_cmd_bool_opts +diff -urN t/usr/lib/python3/dist-packages/stdeb/util.py t.patch/usr/lib/python3/dist-packages/stdeb/util.py +--- t/usr/lib/python3/dist-packages/stdeb/util.py 2024-06-11 18:32:53.864776149 +0000 ++++ t.patch/usr/lib/python3/dist-packages/stdeb/util.py 2024-06-11 18:33:02.063952870 +0000 +@@ -730,7 +730,7 @@ + example. + """ + +- cfg = ConfigParser.SafeConfigParser() ++ cfg = ConfigParser.ConfigParser() + cfg.read(cfg_files) + if cfg.has_section(module_name): + section_items = cfg.items(module_name) +@@ -801,7 +801,7 @@ + if len(cfg_files): + check_cfg_files(cfg_files, module_name) + +- cfg = ConfigParser.SafeConfigParser(cfg_defaults) ++ cfg = ConfigParser.ConfigParser(cfg_defaults) + for cfg_file in cfg_files: + with codecs.open(cfg_file, mode='r', encoding='utf-8') as fd: + cfg.readfp(fd) + diff --git a/confluent_server/builddeb b/confluent_server/builddeb index f4419b05..9791b7dc 100755 --- a/confluent_server/builddeb +++ b/confluent_server/builddeb @@ -35,18 +35,13 @@ py2dsc $DSCARGS dist/*.tar.gz shopt -s extglob cd deb_dist/!(*.orig)/ if [ "$OPKGNAME" = "confluent-server" ]; then - if grep wheezy /etc/os-release; then - sed -i 's/^\(Depends:.*\)/\1, python-confluent-client, python-lxml, python-eficompressor, python-pycryptodomex, python-dateutil, python-pyopenssl, python-msgpack/' debian/control - elif grep jammy /etc/os-release; then - sed -i 's/^\(Depends:.*\)/\1, confluent-client, python3-lxml, python3-eficompressor, python3-pycryptodome, python3-websocket, python3-msgpack, python3-aiohttp, python3-pyparsing, python3-pyghmi(>=1.5.71), python3-paramiko, python3-pysnmp4, python3-libarchive-c, confluent-vtbufferd, python3-netifaces, python3-yaml, python3-dateutil/' debian/control + if grep noble /etc/os-release; then + sed -i 's/^\(Depends:.*\)/\1, confluent-client, python3-lxml, python3-eficompressor, python3-pycryptodome, python3-websocket, python3-msgpack, python3-aiohttp, python3-pyparsing, python3-asyncssh, python3-pysnmp-lextudio, python3-libarchive-c, confluent-vtbufferd, python3-netifaces, python3-yaml, python3-dateutil, python3-asyncore/' debian/control else - sed -i 's/^\(Depends:.*\)/\1, confluent-client, python3-lxml, python3-eficompressor, python3-pycryptodome, python3-websocket, python3-msgpack, python3-aiohttp, python3-pyparsing, python3-pyghmi(>=1.5.71), python3-paramiko, python3-pysnmp4, python3-libarchive-c, confluent-vtbufferd, python3-netifaces, python3-yaml, python3-dateutil, python3-pyasyncore/' debian/control - fi - if grep wheezy /etc/os-release; then - echo 'confluent_client python-confluent-client' >> debian/pydist-overrides - else - echo 'confluent_client confluent-client' >> debian/pydist-overrides + sed -i 's/^\(Depends:.*\)/\1, confluent-client, python3-lxml, python3-eficompressor, python3-pycryptodome, python3-websocket, python3-msgpack, python3-aiohttp, python3-pyparsing, python3-asyncssh, python3-pysnmp4, python3-libarchive-c, confluent-vtbufferd, python3-netifaces, python3-yaml, python3-dateutil, python3-asyncore/' debian/control fi + echo 'confluent_client confluent-client' >> debian/pydist-overrides + fi if ! grep wheezy /etc/os-release; then sed -i 's/^Package: python3-/Package: /' debian/control