Skip to content

Commit

Permalink
Updated Debian packaging files for Ubuntu 19.04 "Disco Dingo"
Browse files Browse the repository at this point in the history
Signed-off-by: Peter J. Mello <[email protected]>
  • Loading branch information
RogueScholar committed May 15, 2019
1 parent 13ed613 commit 5962a0e
Show file tree
Hide file tree
Showing 11 changed files with 491 additions and 27 deletions.
59 changes: 54 additions & 5 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,14 +1,40 @@
reptyr (0.6.2-1) unstable; urgency=low
reptyr (0.7.0-1~ppa) disco; urgency=medium

* No-changes build from source from repository tag
* Add bash completion support
* Fix compilation with musl libc, CentOS, or GCC 7+
* Support for PowerPC and aarch64

-- Peter J. Mello <[email protected]> Mon, 13 May 2019 22:25:07 -0700

reptyr (0.6.2-1) utopic; urgency=low

* Fix tty-stealing on i386
* New release:
- Fixup build for tests by adding Python dependencies and disabling
tests when Yama would not allow them to run
* Bump standards version to 3.9.6 (no changes).

-- Evan Broder <[email protected]> Sun, 08 Feb 2015 14:13:04 -1000

reptyr (0.5-1) unstable; urgency=low
reptyr (0.6.1-1) utopic; urgency=low

* Fix compilation when chown is declared as `warn_unused_result`

-- Peter J. Mello <[email protected]> Thu, 18 Jan 2015 00:00:00 -0700

reptyr (0.6-1) utopic; urgency=medium

* Add -T ("tty-stealing") mode, which works on processes with children.
See https://blog.nelhage.com/2014/08/new-reptyr-feature-tty-stealing/
* Added FreeBSD support
* Minor bugfixes

-- Peter J. Mello <[email protected]> Sun, 4 Jan 2015 00:00:00 -0700

reptyr (0.5-1) saucy; urgency=low

