Ganteng Doang Upload Shell Gak Bisa


Linux server.jmdstrack.com 3.10.0-1160.119.1.el7.tuxcare.els10.x86_64 #1 SMP Fri Oct 11 21:40:41 UTC 2024 x86_64
/ usr/ bin/

//usr/bin/repotrack

#!/usr/bin/python -tt
# 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 2 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, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
# (c) 2005 seth vidal skvidal at phy.duke.edu


# helps partially track a repo. Let's you download a package + all of its
# deps from any set of repos.
# use: so you can keep current on any given pkg + its deps from another
#      repo w/o enabling that repo in your yum configuration by default
#      also for making partial mirrors that traverse dependencies.

import os
import sys
import shutil
from optparse import OptionParser
from urlparse import urljoin
import logging


import yum
import yum.Errors
import rpmUtils

from yum.misc import getCacheDir
from yum.constants import *
from yum.packages import parsePackages
from yum.packageSack import ListPackageSack

# for yum 2.4.X compat
def sortPkgObj(pkg1 ,pkg2):
    """sorts a list of yum package objects by name"""
    if pkg1.name > pkg2.name:
        return 1
    elif pkg1.name == pkg2.name:
        return 0
    else:
        return -1
        
class RepoTrack(yum.YumBase):
    def __init__(self, opts):
        yum.YumBase.__init__(self)
        self.logger = logging.getLogger("yum.verbose.repotrack")
        self.opts = opts
           
    def findDeps(self, po):
        """Return the dependencies for a given package, as well
           possible solutions for those dependencies.
           
           Returns the deps as a dict  of:
            dict[reqs] = [list of satisfying pkgs]"""
        
   
        reqs = po.returnPrco('requires')
        reqs.sort()
        pkgresults = {}
        
        for req in reqs:
            (r,f,v) = req
            if r.startswith('rpmlib('):
                continue
            
            pkgresults[req] = list(self.whatProvides(r, f, v))

        return pkgresults
    

def more_to_check(unprocessed_pkgs):
    for pkg in unprocessed_pkgs.keys():
        if unprocessed_pkgs[pkg] is not None:
            return True
    
    return False

def parseArgs():
    usage = """
    Repotrack: keep current on any given pkg and its deps. It will download the package(s) you 
               want to track and all of their dependencies
    
    %s [options] package1 [package2] [package..]    """ % sys.argv[0]
    
    parser = OptionParser(usage=usage)
    parser.add_option("-c", "--config", default='/etc/yum.conf',
        help='config file to use (defaults to /etc/yum.conf)')
    parser.add_option("-a", "--arch", default=None,
        help='check as if running the specified arch (default: current arch)')
    parser.add_option("-r", "--repoid", default=[], action='append',
        help="specify repo ids to query, can be specified multiple times (default is all enabled)")
    parser.add_option("--repofrompath", action="append",
        help="specify repoid & paths of additional repositories - unique repoid "
             "and complete path required, can be specified multiple times. "
             "Example: --repofrompath=myrepo,/path/to/repo")
    parser.add_option("-t", "--tempcache", default=False, action="store_true", 
        help="Use a temp dir for storing/accessing yum-cache")
    parser.add_option("-p", "--download_path", dest='destdir', 
        default=os.getcwd(), help="Path to download packages to")
    parser.add_option("-u", "--urls", default=False, action="store_true", 
        help="Just list urls of what would be downloaded, don't download")
    parser.add_option("-n", "--newest", default=True, action="store_false", 
        help="Toggle downloading only the newest packages(defaults to newest-only)")
    parser.add_option("-q", "--quiet", default=False, action="store_true", 
        help="Output as little as possible")
                          
    (opts, args) = parser.parse_args()
    return (opts, args)


