Back | Home
الـ Path الحالي: /home/picotech/domains/instantly.picotech.app/public_html/public/uploads/../../../../../../../sbin
الملفات الموجودة في هذا الـ Path:
.
..
a2disconf
a2dismod
a2dissite
a2enconf
a2enmod
a2ensite
a2query
aa-remove-unknown
aa-status
aa-teardown
accessdb
acpid
add-shell
addgnupghome
addgroup
adduser
agetty
apache2
apache2ctl
apachectl
apparmor_parser
apparmor_status
applygnupgdefaults
arp
arpd
arptables
arptables-nft
arptables-nft-restore
arptables-nft-save
arptables-restore
arptables-save
aspell-autobuildhash
auth-otp
badblocks
bcache-super-show
biosdecode
blkdeactivate
blkdiscard
blkid
blkzone
blockdev
bridge
cache_check
cache_dump
cache_metadata_size
cache_repair
cache_restore
cache_writeback
capsh
cfdisk
cgdisk
chcpu
check_forensic
chgpasswd
chmem
chpasswd
chroot
clamd
clamonacc
convertquota
cpgr
cppw
cron
cryptdisks_start
cryptdisks_stop
cryptsetup
cryptsetup-reencrypt
cryptsetup-ssh
ctrlaltdel
dcb
ddns-confgen
debugfs
delgroup
deluser
depmod
devlink
dhclient
dhclient-script
dmeventd
dmidecode
dmsetup
dmstats
dosfsck
dosfslabel
dovecot
dpkg-preconfigure
dpkg-reconfigure
dumpe2fs
e2freefrag
e2fsck
e2image
e2label
e2mmpstatus
e2scrub
e2scrub_all
e2undo
e4crypt
e4defrag
ebtables
ebtables-nft
ebtables-nft-restore
ebtables-nft-save
ebtables-restore
ebtables-save
edquota
era_check
era_dump
era_invalidate
era_restore
ethtool
faillock
fatlabel
fcgiwrap
fdisk
filefrag
findfs
firewalld
fixparts
fsadm
fsck
fsck.btrfs
fsck.cramfs
fsck.ext2
fsck.ext3
fsck.ext4
fsck.fat
fsck.minix
fsck.msdos
fsck.vfat
fsck.xfs
fsfreeze
fstab-decode
fstrim
ftpasswd
ftpmail
ftpquota
ftpscrub
ftpshut
ftpstats
gdisk
genl
getcap
getpcaps
getty
groupadd
groupdel
groupmems
groupmod
grpck
grpconv
grpunconv
grub-bios-setup
grub-install
grub-macbless
grub-mkconfig
grub-mkdevicemap
grub-probe
grub-reboot
grub-set-default
halt
hdparm
httxt2dbm
hwclock
iconvconfig
ifconfig
ifdown
ifquery
ifup
in.proftpd
init
insmod
install-sgmlcatalog
installkernel
integritysetup
invoke-rc.d
ip
ip6tables
ip6tables-apply
ip6tables-legacy
ip6tables-legacy-restore
ip6tables-legacy-save
ip6tables-nft
ip6tables-nft-restore
ip6tables-nft-save
ip6tables-restore
ip6tables-restore-translate
ip6tables-save
ip6tables-translate
ipmaddr
ipset
ipset-translate
iptables
iptables-apply
iptables-legacy
iptables-legacy-restore
iptables-legacy-save
iptables-nft
iptables-nft-restore
iptables-nft-save
iptables-restore
iptables-restore-translate
iptables-save
iptables-translate
iptunnel
irqbalance
irqbalance-ui
isadump
isaset
iscsi-iname
iscsi_discovery
iscsiadm
iscsid
iscsistart
isosize
ispell-autobuildhash
iucode-tool
iucode_tool
jk_check
jk_chrootlaunch
jk_chrootsh
jk_cp
jk_init
jk_jailuser
jk_list
jk_lsh
jk_socketd
jk_update
kbdrate
killall5
kpartx
ldattach
ldconfig
ldconfig.real
locale-gen
logrotate
logsave
losetup
lsmod
luksformat
lvchange
lvconvert
lvcreate
lvdisplay
lvextend
lvm
lvmconfig
lvmdiskscan
lvmdump
lvmpolld
lvmsadc
lvmsar
lvreduce
lvremove
lvrename
lvresize
lvs
lvscan
make-bcache
make-ssl-cert
mariadbd
mdadm
mdmon
mii-tool
milter-greylist
mkdosfs
mke2fs
mkfs
mkfs.bfs
mkfs.btrfs
mkfs.cramfs
mkfs.ext2
mkfs.ext3
mkfs.ext4
mkfs.fat
mkfs.minix
mkfs.msdos
mkfs.ntfs
mkfs.vfat
mkfs.xfs
mkhomedir_helper
mkinitramfs
mklost+found
mkntfs
mkswap
modinfo
modprobe
mount.fuse
mount.fuse3
mount.lowntfs-3g
mount.ntfs
mount.ntfs-3g
mpathpersist
multipath
multipathd
mysqld
named
nameif
needrestart
newusers
nfnl_osf
nft
nologin
ntfsclone
ntfscp
ntfslabel
ntfsresize
ntfsundelete
on_ac_power
opendkim
opendkim-atpszone
opendkim-expire
opendkim-gengraphs
opendkim-genkey
opendkim-genstats
opendkim-genzone
opendkim-importstats
opendkim-stats
opendkim-testkey
opendkim-testmsg
overlayroot-chroot
ownership
pam-auth-update
pam_extrausers_chkpwd
pam_extrausers_update
pam_getenv
pam_timestamp_check
paperconfig
parted
partprobe
pdata_tools
php-fpm7.4
php-fpm8.0
php-fpm8.1
php-fpm8.2
php-fpm8.3
phpdismod
phpenmod
phpquery
pivot_root
plipconfig
plymouthd
policy-test
postalias
postcat
postconf
postdrop
postfix
postfix-add-filter
postfix-add-policy
postfix-collate
postgrey
postkick
postlock
postlog
postmap
postmulti
postqueue
postsuper
posttls-finger
poweroff
proftpd
proftpd-gencert
pvchange
pvck
pvcreate
pvdisplay
pvmove
pvremove
pvresize
pvs
pvscan
pwck
pwconv
pwunconv
qemu-ga
qmqp-sink
qmqp-source
qshape
quota_nld
quotacheck
quotaoff
quotaon
quotastats
rarp
readprofile
reboot
remove-default-ispell
remove-default-wordlist
remove-shell
repquota
resize2fs
rmail
rmmod
rmt
rmt-tar
rndc
rndc-confgen
route
rpc.rquotad
rsyslogd
rtacct
rtcwake
rtmon
runlevel
runuser
sasl-sample-server
saslauthd
sasldbconverter2
sasldblistusers2
saslpasswd2
saslpluginviewer
select-default-ispell
select-default-wordlist
sendmail
sensors-detect
service
setcap
setquota
setvesablank
setvtrgb
sfdisk
sgdisk
shadowconfig
shutdown
slattach
smtp-sink
smtp-source
spamd
split-logfile
sshd
start-stop-daemon
sudo_logsrvd
sudo_sendlog
sulogin
swaplabel
swapoff
swapon
switch_root
sysctl
tarcat
tc
telinit
testsaslauthd
thermald
thin_check
thin_delta
thin_dump
thin_ls
thin_metadata_size
thin_repair
thin_restore
thin_rmap
thin_trim
tipc
tsig-keygen
tune2fs
tzconfig
u-d-c-print-pci-ids
umount.udisks2
unix_chkpwd
unix_update
update-ca-certificates
update-catalog
update-default-aspell
update-default-ispell
update-default-wordlist
update-dictcommon-aspell
update-dictcommon-hunspell
update-grub
update-grub-gfxpayload
update-grub2
update-gsfontmap
update-icon-caches
update-info-dir
update-initramfs
update-locale
update-mime
update-passwd
update-pciids
update-rc.d
update-shells
update-xmlcatalog
upgrade-from-grub-legacy
usbmuxd
useradd
userdel
usermod
uuidd
validlocale
vcstime
vdpa
veritysetup
vgcfgbackup
vgcfgrestore
vgchange
vgck
vgconvert
vgcreate
vgdisplay
vgexport
vgextend
vgimport
vgimportclone
vgmerge
vgmknodes
vgreduce
vgremove
vgrename
vgs
vgscan
vgsplit
vigr
vipw
virtualmin
visudo
vpddecode
warnquota
wipefs
xfs_admin
xfs_bmap
xfs_copy
xfs_db
xfs_estimate
xfs_freeze
xfs_fsr
xfs_growfs
xfs_info
xfs_io
xfs_logprint
xfs_mdrestore
xfs_metadump
xfs_mkfile
xfs_ncheck
xfs_quota
xfs_repair
xfs_rtcp
xfs_scrub
xfs_scrub_all
xfs_spaceman
xqmstats
xtables-legacy-multi
xtables-monitor
xtables-nft-multi
zerofree
zic
zramctl

