summaryrefslogtreecommitdiff
path: root/sysutils
diff options
context:
space:
mode:
authorjmcneill <jmcneill@pkgsrc.org>2008-11-15 18:28:56 +0000
committerjmcneill <jmcneill@pkgsrc.org>2008-11-15 18:28:56 +0000
commit0106c9b7c3b37ed2499ccacc38dc882b73089e0d (patch)
treee3dfe172aa5c9b34e2708f5e18fa98953fc1cccd /sysutils
parente7c4fec91b5a919c4f8993c4b57a257b75e38b4e (diff)
downloadpkgsrc-0106c9b7c3b37ed2499ccacc38dc882b73089e0d.tar.gz
Initial import of system-tools-backends version 2.6.0.
The System Tools Backends (s-t-b for short) are a set of cross-platform modules for Linux, FreeBSD and other Unix systems. The backends provide a common DBus interface to all platforms to modify or read the system configuration in a distro independent fashion. Historically, access to system configuration has varied deeply across Unix flavours, and concreting a bit more, across Linux distributions, making it near impossible to write desktop tools that could work flawlessly in a cross-platform way. System Tools Backends try to fill this gap, offering a generic and easy way for desktop applications to read and modify configuration details.
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/system-tools-backends/DESCR9
-rw-r--r--sysutils/system-tools-backends/Makefile32
-rw-r--r--sysutils/system-tools-backends/PLIST62
-rw-r--r--sysutils/system-tools-backends/buildlink3.mk23
-rw-r--r--sysutils/system-tools-backends/distinfo13
-rw-r--r--sysutils/system-tools-backends/patches/patch-aa21
-rw-r--r--sysutils/system-tools-backends/patches/patch-ab12
-rw-r--r--sysutils/system-tools-backends/patches/patch-ac20
-rw-r--r--sysutils/system-tools-backends/patches/patch-ad12
-rw-r--r--sysutils/system-tools-backends/patches/patch-ae20
-rw-r--r--sysutils/system-tools-backends/patches/patch-af12
-rw-r--r--sysutils/system-tools-backends/patches/patch-ag57
-rw-r--r--sysutils/system-tools-backends/patches/patch-ah13
13 files changed, 306 insertions, 0 deletions
diff --git a/sysutils/system-tools-backends/DESCR b/sysutils/system-tools-backends/DESCR
new file mode 100644
index 00000000000..97d9a22ee47
--- /dev/null
+++ b/sysutils/system-tools-backends/DESCR
@@ -0,0 +1,9 @@
+The System Tools Backends (s-t-b for short) are a set of cross-platform
+modules for Linux, FreeBSD and other Unix systems. The backends provide a
+common DBus interface to all platforms to modify or read the system
+configuration in a distro independent fashion. Historically, access to
+system configuration has varied deeply across Unix flavours, and concreting
+a bit more, across Linux distributions, making it near impossible to write
+desktop tools that could work flawlessly in a cross-platform way. System
+Tools Backends try to fill this gap, offering a generic and easy way for
+desktop applications to read and modify configuration details.
diff --git a/sysutils/system-tools-backends/Makefile b/sysutils/system-tools-backends/Makefile
new file mode 100644
index 00000000000..8e2c53a16a3
--- /dev/null
+++ b/sysutils/system-tools-backends/Makefile
@@ -0,0 +1,32 @@
+# $NetBSD: Makefile,v 1.1.1.1 2008/11/15 18:28:56 jmcneill Exp $
+#
+
+DISTNAME= system-tools-backends-2.6.0
+CATEGORIES= sysutils
+MASTER_SITES= http://system-tools-backends.freedesktop.org/downloads/2.6/
+
+MAINTAINER= pkgsrc-users@NetBSD.org
+HOMEPAGE= http://system-tools-backends.freedesktop.org/
+COMMENT= DBus interface for system configuration
+
+PKG_DESTDIR_SUPPORT= user-destdir
+
+GNU_CONFIGURE= YES
+USE_DIRS+= xdg-1.4
+USE_PKGLOCALEDIR= YES
+USE_TOOLS+= gmake intltool msgfmt perl pkg-config
+USE_LIBTOOL= YES
+
+CONFIGURE_ARGS+= --with-stb-group=${ROOT_GROUP}
+CONFIGURE_ARGS+= --localstatedir=/var
+
+DEPENDS+= p5-XML-Twig>=3.32:../../textproc/p5-XML-Twig
+DEPENDS+= p5-Net-DBus>=0.33.6:../../net/p5-Net-DBus
+DEPENDS+= p5-libwww>=5.820:../../www/p5-libwww
+DEPENDS+= p5-URI>=1.37:../../www/p5-URI
+
+.include "../../devel/glib2/buildlink3.mk"
+.include "../../lang/perl5/buildlink3.mk"
+.include "../../sysutils/dbus/buildlink3.mk"
+.include "../../sysutils/dbus-glib/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/sysutils/system-tools-backends/PLIST b/sysutils/system-tools-backends/PLIST
new file mode 100644
index 00000000000..7163228fac9
--- /dev/null
+++ b/sysutils/system-tools-backends/PLIST
@@ -0,0 +1,62 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2008/11/15 18:28:56 jmcneill Exp $
+bin/system-tools-backends
+etc/dbus-1/system.d/system-tools-backends.conf
+lib/pkgconfig/system-tools-backends-2.0.pc
+share/dbus-1/system-services/org.freedesktop.SystemToolsBackends.GroupsConfig.service
+share/dbus-1/system-services/org.freedesktop.SystemToolsBackends.HostsConfig.service
+share/dbus-1/system-services/org.freedesktop.SystemToolsBackends.IfacesConfig.service
+share/dbus-1/system-services/org.freedesktop.SystemToolsBackends.NFSConfig.service
+share/dbus-1/system-services/org.freedesktop.SystemToolsBackends.NTPConfig.service
+share/dbus-1/system-services/org.freedesktop.SystemToolsBackends.Platform.service
+share/dbus-1/system-services/org.freedesktop.SystemToolsBackends.SMBConfig.service
+share/dbus-1/system-services/org.freedesktop.SystemToolsBackends.ServicesConfig.service
+share/dbus-1/system-services/org.freedesktop.SystemToolsBackends.TimeConfig.service
+share/dbus-1/system-services/org.freedesktop.SystemToolsBackends.UserConfig.service
+share/dbus-1/system-services/org.freedesktop.SystemToolsBackends.UsersConfig.service
+share/dbus-1/system-services/org.freedesktop.SystemToolsBackends.service
+share/system-tools-backends-2.0/files/general_gprs_chatscript
+share/system-tools-backends-2.0/files/general_isdn_ppp_options
+share/system-tools-backends-2.0/files/general_pppoe_ppp_options
+share/system-tools-backends-2.0/scripts/GroupsConfig.pm
+share/system-tools-backends-2.0/scripts/HostsConfig.pm
+share/system-tools-backends-2.0/scripts/IfacesConfig.pm
+share/system-tools-backends-2.0/scripts/Init/Services.pm
+share/system-tools-backends-2.0/scripts/Init/ServicesList.pm
+share/system-tools-backends-2.0/scripts/NFSConfig.pm
+share/system-tools-backends-2.0/scripts/NTPConfig.pm
+share/system-tools-backends-2.0/scripts/Network/Hosts.pm
+share/system-tools-backends-2.0/scripts/Network/Ifaces.pm
+share/system-tools-backends-2.0/scripts/Platform.pm
+share/system-tools-backends-2.0/scripts/SMBConfig.pm
+share/system-tools-backends-2.0/scripts/ServicesConfig.pm
+share/system-tools-backends-2.0/scripts/Shares/NFS.pm
+share/system-tools-backends-2.0/scripts/Shares/SMB.pm
+share/system-tools-backends-2.0/scripts/StbObject.pm
+share/system-tools-backends-2.0/scripts/SystemToolsBackends.pl
+share/system-tools-backends-2.0/scripts/Time/NTP.pm
+share/system-tools-backends-2.0/scripts/Time/TimeDate.pm
+share/system-tools-backends-2.0/scripts/TimeConfig.pm
+share/system-tools-backends-2.0/scripts/UserConfig.pm
+share/system-tools-backends-2.0/scripts/Users/Groups.pm
+share/system-tools-backends-2.0/scripts/Users/Shells.pm
+share/system-tools-backends-2.0/scripts/Users/Users.pm
+share/system-tools-backends-2.0/scripts/UsersConfig.pm
+share/system-tools-backends-2.0/scripts/Utils/Backend.pm
+share/system-tools-backends-2.0/scripts/Utils/DBus.pm
+share/system-tools-backends-2.0/scripts/Utils/File.pm
+share/system-tools-backends-2.0/scripts/Utils/Monitor.pm
+share/system-tools-backends-2.0/scripts/Utils/Parse.pm
+share/system-tools-backends-2.0/scripts/Utils/Platform.pm
+share/system-tools-backends-2.0/scripts/Utils/Replace.pm
+share/system-tools-backends-2.0/scripts/Utils/Report.pm
+share/system-tools-backends-2.0/scripts/Utils/Util.pm
+share/system-tools-backends-2.0/scripts/Utils/XML.pm
+@dirrm share/system-tools-backends-2.0/scripts/Utils
+@dirrm share/system-tools-backends-2.0/scripts/Users
+@dirrm share/system-tools-backends-2.0/scripts/Time
+@dirrm share/system-tools-backends-2.0/scripts/Shares
+@dirrm share/system-tools-backends-2.0/scripts/Network
+@dirrm share/system-tools-backends-2.0/scripts/Init
+@dirrm share/system-tools-backends-2.0/scripts
+@dirrm share/system-tools-backends-2.0/files
+@dirrm share/system-tools-backends-2.0
diff --git a/sysutils/system-tools-backends/buildlink3.mk b/sysutils/system-tools-backends/buildlink3.mk
new file mode 100644
index 00000000000..8345a3f04b6
--- /dev/null
+++ b/sysutils/system-tools-backends/buildlink3.mk
@@ -0,0 +1,23 @@
+# $NetBSD: buildlink3.mk,v 1.1.1.1 2008/11/15 18:28:56 jmcneill Exp $
+
+BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+
+SYSTEM_TOOLS_BACKENDS_BUILDLINK3_MK:= ${SYSTEM_TOOLS_BACKENDS_BUILDLINK3_MK}+
+
+.if ${BUILDLINK_DEPTH} == "+"
+BUILDLINK_DEPENDS+= system-tools-backends
+.endif
+
+BUILDLINK_PACKAGES:= ${BUILDLINK_PACKAGES:Nsystem-tools-backends}
+BUILDLINK_PACKAGES+= system-tools-backends
+BUILDLINK_ORDER:= ${BUILDLINK_ORDER} ${BUILDLINK_DEPTH}system-tools-backends
+
+.if ${SYSTEM_TOOLS_BACKENDS_BUILDLINK3_MK} == "+"
+BUILDLINK_API_DEPENDS.system-tools-backends+= system-tools-backends>=2.6.0
+BUILDLINK_PKGSRCDIR.system-tools-backends?= ../../sysutils/system-tools-backends
+.endif # SYSTEM_TOOLS_BACKENDS_BUILDLINK3_MK
+
+.include "../../devel/glib2/buildlink3.mk"
+.include "../../sysutils/dbus/buildlink3.mk"
+.include "../../sysutils/dbus-glib/buildlink3.mk"
+
+BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//}
diff --git a/sysutils/system-tools-backends/distinfo b/sysutils/system-tools-backends/distinfo
new file mode 100644
index 00000000000..73a47dc5e20
--- /dev/null
+++ b/sysutils/system-tools-backends/distinfo
@@ -0,0 +1,13 @@
+$NetBSD: distinfo,v 1.1.1.1 2008/11/15 18:28:56 jmcneill Exp $
+
+SHA1 (system-tools-backends-2.6.0.tar.gz) = f688e6755edfa8353927202754d4e87940820893
+RMD160 (system-tools-backends-2.6.0.tar.gz) = 7f2c4674e54b7c7d3f03cf9b55ef12d34a520528
+Size (system-tools-backends-2.6.0.tar.gz) = 567711 bytes
+SHA1 (patch-aa) = f523c20200fcce9655056bb0a2a9ccbef3497dff
+SHA1 (patch-ab) = 610dbd0608d93b74d02442b2ad081e5c78c326c1
+SHA1 (patch-ac) = 8cef6e86faf53b0269fb744adc3fa09c7034fd23
+SHA1 (patch-ad) = fb12dcc969123ff0fe2f102bc923192c1b7c6a2f
+SHA1 (patch-ae) = 4946b7a89fb4a1b54e889c1eb5354b2ef5d11727
+SHA1 (patch-af) = 31a00a1287ff84ade4244c728945cce00a3fcf7f
+SHA1 (patch-ag) = 236c5286ebde33e739f19e2f54d8800f679b1178
+SHA1 (patch-ah) = 92927158f333f58f6e42364ff48817696271e641
diff --git a/sysutils/system-tools-backends/patches/patch-aa b/sysutils/system-tools-backends/patches/patch-aa
new file mode 100644
index 00000000000..aa0ee2a97e5
--- /dev/null
+++ b/sysutils/system-tools-backends/patches/patch-aa
@@ -0,0 +1,21 @@
+$NetBSD: patch-aa,v 1.1.1.1 2008/11/15 18:28:56 jmcneill Exp $
+
+--- Init/Services.pm.orig 2008-03-09 09:21:45.000000000 -0400
++++ Init/Services.pm
+@@ -55,6 +55,7 @@ sub get_runlevels
+ "archlinux" => "freebsd-5",
+ "freebsd-5" => "freebsd-5",
+ "solaris-2.11" => "freebsd-5",
++ "netbsd-2" => "freebsd-5",
+ );
+
+ %runlevels=
+@@ -1287,7 +1288,7 @@ sub get_init_type
+ {
+ return "bsd";
+ }
+- elsif (($gst_dist =~ /freebsd/) || ($gst_dist =~ /archlinux/))
++ elsif (($gst_dist =~ /freebsd/) || ($gst_dist =~ /archlinux/) || ($gst_dist =~ /netbsd/))
+ {
+ return "rcng";
+ }
diff --git a/sysutils/system-tools-backends/patches/patch-ab b/sysutils/system-tools-backends/patches/patch-ab
new file mode 100644
index 00000000000..8b40652305f
--- /dev/null
+++ b/sysutils/system-tools-backends/patches/patch-ab
@@ -0,0 +1,12 @@
+$NetBSD: patch-ab,v 1.1.1.1 2008/11/15 18:28:56 jmcneill Exp $
+
+--- Network/Hosts.pm.orig 2008-03-09 09:21:45.000000000 -0400
++++ Network/Hosts.pm
+@@ -54,6 +54,7 @@ sub get_fqdn_dist
+ "slackware-9.1.0" => "suse-9.0",
+ "gentoo" => "gentoo",
+ "freebsd-5" => "freebsd-5",
++ "netbsd-2" => "freebsd-5",
+ "solaris-2.11" => "solaris-2.11",
+ );
+
diff --git a/sysutils/system-tools-backends/patches/patch-ac b/sysutils/system-tools-backends/patches/patch-ac
new file mode 100644
index 00000000000..166bfd9a503
--- /dev/null
+++ b/sysutils/system-tools-backends/patches/patch-ac
@@ -0,0 +1,20 @@
+$NetBSD: patch-ac,v 1.1.1.1 2008/11/15 18:28:56 jmcneill Exp $
+
+--- Shares/SMB.pm.orig 2008-03-09 09:21:45.000000000 -0400
++++ Shares/SMB.pm
+@@ -145,6 +145,7 @@ sub get_distro_smb_file
+ "pld-1.0" => "pld-1.0",
+ "vine-3.0" => "debian-3.0",
+ "freebsd-5" => "freebsd-5",
++ "netbsd-2" => "pkgsrc",
+ );
+
+ my %dist_tables =
+@@ -153,6 +154,7 @@ sub get_distro_smb_file
+ "debian-3.0" => "/etc/samba/smb.conf",
+ "pld-1.0" => "/etc/smb/smb.conf",
+ "freebsd-5" => "/usr/local/etc/smb.conf",
++ "pkgsrc" => "/usr/pkg/etc/samba/smb.conf",
+ );
+
+ my $dist = $dist_map {$Utils::Backend::tool{"platform"}};
diff --git a/sysutils/system-tools-backends/patches/patch-ad b/sysutils/system-tools-backends/patches/patch-ad
new file mode 100644
index 00000000000..e8c66962e91
--- /dev/null
+++ b/sysutils/system-tools-backends/patches/patch-ad
@@ -0,0 +1,12 @@
+$NetBSD: patch-ad,v 1.1.1.1 2008/11/15 18:28:56 jmcneill Exp $
+
+--- Time/NTP.pm.orig 2008-03-09 09:21:45.000000000 -0400
++++ Time/NTP.pm
+@@ -42,6 +42,7 @@ sub get_config_file ()
+ "pld-1.0" => "pld-1.0",
+ "vine-3.0" => "redhat-6.2",
+ "freebsd-5" => "redhat-6.2",
++ "netbsd-2" => "redhat-6.2",
+ "archlinux" => "redhat-6.2",
+ "solaris-2.11" => "solaris-2.11",
+ );
diff --git a/sysutils/system-tools-backends/patches/patch-ae b/sysutils/system-tools-backends/patches/patch-ae
new file mode 100644
index 00000000000..4adba11cb13
--- /dev/null
+++ b/sysutils/system-tools-backends/patches/patch-ae
@@ -0,0 +1,20 @@
+$NetBSD: patch-ae,v 1.1.1.1 2008/11/15 18:28:56 jmcneill Exp $
+
+--- Time/TimeDate.pm.orig 2008-03-09 09:21:45.000000000 -0400
++++ Time/TimeDate.pm
+@@ -49,6 +49,7 @@ sub change_timedate
+ "Linux" => "date -u %02d%02d%02d%02d%04d.%02d",
+ "FreeBSD" => "date -u -f %%m%%d%%H%%M%%Y.%%S %02d%02d%02d%02d%04d.%02d",
+ "SunOS" => "date -u %02d%02d%02d%02d%04d.%02d",
++ "NetBSD" => "date -u %02d%02d%02d%02d%04d.%02d",
+ };
+
+ $command = sprintf ($$system_table {$Utils::Backend::tool{"system"}},
+@@ -174,6 +175,7 @@ sub get_dist
+ "pld-1.0" => "redhat-6.2",
+ "vine-3.0" => "redhat-6.2",
+ "freebsd-5" => "redhat-6.2",
++ "netbsd-2" => "redhat-6.2",
+ "solaris-2.11" => "solaris-2.11",
+ );
+
diff --git a/sysutils/system-tools-backends/patches/patch-af b/sysutils/system-tools-backends/patches/patch-af
new file mode 100644
index 00000000000..d04270adb4e
--- /dev/null
+++ b/sysutils/system-tools-backends/patches/patch-af
@@ -0,0 +1,12 @@
+$NetBSD: patch-af,v 1.1.1.1 2008/11/15 18:28:56 jmcneill Exp $
+
+--- Users/Users.pm.orig 2008-03-09 09:21:45.000000000 -0400
++++ Users/Users.pm
+@@ -242,6 +242,7 @@ my $logindefs_dist_map = {
+ 'archlinux' => $gentoo_logindefs_defaults,
+ 'slackware-9.1.0' => $gentoo_logindefs_defaults,
+ 'freebsd-5' => $freebsd_logindefs_defaults,
++ 'netbsd-2' => $freebsd_logindefs_defaults,
+ 'suse-9.0' => $gentoo_logindefs_defaults,
+ 'solaris-2.11' => $gentoo_logindefs_defaults,
+ };
diff --git a/sysutils/system-tools-backends/patches/patch-ag b/sysutils/system-tools-backends/patches/patch-ag
new file mode 100644
index 00000000000..b494757be36
--- /dev/null
+++ b/sysutils/system-tools-backends/patches/patch-ag
@@ -0,0 +1,57 @@
+$NetBSD: patch-ag,v 1.1.1.1 2008/11/15 18:28:56 jmcneill Exp $
+
+--- Utils/Platform.pm.orig 2008-03-09 09:21:45.000000000 -0400
++++ Utils/Platform.pm
+@@ -76,6 +76,10 @@ my $PLATFORM_INFO = {
+ "slackware-11.0.0" => [ "Slackware", "11.0.0", "" ],
+ "slackware-12.0.0" => [ "Slackware", "12.0.0", "" ],
+ "bluewhite64-12.0.0" => [ "Bluewhite64", "12.0.0", "" ],
++ "netbsd-2" => [ "NetBSD", "2", "" ],
++ "netbsd-3" => [ "NetBSD", "3", "" ],
++ "netbsd-4" => [ "NetBSD", "4", "" ],
++ "netbsd-5" => [ "NetBSD", "5", "" ],
+ "freebsd-4" => [ "FreeBSD", "4", "" ],
+ "freebsd-5" => [ "FreeBSD", "5", "" ],
+ "freebsd-6" => [ "FreeBSD", "6", "" ],
+@@ -131,6 +135,9 @@ sub ensure_distro_map
+ "fedora-3" => "redhat-7.2",
+ "fedora-4" => "redhat-7.2",
+ "fedora-5" => "redhat-7.2",
++ "netbsd-3" => "netbsd-2",
++ "netbsd-4" => "netbsd-2",
++ "netbsd-5" => "netbsd-2",
+ "freebsd-6" => "freebsd-5",
+ "freebsd-7" => "freebsd-5",
+ "openna-1.0" => "redhat-6.2",
+@@ -251,6 +258,23 @@ sub check_ark
+ return -1;
+ }
+
++sub check_netbsd
++{
++ my ($sysctl_cmd, @output);
++
++ $sysctl_cmd = &Utils::File::locate_tool ("sysctl");
++ @output = (readpipe("$sysctl_cmd -n kern.version"));
++ foreach (@output)
++ {
++ chomp;
++ if (/^NetBSD\s([0-9]+)\.\S+.*/)
++ {
++ return "netbsd-$1";
++ }
++ }
++ return -1;
++}
++
+ sub check_freebsd
+ {
+ my ($sysctl_cmd, @output);
+@@ -391,6 +415,7 @@ sub guess
+ [ \&check_distro_file, "/etc/yellowdog-release", "yellowdog", "^Yellow Dog Linux release (\\S+)" ],
+ ],
+ "FreeBSD" => [[ \&check_freebsd ]],
++ "NetBSD" => [[ \&check_netbsd ]],
+ "SunOS" => [[ \&check_solaris ]]
+ );
+
diff --git a/sysutils/system-tools-backends/patches/patch-ah b/sysutils/system-tools-backends/patches/patch-ah
new file mode 100644
index 00000000000..0640357f470
--- /dev/null
+++ b/sysutils/system-tools-backends/patches/patch-ah
@@ -0,0 +1,13 @@
+$NetBSD: patch-ah,v 1.1.1.1 2008/11/15 18:28:56 jmcneill Exp $
+
+--- dispatcher/main.c.orig 2008-11-15 11:13:17.000000000 -0500
++++ dispatcher/main.c
+@@ -47,7 +47,7 @@ daemonize (void)
+
+ setsid ();
+
+- if ((pidfile_fd = open (LOCALSTATEDIR "/run/system-tools-backends.pid", O_CREAT | O_WRONLY)) != -1)
++ if ((pidfile_fd = open (LOCALSTATEDIR "/run/system-tools-backends.pid", O_CREAT | O_WRONLY, 0600)) != -1)
+ {
+ str = g_strdup_printf ("%d", getpid ());
+ write (pidfile_fd, str, strlen (str));