<div dir="ltr">Alright! Patch attached and provided inline, for your convenience:<div><br></div><div><div>From b29b1faf6bafb4b6e51b4e99d0febc81abbb543c Mon Sep 17 00:00:00 2001</div><div>From: Michael Stapelberg <<a href="mailto:stapelberg@debian.org">stapelberg@debian.org</a>></div><div>Date: Tue, 1 Aug 2017 23:13:36 +0200</div><div>Subject: [PATCH] add sbuild-debian-developer-setup package</div><div><br></div><div>---</div><div> bin/Makefile.am                              |  1 +</div><div> bin/sbuild-debian-developer-setup            | 49 ++++++++++++++++++++++++++++</div><div> debian/control                               | 16 +++++++++</div><div> debian/sbuild-debian-developer-setup.install |  1 +</div><div> 4 files changed, 67 insertions(+)</div><div> create mode 100755 bin/sbuild-debian-developer-setup</div><div> create mode 100644 debian/sbuild-debian-developer-setup.install</div><div><br></div><div>diff --git a/bin/Makefile.am b/bin/Makefile.am</div><div>index 138fc0b3..0fcbda09 100644</div><div>--- a/bin/Makefile.am</div><div>+++ b/bin/Makefile.am</div><div>@@ -28,6 +28,7 @@ bin_SCRIPTS = <span style="white-space:pre">                            </span>\</div><div> <span style="white-space:pre">   </span>sbuild-abort<span style="white-space:pre">                 </span>\</div><div> <span style="white-space:pre">   </span>sbuild-apt<span style="white-space:pre">                   </span>\</div><div> <span style="white-space:pre">   </span>sbuild-checkpackages<span style="white-space:pre">         </span>\</div><div>+<span style="white-space:pre">    </span>sbuild-debian-developer-setup   \</div><div> <span style="white-space:pre">  </span>sbuild-update<span style="white-space:pre">                        </span>\</div><div> <span style="white-space:pre">   </span>sbuild-upgrade<span style="white-space:pre">                       </span>\</div><div> <span style="white-space:pre">   </span>sbuild-distupgrade<span style="white-space:pre">           </span>\</div><div>diff --git a/bin/sbuild-debian-developer-setup b/bin/sbuild-debian-developer-setup</div><div>new file mode 100755</div><div>index 00000000..82341d28</div><div>--- /dev/null</div><div>+++ b/bin/sbuild-debian-developer-setup</div><div>@@ -0,0 +1,49 @@</div><div>+#!/usr/bin/perl</div><div>+#</div><div>+# Set up sbuild so that packages for Debian unstable can be built and</div><div>+# maintenance is done automatically via a daily update cronjob.</div><div>+# Copyright © 2017 Michael Stapelberg <<a href="mailto:stapelberg@debian.org">stapelberg@debian.org</a>>.</div><div>+#</div><div>+# This program is free software: you can redistribute it and/or modify</div><div>+# it under the terms of the GNU General Public License as published by</div><div>+# the Free Software Foundation, either version 2 of the License, or</div><div>+# (at your option) any later version.</div><div>+#</div><div>+# This program is distributed in the hope that it will be useful, but</div><div>+# WITHOUT ANY WARRANTY; without even the implied warranty of</div><div>+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU</div><div>+# General Public License for more details.</div><div>+#</div><div>+# You should have received a copy of the GNU General Public License</div><div>+# along with this program.  If not, see</div><div>+# <<a href="http://www.gnu.org/licenses/">http://www.gnu.org/licenses/</a>>.</div><div>+#</div><div>+#######################################################################</div><div>+</div><div>+use strict;</div><div>+use warnings;</div><div>+use autodie qw(:all);</div><div>+use v5.10;</div><div>+</div><div>+if (!defined($ENV{SUDO_USER})) {</div><div>+    die "Please run sudo $0";</div><div>+}</div><div>+</div><div>+system("adduser", "--quiet", "--", $ENV{SUDO_USER}, "sbuild");</div><div>+</div><div>+chomp(my $arch = `dpkg --print-architecture`);</div><div>+</div><div>+system("sbuild-createchroot",</div><div>+       "--command-prefix=eatmydata",</div><div>+       "--include=eatmydata",</div><div>+       "--alias=UNRELEASED",</div><div>+       "--alias=sid",</div><div>+       "unstable",</div><div>+       "/srv/chroot/unstable-$arch-sbuild",</div><div>+       "<a href="http://localhost:3142/deb.debian.org/debian">http://localhost:3142/deb.debian.org/debian</a>");</div><div>+</div><div>+open(my $fh, ">", "/etc/cron.d/sbuild-debian-developer-setup-update-all");</div><div>+say $fh q|@daily root /usr/share/doc/sbuild/examples/sbuild-update-all|;</div><div>+close($fh);</div><div>+</div><div>+say "Now run `newgrp sbuild', or log out and log in again.";</div><div>diff --git a/debian/control b/debian/control</div><div>index 7249e630..7b4bd21b 100644</div><div>--- a/debian/control</div><div>+++ b/debian/control</div><div>@@ -75,6 +75,22 @@ Description: Tool for building Debian binary packages from Debian sources</div><div>  build-essential packages, plus those in the package build</div><div>  dependencies.</div><div> </div><div>+Package: sbuild-debian-developer-setup</div><div>+Architecture: all</div><div>+Depends: sbuild,</div><div>+         apt-cacher-ng,</div><div>+         lintian,</div><div>+         ${misc:Depends},</div><div>+         ${perl:Depends},</div><div>+         ${shlibs:Depends}</div><div>+Description: Convenience script to set up an sbuild environment for Debian Developers</div><div>+ Run "sudo sbuild-debian-developer-setup" to add the current user to the sbuild</div><div>+ group, create an schroot for building packages for Debian unstable, and create</div><div>+ a cronjob which updates said schroot daily.</div><div>+ .</div><div>+ This script assumes you are on an un-metered internet connection (daily schroot</div><div>+ updates might be costly otherwise).</div><div>+</div><div> Package: buildd</div><div> Architecture: all</div><div> Depends: adduser,</div><div>diff --git a/debian/sbuild-debian-developer-setup.install b/debian/sbuild-debian-developer-setup.install</div><div>new file mode 100644</div><div>index 00000000..406b3af9</div><div>--- /dev/null</div><div>+++ b/debian/sbuild-debian-developer-setup.install</div><div>@@ -0,0 +1 @@</div><div>+usr/bin/sbuild-debian-developer-setup</div><div>-- </div><div>2.13.2</div><div><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Aug 1, 2017 at 11:05 AM, Johannes Schauer <span dir="ltr"><<a href="mailto:josch@debian.org" target="_blank">josch@debian.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Quoting Michael Stapelberg (2017-08-01 11:04:16)<br>
<span class="">> That works for me :).<br>
><br>
> How shall we proceed? Should I prepare a patch against the sbuild package?<br>
<br>
</span>Yes please!<br>
<br>
Put the patch into this bug and then we can talk about it. :)<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">Best regards,<br>Michael</div>
</div>