مشاهدة ملف: aspell-autobuildhash

#!/usr/bin/perl -w
#
#  script for aspell hash autorebuild in Debian systems
#
# Copyright 2004-2021 Agustin Martin Domingo <agmartin@debian.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, see <http://www.gnu.org/licenses/>.
# -------------------------------------------------------------------------

use strict;

my $debug;
my $dry_run;
my $force;
my $triggered;
my $usrlibdir   = "/usr/lib/aspell";
my $usrsharedir = "/usr/share/aspell";
my $varlibdir   = "/var/lib/aspell";
my $compatdir   = "$varlibdir";
my $datadir     = "$usrlibdir";             # The data dir
my $program     = "aspell-autobuildhash";

sub usage {
  print STDERR "\nUsage:\taspell-autobuildhash [options]\n"
    . "\n"
    . "Options:\n"
    . "\t--debug         Show debugging info about aspell-autobuildhash\n"
    . "\t                internal work. Will also enable aspell affix validation.\n"
    . "\t--dry-run       Show what would be done, but do nothing real.\n"
    . "\t--force         Do the job regardless of versions comparisons.\n"
    . "\t--triggered     Tell the script that is run in the triggers stage.\n";
}

sub debugprint {
  print STDERR "@_\n" if $debug;
}

sub mymessage{
  my $lang     = shift;
  my $message  = join(" ",@_);
  my $question = "dictionaries-common/ispell-autobuildhash-message";

  subst($question,"xxpell","aspell");
  subst($question,"XXpell","Aspell");
  subst($question,"hashfile","$lang");
  subst($question,"errormsg","$message");
  fset ($question,"seen","false");
  title("dictionaries-common: Running aspell-autobuildhash");
  input("critical",$question);
  go ();
}

