[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
rpms/galternatives/devel galternatives-desktop.patch, NONE, 1.1 galternatives-fedora.patch, NONE, 1.1 galternatives.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
- From: Deji Akingunola (deji) <fedora-extras-commits redhat com>
- To: fedora-extras-commits redhat com
- Subject: rpms/galternatives/devel galternatives-desktop.patch, NONE, 1.1 galternatives-fedora.patch, NONE, 1.1 galternatives.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
- Date: Sat, 30 Dec 2006 12:33:02 -0500
Author: deji
Update of /cvs/extras/rpms/galternatives/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv15886/devel
Modified Files:
.cvsignore sources
Added Files:
galternatives-desktop.patch galternatives-fedora.patch
galternatives.spec
Log Message:
auto-import galternatives-0.13.4-4 on branch devel from galternatives-0.13.4-4.src.rpm
galternatives-desktop.patch:
--- NEW FILE galternatives-desktop.patch ---
--- galternatives.desktop.in 2004-06-14 18:04:11.000000000 -0400
+++ galternatives.desktop.in.new 2005-11-10 15:02:14.000000000 -0500
@@ -1,13 +1,10 @@
[Desktop Entry]
-Version=1.0
Encoding=UTF-8
_Name=Alternatives Configurator
_Comment=Configure the system default alternatives
Type=Application
-Exec=/usr/sbin/galternatives
-TryExec=
-Icon=/usr/share/pixmaps/galternatives.png
-X-GNOME-DocPath=
+Exec=/usr/bin/galternatives
+Icon=galternatives.png
Terminal=false
-Categories=GTK;Application;System;
+Categories=GTK;System;
StartupNotify=true
galternatives-fedora.patch:
--- NEW FILE galternatives-fedora.patch ---
--- setup.py 2004-06-14 18:04:11.000000000 -0400
+++ setup.py.new 2006-12-27 20:28:20.000000000 -0500
@@ -16,14 +16,6 @@
os.chdir ('%s/translations' % (curdir))
os.system ('./update-translations.sh')
- pipe = os.popen ('./list-mos.sh')
- while True:
- line = pipe.readline ().strip ()
- if line == '':
- break
- data.append (('share/locale/%s/LC_MESSAGES' % (line), ['translations/%s/galternatives.mo' % (line)]))
- pipe.close ()
- print data
os.chdir (curdir)
if __name__ == '__main__' :
--- galternatives/main.py 2005-08-17 21:21:04.000000000 -0400
+++ galternatives/main.py.new 2006-12-27 22:30:19.000000000 -0500
@@ -1,8 +1,11 @@
#!/usr/bin/python
import pygtk
pygtk.require ('2.0')
-import gtk, gobject
-from gtk import glade
+try:
+ import gtk, gobject
+ from gtk import glade
+except RuntimeError:
+ pass
from common import PACKAGE
import sys, os, gettext
--- galternatives/alternative.py 2004-11-21 23:02:33.000000000 -0500
+++ galternatives/alternative.py.new 2005-11-10 01:00:25.000000000 -0500
@@ -64,7 +64,7 @@
pass
# now get the real information!
- altfile = open ('/var/lib/dpkg/alternatives/%s' % (unixname))
+ altfile = open ('/var/lib/alternatives/%s' % (unixname))
# parsing file
self.option_status = altfile.readline ().strip ()
@@ -99,7 +99,18 @@
odict = {}
odict['path'] = line
- odict['priority'] = altfile.readline ().strip ()
+
+ # Here is an altercation to the upstream code to cater for the
+ # Redhat specific --initscript option
+ line = altfile.readline ().strip ()
+ ls = line.split()
+ if len(ls) == 2:
+ odict['priority'] = ls[0]
+ odict['service'] = ls[1]
+ else:
+ odict['priority'] = line
+ odict['service'] = ''
+
print_debug (odict)
optslaves = []
for count in range(len (self.slaves)):
--- galternatives/main.py 2005-08-17 21:21:04.000000000 -0400
+++ galternatives/main.py.new 2005-11-10 01:01:12.000000000 -0500
@@ -282,8 +282,16 @@
alt = self.alternative
unixname = alt.get_unixname ()
option = self.options_model.get_value (iter, self.OPTIONS)
+ # Here is an altercation to the upstream code to cater for the
+ # Redhat specific --initscript option
+ for opt in alt.get_options ():
+ inits = opt['service']
- result = os.system ('/usr/sbin/update-alternatives --set %s %s > /dev/null 2>&1' % (unixname, option))
+ if inits == '':
+ result = os.system ('/usr/sbin/update-alternatives --set %s %s > /dev/null 2>&1' % (unixname, option))
+ else:
+ result = os.system ('/usr/sbin/update-alternatives --set %s %s > /dev/null 2>&1' % (unixname, option))
+ result2 = os.system ('/sbin/chkconfig %s on > /dev/null 2>&1' % (inits))
print_debug ('/usr/sbin/update-alternatives --set %s %s > /dev/null 2>&1' % (unixname, option))
print_debug ('Result: %d' % (result))
@@ -347,7 +353,7 @@
text=self.SLAVEPATH)
self.slaves_tv.append_column (column)
- def update_alternatives (self, directory='/var/lib/dpkg/alternatives/'):
+ def update_alternatives (self, directory='/var/lib/alternatives/'):
self.alternatives_model.clear ()
alternatives = os.listdir (directory)
alternatives.sort ()
--- NEW FILE galternatives.spec ---
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
Summary: Alternatives Configurator
Name: galternatives
Version: 0.13.4
Release: 4%{?dist}
License: GPL
Group: Applications/System
URL: http://packages.qa.debian.org/g/galternatives.html
Source0: http://ftp.debian.org/debian/pool/main/g/%{name}/%{name}_%{version}.tar.gz
Patch0: galternatives-desktop.patch
Patch1: galternatives-fedora.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: pygtk2-devel
BuildRequires: python-devel
BuildRequires: desktop-file-utils gettext intltool
Requires: usermode
Requires: pygtk2
Requires: /usr/sbin/update-alternatives
BuildArch: noarch
%description
Graphical setup tool for the alternatives system. A GUI to help the system
administrator to choose what program should provide a given service
%prep
%setup -q
%patch0 -p0 -b .desktop
%patch1 -p0 -b .fedora
# To silence rpmlint
sed -i '/^#!\/usr\/bin\/python/ d' galternatives/*.py
%build
%{__python} setup.py build
%install
rm -rf %{buildroot}
%{__python} setup.py install -O1 --skip-build --root %{buildroot}
desktop-file-install --delete-original \
--vendor fedora \
--dir %{buildroot}%{_datadir}/applications \
--mode 0644 \
galternatives.desktop
mkdir -p %{buildroot}%{_sbindir}
mv %{buildroot}%{_bindir}/galternatives %{buildroot}%{_sbindir}
ln -s consolehelper %{buildroot}%{_bindir}/galternatives
mkdir -p %{buildroot}%{_sysconfdir}/security/console.apps
cat << EOF > %{buildroot}%{_sysconfdir}/security/console.apps/galternatives
USER=root
PROGRAM=%{_sbindir}/galternatives
SESSION=true
EOF
mkdir -p %{buildroot}%{_sysconfdir}/pam.d
cat << EOF > %{buildroot}%{_sysconfdir}/pam.d/galternatives
#%PAM-1.0
auth sufficient pam_rootok.so
auth sufficient pam_timestamp.so
auth include system-auth
session required pam_permit.so
session optional pam_xauth.so
session optional pam_timestamp.so
account required pam_permit.so
EOF
pushd translations
LANGS=$(find . -name \*.po | cut -d '.' -f 2 | tr -d '/')
for lang in ${LANGS}; do
echo ${lang}:
mkdir -p %{buildroot}%{_datadir}/locale/${lang}/LC_MESSAGES
cp ${lang}.mo %{buildroot}%{_datadir}/locale/${lang}/LC_MESSAGES/galternatives.mo
done
popd
%find_lang %{name}
%clean
rm -rf %{buildroot}
%files -f %{name}.lang
%doc TODO debian/copyright debian/changelog
%defattr(-,root,root,-)
%{_bindir}/galternatives
%{_sbindir}/galternatives
%{python_sitelib}/galternatives/
%{_datadir}/applications/fedora-galternatives.desktop
%{_datadir}/galternatives/
%{_datadir}/pixmaps/galternatives.png
%config(noreplace) %{_sysconfdir}/pam.d/galternatives
%config(noreplace) %{_sysconfdir}/security/console.apps/galternatives
%changelog
* Sat Dec 30 2006 Deji Akingunola <dakingun gmail com> 0.13.4-4
- Package the debian copyright and changelog files
- Add a Require on pygtk2
* Thu Dec 28 2006 Deji Akingunola <dakingun gmail com> 0.13.4-3
- Fix the source to handle the RH specific --initscript option
* Thu Dec 28 2006 Deji Akingunola <dakingun gmail com> 0.13.4-2
- Don't ghost *pyo files
* Sat Sep 02 2006 Deji Akingunola <dakingun gmail com> 0.13.4-1
- Update to version 0.13.4
- Add a quirk to workaround pygtk needing a 'DISPLAY', to allow mock build
* Tue Nov 08 2005 Deji Akingunola <dakingun gmail com> 0.12-1
- Initial build
Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/galternatives/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore 30 Dec 2006 17:32:07 -0000 1.1
+++ .cvsignore 30 Dec 2006 17:32:32 -0000 1.2
@@ -0,0 +1 @@
+galternatives_0.13.4.tar.gz
Index: sources
===================================================================
RCS file: /cvs/extras/rpms/galternatives/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources 30 Dec 2006 17:32:07 -0000 1.1
+++ sources 30 Dec 2006 17:32:32 -0000 1.2
@@ -0,0 +1 @@
+6148901a78623e85e3265a63588a2d23 galternatives_0.13.4.tar.gz
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]