From e91956a05d2a7965b8f37d26db9a3c97b3c72bec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Fi=C5=A1er?= Date: Mon, 12 Oct 2020 15:57:25 +0200 Subject: [PATCH 1/2] FEATURE: Modify packaging for EMCApplication Encompass needed local patches to work around upstream development changes. --- debian/.gitignore | 1 + debian/configure | 8 +++++++- debian/control.top.in | 4 ++-- debian/emcapplication.files.in | 2 ++ 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/debian/.gitignore b/debian/.gitignore index 45bba7d642..5cbae75668 100644 --- a/debian/.gitignore +++ b/debian/.gitignore @@ -9,5 +9,6 @@ linuxcnc-uspace-dev linuxcnc-doc-*/ *.substvars /linuxcnc*.files +/emcapplication*.files *.debhelper shlibs.local diff --git a/debian/configure b/debian/configure index 212d17167e..e6115b915d 100755 --- a/debian/configure +++ b/debian/configure @@ -241,6 +241,8 @@ PC based motion controller for real-time Linux alternate front-ends for linuxcnc DESCRIPTION OTHER_CONFLICTING_PACKAGES="" +VCS_BROWSER="https://github.com/LinuxCNC/linuxcnc" +VCS_GIT="git://github.com/linuxcnc/linuxcnc.git" case $TARGET in uspace|sim) @@ -312,6 +314,8 @@ Enhanced Motion Controller for Machinekit-HAL DESCRIPTION OTHER_CONFLICTING_PACKAGES=", linuxcnc, linuxcnc-dev, machinekit-cnc" MAINTAINER="Machinekit Bot " + VCS_BROWSER="https://github.com/machinekit/EMCApplication" + VCS_GIT="https://github.com/machinekit/emcapplication.git" ;; 2.6.32-122-rtai|3.4-9-rtai-686-pae|3.16.0-9-rtai-*) CONFIGURE_REALTIME_ARG=--with-realtime=/usr/realtime-$KERNEL_VERSION @@ -364,6 +368,8 @@ sed \ -e "s#@MAIN_PACKAGE_DESCRIPTION_TEXT@#$MAIN_PACKAGE_DESCRIPTION_TEXT#g" \ -e "s#@DEV_PACKAGE_DESCRIPTION_TEXT@#$DEV_PACKAGE_DESCRIPTION_TEXT#g" \ -e "s#@MAINTAINER@#$MAINTAINER#g" \ + -e "s#@VCS_BROWSER@#$VCS_BROWSER#g" \ + -e "s#@VCS_GIT@#$VCS_GIT#g" \ $* } @@ -391,7 +397,7 @@ do_emcapplication_changelog() { DISTRO_UC="$(echo $DISTRO_CODENAME | sed 's/^[[:space:]]*//g' | sed -e 's/\b\(.\)/\u\1/g')" DISTRO_LC="$(echo $DISTRO_CODENAME | sed 's/^[[:space:]]*//g')" COMMIT_COUNT="$(git rev-list --count HEAD)" - EMCAVERSION="$(git show HEAD:VERSION | cut -d ' ' -f 1).${COMMIT_COUNT}-1.git$(git rev-parse --short HEAD)~${DISTRO_LC}" + EMCAVERSION="$(git show HEAD:VERSION | cut -d ' ' -f 1).${COMMIT_COUNT}.git$(git rev-parse --short HEAD)~${DISTRO_LC}" COMMIT="$(git rev-parse HEAD)" AUTHOR_NAME="$(git show -s --pretty=%an $COMMIT)" AUTHOR_EMAIL="$(git show -s --format='%ae' $COMMIT)" diff --git a/debian/control.top.in b/debian/control.top.in index a58dd63b69..73be913630 100644 --- a/debian/control.top.in +++ b/debian/control.top.in @@ -35,8 +35,8 @@ Build-Depends: debhelper (>= 6), yapps2, libtirpc-dev Standards-Version: @STANDARDS_VERSION@ -Vcs-Browser: https://github.com/LinuxCNC/linuxcnc -Vcs-Git: git://github.com/linuxcnc/linuxcnc.git +Vcs-Browser: @VCS_BROWSER@ +Vcs-Git: @VCS_GIT@ Package: @MAIN_PACKAGE_NAME@-dev Architecture: any diff --git a/debian/emcapplication.files.in b/debian/emcapplication.files.in index 52fa244400..1ac575dfc6 100644 --- a/debian/emcapplication.files.in +++ b/debian/emcapplication.files.in @@ -20,6 +20,7 @@ usr/share/glade3 usr/share/doc/linuxcnc/asciidoc-markup.txt usr/share/doc/linuxcnc/gcode.html usr/share/doc/linuxcnc/gcode_fr.html +usr/share/doc/linuxcnc/gcode_es.html usr/share/doc/linuxcnc/gcode_vi.html usr/share/doc/linuxcnc/AUTHORS usr/share/doc/linuxcnc/axis_light_background @@ -29,6 +30,7 @@ usr/share/doc/linuxcnc/README.axis usr/share/doc/linuxcnc/examples/nc_files usr/share/doc/linuxcnc/examples/sample-configs/*/* usr/share/doc/linuxcnc/examples/sample-configs/maintainer.txt +usr/share/doc/linuxcnc/examples/sample-configs/maintainer_es.txt usr/share/linuxcnc/* usr/share/locale/*/LC_MESSAGES/*.mo usr/share/gtksourceview-2.0/ From d91ce69c158445497e6d765d6f1a314eb905e9fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Fi=C5=A1er?= Date: Mon, 12 Oct 2020 15:58:49 +0200 Subject: [PATCH 2/2] MAINTENANCE: Require specific Machinekit-HAL package version When building Debian-like packages for external HAL (Machinekit-HAL), require a specific package version of 'machinekit-hal' and 'machinekit-hal-dev' when running the configure command. Example: './debian/configure machinekit-hal=0.4.20868-1.gitca75c54aa~stretch no-docs' --- README.md | 14 +++++++++++--- debian/configure | 17 +++++++++++++---- 2 files changed, 24 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 7a21f7a4e8..b6494690b4 100644 --- a/README.md +++ b/README.md @@ -80,9 +80,16 @@ curl -1sLf \ | sudo -E bash git clone https://github.com/machinekit/emcapplication.git cd emcapplication -sudo apt install build-essential fakeroot devscripts python -debian/configure machinekit-hal no-docs -mk-build-deps -irs sudo +sudo apt install build-essential fakeroot devscripts python apt-cudf +sudo apt-mark hold machinekit-hal +debian/configure machinekit-hal=${WANTED_VERSION_OF_MACHINEKIT_HAL_PACKAGES} no-docs +mk-build-deps \ + --install \ + --remove \ + --root-cmd sudo \ + --tool \ + 'apt-cudf-get --solver aspcud -o APT::Get::Assume-Yes=1 -o Debug::pkgProblemResolver=0 -o APT::Install-Recommends=0' \ + debian/control cd src ./autogen.sh ./configure --with-hal=machinekit-hal @@ -90,6 +97,7 @@ make sudo make install cd .. source ./scripts/rip-environment +linuxcnc ``` |![Warning](https://img.icons8.com/ios-filled/50/000000/warning-shield.png)| Be advised that currently there is no support for Linux distributions other than Debian. | diff --git a/debian/configure b/debian/configure index e6115b915d..0b50d8a5f0 100755 --- a/debian/configure +++ b/debian/configure @@ -281,11 +281,20 @@ case $TARGET in EXTRA_RECOMMENDS="$EXTRA_RECOMMENDS, linux-image-rt-amd64 [linux-amd64], linux-image-rt-686-pae [linux-i386]" CONFIGURE_REALTIME_ARG=--with-realtime=uspace ;; - machinekit-hal) + machinekit-hal*) + MACHINEKIT_HAL_ARR=(${TARGET//=/ }) + MACHINEKIT_VERSION=${MACHINEKIT_HAL_ARR[1]} + if [ -z "$MACHINEKIT_VERSION" ] + then + printf "%b" \ + "Version of Machinekit-HAL packages have to be specified as " \ + "configure machinekit-hal=\${VERSION}\n" + exit 1 + fi TARGET=machinekit-hal MODULE_PATH=usr/lib/machinekit/modules MODULE_EXT=.so - KERNEL_DEPENDS="machinekit-hal (>= 0.4)" + KERNEL_DEPENDS="machinekit-hal (= $MACHINEKIT_VERSION)" KERNEL_HEADERS= KERNEL_VERSION=machinekit-hal MODUTILS_DEPENDS= @@ -296,8 +305,8 @@ case $TARGET in OTHER_MAIN_PACKAGE_NAME=linuxcnc-uspace INITRD_REALTIME_PATH= CONFIGURE_REALTIME_ARG=--with-hal=machinekit-hal - EXTRA_BUILD="${EXTRA_BUILD}, machinekit-hal-dev (>= 0.4)" - EXTRA_RECOMMENDS="machinekit-hal-dev" + EXTRA_BUILD="${EXTRA_BUILD}, machinekit-hal-dev (= $MACHINEKIT_VERSION)" + EXTRA_RECOMMENDS="machinekit-hal-dev (= $MACHINEKIT_VERSION)" read -r -d '' MAIN_PACKAGE_DESCRIPTION_TEXT <