sub myerror {
  mymessage @_;
  exit 1;
}

# ---------------------------------------------------------------------
#      Handle autorebuilding
# ---------------------------------------------------------------------

sub autorebuild {
  my $lang            = shift ||                         # The dictionary name
    myerror("aspell-autobuildhash","No argument passed to function autorebuild");
  my $old_remove_data = shift;
  my $aspell_compat   = shift;                           # aspell compat file
  my $langsfile       = "$usrsharedir/$lang.contents";   # The subdicts file
  my $options         = " --per-conf=/dev/null ";        # Make sure no personal conf is used at all
  my %new_remove_data = ();
  my @sublangs        = ();

  $options     .= " --dont-validate-affixes " unless $debug;

  myerror "$program: aspell data dir $datadir does not exist" unless ( -d $datadir );

  # Import registered removal data.
  foreach my $entry ( keys %{$old_remove_data} ){
    $new_remove_data{$entry}++;
    $new_remove_data{'fake-remove'}{$entry}++;
  }

  # Check if there is a contents file for this compat name
  if ( -e $langsfile ){
    open (my $LANGSFILE, "< $langsfile") || die "Could not open $langsfile for reading";
    @sublangs = <$LANGSFILE>;
    close $LANGSFILE;
  } else {
    push @sublangs, $lang;
  }
  chomp @sublangs;

  foreach ( @sublangs ){
    next if m/^\s*$/;
    next if m/^\s*\#/;
    s/^\s+//;
    s/\s+$//;

    my $sublang = $_;
    my $base    = "$usrsharedir/$sublang";     # The wordlist basename
    my $hash    = "$varlibdir/$sublang.rws";   # The hash file
    my $link    = "$usrlibdir/$sublang.rws";   # The link to the hash file
    my $msg     = '';
    my $unpack  = '';
    my $show_aspell_compat = $debug ?  " (compat: $aspell_compat)" : "";

    print STDERR "aspell-autobuildhash: processing: $lang [$sublang]$show_aspell_compat.\n";

    if ( -e "$base.mwl.gz" ){
      $unpack = "zcat $base.mwl.gz";
    } elsif ( -e "$base.wl.gz") {
      $unpack = "zcat $base.wl.gz";
    } elsif ( -e "$base.cwl.gz") {
      $unpack = "zcat $base.cwl.gz | precat";
    } else {
      mymessage($lang,"$program: Could not find any of $base.{mwl,wl,cwl}.gz");
      return;
    }

    #$unpack = "$unpack | aspell clean strict";
    my $command = "$unpack | aspell $options --local-data-dir=$datadir --lang=$lang create master $hash";
    if ( $dry_run ){
      print STDERR "$command\n";
      $new_remove_data{'fake-remove'}{"$hash"}++;
      $new_remove_data{'fake-remove'}{"$link"}++;
    } else {
      debugprint(" - command: $command");
      if ( system ("$command") == 0 ){
	$new_remove_data{'remove'}{$hash}++;
	if ( -w  "$usrlibdir" ){
	  symlink($hash,$link) unless -e $link;
	} else {
	  print STDERR "$program warning: Non writable \"$usrlibdir\". Not setting symlink";
	}
	if ( -l "$link" ){
	  # Make sure link is recorded
	  $new_remove_data{'remove'}{"$link"}++;
	}
      } else {
	$msg = "$program: Could not build the hash file for $sublang" ;
      }
    }

    if ( $msg ){                 # Do not break postinst if hash cannot be built
      mymessage ($lang,$msg);    # Just inform about that
      return;
    }
  }
  $new_remove_data{'status'} = "ok";
  return \%new_remove_data;
}

