diff options
Diffstat (limited to 'www-misc')
-rw-r--r-- | www-misc/profile-sync-daemon/ChangeLog | 11 | ||||
-rw-r--r-- | www-misc/profile-sync-daemon/Manifest | 8 | ||||
-rw-r--r-- | www-misc/profile-sync-daemon/files/cronjob | 2 | ||||
-rw-r--r-- | www-misc/profile-sync-daemon/files/daemon | 52 | ||||
-rw-r--r-- | www-misc/profile-sync-daemon/files/psd-manreadme.patch | 79 | ||||
-rw-r--r-- | www-misc/profile-sync-daemon/files/psd-pid.patch | 32 | ||||
-rw-r--r-- | www-misc/profile-sync-daemon/metadata.xml | 5 | ||||
-rw-r--r-- | www-misc/profile-sync-daemon/profile-sync-daemon-2.6.ebuild | 52 |
8 files changed, 241 insertions, 0 deletions
diff --git a/www-misc/profile-sync-daemon/ChangeLog b/www-misc/profile-sync-daemon/ChangeLog new file mode 100644 index 000000000..843bbf5bb --- /dev/null +++ b/www-misc/profile-sync-daemon/ChangeLog @@ -0,0 +1,11 @@ +# ChangeLog for www-misc/profile-sync-daemon +# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 +# $Header: $ + +*profile-sync-daemon-2.6 (10 Jan 2012) + + 10 Jan 2012; hasufell <julian.ospald@googlemail.com> + +profile-sync-daemon-2.6.ebuild, +files/cronjob, +files/daemon, + +files/psd-manreadme.patch, +files/psd-pid.patch, +metadata.xml: + New Ebuild for bug 398431 + diff --git a/www-misc/profile-sync-daemon/Manifest b/www-misc/profile-sync-daemon/Manifest new file mode 100644 index 000000000..5eb945d11 --- /dev/null +++ b/www-misc/profile-sync-daemon/Manifest @@ -0,0 +1,8 @@ +AUX cronjob 44 RMD160 56fe960fc97cd7af4a02d550c8039535da9fb1c6 SHA1 f7974834da21ece11425b530fc8ffb1179464b7d SHA256 9e970ba5901963a4de2467d0a8d4fab1f69bfead2ba20312bf5d233a6adae5d2 +AUX daemon 1168 RMD160 f5a8ef2aa12e9e4c4aa483193b362ca53d919c70 SHA1 04cb11137f6c72582488fab31378c793690b7ed5 SHA256 a3a3b8c6746befb5f4904cae5bf1f352c732b699ac2efaf52c0187e9ffc16fa8 +AUX psd-manreadme.patch 5649 RMD160 6f89a45ce19ad0038416b3f25c9859de99d17f97 SHA1 ea6108a63b3e5431d405f4ef9f1d8927aee922b7 SHA256 9faad56a9fec35a4714c5fcb2687130d81f5120505196b1285173ba65b16acc9 +AUX psd-pid.patch 930 RMD160 eda6cc0ae60321e8755b34a30f2d2244f8662a31 SHA1 d8575f71ad8d780e1fba65f3e881decf543e5328 SHA256 b87fc7bfb70a8e8b73ab2f6f407e941d9d92e4f02c99e86d2b5ddffe72a79232 +DIST profile-sync-daemon-2.6.tar.xz 14492 RMD160 f2fcdc58d5bec08ee0011db40e31a2d165604785 SHA1 0321ce3dc9607b0e17056fee9ce8258854510030 SHA256 d3ece6b68d9258135bfe76790714fdb524068f10b8a45429aa5f800acebc35da +EBUILD profile-sync-daemon-2.6.ebuild 1115 RMD160 6332c030ddd67bd5e6539cbe8e9ca6813986e194 SHA1 8c281e243ff75161f04bdca052557c9590646ad8 SHA256 f9fb06b4932d4dec8acb9f0df4f5a48715d6cef25cd44376793c4b97ab64cb91 +MISC ChangeLog 386 RMD160 026104f2e6f2c707fc5e9c9caa21725980331453 SHA1 32cc60672e97ab85d190fdc9f5d8c0f860f3ed74 SHA256 08bcf2948a0f9f2d44a54af6c3eef98fa76b38c2d48761366ef7d766d711e452 +MISC metadata.xml 208 RMD160 c18611400760e42bdd001905be0a63c2e963bcea SHA1 595816105cac477cb85792a182e15888029118a1 SHA256 c4841c87f0c2b9b5e679a27dc72180be8d508fb3f5df0fbab2ec2c805c0a6d82 diff --git a/www-misc/profile-sync-daemon/files/cronjob b/www-misc/profile-sync-daemon/files/cronjob new file mode 100644 index 000000000..d3f5dfb86 --- /dev/null +++ b/www-misc/profile-sync-daemon/files/cronjob @@ -0,0 +1,2 @@ +#!/bin/sh +/sbin/rc -s psd sync &> /dev/null diff --git a/www-misc/profile-sync-daemon/files/daemon b/www-misc/profile-sync-daemon/files/daemon new file mode 100644 index 000000000..a15e5467c --- /dev/null +++ b/www-misc/profile-sync-daemon/files/daemon @@ -0,0 +1,52 @@ +#!/sbin/runscript +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +description="Webbrowser profile syncing" +extra_commands="sync" +PIDFILE=/var/run/${SVCNAME}.pid + +[ -e /etc/psd.conf ] && . /etc/psd.conf + +start() { + ebegin "Starting Profile-Sync-Daemon" + if [[ -z $USERS ]]; then + eerror "Define at least one user in /etc/psd.conf" + return 1 + fi + + for i in $USERS; do + if [[ ! -d /home/$i ]]; then + eerror "Invalid user defined in /etc/psd.conf" + return 1 + fi + done + + /usr/bin/profile-sync-daemon check + start-stop-daemon --start --pidfile ${PIDFILE} --make-pidfile --background \ + --exec /usr/bin/profile-sync-daemon -- sync + eend $? +} + +stop() { + ebegin "Stopping Profile-Sync-Daemon" + if [[ ! -f $PIDFILE ]]; then + eerror "Profile-Sync-Daemon is not running, nothing to stop!" + return 1 + else + /usr/bin/profile-sync-daemon unsync + rm -f ${PIDFILE} + fi + eend $? +} + +sync() { + ebegin "Syncing browser profiles in tmpfs to physical disc" + if [[ ! -f $PIDFILE ]]; then + eerror "Profile-Sync-Daemon is not running... cannot sync!" + return 1 + else + /usr/bin/profile-sync-daemon sync + fi + eend $? +} diff --git a/www-misc/profile-sync-daemon/files/psd-manreadme.patch b/www-misc/profile-sync-daemon/files/psd-manreadme.patch new file mode 100644 index 000000000..482f6a073 --- /dev/null +++ b/www-misc/profile-sync-daemon/files/psd-manreadme.patch @@ -0,0 +1,79 @@ +--- psd.manpage.old 2012-01-09 22:25:17.000000000 +0100 ++++ psd.manpage 2012-01-10 21:01:35.000000000 +0100 +@@ -6,7 +6,7 @@ + .SH SYNOPSIS + .nf + .fam C +- rc.d [\fIoptions\fP] \fIpsd\fP ++ rc -s \fIpsd\fP [\fIoptions\fP] + + .fam T + .fi +@@ -27,7 +27,7 @@ + .PP + Note that Chromium actually keeps its cache directory separately from its browser profile directory. It is not within the scope of profile-sync-daemon to modify this behavior; users are encouraged to refer to the following url for several work-arounds: https://wiki.archlinux.org/index.php/Chromium_Tips_and_Tweaks#Cache_in_tmpfs + .SH OPTIONS +-Users should not call /usr/bin/profile-sync-daemon directly. Instead use the distro provided /usr/bin/rc.d to interact with \fIpsd\fP via the daemon script. ++Users should not call '/usr/bin/profile-sync-daemon' directly. Instead use the distro provided '/sbin/rc' to interact with \fIpsd\fP via the daemon script. + .TP + .B + start +@@ -41,16 +41,14 @@ + sync + Sync data between locations. The \fBprofile\fP(s) in tmpfs are sync'ed back to the disc and the symlinks are left in place. + .SH SETUP AND USAGE +-Edit the included /etc/psd.conf defining which \fBuser\fP(s) will have their profiles managed by \fIpsd\fP and note that at least one user must be defined. ++Edit the included '/etc/psd.conf' defining which \fBuser\fP(s) will have their profiles managed by \fIpsd\fP and note that at least one user must be defined. + .PP + Example: + USERS="bar foo" + .PP +-The initial synchronization will occur when the daemon starts. Additionally, cron (if running on your system) will call it to sync or update once per hour. Finally, \fIpsd\fP will sync back a final time when it is called to stop. Users can call the daemon to start, stop, or sync like any standard Arch daemon. ++The initial synchronization will occur when the daemon starts. Additionally, you can set up a cronjob with the provided file in '/usr/share/profile-sync-daemon'. Finally, \fIpsd\fP will sync back a final time when it is called to stop. Users can call the daemon to start, stop, or sync like any standard Gentoo daemon. + .PP +-It is highly recommended to start/stop the daemon at boot/shutdown. This is accomplished by adding \fIpsd\fP to the DAEMONS array in /etc/rc.conf like so: +-.PP +-\fBDAEMONS=\fP(\.\.\. @\fIpsd\fP \.\.\.) ++It is highly recommended to start/stop the daemon at boot/shutdown. This is accomplished by adding \fIpsd\fP to the default runlevel by issuing 'rc-update add psd default'. + .PP + For more, see: https://wiki.archlinux.org/index.php/Modprobed_db + .SH BUGS +--- README-for_other_distros.old 2012-01-09 22:24:29.000000000 +0100 ++++ README-for_other_distros 2012-01-10 21:07:38.000000000 +0100 +@@ -2,7 +2,7 @@ + profile-sync-daemon - Symlinks and syncs browser profile dirs to RAM thus reducing HDD/SDD calls and speeding-up browsers. + + SYNOPSIS +- rc.d [options] psd ++ rc -s psd [options] + + DESCRIPTION + Profile-sync-daemon (psd) is a tiny shell script designed to manage your browser's profile in tmpfs and to periodically sync it back to your physical disc (HDD/SSD). This is accomplished via a symlinking step and an innovative use of rsync to maintain back-up and synchronization between the two. One of the major design goals of psd is completely transparent user experience. +@@ -19,23 +19,21 @@ + Note that Chromium actually keeps its cache directory separately from its browser profile directory. It is not within the scope of profile-sync-daemon to modify this behavior; users are encouraged to refer to the following url for several work-arounds: https://wiki.archlinux.org/index.php/Chromium_Tips_and_Tweaks#Cache_in_tmpfs + + OPTIONS +- Users should not call /usr/bin/profile-sync-daemon directly. Instead use the distro provided /usr/bin/rc.d to interact with psd via the daemon script. ++ Users should not call '/usr/bin/profile-sync-daemon' directly. Instead use the distro provided '/sbin/rc' to interact with psd via the daemon script. + + start Turn on psd. Make symlinks and sync the profile(s) from disc to tmpfs. + stop Turn off psd. Sync the profiles(s) from tmpfs back to disc and remove the symlinks. + sync Sync data between locations. The profile(s) in tmpfs are sync'ed back to the disc and the symlinks are left in place. + + SETUP AND USAGE +- Edit the included /etc/psd.conf defining which user(s) will have their profiles managed by psd and note that at least one user must be defined. ++ Edit the included '/etc/psd.conf' defining which user(s) will have their profiles managed by psd and note that at least one user must be defined. + + Example: + USERS="bar foo" + +- The initial synchronization will occur when the daemon starts. Additionally, cron (if running on your system) will call it to sync or update once per hour. Finally, psd will sync back a final time when it is called to stop. Users can call the daemon to start, stop, or sync like any standard Arch daemon. ++ The initial synchronization will occur when the daemon starts. Additionally, you can set up a cronjob with the provided file in '/usr/share/profile-sync-daemon'. Finally, psd will sync back a final time when it is called to stop. Users can call the daemon to start, stop, or sync like any standard Gentoo daemon. + +- It is highly recommended to start/stop the daemon at boot/shutdown. This is accomplished by adding psd to the DAEMONS array in /etc/rc.conf like so: +- +- DAEMONS=(... @psd ...) ++ It is highly recommended to start/stop the daemon at boot/shutdown. This is accomplished by adding psd to the default runlevel by issuing 'rc-update add psd default'. + + For more, see: https://wiki.archlinux.org/index.php/Modprobed_db + diff --git a/www-misc/profile-sync-daemon/files/psd-pid.patch b/www-misc/profile-sync-daemon/files/psd-pid.patch new file mode 100644 index 000000000..d6fe8e986 --- /dev/null +++ b/www-misc/profile-sync-daemon/files/psd-pid.patch @@ -0,0 +1,32 @@ +--- profile-sync-daemon.old 2012-01-09 21:01:57.000000000 +0100 ++++ profile-sync-daemon 2012-01-10 00:33:34.368059351 +0100 +@@ -2,6 +2,8 @@ + # By graysky <graysky AT archlinux DOT us> + # Main part of this script adapted from work by Colin Verot + ++PIDFILE=/var/run/psd.pid ++ + . /etc/psd.conf + + set_which() { +@@ -84,17 +86,17 @@ + case "$1" in + check) + # do not run if the daemon is running +- [[ ! -f /run/daemons/psd ]] && check ++ [[ ! -f $PIDFILE ]] && check + ;; + sync) + sync + ;; + unsync) + # make sure the daemon is running +- [[ -f /run/daemons/psd ]] && unsync ++ [[ -f $PIDFILE ]] && unsync + ;; + *) + # keep user from messing with this directly +- [[ -f /run/daemons/psd ]] && echo "You should not call this script directly, let the /etc/rc.d/psd do it for you!" && exit 1 ++ [[ -f $PIDFILE ]] && echo "You should not call this script directly, let the /etc/rc.d/psd do it for you!" && exit 1 + esac + exit 0 diff --git a/www-misc/profile-sync-daemon/metadata.xml b/www-misc/profile-sync-daemon/metadata.xml new file mode 100644 index 000000000..31dc017fa --- /dev/null +++ b/www-misc/profile-sync-daemon/metadata.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer><email>maintainer-wanted@gentoo.org</email></maintainer> +</pkgmetadata> diff --git a/www-misc/profile-sync-daemon/profile-sync-daemon-2.6.ebuild b/www-misc/profile-sync-daemon/profile-sync-daemon-2.6.ebuild new file mode 100644 index 000000000..f93d93b33 --- /dev/null +++ b/www-misc/profile-sync-daemon/profile-sync-daemon-2.6.ebuild @@ -0,0 +1,52 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI="4" + +inherit eutils + +MY_PN="psd" +DESCRIPTION="Symlinks and syncs browser profile dirs to RAM thus reducing HDD/SDD calls and speeding-up browsers" +HOMEPAGE="https://wiki.archlinux.org/index.php/Profile-sync-daemon" +SRC_URI="http://repo-ck.com/source/${PN}/${P}.tar.xz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +DEPEND="app-arch/xz-utils" +RDEPEND="net-misc/rsync" + +src_prepare() { + # fix manpage/readme for proper gentoo instructions + epatch "${FILESDIR}"/${MY_PN}-manreadme.patch + # fix script to work with our daemon + epatch "${FILESDIR}"/${MY_PN}-pid.patch +} + +src_install() { + # install script + dobin ${PN} + + # install conf + insinto /etc + doins ${MY_PN}.conf + + # install optional cronjob + insinto /usr/share/${PN} + doins "${FILESDIR}"/cronjob + + # install our daemon + newinitd "${FILESDIR}"/daemon ${MY_PN} + + # manpage, readme + dodoc README* + newman ${MY_PN}.manpage ${PN}.1 +} + +pkg_postinst() { + elog "For adding a cronjob use the file" + elog "/usr/share/${PN}/cronjob" +} |