Skip to contentSkip to conversation

distcc: clean up the UI install logic

PATCH New Ross Burton 1 participant 3 messages Sep 20, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 distcc: clean up the UI install logic

Remove the local copy of the desktop file, instead apply a patch from upstream to fix the file. This also fixes the install paths, so update the recipe.

Remove glibc-specific installation as this was due to uclibc failures.

Refresh and submit upstream the out-of-tree build fix.

---
 meta/recipes-devtools/distcc/distcc_3.3.3.bb  |  13 +-
 .../distcc/files/distccmon-gnome.desktop      |  12 --
 .../distcc/files/fix-gnome.patch              | 122 ++++++++++++++++++
 .../distcc/files/separatebuilddir.patch       |  42 +++---
 4 files changed, 154 insertions(+), 35 deletions(-)
 delete mode 100644 meta/recipes-devtools/distcc/files/distccmon-gnome.desktop
 create mode 100644 meta/recipes-devtools/distcc/files/fix-gnome.patch
meta/recipes-devtools/distcc/distcc_3.3.3.bb +5 -8
index 7942debec9e..d8ad498f2b4 100644
@@ -15,9 +15,9 @@ PACKAGECONFIG[popt] = "--without-included-popt,--with-included-popt,popt"
 RRECOMMENDS_${PN} = "avahi-daemon"
 
 SRC_URI = "git://github.com/distcc/distcc.git \
+           file://fix-gnome.patch \
            file://separatebuilddir.patch \
            file://default \
-           file://distccmon-gnome.desktop \
            file://distcc \
            file://distcc.service"
 SRCREV = "4cde9bcfbda589abd842e3bbc652ce369085eaae"
@@ -51,13 +51,8 @@ do_install() {
     install -d ${D}${systemd_unitdir}/system/
     install -m 0644 ${WORKDIR}/distcc.service ${D}${systemd_unitdir}/system
     sed -i -e 's,@BINDIR@,${bindir},g' ${D}${systemd_unitdir}/system/distcc.service
-    ${DESKTOPINSTALL}
-}
-DESKTOPINSTALL = ""
-DESKTOPINSTALL_libc-glibc () {
-    install -d ${D}${datadir}/distcc/
-    install -m 0644 ${WORKDIR}/distccmon-gnome.desktop ${D}${datadir}/distcc/
 }
+
 PACKAGES += "distcc-distmon-gnome"
 
 FILES_${PN} = " ${sysconfdir} \
@@ -67,8 +62,10 @@ FILES_${PN} = " ${sysconfdir} \
 		${bindir}/distccmon-text \
 		${sbindir}/update-distcc-symlinks \
 		${systemd_unitdir}/system/distcc.service"
+
 FILES_distcc-distmon-gnome = "  ${bindir}/distccmon-gnome \
-				${datadir}/distcc"
+				${datadir}/applications \
+				${datadir}/pixmaps"
 
 
 #
meta/recipes-devtools/distcc/files/distccmon-gnome.desktop deleted +0 -12
deleted file mode 100644
index 7b5d85ce4e2..00000000000
@@ -1,12 +0,0 @@
-[Desktop Entry]
-Version=0.9.4
-Exec=distccmon-gnome
-Name=distcc monitor
-GenericName=Distributed Compile Monitor
-Comment=Graphical view of distributed compile tasks
-Icon=distccmon-gnome-icon
-TryExec=distccmon-gnome
-Terminal=false
-Type=Application
-Categories=GNOME;Development;
-StartupNotify=true
meta/recipes-devtools/distcc/files/fix-gnome.patch new file +122 -0

122 lines not on this page · raw message

meta/recipes-devtools/distcc/files/separatebuilddir.patch +27 -15

48 lines not on this page · raw message

Signature · 1 line
2.20.1
#1 lore raw

PATCH 2/3 distcc: use --enable-tcp-insecure instead of --make-me-a-botnet

