diff options
Diffstat (limited to 't/recipes/checks/files/permissions/files-bad-perm-owner/build-spec/debian')
9 files changed, 98 insertions, 0 deletions
diff --git a/t/recipes/checks/files/permissions/files-bad-perm-owner/build-spec/debian/binary.docs b/t/recipes/checks/files/permissions/files-bad-perm-owner/build-spec/debian/binary.docs new file mode 100644 index 0000000..42f92ea --- /dev/null +++ b/t/recipes/checks/files/permissions/files-bad-perm-owner/build-spec/debian/binary.docs @@ -0,0 +1,3 @@ +read-only +README +some-file diff --git a/t/recipes/checks/files/permissions/files-bad-perm-owner/build-spec/debian/binary.init b/t/recipes/checks/files/permissions/files-bad-perm-owner/build-spec/debian/binary.init new file mode 100644 index 0000000..4ebbdf5 --- /dev/null +++ b/t/recipes/checks/files/permissions/files-bad-perm-owner/build-spec/debian/binary.init @@ -0,0 +1,21 @@ +#!/bin/sh + +set -e + +### BEGIN INIT INFO +# Provides: binary +# Required-Start: +# Required-Stop: +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Useless +# Description: Does nothing +### END INIT INFO + +. /lib/lsb/init-functions + +case "$1" in + start|stop|force-reload|restart|status|*) + echo hello world + ;; +esac diff --git a/t/recipes/checks/files/permissions/files-bad-perm-owner/build-spec/debian/binary.install b/t/recipes/checks/files/permissions/files-bad-perm-owner/build-spec/debian/binary.install new file mode 100644 index 0000000..c759290 --- /dev/null +++ b/t/recipes/checks/files/permissions/files-bad-perm-owner/build-spec/debian/binary.install @@ -0,0 +1,9 @@ +sample.ali usr/lib/some-where/ +script-uid usr/bin/ +script-ugid usr/bin/ +script-gid usr/bin/ +script-wexec usr/bin/ +script-wuid usr/bin/ +script-ro usr/bin/ +script etc/cron.d/ +script etc/emacs.d/ diff --git a/t/recipes/checks/files/permissions/files-bad-perm-owner/build-spec/debian/binary.manpages b/t/recipes/checks/files/permissions/files-bad-perm-owner/build-spec/debian/binary.manpages new file mode 100644 index 0000000..ad3e735 --- /dev/null +++ b/t/recipes/checks/files/permissions/files-bad-perm-owner/build-spec/debian/binary.manpages @@ -0,0 +1 @@ +script-*.1 diff --git a/t/recipes/checks/files/permissions/files-bad-perm-owner/build-spec/debian/clean b/t/recipes/checks/files/permissions/files-bad-perm-owner/build-spec/debian/clean new file mode 100644 index 0000000..1e7cec6 --- /dev/null +++ b/t/recipes/checks/files/permissions/files-bad-perm-owner/build-spec/debian/clean @@ -0,0 +1 @@ +script*.1 diff --git a/t/recipes/checks/files/permissions/files-bad-perm-owner/build-spec/debian/control.in b/t/recipes/checks/files/permissions/files-bad-perm-owner/build-spec/debian/control.in new file mode 100644 index 0000000..5c8703f --- /dev/null +++ b/t/recipes/checks/files/permissions/files-bad-perm-owner/build-spec/debian/control.in @@ -0,0 +1,30 @@ +Source: [% $source %] +Priority: optional +Section: devel +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %] +Rules-Requires-Root: binary-targets + +Package: binary +Architecture: all +Pre-Depends: ${misc:Pre-Depends} +Depends: ${misc:Depends}, lsb-base (>= 3.0-6) +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + +Package: game +Architecture: all +Section: games +Depends: ${misc:Depends} +Description: [% $description %] - game + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + . + Game package. + diff --git a/t/recipes/checks/files/permissions/files-bad-perm-owner/build-spec/debian/game.install b/t/recipes/checks/files/permissions/files-bad-perm-owner/build-spec/debian/game.install new file mode 100644 index 0000000..f708f99 --- /dev/null +++ b/t/recipes/checks/files/permissions/files-bad-perm-owner/build-spec/debian/game.install @@ -0,0 +1 @@ +script usr/games/ diff --git a/t/recipes/checks/files/permissions/files-bad-perm-owner/build-spec/debian/game.manpages b/t/recipes/checks/files/permissions/files-bad-perm-owner/build-spec/debian/game.manpages new file mode 100644 index 0000000..8d16fb4 --- /dev/null +++ b/t/recipes/checks/files/permissions/files-bad-perm-owner/build-spec/debian/game.manpages @@ -0,0 +1 @@ +script.1 diff --git a/t/recipes/checks/files/permissions/files-bad-perm-owner/build-spec/debian/rules b/t/recipes/checks/files/permissions/files-bad-perm-owner/build-spec/debian/rules new file mode 100644 index 0000000..951f84c --- /dev/null +++ b/t/recipes/checks/files/permissions/files-bad-perm-owner/build-spec/debian/rules @@ -0,0 +1,31 @@ +#!/usr/bin/make -f + +GPKG:=game +PKG:=binary + +%: + dh $@ + +override_dh_auto_build: + for N in uid gid ugid wexec wuid ro; do \ + sed s/script/script-$$N/ < script > script-$$N ; \ + pod2man --section 1 script-$$N > script-$$N.1 ; \ + done + pod2man --section 1 script > script.1 + +override_dh_fixperms: + dh_fixperms + + chmod 0444 debian/$(PKG)/usr/share/doc/$(PKG)/read-only + chmod 4755 debian/$(PKG)/usr/bin/script-uid + chmod 2755 debian/$(PKG)/usr/bin/script-gid + chmod 6755 debian/$(PKG)/usr/bin/script-ugid + chmod 0775 debian/$(PKG)/usr/bin/script-wexec + chmod 4744 debian/$(PKG)/usr/bin/script-wuid + chmod 0751 debian/$(PKG)/usr/bin/script-ro + chmod 0644 debian/$(PKG)/usr/lib/some-where/sample.ali + chmod 0744 debian/$(PKG)/usr/share/doc/$(PKG) + chmod 0755 debian/$(PKG)/usr/share/doc/$(PKG)/some-file + chmod 0755 debian/$(PKG)/etc/cron.d/script + chmod 0755 debian/$(PKG)/etc/emacs.d/script + chmod 0765 debian/$(PKG)/etc/init.d/binary |