From 5e8cb121d0061bf38eb33be82b0b026ddafeda63 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Wed, 4 Dec 2013 19:14:30 +0000 Subject: [PATCH 01/16] ipif: Fix deprecation of udptunnel so it builds --- debian/rules | 2 +- ipif/Makefile | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/debian/rules b/debian/rules index dbe4360..49c2f01 100755 --- a/debian/rules +++ b/debian/rules @@ -56,8 +56,8 @@ binary-prep: prefix=$t/userv-$$s/usr \ etcdir=$t/userv-$$s/etc \ vardir=$t/userv-$$s/var \ + depr=disable \ gituser=root; \ - depr=disable; \ done # mv debian/tmp/userv-www-cgi debian/tmp/userv-cgi diff --git a/ipif/Makefile b/ipif/Makefile index 0addd4d..78b4972 100644 --- a/ipif/Makefile +++ b/ipif/Makefile @@ -24,7 +24,8 @@ include ../settings.make varlibvpn= $(varlibuserv)/vpn -etcvpn= $(etcdir)/userv/vpn +etcuserv= $(etcdir)/userv +etcvpn= $(etcuserv)/vpn PROGRAM_TARGETS+= PROGRAM_TARGETS$(depr)+= udptunnel-forwarder udptunnel-reconf @@ -36,8 +37,8 @@ TARGETS+= $(PROGRAM_TARGETS) PROGRAMS$(depr)+= udptunnel PROGRAMS+= $(PROGRAM_TARGETS) -DIRS+= $(libuserv) -DIRS$(depr)+= $(bindir) $(services) $(varlibvpn) $(shareuserv) +DIRS+= $(libuserv) $(etcuserv) $(services) +DIRS$(depr)+= $(bindir) $(varlibvpn) $(shareuserv) SHAREFILES$(depr)+= udptunnel-vpn-config.m4 udptunnel-vpn-defaults @@ -49,7 +50,7 @@ OBJS_BFTEST= blowfishtest.o blowfish.o hex.o all: $(TARGETS) -install: installdirs all +install: all mkdir -p $(DIRS) cp -b service $(libuserv)/ipif set -e; for f in $(PROGRAMS); do cp -b $$f $(bindir)/.; done -- 2.11.0 From 28b264ac22b5bb4f39920e6be74d3d59b92c9eac Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Wed, 4 Dec 2013 22:48:38 +0000 Subject: [PATCH 02/16] ipif: Provide head comment of service.c as a txt docs. --- debian/changelog | 1 + ipif/Makefile | 2 ++ ipif/ipif | 2 ++ 3 files changed, 5 insertions(+) diff --git a/debian/changelog b/debian/changelog index c8a0561..a1d232a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,6 +8,7 @@ userv-utils (0.6.0~~iwj1) unstable; urgency=low * Update to GPLv3+; update copyright notices everywhere. * ipif: Update docs to reflect fact that we are now using tun/tap. * ipif: Deprecate udptunnel. + * ipif: Provide head comment of service.c as a txt docs. -- diff --git a/ipif/Makefile b/ipif/Makefile index 78b4972..fe6ec6e 100644 --- a/ipif/Makefile +++ b/ipif/Makefile @@ -38,6 +38,7 @@ PROGRAMS$(depr)+= udptunnel PROGRAMS+= $(PROGRAM_TARGETS) DIRS+= $(libuserv) $(etcuserv) $(services) +DIRS+= $(docdir)/userv-ipif DIRS$(depr)+= $(bindir) $(varlibvpn) $(shareuserv) SHAREFILES$(depr)+= udptunnel-vpn-config.m4 udptunnel-vpn-defaults @@ -59,6 +60,7 @@ install: all set -e; for f in $(SHAREFILES); do cp $$f $(shareuserv)/.; done install-docs: + sed -n '1,/^$$/p' service.c >$(docdir)/userv-ipif/service.c.txt install-examples: set -e; if [ "x$depr" = x ]; then \ diff --git a/ipif/ipif b/ipif/ipif index f8c5838..c6784c7 100644 --- a/ipif/ipif +++ b/ipif/ipif @@ -1,3 +1,5 @@ +# See /usr/share/doc/userv-ipif/service.c.txt +# if ( grep calling-user-shell /etc/shells & glob service-user root ) -- 2.11.0 From 0b0a2c117e93900891684df973d09e3a4b302fff Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sun, 8 Dec 2013 13:01:22 +0000 Subject: [PATCH 03/16] Use dh(1). WIP. --- debian/changelog | 8 +- debian/compat | 1 + debian/rules | 87 +++++++--------------- .../postinst => userv-dyndns.postinst} | 0 .../postinst => userv-git-daemon.postinst} | 0 5 files changed, 33 insertions(+), 63 deletions(-) create mode 100644 debian/compat rename debian/{userv-dyndns/postinst => userv-dyndns.postinst} (100%) rename debian/{userv-git-daemon/postinst => userv-git-daemon.postinst} (100%) diff --git a/debian/changelog b/debian/changelog index a1d232a..57b0eea 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +userv-utils (0.6.0~~iwj2) unstable; urgency=low + + * Use dh(1). WIP. + + -- + userv-utils (0.6.0~~iwj1) unstable; urgency=low * WIP @@ -10,7 +16,7 @@ userv-utils (0.6.0~~iwj1) unstable; urgency=low * ipif: Deprecate udptunnel. * ipif: Provide head comment of service.c as a txt docs. - -- + -- Ian Jackson Wed, 04 Dec 2013 23:01:37 +0000 userv-utils (0.5.0) unstable; urgency=low diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000..45a4fb7 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +8 diff --git a/debian/rules b/debian/rules index 49c2f01..c67fbb9 100755 --- a/debian/rules +++ b/debian/rules @@ -30,27 +30,21 @@ cwd= $(shell pwd) d= $(cwd)/debian t= $d/tmp -build: +%: + dh $@ + +override_dh_auto_configure: + +override_dh_auto_build: $(checkdir) set -e; for s in $(subdirs_build); do \ $(MAKE) -C $$s all depr=disable; \ done touch build -clean: - $(checkdir) - rm -f build - set -e; for s in $(subdirs_build); do \ - $(MAKE) -C $$s -i distclean || \ - $(MAKE) -C $$s -f Makefile.in distclean; \ - done - rm -rf *~ debian/tmp debian/*~ debian/files* debian/substvars* - -binary-prep: +override_dh_auto_install: $(checkdir) - rm -rf debian/tmp* - # - # + rm -rf $t set -e; for s in $(subdirs_build) $(subdirs_nobuild); do \ $(MAKE) -C $$s install install-docs install-examples \ prefix=$t/userv-$$s/usr \ @@ -59,11 +53,13 @@ binary-prep: depr=disable \ gituser=root; \ done - # - mv debian/tmp/userv-www-cgi debian/tmp/userv-cgi - mv debian/tmp/userv-groupmanage/usr/share/doc/groupmanage \ - debian/tmp/userv-groupmanage/usr/share/doc/userv-groupmanage - # + cd $t; for f in *; do rm -rf ../$$f; mv $$f ..; done + +override_dh_install: + mv debian/userv-www-cgi debian/userv-cgi + mv debian/userv-groupmanage/usr/share/doc/groupmanage \ + debian/userv-groupmanage/usr/share/doc/userv-groupmanage + @: set -e; for p in $(packages); do \ install -d $t/$$p/DEBIAN $t/$$p/usr/share/doc/$$p; \ cp debian/copyright debian/changelog \ @@ -72,7 +68,7 @@ binary-prep: $t/$$p/usr/share/doc/$$p/changelog.Debian.gz; \ gzip -9v $t/$$p/usr/share/doc/$$p/changelog; \ done - # + @: rename 's/\.example$$//' $t/userv-ipif/etc/userv/vpn/*.example \ $t/userv-dyndns/etc/userv/dyndns-service-users.example \ $t/userv-groupmanage/etc/groupmanage.conf.example @@ -84,44 +80,18 @@ binary-prep: find etc -type f -exec printf '/%s\n' '{}' ';' \ >>DEBIAN/conffiles; \ done - # + @: mv $t/userv-misc/usr/bin/mailq $t/userv-misc/usr/bin/mailq.userv - # -# gzip -9f $t/*/usr/share/man/man*/* - -binary-hook-userv-misc: -binary-hook-userv-groupmanage: -binary-hook-userv-cgi: -binary-hook-userv-dyndns: -binary-hook-userv-ipif: -binary-hook-userv-git-daemon: + @: -binary-one: - set -e; for f in preinst postinst prerm postrm conffiles; do \ - test -f debian/$p/$$f || continue; \ - cp debian/$p/$$f $t/$p/DEBIAN/$$f; \ - chmod u=rwX,go=rX $t/$p/DEBIAN/$$f; \ - done - dpkg-gencontrol -p$p -P$t/$p -Tdebian/sv-$p - chown -R root.root debian/tmp - chmod -R g-ws debian/tmp - debian/rules binary-hook-$p - dpkg --build $t/$p .. - -binary-indep: checkroot build binary-prep - set -e; for p in $(packages_indep); do \ - debian/rules binary-one p=$$p; done - -binary-arch: checkroot build binary-prep +override_dh_auto_clean: $(checkdir) - dpkg-shlibdeps -Tdebian/sv-userv-ipif \ - $t/userv-ipif/usr/bin/udptunnel-forwarder \ - $t/userv-ipif/usr/lib/userv/ipif - dpkg-shlibdeps -Tdebian/sv-userv-cgi \ - $t/userv-cgi/usr/lib/userv/cgi/target \ - $t/userv-cgi/usr/lib/userv/cgi/cgi/ucgi - set -e; for p in $(packages_arch); \ - do debian/rules binary-one p=$$p; done + rm -f build + set -e; for s in $(subdirs_build); do \ + $(MAKE) -C $$s -i distclean || \ + $(MAKE) -C $$s -f Makefile.in distclean; \ + done + rm -rf *~ debian/tmp debian/*~ debian/files* debian/substvars* define checkdir test -f ipif/service.c @@ -129,13 +99,6 @@ endef # Below here is fairly generic really -binary: binary-indep binary-arch - -source diff: - @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false - checkroot: $(checkdir) test root = "`whoami`" - -.PHONY: binary binary-arch binary-indep clean checkroot diff --git a/debian/userv-dyndns/postinst b/debian/userv-dyndns.postinst similarity index 100% rename from debian/userv-dyndns/postinst rename to debian/userv-dyndns.postinst diff --git a/debian/userv-git-daemon/postinst b/debian/userv-git-daemon.postinst similarity index 100% rename from debian/userv-git-daemon/postinst rename to debian/userv-git-daemon.postinst -- 2.11.0 From 3b1223842b188f00747bae23b6cd82e62d550f5b Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Mon, 9 Dec 2013 15:54:16 +0000 Subject: [PATCH 04/16] dh(1): fix so that it works. Output is now identical except that: * changelog.Debian.gz -> changelog.gz symlink no longer present * DEBIAN/md5sums now _is_ present --- .gitignore | 12 ++++++++++++ debian/.gitignore | 3 --- debian/changelog | 2 +- debian/rules | 54 +++++++++++++++++++++--------------------------------- 4 files changed, 34 insertions(+), 37 deletions(-) delete mode 100644 debian/.gitignore diff --git a/.gitignore b/.gitignore index 0b6440f..13c30c2 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,18 @@ *~ *.new +debian/*.substvars +debian/*.debhelper.log +debian/tmp +debian/files + +debian/userv-cgi +debian/userv-dyndns +debian/userv-git-daemon +debian/userv-groupmanage +debian/userv-ipif +debian/userv-misc + dist_tmp userv-utils-*.tar.gz build diff --git a/debian/.gitignore b/debian/.gitignore deleted file mode 100644 index 1e64510..0000000 --- a/debian/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -sv-* -tmp -files diff --git a/debian/changelog b/debian/changelog index 57b0eea..0fe288b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,7 +2,7 @@ userv-utils (0.6.0~~iwj2) unstable; urgency=low * Use dh(1). WIP. - -- + -- Ian Jackson Sun, 08 Dec 2013 13:38:23 +0000 userv-utils (0.6.0~~iwj1) unstable; urgency=low diff --git a/debian/rules b/debian/rules index c67fbb9..2c604d8 100755 --- a/debian/rules +++ b/debian/rules @@ -28,7 +28,6 @@ packages= $(packages_indep) $(packages_arch) cwd= $(shell pwd) d= $(cwd)/debian -t= $d/tmp %: dh $@ @@ -44,45 +43,34 @@ override_dh_auto_build: override_dh_auto_install: $(checkdir) - rm -rf $t + - + set -e; for p in $(packages); do rm -rf $d/$$p; done + - set -e; for s in $(subdirs_build) $(subdirs_nobuild); do \ + t=$d/userv-$$s; \ + rm -rf $$t; \ $(MAKE) -C $$s install install-docs install-examples \ - prefix=$t/userv-$$s/usr \ - etcdir=$t/userv-$$s/etc \ - vardir=$t/userv-$$s/var \ + prefix=$$t/usr \ + etcdir=$$t/etc \ + vardir=$$t/var \ depr=disable \ - gituser=root; \ + gituser=root \ + ; \ done - cd $t; for f in *; do rm -rf ../$$f; mv $$f ..; done - -override_dh_install: + - mv debian/userv-www-cgi debian/userv-cgi mv debian/userv-groupmanage/usr/share/doc/groupmanage \ debian/userv-groupmanage/usr/share/doc/userv-groupmanage - @: - set -e; for p in $(packages); do \ - install -d $t/$$p/DEBIAN $t/$$p/usr/share/doc/$$p; \ - cp debian/copyright debian/changelog \ - $t/$$p/usr/share/doc/$$p/; \ - ln -s changelog.gz \ - $t/$$p/usr/share/doc/$$p/changelog.Debian.gz; \ - gzip -9v $t/$$p/usr/share/doc/$$p/changelog; \ - done - @: - rename 's/\.example$$//' $t/userv-ipif/etc/userv/vpn/*.example \ - $t/userv-dyndns/etc/userv/dyndns-service-users.example \ - $t/userv-groupmanage/etc/groupmanage.conf.example - rename 's/\.distrib$$//' $t/*/etc/userv/services.d/*.distrib - rename 's/$$/\.disabled/' $t/userv-misc/etc/userv/services.d/mailq - set -e; for p in $(packages); do \ - cd $t/$$p; \ - test ! -d etc || \ - find etc -type f -exec printf '/%s\n' '{}' ';' \ - >>DEBIAN/conffiles; \ - done - @: - mv $t/userv-misc/usr/bin/mailq $t/userv-misc/usr/bin/mailq.userv - @: + - + rename 's/\.example$$//' $d/userv-ipif/etc/userv/vpn/*.example \ + $d/userv-dyndns/etc/userv/dyndns-service-users.example \ + $d/userv-groupmanage/etc/groupmanage.conf.example + rename 's/\.distrib$$//' $d/*/etc/userv/services.d/*.distrib + rename 's/$$/\.disabled/' $d/userv-misc/etc/userv/services.d/mailq + - + mv $d/userv-misc/usr/bin/mailq $d/userv-misc/usr/bin/mailq.userv + +override_dh_install: override_dh_auto_clean: $(checkdir) -- 2.11.0 From 4c34768665f121ebbd3c46c4769e81d561db2022 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Mon, 9 Dec 2013 16:38:15 +0000 Subject: [PATCH 05/16] Correct binary package dependencies by referencing substvars in debian/control. --- debian/changelog | 7 +++++++ debian/control | 11 ++++++----- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/debian/changelog b/debian/changelog index 0fe288b..b409efb 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +userv-utils (0.6.0~~iwj3) unstable; urgency=low + + * Correct binary package dependencies by referencing substvars in + debian/control. + + -- + userv-utils (0.6.0~~iwj2) unstable; urgency=low * Use dh(1). WIP. diff --git a/debian/control b/debian/control index 8b6e3e5..a92cb18 100644 --- a/debian/control +++ b/debian/control @@ -6,7 +6,7 @@ Standards-Version: 2.1.1.0 Package: userv-ipif Architecture: any -Depends: userv +Depends: userv, ${shlibs:Depends}, ${misc:Depends} Recommends: ssh Description: VPN system (and user-mode network interface) userv-ipif is a userv service to allow non-root users to create @@ -23,7 +23,7 @@ Description: VPN system (and user-mode network interface) Package: userv-dyndns Architecture: all -Depends: userv, chiark-utils-bin +Depends: userv, chiark-utils-bin, ${perl:Depends}, ${misc:Depends} Recommends: bind Description: dynamic DNS for shell account users userv-dyndns is a userv service which allows non-root users to @@ -37,7 +37,7 @@ Description: dynamic DNS for shell account users Package: userv-cgi Architecture: any -Depends: userv +Depends: userv, ${shlibs:Depends}, ${misc:Depends} Recommends: httpd Description: user-provided CGI scripts invoked by userv This package contains ucgi, a userv service which allows CGI programs @@ -56,7 +56,7 @@ Description: user-provided CGI scripts invoked by userv Package: userv-groupmanage Architecture: all -Depends: userv +Depends: userv, ${perl:Depends}, ${misc:Depends} Description: user-controlled group membership groupmanage is a userv service which allows individual shell users to create UN*X groups, and/or to change the membership of existing @@ -67,7 +67,7 @@ Description: user-controlled group membership Package: userv-git-daemon Architecture: all -Depends: userv, git-core +Depends: userv, git-core, adduser, ${perl:Depends}, ${misc:Depends} Description: per-user git daemon service userv-git-daemon allows users to publish git repositories which will be published via the git protocol on 9418. This is a bit like @@ -82,6 +82,7 @@ Description: per-user git daemon service Package: userv-misc Architecture: all Depends: userv +Recommends: ${perl:Depends}, ${misc:Depends} Description: miscellaneous small userv scripts This package a few small userv services. Since you must choose whether to install this package or not as one lump, the default -- 2.11.0 From 697a23fbb4b04e5487341c7deb4ec153ab4b3daa Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Mon, 9 Dec 2013 16:38:47 +0000 Subject: [PATCH 06/16] Add dependency on debhelper. --- debian/changelog | 1 + debian/control | 1 + 2 files changed, 2 insertions(+) diff --git a/debian/changelog b/debian/changelog index b409efb..854c0b7 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,7 @@ userv-utils (0.6.0~~iwj3) unstable; urgency=low * Correct binary package dependencies by referencing substvars in debian/control. + * Add dependency on debhelper. -- diff --git a/debian/control b/debian/control index a92cb18..8f931e9 100644 --- a/debian/control +++ b/debian/control @@ -3,6 +3,7 @@ Section: admin Priority: extra Maintainer: Ian Jackson Standards-Version: 2.1.1.0 +Build-Depends: debhelper (>= 8) Package: userv-ipif Architecture: any -- 2.11.0 From cc9e2e6b50251d64e23f92fd6e74ecdd2a9580a8 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Mon, 9 Dec 2013 16:39:27 +0000 Subject: [PATCH 07/16] No longer mention SLIP and udptunnel in the userv-ipif Description. --- debian/changelog | 1 + debian/control | 8 +------- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/debian/changelog b/debian/changelog index 854c0b7..bba09f1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,6 +3,7 @@ userv-utils (0.6.0~~iwj3) unstable; urgency=low * Correct binary package dependencies by referencing substvars in debian/control. * Add dependency on debhelper. + * No longer mention SLIP and udptunnel in the userv-ipif Description. -- diff --git a/debian/control b/debian/control index 8f931e9..6d5f24b 100644 --- a/debian/control +++ b/debian/control @@ -11,13 +11,7 @@ Depends: userv, ${shlibs:Depends}, ${misc:Depends} Recommends: ssh Description: VPN system (and user-mode network interface) userv-ipif is a userv service to allow non-root users to create - network interfaces implemented in user space. No kernel patches are - required (the kernel's built-in SLIP driver is used). - . - Based on this, udptunnel is a a simple but flexible VPN program which - uses ssh for authentication and key exchange but sends the packets - over UDP. (Other VPN-over-ssh programs typically do PPP-over-TCP, - which yields poor perfoormance.) Note that udptunnel is not IPSEC. + network interfaces implemented in user space. . The default configuration does set up any users with permission to create network interfaces such as VPN endpoints. -- 2.11.0 From 5944b2aaadde146d718cff350f4dc92658a5ecf1 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Mon, 9 Dec 2013 16:40:02 +0000 Subject: [PATCH 08/16] Americanise spelling of /usr/share/common-licences to ...-licenses. --- debian/changelog | 1 + debian/copyright | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index bba09f1..633cf26 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,6 +4,7 @@ userv-utils (0.6.0~~iwj3) unstable; urgency=low debian/control. * Add dependency on debhelper. * No longer mention SLIP and udptunnel in the userv-ipif Description. + * Americanise spelling of /usr/share/common-licences to ...-licenses. -- diff --git a/debian/copyright b/debian/copyright index 605c67c..f2f12ab 100644 --- a/debian/copyright +++ b/debian/copyright @@ -18,7 +18,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License with -your Debian GNU/Linux system, in /usr/share/common-licences/GPL. +your Debian GNU/Linux system, in /usr/share/common-licenses/GPL. If not, see . -- 2.11.0 From 8840a0218ab7faf0668966318166b909e18b2131 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Mon, 9 Dec 2013 16:41:04 +0000 Subject: [PATCH 09/16] Add debhelper token to postinst scripts. --- debian/changelog | 1 + debian/userv-dyndns.postinst | 2 ++ debian/userv-git-daemon.postinst | 2 ++ 3 files changed, 5 insertions(+) diff --git a/debian/changelog b/debian/changelog index 633cf26..063132f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,6 +5,7 @@ userv-utils (0.6.0~~iwj3) unstable; urgency=low * Add dependency on debhelper. * No longer mention SLIP and udptunnel in the userv-ipif Description. * Americanise spelling of /usr/share/common-licences to ...-licenses. + * Add debhelper token to postinst scripts. -- diff --git a/debian/userv-dyndns.postinst b/debian/userv-dyndns.postinst index 95988c7..da9acd7 100755 --- a/debian/userv-dyndns.postinst +++ b/debian/userv-dyndns.postinst @@ -20,6 +20,8 @@ #!/bin/sh set -e +#DEBHELPER# + user="$(sed -n '/^[a-z]/{p;q;}' /etc/userv/dyndns-service-users)" if id $user >/dev/null 2>&1; then exit 0; fi diff --git a/debian/userv-git-daemon.postinst b/debian/userv-git-daemon.postinst index be6c934..1d4f740 100755 --- a/debian/userv-git-daemon.postinst +++ b/debian/userv-git-daemon.postinst @@ -27,6 +27,8 @@ GITDUSER=git defaults=/etc/default/userv-git-daemon if test -f $defaults; then . $defaults; fi +#DEBHELPER# + if [ "$GITDUSER" ]; then if id $GITDUSER >/dev/null 2>&1; then exit 0; fi -- 2.11.0 From f07baecf09e3be6b1ef01a02fd31f95db702ad86 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Mon, 9 Dec 2013 16:42:32 +0000 Subject: [PATCH 10/16] Change default user for git-daemon to userv-git and default user for dyndns to userv-dyndns. --- debian/changelog | 2 ++ debian/userv-git-daemon.postinst | 2 +- dyndns/Makefile | 2 +- git-daemon/Makefile | 2 +- git-daemon/README | 2 +- 5 files changed, 6 insertions(+), 4 deletions(-) diff --git a/debian/changelog b/debian/changelog index 063132f..bcd63e7 100644 --- a/debian/changelog +++ b/debian/changelog @@ -6,6 +6,8 @@ userv-utils (0.6.0~~iwj3) unstable; urgency=low * No longer mention SLIP and udptunnel in the userv-ipif Description. * Americanise spelling of /usr/share/common-licences to ...-licenses. * Add debhelper token to postinst scripts. + * Change default user for git-daemon to userv-git and + default user for dyndns to userv-dyndns. -- diff --git a/debian/userv-git-daemon.postinst b/debian/userv-git-daemon.postinst index 1d4f740..5ed3b4e 100755 --- a/debian/userv-git-daemon.postinst +++ b/debian/userv-git-daemon.postinst @@ -22,7 +22,7 @@ set -e # You should have received a copy of the GNU General Public License # along with userv-utils; if not, see http://www.gnu.org/licenses/. -GITDUSER=git +GITDUSER=userv-git defaults=/etc/default/userv-git-daemon if test -f $defaults; then . $defaults; fi diff --git a/dyndns/Makefile b/dyndns/Makefile index 3c803bd..e0a769d 100644 --- a/dyndns/Makefile +++ b/dyndns/Makefile @@ -27,7 +27,7 @@ install-examples: mkdir -p $(services) cp dyndns $(services)/dyndns.distrib cp dyndns-domains $(etcuserv)/dyndns-domains.example - echo usdyndns >$(etcuserv)/dyndns-service-users.example + echo userv-dyndns >$(etcuserv)/dyndns-service-users.example install-docs: mkdir -p $(docdir)/userv-dyndns diff --git a/git-daemon/Makefile b/git-daemon/Makefile index ea76975..22407c7 100644 --- a/git-daemon/Makefile +++ b/git-daemon/Makefile @@ -7,7 +7,7 @@ include ../settings.make -gituser= git +gituser= userv-git varloggit= $(varlog)/git TARGETS= git-upload-pack inetd.conf git-daemon git-service logrotate diff --git a/git-daemon/README b/git-daemon/README index 76d9946..97edd70 100644 --- a/git-daemon/README +++ b/git-daemon/README @@ -15,7 +15,7 @@ userv-git-daemon uses $(libuserv), $(etcuserv), and $(services). Type make install. -Create a "git" user that will run the outer part of the git-daemon. +Create a "userv-git" user that will run the outer part of the git-daemon. Ensure your /etc/services contains a line like "git 9418/tcp". Insert the inetd.conf fragment into your /etc/inetd.conf -- 2.11.0 From 0c1c66930bc8d68b849d5bf91da29d30d51dc289 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Mon, 9 Dec 2013 16:43:53 +0000 Subject: [PATCH 11/16] Improve adduser calls: - no longer guard with calls to id, as adduser --quiet is idempotent - pass --shell /bin/false and --no-create-home --- debian/changelog | 3 +++ debian/userv-dyndns.postinst | 7 ++++--- debian/userv-git-daemon.postinst | 6 ++---- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/debian/changelog b/debian/changelog index bcd63e7..93ae89f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,6 +8,9 @@ userv-utils (0.6.0~~iwj3) unstable; urgency=low * Add debhelper token to postinst scripts. * Change default user for git-daemon to userv-git and default user for dyndns to userv-dyndns. + * Improve adduser calls: + - no longer guard with calls to id, as adduser --quiet is idempotent + - pass --shell /bin/false and --no-create-home -- diff --git a/debian/userv-dyndns.postinst b/debian/userv-dyndns.postinst index da9acd7..a6779f9 100755 --- a/debian/userv-dyndns.postinst +++ b/debian/userv-dyndns.postinst @@ -23,7 +23,8 @@ set -e #DEBHELPER# user="$(sed -n '/^[a-z]/{p;q;}' /etc/userv/dyndns-service-users)" -if id $user >/dev/null 2>&1; then exit 0; fi -adduser --system --group --gecos 'userv dyndns' \ - --home /etc/userv +if [ "$user" ]; then + adduser --system --quiet --group --gecos 'userv dyndns' \ + --home /etc/userv --no-create-home --shell /bin/false $user +fi diff --git a/debian/userv-git-daemon.postinst b/debian/userv-git-daemon.postinst index 5ed3b4e..5ccaa88 100755 --- a/debian/userv-git-daemon.postinst +++ b/debian/userv-git-daemon.postinst @@ -30,8 +30,6 @@ if test -f $defaults; then . $defaults; fi #DEBHELPER# if [ "$GITDUSER" ]; then - if id $GITDUSER >/dev/null 2>&1; then exit 0; fi - - adduser --system --group --gecos 'userv git daemon' \ - --home /etc/userv $GITDUSER + adduser --system --quiet --group --gecos 'userv git daemon' \ + --home /etc/userv --no-create-home --shell /bin/false $GITDUSER fi -- 2.11.0 From 71744eff66059ed58518a4e349994e72b6b5247c Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Mon, 9 Dec 2013 16:45:06 +0000 Subject: [PATCH 12/16] Bump Standards-Version to 2.2.0.0. --- debian/changelog | 1 + debian/control | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 93ae89f..56d4277 100644 --- a/debian/changelog +++ b/debian/changelog @@ -11,6 +11,7 @@ userv-utils (0.6.0~~iwj3) unstable; urgency=low * Improve adduser calls: - no longer guard with calls to id, as adduser --quiet is idempotent - pass --shell /bin/false and --no-create-home + * Bump Standards-Version to 2.2.0.0. -- diff --git a/debian/control b/debian/control index 6d5f24b..5aa2e79 100644 --- a/debian/control +++ b/debian/control @@ -2,7 +2,7 @@ Source: userv-utils Section: admin Priority: extra Maintainer: Ian Jackson -Standards-Version: 2.1.1.0 +Standards-Version: 2.2.0.0 Build-Depends: debhelper (>= 8) Package: userv-ipif -- 2.11.0 From 4095898baa10531f861cdceb49cf89e0f7fe9873 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Wed, 11 Dec 2013 18:42:11 +0000 Subject: [PATCH 13/16] Fix typo in userv-cgi long description. --- debian/changelog | 1 + debian/control | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 56d4277..309fbe2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -12,6 +12,7 @@ userv-utils (0.6.0~~iwj3) unstable; urgency=low - no longer guard with calls to id, as adduser --quiet is idempotent - pass --shell /bin/false and --no-create-home * Bump Standards-Version to 2.2.0.0. + * Fix typo in userv-cgi long description. -- diff --git a/debian/control b/debian/control index 5aa2e79..d146a8d 100644 --- a/debian/control +++ b/debian/control @@ -46,7 +46,7 @@ Description: user-provided CGI scripts invoked by userv call, rather than a custom setuid helper. . The default configuration allows the webserver user to invoke users' - CGI programs from each user's ~/public-GI, but to allow external + CGI programs from each user's ~/public-cgi, but to allow external callers to do this, the webserver will also need to be configured. Package: userv-groupmanage -- 2.11.0 From b533cc91878e52c55d3b2154728f25abb203c5ce Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Wed, 11 Dec 2013 18:43:01 +0000 Subject: [PATCH 14/16] Bump Standards-Version to 3.7.0.0. --- debian/changelog | 2 +- debian/control | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 309fbe2..4e3d348 100644 --- a/debian/changelog +++ b/debian/changelog @@ -11,7 +11,7 @@ userv-utils (0.6.0~~iwj3) unstable; urgency=low * Improve adduser calls: - no longer guard with calls to id, as adduser --quiet is idempotent - pass --shell /bin/false and --no-create-home - * Bump Standards-Version to 2.2.0.0. + * Bump Standards-Version to 3.7.0.0. * Fix typo in userv-cgi long description. -- diff --git a/debian/control b/debian/control index d146a8d..1cfde2f 100644 --- a/debian/control +++ b/debian/control @@ -2,7 +2,7 @@ Source: userv-utils Section: admin Priority: extra Maintainer: Ian Jackson -Standards-Version: 2.2.0.0 +Standards-Version: 3.7.0.0 Build-Depends: debhelper (>= 8) Package: userv-ipif -- 2.11.0 From a10e69ac0261443449280ad671513b390b393ab1 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Wed, 11 Dec 2013 22:14:14 +0000 Subject: [PATCH 15/16] Provide various documentation for userv-cgi in /usr/share. --- debian/changelog | 1 + www-cgi/Makefile | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/debian/changelog b/debian/changelog index 4e3d348..159b37b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -13,6 +13,7 @@ userv-utils (0.6.0~~iwj3) unstable; urgency=low - pass --shell /bin/false and --no-create-home * Bump Standards-Version to 3.7.0.0. * Fix typo in userv-cgi long description. + * Provide various documentation for userv-cgi in /usr/share. -- diff --git a/www-cgi/Makefile b/www-cgi/Makefile index 0449389..0246aa0 100644 --- a/www-cgi/Makefile +++ b/www-cgi/Makefile @@ -22,6 +22,7 @@ include ../settings.make uslibdir= $(libdir)/userv/cgi uslibcgidir= $(uslibdir)/cgi +usdocdir= $(docdir)/userv-cgi TARGETS= ucgi ucgitarget @@ -43,6 +44,11 @@ install: all install-examples: install-docs: + mkdir -p $(usdocdir)/examples + cp INSTALL $(usdocdir)/. + cp srm.conf.fragment $(usdocdir)/examples/. + sed -e 's#/usr/local#$(prefix)#' user-cgi.text \ + >$(usdocdir)/userv-cgi.text clean distclean realclean: rm -f $(TARGETS) *.o -- 2.11.0 From 2cee72a39f02307652a2d0c95c95c3d0cd9bc778 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Wed, 11 Dec 2013 22:16:49 +0000 Subject: [PATCH 16/16] Remove obsolete and broken dist target in root Makefile. --- Makefile | 15 --------------- debian/changelog | 1 + 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/Makefile b/Makefile index e5b5973..b4ad809 100644 --- a/Makefile +++ b/Makefile @@ -17,8 +17,6 @@ # You should have received a copy of the GNU General Public License # along with userv-utils; if not, see http://www.gnu.org/licenses/. -VERSION=0.2.99.0.1 - all: @echo >&2 'See README. This is not a unified package.' @@ -30,16 +28,3 @@ distclean: -o -name '.#*' \) \ -print0 | xargs -0r rm -rf -- for f in $(SUBDIRS_DISTCLEAN); do make -C $$f distclean; done - -dist_tmp=dist_tmp/userv-utils-$(VERSION) -dist_prune=\( -name CVS -o -name 'dist_tmp*' \) -dist: distclean - rm -rf dist_tmp* - mkdir dist_tmp $(dist_tmp) - find . $(dist_prune) -prune -o -type d -print | \ - sed -e 's#.*#mkdir -p $(dist_tmp)/&#' | sh - find . $(dist_prune) -prune -o -type f -print | \ - sed -e 's#.*#ln & $(dist_tmp)/&#' | sh - cd dist_tmp && tar cf ../$(dist_tmp).tar `basename $(dist_tmp)` - gzip -9 $(dist_tmp).tar - mv $(dist_tmp).tar.gz . diff --git a/debian/changelog b/debian/changelog index 159b37b..9349c08 100644 --- a/debian/changelog +++ b/debian/changelog @@ -14,6 +14,7 @@ userv-utils (0.6.0~~iwj3) unstable; urgency=low * Bump Standards-Version to 3.7.0.0. * Fix typo in userv-cgi long description. * Provide various documentation for userv-cgi in /usr/share. + * Remove obsolete and broken dist target in root Makefile. -- -- 2.11.0