# ---------------------------------------------------------------------
#                   Get aspell compat version
# ---------------------------------------------------------------------

sub get_aspell_compat {
  my $aspell_compat;
  my $aspellcompatfile = "/usr/share/aspell/aspell.compat";

  if ( -e $aspellcompatfile ){
    open (my $COMPAT,"$aspellcompatfile");
    chomp ( $aspell_compat = <$COMPAT> );
    close $COMPAT;
  }
  return $aspell_compat;
}

# ---------------------------------------------------------------------
#                        The main program
# ---------------------------------------------------------------------

use Debian::DictionariesCommon qw(dico_checkroot dico_activate_trigger);
use Debconf::Client::ConfModule q(:all);
use Getopt::Long;

# Options processing
GetOptions ('debug'     => \$debug,
	    'dry-run'   => \$dry_run,
	    'force'     => \$force,
	    'triggered' => \$triggered
) or usage();

# Check if we are root
dico_checkroot() unless $dry_run;

# Honour 'DICT_COMMON_DEBUG' environment variable.
unless ( $debug ){
  $debug++ if defined $ENV{'DICT_COMMON_DEBUG'};
}

my %old_remove_data = ();
my $aspell_compat   = get_aspell_compat();

unless ( $triggered or $force ) {
  exit if dico_activate_trigger("aspell-autobuildhash");
}

$force++ unless $aspell_compat;