def main():
# TODO/FIXME
# gpg/sha checksum them

    (opts, user_pkg_list) = parseArgs()
    
    if len(user_pkg_list) == 0:
        print >> sys.stderr, "Error: no packages specified to parse"
        sys.exit(1)
        
    if not os.path.exists(opts.destdir) and not opts.urls:
        try:
            os.makedirs(opts.destdir)
        except OSError, e:
            print >> sys.stderr, "Error: Cannot create destination dir %s" % opts.destdir
            sys.exit(1)
    
    if not os.access(opts.destdir, os.W_OK) and not opts.urls:
        print >> sys.stderr, "Error: Cannot write to  destination dir %s" % opts.destdir
        sys.exit(1)
        
    my = RepoTrack(opts=opts)
    my.doConfigSetup(fn=opts.config,init_plugins=False) # init yum, without plugins
    
    if opts.arch:
        archlist = []
        archlist.extend(rpmUtils.arch.getArchList(opts.arch))
    else:
        archlist = rpmUtils.arch.getArchList()

    if opts.repofrompath:
        for repo in opts.repofrompath:
            tmp = tuple(repo.split(','))
            if len(tmp) != 2:
                my.logger.error("Error: Bad repofrompath argument: %s" %repo)
                continue
            repoid, repopath = tmp
            if repopath and repopath[0] == '/':
                baseurl = 'file://' + repopath
            else:
                baseurl = repopath
            try:
                my.add_enable_repo(repoid, baseurls=[baseurl],
                                   basecachedir=my.conf.cachedir,
                                   timestamp_check=False)
            except yum.Errors.DuplicateRepoError, e:
                my.logger.error(e)
                sys.exit(1)
            if not opts.quiet:
                my.logger.info("Added %s repo from %s" % (repoid, repopath))
        
    # do the happy tmpdir thing if we're not root
    if os.geteuid() != 0 or opts.tempcache:
        cachedir = getCacheDir()
        if cachedir is None:
            print >> sys.stderr, "Error: Could not make cachedir, exiting"
            sys.exit(50)
            
        my.repos.setCacheDir(cachedir)

    if len(opts.repoid) > 0:
        myrepos = []
        
        # find the ones we want
        for glob in opts.repoid:
            myrepos.extend(my.repos.findRepos(glob))
        
        # disable them all
        for repo in my.repos.repos.values():
            repo.disable()
        
        # enable the ones we like
        for repo in myrepos:
            repo.enable()
            try:
                my._getSacks(archlist=archlist, thisrepo=repo.id)
            except yum.Errors.RepoError, e:
                my.logger.error(e)
                sys.exit(1)

    try:
        my.doRepoSetup()
        my._getSacks(archlist=archlist)
    except yum.Errors.RepoError, e:
        my.logger.error(e)
        sys.exit(1)
    
    unprocessed_pkgs = {}
    final_pkgs = {}
    pkg_list = []
    
    avail = my.pkgSack.returnPackages()
    for item in user_pkg_list:
        exactmatch, matched, unmatched = parsePackages(avail, [item])
        pkg_list.extend(exactmatch)
        pkg_list.extend(matched)
        if opts.newest:
            this_sack = ListPackageSack()
            this_sack.addList(pkg_list)
            pkg_list = this_sack.returnNewestByNameArch()
            del this_sack
    
    if len(pkg_list) == 0:
        print >> sys.stderr, "Nothing found to download matching packages specified"
        sys.exit(1)
        
    for po in pkg_list:
        unprocessed_pkgs[po.pkgtup] = po
    

    while more_to_check(unprocessed_pkgs):
    
        for pkgtup in unprocessed_pkgs.keys():
            if unprocessed_pkgs[pkgtup] is None:
                continue

            po = unprocessed_pkgs[pkgtup]
            final_pkgs[po.pkgtup] = po
            
            deps_dict = my.findDeps(po)
            unprocessed_pkgs[po.pkgtup] = None
            for req in deps_dict.keys():
                pkg_list = deps_dict[req]
                if opts.newest:
                    this_sack = ListPackageSack()
                    this_sack.addList(pkg_list)
                    pkg_list = this_sack.returnNewestByNameArch()
                    del this_sack

                for res in pkg_list:
                    if res is not None and res.pkgtup not in unprocessed_pkgs:
                        unprocessed_pkgs[res.pkgtup] = res
    
    
    
    download_list = final_pkgs.values()
    if opts.newest:
        this_sack = ListPackageSack()
        this_sack.addList(download_list)
        download_list = this_sack.returnNewestByNameArch()
        
    download_list.sort(sortPkgObj)
    for pkg in download_list:
        repo = my.repos.getRepo(pkg.repoid)
        remote = pkg.returnSimple('relativepath')
        local = os.path.basename(remote)
        local = os.path.join(opts.destdir, local)
        if (os.path.exists(local) and 
            os.path.getsize(local) == int(pkg.returnSimple('packagesize'))):
            
            if not opts.quiet:
                my.logger.info("%s already exists and appears to be complete" % local)
            continue

        if opts.urls:
            url = urljoin(repo.urls[0],remote)
            print '%s' % url
            continue

        # Disable cache otherwise things won't download
        repo.cache = 0
        if not opts.quiet:        
            my.logger.info('Downloading %s' % os.path.basename(remote))
        pkg.localpath = local # Hack: to set the localpath to what we want.
        path = repo.getPackage(pkg, copy_local=1)

        if not os.path.exists(local) or not os.path.samefile(path, local):
            shutil.copy2(path, local)