--make-me-a-botnet is worrying, --enable-tcp-insecure is clearer and doesn't
scare people glancing at 'ps'.

---
 meta/recipes-devtools/distcc/files/default | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-devtools/distcc/files/default +1 -1
index e5ca68b8561..a5bc13ecf33 100644
@@ -21,4 +21,4 @@ ALLOWEDNETS="127.0.0.1"
 #
 # OPTIONS is used for the systemd service file
 #
-OPTIONS="--allow 127.0.0.1 --make-me-a-botnet"
+OPTIONS="--allow 127.0.0.1 --enable-tcp-insecure"
Signature · 1 line
2.20.1
#2 lore raw

PATCH 3/3 distcc: split into client and server packages

In reply to Ross Burton

Users of distcc are rarely both clients and servers, so split the package. distcc is the client, the new distcc-server package is the server.

---
 meta/recipes-devtools/distcc/distcc_3.3.3.bb | 33 +++++++++-----------
 1 file changed, 14 insertions(+), 19 deletions(-)
meta/recipes-devtools/distcc/distcc_3.3.3.bb +14 -19
index d8ad498f2b4..c52f136be8c 100644
@@ -12,7 +12,7 @@ PACKAGECONFIG[gtk] = "--with-gtk,--without-gtk --without-gnome,gtk+"
 # use system popt by default
 PACKAGECONFIG[popt] = "--without-included-popt,--with-included-popt,popt"
 
-RRECOMMENDS_${PN} = "avahi-daemon"
+RRECOMMENDS_${PN}-server = "avahi-daemon"
 
 SRC_URI = "git://github.com/distcc/distcc.git \
            file://fix-gnome.patch \
@@ -29,17 +29,20 @@ ASNEEDED = ""
 
 EXTRA_OECONF += "--disable-Werror PYTHON='' --disable-pump-mode"
 
-USERADD_PACKAGES = "${PN}"
-USERADD_PARAM_${PN} = "--system \
+PACKAGE_BEFORE_PN = "${PN}-distmon-gnome ${PN}-server"
+
+USERADD_PACKAGES = "${PN}-server"
+USERADD_PARAM_${PN}-server = "--system \
                        --home /dev/null \
                        --no-create-home \
                        --gid nogroup \
                        distcc"
 
+UPDATERCPN = "${PN}-server"
 INITSCRIPT_NAME = "distcc"
 
-SYSTEMD_PACKAGES = "${PN}"
-SYSTEMD_SERVICE_${PN} = "distcc.service"
+SYSTEMD_PACKAGES = "${PN}-server"
+SYSTEMD_SERVICE_${PN}-server = "distcc.service"
 
 do_install() {
     # Improve reproducibility: compress w/o timestamps
@@ -53,20 +56,12 @@ do_install() {
     sed -i -e 's,@BINDIR@,${bindir},g' ${D}${systemd_unitdir}/system/distcc.service
 }
 
-PACKAGES += "distcc-distmon-gnome"
-
-FILES_${PN} = " ${sysconfdir} \
-		${bindir}/distcc \
-		${bindir}/lsdistcc \
-		${bindir}/distccd \
-		${bindir}/distccmon-text \
-		${sbindir}/update-distcc-symlinks \
-		${systemd_unitdir}/system/distcc.service"
-
-FILES_distcc-distmon-gnome = "  ${bindir}/distccmon-gnome \
-				${datadir}/applications \
-				${datadir}/pixmaps"
-
+FILES_${PN}-server = "${sysconfdir} \
+                      ${bindir}/distccd \
+                      ${sbindir}"
+FILES_${PN}-distmon-gnome = "${bindir}/distccmon-gnome \
+                             ${datadir}/applications \
+                             ${datadir}/pixmaps"
 
 #
 # distcc upstream dropped the 3.2 branch which we reference in older project releases
Signature · 1 line
2.20.1