diff options
Diffstat (limited to 'files')
26 files changed, 323 insertions, 0 deletions
diff --git a/files/99-live-disable-suspend-hibernate.fdi b/files/99-live-disable-suspend-hibernate.fdi new file mode 100755 index 0000000..96f1767 --- /dev/null +++ b/files/99-live-disable-suspend-hibernate.fdi @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> <!-- -*- SGML -*- --> +<deviceinfo version="0.2"> + <device> + <match key="info.udi" string="/org/freedesktop/Hal/devices/computer"> + <merge key="power_management.can_hibernate" type="bool">false</merge> + <merge key="power_management.can_suspend" type="bool">false</merge> + <merge key="power_management.can_suspend_to_disk" type="bool">false</merge> + <merge key="power_management.can_suspend_to_ram" type="bool">false</merge> + </match> + </device> +</deviceinfo> diff --git a/files/99dm-reload.xsetup b/files/99dm-reload.xsetup new file mode 100755 index 0000000..67d8ee8 --- /dev/null +++ b/files/99dm-reload.xsetup @@ -0,0 +1,3 @@ +#!/bin/sh +LOCK=/var/lock/reload-dm +[ -f "$LOCK" ] && rm -f $LOCK && if [ x"$RUNNING_UNDER_GDM" = xtrue ]; then nohup service dm restart; fi; diff --git a/files/GUADEC-booklet.desktop b/files/GUADEC-booklet.desktop new file mode 100644 index 0000000..ca2492e --- /dev/null +++ b/files/GUADEC-booklet.desktop @@ -0,0 +1,6 @@ +[Desktop Entry] +Icon=distributor-logo +Encoding=UTF-8 +Name=GUADEC Booklet +Type=Link +URL=http://assets.expectnation.com/9/eventprovider/9/booklet.pdf diff --git a/files/compute-i18n-list.pl b/files/compute-i18n-list.pl new file mode 100755 index 0000000..914585b --- /dev/null +++ b/files/compute-i18n-list.pl @@ -0,0 +1,88 @@ +#!/usr/bin/perl + +use MDK::Common; +use Getopt::Long; +use lib qw(/usr/lib/libDrakX); +use run_program; + +# alleged i18n packages for french (useful to spot missing requires on locales-fr) +# rpm -qa \*-fr\* --qf '%{name}\n' | perl -n -e '/^(.*)-fr(_.+)?$/ and print "$1\n"' | sort -u +# my @packages = ( +# aspell +# kde-i18n +# locales +# mozilla-firefox +# myspell +# myspell-hyph +# openoffice.org-l10n +# ); + +my ($prefix, $ooo_version); +GetOptions( + "prefix=s" => \$prefix, + "ooo=s" => \$ooo_version, +); + +my @misowned_dirs = qw( +/usr/lib/ooo-${ooo_version} +/usr/lib/ooo-${ooo_version}/help +/usr/share/apps +/usr/share/apps/khangman +/usr/share/apps/khangman/data +/usr/share/apps/ktuberling +/usr/share/apps/ktuberling/sounds +/usr/share/doc/HTML +/usr/share/locale +); + +my @dirs = qw( +/usr/share/man +/usr/share/doc/HTML +); + +my @files = qw( +/usr/lib/ooo-${ooo_version}/share/dict/$L.* +/usr/lib/ooo-${ooo_version}/share/dict/$L_comb.* +/usr/lib/ooo-${ooo_version}/share/dict/hyph_$L.* +/usr/lib/ooo-${ooo_version}/share/dict/th_$L.* +/usr/lib/ooo-${ooo_version}/share/dict/th_$L_v2.* +); + +my %per_locale_files = ( + zh => [ + #- disables anti-aliasing by default + '/etc/fonts/conf.d/99-ttf-arphic-uming-bitmaps.conf' + ], +); + +my @locale_packages = run_program::rooted_get_stdout($prefix, 'rpm', '-qa', 'locales-*', '--qf', '%{name}\n'); +my @locales = sort(map { s/^locales-//; chomp; $_ } @locale_packages); + +sub expand_files { + my ($p, $o_lang) = @_; + $p =~ s/\$L/$o_lang/ if $o_lang; + map { s/^$prefix//; $_ } grep { -e $_ } glob($prefix . $p); +} + +foreach my $l (@locales) { + my @list; + my $locale_pkg = "locales-$l"; + #my $l_pattern = qr/^$l([_.@].+)?$/; + #my @l_packages = map { ("$_-$l", "$_-${l}_*") } @packages; + my @l_packages = chomp_(run_program::rooted_get_stdout($prefix, 'rpm', '-q', '--qf', '%{name}\n', '--whatrequires', $locale_pkg)); + unshift @l_packages, $locale_pkg; + my @list = chomp_(run_program::rooted_get_stdout($prefix, 'rpm', '-ql', @l_packages)); + my @all_locales = map { m!^/usr/share/locale/([^/]+)$! } chomp_(run_program::rooted_get_stdout($prefix, 'rpm', '-ql', $locale_pkg)); + # skip misowned directories such as /usr/share/locale + @list = grep { ! -d $prefix . $_ || member(basename($_), @all_locales) } @list; + #@list = difference2(\@list, \@misowned_dirs); + foreach my $l2 (@all_locales) { + foreach my $d (@dirs) { + my $l_d = $d . '/' . $l2; + push @list, $l_d if -e $prefix . $l_d; + } + push @list, expand_files($_, $l2) foreach @files; + } + push @list, expand_files($_) foreach @{$per_locale_files{$l} || []}; + output_p($prefix . "/root/drakx/i18n-$l.lst", map { "$_\n" } sort(@list)); +} diff --git a/files/compute-ooo-dicts.pl b/files/compute-ooo-dicts.pl new file mode 100755 index 0000000..d9968c5 --- /dev/null +++ b/files/compute-ooo-dicts.pl @@ -0,0 +1,55 @@ +#!/usr/bin/perl + +use MDK::Common; +use Getopt::Long; +use lib qw(/usr/lib/libDrakX); +use run_program; + +my $prefix; +my $check_locale; +GetOptions( + "prefix=s" => \$prefix, + "check-locale" => \$check_locale, +); +my $dictd = $ARGV[0] or die "syntax: $0 [--check-locale] [--prefix <prefix>] <dictionary dir>"; + +my $dictf = "dictionary.lst"; +my $dicts = "dictionary.src"; +my $dictu = "dictionary.unused"; + +my @dictl; +my @unused; + +my @available_langs = map { + /^locales-(\S+)/ ? $1 : (); +} chomp_(run_program::rooted_get_stdout($prefix, 'rpm', '-qa', '--provides', 'locales-*')); + +sub add_dict { + my ($type, $name, $file, $add) = @_; + my ($lang, $country) = $name =~ /^([^_]+)_([^_]+)/; + my ($root_name) = $file =~ /^(.*)\.(.*?)$/; + if (!$check_locale || member($lang, @available_langs)) { + push @dictl, [ $type, $lang, $country, $root_name ] if $add; + } else { + push @unused, "$dictd/$file"; + } +} + +rename("$prefix$dictd/$dictf", "$prefix$dictd/$dicts") if ! -e "$prefix$dictd/$dicts"; +foreach (all("$prefix/$dictd")) { + if (/^hyph_(.+)\.(.*?)$/) { + add_dict('HYPH', $1, $_, $2 eq 'dic'); + } elsif (/^th_(.+)\.(.*?)$/) { + add_dict('THES', $1, $_, $2 eq 'idx'); + } elsif (/^(.+_.+)\.(.*?)$/) { + add_dict('DICT', $1, $_, $2 eq 'dic'); + } +} + +output_p("$prefix$dictd/$dictf", + join('', grep { /^#/ } cat_("$prefix$dictd/$dicts")), + "\n", + map { join(' ', @$_) . "\n" } @dictl, + ); + +output_p("$prefix$dictd/$dictu", map { "$_\n" } @unused); diff --git a/files/defaultspooler b/files/defaultspooler new file mode 100644 index 0000000..462d36c --- /dev/null +++ b/files/defaultspooler @@ -0,0 +1 @@ +cups diff --git a/files/desktop-directories-liveusb-rw b/files/desktop-directories-liveusb-rw new file mode 100755 index 0000000..3fd7635 --- /dev/null +++ b/files/desktop-directories-liveusb-rw @@ -0,0 +1,37 @@ +#!/bin/sh + +LIVEUSB_LOCK="$HOME/.liveusb-folders" +LIVEUSB_ROOT=/live/media +[ -e "$LIVEUSB_ROOT/My Documents" ] && LIVEUSB_ALA_WINDOWS=1 + +[ -e $LIVEUSB_LOCK ] && exit + +while pidof -x xdg-user-dirs-update; do + [ "$SECONDS" -le 60 ] || return + sleep 1 +done + +function create_link() { + NAME=$1 + SRC=$2 + [ -z "$SRC" ] && SRC=$($NAME) + XDG_DIR=$(xdg-user-dir $NAME) + LIVEUSB_DIR="$LIVEUSB_ROOT/$SRC" + mkdir -p "$LIVEUSB_DIR" + mv $XDG_DIR/{.??,}* "$LIVEUSB_DIR" + rmdir $XDG_DIR && ln -sf "$LIVEUSB_DIR" "$XDG_DIR" +} + +if [ -n "$LIVEUSB_ALA_WINDOWS" ]; then + create_link "DOCUMENTS" "My Documents" + create_link "DOWNLOAD" "My Documents/My Downloads" + create_link "MUSIC" "My Documents/My Music" + create_link "PICTURES" "My Documents/My Images" + create_link "VIDEOS" "My Documents/My Video" +else + for d in DOWNLOAD DOCUMENTS MUSIC PICTURES VIDEOS; do + create_link $d $(echo $d | tr A-Z a-z) + done +fi + +touch $LIVEUSB_LOCK diff --git a/files/draklive-install.d/draklive-resize b/files/draklive-install.d/draklive-resize new file mode 100644 index 0000000..5d33155 --- /dev/null +++ b/files/draklive-install.d/draklive-resize @@ -0,0 +1 @@ +DRAKLIVE_RESIZE=no diff --git a/files/draklive-install.d/finish-install b/files/draklive-install.d/finish-install new file mode 100644 index 0000000..c4f6824 --- /dev/null +++ b/files/draklive-install.d/finish-install @@ -0,0 +1,13 @@ +FINISH_INSTALL=yes +LICENSE=no +LANGUAGE=no +KEYBOARD=no +TIMEZONE=no +COUNTRY=no +NETWORK=yes +URPMI=yes +AUTHENTICATION=no +USERS=with_root +USER_RENAME_FROM=<DEFAULT_USER> +USER_AUTOLOGIN_FIRST=yes +GLX=no diff --git a/files/draklive-install.d/firstboot b/files/draklive-install.d/firstboot new file mode 100644 index 0000000..a842497 --- /dev/null +++ b/files/draklive-install.d/firstboot @@ -0,0 +1 @@ +FIRSTBOOT=no diff --git a/files/draklive-install.d/remove.d/disable-speedboot b/files/draklive-install.d/remove.d/disable-speedboot new file mode 100644 index 0000000..7bc22d6 --- /dev/null +++ b/files/draklive-install.d/remove.d/disable-speedboot @@ -0,0 +1 @@ +/var/lib/speedboot/status diff --git a/files/draklive-install.d/run.d/generate-gtk-icon-cache.sh b/files/draklive-install.d/run.d/generate-gtk-icon-cache.sh new file mode 100755 index 0000000..e920320 --- /dev/null +++ b/files/draklive-install.d/run.d/generate-gtk-icon-cache.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +for icondir in /usr/share/icons/*; do + if [ -d "$icondir" -a -f "$icondir/index.theme" ]; then + /usr/bin/gtk-update-icon-cache --force --quiet "$icondir"; + fi +done diff --git a/files/draklive-install.d/services b/files/draklive-install.d/services new file mode 100644 index 0000000..6e7a6b4 --- /dev/null +++ b/files/draklive-install.d/services @@ -0,0 +1,3 @@ +anacron +crond +dkms diff --git a/files/draklive-install.usb b/files/draklive-install.usb new file mode 100644 index 0000000..fbfa41c --- /dev/null +++ b/files/draklive-install.usb @@ -0,0 +1 @@ +SOURCE=/live/source diff --git a/files/draksnapshot.sysconfig b/files/draksnapshot.sysconfig new file mode 100644 index 0000000..cca41e8 --- /dev/null +++ b/files/draksnapshot.sysconfig @@ -0,0 +1 @@ +AUTOSTART=FALSE diff --git a/files/finish-install.cdrom b/files/finish-install.cdrom new file mode 100644 index 0000000..fed1dd5 --- /dev/null +++ b/files/finish-install.cdrom @@ -0,0 +1,7 @@ +FINISH_INSTALL=yes +NETWORK=no +URPMI=no +AUTHENTICATION=no +USERS=no +TIMEZONE=simplified +COUNTRY=simplified diff --git a/files/finish-install.usb b/files/finish-install.usb new file mode 100644 index 0000000..467f1ac --- /dev/null +++ b/files/finish-install.usb @@ -0,0 +1,6 @@ +FINISH_INSTALL=yes +USERS=with_root +AUTHENTICATION=no +USER_AUTOLOGIN_FIRST=yes +TIMEZONE=simplified +COUNTRY=simplified diff --git a/files/firstboot b/files/firstboot new file mode 100644 index 0000000..a842497 --- /dev/null +++ b/files/firstboot @@ -0,0 +1 @@ +FIRSTBOOT=no diff --git a/files/halt.local.cdrom b/files/halt.local.cdrom new file mode 100755 index 0000000..1e9fc67 --- /dev/null +++ b/files/halt.local.cdrom @@ -0,0 +1,25 @@ +#!/usr/bin/perl + +use lib qw(/usr/lib/libDrakX); +use MDK::Common; +use detect_devices; +use c; + +my ($device) = cat_("/proc/mounts") =~ m!(/dev/\S+)\s+/live/media\s+iso9660!; +$device or exit; + +system("chvt 1"); + +# try to put halt/reboot in cache, if not called directly from them +# mount is also needed by end of /etc/init.d/halt +system("$_ --help &>/dev/null") foreach qw(halt mount reboot); + +my $f = detect_devices::tryOpen($device); +# see openCdromTray() from install::any +ioctl($f, c::CDROM_LOCKDOOR(), 0); # unlock door +ioctl($f, c::CDROMEJECT(), 0); + +print "\n\nPlease press <Enter> (or <CTRL><J>) once the medium is removed.\n"; +system("read < /dev/console"); + +ioctl($f, c::CDROMCLOSETRAY(), 0); diff --git a/files/halt.pre b/files/halt.pre new file mode 100644 index 0000000..8b2583e --- /dev/null +++ b/files/halt.pre @@ -0,0 +1,20 @@ +#!/bin/bash + +mypath=$_ +roottype=`awk '$2 == "/" { print $3 }' /etc/fstab` + +maybe_umount() { + eval d=\$$# + awk "\$2 == \"$d\" { system(\"umount \" \$d) }" /proc/mounts +} + +if [ "$roottype" == unionfs ]; then + maybe_umount /var/lib/rpm + maybe_umount /tmp/rpm/real + maybe_umount /tmp/rpm +fi + +# disable self during first halt when installed +rm -f $mypath + +/bin/plymouth quit diff --git a/files/kbluetoothrc b/files/kbluetoothrc new file mode 100644 index 0000000..2680caa --- /dev/null +++ b/files/kbluetoothrc @@ -0,0 +1,5 @@ +[General] +AutoStart=false + +[Notification Messages] +kbluepinLocInfo-usr-lib-kdebluetooth=false diff --git a/files/korgacrc b/files/korgacrc new file mode 100644 index 0000000..f948d8c --- /dev/null +++ b/files/korgacrc @@ -0,0 +1,2 @@ +[General] +Autostart=false diff --git a/files/live.modprobe.cdrom b/files/live.modprobe.cdrom new file mode 100644 index 0000000..5bb2345 --- /dev/null +++ b/files/live.modprobe.cdrom @@ -0,0 +1 @@ +install usblp /bin/true diff --git a/files/mdkonlinerc b/files/mdkonlinerc new file mode 100644 index 0000000..cca41e8 --- /dev/null +++ b/files/mdkonlinerc @@ -0,0 +1 @@ +AUTOSTART=FALSE diff --git a/files/portable-directories-flash-liveusb-rw b/files/portable-directories-flash-liveusb-rw new file mode 100755 index 0000000..dbdda92 --- /dev/null +++ b/files/portable-directories-flash-liveusb-rw @@ -0,0 +1,22 @@ +#!/bin/sh + +function create_mozilla_profile() { + USER_DIR=$1 + PORTABLE_DIR=$2 + [ -d $USER_DIR ] && return + mkdir -p $USER_DIR + ln -sf "$PORTABLE_DIR/Data/profile" $USER_DIR + cat > "$USER_DIR/profiles.ini" <<EOF +[General] +StartWithLastProfile=1 + +[Profile0] +Name=default +IsRelative=1 +Path=profile +EOF +} + +PORTABLE_ROOT=/live/media/.apps +create_mozilla_profile "$HOME/.mozilla/firefox" "$PORTABLE_ROOT/FirefoxPortable" +create_mozilla_profile "$HOME/.thunderbird" "$PORTABLE_ROOT/ThunderbirdPortable" diff --git a/files/xdg-email-hook.sh b/files/xdg-email-hook.sh new file mode 100755 index 0000000..2ad2dc3 --- /dev/null +++ b/files/xdg-email-hook.sh @@ -0,0 +1,4 @@ +#!/bin/sh +[ -z "$MAILER" ] && MAILER=`which mozilla-thunderbird 2> /dev/null` +[ -z "$MAILER" ] && MAILER=/usr/bin/xdg-email +exec $MAILER $@ |