Bug#469263: devscripts: new script to access ldap/machines.cgi and login to machines

2021-05-31 Thread Roger Shimizu
Update the patch from Guillem Jover
to add fuzz rule for hurd and kfreebsd.

Hope this patch can be merged some day.
-- 
Roger Shimizu, GMT +9 Tokyo
PGP/GPG: 4096R/6C6ACD6417B3ACB1


deb-porterbox
Description: Binary data


Bug#469263: devscripts: new script to access ldap/machines.cgi and login to machines

2021-02-10 Thread Paul Wise
On Thu, 2021-02-11 at 00:23 +0100, Guillem Jover wrote:
On Tue, 2008-03-04 at 18:28:45 +0900, Paul Wise wrote:
> > I'd like a script to transfer data to and login to the Debian
> > porting machines that are up and available to me.
> 
> This seems quite some requirements, when I think most people tend to
> want mostly to know where to connect to.

I believe Jakub Wilk has another script for this, CCed for his opinion.

-- 
bye,
pabs

https://wiki.debian.org/PaulWise


signature.asc
Description: This is a digitally signed message part


Bug#469263: devscripts: new script to access ldap/machines.cgi and login to machines

2021-02-10 Thread Faidon Liambotis
On Thu, Feb 11, 2021 at 12:23:34AM +0100, Guillem Jover wrote:
> I'm also not sure what license Faidon would like to add to this.
> Personally I'd be fine with permissive or copyleft, or whatever other
> default license is used in devscripts.

I don't think I ever considered my one-liner copyrightable :) but for
the avoidance of any doubt, consider this licensed under the Zero-Clause
BSD license, as found e.g. on the OSI website:
https://opensource.org/licenses/0BSD

Best,
Faidon



Bug#469263: devscripts: new script to access ldap/machines.cgi and login to machines

2021-02-10 Thread Guillem Jover
Control: tag -1 patch

Hi!

On Tue, 2008-03-04 at 18:28:45 +0900, Paul Wise wrote:
> Package: devscripts
> Version: 2.10.18.1
> Severity: wishlist

> I'd like a script to transfer data to and login to the Debian porting
> machines that are up and available to me. The script could: 
> 
>   * connect to ldap or parse machines.cgi 
>   * choose machines to login to based on all/DD/restricted,
> architecture, status, have chroots, distribution
> (etch/sarge/etc) 
>   * transfer a tarball and a script to run on the machines 
>   * chmod and run the script in the dchroot (or outside it) 
>   * detect if dchroot is available, run the script normally if not 
>   * log script output to a file and transfer the result back after
> logging out 
>   * have an option to leave an interactive session after running the
> script on each host 
>   * have an option to have each machine in a separate xterm for
> parallel execution
> 
> I don't need such a script very often but it would be nice to have.

This seems quite some requirements, when I think most people tend to
want mostly to know where to connect to.

This was discussed on debian-devel some years ago [P], and several
scripts were posted. I've been using Faidon Liambotis' one locally for a
while, and today while this came up again on #debian-apt, improved it to
cover the foreign chroot cases. I'm attaching the script, which I think
could go as is, and can always be improved/extended later on.

  [P] 

I've included the host and arch in the output, so that for the foreign
cases, people can choose the beefier arches if available. But I guess
this could then be modified with a command-line option or similar if
desired.

I'm pondering though that deb-porterbox might be abusing the «deb-»
namespace and it might be better to call this «debian-porterbox»?

I'm also not sure what license Faidon would like to add to this.
Personally I'd be fine with permissive or copyleft, or whatever other
default license is used in devscripts.

Thanks,
Guillem
#!/bin/sh

set -e

arch="$1"
if [ -z "$arch" ]; then
  echo "error: missing architecture argument" 2>&1
  exit 1
fi

case "$arch" in
i386)
  sarch=amd64
  ;;
armel|armhf)
  sarch=arm64
  ;;
mips)
  sarch=mips64
  ;;
mips64el)
  # The host is mipsel, but the kernel is 64-bit MIPS.
  sarch=mipsel
  ;;
mipsel)
  sarch=mips64el
  ;;
powerpc)
  sarch=ppc64
  ;;
esac

archfilter="(architecture=$arch)"
if [ -n "$sarch" ]; then
  archfilter="(|$archfilter(architecture=$sarch))"
fi

exec ldapsearch -LLL -x -h db.debian.org -b ou=hosts,dc=debian,dc=org \
  "(&(purpose=porterbox)$archfilter)" hostname architecture | \
  sed -e '/^dn:/d;s/^hostname:/host:/;s/^architecture:/arch:/'


Bug#469263: devscripts: new script to access ldap/machines.cgi and login to machines

2008-03-04 Thread Paul Wise
Package: devscripts
Version: 2.10.18.1
Severity: wishlist

I'd like a script to transfer data to and login to the Debian porting
machines that are up and available to me. The script could: 

  * connect to ldap or parse machines.cgi 
  * choose machines to login to based on all/DD/restricted,
architecture, status, have chroots, distribution
(etch/sarge/etc) 
  * transfer a tarball and a script to run on the machines 
  * chmod and run the script in the dchroot (or outside it) 
  * detect if dchroot is available, run the script normally if not 
  * log script output to a file and transfer the result back after
logging out 
  * have an option to leave an interactive session after running the
script on each host 
  * have an option to have each machine in a separate xterm for
parallel execution

I don't need such a script very often but it would be nice to have.

-- 
bye,
pabs

http://wiki.debian.org/PaulWise


signature.asc
Description: This is a digitally signed message part