Skip to content
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

refactor(distrib): installers renaming and corrected metadata #5609

Merged
merged 17 commits into from
Dec 10, 2024

Conversation

marcellorinaldo
Copy link
Contributor

@marcellorinaldo marcellorinaldo commented Dec 6, 2024

This PR renames the installers by removing the generic prefix which is no more needed since we removed the specific profiles:

  • generic-arm32 -> armhf
  • generic-aarch64 -> aarch64
  • generic-x86_64 -> x86_64

In addition, this PR fixes the metadata information for the installers and does some other changes.

NN packages renaming

The installed package name for non-networking profiles is now kura-nn instead of kura.

Installer files renaming

Installation .deb files are renamed to follow the debian convention package_version_architecture.type [8] (supported architectures in [4]):

  • kura_6.0.0_generic-arm32_installer -> kura_6.0.0_armhf.deb
  • kura_6.0.0_generic-arm32-nn_installer -> kura-nn_6.0.0_armhf.deb
  • kura_6.0.0_generic-arm64_installer -> kura_6.0.0_arm64.deb
  • kura_6.0.0_generic-arm64-nn_installer -> kura-nn_6.0.0_arm64.deb
  • kura_6.0.0_generic-x86_64_installer -> kura_6.0.0_amd64.deb
  • kura_6.0.0_generic-x86_64-nn_installer -> kura-nn_6.0.0_amd64.deb

Changes to start scripts

The launch scripts have been modified to remove the check of the running JRE for inserting the add-opens launch optionss. We had this function to make the framework executable also on Java 8.

Changes to installers metadata

Debian metadata changes to:

  • Removed JRE 8 dependency
  • Section: misc -> Section: admin (Utilities to administer system resources, manage user accounts, etc. [1][2])
  • Corrected Priority from low to optional [3]
  • Corrected Architecture changing from all to the specific ones [4]
  • Description field changed to have the first line as synopsis [5]
  • Maintainer field changed to be compliant with format described in [6]
  • Added Homepage filed, since it was otherwise defaulted to something else [7]
Screenshot 2024-12-06 at 15 43 52

For testing purposes, you can show the package info after having installed kura with:

apt-cache show kura

References:

[1] https://www.debian.org/doc/debian-policy/ch-archive.html#s-subsections
[2] https://packages.debian.org/unstable/
[3] https://www.debian.org/doc/debian-policy/ch-archive.html#priorities
[4] https://wiki.debian.org/SupportedArchitectures
[5] https://www.debian.org/doc/debian-policy/ch-controlfields.html#description
[6] https://www.debian.org/doc/debian-policy/ch-controlfields.html#maintainer
[7] https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-homepage
[8] https://www.debian.org/doc/manuals/debian-faq/pkg-basics.en.html

@mattdibi

This comment was marked as outdated.

Copy link
Contributor

@mattdibi mattdibi left a comment

Choose a reason for hiding this comment

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

@marcellorinaldo Why did you rename generic-x86_64 -> x86_64. Shouldn't this be called amd64 given we agreed to follow debian architecture naming scheme? (see: https://wiki.debian.org/SupportedArchitectures)

Similarly aarch64 should be called arm64...

kura/distrib/pom.xml Outdated Show resolved Hide resolved
@mattdibi
Copy link
Contributor

mattdibi commented Dec 10, 2024

@marcellorinaldo Why did you rename generic-x86_64 -> x86_64. Shouldn't this be called amd64 given we agreed to follow debian architecture naming scheme? (see: https://wiki.debian.org/SupportedArchitectures)

Similarly aarch64 should be called arm64...

