From 1e0ba90c954acabb3be65d477aec72b6a7650671 Mon Sep 17 00:00:00 2001 From: Anish Mangal Date: Wed, 26 Jan 2011 02:53:03 +0000 Subject: Add dextrose-platform and update dextrose-updater rpm --- diff --git a/rpms/dextrose-platform/Makefile b/rpms/dextrose-platform/Makefile new file mode 100644 index 0000000..04f4ab2 --- /dev/null +++ b/rpms/dextrose-platform/Makefile @@ -0,0 +1,21 @@ +# Makefile for source rpm: sugar +# $Id: Makefile,v 1.2 2009/11/25 23:15:39 notting Exp $ +NAME := sugar +SPECFILE = $(firstword $(wildcard *.spec)) + +define find-makefile-common +for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done +endef + +MAKEFILE_COMMON := $(shell $(find-makefile-common)) + +ifeq ($(MAKEFILE_COMMON),) +# attept a checkout +define checkout-makefile-common +test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 +endef + +MAKEFILE_COMMON := $(shell $(checkout-makefile-common)) +endif + +include $(MAKEFILE_COMMON) diff --git a/rpms/dextrose-platform/dextrose-platform.spec b/rpms/dextrose-platform/dextrose-platform.spec new file mode 100644 index 0000000..63908b1 --- /dev/null +++ b/rpms/dextrose-platform/dextrose-platform.spec @@ -0,0 +1,48 @@ +Name: dextrose-platform +Version: 1 +Release: 1%{?dist} +Summary: A wrapper package containing dextrose-platform specific bugfixes. + +Group: Applications/Updating +License: GPLv3 +#URL: http://wiki.sugarlabs.org/go/Dextrose/Updater +Source0: http://people.sugarlabs.org/anish/dextrose-platform.tar.gz +BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) + +BuildArch: noarch + +#BuildRequires: +#Requires: +Packager: Anish Mangal + +%description +A wrapper package containing dextrose-platform specific bugfixes. + +%prep +%setup -q + + +%build + + +%install +rm -rf $RPM_BUILD_ROOT + +mkdir -p $RPM_BUILD_ROOT/etc/powerd/postresume.d +install -m755 $RPM_BUILD_DIR/%{name}-%{version}/etc/powerd/postresume.d/disable_mesh.sh \ +$RPM_BUILD_ROOT/etc/powerd/postresume.d + +%clean +rm -rf $RPM_BUILD_ROOT +rm -rf $RPM_BUILD_DIR/%{name}-%{version} + +%files +%defattr(-,root,root,-) +%doc + +/etc/powerd/postresume.d/disable_mesh.sh + +%changelog +* Tue Jan 25 2011 Anish Mangal 1-1 +- Redisable mesh after suspend. + diff --git a/rpms/dextrose-updater/Makefile b/rpms/dextrose-updater/Makefile new file mode 100644 index 0000000..04f4ab2 --- /dev/null +++ b/rpms/dextrose-updater/Makefile @@ -0,0 +1,21 @@ +# Makefile for source rpm: sugar +# $Id: Makefile,v 1.2 2009/11/25 23:15:39 notting Exp $ +NAME := sugar +SPECFILE = $(firstword $(wildcard *.spec)) + +define find-makefile-common +for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done +endef + +MAKEFILE_COMMON := $(shell $(find-makefile-common)) + +ifeq ($(MAKEFILE_COMMON),) +# attept a checkout +define checkout-makefile-common +test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 +endef + +MAKEFILE_COMMON := $(shell $(checkout-makefile-common)) +endif + +include $(MAKEFILE_COMMON) diff --git a/rpms/dextrose-updater/sbin/dextrose-update b/rpms/dextrose-updater/sbin/dextrose-update deleted file mode 100755 index 0b682d5..0000000 --- a/rpms/dextrose-updater/sbin/dextrose-update +++ /dev/null @@ -1,89 +0,0 @@ -#!/bin/sh - -name="dextrose-update" -. /etc/sysconfig/${name} - -logfile="/var/log/${name}" - -while [ -n "$1" ] ; do - arg=$1 - shift - case ${arg} in - -f | --force) - force=1 - ;; - -h | --help) - echo "Usage: $0 [OPTION]" - echo "" - echo "Dextrose yum updater." - echo "" - echo "Options:" - echo " -f, --force update regarless already made daily check" - echo " -h, --help display this help and exit" - echo "" - echo "Configuration files:" - echo " /etc/sysconfig/${name}" - echo "" - exit 0 - ;; - *) - echo "Unknown argument $1" - exit 1 - ;; - esac -done - -if [ -z "${force}" -a -f ${logfile} ]; then - current_ts=$(date +%F) - check_ts=$(ls ${logfile} -l --time-style=+%F | awk '{print $6}') - - if [ ${current_ts} == ${check_ts} ]; then - echo "Daily check already happened, pass --force to ignore it." - exit 0 - fi -fi - -echo "$(date)" >> $logfile -echo -e "\tRepositories:" ${DEXTROSE_YUM_REPO} >> $logfile - -reboot_pkgs="kernel kernel-firmware" -relogin_pkgs="sugar sugar-artwork sugar-base sugar-datastore sugar-presence-service sugar-toolkit" - -yum="/usr/bin/yum --disablerepo=* --skip-broken --quiet" -for i in $DEXTROSE_YUM_REPO; do - yum="$yum --enablerepo=$i" -done - -updates() { - ${yum} -e0 check-update | awk '/./{print $1 "-" $2}' -} - -to_update=$(updates) -[ "${to_update}" ] || exit 0 - -parse() { - for i in $@; do - echo ${to_update} | grep "\(^\| \)$i\." >/dev/null && echo $i - done -} - -need_reboot=$(parse ${reboot_pkgs}) -need_relogin=$(parse ${relogin_pkgs}) - -echo -e "\tPackages to update:" ${to_update} >> $logfile -${yum} -y update >> $logfile 2>&1 -to_update=$(updates) - -if [ "${need_reboot}" ]; then - if [ "${need_reboot}" != "$(parse ${reboot_pkgs})" ]; then - echo -e "\tNeed to reboot..." >> $logfile - dbus-send --system /org/sugarlabs/system org.sugarlabs.system.Reboot - fi -fi - -if [ "${need_relogin}" ]; then - if [ "${need_relogin}" != "$(parse ${relogin_pkgs})" ]; then - echo -e "\tNeed to relogin..." >> $logfile - dbus-send --system /org/sugarlabs/system org.sugarlabs.system.Relogin - fi -fi diff --git a/rpms/dextrose-updater/sysconfig/dextrose-update b/rpms/dextrose-updater/sysconfig/dextrose-update deleted file mode 100644 index 81f6ff8..0000000 --- a/rpms/dextrose-updater/sysconfig/dextrose-update +++ /dev/null @@ -1 +0,0 @@ -DEXTROSE_YUM_REPO="dextrose dextrose-freeworld" -- cgit v0.9.1