From e6d7e8e6936e70e1d6a7d1f5df5171280befbfd1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Wed, 15 Jan 2014 20:07:03 +0100 Subject: Update remaining metapackages on Debian and Ubuntu to conform the current automated scripts on build-farm --- .../scripts/casper-bottom/15autologin-trinity | 41 +++++++++++++++++ .../scripts/casper-bottom/25adduser-trinity | 33 ++++++++++++++ .../metapackages/casper-trinity/debian/rules | 16 +++++++ .../scripts/casper-bottom/15autologin-trinity | 41 ----------------- .../scripts/casper-bottom/25adduser-trinity | 33 -------------- ubuntu/precise/metapackages/rename-meta/Makefile | 8 ---- .../precise/metapackages/rename-meta/debian/rules | 1 - ubuntu/precise/metapackages/sudo-trinity/Makefile | 12 ----- .../metapackages/sudo-trinity/debian/changelog | 0 .../metapackages/sudo-trinity/debian/compat | 0 .../precise/metapackages/sudo-trinity/debian/dirs | 0 .../sudo-trinity/debian/distrospecific/Makefile | 12 +++++ .../distrospecific/etc/sudoers.d/tde-secure-path | 1 + .../precise/metapackages/sudo-trinity/debian/rules | 16 +++++++ .../sudo-trinity/etc/sudoers.d/tde-secure-path | 1 - .../distrospecific/ubiquity-hooks/55_trinity | 52 ++++++++++++++++++++++ .../metapackages/ubiquity-trinity/debian/rules | 16 +++++++ .../ubiquity-trinity/ubiquity-hooks/55_trinity | 52 ---------------------- 18 files changed, 187 insertions(+), 148 deletions(-) create mode 100755 ubuntu/precise/metapackages/casper-trinity/debian/distrospecific/scripts/casper-bottom/15autologin-trinity create mode 100755 ubuntu/precise/metapackages/casper-trinity/debian/distrospecific/scripts/casper-bottom/25adduser-trinity delete mode 100755 ubuntu/precise/metapackages/casper-trinity/scripts/casper-bottom/15autologin-trinity delete mode 100755 ubuntu/precise/metapackages/casper-trinity/scripts/casper-bottom/25adduser-trinity delete mode 100644 ubuntu/precise/metapackages/rename-meta/Makefile delete mode 100755 ubuntu/precise/metapackages/sudo-trinity/Makefile mode change 100755 => 100644 ubuntu/precise/metapackages/sudo-trinity/debian/changelog mode change 100755 => 100644 ubuntu/precise/metapackages/sudo-trinity/debian/compat mode change 100755 => 100644 ubuntu/precise/metapackages/sudo-trinity/debian/dirs create mode 100644 ubuntu/precise/metapackages/sudo-trinity/debian/distrospecific/Makefile create mode 100644 ubuntu/precise/metapackages/sudo-trinity/debian/distrospecific/etc/sudoers.d/tde-secure-path delete mode 100644 ubuntu/precise/metapackages/sudo-trinity/etc/sudoers.d/tde-secure-path create mode 100755 ubuntu/precise/metapackages/ubiquity-trinity/debian/distrospecific/ubiquity-hooks/55_trinity delete mode 100755 ubuntu/precise/metapackages/ubiquity-trinity/ubiquity-hooks/55_trinity (limited to 'ubuntu/precise/metapackages') diff --git a/ubuntu/precise/metapackages/casper-trinity/debian/distrospecific/scripts/casper-bottom/15autologin-trinity b/ubuntu/precise/metapackages/casper-trinity/debian/distrospecific/scripts/casper-bottom/15autologin-trinity new file mode 100755 index 000000000..a018471b7 --- /dev/null +++ b/ubuntu/precise/metapackages/casper-trinity/debian/distrospecific/scripts/casper-bottom/15autologin-trinity @@ -0,0 +1,41 @@ +#!/bin/sh + +PREREQ="" +DESCRIPTION="Setting up automatic login (Trinity)..." + +prereqs() +{ + echo "$PREREQ" +} + +case $1 in +# get pre-requisites +prereqs) + prereqs + exit 0 + ;; +esac + +. /scripts/casper-functions + +log_begin_msg "$DESCRIPTION" + +if [ -f /root/etc/trinity/kdm/kdmrc ]; then + # Configure KDM-Trinity autologin + sed -i -r \ + -e "s/^#?AutoLoginEnable=.*\$/AutoLoginEnable=true/" \ + -e "s/^#?AutoLoginUser=.*\$/AutoLoginUser=$USERNAME/" \ + -e "s/^#?AutoLoginAgain=.*\$/AutoLoginAgain=true/" \ + /root/etc/trinity/kdm/kdmrc +fi + +if [ -f /root/etc/trinity/tdm/tdmrc ]; then + # Configure TDM-Trinity autologin + sed -i -r \ + -e "s/^#?AutoLoginEnable=.*\$/AutoLoginEnable=true/" \ + -e "s/^#?AutoLoginUser=.*\$/AutoLoginUser=$USERNAME/" \ + -e "s/^#?AutoLoginAgain=.*\$/AutoLoginAgain=true/" \ + /root/etc/trinity/tdm/tdmrc +fi + +log_end_msg diff --git a/ubuntu/precise/metapackages/casper-trinity/debian/distrospecific/scripts/casper-bottom/25adduser-trinity b/ubuntu/precise/metapackages/casper-trinity/debian/distrospecific/scripts/casper-bottom/25adduser-trinity new file mode 100755 index 000000000..bd764edcc --- /dev/null +++ b/ubuntu/precise/metapackages/casper-trinity/debian/distrospecific/scripts/casper-bottom/25adduser-trinity @@ -0,0 +1,33 @@ +#!/bin/sh + +PREREQ="" +DESCRIPTION="Adding live session user (Trinity)..." + +prereqs() +{ + echo "$PREREQ" +} + +case $1 in +# get pre-requisites +prereqs) + prereqs + exit 0 + ;; +esac + +. /scripts/casper-functions + +log_begin_msg "$DESCRIPTION" + +#Trinity +if [ -d "/root/etc/trinity" ]; then + if [ -f "/root/usr/share/applications/ubiquity-gtkui.desktop" ]; then + sed -i 's/\(OnlyShowIn=.*\)/\1KDE;TDE;/' "/root/usr/share/applications/ubiquity-gtkui.desktop" + fi + if [ -f "/root/home/$USERNAME/Desktop/ubiquity-gtkui.desktop" ]; then + sed -i 's/\(OnlyShowIn=.*\)/\1KDE;TDE;/' "/root/home/$USERNAME/Desktop/ubiquity-gtkui.desktop" + fi +fi + +log_end_msg diff --git a/ubuntu/precise/metapackages/casper-trinity/debian/rules b/ubuntu/precise/metapackages/casper-trinity/debian/rules index 9ded53d05..e6b6748ab 100755 --- a/ubuntu/precise/metapackages/casper-trinity/debian/rules +++ b/ubuntu/precise/metapackages/casper-trinity/debian/rules @@ -4,3 +4,19 @@ include /usr/share/cdbs/1/rules/debhelper.mk DEB_DH_BUILDDEB_ARGS += -- -Z$(shell dpkg-deb --help | grep -q ":.* xz[,.]" \ && echo xz || echo bzip2) + +build: debian/stamp-distrospecific + +debian/stamp-distrospecific: + dh_testdir + [ -e debian/stamp-distrospecific ] || \ + ls -a1 debian/distrospecific | grep -v "^\.*$$" | \ + tee debian/stamp-distrospecific | \ + tr "\n" "\0" | (cd debian/distrospecific && xargs -r0 mv -t ../..) + +clean:: + dh_testdir + [ ! -e debian/stamp-distrospecific ] || \ + cat debian/stamp-distrospecific | \ + tr "\n" "\0" | xargs -r0 mv -t debian/distrospecific + rm -f debian/stamp-distrospecific diff --git a/ubuntu/precise/metapackages/casper-trinity/scripts/casper-bottom/15autologin-trinity b/ubuntu/precise/metapackages/casper-trinity/scripts/casper-bottom/15autologin-trinity deleted file mode 100755 index a018471b7..000000000 --- a/ubuntu/precise/metapackages/casper-trinity/scripts/casper-bottom/15autologin-trinity +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/sh - -PREREQ="" -DESCRIPTION="Setting up automatic login (Trinity)..." - -prereqs() -{ - echo "$PREREQ" -} - -case $1 in -# get pre-requisites -prereqs) - prereqs - exit 0 - ;; -esac - -. /scripts/casper-functions - -log_begin_msg "$DESCRIPTION" - -if [ -f /root/etc/trinity/kdm/kdmrc ]; then - # Configure KDM-Trinity autologin - sed -i -r \ - -e "s/^#?AutoLoginEnable=.*\$/AutoLoginEnable=true/" \ - -e "s/^#?AutoLoginUser=.*\$/AutoLoginUser=$USERNAME/" \ - -e "s/^#?AutoLoginAgain=.*\$/AutoLoginAgain=true/" \ - /root/etc/trinity/kdm/kdmrc -fi - -if [ -f /root/etc/trinity/tdm/tdmrc ]; then - # Configure TDM-Trinity autologin - sed -i -r \ - -e "s/^#?AutoLoginEnable=.*\$/AutoLoginEnable=true/" \ - -e "s/^#?AutoLoginUser=.*\$/AutoLoginUser=$USERNAME/" \ - -e "s/^#?AutoLoginAgain=.*\$/AutoLoginAgain=true/" \ - /root/etc/trinity/tdm/tdmrc -fi - -log_end_msg diff --git a/ubuntu/precise/metapackages/casper-trinity/scripts/casper-bottom/25adduser-trinity b/ubuntu/precise/metapackages/casper-trinity/scripts/casper-bottom/25adduser-trinity deleted file mode 100755 index bd764edcc..000000000 --- a/ubuntu/precise/metapackages/casper-trinity/scripts/casper-bottom/25adduser-trinity +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/sh - -PREREQ="" -DESCRIPTION="Adding live session user (Trinity)..." - -prereqs() -{ - echo "$PREREQ" -} - -case $1 in -# get pre-requisites -prereqs) - prereqs - exit 0 - ;; -esac - -. /scripts/casper-functions - -log_begin_msg "$DESCRIPTION" - -#Trinity -if [ -d "/root/etc/trinity" ]; then - if [ -f "/root/usr/share/applications/ubiquity-gtkui.desktop" ]; then - sed -i 's/\(OnlyShowIn=.*\)/\1KDE;TDE;/' "/root/usr/share/applications/ubiquity-gtkui.desktop" - fi - if [ -f "/root/home/$USERNAME/Desktop/ubiquity-gtkui.desktop" ]; then - sed -i 's/\(OnlyShowIn=.*\)/\1KDE;TDE;/' "/root/home/$USERNAME/Desktop/ubiquity-gtkui.desktop" - fi -fi - -log_end_msg diff --git a/ubuntu/precise/metapackages/rename-meta/Makefile b/ubuntu/precise/metapackages/rename-meta/Makefile deleted file mode 100644 index a36e6a1c9..000000000 --- a/ubuntu/precise/metapackages/rename-meta/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -FPACKAGE = ubuntu-trinity-rename-meta -VERSION = 1.0 - -build: - -clean: - -install: diff --git a/ubuntu/precise/metapackages/rename-meta/debian/rules b/ubuntu/precise/metapackages/rename-meta/debian/rules index a9e7e66cb..bcf749744 100755 --- a/ubuntu/precise/metapackages/rename-meta/debian/rules +++ b/ubuntu/precise/metapackages/rename-meta/debian/rules @@ -1,5 +1,4 @@ #!/usr/bin/make -f -include /usr/share/cdbs/1/class/makefile.mk include /usr/share/cdbs/1/rules/debhelper.mk DEB_BUILD_OPTIONS := nostrip diff --git a/ubuntu/precise/metapackages/sudo-trinity/Makefile b/ubuntu/precise/metapackages/sudo-trinity/Makefile deleted file mode 100755 index bc4653675..000000000 --- a/ubuntu/precise/metapackages/sudo-trinity/Makefile +++ /dev/null @@ -1,12 +0,0 @@ -FPACKAGE = sudo-trinity -VERSION = 1.0 - -build: - -clean: - -install: - mkdir -p /etc - cp -Rp etc/* $(DESTDIR)/etc/ - chmod -R 644 $(DESTDIR)/etc - chmod -R 0440 $(DESTDIR)/etc/sudoers.d/tde-secure-path \ No newline at end of file diff --git a/ubuntu/precise/metapackages/sudo-trinity/debian/changelog b/ubuntu/precise/metapackages/sudo-trinity/debian/changelog old mode 100755 new mode 100644 diff --git a/ubuntu/precise/metapackages/sudo-trinity/debian/compat b/ubuntu/precise/metapackages/sudo-trinity/debian/compat old mode 100755 new mode 100644 diff --git a/ubuntu/precise/metapackages/sudo-trinity/debian/dirs b/ubuntu/precise/metapackages/sudo-trinity/debian/dirs old mode 100755 new mode 100644 diff --git a/ubuntu/precise/metapackages/sudo-trinity/debian/distrospecific/Makefile b/ubuntu/precise/metapackages/sudo-trinity/debian/distrospecific/Makefile new file mode 100644 index 000000000..f106ff05e --- /dev/null +++ b/ubuntu/precise/metapackages/sudo-trinity/debian/distrospecific/Makefile @@ -0,0 +1,12 @@ +FPACKAGE = sudo-trinity +VERSION = 1.0 + +build: + +clean: + +install: + mkdir -p /etc + cp -Rp etc/* $(DESTDIR)/etc/ + chmod -R 644 $(DESTDIR)/etc + chmod -R 0440 $(DESTDIR)/etc/sudoers.d/tde-secure-path diff --git a/ubuntu/precise/metapackages/sudo-trinity/debian/distrospecific/etc/sudoers.d/tde-secure-path b/ubuntu/precise/metapackages/sudo-trinity/debian/distrospecific/etc/sudoers.d/tde-secure-path new file mode 100644 index 000000000..f3c34f20a --- /dev/null +++ b/ubuntu/precise/metapackages/sudo-trinity/debian/distrospecific/etc/sudoers.d/tde-secure-path @@ -0,0 +1 @@ +Defaults secure_path=/usr/local/sbin:/usr/local/bin:/opt/trinity/sbin:/usr/sbin:/opt/trinity/bin:/usr/bin:/sbin:/bin:/usr/X11R6/bin diff --git a/ubuntu/precise/metapackages/sudo-trinity/debian/rules b/ubuntu/precise/metapackages/sudo-trinity/debian/rules index f8c89d5db..e5e2870b7 100755 --- a/ubuntu/precise/metapackages/sudo-trinity/debian/rules +++ b/ubuntu/precise/metapackages/sudo-trinity/debian/rules @@ -9,3 +9,19 @@ DEB_INSTALL_DOCS_ALL := DEB_DH_BUILDDEB_ARGS += -- -Z$(shell dpkg-deb --help | grep -q ":.* xz[,.]" \ && echo xz || echo bzip2) + +pre-build:: debian/stamp-distrospecific + +debian/stamp-distrospecific: + dh_testdir + [ -e debian/stamp-distrospecific ] || \ + ls -a1 debian/distrospecific | grep -v "^\.*$$" | \ + tee debian/stamp-distrospecific | \ + tr "\n" "\0" | (cd debian/distrospecific && xargs -r0 mv -t ../..) + +clean:: + dh_testdir + [ ! -e debian/stamp-distrospecific ] || \ + cat debian/stamp-distrospecific | \ + tr "\n" "\0" | xargs -r0 mv -t debian/distrospecific + rm -f debian/stamp-distrospecific diff --git a/ubuntu/precise/metapackages/sudo-trinity/etc/sudoers.d/tde-secure-path b/ubuntu/precise/metapackages/sudo-trinity/etc/sudoers.d/tde-secure-path deleted file mode 100644 index f3c34f20a..000000000 --- a/ubuntu/precise/metapackages/sudo-trinity/etc/sudoers.d/tde-secure-path +++ /dev/null @@ -1 +0,0 @@ -Defaults secure_path=/usr/local/sbin:/usr/local/bin:/opt/trinity/sbin:/usr/sbin:/opt/trinity/bin:/usr/bin:/sbin:/bin:/usr/X11R6/bin diff --git a/ubuntu/precise/metapackages/ubiquity-trinity/debian/distrospecific/ubiquity-hooks/55_trinity b/ubuntu/precise/metapackages/ubiquity-trinity/debian/distrospecific/ubiquity-hooks/55_trinity new file mode 100755 index 000000000..e31165c02 --- /dev/null +++ b/ubuntu/precise/metapackages/ubiquity-trinity/debian/distrospecific/ubiquity-hooks/55_trinity @@ -0,0 +1,52 @@ +#! /bin/sh +set -e + +#-- configure autologin +. /usr/share/debconf/confmodule + +export LANG=C # avoid locale errors from perl +ROOT=/target +chroot=chroot +log='log-output -t trinity-livecd' + +db_get passwd/username +USER="$RET" +db_get passwd/auto-login +if [ -n "$USER" ] && [ "$RET" = true ]; then + if $chroot $ROOT [ -f /etc/trinity/kdm/kdmrc ]; then + # Configure KDM autologin + $log $chroot $ROOT sed -i$BACKUP -r \ + -e "s/^#?AutoLoginEnable=.*\$/AutoLoginEnable=true/" \ + -e "s/^#?AutoLoginUser=.*\$/AutoLoginUser=$USER/" \ + -e "s/^#?AutoLoginAgain=.*\$/AutoLoginAgain=true/" \ + /etc/trinity/kdm/kdmrc + fi + + if $chroot $ROOT [ -f /etc/trinity/tdm/tdmrc ]; then + # Configure TDM autologin + $log $chroot $ROOT sed -i$BACKUP -r \ + -e "s/^#?AutoLoginEnable=.*\$/AutoLoginEnable=true/" \ + -e "s/^#?AutoLoginUser=.*\$/AutoLoginUser=$USER/" \ + -e "s/^#?AutoLoginAgain=.*\$/AutoLoginAgain=true/" \ + /etc/trinity/tdm/tdmrc + fi +fi + +#-- cleanup additional packages +packages="" +if [ -f "$ROOT/var/lib/dpkg/info/casper-trinity.list" ]; then + packages="$packages casper-trinity" +fi +if [ -f "$ROOT/var/lib/dpkg/info/ubiquity-trinity.list" ]; then + packages="$packages ubiquity-trinity" +fi +if [ -n "$packages" ]; then + if [ -f "$ROOT/usr/bin/apt-get" ]; then + $chroot $ROOT apt-get -y purge $packages + $chroot $ROOT apt-get -y --purge autoremove + else + $chroot $ROOT dpkg -P $packages + fi +fi + +exit 0 diff --git a/ubuntu/precise/metapackages/ubiquity-trinity/debian/rules b/ubuntu/precise/metapackages/ubiquity-trinity/debian/rules index 9ded53d05..e6b6748ab 100755 --- a/ubuntu/precise/metapackages/ubiquity-trinity/debian/rules +++ b/ubuntu/precise/metapackages/ubiquity-trinity/debian/rules @@ -4,3 +4,19 @@ include /usr/share/cdbs/1/rules/debhelper.mk DEB_DH_BUILDDEB_ARGS += -- -Z$(shell dpkg-deb --help | grep -q ":.* xz[,.]" \ && echo xz || echo bzip2) + +build: debian/stamp-distrospecific + +debian/stamp-distrospecific: + dh_testdir + [ -e debian/stamp-distrospecific ] || \ + ls -a1 debian/distrospecific | grep -v "^\.*$$" | \ + tee debian/stamp-distrospecific | \ + tr "\n" "\0" | (cd debian/distrospecific && xargs -r0 mv -t ../..) + +clean:: + dh_testdir + [ ! -e debian/stamp-distrospecific ] || \ + cat debian/stamp-distrospecific | \ + tr "\n" "\0" | xargs -r0 mv -t debian/distrospecific + rm -f debian/stamp-distrospecific diff --git a/ubuntu/precise/metapackages/ubiquity-trinity/ubiquity-hooks/55_trinity b/ubuntu/precise/metapackages/ubiquity-trinity/ubiquity-hooks/55_trinity deleted file mode 100755 index e31165c02..000000000 --- a/ubuntu/precise/metapackages/ubiquity-trinity/ubiquity-hooks/55_trinity +++ /dev/null @@ -1,52 +0,0 @@ -#! /bin/sh -set -e - -#-- configure autologin -. /usr/share/debconf/confmodule - -export LANG=C # avoid locale errors from perl -ROOT=/target -chroot=chroot -log='log-output -t trinity-livecd' - -db_get passwd/username -USER="$RET" -db_get passwd/auto-login -if [ -n "$USER" ] && [ "$RET" = true ]; then - if $chroot $ROOT [ -f /etc/trinity/kdm/kdmrc ]; then - # Configure KDM autologin - $log $chroot $ROOT sed -i$BACKUP -r \ - -e "s/^#?AutoLoginEnable=.*\$/AutoLoginEnable=true/" \ - -e "s/^#?AutoLoginUser=.*\$/AutoLoginUser=$USER/" \ - -e "s/^#?AutoLoginAgain=.*\$/AutoLoginAgain=true/" \ - /etc/trinity/kdm/kdmrc - fi - - if $chroot $ROOT [ -f /etc/trinity/tdm/tdmrc ]; then - # Configure TDM autologin - $log $chroot $ROOT sed -i$BACKUP -r \ - -e "s/^#?AutoLoginEnable=.*\$/AutoLoginEnable=true/" \ - -e "s/^#?AutoLoginUser=.*\$/AutoLoginUser=$USER/" \ - -e "s/^#?AutoLoginAgain=.*\$/AutoLoginAgain=true/" \ - /etc/trinity/tdm/tdmrc - fi -fi - -#-- cleanup additional packages -packages="" -if [ -f "$ROOT/var/lib/dpkg/info/casper-trinity.list" ]; then - packages="$packages casper-trinity" -fi -if [ -f "$ROOT/var/lib/dpkg/info/ubiquity-trinity.list" ]; then - packages="$packages ubiquity-trinity" -fi -if [ -n "$packages" ]; then - if [ -f "$ROOT/usr/bin/apt-get" ]; then - $chroot $ROOT apt-get -y purge $packages - $chroot $ROOT apt-get -y --purge autoremove - else - $chroot $ROOT dpkg -P $packages - fi -fi - -exit 0 -- cgit v1.2.1