As per our offline discussion we decided to:

  1. Rename the mvn profiles following the RPM architecture naming convention (i.e. x86_64, aarch64 and armhf)
  2. The installers names (i.e. the .deb files) produced by the build will follow the target OS naming convention (in Kura's case the debian architecture naming convention i.e. arm64, amd64, armhf)

Signed-off-by: Marcello Rinaldo Martina <[email protected]>
@marcellorinaldo marcellorinaldo marked this pull request as draft December 10, 2024 10:39
Signed-off-by: Marcello Rinaldo Martina <[email protected]>
…ion>_<deb-arch>.deb

Signed-off-by: Marcello Rinaldo Martina <[email protected]>
Signed-off-by: Marcello Rinaldo Martina <[email protected]>
@marcellorinaldo marcellorinaldo marked this pull request as ready for review December 10, 2024 13:21
@mattdibi
Copy link
Contributor

With the changes in this PR we now have:

mvn -N -f kura/distrib/pom.xml help:all-profiles
[INFO] Listing Profiles for Project: org.eclipse.kura:distrib:pom:6.0.0-SNAPSHOT
  Profile Id: java8 (Active: true , Source: pom)
  Profile Id: aarch64 (Active: false , Source: pom)
  Profile Id: aarch64-nn (Active: false , Source: pom)
  Profile Id: java17 (Active: false , Source: pom)
  Profile Id: docker-x86_64-nn (Active: false , Source: pom)
  Profile Id: dev-env (Active: false , Source: pom)
  Profile Id: can-dp (Active: false , Source: pom)
  Profile Id: armhf-nn (Active: false , Source: pom)
  Profile Id: x86_64-nn (Active: false , Source: pom)
  Profile Id: x86_64 (Active: false , Source: pom)
  Profile Id: armhf (Active: false , Source: pom)
  Profile Id: docker-ubi8-x86_64-nn (Active: false , Source: pom)
  Profile Id: docker-alpine-x86_64-nn (Active: false , Source: pom)
  Profile Id: core-dp (Active: false , Source: pom)

Built with Java8:

mvn -f target-platform/pom.xml clean install && mvn -f kura/pom.xml clean install -Dmaven.test.skip=true  && mvn -f kura/distrib/pom.xml clean install -Paarch64
kura/distrib/target/kura_6.0.0-SNAPSHOT_arm64.deb
pi@raspberrypi:~ $ dpkg-deb -I kura_6.0.0-SNAPSHOT_arm64.deb 
 new Debian package, version 2.0.
 size 102192928 bytes: control archive=2859 bytes.
    1034 bytes,    21 lines      control
     148 bytes,     2 lines      md5sums
    2875 bytes,   101 lines   *  postinst             #!/bin/bash
    2976 bytes,   106 lines   *  preinst              #!/bin/bash
    4367 bytes,   169 lines   *  prerm                #!/bin/bash
 Package: kura
 Version: 6.0.0-SNAPSHOT
 Section: admin
 Priority: optional
 Architecture: arm64
 Depends: openjdk-17-jre-headless | temurin-17-jdk,
  setserial, zip, gzip, unzip, procps, usbutils, socat, gawk, sed, inetutils-telnet,
  polkit | policykit-1, ssh | openssh, openssl, busybox, openvpn,
  bluez | bluez5, bluez-hcidump | bluez5-noinst-tools,
  ntpdate, chrony, chronyc | chrony, cron | cronie,
  network-manager | networkmanager, bind9 | bind, dnsmasq | isc-dhcp-server, isc-dhcp-client | dhcpcd, iw, iptables, modemmanager,
  logrotate, gpsd, python3
 Installed-Size: 99797
 Maintainer: Eclipse Kura Developers <[email protected]>
 Description: Open-source IoT edge framework based on Java/OSGi
  Kura is an inclusive software framework that puts a layer
  between the operating system and the customer application, with industry
  standard interfaces that shorten custom development time, simplified coding
  and software that can be easily ported from one hardware platform
  to another.
 Homepage: https://eclipse-kura.github.io/kura/

Similarly the armhf package reports

pi@raspberrypi:~ $ dpkg -I kura_6.0.0-SNAPSHOT_armhf.deb 
 new Debian package, version 2.0.
 size 102088878 bytes: control archive=2859 bytes.
    1034 bytes,    21 lines      control
     146 bytes,     2 lines      md5sums
    2875 bytes,   101 lines   *  postinst             #!/bin/bash
    2976 bytes,   106 lines   *  preinst              #!/bin/bash
    4367 bytes,   169 lines   *  prerm                #!/bin/bash
 Package: kura
 Version: 6.0.0-SNAPSHOT
 Section: admin
 Priority: optional
 Architecture: armhf
 Depends: openjdk-17-jre-headless | temurin-17-jdk,
  setserial, zip, gzip, unzip, procps, usbutils, socat, gawk, sed, inetutils-telnet,
  polkit | policykit-1, ssh | openssh, openssl, busybox, openvpn,
  bluez | bluez5, bluez-hcidump | bluez5-noinst-tools,
  ntpdate, chrony, chronyc | chrony, cron | cronie,
  network-manager | networkmanager, bind9 | bind, dnsmasq | isc-dhcp-server, isc-dhcp-client | dhcpcd, iw, iptables, modemmanager,
  logrotate, gpsd, python3
 Installed-Size: 99694
 Maintainer: Eclipse Kura Developers <[email protected]>
 Description: Open-source IoT edge framework based on Java/OSGi
  Kura is an inclusive software framework that puts a layer
  between the operating system and the customer application, with industry
  standard interfaces that shorten custom development time, simplified coding
  and software that can be easily ported from one hardware platform
  to another.
 Homepage: https://eclipse-kura.github.io/kura/

Copy link
Contributor

@mattdibi mattdibi left a comment

Choose a reason for hiding this comment

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

LGTM

@MMaiero MMaiero merged commit 758702c into develop Dec 10, 2024
3 checks passed
@MMaiero MMaiero deleted the installers-rename-and-metadata-fix branch December 10, 2024 15:48
MMaiero pushed a commit that referenced this pull request Dec 20, 2024
* style: added comments for better reachability

Signed-off-by: Marcello Rinaldo Martina <[email protected]>

* refactor(distrib): renamed generic-aarch64 profiles into aarch64

Signed-off-by: Marcello Rinaldo Martina <[email protected]>

* refactor(distrib): renamed generic-arm32 profiles into armhf

Signed-off-by: Marcello Rinaldo Martina <[email protected]>

* refactor(distrib): renamed generic-x86_64 profiles into x86_64

Signed-off-by: Marcello Rinaldo Martina <[email protected]>

* refactor(distrib): removed Java version check in launch scripts, added opens in launch config

Signed-off-by: Marcello Rinaldo Martina <[email protected]>

* refactor(distrib): installer metadata changes for aarch64

Signed-off-by: Marcello Rinaldo Martina <[email protected]>

* refactor(distrib): installer metadata changes for armhf

Signed-off-by: Marcello Rinaldo Martina <[email protected]>

* refactor(distrib): installer metadata changes for x86_64

Signed-off-by: Marcello Rinaldo Martina <[email protected]>

* refactor(distrib): removed non-existing references to kura.init files in ant script

Signed-off-by: Marcello Rinaldo Martina <[email protected]>

* refactor(distrib): changed kura.os.version from raspbian to Linux

Signed-off-by: Marcello Rinaldo Martina <[email protected]>

* refactor(distrib): fixed Maintainer metadata field

Signed-off-by: Marcello Rinaldo Martina <[email protected]>

* feat(distrib): added Homepage metadata field

Signed-off-by: Marcello Rinaldo Martina <[email protected]>

* refactor(distrib): changed kura.os.version from linux to debian

Signed-off-by: Marcello Rinaldo Martina <[email protected]>

* fix(distrib): corrected nn profiles names

Signed-off-by: Marcello Rinaldo Martina <[email protected]>

* fix(distrib): corrected docker metadata

Signed-off-by: Marcello Rinaldo Martina <[email protected]>

* fix(distrib): changed installer .deb names to match <pack-name>_<version>_<deb-arch>.deb

Signed-off-by: Marcello Rinaldo Martina <[email protected]>

* fix: removing wrong commited files

Signed-off-by: Marcello Rinaldo Martina <[email protected]>

---------

Signed-off-by: Marcello Rinaldo Martina <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants