Menu

PGL not working on Arh/AntergOS

Help
dertuny
2015-10-08
2023-03-10
  • dertuny

    dertuny - 2015-10-08

    Hi !!!
    I'm having problems with pgl. When I try to configure anything, update or simply start the program nothing happens, not start. On options - settings i set /usr/bin/gksu, but a message saying "Error, (command) /usr/bin/gksu sh /tmp/execute-all-pgl-commands.sh, (output) none" appears when I try to change configuration.
    I installed pgl from aur,.
    I used this program on Lubuntu for a long time without any problems, and it's great.
    I searching info on google but I can't find the answer.
    I need help please.
    Thank you.

     
  • jre-phoenix

    jre-phoenix - 2015-10-08

    Please check the (terminal) output of "sudo pglcmd status" (and maybe "pglcmd show_config") and the logfiles /var/log/pgl/pglcmd.log and /var/log/pgl/pglcmd.log.
    You may also remove your $HOME/.config/pgl/pglgui.conf.

     
  • dertuny

    dertuny - 2015-10-10

    GREAT!! I removed pglgui.conf and now it's working. The message with error still appearing, and I would like pgl start at boot and automatic lists update, but the changes seems not saved.

     
  • Fincer

    Fincer - 2017-12-20

    Sorry for late answer.

    Encountered exactly same error. Solved by installing 'cron' package. Please see my detailed answer here:

    https://aur.archlinux.org/packages/pgl-git/#comment-625632

     
  • Fincer

    Fincer - 2017-12-20

    I studied PeerGuardian source code for a little while. As a conclusion, I think the parts of Cron implementation is a mess. Several issues here:

    By default, PeerGuardian installs (or wants to install) /etc/cron.daily/pglcmd file. NOTE: This is not same file than /usr/bin/pglcmd

    1. It looks like that in /src/pglgui.cpp it is always expected that /etc/cron.{daily,weekly,monthly}/pglcmd file exists. Especially lines 622-624 + functions getUpdateFrequencyPath() and getUpdateFrequencyCurrentPath(). Equivalent functions exist in /src/pglcore.cpp, too. Anyway, if no cron file exists -> empty mv command (as these functions return "" in any case)

    2. If I do 'mv /etc/cron.daily/pglcmd /etc/cron.weekly/pglcmd', as the temporary script does, how can my package manager notice or track this change when I want to uninstall PeerGuardian?

    3. If PeerGuardian is built without cron support (--disable-cron flag used) could it be better to disable/grey out whole "Update the blocklists automatically" option in GUI?

    4. If PeerGuardian is built without cron support, should /src/pglgui.cpp and /src/pglcore.cpp include some mechanism to handle that situation (cron folders or cron package doesn't exist)? They don't have such implementation right now, as far as I can see.

    Otherwise some mechanisms would be easy to implement but I haven't figured out how to deal with the Package Manager issue.

     

    Last edit: Fincer 2017-12-20
    • Jouni Järvinen

      Jouni Järvinen - 2017-12-20

      That doesn't sound specific to Arch Linux at all.

       
      • Fincer

        Fincer - 2017-12-20

        Yes, it is more an upstream issue of PeerGuardian's cron/automatic update implementation. Visible to user as strange error messages appearing whenever "Applying changes" by executing /tmp/execute-all-pgl-commands.sh

        If cron is not installed on the system, commands which are generated by PeerGuardian are

        1
        2
        3
        4
        5
        #!/bin/sh
        set -e
        mv /tmp/pglcmd.conf /etc/pgl/pglcmd.conf
        mv <arg1> <arg2>
        /usr/bin/pglcmd reload
        

        Where <arg1> <arg2> are cron arguments (for example, mv /etc/cron.daily/pglcmd /etc/cron.weekly/pglcmd). These arguments are empty if /etc/cron.daily/pglcmd is not found, thus leading to invalid mv command without any arguments.

        On the other hand, if cron is installed, /tmp/execute-all-pgl-commands.sh looks like:

        1
        2
        3
        4
        5
        #!/bin/sh
        set -e
        mv /tmp/pglcmd.conf /etc/pgl/pglcmd.conf
        mv /etc/cron.daily/pglcmd /etc/cron.weekly/pglcmd
        /usr/bin/pglcmd reload
        

        Those two arguments are actually expected & generated by m_Root->moveFile(getUpdateFrequencyCurrentPath(), filepath, false); in /pglgui/src/pglgui.cpp (line 624), where <arg1> is function getUpdateFrequencyCurrentPath() and <arg2> is filepath (A.K.A. function getUpdateFrequencyPath())

        Those functions are empty if /etc/cron.{daily,weekly,monthly}/pglcmd file is not present, thus leading to empty arguments <arg1> & <arg2> as well. In some cases, only either of these arguments is empty, leading to invalid single-argument commands such as mv /etc/cron.weekly/pglcmd

        This situation is easily solved by:

        1. installing cron and building PeerGuardian with cron "support" (not using --disable-cron flag). On this way, PeerGuardian can set up its default pglcmd cron file at location /etc/cron.daily/, so that this file is never missing and never leading to completely empty mv commands.
          PROBLEM 1 HERE: misleading and broken GUI. Even if I have unchecked automatic blocklist updates, /etc/cron.daily/pglcmd file is still present in the system. How can I be sure it won't be executed daily, as I expect from GUI output? Can I?
          PROBLEM 2 HERE: User can bug the "automatic updates" feature in GUI, leading to two existing pglcmd files, for example one in /etc/cron.daily/ folder and another one in /etc/cron.weekly/ folder. Better code logic to handle such situations is needed here.

        2. installing /etc/cron.daily/pglcmd file to some other location by default and copying it from that location to corresponding /etc/cron.{daily,weekly,monthly} folder whenever user wants to do so.
          PROBLEM HERE: package management. How can package manager track copied files when uninstalling PeerGuardian? Should there be installed just a dummy /etc/cron.{daily,weekly,monthly}/pglcmd files which are replaced with a true one whenever needed? And PeerGuardian replaces the source cron file just with a dummy one after copying? By this way, package manager can track PeerGuardian-specific cron files at least.

        For now (until better implementation), I guess the second approach might be good enough, but the GUI logic should be fixed, too.

         

        Last edit: Fincer 2017-12-20
  • Kim Whitmyre

    Kim Whitmyre - 2023-03-10

    "/var/lib/pgl//var/lib/pgl/master_blocklist.p2p~" Why is this tilda ~ showing up on the .p2p list?
    This is preventing pgl from running!! I've tried simply past a file that doesn't have the tilda, but the tilda mysteriously appears!!

     

Log in to post a comment.