Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] [WIP] New package: icecream-1.3.1
@ 2020-05-14 19:45 Piraty
  2021-01-11  9:10 ` [PR PATCH] [Updated] " Piraty
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Piraty @ 2020-05-14 19:45 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1688 bytes --]

There is a new pull request by Piraty against master on the void-packages repository

https://github.com/Piraty/void-packages icecc
https://github.com/void-linux/void-packages/pull/21971

[WIP] New package: icecream-1.3.1
### Intro
This PR brings distributed compiler icecc (https://github.com/icecc/icecream) to Void.

Unlike distcc it supports building on heterogeneous workers (by sending chroot archives to the workers), so my ultimate goal is to use it in xbps-src as an alternative to distcc.

### TODO
* [ ] Naming of the package? `icecc` or `icecream`? [repology](https://repology.org/project/icecream/versions)
* [ ] where should daemon's basedir be? [fedora](https://src.fedoraproject.org/rpms/icecream/tree/master) uses `/var/cache/icecc`
* [ ] other distros like [debian](https://sources.debian.org/src/icecc/1.3.1-1/debian/) [fedora](https://src.fedoraproject.org/rpms/icecream/blob/master/f/fedora-sysconfig.icecream) ship a custom icecc.conf that could be adopted for a more simple configuration of the services

### How to test
Required ports are mentioned in the project's [README](https://github.com/icecc/icecream#firewall)
1. on the remote machine: start the daemon: `iceccd -vvv`
1. on the local machine: start the scheduler: `icecc-scheduler -vvv` and a daemon
1. make sure scheduler connects to remote daemon
1. expand PATH to find the icecc symlinks 
```
export ICECC_DEBUG=debug
export PATH="/usr/libexec/icecc/bin:$PATH"
gcc -o helloworld helloworld.c
```
5. or invoke icecc directly
```
ICECC_DEBUG=debug icecc gcc -o helloworld helloworld.c
```

A patch file from https://github.com/void-linux/void-packages/pull/21971.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-icecc-21971.patch --]
[-- Type: text/x-diff, Size: 8523 bytes --]

From 0d32ce4827d1606d0a39f1ef4d016e2526dbeffa Mon Sep 17 00:00:00 2001
From: Piraty <piraty1@inbox.ru>
Date: Thu, 9 May 2019 18:16:36 +0200
Subject: [PATCH 1/3] WIP: New package: icecream-1.3.1

---
 common/shlibs                                 |  1 +
 srcpkgs/icecream-devel                        |  1 +
 srcpkgs/icecream/files/icecc-scheduler/run    |  4 ++
 srcpkgs/icecream/files/iceccd/run             |  4 ++
 .../icecream/patches/9000-allow-tunnels.patch | 18 +++++++
 srcpkgs/icecream/template                     | 49 +++++++++++++++++++
 6 files changed, 77 insertions(+)
 create mode 120000 srcpkgs/icecream-devel
 create mode 100644 srcpkgs/icecream/files/icecc-scheduler/run
 create mode 100644 srcpkgs/icecream/files/iceccd/run
 create mode 100644 srcpkgs/icecream/patches/9000-allow-tunnels.patch
 create mode 100644 srcpkgs/icecream/template

diff --git a/common/shlibs b/common/shlibs
index 200d0ce77f7..e1ec6acfa7a 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -995,6 +995,7 @@ libalut.so.0 freealut-1.1.0_1
 liblilv-0.so.0 liblilv-0.14.4_1
 libsuil-0.so.0 suil-0.6.4_1
 libmcpp.so.0 libmcpp-2.7.2_1
+libicecc.so.0 icecream-1.3_1
 libjitterentropy.so.2 jitterentropy-2.2.0_1
 libkdecorations2.so.5 kdecoration-5.8.4_1
 libkdecorations2private.so.7 kdecoration-5.18.0_1
diff --git a/srcpkgs/icecream-devel b/srcpkgs/icecream-devel
new file mode 120000
index 00000000000..551c10ac351
--- /dev/null
+++ b/srcpkgs/icecream-devel
@@ -0,0 +1 @@
+icecream
\ No newline at end of file
diff --git a/srcpkgs/icecream/files/icecc-scheduler/run b/srcpkgs/icecream/files/icecc-scheduler/run
new file mode 100644
index 00000000000..18b5c835f98
--- /dev/null
+++ b/srcpkgs/icecream/files/icecc-scheduler/run
@@ -0,0 +1,4 @@
+#!/bin/sh
+OPTS=
+[ -r ./conf ] && . ./conf
+exec icecc-scheduler --user-uid _icecc $OPTS
diff --git a/srcpkgs/icecream/files/iceccd/run b/srcpkgs/icecream/files/iceccd/run
new file mode 100644
index 00000000000..ff1f62ae761
--- /dev/null
+++ b/srcpkgs/icecream/files/iceccd/run
@@ -0,0 +1,4 @@
+#!/bin/sh
+OPTS=
+[ -r ./conf ] && . ./conf
+exec iceccd --user-uid _icecc $OPTS
diff --git a/srcpkgs/icecream/patches/9000-allow-tunnels.patch b/srcpkgs/icecream/patches/9000-allow-tunnels.patch
new file mode 100644
index 00000000000..ace7efabc3d
--- /dev/null
+++ b/srcpkgs/icecream/patches/9000-allow-tunnels.patch
@@ -0,0 +1,18 @@
+upstream: no
+reason: don't ignore VPN interfaces
+
+--- a/services/comm.cpp
++++ b/services/comm.cpp
+@@ -1477,10 +1477,12 @@ static int open_send_broadcast(int port, const char* buf, int size)
+                 continue;
+             }
+ 
++            /*
+             if ((addr->ifa_flags & IFF_POINTOPOINT) || !(addr->ifa_flags & IFF_BROADCAST)) {
+                 log_info() << "ignoring tunnels " << addr->ifa_name << " for broadcast" << endl;
+                 continue;
+             }
++            */
+         } else {
+             if (ntohl(((struct sockaddr_in *) addr->ifa_addr)->sin_addr.s_addr) != 0x7f000001) {
+                 trace() << "ignoring non-localhost " << addr->ifa_name << " for broadcast" << endl;
diff --git a/srcpkgs/icecream/template b/srcpkgs/icecream/template
new file mode 100644
index 00000000000..f034d317f46
--- /dev/null
+++ b/srcpkgs/icecream/template
@@ -0,0 +1,49 @@
+# TODO
+# * settle on naming (icecream vs. icecc).  https://repology.org/project/icecream/versions
+# * system user obviously cannot chroot, which makes building in custom envs impossible. Add a second service `iceccd-root` that can?
+# * do we need anything else than the service's conf file? ... debian ships a full-blown conf file that pre-defines all cmdline args
+#
+# references:
+# 	* https://sources.debian.org/src/icecc/1.3.1-1/debian/
+# 	* https://src.fedoraproject.org/rpms/icecream/tree/master
+
+# Template file for 'icecream'
+pkgname=icecream
+version=1.3.1
+revision=1
+build_style=gnu-configure
+configure_args="--enable-shared"
+make_check_target=test
+hostmakedepends="automake libtool docbook2x"
+makedepends="libcap-ng-devel lzo-devel libarchive-devel"
+checkdepends="sudo expect coreutils inetutils-telnet"
+short_desc="Distributed compiler with a central scheduler to share build load"
+maintainer="Piraty <piraty1@inbox.ru>"
+license="GPL-2.0-or-later"
+homepage="https://github.com/icecc/icecream"
+distfiles="https://github.com/icecc/icecream/archive/${version}.tar.gz"
+checksum=9f45510fb2251d818baebcff19051c1cf059e48c6b830fb064a8379480159b9d
+patch_args="-Np1"
+
+system_accounts="_icecc"
+
+pre_configure() {
+	autoreconf -vfi
+}
+
+post_install() {
+	vsv iceccd
+	vsv icecc-scheduler
+}
+
+icecream-devel_package() {
+	short_desc+=" - runtime libraries - development files"
+	depends="${sourcepkg}>=${version}_${revision}"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/lib/pkgconfig
+		vmove "usr/lib/*.a"
+		vmove "usr/lib/*.so"
+		vmove "usr/lib/*.la"
+	}
+}

From 4513270fe8350ab9293f63c7df4bc2fe83f04687 Mon Sep 17 00:00:00 2001
From: Piraty <piraty1@inbox.ru>
Date: Thu, 23 Apr 2020 23:00:10 +0200
Subject: [PATCH 2/3] New package: icemon-3.3

---
 srcpkgs/icemon/template | 13 +++++++++++++
 1 file changed, 13 insertions(+)
 create mode 100644 srcpkgs/icemon/template

diff --git a/srcpkgs/icemon/template b/srcpkgs/icemon/template
new file mode 100644
index 00000000000..f6e8a9a21b6
--- /dev/null
+++ b/srcpkgs/icemon/template
@@ -0,0 +1,13 @@
+# Template file for 'icemon'
+pkgname=icemon
+version=3.3
+revision=1
+build_style=cmake
+hostmakedepends="docbook2x extra-cmake-modules pkg-config"
+makedepends="qt5-devel lzo-devel libcap-ng-devel icecream-devel libzstd-devel libarchive-devel"
+short_desc="Icecream GUI Monitor"
+maintainer="Piraty <piraty1@inbox.ru>"
+license="GPL-2.0-or-later"
+homepage="http://kfunk.org/tag/icemon/"
+distfiles="https://github.com/icecc/icemon/archive/v${version}.tar.gz"
+checksum=3caf14731313c99967f6e4e11ff261b061e4e3d0c7ef7565e89b12e0307814ca

From d9a03892678b0b9e94a0d8ec17dd1f0beb9501fa Mon Sep 17 00:00:00 2001
From: Piraty <piraty1@inbox.ru>
Date: Thu, 23 Apr 2020 23:48:53 +0200
Subject: [PATCH 3/3] New package: icecream-sundae-1.0.0

---
 ...ecessary-ncurses-clear-of-the-screen.patch | 33 +++++++++++++++++++
 srcpkgs/icecream-sundae/template              | 17 ++++++++++
 2 files changed, 50 insertions(+)
 create mode 100644 srcpkgs/icecream-sundae/patches/0001-Avoid-unnecessary-ncurses-clear-of-the-screen.patch
 create mode 100644 srcpkgs/icecream-sundae/template

diff --git a/srcpkgs/icecream-sundae/patches/0001-Avoid-unnecessary-ncurses-clear-of-the-screen.patch b/srcpkgs/icecream-sundae/patches/0001-Avoid-unnecessary-ncurses-clear-of-the-screen.patch
new file mode 100644
index 00000000000..2b7cd3caec6
--- /dev/null
+++ b/srcpkgs/icecream-sundae/patches/0001-Avoid-unnecessary-ncurses-clear-of-the-screen.patch
@@ -0,0 +1,33 @@
+upstream: yes
+
+From c1324f186bc526aed7b3a63dfe514d34870548fb Mon Sep 17 00:00:00 2001
+From: Kevin Pulo <kev@pulo.com.au>
+Date: Tue, 19 Nov 2019 21:49:48 +1100
+Subject: [PATCH] Avoid unnecessary ncurses clear() of the screen.
+
+Instead, just erase() the screen, so that it can be drawn over again and
+then flushed at refresh() time.
+
+This fixes the problem where redraws in a slow terminal (eg. mosh or
+over a slow ssh link) sometimes render the cleared screen, causing a
+distracting visible "flash".
+---
+ src/draw.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/draw.cpp b/src/draw.cpp
+index 1ae1eb8..ec66a56 100644
+--- a/src/draw.cpp
++++ b/src/draw.cpp
+@@ -829,7 +829,7 @@ void NCursesInterface::doRender()
+ 
+ void NCursesInterface::doRedraw()
+ {
+-    clear();
++    erase();
+     doRender();
+     refresh();
+ }
+-- 
+2.26.2
+
diff --git a/srcpkgs/icecream-sundae/template b/srcpkgs/icecream-sundae/template
new file mode 100644
index 00000000000..049ce6523dc
--- /dev/null
+++ b/srcpkgs/icecream-sundae/template
@@ -0,0 +1,17 @@
+# Template file for 'icecream-sundae'
+pkgname=icecream-sundae
+version=1.0.0
+revision=1
+build_style=meson
+hostmakedepends="pkg-config"
+makedepends="icecream-devel glib-devel ncurses-devel lzo-devel libzstd-devel"
+short_desc="Commandline monitor for Icecream"
+maintainer="Piraty <piraty1@inbox.ru>"
+license="GPL-2.0-or-later"
+homepage="https://github.com/JPEWdev/icecream-sundae"
+distfiles="https://github.com/JPEWdev/icecream-sundae/archive/v${version}.tar.gz"
+checksum=15c357664e47e255044bc4c4e7aaa4dfd911ee7282e2390b7770f2a14c02ae5e
+patch_args="-Np1"
+
+# tests require xorg session
+do_check() { : ; }

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-11-06 22:32 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-14 19:45 [PR PATCH] [WIP] New package: icecream-1.3.1 Piraty
2021-01-11  9:10 ` [PR PATCH] [Updated] " Piraty
2021-01-12 13:47 ` Piraty
2021-11-06 22:32 ` abenson
2021-11-06 22:32 ` [PR PATCH] [Closed]: " abenson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).