if __name__ == "__main__":
    main()
    
			
			


Thanks For 0xGh05T - DSRF14 - Mr.Dan07 - Leri01 - FxshX7 - AlkaExploiter - xLoveSyndrome'z - Acep Gans'z

JMDS TRACK – Just Another Diagnostics Lab Site

Home

JMDS TRACK Cameroon

Boost the productivity of your mobile ressources


Make An Appointment


Fleet management

  1. Reduce the operting cost and the unavailability of your vehicles
  2. reduce the fuel consumption of your fleet
  3. Improve the driving dehavior and safety of your drivers
  4. optimize the utilization rate of your equipment 
  5. protect your vehicle against theft
  6. Improve the quality of your customer service


Find out more

Assets management

  1. Track the roaming of your equipment
  2. Optimise the management of your assets on site and during transport
  3. Secure the transport of your goods
  4. Make your team responsible for preventing the loss of tools, equipment
  5. Take a real-time inventory of your equipment on site
  6. Easily find your mobile objects or equipment



Find out more



Find out more

Antitheft solutions

  1. Secure your vehicles and machinery and increase your chances of recovering them in the event of theft
  2. Protect your assets and reduce the costs associated with their loss
  3. Combine immobiliser and driver identification and limit the risk of theft
  4. Identify fuel theft and reduce costs
  5. Protect your goods and take no more risks
  6. Be alerted to abnormal events

Our Location

 Douala BP cité 

     and

Yaoundé Total Essos


Make An Appointment


Get Directions

682230363/ 677481892

What makes us different from others

  • young and dynamic team
  • call center 24/24 7/7
  • roaming throughout Africa
  • team of developers who can develop customer-specific solutions
  • diversity of services
  • reactive and prompt after-sales service when soliciting a customer or a malfunction
  • Free Maintenance and installation in the cities of Douala and Yaounde

https://youtu.be/xI1cz_Jh2x8

15+
years of experience in GPS system development, production and deployment.

15 Collaborators

More than 15 employees dedicated to the research and development of new applications and to customer care

5 000 Vehicles and mobile assets

5 000 vehicles and mobile assets under management, in Africa

Our Partners










Latest Case Studies

Our current projects 

5/5
Bon SAV , SATISFAIT DU TRAITEMENT DES REQUETES

M DIPITA CHRISTIAN
Logistic Safety Manager Road Safety Manager
5/5
La réactivité de JMDS est excellente
Nous restons satisfait dans l’ensemble des prestations relatives a la couverture de notre parc automobile

Hervé Frédéric NDENGUE
Chef Service Adjoint de la Sécurité Générale (CNPS)
5/5
L’APPLICATION EMIXIS est convivial A L’utilisation
BEIG-3 SARL
DIRECTOR GENERAL
5/5
Nevertheless I am delighted with the service
MR. BISSE BENJAMIN
CUSTOMER

Subsribe To Our Newsletter

Stay in touch with us to get latest news and special offers.



Address JMDS TRACK

Douala bp cité



and

YAOUNDE Total Essos

Call Us

+237682230363



Email Us


info@jmdstrack.cm