if ( system("command -v aspell >/dev/null" ) == 0 ){
  foreach my $compat ( <$compatdir/*.compat> ){
    my $lang =  $compat;
    $lang    =~ s/\.compat$//;
    $lang    =~ s/.*\///;

    # Parse compat file
    open (my $COMPAT,"$compat");
    my $lang_compat =  <$COMPAT>;
    close $COMPAT;
    chomp $lang_compat if $lang_compat;
    $lang_compat = 0 unless $lang_compat;

    # Parse dict remove file if available
    my $remove_file     = "$varlibdir/$lang.remove";
    my %old_remove_data = ();
    if ( -e "$remove_file" ){
      open (my $REMOVE,"$remove_file");
      while (<$REMOVE>){
        chomp;
        next if m/^\s*$/;
        s/^\s+//;
        s/\s+$//;
        if ( -e "$_" ){
          $old_remove_data{$_}++;
        } else {
          debugprint "$program: \"$_\" in $remove_file not found. Upgrading info.";
        }
      }
      close $REMOVE;
    }

    #
    if ( $force || $aspell_compat ne $lang_compat ){
      print STDERR "--\n" if ( $debug or $dry_run );
      debugprint "$lang => compat: \"$compat\", aspell_compat: [$aspell_compat]; lang_compat: [$lang_compat]";
      my $new_remove_data = autorebuild($lang,\%old_remove_data,$aspell_compat);
      if ( defined $new_remove_data->{'status'} ){
	my $newcompat = $aspell_compat || 0;
	if ( $dry_run ){
	  print STDERR "$newcompat > $compat\n";
	  print STDERR "Remove: \n", join("\n",sort keys %{$new_remove_data->{'fake-remove'}}) ,"\n";
	} else {
	  # Update compat file
	  open (my $COMPAT,">","$compat");
	  print $COMPAT "$newcompat\n";
	  close $COMPAT;
	  debugprint "Updated $compat to $newcompat";
	  # Update remove file
	  open (my $REMOVE,">","$remove_file")
	    or die "$program: Could not open \"$remove_file\" for write.";
	  print $REMOVE join("\n",sort keys %{$new_remove_data->{'remove'}}),"\n";
	  close $REMOVE;
	}
      } else {
	debugprint " *=* $compat not updated because of an error";
      }
    }
  }
} else {
  debugprint "$program:  aspell is not installed. Doing nothing";
}

__END__

=head1 NAME

B<aspell-autobuildhash> - Autobuilding aspell hash files for some dicts

=head1 SYNOPSIS

 aspell-autobuildhash [--force]

   Options:
    --debug      Show extra info about aspell-autobuildhash internal
                 work. Will also enable aspell affix validation.
    --dry-run    Show what would be done, but do nothing real.
    --force      Rebuild the hash file for all dicts providing a
                 compat file skipping the test.
    --triggered  Tell the script that is run in the triggers stage.

=head1 DESCRIPTION

B<aspell-autobuildhash> is a script that will manage aspell hash files
autobuild, intended to be called from the dictionaries-common tools.
Depending on the aspell
compatibility level and on the compatibility level used for the hash file
if present, will decide whether it must be rebuilt or not. This script will
only work on aspell packages prepared to use it, it will do nothing for other
aspell dict packages.

=head1 OPTIONS

 --debug      Show some extra information about aspell-autobuildhash
              internal work. Will also enable aspell affix validation.
 --dry-run    Show what would be done, but do nothing real.
 --force      Rebuild the hash file for all dicts providing a compat
              file regardless of the compatibility levels found.
 --triggered  Tell the script that is run in the triggers stage. When
              run under dpkg control, do not try to set the
              'aspell-autobuildhash' trigger, but run real
              B<aspell-autobuildhash> code. When not run under dpkg
              control, real code will always be run and '--triggered'
              option has no real effect.

=head1 PACKAGE MAINTAINERS

To use this system, B<aspell-autobuildhash> expects a F<$lang.compat> file
in F</var/lib/aspell> (I<$lang> stands for the lang basename with variant
if any, e.g. I<$lang> is something like I<gl-minimos> or I<en>))
containing aspell compatibility version for last successful build
or "0" or en empty file if hash is to be rebuild, as is for dictionary
installation and upgrades.

When upgrading B<aspell>, script will check if version in I<$lang.compat>
is different from I<aspell.compat> and rebuild if so, updating
I<$lang.compat> with the new value.

Wordlists should previously be compressed either with gzip
(and their extensions set as F<.mwl.gz> or F<.wl.gz>) or preferably
first with aspell prezip and then gzipped (with F<.cwl.gz> extension).
This applies both for plain wordlists and munched wordlists
(in the ispell way) if you use affix compression.

If your package will provide a single hash, install prezipped+gzipped
wordlist as F</usr/share/aspell/$lang.cwl.gz> or, if prezip is not used,
as F</usr/share/aspell/$lang.mwl.gz>.

If your package will provide more than one aspell hash for the same $lang,
you will need to place each compressed wordlist as e.g.
F</usr/share/aspell/$subdict.cwl.gz>, and the common F<$lang.compat> as
above. Then create a F</usr/share/aspell/$lang.contents> file with the
base names of the subdicts, one in a line. For English that will contain,
amongst other possible lines

 en-common
 en-variant_0
 en-variant_1
 en-variant_2
 en_CA-w_accents-only

No need to use this file if a single hash is being created.

Dictionaries-common scripts will call internally this script and create a
single hash file at F</var/lib/ispell/$lang.rws>, or hash files at
F</var/lib/ispell/$subdict.rws>. You must set a symlink to that
files from F</usr/lib/aspell/$lang.rws> or
F</usr/lib/aspell/$subdict.rws> as appropriate.

Aspell dictionary packages using this script must make sure that
I<$lang.compat> is reset on every new install/upgrade, so hash is rebuilt.
They must also make sure that I<$lang.compat> and all of
F</var/lib/aspell/$lang.rws> or F</var/lib/aspell/$subdict.rws>
are removed on package removal.

As of version C<1.10>, B<installdeb-aspell> script will understand
C<'auto-compat'> and C<'auto-contents'> fields in F<$dict.info-aspell>
file to help with this by adding needed debhelper snippets.
Put in that entry the base name(s) of your compat and contents file(s)
and carefully check resulting maintainer scripts after build.

Note that you are no longer suggested to ship empty files at
any of F</var/lib/aspell/$lang.compat>, F</var/lib/aspell/$lang.rws>
or F</var/lib/aspell/$subdict.rws>, but explicitly create/update them
on install and explicitly remove them on removal.

B<aspell> maintainer should also call this script from package postinst.
When comparing versions it will get the aspell version from file
F</usr/share/aspell/aspell.compat>.

=head1 AUTHORS

Agustin Martin <agmartin@debian.org>

=head1 COPYRIGHT

Copyright (C) 2004-2013 Agustin Martin <agmartin@debian.org>

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.

=cut