* Add an early check and error if attaching a process with children.
* New release (Closes: #711020):
- Drop debian/patches/accept-cmd-line-build-flags.patch which was
accepted upstream
Expand All @@ -21,16 +47,39 @@ reptyr (0.5-1) unstable; urgency=low

-- Evan Broder <[email protected]> Wed, 05 Jun 2013 16:20:50 -0700

reptyr (0.3-2) unstable; urgency=low
reptyr (0.4-1) precise; urgency=medium

* Add support for scripting with the -l flag.
* Add a French translation of the man page
* Add a -V flag

-- Peter J. Mello <[email protected]> Thu, 16 Aug 2012 00:00:00 -0700

reptyr (0.3-2) natty; urgency=low

* Bump standards version to 3.9.2 (no changes).
* Build for armhf (Closes: #633750)
* Enable support for buildflags

-- Evan Broder <[email protected]> Mon, 31 Oct 2011 12:05:33 -0400

reptyr (0.3-1) unstable; urgency=low
reptyr (0.3-1) natty; urgency=medium

* Initial release (Closes: #613123)
* Initial Debian release (Closes: #613123)

-- Evan Broder <[email protected]> Sun, 10 Jul 2011 08:28:45 -0700

reptyr (0.2-1) maverick; urgency=low

* Add a man page
* Add a 'make install' target
* Improve detection of which fd's to attach,
* Add a '-s' option to attach programs not currently on a tty.

-- Peter J. Mello <[email protected]> Tue, 1 Mar 2011 00:00:00 -0700

reptyr (0.1-1) maverick; urgency=medium

* Initial release

-- Peter J. Mello <[email protected]> Thu, 27 Jan 2011 00:00:00 -0700
13 changes: 7 additions & 6 deletions debian/control
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
Source: reptyr
Maintainer: Peter J. Mello <[email protected]>
Section: misc
Priority: optional
Maintainer: Evan Broder <[email protected]>
Build-Depends: debhelper (>= 7.0.50~), dpkg-dev (>= 1.16.1~), python, python-pexpect
Standards-Version: 3.9.6
Build-Depends: debhelper-compat (= 12), dpkg-dev (>= 1.16.1), python,
python-pexpect
Standards-Version: 4.3.0
Homepage: https://github.com/nelhage/reptyr
Vcs-Git: git://github.com/nelhage/reptyr.git -b debian
Vcs-Browser: http://github.com/nelhage/reptyr/tree/debian
Vcs-Browser: https://github.com/nelhage/reptyr/tree/debian
Vcs-Git: https://github.com/nelhage/reptyr.git -b debian

Package: reptyr
Architecture: i386 amd64 armel armhf
Architecture: i386 amd64 armel armhf arm64 powerpc
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: Tool for moving running programs between ptys
reptyr is a utility for taking an existing running program and
Expand Down
26 changes: 22 additions & 4 deletions debian/copyright
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: reptyr
Upstream-Contact: Nelson Elhage <[email protected]>
Source: https://github.com/nelhage/reptyr

Files: *
Copyright: Copyright (C) 2011 by Nelson Elhage
Copyright: 2011-2018 Nelson Elhage <[email protected]>
License: Expat

Files: debian/*
Copyright: 2011, Evan Broder <[email protected]>
License: Expat
Copyright: 2011-2015 Evan Broder <[email protected]>
2019 Peter J. Mello <[email protected]>
License: Apache-2.0

License: Expat
Permission is hereby granted, free of charge, to any person obtaining
Expand All @@ -31,3 +32,20 @@ License: Expat
ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

License: Apache-2.0
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
.
http://www.apache.org/licenses/LICENSE-2.0
.
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
.
On Debian systems, the complete text of the Apache License 2.0 can
be found in "/usr/share/common-licenses/Apache-2.0".

49 changes: 49 additions & 0 deletions debian/patches/Makefile.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
Description: Change the install prefix
Upstream has a peculiar way of writing the install directive in the Makefile.
I changed it to allow the package build to work properly, which included
changing the prefix from /usr/local to /usr.
Origin: maintainer
Forwarded: no
Last-Update: 2019-05-14

--- reptyr-0.7.0~ppa.orig/Makefile
+++ reptyr-0.7.0~ppa/Makefile
@@ -8,11 +8,8 @@ ifeq ($(UNAME_S),FreeBSD)
OBJS += platform/freebsd/freebsd_ptrace.o platform/freebsd/freebsd.o
LDFLAGS += -lprocstat
endif
-# Note that because of how Make works, this can be overridden from the
-# command-line.
-#
-# e.g. install to /usr with `make PREFIX=/usr`
-PREFIX=/usr/local
+
+PREFIX=/usr
BINDIR=$(PREFIX)/bin
MANDIR=$(PREFIX)/share/man

@@ -46,15 +43,16 @@ clean:
BASHCOMPDIR ?= $(shell $(PKG_CONFIG) --variable=completionsdir bash-completion 2>/dev/null)

install: reptyr
- install -d -m 755 $(DESTDIR)$(BINDIR)
- install -m 755 reptyr $(DESTDIR)$(BINDIR)/reptyr
- install -d -m 755 $(DESTDIR)$(MANDIR)/man1
- install -m 644 reptyr.1 $(DESTDIR)$(MANDIR)/man1/reptyr.1
- install -d -m 755 $(DESTDIR)$(MANDIR)/fr/man1
- install -m 644 reptyr.fr.1 $(DESTDIR)$(MANDIR)/fr/man1/reptyr.1
+ install -d -m 0755 $(DESTDIR)$(BINDIR)
+ install -D -m 0755 reptyr $(DESTDIR)$(BINDIR)/reptyr
+ install -d -m 0755 $(DESTDIR)$(MANDIR)/man1
+ install -D -m 0644 reptyr.1 $(DESTDIR)$(MANDIR)/man1/reptyr.1
+ install -d -m 0755 $(DESTDIR)$(MANDIR)/fr/man1
+ install -D -m 0644 reptyr.fr.1 $(DESTDIR)$(MANDIR)/fr/man1/reptyr.1
bashcompdir=$(BASHCOMPDIR) ; \
test -z "$$bashcompdir" && bashcompdir=/etc/bash_completion.d ; \
- install -d -m 755 $(DESTDIR)$$bashcompdir ; \
- install -m 644 reptyr.bash $(DESTDIR)$$bashcompdir/reptyr
+ install -d -m 0755 $(DESTDIR)$$bashcompdir ; \
+ install -D -m 0644 reptyr.bash $(DESTDIR)$$bashcompdir/reptyr

.PHONY: PHONY
+
1 change: 1 addition & 0 deletions debian/patches/series
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Makefile.patch
185 changes: 185 additions & 0 deletions debian/reptyr.1
Original file line number Diff line number Diff line change
@@ -0,0 +1,185 @@
.mso www.tmac
.TH reptyr 1 "03 Feb 2011"
.SH NAME
reptyr \- Reparent a running program to a new terminal
.SH SYNOPSIS
.B reptyr
.I PID

.B reptyr \-l|\-L [COMMAND [ARGS]]

.SH DESCRIPTION

.B reptyr
is a utility for taking an existing running program and
attaching it to a new terminal. Started a long-running process over
ssh, but have to leave and don't want to interrupt it? Just start a
screen, use
.B reptyr
to grab it, and then kill the ssh session and head
on home.
.LP
.B reptyr
works by attaching to the target program using
.BR ptrace (2),
redirecting relevant file descriptors, and changing the program's controlling
terminal (See
.BR tty (4))
It is this last detail that makes
.B reptyr
work much better than alternatives such as
.BR retty (1).

.LP
After attaching a program, the program will appear to be either backgrounded or
suspended to the shell it was launched from (depending on the shell). For
maximal safety you can run
.IP
bg; disown
.LP

in the old shell to remove the association with the program, but
.B reptyr
will attempt to ensure that the target program remains running even if you close
the shell without doing so.

.SH OPTIONS

.B \-T
.IP
Use an alternate mode of attaching, "TTY-stealing". In this mode,
.B reptyr
will not
.BR ptrace (2)
the target process, but will attempt to discover the terminal emulator
for that process' pty, and steal the master end of the pty. This mode
is more reliable and flexible in many circumstances (for instance, it
can attach all processes on a tty, rather than just a single
process). However, as a downside, children of
.BR sshd(8)
cannot be attached via
.B -T
unless
.B reptyr
is run as root. See
.URL https://blog.nelhage.com/2014/08/new-reptyr-feature-tty-stealing/
for more information about tty-stealing.
.LP

.B \-l, \-L [COMMAND [ARGS]]
.IP
Instead of attaching to a new process, create a new pty pair, proxy the master
end to the current terminal, and then print the name of the slave pty. This can
be passed to e.g.
.B gdb\'s
.I set inferior-tty
option.

If an optional
.B COMMAND
and
.B ARGS
are passed in conjunction with
.B -l,
that command will be executed as a child of
.B reptyr
with the
.B REPTYR_PTY
environment variable set to the name of the slave pty. If
.B -L
is used instead of
.B -l,
then fds 0-2 of the child will also be redirected to point to the
slave, and the child will be run in a fresh session with the slave as
its controlling terminal.
.LP

.B \-s
.IP

By default, reptyr will move any file descriptors in the target that were
connected to the target's controlling terminal to point to the new terminal. The
.B -s
option will cause reptyr to unconditionally attach file descriptors 0, 1, and 2
in the target, even if the target has no controlling terminal or they are not
connected to a terminal.
.LP

.B \-v
.IP
Print the version of
.B reptyr
and exit.
.LP

.B \-h
.IP
Print a usage message and exit.
.LP

.B \-V
.IP
Print verbose debug output while running.
.LP

.SH NOTES

.B reptyr
depends on the
.BR ptrace (2)
system call to attach to the remote program. On Ubuntu Maverick and higher, this
ability is disabled by default for security reasons. You can enable it
temporarily by doing
.IP
# echo 0 > /proc/sys/kernel/yama/ptrace_scope
.LP
as root, or permanently by editing the file
.IR /etc/sysctl.d/10-ptrace.conf ,
which also contains more information about this setting.

.SH BUGS

When attaching to some curses programs, they will not redraw the screen right
away, and a
.B ^L
or similar will be needed to force a redraw.

Similarly, after attaching to certain programs, the old terminal will be left in
an odd state, and a
.B clear
or even
.B reset
may be required before the old terminal is usable again.

Attaching to rtorrent (and probably some other apps) doesn't work right
(rtorrent stops accepting input) (The problem is that rtorrent is using epoll to
poll stdin, and we don't update the internal reference that the epoll fd has to
the old tty).

Attaching to a process with children doesn't work right. This should be possible
to fix -- I just need to ptrace each child individually and do the same games to
it.

Attaching a
.BR less (1)
process doesn't work if you have a
.I .lessfilter
file, as
.BR less
leaves around a zombie child in this case. This could be worked around.

Bugs should be reported to the author (see below) or via the issue tracker on
GitHub.

.SH AUTHORS

reptyr was written by Nelson Elhage <[email protected]>.

.SH HOMEPAGE

.URL https://github.com/nelhage/reptyr

.SH SEE ALSO

.BR neercs (1),
.BR screen (1)
2 changes: 2 additions & 0 deletions debian/reptyr.docs
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
ChangeLog
NOTES
README.md
Loading

0 comments on commit 5962a0e

Please sign in to comment.